Remove sales invoice from serial number while making sales return entery using delivery note

This commit is contained in:
Rohit Waghchaure 2017-07-06 18:19:18 +05:30
parent afdd7a626c
commit 934e69fe0b

View File

@ -85,6 +85,10 @@ class SerialNo(StockController):
self.supplier, self.supplier_name = \
frappe.db.get_value("Purchase Receipt", purchase_sle.voucher_no,
["supplier", "supplier_name"])
# If sales return entry
if self.purchase_document_type == 'Delivery Note':
self.sales_invoice = None
else:
for fieldname in ("purchase_document_type", "purchase_document_no",
"purchase_date", "purchase_time", "purchase_rate", "supplier", "supplier_name"):