Skip to content

Commit

Permalink
Merge pull request #36 from 8848digital/taxes_and_charges_added
Browse files Browse the repository at this point in the history
convert none type into float
  • Loading branch information
Satya8848 authored Jan 23, 2024
2 parents edad092 + ad1c47d commit f173821
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gst_india/public/py/sales_invoice_doctype.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from gst_india.cleartax_integration.API.irn import generate_irn, e_invoicing_enabled
from gst_india.cleartax_integration.API.gst import create_gst_invoice
import frappe
import frappe
from frappe.utils import flt

def sales_invoice_submit(doc, method=None):
if frappe.db.get_single_value('Cleartax Settings','automate'):
Expand All @@ -27,7 +28,7 @@ def sales_invoice_save(doc,method=None):
if not doc.dispatch_address_name:
doc.dispatch_address_name = doc.company_address
if doc.gst_category == "Unregistered":
if doc.taxes_and_charges_added <= 0:
if flt(doc.taxes_and_charges_added) <= 0:
doc.custom_non_gst = 1


0 comments on commit f173821

Please sign in to comment.