Validate serial no in return entry with against document

This commit is contained in:
Nabin Hait
2015-08-04 12:18:12 +05:30
parent 845bbe3e27
commit b7c0c55d61
4 changed files with 1231 additions and 86 deletions

View File

@@ -218,7 +218,9 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
item.serial_no += sr_no[x] + '\n';
refresh_field("serial_no", item.name, item.parentfield);
frappe.model.set_value(item.doctype, item.name, "qty", sr_no.length);
if(!doc.is_return) {
frappe.model.set_value(item.doctype, item.name, "qty", sr_no.length);
}
}
}
},