[fix] Map values in Debit / Credit Note from Stock Entry
This commit is contained in:
parent
3b3c48c877
commit
c450536a2c
@ -870,8 +870,6 @@ def make_return_jv(stock_entry):
|
|||||||
"account": r.get("account"),
|
"account": r.get("account"),
|
||||||
"party_type": r.get("party_type"),
|
"party_type": r.get("party_type"),
|
||||||
"party": r.get("party"),
|
"party": r.get("party"),
|
||||||
"against_invoice": r.get("against_invoice"),
|
|
||||||
"against_voucher": r.get("against_voucher"),
|
|
||||||
"balance": get_balance_on(r.get("account"), se.posting_date) if r.get("account") else 0
|
"balance": get_balance_on(r.get("account"), se.posting_date) if r.get("account") else 0
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -882,8 +880,7 @@ def make_return_jv_from_sales_invoice(se, ref):
|
|||||||
parent = {
|
parent = {
|
||||||
"account": ref.doc.debit_to,
|
"account": ref.doc.debit_to,
|
||||||
"party_type": "Customer",
|
"party_type": "Customer",
|
||||||
"party": ref.doc.customer,
|
"party": ref.doc.customer
|
||||||
"against_invoice": ref.doc.name,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# income account entries
|
# income account entries
|
||||||
@ -957,9 +954,6 @@ def make_return_jv_from_delivery_note(se, ref):
|
|||||||
|
|
||||||
break
|
break
|
||||||
|
|
||||||
if len(invoices_against_delivery) == 1:
|
|
||||||
parent["against_invoice"] = invoices_against_delivery[0]
|
|
||||||
|
|
||||||
result = [parent] + [{"account": account} for account in children]
|
result = [parent] + [{"account": account} for account in children]
|
||||||
|
|
||||||
return result
|
return result
|
||||||
@ -1015,9 +1009,6 @@ def make_return_jv_from_purchase_receipt(se, ref):
|
|||||||
|
|
||||||
break
|
break
|
||||||
|
|
||||||
if len(invoice_against_receipt) == 1:
|
|
||||||
parent["against_voucher"] = invoice_against_receipt[0]
|
|
||||||
|
|
||||||
result = [parent] + [{"account": account} for account in children]
|
result = [parent] + [{"account": account} for account in children]
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
Loading…
x
Reference in New Issue
Block a user