Skip to content

Commit

Permalink
fix: Percentage billing in Sales Order (#34606)
Browse files Browse the repository at this point in the history
* fix: Percentage billing in Sales Order (#34606)

(cherry picked from commit 12ad2aa)

# Conflicts:
#	erpnext/controllers/status_updater.py

* chore: resolve conflicts

---------

Co-authored-by: Deepesh Garg <deepeshgarg6@gmail.com>
  • Loading branch information
mergify[bot] and deepeshgarg007 committed Mar 28, 2023
1 parent 2e9e6ee commit 3aab6e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/controllers/status_updater.py
Expand Up @@ -450,7 +450,7 @@ def _update_percent_field(self, args, update_modified=True):
ifnull((select
ifnull(sum(if(abs(%(target_ref_field)s) > abs(%(target_field)s), abs(%(target_field)s), abs(%(target_ref_field)s))), 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 3aab6e6

Please sign in to comment.