diff --git a/_check_date.html b/_check_date.html deleted file mode 100644 index f68ec49..0000000 --- a/_check_date.html +++ /dev/null @@ -1,19 +0,0 @@ -{{* -*- brindille -*- *}} - -{{* - vérifier que la date est située dans un exercice ouvert - paramètres : - - date - résultat : open_years, selected_year, selected_chart -*}} - -{{:assign open_years=""}} -{{#years closed=false order="start_date" assign="open_years."}} - {{if - $start_date|strtotime <= $date|parse_date|strtotime && - $end_date|strtotime >= $date|parse_date|strtotime - }} - {{:assign selected_year=$id}} - {{:assign selected_chart=$id_chart}} - {{/if}} -{{/years}} diff --git a/_next_year.html b/_next_year.html deleted file mode 100644 index 0de8dea..0000000 --- a/_next_year.html +++ /dev/null @@ -1,13 +0,0 @@ -{{* -*- brindille -*- *}} -{{* - Rend une date située un an après la date paramètre - paramètres : - - date - résultat : date_amort -*}} - -{{:assign jour=$date|date:"d"}} -{{:assign mois=$date|date:"m"}} -{{:assign annee=$date|date:"Y"}} -{{:assign annee="%d+1"|math:$annee}} -{{:assign date_amort="%s/%s/%s"|args:$jour:$mois:$annee}} diff --git a/immobilisations_non.html b/immobilisations_non.html deleted file mode 100644 index 39fbd96..0000000 --- a/immobilisations_non.html +++ /dev/null @@ -1,72 +0,0 @@ -{{* -*- brindille -*- *}} - -{{* Liste des immobilisations non amortissables *}} - -
-

Immobilisations non amortissables

- - - - - - - - - - - - - - - - - {{#load type="immo" where="$$.status = 'ignored'"}} - {{:assign var="lines." value="'%s'"|args:$line}} - {{/load}} - {{:assign lines=$lines|implode:","}} - {{:assign lines="("|cat:$lines|cat:")"}} - {{:assign condition="line.id IN %s"|args:$lines}} -{{:debug condition=$condition}} - {{#select - trans.id as trans_id, - trans.label as trans_label, - trans.date as trans_date, - line.id as immo_id, - account.id as account_id, - account.code as account_code, - account.label as account_label, - line.debit AS debit, - project.label as project_label, - trans.id_year as trans_id_year - FROM acc_transactions AS trans - INNER JOIN acc_transactions_lines AS line ON line.id_transaction = trans.id - INNER JOIN acc_accounts AS account ON line.id_account = account.id - INNER JOIN acc_years AS years ON trans.id_year = years.id - LEFT JOIN acc_projects AS project ON line.id_project = project.id - WHERE !condition - ORDER BY trans.date DESC; - !condition=$condition - }} - {{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$trans_id}} - {{:assign compte_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$account_id:$trans_id_year}} - - - - - - - - - - - {{/select}} - -
DateLibelléMontantN° compteCompteProjet
#{{$trans_id}}{{$trans_date|date_short}}{{$trans_label}}{{"%f"|math:$debit|money:false}}{{$account_code}}{{$account_label}}{{$project_label}} - {{:linkbutton - label="Modifier infos" - href="modif_infos.html?immo_id=%s&amort=0"|args:$immo_id - shape="help" - target="_dialog" - }} -
-
diff --git a/modif_infos.html b/modif_infos.html deleted file mode 100644 index 7181226..0000000 --- a/modif_infos.html +++ /dev/null @@ -1,118 +0,0 @@ -{{* -*- brindille -*- *}} - -{{:admin_header title="Modifier informations amortissement" custom_css=$custom_css current="module_amortissement"}} - -{{* barre de navigation *}} -{{if ! $dialog}} - {{:include file="_nav.html" current="index"}} -{{/if}} - -{{* infos de l'immobilisation *}} -{{:assign var="immo_id" value=$_GET.immo_id|intval}} -{{#load type="immo" assign="info_immo" where="$$.line = :line_id" :line_id=$immo_id|intval}} -{{/load}} - -{{* Traiter l'envoi du formulaire *}} -{{#form on="change"}} - - {{* chercher la date d'acquisition de l'immobilisation *}} - {{#select - trans.date as date_achat - from acc_transactions_lines as line - inner join acc_transactions as trans on line.id_transaction = trans.id - where line.id = :line_id; - :line_id = $immo_id - assign=ligne_immo - }} - {{/select}} - - {{if $_POST.no_amort}} - {{* ne pas amortir *}} - {{:assign duration=0}} - {{:assign date_debut=$ligne_immo.date_achat|parse_date}} - {{:assign status="ignored"}} - {{else}} - {{* vérifier que la date d'acquisition est antérieure à la date de mise en service *}} - {{:assign date_debut=$_POST.date_mes|or:$ligne_immo.date_achat|parse_date}} - {{if $date_debut|strtotime < $ligne_immo.date_achat|strtotime}} - {{:assign dd=$date_debut|date_short}} - {{:assign da=$ligne_immo.date_achat|date_short}} - {{:error message="Erreur : la date de mise en service (%s) ne peut être antérieure à la date d'acquisition (%s)"|args:$dd:$da}} - {{/if}} - {{:assign duration=$_POST.duree|intval}} - {{if $duration <= 0}} - {{:error message="Erreur : la durée d'amortissement doit être strictement positive"}} - {{/if}} - {{:assign status="managed"}} - {{/if}} - - {{* enregistrer les infos modifiées de l'immobilisation *}} - {{:save - key=$info_immo.key - validate_schema="schema.json" - type="immo" - line=$immo_id - duration=$duration - date=$date_debut - status=$status - }} - - {{if $_POST.no_amort}} - {{:assign amort="autres"}} - {{else}} - {{:assign amort="encours"}} - {{/if}} - {{:redirect force="index.html?ok=1&msg=infos&amort=%s"|args:$amort}} -{{else}} - {{:form_errors}} -{{/form}} - -{{* modifier la date de mise en service et durée d'amortissement *}} - -{{if $_GET.amort == 0}} - {{:assign checked=1}} - {{:assign disabled=1}} -{{else}} - {{:assign checked=0}} - {{:assign disabled=0}} -{{/if}} - -
-
- -
- {{if $checked}} - {{:assign helptext = "Dé-cocher pour amortir"}} - {{else}} - {{:assign helptext = "Cocher pour ne pas amortir"}} - {{/if}} - {{:input id="no_amort" type="checkbox" value=1 name="no_amort" label="Ne pas amortir" default=$checked help=$helptext onclick="toggleInputs('infos_immo','f_no_amort_1')"}} - {{:input type="date" name="date_mes" label="Date de mise en service" default=$info_immo.date disabled=$disabled help="à renseigner uniquement si différente de la date d'acquisition"}} - {{:input type="number" name="duree" label="Durée d'amortissement" default=$info_immo.duration required=true min=1 disabled=$disabled}} -
-
- -

- {{:button type="submit" name="change" label="Modifier" shape="right" class="main"}} -

- -
- -{{* activer/désactiver les champs de saisie *}} - - -{{:admin_footer}}