mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-22 19:55:29 +00:00
fix: ensure proper float conversion for discount values
(cherry picked from commit 3dcb801a37)
This commit is contained in:
committed by
Mergify
parent
5237ff8d94
commit
d24c2c4cca
@@ -24,7 +24,7 @@ AFFECTED_DOCTYPES = frozenset(
|
|||||||
LAST_MODIFIED_DATE_THRESHOLD = "2025-05-30"
|
LAST_MODIFIED_DATE_THRESHOLD = "2025-05-30"
|
||||||
|
|
||||||
|
|
||||||
def execute():
|
def execute(filters=None):
|
||||||
columns = get_columns()
|
columns = get_columns()
|
||||||
data = get_data()
|
data = get_data()
|
||||||
|
|
||||||
@@ -137,8 +137,8 @@ def get_data():
|
|||||||
if not discount_values:
|
if not discount_values:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
old = discount_values[1]
|
old = flt(discount_values[1][2:])
|
||||||
new = discount_values[2]
|
new = flt(discount_values[2][2:])
|
||||||
doc_values = transactions_with_discount_percentage.get(doc)
|
doc_values = transactions_with_discount_percentage.get(doc)
|
||||||
if new != doc_values.discount_amount:
|
if new != doc_values.discount_amount:
|
||||||
# if the discount amount in the version is not equal to the current value, skip
|
# if the discount amount in the version is not equal to the current value, skip
|
||||||
|
|||||||
Reference in New Issue
Block a user