Réorganisation sortie bilan (onglets) + contrôle cohérence montant
This commit is contained in:
parent
9e620c3efb
commit
24707afd31
17 changed files with 327 additions and 173 deletions
|
|
@ -12,23 +12,6 @@
|
|||
{{:error message=$message}}
|
||||
{{/if}}
|
||||
|
||||
{{#form on="backward"}}
|
||||
{{:redirect to="exit_step3.html?immo_doc_id=%s&from=%s"|args:$_GET.immo_doc_id:$_GET.from}}
|
||||
{{/form}}
|
||||
|
||||
{{#form on="validate"}}
|
||||
{{* mettre à jour l'état de l'immobilisation *}}
|
||||
{{:save
|
||||
key=$info_immo.key
|
||||
status="archived"
|
||||
}}
|
||||
{{:redirect to="index.html?type_immo=archived"}}
|
||||
{{/form}}
|
||||
|
||||
{{#form on="finish"}}
|
||||
{{:redirect to="index.html?type_immo=other"}}
|
||||
{{/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}}
|
||||
|
|
@ -60,6 +43,7 @@
|
|||
{{else}}
|
||||
{{:assign montant_cession=$amount}}
|
||||
{{/if}}
|
||||
{{:assign cession_doc_id=$id}}
|
||||
{{/load}}
|
||||
|
||||
{{* chercher une écriture de sortie de bilan associée *}}
|
||||
|
|
@ -117,6 +101,13 @@
|
|||
{{: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}}
|
||||
{{/if}}
|
||||
|
||||
{{if $exit_line.amount != $solde}}
|
||||
{{:assign erreur=2}}
|
||||
{{:assign exit_line_amount=$exit_line.amount|money_currency:false|replace:" ":" "}}
|
||||
{{:assign solde_immo=$solde|money_currency:false|replace:" ":" "}}
|
||||
{{:assign message="Le montant de de l'immobilisation dans l'écriture de sortie (%s) est différent du montant à amortir (%s)."|args:$exit_line_amount:$solde_immo}}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{*
|
||||
|
|
@ -214,13 +205,32 @@
|
|||
{{/if}}
|
||||
{{/select}}
|
||||
|
||||
{{#form on="backward"}}
|
||||
{{:redirect to="exit_step3.html?immo_doc_id=%s&from=%s"|args:$_GET.immo_doc_id:$_GET.from}}
|
||||
{{/form}}
|
||||
|
||||
{{#form on="validate"}}
|
||||
{{* mettre à jour l'état de l'immobilisation *}}
|
||||
{{:save
|
||||
key=$info_immo.key
|
||||
status="archived"
|
||||
}}
|
||||
{{:redirect to="index.html?type_immo=archived"}}
|
||||
{{/form}}
|
||||
|
||||
{{#form on="cancel"}}
|
||||
{{* supprimer les docs de cession et de sortie *}}
|
||||
{{if $cession_doc_id != null}}{{:delete id=$cession_doc_id}}{{/if}}
|
||||
{{if $exit_info != null}}{{:delete id=$exit_info.id}}{{/if}}
|
||||
{{:redirect to="index.html?type_immo=other"}}
|
||||
{{/form}}
|
||||
|
||||
{{:admin_header title="Immobilisation sortie du bilan" custom_css="./style.css" current="module_amortization"}}
|
||||
{{if $_GET.from == "exit"}}
|
||||
{{:assign current="other"}}
|
||||
{{else}}
|
||||
{{:assign current="archived"}}
|
||||
{{/if}}
|
||||
{{*:include file="_nav.html" current=$current subcurrent="exit"*}}
|
||||
|
||||
{{if $_GET.ok}}
|
||||
{{if $_GET.msg|match:"attach_exit"}}
|
||||
|
|
@ -259,7 +269,13 @@
|
|||
</div>
|
||||
|
||||
{{if $erreur}}
|
||||
<p class="block error">{{$message}}<br />Vérifiez si vous avez correctement attaché les écritures d'amortissement.</p>
|
||||
<p class="block error">{{$message}}<br />
|
||||
{{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.
|
||||
{{/if}}
|
||||
</p>
|
||||
<table class="list error">
|
||||
<caption>Détails de l'écriture de sortie de bilan</caption>
|
||||
<thead class="error">
|
||||
|
|
@ -286,6 +302,15 @@
|
|||
</table>
|
||||
{{/if}}
|
||||
|
||||
{{if $exit_lines}}
|
||||
<nav class="actions">
|
||||
{{:linkbutton
|
||||
label="Attacher une écriture sortie de bilan"
|
||||
href="list_exit.html?immo_doc_id=%s&filter=true&from=%s"|args:$_GET.immo_doc_id:$_GET.from shape="link"
|
||||
target="_dialog"}}
|
||||
</nav>
|
||||
{{/if}}
|
||||
|
||||
<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}}
|
||||
|
|
@ -328,6 +353,7 @@
|
|||
{{/if}}
|
||||
|
||||
{{if $exit_lines}}
|
||||
{{*
|
||||
<h3 class="ruler">Écritures non rattachées</h3>
|
||||
<table class="list">
|
||||
<thead>
|
||||
|
|
@ -362,6 +388,7 @@
|
|||
{{/foreach}}
|
||||
</tbody>
|
||||
</table>
|
||||
*}}
|
||||
{{elseif $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
|
||||
|
|
@ -385,7 +412,7 @@
|
|||
{{if $exit_line && ! $erreur}}
|
||||
{{:button type="submit" name="validate" label="Terminer" shape="check" class="main"}}
|
||||
{{else}}
|
||||
{{:button type="submit" name="finish" label="Annuler" shape="delete" class="main"}}
|
||||
{{:button type="submit" name="cancel" label="Annuler" shape="delete" class="main"}}
|
||||
{{/if}}
|
||||
</p>
|
||||
</form>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue