mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
fix: use ValueWrapper consistently
(cherry picked from commit a2fadd9347)
This commit is contained in:
@@ -7,6 +7,7 @@ import frappe
|
|||||||
from frappe import _
|
from frappe import _
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
from frappe.utils import cint, flt, sbool
|
from frappe.utils import cint, flt, sbool
|
||||||
|
from pypika.terms import ValueWrapper
|
||||||
|
|
||||||
from erpnext.manufacturing.doctype.bom.bom import get_bom_item_rate
|
from erpnext.manufacturing.doctype.bom.bom import get_bom_item_rate
|
||||||
|
|
||||||
@@ -360,8 +361,6 @@ class BOMCreator(Document):
|
|||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_children(doctype=None, parent=None, **kwargs):
|
def get_children(doctype=None, parent=None, **kwargs):
|
||||||
from pypika.terms import ValueWrapper
|
|
||||||
|
|
||||||
if isinstance(kwargs, str):
|
if isinstance(kwargs, str):
|
||||||
kwargs = frappe.parse_json(kwargs)
|
kwargs = frappe.parse_json(kwargs)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import frappe
|
import frappe
|
||||||
from pypika.terms import LiteralValue
|
from pypika.terms import ValueWrapper
|
||||||
|
|
||||||
from erpnext.accounts.general_ledger import make_reverse_gl_entries
|
from erpnext.accounts.general_ledger import make_reverse_gl_entries
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ def execute():
|
|||||||
"payment_amount",
|
"payment_amount",
|
||||||
# at the time of creating this dunning, the full amount was outstanding
|
# at the time of creating this dunning, the full amount was outstanding
|
||||||
"payment_amount as outstanding",
|
"payment_amount as outstanding",
|
||||||
LiteralValue(0).as_("paid_amount"),
|
ValueWrapper(0).as_("paid_amount"),
|
||||||
"discounted_amount",
|
"discounted_amount",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user