[fix] [mapper]
This commit is contained in:
parent
2e652e8294
commit
55b5dd2f10
@ -249,7 +249,7 @@ def make_purchase_invoice(source_name, target_doclist=None):
|
||||
def update_item(obj, target, source_parent):
|
||||
target.conversion_factor = 1
|
||||
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):
|
||||
target.qty = target.amount / flt(obj.purchase_rate)
|
||||
|
||||
|
@ -412,9 +412,9 @@ def make_delivery_note(source_name, target_doclist=None):
|
||||
@webnotes.whitelist()
|
||||
def make_sales_invoice(source_name, target_doclist=None):
|
||||
def update_item(obj, target, source_parent):
|
||||
target.export_amount = flt(obj.amount) - flt(obj.billed_amt)
|
||||
target.amount = target.export_amount / flt(source_parent.conversion_rate)
|
||||
target.qty = obj.basic_rate and target.amount / flt(obj.basic_rate) or obj.qty
|
||||
target.export_amount = flt(obj.export_amount) - flt(obj.billed_amt)
|
||||
target.amount = target.export_amount * flt(source_parent.conversion_rate)
|
||||
target.qty = obj.export_rate and target.export_amount / flt(obj.export_rate) or obj.qty
|
||||
|
||||
doclist = get_mapped_doclist("Sales Order", source_name, {
|
||||
"Sales Order": {
|
||||
|
@ -359,11 +359,6 @@ class DocType(SellingController):
|
||||
|
||||
@webnotes.whitelist()
|
||||
def make_sales_invoice(source_name, target_doclist=None):
|
||||
def update_item(obj, target, source_parent):
|
||||
target.export_amount = flt(obj.amount)
|
||||
target.amount = target.export_amount / flt(source_parent.conversion_rate)
|
||||
target.qty = obj.basic_rate and target.amount / flt(obj.basic_rate) or obj.qty
|
||||
|
||||
def update_accounts(source, target):
|
||||
si = webnotes.bean(target)
|
||||
si.run_method("onload_post_render")
|
||||
@ -384,7 +379,6 @@ def make_sales_invoice(source_name, target_doclist=None):
|
||||
"prevdoc_docname": "sales_order",
|
||||
"serial_no": "serial_no"
|
||||
},
|
||||
"postprocess": update_item
|
||||
},
|
||||
"Sales Taxes and Charges": {
|
||||
"doctype": "Sales Taxes and Charges",
|
||||
|
@ -352,10 +352,6 @@ def make_purchase_invoice(source_name, target_doclist=None):
|
||||
|
||||
def update_item(obj, target, source_parent):
|
||||
target.conversion_factor = 1
|
||||
target.import_amount = flt(obj.import_amount)
|
||||
target.amount = target.import_amount / flt(source_parent.conversion_rate)
|
||||
if flt(obj.purchase_rate):
|
||||
target.qty = target.amount / flt(obj.purchase_rate)
|
||||
|
||||
doclist = get_mapped_doclist("Purchase Receipt", source_name, {
|
||||
"Purchase Receipt": {
|
||||
|
Loading…
Reference in New Issue
Block a user