From 01aca675ef0810016779b4fc4f7a7b532fe698c5 Mon Sep 17 00:00:00 2001 From: "Chinmay D. Pai" Date: Sat, 5 Oct 2019 10:18:21 +0530 Subject: [PATCH] chore: check if discount_percentage exists fixes TypeError: '>' not supported between instances of 'NoneType' and 'float' Signed-off-by: Chinmay D. Pai --- erpnext/regional/italy/e-invoice.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/regional/italy/e-invoice.xml b/erpnext/regional/italy/e-invoice.xml index 0a5bb296a5..049a7eba61 100644 --- a/erpnext/regional/italy/e-invoice.xml +++ b/erpnext/regional/italy/e-invoice.xml @@ -19,7 +19,7 @@ {%- endmacro %} {%- macro render_discount_or_margin(item) -%} -{%- if item.discount_percentage > 0.0 or item.margin_type %} +{%- if (item.discount_percentage and item.discount_percentage > 0.0) or item.margin_type %} {%- if item.discount_percentage > 0.0 %} SC