diff --git a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py index 930375d491..f726ec6b80 100644 --- a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py +++ b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py @@ -138,7 +138,8 @@ class OpeningInvoiceCreationTool(Document): income_expense_account_field = "expense_account" item = get_item_dict() - return frappe._dict({ + + args = frappe._dict({ "items": [item], "is_opening": "Yes", "set_posting_time": 1, @@ -150,6 +151,11 @@ class OpeningInvoiceCreationTool(Document): "currency": frappe.db.get_value("Company", self.company, "default_currency") }) + if self.invoice_type == "Sales": + args["is_pos"] = 0 + + return args + @frappe.whitelist() def get_temporary_opening_account(company=None): if not company: