mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-15 03:01:22 +00:00
Merge pull request #46393 from ruthra-kumar/fix_error_on_internal_transfer_po_so
fix: attribute error on internal so and po
This commit is contained in:
@@ -318,16 +318,29 @@ class TransactionBase(StatusUpdater):
|
|||||||
"warehouse": item_obj.from_warehouse
|
"warehouse": item_obj.from_warehouse
|
||||||
if self.doctype in ["Purchase Receipt", "Purchase Invoice"]
|
if self.doctype in ["Purchase Receipt", "Purchase Invoice"]
|
||||||
else item_obj.warehouse,
|
else item_obj.warehouse,
|
||||||
"posting_date": self.posting_date,
|
|
||||||
"posting_time": self.posting_time,
|
|
||||||
"qty": item_obj.qty * item_obj.conversion_factor,
|
"qty": item_obj.qty * item_obj.conversion_factor,
|
||||||
"serial_no": item_obj.serial_no,
|
|
||||||
"batch_no": item_obj.batch_no,
|
|
||||||
"voucher_type": self.doctype,
|
"voucher_type": self.doctype,
|
||||||
"company": self.company,
|
"company": self.company,
|
||||||
"allow_zero_valuation_rate": item_obj.allow_zero_valuation_rate,
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if self.doctype in ["Purchase Order", "Sales Ordere"]:
|
||||||
|
args.update(
|
||||||
|
{
|
||||||
|
"posting_date": self.transaction_date,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
args.update(
|
||||||
|
{
|
||||||
|
"posting_date": self.posting_date,
|
||||||
|
"posting_time": self.posting_time,
|
||||||
|
"serial_no": item_obj.serial_no,
|
||||||
|
"batch_no": item_obj.batch_no,
|
||||||
|
"allow_zero_valuation_rate": item_obj.allow_zero_valuation_rate,
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
rate = get_incoming_rate(args=args)
|
rate = get_incoming_rate(args=args)
|
||||||
item_obj.rate = rate * item_obj.conversion_factor
|
item_obj.rate = rate * item_obj.conversion_factor
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user