diff --git a/add_asset.html b/add_asset.html index dad1351..5586043 100644 --- a/add_asset.html +++ b/add_asset.html @@ -7,7 +7,6 @@ {{* Traiter l'envoi du formulaire *}} {{#form on="add"}} - {{* :debug POST=$_POST *}} {{* enregistrer l'écriture *}} {{:assign var="credit_accounts" value=$_POST.credit_account|keys}} @@ -15,9 +14,6 @@ {{:assign var="debit_accounts" value=$_POST.debit_account|keys}} {{:assign var="debit_account" value=$debit_accounts.0}} - {{* :debug credit_account=$credit_account *}} - {{* :debug debit_account=$debit_account *}} - {{:api method="POST" path="accounting/transaction" @@ -29,17 +25,11 @@ amount=$_POST.montant debit=$debit_account credit=$credit_account + id_project=$_POST.id_project }} - {{* :debug result=$result *}} - {{* enregistrer les infos de l'immobilisation *}} - {{* :debug lines=$result.lines *}} - {{* :debug line1=$result.lines.1 *}} - {{:assign var="line_id" value=$result.lines.1.id}} - {{* :debug line_id=$line_id *}} - {{:assign key=""|uuid}} {{:save key=$key @@ -57,7 +47,7 @@ {{:assign var="bank_account.512A" value="512A — Compte courant"}} {{#years closed=false}} {{:assign var="open_years.%d"|args:$id value=$label}} - {{if $start_date <= $now && $end_date >= $now}} + {{if $start_date|strtotime <= $now && $end_date|strtotime >= $now}} {{:assign best_year=$id}} {{/if}} {{/years}} @@ -66,9 +56,13 @@ {{* TODO - - ajouter projet et autres rubriques selon besoin + - ajouter autres rubriques selon besoin *}} +{{#select id,label FROM acc_projects WHERE archived = 0;}} + {{:assign var="projects.%d"|args:$id value=$label}} +{{/select}} +