Merge branch 'version-14' into version-14-hotfix

This commit is contained in:
rohitwaghchaure
2023-06-20 19:41:56 +05:30
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -3,7 +3,7 @@ import inspect
import frappe import frappe
__version__ = "14.26.0" __version__ = "14.27.8"
def get_default_company(user=None): def get_default_company(user=None):

View File

@@ -186,7 +186,7 @@ class ExchangeRateRevaluation(Document):
# round off balance based on currency precision # round off balance based on currency precision
# and consider debit-credit difference allowance # and consider debit-credit difference allowance
currency_precision = get_currency_precision() 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: for acc in account_details:
acc.balance_in_account_currency = flt(acc.balance_in_account_currency, currency_precision) acc.balance_in_account_currency = flt(acc.balance_in_account_currency, currency_precision)
if abs(acc.balance_in_account_currency) <= rounding_loss_allowance: if abs(acc.balance_in_account_currency) <= rounding_loss_allowance:
@@ -570,7 +570,7 @@ def calculate_exchange_rate_using_last_gle(company, account, party_type, party):
@frappe.whitelist() @frappe.whitelist()
def get_account_details( 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): if not (company and posting_date):
frappe.throw(_("Company and Posting Date is mandatory")) frappe.throw(_("Company and Posting Date is mandatory"))