fix: purchase invoice qty change not recalculate the consumed qty and added test cases for purchase invoice

This commit is contained in:
Rohit Waghchaure
2021-06-15 17:29:52 +05:30
parent 6bbc8ec3e8
commit 110e152fa3
8 changed files with 463 additions and 498 deletions

View File

@@ -58,6 +58,11 @@ class BuyingController(StockController, Subcontracting):
if self.doctype in ("Purchase Receipt", "Purchase Invoice"):
self.update_valuation_rate()
def onload(self):
super(BuyingController, self).onload()
self.set_onload("backflush_based_on", frappe.db.get_single_value('Buying Settings',
'backflush_raw_materials_of_subcontract_based_on'))
def set_missing_values(self, for_validate=False):
super(BuyingController, self).set_missing_values(for_validate)