fix(py3): Convert per_billed explicitly to int before comparing
This commit is contained in:
@@ -8,7 +8,7 @@ from frappe.utils import flt, cint, nowdate
|
||||
|
||||
from frappe import throw, _
|
||||
import frappe.defaults
|
||||
from frappe.utils import getdate
|
||||
from frappe.utils import getdate, cint
|
||||
from erpnext.controllers.buying_controller import BuyingController
|
||||
from erpnext.accounts.utils import get_account_currency
|
||||
from frappe.desk.notifications import clear_doctype_notifications
|
||||
@@ -128,7 +128,7 @@ class PurchaseReceipt(BuyingController):
|
||||
self.company, self.base_grand_total)
|
||||
|
||||
self.update_prevdoc_status()
|
||||
if self.per_billed < 100:
|
||||
if cint(self.per_billed) < 100:
|
||||
self.update_billing_status()
|
||||
else:
|
||||
self.status = "Completed"
|
||||
|
||||
Reference in New Issue
Block a user