fix: Check for gst_hsn_code

This commit is contained in:
Deepesh Garg 2021-06-10 17:31:28 +05:30
parent 701cba7f03
commit 88176e65e4

View File

@ -194,7 +194,7 @@ def get_item_list(invoice):
item.batch_expiry_date = frappe.db.get_value('Batch', d.batch_no, 'expiry_date') if d.batch_no else None
item.batch_expiry_date = format_date(item.batch_expiry_date, 'dd/mm/yyyy') if item.batch_expiry_date else None
item.is_service_item = 'Y' if item.gst_hsn_code[:2] == "99" else 'N'
item.is_service_item = 'Y' if item.gst_hsn_code and item.gst_hsn_code[:2] == "99" else 'N'
item.serial_no = ""
item = update_item_taxes(invoice, item)