Skip to content

Commit

Permalink
fix: Percentage billing in Sales Order (#34606)
Browse files Browse the repository at this point in the history
  • Loading branch information
deepeshgarg007 committed Mar 28, 2023
1 parent f7780cd commit 12ad2aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/controllers/status_updater.py
Expand Up @@ -464,7 +464,7 @@ def _update_percent_field(self, args, update_modified=True):
ifnull((select
ifnull(sum(case when abs(%(target_ref_field)s) > abs(%(target_field)s) then abs(%(target_field)s) else abs(%(target_ref_field)s) end), 0)
/ sum(abs(%(target_ref_field)s)) * 100
from `tab%(target_dt)s` where parent='%(name)s' having sum(abs(%(target_ref_field)s)) > 0), 0), 6)
from `tab%(target_dt)s` where parent='%(name)s' and parenttype='%(target_parent_dt)s' having sum(abs(%(target_ref_field)s)) > 0), 0), 6)
%(update_modified)s
where name='%(name)s'"""
% args
Expand Down

0 comments on commit 12ad2aa

Please sign in to comment.