[Enhance] Standalone debit/credit note (#14269)

* [Enhance] Standalone debit/credit note

* Test cases

* Test cases and documentation

* Removed credit, debit note links from accounts module
This commit is contained in:
rohitwaghchaure
2018-06-11 12:02:14 +05:30
committed by Nabin Hait
parent 3639b85663
commit 7048925016
20 changed files with 519 additions and 122 deletions

View File

@@ -159,6 +159,9 @@ class StatusUpdater(Document):
if hasattr(d, 'qty') and d.qty < 0 and not self.get('is_return'):
frappe.throw(_("For an item {0}, quantity must be positive number").format(d.item_code))
if hasattr(d, 'qty') and d.qty > 0 and self.get('is_return'):
frappe.throw(_("For an item {0}, quantity must be negative number").format(d.item_code))
if d.doctype == args['source_dt'] and d.get(args["join_field"]):
args['name'] = d.get(args['join_field'])