fix(sales-order): update items (#18535)
* fix(sales-order): update items * fix: minor changes * Update: accounts controller
This commit is contained in:
parent
cfb899451f
commit
a3d5200194
@ -1192,6 +1192,11 @@ def update_child_qty_rate(parent_doctype, trans_items, parent_doctype_name, chil
|
||||
.format(child_item.idx, child_item.item_code))
|
||||
else:
|
||||
child_item.rate = flt(d.get("rate"))
|
||||
|
||||
if flt(child_item.price_list_rate):
|
||||
child_item.discount_percentage = flt((1 - flt(child_item.rate) / flt(child_item.price_list_rate)) * 100.0, \
|
||||
child_item.precision("discount_percentage"))
|
||||
|
||||
child_item.flags.ignore_validate_update_after_submit = True
|
||||
if new_child_flag:
|
||||
child_item.idx = len(parent.items) + 1
|
||||
|
Loading…
Reference in New Issue
Block a user