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 *}}
|
{{* 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}}
|
{{if $message != null}}
|
||||||
{{:error message=$message}}
|
{{:error message=$message}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
id_transaction
|
id_transaction
|
||||||
FROM acc_transactions_lines
|
FROM acc_transactions_lines
|
||||||
WHERE id = :line_id;
|
WHERE id = :line_id;
|
||||||
:line_id = $_GET.cession_line_id|intval
|
:line_id = $cession_line_id|intval
|
||||||
}}
|
}}
|
||||||
{{:assign cession_id=$id_transaction}}
|
{{:assign cession_id=$id_transaction}}
|
||||||
{{else}}
|
{{else}}
|
||||||
|
|
@ -26,14 +26,12 @@
|
||||||
{{/select}}
|
{{/select}}
|
||||||
|
|
||||||
{{* Lier l'écriture de cession à l'écriture d'immobilisation *}}
|
{{* 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 *}}
|
{{* enregistrer la liaison de l'écriture de cession *}}
|
||||||
{{:save
|
{{:save
|
||||||
key=""|uuid
|
key=""|uuid
|
||||||
type="cession_link"
|
type="cession_link"
|
||||||
immo_doc_id=$info_immo.id
|
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 *}}
|
{{* 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}}
|
{{if $message != null}}
|
||||||
{{:error message=$message}}
|
{{:error message=$message}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
id_transaction
|
id_transaction
|
||||||
FROM acc_transactions_lines
|
FROM acc_transactions_lines
|
||||||
WHERE id = :line_id;
|
WHERE id = :line_id;
|
||||||
:line_id = $_GET.exit_line_id|intval
|
:line_id = $exit_line_id|intval
|
||||||
}}
|
}}
|
||||||
{{:assign rebut_id=$id_transaction}}
|
{{:assign rebut_id=$id_transaction}}
|
||||||
{{else}}
|
{{else}}
|
||||||
|
|
@ -26,14 +26,12 @@
|
||||||
{{/select}}
|
{{/select}}
|
||||||
|
|
||||||
{{* Lier l'écriture de sortie à l'écriture d'immobilisation *}}
|
{{* 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 *}}
|
{{* enregistrer la liaison de l'écriture de sortie *}}
|
||||||
{{:save
|
{{:save
|
||||||
key=""|uuid
|
key=""|uuid
|
||||||
type="exit_link"
|
type="exit_link"
|
||||||
immo_doc_id=$info_immo.id
|
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
|
@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 *}}
|
{{* supprimer le doc de liaison entre les lignes *}}
|
||||||
{{#load type="amort_link"
|
{{#load type="amort_link"
|
||||||
where="$$.immo_doc_id = :immo_doc_id AND $$.amort_line_id = :amort_line_id"
|
where="$$.immo_doc_id = :immo_doc_id AND $$.amort_line_id = :amort_line_id"
|
||||||
:immo_doc_id=$_GET.immo_doc_id|intval
|
:immo_doc_id=$immo_doc_id|intval
|
||||||
:amort_line_id = $_GET.amort_line_id|intval
|
:amort_line_id = $amort_line_id|intval
|
||||||
}}
|
}}
|
||||||
{{:delete id=$id}}
|
{{:delete id=$id}}
|
||||||
{{/load}}
|
{{/load}}
|
||||||
|
|
@ -24,9 +25,3 @@
|
||||||
status="managed"
|
status="managed"
|
||||||
}}
|
}}
|
||||||
{{/if}}
|
{{/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
|
@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 *}}
|
{{* supprimer le doc de liaison entre les lignes *}}
|
||||||
{{#load type="cession_link"
|
{{#load type="cession_link"
|
||||||
where="$$.immo_doc_id = :immo_doc_id AND $$.cession_line_id = :cession_line_id"
|
where="$$.immo_doc_id = :immo_doc_id AND $$.cession_line_id = :cession_line_id"
|
||||||
:immo_doc_id=$_GET.immo_doc_id|intval
|
:immo_doc_id=$immo_doc_id|intval
|
||||||
:cession_line_id = $_GET.cession_line_id|intval
|
:cession_line_id = $cession_line_id|intval
|
||||||
}}
|
}}
|
||||||
{{:delete id=$id}}
|
{{:delete id=$id}}
|
||||||
{{/load}}
|
{{/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
|
@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 *}}
|
{{* supprimer le doc de liaison entre les lignes *}}
|
||||||
{{#load type="exit_link"
|
{{#load type="exit_link"
|
||||||
where="$$.immo_doc_id = :immo_doc_id AND $$.exit_line_id = :exit_line_id"
|
where="$$.immo_doc_id = :immo_doc_id AND $$.exit_line_id = :exit_line_id"
|
||||||
:immo_doc_id=$_GET.immo_doc_id|intval
|
:immo_doc_id=$immo_doc_id|intval
|
||||||
:exit_line_id = $_GET.exit_line_id|intval
|
:exit_line_id = $exit_line_id|intval
|
||||||
}}
|
}}
|
||||||
{{:delete id=$id}}
|
{{:delete id=$id}}
|
||||||
{{/load}}
|
{{/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}}
|
{{:error message=$message}}
|
||||||
{{/if}}
|
{{/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 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 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}}
|
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
||||||
|
|
@ -169,6 +187,7 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $linked_immos != null}}
|
{{if $linked_immos != null}}
|
||||||
|
<form method="post" action="">
|
||||||
<table class="list">
|
<table class="list">
|
||||||
<thead>
|
<thead>
|
||||||
<th class="num">N°</th>
|
<th class="num">N°</th>
|
||||||
|
|
@ -187,13 +206,15 @@
|
||||||
<td class="money">{{"%f"|math:$line.amount|money_currency_html:false|raw}}</td>
|
<td class="money">{{"%f"|math:$line.amount|money_currency_html:false|raw}}</td>
|
||||||
<td class="actions">
|
<td class="actions">
|
||||||
{{if ! $created_amort}}
|
{{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"}}
|
{{:button type="submit" name="detach_credit" label="Détacher" shape="minus" value=$line.credit_line_id}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<input type="hidden" id="immo_doc_id" name="immo_doc_id" value="{{$_GET.immo_doc_id}}">
|
||||||
|
</form>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<h3 class="ruler">Amortissements</h3>
|
<h3 class="ruler">Amortissements</h3>
|
||||||
|
|
@ -218,6 +239,7 @@
|
||||||
|
|
||||||
{{if $linked_amort != null}}
|
{{if $linked_amort != null}}
|
||||||
<section class="amortissement">
|
<section class="amortissement">
|
||||||
|
<form method="post" action="">
|
||||||
<table class="list">
|
<table class="list">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -252,13 +274,15 @@
|
||||||
<td>{{$line.account_label}}</td>
|
<td>{{$line.account_label}}</td>
|
||||||
<td class="actions">
|
<td class="actions">
|
||||||
{{if ! $created_amort}}
|
{{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"}}
|
{{:button type="submit" name="detach_amort" label="Détacher" shape="minus" value=$line.line_id}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<input type="hidden" id="immo_doc_id" name="immo_doc_id" value="{{$_GET.immo_doc_id}}">
|
||||||
|
</form>
|
||||||
</section>
|
</section>
|
||||||
{{/if}}
|
{{/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}}
|
{{:error message=$message}}
|
||||||
{{/if}}
|
{{/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}}
|
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
||||||
{{if $label_immo|strpos:$ligne_immo.line_label === false}}
|
{{if $label_immo|strpos:$ligne_immo.line_label === false}}
|
||||||
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
||||||
|
|
@ -139,6 +148,8 @@
|
||||||
<p class="block confirm">{{$msg}}</p>
|
<p class="block confirm">{{$msg}}</p>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{:form_errors}}
|
||||||
|
|
||||||
<div class="informations">
|
<div class="informations">
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>Immobilisation</dt>
|
<dt>Immobilisation</dt>
|
||||||
|
|
@ -173,6 +184,7 @@
|
||||||
|
|
||||||
<h3 class="ruler">Écritures d'avoir attachées à l'immobilisation</h3>
|
<h3 class="ruler">Écritures d'avoir attachées à l'immobilisation</h3>
|
||||||
{{if $linked_immos != null}}
|
{{if $linked_immos != null}}
|
||||||
|
<form method="post" action="">
|
||||||
<table class="list">
|
<table class="list">
|
||||||
<thead>
|
<thead>
|
||||||
<td class="num">N°</td>
|
<td class="num">N°</td>
|
||||||
|
|
@ -195,12 +207,14 @@
|
||||||
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
||||||
<td>{{$line.account_label}}</td>
|
<td>{{$line.account_label}}</td>
|
||||||
<td class="actions">
|
<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"}}
|
{{:button type="submit" name="detach_credit" label="Détacher" shape="minus" value=$line.credit_line_id}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<input type="hidden" id="immo_doc_id" name="immo_doc_id" value="{{$_GET.immo_doc_id}}">
|
||||||
|
</form>
|
||||||
{{elseif $credit_lines}}
|
{{elseif $credit_lines}}
|
||||||
<p class="block alert">
|
<p class="block alert">
|
||||||
Vous pouvez attacher une ou plusieurs écritures d'avoir à votre immobilisation
|
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}}
|
{{:redirect to="exit_step3.html?immo_doc_id=%s&from=%s"|args:$_GET.immo_doc_id:$_GET.from}}
|
||||||
{{/form}}
|
{{/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}}
|
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
||||||
{{if $label_immo|strpos:$ligne_immo.line_label === false}}
|
{{if $label_immo|strpos:$ligne_immo.line_label === false}}
|
||||||
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
||||||
|
|
@ -139,6 +148,7 @@
|
||||||
|
|
||||||
<h3 class="ruler">Écritures d'amortissement attachées à l'immobilisation</h3>
|
<h3 class="ruler">Écritures d'amortissement attachées à l'immobilisation</h3>
|
||||||
{{if $linked_amort != null}}
|
{{if $linked_amort != null}}
|
||||||
|
<form method="post" action="">
|
||||||
<table class="list">
|
<table class="list">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -173,12 +183,14 @@
|
||||||
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
||||||
<td>{{$line.account_label}}</td>
|
<td>{{$line.account_label}}</td>
|
||||||
<td class="actions">
|
<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"}}
|
{{:button type="submit" name="detach_amort" label="Détacher" shape="minus" value=$line.line_id}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<input type="hidden" id="immo_doc_id" name="immo_doc_id" value="{{$_GET.immo_doc_id}}">
|
||||||
|
</form>
|
||||||
{{elseif $free_amort_lines}}
|
{{elseif $free_amort_lines}}
|
||||||
<p class="block alert">
|
<p class="block alert">
|
||||||
Vous pouvez attacher une ou plusieurs écritures d'amortissement à l'immobilisation
|
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}}
|
{{:redirect to="exit_step4.html?immo_doc_id=%s&from=%s"|args:$_GET.immo_doc_id:$_GET.from}}
|
||||||
{{/form}}
|
{{/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}}
|
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
||||||
{{if $label_immo|strpos:$ligne_immo.line_label === false}}
|
{{if $label_immo|strpos:$ligne_immo.line_label === false}}
|
||||||
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
||||||
|
|
@ -94,6 +103,7 @@
|
||||||
{{/select}}
|
{{/select}}
|
||||||
|
|
||||||
{{:admin_header title="Immobilisation sortie du bilan" custom_css="./style.css" current="module_amortization"}}
|
{{:admin_header title="Immobilisation sortie du bilan" custom_css="./style.css" current="module_amortization"}}
|
||||||
|
|
||||||
{{if $_GET.from == "exit"}}
|
{{if $_GET.from == "exit"}}
|
||||||
{{:assign current="other"}}
|
{{:assign current="other"}}
|
||||||
{{else}}
|
{{else}}
|
||||||
|
|
@ -109,6 +119,8 @@
|
||||||
<p class="block confirm">{{$msg}}</p>
|
<p class="block confirm">{{$msg}}</p>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{:form_errors}}
|
||||||
|
|
||||||
<div class="informations">
|
<div class="informations">
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>Immobilisation</dt>
|
<dt>Immobilisation</dt>
|
||||||
|
|
@ -147,6 +159,7 @@
|
||||||
|
|
||||||
<h3 class="ruler">Écriture de cession attachée à l'immobilisation</h3>
|
<h3 class="ruler">Écriture de cession attachée à l'immobilisation</h3>
|
||||||
{{if $linked_cessions != null}}
|
{{if $linked_cessions != null}}
|
||||||
|
<form method="post" action="">
|
||||||
<table class="list">
|
<table class="list">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -181,12 +194,14 @@
|
||||||
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
||||||
<td>{{$line.account_label}}</td>
|
<td>{{$line.account_label}}</td>
|
||||||
<td class="actions">
|
<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"}}
|
{{:button type="submit" name="detach_cession" label="Détacher" shape="minus" value=$line.line_id}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<input type="hidden" id="immo_doc_id" name="immo_doc_id" value="{{$_GET.immo_doc_id}}">
|
||||||
|
</form>
|
||||||
{{elseif $free_cessions}}
|
{{elseif $free_cessions}}
|
||||||
<p class="block alert">
|
<p class="block alert">
|
||||||
Vous pouvez attacher une écriture de cession à l'immobilisation
|
Vous pouvez attacher une écriture de cession à l'immobilisation
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@
|
||||||
{{:assign exit_amort_display=$exit_amort|money_currency:false|replace:" ":" "}}
|
{{:assign exit_amort_display=$exit_amort|money_currency:false|replace:" ":" "}}
|
||||||
{{:assign total_amort_display=$total_amort|money_currency:false|replace:" ":" "}}
|
{{:assign total_amort_display=$total_amort|money_currency:false|replace:" ":" "}}
|
||||||
{{:assign erreur=1}}
|
{{: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}}
|
||||||
|
|
||||||
{{if $exit_line.amount != $solde}}
|
{{if $exit_line.amount != $solde}}
|
||||||
|
|
@ -224,6 +224,15 @@
|
||||||
{{:redirect to="index.html?type_immo=other"}}
|
{{:redirect to="index.html?type_immo=other"}}
|
||||||
{{/form}}
|
{{/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"}}
|
{{:admin_header title="Immobilisation sortie du bilan" custom_css="./style.css" current="module_amortization"}}
|
||||||
{{if $_GET.from == "exit"}}
|
{{if $_GET.from == "exit"}}
|
||||||
{{:assign current="other"}}
|
{{:assign current="other"}}
|
||||||
|
|
@ -272,7 +281,7 @@
|
||||||
{{if $erreur == 1}}
|
{{if $erreur == 1}}
|
||||||
Vérifiez si vous avez correctement attaché les écritures d'amortissement.
|
Vérifiez si vous avez correctement attaché les écritures d'amortissement.
|
||||||
{{elseif $erreur == 2}}
|
{{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}}
|
{{/if}}
|
||||||
</p>
|
</p>
|
||||||
<table class="list error">
|
<table class="list error">
|
||||||
|
|
@ -313,6 +322,7 @@
|
||||||
<h3 class="ruler">Écriture de sortie de bilan attachée à l'immobilisation</h3>
|
<h3 class="ruler">Écriture de sortie de bilan attachée à l'immobilisation</h3>
|
||||||
{{if $exit_line != null}}
|
{{if $exit_line != null}}
|
||||||
{{:assign exit_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$exit_line.trans_id}}
|
{{:assign exit_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$exit_line.trans_id}}
|
||||||
|
<form method="post" action="">
|
||||||
<table class="list">
|
<table class="list">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -340,60 +350,27 @@
|
||||||
<td><a href="{{$compte_url}}">{{$exit_line.account_code}}</a></td>
|
<td><a href="{{$compte_url}}">{{$exit_line.account_code}}</a></td>
|
||||||
<td>{{$exit_line.account_label}}</td>
|
<td>{{$exit_line.account_label}}</td>
|
||||||
<td class="actions">
|
<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"}}
|
{{if ! $erreur}}
|
||||||
|
{{:button type="submit" name="detach_exit" label="Détacher" shape="minus" value=$exit_line.line_id}}
|
||||||
|
{{/if}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<input type="hidden" id="immo_doc_id" name="immo_doc_id" value="{{$_GET.immo_doc_id}}">
|
||||||
|
</form>
|
||||||
{{elseif $exit_lines}}
|
{{elseif $exit_lines}}
|
||||||
<p class="block alert">
|
<p class="block alert">
|
||||||
Vous pouvez attacher une écriture de sortie de bilan à l'immobilisation
|
Vous pouvez attacher une écriture de sortie de bilan à l'immobilisation
|
||||||
</p>
|
</p>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $exit_lines}}
|
{{if $exit_lines == null && $exit_line == null}}
|
||||||
{{*
|
|
||||||
<h3 class="ruler">Écritures non rattachées</h3>
|
|
||||||
<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>
|
|
||||||
</table>
|
|
||||||
*}}
|
|
||||||
{{elseif $exit_line == null}}
|
|
||||||
<p class="block error">Aucune écriture de sortie de bilan avec un
|
<p class="block error">Aucune écriture de sortie de bilan avec un
|
||||||
montant de {{$solde|money_currency_html:false|raw}} au crédit du
|
montant de {{$solde|money_currency_html:false|raw}} au crédit du
|
||||||
compte {{$ligne_immo.account_code}} — {{$ligne_immo.account_label}} ;
|
compte {{$ligne_immo.account_code}} — {{$ligne_immo.account_label}} ;
|
||||||
<br />
|
<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 />
|
<br />
|
||||||
Si vous avez supprimé l'écriture de sortie de bilan, il faut
|
Si vous avez supprimé l'écriture de sortie de bilan, il faut
|
||||||
la recréer avant de pouvoir classer cette immobilisation
|
la recréer avant de pouvoir classer cette immobilisation
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,16 @@
|
||||||
{{if $message != null}}
|
{{if $message != null}}
|
||||||
{{:error message=$message}}
|
{{:error message=$message}}
|
||||||
{{/if}}
|
{{/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 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 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}}
|
{{: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"}}
|
{{:admin_header title="Écritures de cession du compte d'immobilisation" custom_css="./style.css" current="module_amortization"}}
|
||||||
|
|
||||||
|
{{:form_errors}}
|
||||||
|
|
||||||
<div class="informations">
|
<div class="informations">
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>Immobilisation</dt>
|
<dt>Immobilisation</dt>
|
||||||
|
|
@ -74,6 +86,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{if $free_cessions}}
|
{{if $free_cessions}}
|
||||||
|
<form method="post" action="">
|
||||||
<table class="list">
|
<table class="list">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -108,11 +121,13 @@
|
||||||
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
||||||
<td>{{$line.account_label}}</td>
|
<td>{{$line.account_label}}</td>
|
||||||
<td class="actions">
|
<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"}}
|
{{:button type="submit" name="attach_cession" label="Attacher" shape="plus" value=$line.line_id}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</tbody>
|
</tbody>
|
||||||
<p class="help">Sélectionner une écriture de cession pour l'associer à l'immobilisation</p>
|
<p class="help">Sélectionner une écriture de cession pour l'associer à l'immobilisation</p>
|
||||||
</table>
|
</table>
|
||||||
|
<input type="hidden" id="immo_doc_id" name="immo_doc_id" value="{{$_GET.immo_doc_id}}">
|
||||||
|
</form>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,16 @@
|
||||||
{{if $message != null}}
|
{{if $message != null}}
|
||||||
{{:error message=$message}}
|
{{:error message=$message}}
|
||||||
{{/if}}
|
{{/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 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 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}}
|
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
||||||
|
|
@ -58,7 +68,9 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/select}}
|
{{/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">
|
<div class="informations">
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
|
|
@ -72,6 +84,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{if $exit_lines}}
|
{{if $exit_lines}}
|
||||||
|
<form method="post" action="">
|
||||||
<table class="list">
|
<table class="list">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -98,11 +111,13 @@
|
||||||
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
||||||
<td>{{$line.account_label}}</td>
|
<td>{{$line.account_label}}</td>
|
||||||
<td class="actions">
|
<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"}}
|
{{:button type="submit" name="attach_exit" label="Attacher" shape="plus" value=$line.credit_line_id}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</tbody>
|
</tbody>
|
||||||
<p class="help">Sélectionner une écriture de sortie de bilan pour l'associer à l'immobilisation</p>
|
<p class="help">Sélectionner une écriture de sortie de bilan pour l'associer à l'immobilisation</p>
|
||||||
</table>
|
</table>
|
||||||
|
<input type="hidden" id="immo_doc_id" name="immo_doc_id" value="{{$_GET.immo_doc_id}}">
|
||||||
|
</form>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue