mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 16:04:46 +00:00
Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
@@ -196,7 +196,6 @@ def make_purchase_receipt(source_name, target_doclist=None):
|
|||||||
bean.run_method("set_missing_values")
|
bean.run_method("set_missing_values")
|
||||||
|
|
||||||
def update_item(obj, target, source_parent):
|
def update_item(obj, target, source_parent):
|
||||||
target.conversion_factor = 1
|
|
||||||
target.qty = flt(obj.qty) - flt(obj.received_qty)
|
target.qty = flt(obj.qty) - flt(obj.received_qty)
|
||||||
target.stock_qty = (flt(obj.qty) - flt(obj.received_qty)) * flt(obj.conversion_factor)
|
target.stock_qty = (flt(obj.qty) - flt(obj.received_qty)) * flt(obj.conversion_factor)
|
||||||
target.import_amount = (flt(obj.qty) - flt(obj.received_qty)) * flt(obj.import_rate)
|
target.import_amount = (flt(obj.qty) - flt(obj.received_qty)) * flt(obj.import_rate)
|
||||||
@@ -237,7 +236,6 @@ def make_purchase_invoice(source_name, target_doclist=None):
|
|||||||
bean.run_method("set_supplier_defaults")
|
bean.run_method("set_supplier_defaults")
|
||||||
|
|
||||||
def update_item(obj, target, source_parent):
|
def update_item(obj, target, source_parent):
|
||||||
target.conversion_factor = 1
|
|
||||||
target.import_amount = flt(obj.import_amount) - flt(obj.billed_amt)
|
target.import_amount = flt(obj.import_amount) - flt(obj.billed_amt)
|
||||||
target.amount = target.import_amount * flt(source_parent.conversion_rate)
|
target.amount = target.import_amount * flt(source_parent.conversion_rate)
|
||||||
if flt(obj.purchase_rate):
|
if flt(obj.purchase_rate):
|
||||||
|
|||||||
@@ -357,9 +357,6 @@ def make_purchase_invoice(source_name, target_doclist=None):
|
|||||||
bean.run_method("set_missing_values")
|
bean.run_method("set_missing_values")
|
||||||
bean.run_method("set_supplier_defaults")
|
bean.run_method("set_supplier_defaults")
|
||||||
|
|
||||||
def update_item(obj, target, source_parent):
|
|
||||||
target.conversion_factor = 1
|
|
||||||
|
|
||||||
doclist = get_mapped_doclist("Purchase Receipt", source_name, {
|
doclist = get_mapped_doclist("Purchase Receipt", source_name, {
|
||||||
"Purchase Receipt": {
|
"Purchase Receipt": {
|
||||||
"doctype": "Purchase Invoice",
|
"doctype": "Purchase Invoice",
|
||||||
@@ -376,7 +373,6 @@ def make_purchase_invoice(source_name, target_doclist=None):
|
|||||||
"prevdoc_docname": "purchase_order",
|
"prevdoc_docname": "purchase_order",
|
||||||
"purchase_rate": "rate"
|
"purchase_rate": "rate"
|
||||||
},
|
},
|
||||||
"postprocess": update_item
|
|
||||||
},
|
},
|
||||||
"Purchase Taxes and Charges": {
|
"Purchase Taxes and Charges": {
|
||||||
"doctype": "Purchase Taxes and Charges",
|
"doctype": "Purchase Taxes and Charges",
|
||||||
|
|||||||
Reference in New Issue
Block a user