Minor fix for order to invoice mapping
This commit is contained in:
parent
0ad7db3bbd
commit
b74ae7aa31
@ -247,7 +247,7 @@ def make_purchase_invoice(source_name, target_doc=None):
|
||||
def update_item(obj, target, source_parent):
|
||||
target.amount = flt(obj.amount) - flt(obj.billed_amt)
|
||||
target.base_amount = target.amount * flt(source_parent.conversion_rate)
|
||||
target.qty = target.amount / flt(obj.rate) if flt(obj.rate) else flt(obj.qty)
|
||||
target.qty = target.amount / flt(obj.rate) if (flt(obj.rate) and flt(obj.billed_amt)) else flt(obj.qty)
|
||||
|
||||
doc = get_mapped_doc("Purchase Order", source_name, {
|
||||
"Purchase Order": {
|
||||
|
@ -329,7 +329,7 @@ def make_sales_invoice(source_name, target_doc=None):
|
||||
def update_item(source, target, source_parent):
|
||||
target.amount = flt(source.amount) - flt(source.billed_amt)
|
||||
target.base_amount = target.amount * flt(source_parent.conversion_rate)
|
||||
target.qty = source.rate and target.amount / flt(source.rate) or source.qty
|
||||
target.qty = target.amount / flt(source.rate) if (source.rate and source.billed_amt) else source.qty
|
||||
|
||||
doclist = get_mapped_doc("Sales Order", source_name, {
|
||||
"Sales Order": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user