diff --git a/erpnext/controllers/buying_controller.py b/erpnext/controllers/buying_controller.py index b380ccb093f..92adcabcb12 100644 --- a/erpnext/controllers/buying_controller.py +++ b/erpnext/controllers/buying_controller.py @@ -225,7 +225,7 @@ class BuyingController(StockController): ref_doctype_map = { "Purchase Order": "Sales Order Item", "Purchase Receipt": "Delivery Note Item", - "Purchase Invoice": "Purchase Invoice Item", + "Purchase Invoice": "Sales Invoice Item", } ref_doctype = ref_doctype_map.get(self.doctype)