Diverses améliorations
This commit is contained in:
parent
31a0371ae2
commit
91b75e77d4
@ -9,11 +9,13 @@
|
|||||||
|
|
||||||
{{:assign ts_debut=$date_debut|strtotime}}
|
{{:assign ts_debut=$date_debut|strtotime}}
|
||||||
{{:assign ts_fin=$date_fin|strtotime}}
|
{{:assign ts_fin=$date_fin|strtotime}}
|
||||||
{{:assign nbjours="1+(%d-%d)/(60*60*24)"|math:$ts_fin:$ts_debut}}
|
|
||||||
|
|
||||||
{{* au cas où les deux dates seraient inversées ... *}}
|
{{if $ts_debut <= $ts_fin}}
|
||||||
{{if $nbjours < 0}}
|
{{:assign nbjours="(%d-%d)/(60*60*24)"|math:$ts_fin:$ts_debut}}
|
||||||
{{:assign nbjours="-1*%d"|math:$nbjours}}
|
{{else}}
|
||||||
|
{{:assign nbjours="(%d-%d)/(60*60*24)"|math:$ts_debut:$ts_fin}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{* pour simplifier : 360 jours par an *}}
|
{{* pour simplifier : 360 jours par an *}}
|
||||||
{{:assign nbjours="round(%f/365*360)"|math:$nbjours}}
|
{{:assign nbjours="round(%f/365*360)"|math:$nbjours}}
|
||||||
|
{{:debug nbjours=$nbjours}}
|
||||||
|
@ -12,10 +12,10 @@
|
|||||||
- account_ok
|
- account_ok
|
||||||
*}}
|
*}}
|
||||||
|
|
||||||
{{:assign quote="'"}}
|
|
||||||
{{:assign condition=" AND ("}}
|
{{:assign condition=" AND ("}}
|
||||||
{{#foreach from=$prefix_array item="code"}}
|
{{#foreach from=$prefix_array item="code"}}
|
||||||
{{:assign condition=$condition|cat:" code LIKE "|cat:$quote|cat:$code|cat:"%"|cat:$quote|cat:" OR "}}
|
{{:assign code=$code|cat:"%"|quote_sql}}
|
||||||
|
{{:assign condition=$condition|cat:" code LIKE "|cat:$code|cat:" OR "}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
{{:assign condition=$condition|cat:"0)"}}
|
{{:assign condition=$condition|cat:"0)"}}
|
||||||
|
|
||||||
|
@ -16,9 +16,9 @@
|
|||||||
|
|
||||||
{{if $_GET.ok}}
|
{{if $_GET.ok}}
|
||||||
{{if $_GET.msg|match:"attach"}}
|
{{if $_GET.msg|match:"attach"}}
|
||||||
{{:assign msg="Attachement effectué (écriture %s)"|args:$_GET.trans_id}}
|
{{:assign msg="Attachement écriture %s effectué"|args:$_GET.trans_id}}
|
||||||
{{elseif $_GET.msg|match:"detach"}}
|
{{elseif $_GET.msg|match:"detach"}}
|
||||||
{{:assign msg="Attachement détaché (écriture %s)"|args:$_GET.trans_id}}
|
{{:assign msg="Détachement écriture %s affectué"|args:$_GET.trans_id}}
|
||||||
{{elseif $_GET.msg|match:"amortissement"}}
|
{{elseif $_GET.msg|match:"amortissement"}}
|
||||||
{{:assign msg="Amortissement enregistré"}}
|
{{:assign msg="Amortissement enregistré"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
@ -40,6 +40,7 @@
|
|||||||
line.debit as montant,
|
line.debit as montant,
|
||||||
trans.id as trans_id,
|
trans.id as trans_id,
|
||||||
trans.label as label,
|
trans.label as label,
|
||||||
|
trans.date,
|
||||||
y.id as year_id,
|
y.id as year_id,
|
||||||
y.end_date as date_amort,
|
y.end_date as date_amort,
|
||||||
project.label as project_label
|
project.label as project_label
|
||||||
@ -54,6 +55,7 @@
|
|||||||
{{else}}
|
{{else}}
|
||||||
{{:error message="Immobilisation %s non trouvée"|args:$_GET.immo_id}}
|
{{:error message="Immobilisation %s non trouvée"|args:$_GET.immo_id}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
|
{{:assign date_debut=$ligne_immo.date}}
|
||||||
|
|
||||||
{{#load type="immo" assign="info_immo" where="$$.line = :line_id" :line_id=$_GET.immo_id|intval}}
|
{{#load type="immo" assign="info_immo" where="$$.line = :line_id" :line_id=$_GET.immo_id|intval}}
|
||||||
{{:assign var="duree" from="info_immo.duration"|args:$_GET.immo_id}}
|
{{:assign var="duree" from="info_immo.duration"|args:$_GET.immo_id}}
|
||||||
|
Loading…
Reference in New Issue
Block a user