fix: move value initialization to ensure it is commited

This commit is contained in:
David Arnold 2024-01-22 22:54:36 +01:00
parent 7d8aa469d7
commit bd6a4ca1d7
No known key found for this signature in database
GPG Key ID: AB15A6AF1101390D

View File

@ -215,6 +215,10 @@ class PurchaseOrder(BuyingController):
self.validate_fg_item_for_subcontracting()
self.set_received_qty_for_drop_ship_items()
if not self.advance_payment_status:
self.advance_payment_status = "Not Initiated"
validate_inter_company_party(
self.doctype, self.supplier, self.company, self.inter_company_order_reference
)
@ -470,9 +474,6 @@ class PurchaseOrder(BuyingController):
self.validate_budget()
self.update_reserved_qty_for_subcontract()
if not self.advance_payment_status:
self.advance_payment_status = "Not Initiated"
frappe.get_doc("Authorization Control").validate_approving_authority(
self.doctype, self.company, self.base_grand_total
)