Update status in Purchase Receipt (#14257)

* Update status on submission if per_billed = 100

* Add patch to update existing records
This commit is contained in:
Shreya Shah
2018-05-28 18:24:28 +05:30
committed by Nabin Hait
parent b9f54ca946
commit ae95a8aa15
3 changed files with 10 additions and 0 deletions

View File

@@ -120,6 +120,8 @@ class PurchaseReceipt(BuyingController):
self.update_prevdoc_status()
if self.per_billed < 100:
self.update_billing_status()
else:
self.status = "Completed"
# Updating stock ledger should always be called after updating prevdoc status,
# because updating ordered qty, reserved_qty_for_subcontract in bin