Diverses améliorations
This commit is contained in:
parent
31a0371ae2
commit
91b75e77d4
3 changed files with 12 additions and 8 deletions
|
@ -9,11 +9,13 @@
|
|||
|
||||
{{:assign ts_debut=$date_debut|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 $nbjours < 0}}
|
||||
{{:assign nbjours="-1*%d"|math:$nbjours}}
|
||||
{{if $ts_debut <= $ts_fin}}
|
||||
{{:assign nbjours="(%d-%d)/(60*60*24)"|math:$ts_fin:$ts_debut}}
|
||||
{{else}}
|
||||
{{:assign nbjours="(%d-%d)/(60*60*24)"|math:$ts_debut:$ts_fin}}
|
||||
{{/if}}
|
||||
|
||||
{{* pour simplifier : 360 jours par an *}}
|
||||
{{:assign nbjours="round(%f/365*360)"|math:$nbjours}}
|
||||
{{:debug nbjours=$nbjours}}
|
||||
|
|
|
@ -12,10 +12,10 @@
|
|||
- account_ok
|
||||
*}}
|
||||
|
||||
{{:assign quote="'"}}
|
||||
{{:assign condition=" AND ("}}
|
||||
{{#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}}
|
||||
{{:assign condition=$condition|cat:"0)"}}
|
||||
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
|
||||
{{if $_GET.ok}}
|
||||
{{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"}}
|
||||
{{: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"}}
|
||||
{{:assign msg="Amortissement enregistré"}}
|
||||
{{/if}}
|
||||
|
@ -40,6 +40,7 @@
|
|||
line.debit as montant,
|
||||
trans.id as trans_id,
|
||||
trans.label as label,
|
||||
trans.date,
|
||||
y.id as year_id,
|
||||
y.end_date as date_amort,
|
||||
project.label as project_label
|
||||
|
@ -54,6 +55,7 @@
|
|||
{{else}}
|
||||
{{:error message="Immobilisation %s non trouvée"|args:$_GET.immo_id}}
|
||||
{{/select}}
|
||||
{{:assign date_debut=$ligne_immo.date}}
|
||||
|
||||
{{#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}}
|
||||
|
|
Loading…
Add table
Reference in a new issue