mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-17 02:26:33 +00:00
fix: type cast error on postgres
This commit is contained in:
@@ -20,7 +20,7 @@ from frappe.query_builder.functions import (
|
|||||||
Substring,
|
Substring,
|
||||||
Sum,
|
Sum,
|
||||||
)
|
)
|
||||||
from frappe.utils import nowdate, today, unique
|
from frappe.utils import cint, nowdate, today, unique
|
||||||
from pypika import Order
|
from pypika import Order
|
||||||
|
|
||||||
import erpnext
|
import erpnext
|
||||||
@@ -808,7 +808,11 @@ def get_filtered_dimensions(
|
|||||||
query_filters.append(["company", "=", filters.get("company")])
|
query_filters.append(["company", "=", filters.get("company")])
|
||||||
|
|
||||||
for field in searchfields:
|
for field in searchfields:
|
||||||
or_filters.append([field, "LIKE", "%%%s%%" % txt])
|
df = meta.get_field(field)
|
||||||
|
if df and df.fieldtype != "Check":
|
||||||
|
or_filters.append([field, "LIKE", "%%%s%%" % txt])
|
||||||
|
else:
|
||||||
|
or_filters.append([field, "=", cint(txt)])
|
||||||
fields.append(field)
|
fields.append(field)
|
||||||
|
|
||||||
if dimension_filters:
|
if dimension_filters:
|
||||||
|
|||||||
@@ -698,7 +698,7 @@ def get_barcode_data(items_list=None, item_code=None):
|
|||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_item_tax_info(
|
def get_item_tax_info(
|
||||||
doc: Document | str | None,
|
doc: Document | dict | str | None,
|
||||||
tax_category: str,
|
tax_category: str,
|
||||||
item_codes: list | str,
|
item_codes: list | str,
|
||||||
item_rates: dict | str | None = None,
|
item_rates: dict | str | None = None,
|
||||||
|
|||||||
Reference in New Issue
Block a user