fix(LoanApplication): Repayment amount check (#18376)
* fix: Clickable Asset link * fix(LoanApplication): Repayment amount check
This commit is contained in:
parent
88620d6cbb
commit
7ed5919d5b
@ -636,7 +636,8 @@ class BuyingController(StockController):
|
||||
asset.set_missing_values()
|
||||
asset.insert()
|
||||
|
||||
frappe.msgprint(_("Asset {0} created").format(asset.name))
|
||||
asset_link = frappe.utils.get_link_to_form('Asset', asset.name)
|
||||
frappe.msgprint(_("Asset {0} created").format(asset_link))
|
||||
return asset.name
|
||||
|
||||
def make_asset_movement(self, row):
|
||||
|
@ -30,7 +30,7 @@ class LoanApplication(Document):
|
||||
monthly_interest_rate = flt(self.rate_of_interest) / (12 *100)
|
||||
if monthly_interest_rate:
|
||||
min_repayment_amount = self.loan_amount*monthly_interest_rate
|
||||
if self.repayment_amount - min_repayment_amount < 0:
|
||||
if self.repayment_amount - min_repayment_amount <= 0:
|
||||
frappe.throw(_("Repayment Amount must be greater than " \
|
||||
+ str(flt(min_repayment_amount, 2))))
|
||||
self.repayment_periods = math.ceil((math.log(self.repayment_amount) -
|
||||
|
Loading…
x
Reference in New Issue
Block a user