Correction erreurs montant max amortissement
This commit is contained in:
parent
d189f6d4c4
commit
105080c111
|
@ -192,6 +192,7 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{{#foreach count="%d+1"|math:$nbamort key="num"}}
|
{{#foreach count="%d+1"|math:$nbamort key="num"}}
|
||||||
|
{{:assign solde_prec=$solde}}
|
||||||
{{:assign solde="%f-%d"|math:$solde:$annuite_courante}}
|
{{:assign solde="%f-%d"|math:$solde:$annuite_courante}}
|
||||||
{{#select id from acc_years where :amort_date >= start_date and :amort_date <= end_date and closed = 0; :amort_date=$date_amort|parse_date}}
|
{{#select id from acc_years where :amort_date >= start_date and :amort_date <= end_date and closed = 0; :amort_date=$date_amort|parse_date}}
|
||||||
{{:assign enregistrer=1}}
|
{{:assign enregistrer=1}}
|
||||||
|
@ -214,7 +215,7 @@
|
||||||
{{if $enregistrer == 1}}
|
{{if $enregistrer == 1}}
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Enregistrer"
|
label="Enregistrer"
|
||||||
href="save_amort.html?amount=%d&account=%s&year=%s&trans_id=%d&immo_id=%s&project_id=%d&label=%s&solde=%d"|args:$annuite_courante:$ligne_immo.account_id:$current_year:$ligne_immo.trans_id:$_GET.immo_id:$project_id:$libelle:$solde
|
href="save_amort.html?amount=%d&account=%s&year=%s&trans_id=%d&immo_id=%s&project_id=%d&label=%s&solde=%d"|args:$annuite_courante:$ligne_immo.account_id:$current_year:$ligne_immo.trans_id:$_GET.immo_id:$project_id:$libelle:$solde_prec
|
||||||
shape="right"
|
shape="right"
|
||||||
target="_dialog"
|
target="_dialog"
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -38,8 +38,8 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{* vérifier que le montant ne dépasse pas le solde restant *}}
|
{{* vérifier que le montant ne dépasse pas le solde restant *}}
|
||||||
{{:assign solde="%f/100"|math:$_GET.solde}}
|
{{if $_POST.montant|trim|money_int > $_GET.solde|intval}}
|
||||||
{{if $_POST.montant > $solde}}
|
{{:assign solde=$_GET.solde|money_raw}}
|
||||||
{{:error message="Le montant indiqué « %s » dépasse le solde à amortir « %s »"|args:$_POST.montant:$solde}}
|
{{:error message="Le montant indiqué « %s » dépasse le solde à amortir « %s »"|args:$_POST.montant:$solde}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue