Merge pull request #9489 from rohitwaghchaure/billed_amt_issue_in_pr
[fix] Billed Amt does not get updated in Purchase Receipt, if Invoice exists and item has been returned once before
This commit is contained in:
commit
4095915bff
@ -270,6 +270,9 @@ def make_purchase_receipt(source_name, target_doc=None):
|
||||
doc = get_mapped_doc("Purchase Order", source_name, {
|
||||
"Purchase Order": {
|
||||
"doctype": "Purchase Receipt",
|
||||
"field_map": {
|
||||
"per_billed": "per_billed"
|
||||
},
|
||||
"validation": {
|
||||
"docstatus": ["=", 1],
|
||||
}
|
||||
|
@ -119,7 +119,8 @@ class PurchaseReceipt(BuyingController):
|
||||
frappe.db.set(self, 'status', 'Submitted')
|
||||
|
||||
self.update_prevdoc_status()
|
||||
self.update_billing_status()
|
||||
if self.per_billed < 100:
|
||||
self.update_billing_status()
|
||||
|
||||
if not self.is_return:
|
||||
update_last_purchase_rate(self, 1)
|
||||
|
Loading…
Reference in New Issue
Block a user