diff --git a/erpnext/e_commerce/shopping_cart/cart.py b/erpnext/e_commerce/shopping_cart/cart.py index cd6bd03edf7..03aa36fa883 100644 --- a/erpnext/e_commerce/shopping_cart/cart.py +++ b/erpnext/e_commerce/shopping_cart/cart.py @@ -24,7 +24,7 @@ def set_cart_count(quotation=None): if cint(frappe.db.get_singles_value("E Commerce Settings", "enabled")): if not quotation: quotation = _get_cart_quotation() - cart_count = cstr(len(quotation.get("items"))) + cart_count = cstr(cint(quotation.get("total_qty"))) if hasattr(frappe.local, "cookie_manager"): frappe.local.cookie_manager.set_cookie("cart_count", cart_count) diff --git a/erpnext/loan_management/doctype/loan_repayment/loan_repayment.py b/erpnext/loan_management/doctype/loan_repayment/loan_repayment.py index 151cf58965c..ceaaecb93a0 100644 --- a/erpnext/loan_management/doctype/loan_repayment/loan_repayment.py +++ b/erpnext/loan_management/doctype/loan_repayment/loan_repayment.py @@ -4,7 +4,7 @@ import frappe from frappe import _ -from frappe.utils import add_days, add_months, cint, date_diff, flt, get_datetime, getdate +from frappe.utils import add_days, cint, date_diff, flt, get_datetime, getdate from six import iteritems import erpnext