Compare commits

...

3 Commits

Author SHA1 Message Date
Smit Vora
a0c768d55d Merge pull request #50866 from frappe/mergify/bp/version-16-beta/pr-50733 2025-12-02 15:15:36 +05:30
Smit Vora
79181e307c fix: use ValueWrapper consistently
(cherry picked from commit a2fadd9347)
2025-12-02 09:13:52 +00:00
Smit Vora
9f07579a05 refactor: further changes to adapt to query builder changes
(cherry picked from commit 8235a551f0)
2025-12-02 09:13:52 +00:00
3 changed files with 5 additions and 3 deletions

View File

@@ -7,6 +7,7 @@ import frappe
from frappe import _
from frappe.model.document import Document
from frappe.utils import cint, flt, sbool
from pypika.terms import ValueWrapper
from erpnext.manufacturing.doctype.bom.bom import get_bom_item_rate
@@ -373,7 +374,7 @@ def get_children(doctype=None, parent=None, **kwargs):
"parent as parent_id",
"qty",
"idx",
"'BOM Creator Item' as doctype",
ValueWrapper("BOM Creator Item").as_("doctype"),
"name",
"uom",
"rate",

View File

@@ -1,4 +1,5 @@
import frappe
from pypika.terms import ValueWrapper
from erpnext.accounts.general_ledger import make_reverse_gl_entries
@@ -39,7 +40,7 @@ def execute():
"payment_amount",
# at the time of creating this dunning, the full amount was outstanding
"payment_amount as outstanding",
"'0' as paid_amount",
ValueWrapper(0).as_("paid_amount"),
"discounted_amount",
],
)

View File

@@ -383,7 +383,7 @@ def get_timesheet_data(name, project):
data = frappe.get_all(
"Timesheet",
fields=[
"(total_billable_amount - total_billed_amount) as billing_amt",
{"SUB": ["total_billable_amount", "total_billed_amount"], "as": "billing_amt"},
"total_billable_hours as billing_hours",
],
filters={"name": name},