From 685f89f2b74729aa2930aeb3e18231fc22b19d08 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Sat, 14 Jan 2017 20:47:56 +0530 Subject: [PATCH] [Fix] Discount not working in the POS --- erpnext/accounts/doctype/sales_invoice/pos.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/sales_invoice/pos.py b/erpnext/accounts/doctype/sales_invoice/pos.py index 99fed1ed40..9fb7cebb5e 100644 --- a/erpnext/accounts/doctype/sales_invoice/pos.py +++ b/erpnext/accounts/doctype/sales_invoice/pos.py @@ -43,7 +43,11 @@ def get_pos_data(): } def get_meta(): - doctype_meta = {'customer': frappe.get_meta('Customer')} + doctype_meta = { + 'customer': frappe.get_meta('Customer'), + 'invoice': frappe.get_meta('Sales Invoice') + } + for row in frappe.get_all('DocField', fields = ['fieldname', 'options'], filters = {'parent': 'Sales Invoice', 'fieldtype': 'Table'}): doctype_meta[row.fieldname] = frappe.get_meta(row.options)