Skip to content

Commit 3bafada

Browse files
committed
fix(py3): Convert per_billed explicitly to int before comparing
1 parent bc7d39a commit 3bafada

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

erpnext/stock/doctype/purchase_receipt/purchase_receipt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from frappe import throw, _
1010
import frappe.defaults
11-
from frappe.utils import getdate
11+
from frappe.utils import getdate, cint
1212
from erpnext.controllers.buying_controller import BuyingController
1313
from erpnext.accounts.utils import get_account_currency
1414
from frappe.desk.notifications import clear_doctype_notifications
@@ -128,7 +128,7 @@ def on_submit(self):
128128
self.company, self.base_grand_total)
129129

130130
self.update_prevdoc_status()
131-
if self.per_billed < 100:
131+
if cint(self.per_billed) < 100:
132132
self.update_billing_status()
133133
else:
134134
self.status = "Completed"

0 commit comments

Comments
 (0)