mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-04 20:59:11 +00:00
fix: Internal sales item link in Purchase Invoice
This commit is contained in:
@@ -1630,15 +1630,12 @@ def make_inter_company_transaction(doctype, source_name, target_doc=None):
|
|||||||
}
|
}
|
||||||
|
|
||||||
if source_doc.get('update_stock'):
|
if source_doc.get('update_stock'):
|
||||||
item_field_map.update({
|
item_field_map["field_map"].update({
|
||||||
'field_map': {
|
source_document_warehouse_field: target_document_warehouse_field,
|
||||||
source_document_warehouse_field: target_document_warehouse_field,
|
'batch_no': 'batch_no',
|
||||||
'batch_no': 'batch_no',
|
'serial_no': 'serial_no'
|
||||||
'serial_no': 'serial_no',
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
doclist = get_mapped_doc(doctype, source_name, {
|
doclist = get_mapped_doc(doctype, source_name, {
|
||||||
doctype: {
|
doctype: {
|
||||||
"doctype": target_doctype,
|
"doctype": target_doctype,
|
||||||
|
|||||||
@@ -229,7 +229,7 @@ class BuyingController(StockController):
|
|||||||
if not cint(self.get("is_return")) and d.get("from_warehouse"):
|
if not cint(self.get("is_return")) and d.get("from_warehouse"):
|
||||||
# Get outgoing rate based on original item cost based on valuation method
|
# Get outgoing rate based on original item cost based on valuation method
|
||||||
|
|
||||||
if not d.get('sales_invoice_item'):
|
if not d.get(frappe.scrub(ref_doctype)):
|
||||||
outgoing_rate = get_incoming_rate({
|
outgoing_rate = get_incoming_rate({
|
||||||
"item_code": d.item_code,
|
"item_code": d.item_code,
|
||||||
"warehouse": d.from_warehouse,
|
"warehouse": d.from_warehouse,
|
||||||
|
|||||||
Reference in New Issue
Block a user