Merge pull request #35699 from rohitwaghchaure/fixed-added-validation-for-incorrect-type
fix: added validation for incorrect type
diff --git a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py
index 043fbdd..5d239c9 100644
--- a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py
+++ b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py
@@ -186,7 +186,7 @@
# round off balance based on currency precision
# and consider debit-credit difference allowance
currency_precision = get_currency_precision()
- rounding_loss_allowance = rounding_loss_allowance or 0.05
+ rounding_loss_allowance = float(rounding_loss_allowance) or 0.05
for acc in account_details:
acc.balance_in_account_currency = flt(acc.balance_in_account_currency, currency_precision)
if abs(acc.balance_in_account_currency) <= rounding_loss_allowance:
@@ -552,7 +552,7 @@
@frappe.whitelist()
def get_account_details(
- company, posting_date, account, party_type=None, party=None, rounding_loss_allowance=None
+ company, posting_date, account, party_type=None, party=None, rounding_loss_allowance: float = None
):
if not (company and posting_date):
frappe.throw(_("Company and Posting Date is mandatory"))
diff --git a/erpnext/stock/stock_ledger.py b/erpnext/stock/stock_ledger.py
index a668ab8..b3ed220 100644
--- a/erpnext/stock/stock_ledger.py
+++ b/erpnext/stock/stock_ledger.py
@@ -962,6 +962,7 @@
item.current_amount = flt(item.current_qty) * flt(item.current_valuation_rate)
item.amount = flt(item.qty) * flt(item.valuation_rate)
+ item.quantity_difference = item.qty - item.current_qty
item.amount_difference = item.amount - item.current_amount
else:
sr.difference_amount = sum([item.amount_difference for item in sr.items])