Correction problème sécurité CSRF
This commit is contained in:
parent
8667a3643d
commit
20033aaa36
14 changed files with 417 additions and 364 deletions
|
|
@ -8,7 +8,7 @@
|
|||
*}}
|
||||
|
||||
{{* données de l'immobilisation *}}
|
||||
{{:include file="_get_immo_data.html" immo_doc_id=$_GET.immo_doc_id keep="info_immo, ligne_immo, message"}}
|
||||
{{:include file="_get_immo_data.html" immo_doc_id=$immo_doc_id keep="info_immo, ligne_immo, message"}}
|
||||
{{if $message != null}}
|
||||
{{:error message=$message}}
|
||||
{{/if}}
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
id_transaction
|
||||
FROM acc_transactions_lines
|
||||
WHERE id = :line_id;
|
||||
:line_id = $_GET.cession_line_id|intval
|
||||
:line_id = $cession_line_id|intval
|
||||
}}
|
||||
{{:assign cession_id=$id_transaction}}
|
||||
{{else}}
|
||||
|
|
@ -26,14 +26,12 @@
|
|||
{{/select}}
|
||||
|
||||
{{* Lier l'écriture de cession à l'écriture d'immobilisation *}}
|
||||
{{:include file="_common_attach.html" immo_doc_id=$_GET.immo_doc_id trans_id=$cession_id}}
|
||||
{{:include file="_common_attach.html" immo_doc_id=$immo_doc_id trans_id=$cession_id}}
|
||||
|
||||
{{* enregistrer la liaison de l'écriture de cession *}}
|
||||
{{:save
|
||||
key=""|uuid
|
||||
type="cession_link"
|
||||
immo_doc_id=$info_immo.id
|
||||
cession_line_id=$_GET.cession_line_id|intval
|
||||
cession_line_id=$cession_line_id|intval
|
||||
}}
|
||||
|
||||
{{:redirect force="exit_step3.html?immo_doc_id=%s&from=exit&ok=1&msg=attach_cession"|args:$_GET.immo_doc_id}}
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
*}}
|
||||
|
||||
{{* données de l'immobilisation *}}
|
||||
{{:include file="_get_immo_data.html" immo_doc_id=$_GET.immo_doc_id keep="info_immo, ligne_immo, message"}}
|
||||
{{:include file="_get_immo_data.html" immo_doc_id=$immo_doc_id keep="info_immo, ligne_immo, message"}}
|
||||
{{if $message != null}}
|
||||
{{:error message=$message}}
|
||||
{{/if}}
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
id_transaction
|
||||
FROM acc_transactions_lines
|
||||
WHERE id = :line_id;
|
||||
:line_id = $_GET.exit_line_id|intval
|
||||
:line_id = $exit_line_id|intval
|
||||
}}
|
||||
{{:assign rebut_id=$id_transaction}}
|
||||
{{else}}
|
||||
|
|
@ -26,14 +26,12 @@
|
|||
{{/select}}
|
||||
|
||||
{{* Lier l'écriture de sortie à l'écriture d'immobilisation *}}
|
||||
{{:include file="_common_attach.html" immo_doc_id=$_GET.immo_doc_id trans_id=$rebut_id}}
|
||||
{{:include file="_common_attach.html" immo_doc_id=$immo_doc_id trans_id=$rebut_id}}
|
||||
|
||||
{{* enregistrer la liaison de l'écriture de sortie *}}
|
||||
{{:save
|
||||
key=""|uuid
|
||||
type="exit_link"
|
||||
immo_doc_id=$info_immo.id
|
||||
exit_line_id=$_GET.exit_line_id|intval
|
||||
exit_line_id=$exit_line_id|intval
|
||||
}}
|
||||
|
||||
{{:redirect force="exit_step4.html?immo_doc_id=%s&from=exit&ok=1&msg=attach_exit"|args:$_GET.immo_doc_id}}
|
||||
|
|
@ -7,12 +7,13 @@
|
|||
@param amort_line_id : id de la ligne d'amortissement
|
||||
*}}
|
||||
|
||||
{{:include file="_common_detach.html" immo_doc_id=$_GET.immo_doc_id line_id=$_GET.amort_line_id keep="info_immo"}}
|
||||
{{:include file="_common_detach.html" immo_doc_id=$immo_doc_id line_id=$amort_line_id keep="info_immo"}}
|
||||
|
||||
{{* supprimer le doc de liaison entre les lignes *}}
|
||||
{{#load type="amort_link"
|
||||
where="$$.immo_doc_id = :immo_doc_id AND $$.amort_line_id = :amort_line_id"
|
||||
:immo_doc_id=$_GET.immo_doc_id|intval
|
||||
:amort_line_id = $_GET.amort_line_id|intval
|
||||
:immo_doc_id=$immo_doc_id|intval
|
||||
:amort_line_id = $amort_line_id|intval
|
||||
}}
|
||||
{{:delete id=$id}}
|
||||
{{/load}}
|
||||
|
|
@ -24,9 +25,3 @@
|
|||
status="managed"
|
||||
}}
|
||||
{{/if}}
|
||||
|
||||
{{if $_GET.from == "exit"}}
|
||||
{{:redirect force="exit_step2.html?immo_doc_id=%s&from=exit&ok=1&msg=detach_amort"|args:$_GET.immo_doc_id}}
|
||||
{{else}}
|
||||
{{:redirect force="amortization.html?immo_doc_id=%s&ok=1&msg=detach_amort"|args:$_GET.immo_doc_id:}}
|
||||
{{/if}}
|
||||
|
|
@ -7,15 +7,13 @@
|
|||
@param cession_line_id : id de la ligne de cession
|
||||
*}}
|
||||
|
||||
{{:include file="_common_detach.html" immo_doc_id=$_GET.immo_doc_id line_id=$_GET.cession_line_id}}
|
||||
{{:include file="_common_detach.html" immo_doc_id=$immo_doc_id line_id=$cession_line_id}}
|
||||
|
||||
{{* supprimer le doc de liaison entre les lignes *}}
|
||||
{{#load type="cession_link"
|
||||
where="$$.immo_doc_id = :immo_doc_id AND $$.cession_line_id = :cession_line_id"
|
||||
:immo_doc_id=$_GET.immo_doc_id|intval
|
||||
:cession_line_id = $_GET.cession_line_id|intval
|
||||
:immo_doc_id=$immo_doc_id|intval
|
||||
:cession_line_id = $cession_line_id|intval
|
||||
}}
|
||||
{{:delete id=$id}}
|
||||
{{/load}}
|
||||
|
||||
{{:redirect to="exit_step3.html?immo_doc_id=%s&from=exit&ok=1&msg=detach_cession"|args:$_GET.immo_doc_id}}
|
||||
19
_detach_credit.html
Normal file
19
_detach_credit.html
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{{* -*- brindille -*- *}}
|
||||
|
||||
{{*
|
||||
Supprimer l'association entre une écriture d'immobilisation et
|
||||
une écriture au crédit du compte d'immobilisation
|
||||
@param immo_doc_id : id du doc associé à l'immo
|
||||
@param credit_line_id : id de la ligne de crédit
|
||||
*}}
|
||||
|
||||
{{:include file="_common_detach.html" immo_doc_id=$immo_doc_id line_id=$credit_line_id}}
|
||||
|
||||
{{* supprimer le doc de liaison entre les lignes *}}
|
||||
{{#load type="credit_link"
|
||||
where="$$.immo_doc_id = :immo_doc_id AND $$.credit_line_id = :credit_line_id"
|
||||
:immo_doc_id=$immo_doc_id|intval
|
||||
:credit_line_id = $credit_line_id|intval
|
||||
}}
|
||||
{{:delete id=$id}}
|
||||
{{/load}}
|
||||
|
|
@ -7,15 +7,13 @@
|
|||
@param exit_line_id : id de la ligne de sortie de bilan
|
||||
*}}
|
||||
|
||||
{{:include file="_common_detach.html" immo_doc_id=$_GET.immo_doc_id line_id=$_GET.exit_line_id}}
|
||||
{{:include file="_common_detach.html" immo_doc_id=$immo_doc_id line_id=$exit_line_id}}
|
||||
|
||||
{{* supprimer le doc de liaison entre les lignes *}}
|
||||
{{#load type="exit_link"
|
||||
where="$$.immo_doc_id = :immo_doc_id AND $$.exit_line_id = :exit_line_id"
|
||||
:immo_doc_id=$_GET.immo_doc_id|intval
|
||||
:exit_line_id = $_GET.exit_line_id|intval
|
||||
:immo_doc_id=$immo_doc_id|intval
|
||||
:exit_line_id = $exit_line_id|intval
|
||||
}}
|
||||
{{:delete id=$id}}
|
||||
{{/load}}
|
||||
|
||||
{{:redirect to="exit_step4.html?immo_doc_id=%s&from=exit&ok=1&msg=detach_exit"|args:$_GET.immo_doc_id}}
|
||||
|
|
@ -12,6 +12,24 @@
|
|||
{{:error message=$message}}
|
||||
{{/if}}
|
||||
|
||||
{{*
|
||||
Supprimer l'association entre une écriture d'immobilisation et
|
||||
une écriture au crédit du compte d'immobilisation
|
||||
*}}
|
||||
{{#form on="detach_credit"}}
|
||||
{{:include file="_detach_credit.html" immo_doc_id=$_POST.immo_doc_id credit_line_id=$_POST.detach_credit}}
|
||||
{{:redirect to="?immo_doc_id=%s&ok=1&msg=detach_avoir"|args:$_POST.immo_doc_id}}
|
||||
{{/form}}
|
||||
|
||||
{{*
|
||||
Supprimer l'association entre une écriture d'amortissement et
|
||||
une écriture d'immobilisation
|
||||
*}}
|
||||
{{#form on="detach_amort"}}
|
||||
{{:include file="_detach_amort.html" immo_doc_id=$_POST.immo_doc_id amort_line_id=$_POST.detach_amort}}
|
||||
{{:redirect to="?immo_doc_id=%s&ok=1&msg=detach_amort"|args:$_POST.immo_doc_id:}}
|
||||
{{/form}}
|
||||
|
||||
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$ligne_immo.trans_id}}
|
||||
{{:assign date_debut=$info_immo.date_mes|or:$info_immo.date_achat|or:$ligne_immo.date_achat}}
|
||||
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
||||
|
|
@ -169,31 +187,34 @@
|
|||
{{/if}}
|
||||
|
||||
{{if $linked_immos != null}}
|
||||
<table class="list">
|
||||
<thead>
|
||||
<th class="num">N°</th>
|
||||
<th>Date</th>
|
||||
<th>Libellé</th>
|
||||
<th class="nombre">Montant</th>
|
||||
<th class="actions"></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#foreach from=$linked_immos item="line"}}
|
||||
{{:assign url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.trans_id}}
|
||||
<tr>
|
||||
<td class="num"><a href="{{$url}}">#{{$line.trans_id}}</a></td>
|
||||
<td>{{$line.date|date_short}}</td>
|
||||
<td>{{$line.label}}</td>
|
||||
<td class="money">{{"%f"|math:$line.amount|money_currency_html:false|raw}}</td>
|
||||
<td class="actions">
|
||||
{{if ! $created_amort}}
|
||||
{{:linkbutton label="Détacher" href="detach_credit.html?immo_doc_id=%s&credit_line_id=%s"|args:$_GET.immo_doc_id:$line.credit_line_id shape="minus"}}
|
||||
{{/if}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/foreach}}
|
||||
</tbody>
|
||||
</table>
|
||||
<form method="post" action="">
|
||||
<table class="list">
|
||||
<thead>
|
||||
<th class="num">N°</th>
|
||||
<th>Date</th>
|
||||
<th>Libellé</th>
|
||||
<th class="nombre">Montant</th>
|
||||
<th class="actions"></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#foreach from=$linked_immos item="line"}}
|
||||
{{:assign url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.trans_id}}
|
||||
<tr>
|
||||
<td class="num"><a href="{{$url}}">#{{$line.trans_id}}</a></td>
|
||||
<td>{{$line.date|date_short}}</td>
|
||||
<td>{{$line.label}}</td>
|
||||
<td class="money">{{"%f"|math:$line.amount|money_currency_html:false|raw}}</td>
|
||||
<td class="actions">
|
||||
{{if ! $created_amort}}
|
||||
{{:button type="submit" name="detach_credit" label="Détacher" shape="minus" value=$line.credit_line_id}}
|
||||
{{/if}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/foreach}}
|
||||
</tbody>
|
||||
</table>
|
||||
<input type="hidden" id="immo_doc_id" name="immo_doc_id" value="{{$_GET.immo_doc_id}}">
|
||||
</form>
|
||||
{{/if}}
|
||||
|
||||
<h3 class="ruler">Amortissements</h3>
|
||||
|
|
@ -218,47 +239,50 @@
|
|||
|
||||
{{if $linked_amort != null}}
|
||||
<section class="amortissement">
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="num">N°</th>
|
||||
<th>Date</th>
|
||||
<th>Libellé</th>
|
||||
<th class="nombre">Montant</th>
|
||||
<th class="nombre">Valeur nette</th>
|
||||
<th>N° compte</th>
|
||||
<th>Compte</th>
|
||||
<th class="actions"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#foreach from=$linked_amort|ksort item="line"}}
|
||||
{{* données de l'écriture *}}
|
||||
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.trans_id}}
|
||||
{{:assign compte_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$line.account_id:$line.year}}
|
||||
{{:assign solde="%f-%d"|math:$solde:$line.amount}}
|
||||
<form method="post" action="">
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="num"><a href="{{$trans_url}}">#{{$line.trans_id}}</a></td>
|
||||
<td>{{$line.date|date_short}}</td>
|
||||
<td>
|
||||
{{$line.trans_label}}
|
||||
{{if $line.line_label != null && $line.line_label != $line.trans_label}}
|
||||
— {{$line.line_label}}
|
||||
{{/if}}
|
||||
</td>
|
||||
<td class="money">{{"%f"|math:$line.amount|money_html:false|raw}}</td>
|
||||
<td class="money">{{"%f"|math:$solde|money_html:false|raw}}</td>
|
||||
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
||||
<td>{{$line.account_label}}</td>
|
||||
<td class="actions">
|
||||
{{if ! $created_amort}}
|
||||
{{:linkbutton label="Détacher" href="detach_amort.html?immo_doc_id=%s&amort_line_id=%s"|args:$_GET.immo_doc_id:$line.line_id shape="minus"}}
|
||||
{{/if}}
|
||||
</td>
|
||||
<th class="num">N°</th>
|
||||
<th>Date</th>
|
||||
<th>Libellé</th>
|
||||
<th class="nombre">Montant</th>
|
||||
<th class="nombre">Valeur nette</th>
|
||||
<th>N° compte</th>
|
||||
<th>Compte</th>
|
||||
<th class="actions"></th>
|
||||
</tr>
|
||||
{{/foreach}}
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#foreach from=$linked_amort|ksort item="line"}}
|
||||
{{* données de l'écriture *}}
|
||||
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.trans_id}}
|
||||
{{:assign compte_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$line.account_id:$line.year}}
|
||||
{{:assign solde="%f-%d"|math:$solde:$line.amount}}
|
||||
<tr>
|
||||
<td class="num"><a href="{{$trans_url}}">#{{$line.trans_id}}</a></td>
|
||||
<td>{{$line.date|date_short}}</td>
|
||||
<td>
|
||||
{{$line.trans_label}}
|
||||
{{if $line.line_label != null && $line.line_label != $line.trans_label}}
|
||||
— {{$line.line_label}}
|
||||
{{/if}}
|
||||
</td>
|
||||
<td class="money">{{"%f"|math:$line.amount|money_html:false|raw}}</td>
|
||||
<td class="money">{{"%f"|math:$solde|money_html:false|raw}}</td>
|
||||
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
||||
<td>{{$line.account_label}}</td>
|
||||
<td class="actions">
|
||||
{{if ! $created_amort}}
|
||||
{{:button type="submit" name="detach_amort" label="Détacher" shape="minus" value=$line.line_id}}
|
||||
{{/if}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/foreach}}
|
||||
</tbody>
|
||||
</table>
|
||||
<input type="hidden" id="immo_doc_id" name="immo_doc_id" value="{{$_GET.immo_doc_id}}">
|
||||
</form>
|
||||
</section>
|
||||
{{/if}}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,25 +0,0 @@
|
|||
{{* -*- brindille -*- *}}
|
||||
|
||||
{{*
|
||||
Supprimer l'association entre une écriture d'immobilisation et
|
||||
une écriture au crédit du compte d'immobilisation
|
||||
@param immo_doc_id : id du doc associé à l'immo
|
||||
@param credit_line_id : id de la ligne de crédit
|
||||
*}}
|
||||
|
||||
{{:include file="_common_detach.html" immo_doc_id=$_GET.immo_doc_id line_id=$_GET.credit_line_id}}
|
||||
|
||||
{{* supprimer le doc de liaison entre les lignes *}}
|
||||
{{#load type="credit_link"
|
||||
where="$$.immo_doc_id = :immo_doc_id AND $$.credit_line_id = :credit_line_id"
|
||||
:immo_doc_id=$_GET.immo_doc_id|intval
|
||||
:credit_line_id = $_GET.credit_line_id|intval
|
||||
}}
|
||||
{{:delete id=$id}}
|
||||
{{/load}}
|
||||
|
||||
{{if $_GET.from == "exit"}}
|
||||
{{:redirect force="exit_step1.html?immo_doc_id=%s&from=%s&ok=1&msg=detach_avoir"|args:$_GET.immo_doc_id:$_GET.from}}
|
||||
{{else}}
|
||||
{{:redirect force="amortization.html?immo_doc_id=%s&ok=1&msg=detach_avoir"|args:$_GET.immo_doc_id}}
|
||||
{{/if}}
|
||||
|
|
@ -12,6 +12,15 @@
|
|||
{{:error message=$message}}
|
||||
{{/if}}
|
||||
|
||||
{{*
|
||||
Supprimer l'association entre une écriture d'immobilisation et
|
||||
une écriture au crédit du compte d'immobilisation
|
||||
*}}
|
||||
{{#form on="detach_credit"}}
|
||||
{{:include file="_detach_credit.html" immo_doc_id=$_POST.immo_doc_id credit_line_id=$_POST.detach_credit}}
|
||||
{{:redirect to="?immo_doc_id=%s&from=exit&ok=1&msg=detach_avoir"|args:$_POST.immo_doc_id}}
|
||||
{{/form}}
|
||||
|
||||
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
||||
{{if $label_immo|strpos:$ligne_immo.line_label === false}}
|
||||
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
||||
|
|
@ -139,6 +148,8 @@
|
|||
<p class="block confirm">{{$msg}}</p>
|
||||
{{/if}}
|
||||
|
||||
{{:form_errors}}
|
||||
|
||||
<div class="informations">
|
||||
<dl class="describe">
|
||||
<dt>Immobilisation</dt>
|
||||
|
|
@ -173,34 +184,37 @@
|
|||
|
||||
<h3 class="ruler">Écritures d'avoir attachées à l'immobilisation</h3>
|
||||
{{if $linked_immos != null}}
|
||||
<table class="list">
|
||||
<thead>
|
||||
<td class="num">N°</td>
|
||||
<td>Date</td>
|
||||
<td>Libellé</td>
|
||||
<td class="nombre">Montant</td>
|
||||
<td>N° compte</td>
|
||||
<td>Compte</td>
|
||||
<td class="actions"></td>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#foreach from=$linked_immos item="line"}}
|
||||
{{:assign url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.trans_id}}
|
||||
{{:assign compte_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$line.account_id:$line.year}}
|
||||
<tr>
|
||||
<td class="num"><a href="{{$url}}">#{{$line.trans_id}}</a></td>
|
||||
<td>{{$line.date|date_short}}</td>
|
||||
<td>{{$line.label}}</td>
|
||||
<td class="money">{{"%f"|math:$line.amount|money_currency_html:false|raw}}</td>
|
||||
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
||||
<td>{{$line.account_label}}</td>
|
||||
<td class="actions">
|
||||
{{:linkbutton label="Détacher" href="detach_credit.html?immo_doc_id=%s&credit_line_id=%s&from=exit"|args:$_GET.immo_doc_id:$line.credit_line_id shape="minus"}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/foreach}}
|
||||
</tbody>
|
||||
</table>
|
||||
<form method="post" action="">
|
||||
<table class="list">
|
||||
<thead>
|
||||
<td class="num">N°</td>
|
||||
<td>Date</td>
|
||||
<td>Libellé</td>
|
||||
<td class="nombre">Montant</td>
|
||||
<td>N° compte</td>
|
||||
<td>Compte</td>
|
||||
<td class="actions"></td>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#foreach from=$linked_immos item="line"}}
|
||||
{{:assign url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.trans_id}}
|
||||
{{:assign compte_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$line.account_id:$line.year}}
|
||||
<tr>
|
||||
<td class="num"><a href="{{$url}}">#{{$line.trans_id}}</a></td>
|
||||
<td>{{$line.date|date_short}}</td>
|
||||
<td>{{$line.label}}</td>
|
||||
<td class="money">{{"%f"|math:$line.amount|money_currency_html:false|raw}}</td>
|
||||
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
||||
<td>{{$line.account_label}}</td>
|
||||
<td class="actions">
|
||||
{{:button type="submit" name="detach_credit" label="Détacher" shape="minus" value=$line.credit_line_id}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/foreach}}
|
||||
</tbody>
|
||||
</table>
|
||||
<input type="hidden" id="immo_doc_id" name="immo_doc_id" value="{{$_GET.immo_doc_id}}">
|
||||
</form>
|
||||
{{elseif $credit_lines}}
|
||||
<p class="block alert">
|
||||
Vous pouvez attacher une ou plusieurs écritures d'avoir à votre immobilisation
|
||||
|
|
|
|||
|
|
@ -20,6 +20,15 @@
|
|||
{{:redirect to="exit_step3.html?immo_doc_id=%s&from=%s"|args:$_GET.immo_doc_id:$_GET.from}}
|
||||
{{/form}}
|
||||
|
||||
{{*
|
||||
Supprimer l'association entre une écriture d'amortissement et
|
||||
une écriture d'immobilisation
|
||||
*}}
|
||||
{{#form on="detach_amort"}}
|
||||
{{:include file="_detach_amort.html" immo_doc_id=$_POST.immo_doc_id amort_line_id=$_POST.detach_amort}}
|
||||
{{:redirect to="?immo_doc_id=%s&from=exit&ok=1&msg=detach_amort"|args:$_POST.immo_doc_id}}
|
||||
{{/form}}
|
||||
|
||||
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
||||
{{if $label_immo|strpos:$ligne_immo.line_label === false}}
|
||||
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
||||
|
|
@ -139,46 +148,49 @@
|
|||
|
||||
<h3 class="ruler">Écritures d'amortissement attachées à l'immobilisation</h3>
|
||||
{{if $linked_amort != null}}
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="num">N°</td>
|
||||
<td>Date</td>
|
||||
<td>Libellé</td>
|
||||
<td class="nombre">Montant</td>
|
||||
<td>N° compte</td>
|
||||
<td>Compte</td>
|
||||
<td class="actions"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#foreach from=$linked_amort|ksort item="line"}}
|
||||
{{* données de l'écriture *}}
|
||||
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.trans_id}}
|
||||
{{:assign compte_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$line.account_id:$line.year}}
|
||||
<form method="post" action="">
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="num"><a href="{{$trans_url}}">#{{$line.trans_id}}</a></td>
|
||||
<td>{{$line.date|date_short}}</td>
|
||||
<td>
|
||||
{{if $line.line_label != null}}
|
||||
{{$line.line_label}}
|
||||
{{if $line.trans_label != $line.line_label}}
|
||||
— {{$line.trans_label}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{$line.trans_label}}
|
||||
{{/if}}
|
||||
</td>
|
||||
<td class="money">{{"%f"|math:$line.amount|money_html:false|raw}}</td>
|
||||
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
||||
<td>{{$line.account_label}}</td>
|
||||
<td class="actions">
|
||||
{{:linkbutton label="Détacher" href="detach_amort.html?immo_doc_id=%s&amort_line_id=%s&from=exit"|args:$_GET.immo_doc_id:$line.line_id shape="minus"}}
|
||||
</td>
|
||||
<td class="num">N°</td>
|
||||
<td>Date</td>
|
||||
<td>Libellé</td>
|
||||
<td class="nombre">Montant</td>
|
||||
<td>N° compte</td>
|
||||
<td>Compte</td>
|
||||
<td class="actions"></td>
|
||||
</tr>
|
||||
{{/foreach}}
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#foreach from=$linked_amort|ksort item="line"}}
|
||||
{{* données de l'écriture *}}
|
||||
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.trans_id}}
|
||||
{{:assign compte_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$line.account_id:$line.year}}
|
||||
<tr>
|
||||
<td class="num"><a href="{{$trans_url}}">#{{$line.trans_id}}</a></td>
|
||||
<td>{{$line.date|date_short}}</td>
|
||||
<td>
|
||||
{{if $line.line_label != null}}
|
||||
{{$line.line_label}}
|
||||
{{if $line.trans_label != $line.line_label}}
|
||||
— {{$line.trans_label}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{$line.trans_label}}
|
||||
{{/if}}
|
||||
</td>
|
||||
<td class="money">{{"%f"|math:$line.amount|money_html:false|raw}}</td>
|
||||
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
||||
<td>{{$line.account_label}}</td>
|
||||
<td class="actions">
|
||||
{{:button type="submit" name="detach_amort" label="Détacher" shape="minus" value=$line.line_id}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/foreach}}
|
||||
</tbody>
|
||||
</table>
|
||||
<input type="hidden" id="immo_doc_id" name="immo_doc_id" value="{{$_GET.immo_doc_id}}">
|
||||
</form>
|
||||
{{elseif $free_amort_lines}}
|
||||
<p class="block alert">
|
||||
Vous pouvez attacher une ou plusieurs écritures d'amortissement à l'immobilisation
|
||||
|
|
|
|||
|
|
@ -20,6 +20,15 @@
|
|||
{{:redirect to="exit_step4.html?immo_doc_id=%s&from=%s"|args:$_GET.immo_doc_id:$_GET.from}}
|
||||
{{/form}}
|
||||
|
||||
{{*
|
||||
Supprimer l'association entre une écriture d'immobilisation et
|
||||
une écriture de cession
|
||||
*}}
|
||||
{{#form on="detach_cession"}}
|
||||
{{:include file="_detach_cession.html" immo_doc_id=$_POST.immo_doc_id cession_line_id=$_POST.detach_cession}}
|
||||
{{:redirect to="exit_step3.html?immo_doc_id=%s&from=exit&ok=1&msg=detach_cession"|args:$_GET.immo_doc_id}}
|
||||
{{/form}}
|
||||
|
||||
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
||||
{{if $label_immo|strpos:$ligne_immo.line_label === false}}
|
||||
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
||||
|
|
@ -94,6 +103,7 @@
|
|||
{{/select}}
|
||||
|
||||
{{:admin_header title="Immobilisation sortie du bilan" custom_css="./style.css" current="module_amortization"}}
|
||||
|
||||
{{if $_GET.from == "exit"}}
|
||||
{{:assign current="other"}}
|
||||
{{else}}
|
||||
|
|
@ -109,6 +119,8 @@
|
|||
<p class="block confirm">{{$msg}}</p>
|
||||
{{/if}}
|
||||
|
||||
{{:form_errors}}
|
||||
|
||||
<div class="informations">
|
||||
<dl class="describe">
|
||||
<dt>Immobilisation</dt>
|
||||
|
|
@ -147,46 +159,49 @@
|
|||
|
||||
<h3 class="ruler">Écriture de cession attachée à l'immobilisation</h3>
|
||||
{{if $linked_cessions != null}}
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="num">N°</td>
|
||||
<td>Date</td>
|
||||
<td>Libellé</td>
|
||||
<td class="nombre">Montant</td>
|
||||
<td>N° compte</td>
|
||||
<td>Compte</td>
|
||||
<td class="actions"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#foreach from=$linked_cessions item="line"}}
|
||||
{{* données de l'écriture *}}
|
||||
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.trans_id}}
|
||||
{{:assign compte_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$line.account_id:$line.year}}
|
||||
<form method="post" action="">
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="num"><a href="{{$trans_url}}">#{{$line.trans_id}}</a></td>
|
||||
<td>{{$line.date|date_short}}</td>
|
||||
<td>
|
||||
{{if $line.line_label != null}}
|
||||
{{$line.line_label}}
|
||||
{{if $line.trans_label != $line.line_label}}
|
||||
— {{$line.trans_label}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{$line.trans_label}}
|
||||
{{/if}}
|
||||
</td>
|
||||
<td class="money">{{"%f"|math:$line.amount|money_html:false|raw}}</td>
|
||||
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
||||
<td>{{$line.account_label}}</td>
|
||||
<td class="actions">
|
||||
{{:linkbutton label="Détacher" href="detach_cession.html?immo_doc_id=%s&cession_line_id=%s&from=exit"|args:$_GET.immo_doc_id:$line.line_id shape="minus"}}
|
||||
</td>
|
||||
<td class="num">N°</td>
|
||||
<td>Date</td>
|
||||
<td>Libellé</td>
|
||||
<td class="nombre">Montant</td>
|
||||
<td>N° compte</td>
|
||||
<td>Compte</td>
|
||||
<td class="actions"></td>
|
||||
</tr>
|
||||
{{/foreach}}
|
||||
</tbody>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#foreach from=$linked_cessions item="line"}}
|
||||
{{* données de l'écriture *}}
|
||||
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.trans_id}}
|
||||
{{:assign compte_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$line.account_id:$line.year}}
|
||||
<tr>
|
||||
<td class="num"><a href="{{$trans_url}}">#{{$line.trans_id}}</a></td>
|
||||
<td>{{$line.date|date_short}}</td>
|
||||
<td>
|
||||
{{if $line.line_label != null}}
|
||||
{{$line.line_label}}
|
||||
{{if $line.trans_label != $line.line_label}}
|
||||
— {{$line.trans_label}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{$line.trans_label}}
|
||||
{{/if}}
|
||||
</td>
|
||||
<td class="money">{{"%f"|math:$line.amount|money_html:false|raw}}</td>
|
||||
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
||||
<td>{{$line.account_label}}</td>
|
||||
<td class="actions">
|
||||
{{:button type="submit" name="detach_cession" label="Détacher" shape="minus" value=$line.line_id}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/foreach}}
|
||||
</tbody>
|
||||
</table>
|
||||
<input type="hidden" id="immo_doc_id" name="immo_doc_id" value="{{$_GET.immo_doc_id}}">
|
||||
</form>
|
||||
{{elseif $free_cessions}}
|
||||
<p class="block alert">
|
||||
Vous pouvez attacher une écriture de cession à l'immobilisation
|
||||
|
|
|
|||
111
exit_step4.html
111
exit_step4.html
|
|
@ -99,7 +99,7 @@
|
|||
{{:assign exit_amort_display=$exit_amort|money_currency:false|replace:" ":" "}}
|
||||
{{:assign total_amort_display=$total_amort|money_currency:false|replace:" ":" "}}
|
||||
{{:assign erreur=1}}
|
||||
{{:assign message="Le montant des amortissement dans l'écriture de sortie (%s) est différent du total des amortissements associés à l'immobilisation (%s)."|args:$exit_amort_display:$total_amort_display}}
|
||||
{{:assign message="Le montant des amortissement dans l'écriture de sortie (%s) est différent du total des amortissements attachés à l'immobilisation (%s)."|args:$exit_amort_display:$total_amort_display}}
|
||||
{{/if}}
|
||||
|
||||
{{if $exit_line.amount != $solde}}
|
||||
|
|
@ -224,6 +224,15 @@
|
|||
{{:redirect to="index.html?type_immo=other"}}
|
||||
{{/form}}
|
||||
|
||||
{{*
|
||||
Supprimer l'association entre une écriture d'immobilisation et
|
||||
une écriture de sortie de bilan
|
||||
*}}
|
||||
{{#form on="detach_exit"}}
|
||||
{{:include file="_detach_exit.html" immo_doc_id=$_POST.immo_doc_id exit_line_id=$_POST.detach_exit}}
|
||||
{{:redirect to="?immo_doc_id=%s&from=exit&ok=1&msg=detach_exit"|args:$_POST.immo_doc_id}}
|
||||
{{/form}}
|
||||
|
||||
{{:admin_header title="Immobilisation sortie du bilan" custom_css="./style.css" current="module_amortization"}}
|
||||
{{if $_GET.from == "exit"}}
|
||||
{{:assign current="other"}}
|
||||
|
|
@ -272,7 +281,7 @@
|
|||
{{if $erreur == 1}}
|
||||
Vérifiez si vous avez correctement attaché les écritures d'amortissement.
|
||||
{{elseif $erreur == 2}}
|
||||
Vérifiez si vous avez correctement attaché les éventuelles écritures d'avoir.
|
||||
Vérifiez si vous avez correctement attaché d'éventuelles écritures d'avoir.
|
||||
{{/if}}
|
||||
</p>
|
||||
<table class="list error">
|
||||
|
|
@ -313,49 +322,9 @@
|
|||
<h3 class="ruler">Écriture de sortie de bilan attachée à l'immobilisation</h3>
|
||||
{{if $exit_line != null}}
|
||||
{{:assign exit_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$exit_line.trans_id}}
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="num">N°</td>
|
||||
<td>Date</td>
|
||||
<td>Libellé</td>
|
||||
<td class="nombre">Montant</td>
|
||||
<td>N° compte</td>
|
||||
<td>Compte</td>
|
||||
<td class="actions"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="num"><a href="{{$exit_url}}">#{{$exit_line.trans_id}}</a></td>
|
||||
<td>{{$exit_line.date|date_short}}</td>
|
||||
<td>
|
||||
{{if $exit_line.line_label != null}}
|
||||
{{$exit_line.line_label}}
|
||||
{{else}}
|
||||
{{$exit_line.trans_label}}
|
||||
{{/if}}
|
||||
</td>
|
||||
<td class="money">{{"%f"|math:$exit_line.amount|money_html:false|raw}}</td>
|
||||
<td><a href="{{$compte_url}}">{{$exit_line.account_code}}</a></td>
|
||||
<td>{{$exit_line.account_label}}</td>
|
||||
<td class="actions">
|
||||
{{:linkbutton label="Détacher" href="detach_exit.html?immo_doc_id=%s&exit_line_id=%s&from=exit"|args:$_GET.immo_doc_id:$exit_line.line_id shape="minus"}}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
{{elseif $exit_lines}}
|
||||
<p class="block alert">
|
||||
Vous pouvez attacher une écriture de sortie de bilan à l'immobilisation
|
||||
</p>
|
||||
{{/if}}
|
||||
|
||||
{{if $exit_lines}}
|
||||
{{*
|
||||
<h3 class="ruler">Écritures non rattachées</h3>
|
||||
<table class="list">
|
||||
<thead>
|
||||
<form method="post" action="">
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="num">N°</td>
|
||||
<td>Date</td>
|
||||
|
|
@ -367,33 +336,41 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{{#foreach from=$exit_lines item="line"}}
|
||||
{{:assign exit_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.trans_id}}
|
||||
{{:assign compte_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$line.account_id:$line.year}}
|
||||
<tr>
|
||||
<td class="num"><a href="{{$exit_url}}">#{{$line.trans_id}}</a></td>
|
||||
<td>{{$line.date|date_short}}</td>
|
||||
<td>{{$line.trans_label}}
|
||||
{{if $line.line_label != null && $line.line_label != $line.trans_label}} — {{$line.line_label}}{{/if}}
|
||||
</td>
|
||||
<td class="money">{{"%f"|math:$line.amount|money_html:false|raw}}</td>
|
||||
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
||||
<td>{{$line.account_label}}</td>
|
||||
<td class="actions">
|
||||
{{:linkbutton label="Attacher" href="attach_exit.html?immo_doc_id=%s&exit_line_id=%s&from=exit"|args:$_GET.immo_doc_id:$line.credit_line_id shape="plus"}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/foreach}}
|
||||
<tr>
|
||||
<td class="num"><a href="{{$exit_url}}">#{{$exit_line.trans_id}}</a></td>
|
||||
<td>{{$exit_line.date|date_short}}</td>
|
||||
<td>
|
||||
{{if $exit_line.line_label != null}}
|
||||
{{$exit_line.line_label}}
|
||||
{{else}}
|
||||
{{$exit_line.trans_label}}
|
||||
{{/if}}
|
||||
</td>
|
||||
<td class="money">{{"%f"|math:$exit_line.amount|money_html:false|raw}}</td>
|
||||
<td><a href="{{$compte_url}}">{{$exit_line.account_code}}</a></td>
|
||||
<td>{{$exit_line.account_label}}</td>
|
||||
<td class="actions">
|
||||
{{if ! $erreur}}
|
||||
{{:button type="submit" name="detach_exit" label="Détacher" shape="minus" value=$exit_line.line_id}}
|
||||
{{/if}}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
*}}
|
||||
{{elseif $exit_line == null}}
|
||||
</table>
|
||||
<input type="hidden" id="immo_doc_id" name="immo_doc_id" value="{{$_GET.immo_doc_id}}">
|
||||
</form>
|
||||
{{elseif $exit_lines}}
|
||||
<p class="block alert">
|
||||
Vous pouvez attacher une écriture de sortie de bilan à l'immobilisation
|
||||
</p>
|
||||
{{/if}}
|
||||
|
||||
{{if $exit_lines == null && $exit_line == null}}
|
||||
<p class="block error">Aucune écriture de sortie de bilan avec un
|
||||
montant de {{$solde|money_currency_html:false|raw}} au crédit du
|
||||
compte {{$ligne_immo.account_code}} — {{$ligne_immo.account_label}} ;
|
||||
<br />
|
||||
Vérifiez si vous avez correctement attaché les éventuelles écritures d'avoir.
|
||||
Vérifiez si vous avez correctement attaché d'éventuelles écritures d'avoir.
|
||||
<br />
|
||||
Si vous avez supprimé l'écriture de sortie de bilan, il faut
|
||||
la recréer avant de pouvoir classer cette immobilisation
|
||||
|
|
|
|||
|
|
@ -9,6 +9,16 @@
|
|||
{{if $message != null}}
|
||||
{{:error message=$message}}
|
||||
{{/if}}
|
||||
|
||||
{{*
|
||||
Enregistrer la liaison entre une écriture d'immobilisation et
|
||||
une écriture de cession
|
||||
*}}
|
||||
{{#form on="attach_cession"}}
|
||||
{{:include file="_attach_cession.html" immo_doc_id=$_POST.immo_doc_id cession_line_id=$_POST.attach_cession}}
|
||||
{{:redirect force="exit_step3.html?immo_doc_id=%s&from=exit&ok=1&msg=attach_cession"|args:$_POST.immo_doc_id}}
|
||||
{{/form}}
|
||||
|
||||
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$ligne_immo.trans_id}}
|
||||
{{:assign date_debut=$info_immo.date_mes|or:$info_immo.date_achat|or:$ligne_immo.date_achat}}
|
||||
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
||||
|
|
@ -62,6 +72,8 @@
|
|||
|
||||
{{:admin_header title="Écritures de cession du compte d'immobilisation" custom_css="./style.css" current="module_amortization"}}
|
||||
|
||||
{{:form_errors}}
|
||||
|
||||
<div class="informations">
|
||||
<dl class="describe">
|
||||
<dt>Immobilisation</dt>
|
||||
|
|
@ -74,45 +86,48 @@
|
|||
</div>
|
||||
|
||||
{{if $free_cessions}}
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="num">N°</td>
|
||||
<td>Date</td>
|
||||
<td>Libellé</td>
|
||||
<td class="nombre">Montant</td>
|
||||
<td>N° compte</td>
|
||||
<td>Compte</td>
|
||||
<td class="actions"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{{#foreach from=$free_cessions item="line"}}
|
||||
{{:assign cession_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.trans_id}}
|
||||
{{:assign compte_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$line.account_id:$line.year}}
|
||||
<form method="post" action="">
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="num"><a href="{{$cession_url}}">#{{$line.trans_id}}</a></td>
|
||||
<td>{{$line.date|date_short}}</td>
|
||||
<td>
|
||||
{{if $line.line_label != null}}
|
||||
{{$line.line_label}}
|
||||
{{if $line.trans_label != $line.line_label}}
|
||||
— {{$line.trans_label}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{$line.trans_label}}
|
||||
{{/if}}
|
||||
</td>
|
||||
<td class="money">{{"%f"|math:$line.amount|money_html:false|raw}}</td>
|
||||
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
||||
<td>{{$line.account_label}}</td>
|
||||
<td class="actions">
|
||||
{{:linkbutton label="Attacher" href="attach_cession.html?immo_doc_id=%s&cession_line_id=%s&from=exit"|args:$_GET.immo_doc_id:$line.line_id shape="plus"}}
|
||||
</td>
|
||||
<td class="num">N°</td>
|
||||
<td>Date</td>
|
||||
<td>Libellé</td>
|
||||
<td class="nombre">Montant</td>
|
||||
<td>N° compte</td>
|
||||
<td>Compte</td>
|
||||
<td class="actions"></td>
|
||||
</tr>
|
||||
{{/foreach}}
|
||||
</tbody>
|
||||
<p class="help">Sélectionner une écriture de cession pour l'associer à l'immobilisation</p>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
{{#foreach from=$free_cessions item="line"}}
|
||||
{{:assign cession_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.trans_id}}
|
||||
{{:assign compte_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$line.account_id:$line.year}}
|
||||
<tr>
|
||||
<td class="num"><a href="{{$cession_url}}">#{{$line.trans_id}}</a></td>
|
||||
<td>{{$line.date|date_short}}</td>
|
||||
<td>
|
||||
{{if $line.line_label != null}}
|
||||
{{$line.line_label}}
|
||||
{{if $line.trans_label != $line.line_label}}
|
||||
— {{$line.trans_label}}
|
||||
{{/if}}
|
||||
{{else}}
|
||||
{{$line.trans_label}}
|
||||
{{/if}}
|
||||
</td>
|
||||
<td class="money">{{"%f"|math:$line.amount|money_html:false|raw}}</td>
|
||||
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
||||
<td>{{$line.account_label}}</td>
|
||||
<td class="actions">
|
||||
{{:button type="submit" name="attach_cession" label="Attacher" shape="plus" value=$line.line_id}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/foreach}}
|
||||
</tbody>
|
||||
<p class="help">Sélectionner une écriture de cession pour l'associer à l'immobilisation</p>
|
||||
</table>
|
||||
<input type="hidden" id="immo_doc_id" name="immo_doc_id" value="{{$_GET.immo_doc_id}}">
|
||||
</form>
|
||||
{{/if}}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,16 @@
|
|||
{{if $message != null}}
|
||||
{{:error message=$message}}
|
||||
{{/if}}
|
||||
|
||||
{{*
|
||||
Enregistrer la liaison entre une écriture d'immobilisation et
|
||||
une écriture de sortie d'immobilisation
|
||||
*}}
|
||||
{{#form on="attach_exit"}}
|
||||
{{:include file="_attach_exit.html" immo_doc_id=$_POST.immo_doc_id exit_line_id=$_POST.attach_exit}}
|
||||
{{:redirect force="exit_step4.html?immo_doc_id=%s&from=exit&ok=1&msg=attach_exit"|args:$_POST.immo_doc_id}}
|
||||
{{/form}}
|
||||
|
||||
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$ligne_immo.trans_id}}
|
||||
{{:assign date_debut=$info_immo.date_mes|or:$info_immo.date_achat|or:$ligne_immo.date_achat}}
|
||||
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
||||
|
|
@ -58,7 +68,9 @@
|
|||
{{/if}}
|
||||
{{/select}}
|
||||
|
||||
{{:admin_header title="Écritures de cession du compte d'immobilisation" custom_css="./style.css" current="module_amortization"}}
|
||||
{{:admin_header title="Écritures de sortie du bilan" custom_css="./style.css" current="module_amortization"}}
|
||||
|
||||
{{:form_errors}}
|
||||
|
||||
<div class="informations">
|
||||
<dl class="describe">
|
||||
|
|
@ -72,37 +84,40 @@
|
|||
</div>
|
||||
|
||||
{{if $exit_lines}}
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="num">N°</td>
|
||||
<td>Date</td>
|
||||
<td>Libellé</td>
|
||||
<td class="nombre">Montant</td>
|
||||
<td>N° compte</td>
|
||||
<td>Compte</td>
|
||||
<td class="actions"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#foreach from=$exit_lines item="line"}}
|
||||
{{:assign exit_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.trans_id}}
|
||||
{{:assign compte_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$line.account_id:$line.year}}
|
||||
<tr>
|
||||
<td class="num"><a href="{{$exit_url}}">#{{$line.trans_id}}</a></td>
|
||||
<td>{{$line.date|date_short}}</td>
|
||||
<td>{{$line.trans_label}}
|
||||
{{if $line.line_label != null && $line.line_label != $line.trans_label}} — {{$line.line_label}}{{/if}}
|
||||
</td>
|
||||
<td class="money">{{"%f"|math:$line.amount|money_html:false|raw}}</td>
|
||||
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
||||
<td>{{$line.account_label}}</td>
|
||||
<td class="actions">
|
||||
{{:linkbutton label="Attacher" href="attach_exit.html?immo_doc_id=%s&exit_line_id=%s&from=exit"|args:$_GET.immo_doc_id:$line.credit_line_id shape="plus"}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/foreach}}
|
||||
</tbody>
|
||||
<p class="help">Sélectionner une écriture de sortie de bilan pour l'associer à l'immobilisation</p>
|
||||
</table>
|
||||
<form method="post" action="">
|
||||
<table class="list">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="num">N°</td>
|
||||
<td>Date</td>
|
||||
<td>Libellé</td>
|
||||
<td class="nombre">Montant</td>
|
||||
<td>N° compte</td>
|
||||
<td>Compte</td>
|
||||
<td class="actions"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#foreach from=$exit_lines item="line"}}
|
||||
{{:assign exit_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.trans_id}}
|
||||
{{:assign compte_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$line.account_id:$line.year}}
|
||||
<tr>
|
||||
<td class="num"><a href="{{$exit_url}}">#{{$line.trans_id}}</a></td>
|
||||
<td>{{$line.date|date_short}}</td>
|
||||
<td>{{$line.trans_label}}
|
||||
{{if $line.line_label != null && $line.line_label != $line.trans_label}} — {{$line.line_label}}{{/if}}
|
||||
</td>
|
||||
<td class="money">{{"%f"|math:$line.amount|money_html:false|raw}}</td>
|
||||
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
||||
<td>{{$line.account_label}}</td>
|
||||
<td class="actions">
|
||||
{{:button type="submit" name="attach_exit" label="Attacher" shape="plus" value=$line.credit_line_id}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/foreach}}
|
||||
</tbody>
|
||||
<p class="help">Sélectionner une écriture de sortie de bilan pour l'associer à l'immobilisation</p>
|
||||
</table>
|
||||
<input type="hidden" id="immo_doc_id" name="immo_doc_id" value="{{$_GET.immo_doc_id}}">
|
||||
</form>
|
||||
{{/if}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue