From 6ff2f395f51696ebd6e2e40d2570d3af5092ddfd Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 8 Nov 2018 12:30:44 +0530 Subject: [PATCH 1/3] fix(gle): Post gl entry for booking COGS from Sales Invoice even if grand_total is zero (#15825) --- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 76de9c8efd..065e32a76f 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -589,9 +589,6 @@ class SalesInvoice(SellingController): def make_gl_entries(self, gl_entries=None, repost_future_gle=True, from_repost=False): auto_accounting_for_stock = erpnext.is_perpetual_inventory_enabled(self.company) - if not self.grand_total: - return - if not gl_entries: gl_entries = self.get_gl_entries() From a88eaa6e206c21b9f5fd1cc6abbc1085e97e2269 Mon Sep 17 00:00:00 2001 From: rohitwaghchaure Date: Thu, 8 Nov 2018 13:05:08 +0530 Subject: [PATCH 2/3] [Fix] User able to change discount if pricing rule has discount value as zero (#15921) --- erpnext/accounts/doctype/pricing_rule/pricing_rule.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py index eca4320e18..75db8b9314 100644 --- a/erpnext/accounts/doctype/pricing_rule/pricing_rule.py +++ b/erpnext/accounts/doctype/pricing_rule/pricing_rule.py @@ -185,7 +185,8 @@ def get_pricing_rule_for_item(args): "discount_percentage": 0.0 }) else: - item_details.discount_percentage = pricing_rule.discount_percentage or args.discount_percentage + item_details.discount_percentage = (pricing_rule.get('discount_percentage', 0) + if pricing_rule else args.discount_percentage) elif args.get('pricing_rule'): item_details = remove_pricing_rule_for_item(args.get("pricing_rule"), item_details) From f8a5cfe8d8c286f8744765f95d2e6bd44339ffc7 Mon Sep 17 00:00:00 2001 From: Frappe Bot Date: Fri, 9 Nov 2018 10:09:04 +0000 Subject: [PATCH 3/3] bumped to version 10.1.70 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 7c26e1da6a..1b66ea75cf 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -5,7 +5,7 @@ import frappe from erpnext.hooks import regional_overrides from frappe.utils import getdate -__version__ = '10.1.69' +__version__ = '10.1.70' def get_default_company(user=None): '''Get default company for user'''