[minor] [fix]

This commit is contained in:
Nabin Hait
2013-07-15 13:04:33 +05:30
parent 87bed52818
commit a279d78496
8 changed files with 44 additions and 71 deletions

View File

@@ -92,10 +92,6 @@ erpnext.stock.DeliveryNoteController = erpnext.selling.SellingController.extend(
// for backward compatibility: combine new and previous states
$.extend(cur_frm.cscript, new erpnext.stock.DeliveryNoteController({frm: cur_frm}));
cur_frm.cscript.customer_address = cur_frm.cscript.contact_person = function(doc,dt,dn) {
if(doc.customer) get_server_fields('get_customer_address', JSON.stringify({customer: doc.customer, address: doc.customer_address, contact: doc.contact_person}),'', doc, dt, dn, 1);
}
cur_frm.cscript.new_contact = function(){
tn = wn.model.make_new_doc_and_get_name('Contact');
locals['Contact'][tn].is_customer = 1;

View File

@@ -58,14 +58,6 @@ class DocType(SellingController):
"""Get Commission rate of Sales Partner"""
return get_obj('Sales Common').get_comm_rate(sales_partner, self)
def validate_prev_docname(self):
"""Validates that Sales Order is not pulled twice"""
for d in getlist(self.doclist, 'delivery_note_details'):
if self.doc.sales_order_no == d.prevdoc_docname:
msgprint(cstr(self.doc.sales_order_no) + " sales order details have already been pulled. ")
raise Exception, "Validation Error. "
def set_actual_qty(self):
for d in getlist(self.doclist, 'delivery_note_details'):
if d.item_code and d.warehouse:
@@ -246,7 +238,6 @@ class DocType(SellingController):
d.fields.get('packed_qty', 0)
])
if packing_error_list:
from webnotes.utils import cstr
err_msg = "\n".join([("Item: " + d[0] + ", Qty: " + cstr(d[1]) \
+ ", Packed: " + cstr(d[2])) for d in packing_error_list])
webnotes.msgprint("Packing Error:\n" + err_msg, raise_exception=1)