Correction erreur ajout immobilisation

This commit is contained in:
Jean-Christophe Engel 2024-03-19 15:25:50 +01:00
parent 48504bcb1d
commit b91c1087ae
1 changed files with 10 additions and 8 deletions

View File

@ -16,7 +16,10 @@
{{:assign debut=$start_date|date_short}} {{:assign debut=$start_date|date_short}}
{{:assign fin=$end_date|date_short}} {{:assign fin=$end_date|date_short}}
{{:assign open_years=$open_years|cat:$debut|cat:" à "|cat:$fin}} {{:assign open_years=$open_years|cat:$debut|cat:" à "|cat:$fin}}
{{if $start_date|strtotime <= $_POST.date|parse_date|strtotime && $end_date|strtotime >= $_POST.date|parse_date|strtotime}} {{if
$start_date|strtotime <= $_POST.date|parse_date|strtotime &&
$end_date|strtotime >= $_POST.date|parse_date|strtotime
}}
{{:assign selected_year=$id}} {{:assign selected_year=$id}}
{{:assign selected_chart=$id_chart}} {{:assign selected_chart=$id_chart}}
{{/if}} {{/if}}
@ -30,6 +33,10 @@
- que le compte d'immo débute par 20 ou 21 - que le compte d'immo débute par 20 ou 21
- est présent dans le PC de l'exercice correspondant à la date - est présent dans le PC de l'exercice correspondant à la date
*}} *}}
{{#foreach from=$_POST.debit_account key="account_code"}}
{{:assign account_code=$account_code}}
{{/foreach}}
{{#select {{#select
code code
FROM acc_accounts FROM acc_accounts
@ -38,7 +45,7 @@
(code LIKE "20%" OR code LIKE "21%"); (code LIKE "20%" OR code LIKE "21%");
:id_chart = $selected_chart|intval :id_chart = $selected_chart|intval
}} }}
{{if $_POST.debit_account|has_key:$code}} {{if $account_code == $code}}
{{:assign account_ok=1}} {{:assign account_ok=1}}
{{:break}} {{:break}}
{{/if}} {{/if}}
@ -88,11 +95,6 @@
{{* formulaire d'ajout d'immobilisation *}} {{* formulaire d'ajout d'immobilisation *}}
{{:assign var="bank_account.512A" value="512A — Compte courant"}} {{:assign var="bank_account.512A" value="512A — Compte courant"}}
{{*
TODO
- ajouter autres rubriques selon besoin
*}}
{{#select id,label FROM acc_projects WHERE archived = 0;}} {{#select id,label FROM acc_projects WHERE archived = 0;}}
{{:assign var="projects.%d"|args:$id value=$label}} {{:assign var="projects.%d"|args:$id value=$label}}
{{/select}} {{/select}}