Compare commits
7 commits
a15254f372
...
c7f7ead2a5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c7f7ead2a5 | ||
|
|
ae63f13776 | ||
|
|
e43c2ee3c0 | ||
|
|
769123236c | ||
|
|
b3aeb9b09c | ||
|
|
023a2b81bd | ||
|
|
c852fecb69 |
18 changed files with 207 additions and 132 deletions
|
|
@ -34,7 +34,6 @@
|
||||||
<th class="nombre">Montant</th>
|
<th class="nombre">Montant</th>
|
||||||
<th>N° compte</th>
|
<th>N° compte</th>
|
||||||
<th>Compte</th>
|
<th>Compte</th>
|
||||||
<th>Projet</th>
|
|
||||||
<th class="actions"></th>
|
<th class="actions"></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
@ -54,13 +53,11 @@
|
||||||
line.debit AS debit,
|
line.debit AS debit,
|
||||||
account.id as account_id,
|
account.id as account_id,
|
||||||
account.code as account_code,
|
account.code as account_code,
|
||||||
account.label as account_label,
|
account.label as account_label
|
||||||
project.label as project_label
|
|
||||||
FROM acc_transactions AS trans
|
FROM acc_transactions AS trans
|
||||||
INNER JOIN acc_transactions_lines AS line ON line.id_transaction = trans.id
|
INNER JOIN acc_transactions_lines AS line ON line.id_transaction = trans.id
|
||||||
INNER JOIN acc_accounts AS account ON line.id_account = account.id
|
INNER JOIN acc_accounts AS account ON line.id_account = account.id
|
||||||
INNER JOIN acc_years AS years ON trans.id_year = years.id
|
INNER JOIN acc_years AS years ON trans.id_year = years.id
|
||||||
LEFT JOIN acc_projects AS project ON line.id_project = project.id
|
|
||||||
WHERE !condition
|
WHERE !condition
|
||||||
ORDER BY trans.date DESC;
|
ORDER BY trans.date DESC;
|
||||||
!condition=$condition
|
!condition=$condition
|
||||||
|
|
@ -155,8 +152,8 @@
|
||||||
<td class="money">{{"%f"|math:$montant_immo|money_html:false|raw}}</td>
|
<td class="money">{{"%f"|math:$montant_immo|money_html:false|raw}}</td>
|
||||||
<td><a href="{{$compte_url}}">{{$account_code}}</a></td>
|
<td><a href="{{$compte_url}}">{{$account_code}}</a></td>
|
||||||
<td>{{$account_label}}</td>
|
<td>{{$account_label}}</td>
|
||||||
<td>{{$project_label}}</td>
|
|
||||||
<td class="actions">
|
<td class="actions">
|
||||||
|
{{:linkbutton label="Modifier" href="exit_step3.html?immo_doc_id=%s"|args:$info_immo.id shape="edit"}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/select}}
|
{{/select}}
|
||||||
|
|
|
||||||
|
|
@ -3,8 +3,8 @@
|
||||||
{{*
|
{{*
|
||||||
chercher des écritures liées à l'immo paramètre au crédit du même compte
|
chercher des écritures liées à l'immo paramètre au crédit du même compte
|
||||||
@param immo_doc_id : id du doc associé à l'immobilisation
|
@param immo_doc_id : id du doc associé à l'immobilisation
|
||||||
@param linked_immos : liste des écritures liées
|
@result linked_immos : liste des écritures liées
|
||||||
@param total_credits : montant total des écritures
|
@result total_credits : montant total des écritures
|
||||||
*}}
|
*}}
|
||||||
{{:assign linked_immos=null}}
|
{{:assign linked_immos=null}}
|
||||||
{{:assign total_credits=0}}
|
{{:assign total_credits=0}}
|
||||||
|
|
@ -14,14 +14,19 @@
|
||||||
line.id as line_id,
|
line.id as line_id,
|
||||||
trans.id as trans_id,
|
trans.id as trans_id,
|
||||||
trans.label,
|
trans.label,
|
||||||
trans.date
|
trans.date,
|
||||||
|
trans.id_year as year,
|
||||||
|
account.id as account_id,
|
||||||
|
account.code as account_code,
|
||||||
|
account.label as account_label
|
||||||
FROM acc_transactions_lines AS line
|
FROM acc_transactions_lines AS line
|
||||||
INNER JOIN acc_transactions AS trans ON line.id_transaction = trans.id
|
INNER JOIN acc_transactions AS trans ON line.id_transaction = trans.id
|
||||||
|
INNER join acc_accounts AS account on line.id_account = account.id
|
||||||
WHERE line.id = :credit_line_id;
|
WHERE line.id = :credit_line_id;
|
||||||
:credit_line_id=$credit_line_id
|
:credit_line_id=$credit_line_id
|
||||||
}}
|
}}
|
||||||
{{:assign credit=$credit}}
|
{{:assign credit=$credit}}
|
||||||
{{:assign var="linked_immos." doc=$id trans_id=$trans_id credit_line_id=$line_id label=$label amount=$credit date=$date}}
|
{{:assign var="linked_immos." doc=$id trans_id=$trans_id credit_line_id=$line_id label=$label amount=$credit date=$date account_id=$account_id account_code=$account_code account_label=$account_label year=$year}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
{{if $amount == null}}
|
{{if $amount == null}}
|
||||||
{{:assign total_credits="%d+%d"|math:$total_credits:$credit}}
|
{{:assign total_credits="%d+%d"|math:$total_credits:$credit}}
|
||||||
|
|
|
||||||
|
|
@ -172,8 +172,8 @@
|
||||||
label="Paramètres"
|
label="Paramètres"
|
||||||
href="add_infos.html?immo_line_id=%s"|args:$immo_line_id
|
href="add_infos.html?immo_line_id=%s"|args:$immo_line_id
|
||||||
shape="settings"
|
shape="settings"
|
||||||
|
target="_dialog"
|
||||||
}}
|
}}
|
||||||
{{* target="_dialog"*}}
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,22 @@
|
||||||
{{* -*- brindille -*- *}}
|
{{* -*- brindille -*- *}}
|
||||||
|
|
||||||
{{*
|
{{*
|
||||||
|
Classer une immobilisation non prise en charge
|
||||||
@param immo_line_id
|
@param immo_line_id
|
||||||
|
|
||||||
TODO ? :
|
|
||||||
- séparer les cas des immo simples et complexes (BOI)
|
|
||||||
par exemple pour la durée d'amort par défaut {{:input ...}}
|
|
||||||
- prise en charge immo => param = immo_line_id
|
|
||||||
- modif param immo => param = immo_doc_id
|
|
||||||
*}}
|
*}}
|
||||||
|
|
||||||
{{* cas de la prise en charge *}}
|
|
||||||
{{* données de l'immobilisation *}}
|
{{* données de l'immobilisation *}}
|
||||||
{{:assign montant_affecte=0}}
|
{{:assign montant_affecte=0}}
|
||||||
{{#load type="immo" where="$$.line = :line_id" :line_id=$_GET.immo_line_id|intval assign="info_immo"}}
|
{{#load type="immo" where="$$.line = :line_id" :line_id=$_GET.immo_line_id|intval assign="info_immo"}}
|
||||||
{{:assign montant_affecte="%d+%d"|math:$montant_affecte:$amount}}
|
{{:assign montant_affecte="%d+%d"|math:$montant_affecte:$amount}}
|
||||||
{{/load}}
|
{{/load}}
|
||||||
|
{{if $info_immo != null}}
|
||||||
|
{{:assign date_defaut=$info_immo.date}}
|
||||||
|
{{:assign duree_defaut=$info_immo.duration}}
|
||||||
|
{{:assign choix_defaut=$info_immo.status}}
|
||||||
|
{{else}}
|
||||||
|
{{:assign duree_defaut=null}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{#select
|
{{#select
|
||||||
trans.id as immo_trans_id,
|
trans.id as immo_trans_id,
|
||||||
|
|
@ -59,7 +60,7 @@
|
||||||
type="immo"
|
type="immo"
|
||||||
line=$_GET.immo_line_id|intval
|
line=$_GET.immo_line_id|intval
|
||||||
duration=0
|
duration=0
|
||||||
status="archived"
|
status="managed"
|
||||||
assign_new_id="immo_doc_id"
|
assign_new_id="immo_doc_id"
|
||||||
}}
|
}}
|
||||||
{{:redirect force="exit_step1.html?immo_doc_id=%s"|args:$immo_doc_id}}
|
{{:redirect force="exit_step1.html?immo_doc_id=%s"|args:$immo_doc_id}}
|
||||||
|
|
@ -139,7 +140,7 @@
|
||||||
status=$status
|
status=$status
|
||||||
}}
|
}}
|
||||||
|
|
||||||
{{if $_POST.amortir}}
|
{{if $_POST.classify == "managed"}}
|
||||||
{{:assign type_immo="managed"}}
|
{{:assign type_immo="managed"}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:assign type_immo="other"}}
|
{{:assign type_immo="other"}}
|
||||||
|
|
@ -219,6 +220,7 @@ function toggleInputs(event) {
|
||||||
const managed = classement_immo.querySelector('input[type=radio][value=managed]');
|
const managed = classement_immo.querySelector('input[type=radio][value=managed]');
|
||||||
if (managed.checked) {
|
if (managed.checked) {
|
||||||
g.toggle('.masquable', true);
|
g.toggle('.masquable', true);
|
||||||
|
document.getElementById('f_duree').focus();
|
||||||
} else {
|
} else {
|
||||||
g.toggle('.masquable', false);
|
g.toggle('.masquable', false);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{* déduire le montant des écritures liées à l'immo courante au crédit du même compte *}}
|
{{* déduire le montant des écritures liées à l'immo courante au crédit du même compte *}}
|
||||||
{{:include file="_get_credit_lines.html" immo_doc_id=$_GET.immo_doc_id keep="total_credits"}}
|
{{:include file="_get_credit_lines.html" immo_doc_id=$_GET.immo_doc_id keep="linked_immos, total_credits"}}
|
||||||
{{:assign solde="%d-%d"|math:$ligne_immo.amount:$total_credits}}
|
{{:assign solde="%d-%d"|math:$ligne_immo.amount:$total_credits}}
|
||||||
|
|
||||||
{{if $info_immo.status == "amortized"}}
|
{{if $info_immo.status == "amortized"}}
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
{{:assign valeur_residuelle="%d-%d"|math:$valeur_residuelle:$total_amort}}
|
{{:assign valeur_residuelle="%d-%d"|math:$valeur_residuelle:$total_amort}}
|
||||||
|
|
||||||
{{if $valeur_residuelle > 0}}
|
{{if $valeur_residuelle > 0}}
|
||||||
{{* lister les amortissements non rattachés à une immo *}}
|
{{* lister les amortissements non attachés à une immo *}}
|
||||||
{{:include file="./_get_free_amort.html" filter_condition="1" keep="free_amort_lines"}}
|
{{:include file="./_get_free_amort.html" filter_condition="1" keep="free_amort_lines"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
@ -69,10 +69,14 @@
|
||||||
}}
|
}}
|
||||||
|
|
||||||
{{if $_GET.ok}}
|
{{if $_GET.ok}}
|
||||||
{{if $_GET.msg|match:"attach"}}
|
{{if $_GET.msg|match:"attach_amort"}}
|
||||||
{{:assign msg="Attachement amortissement %s effectué"|args:$_GET.trans_id}}
|
{{:assign msg="Attachement amortissement effectué"}}
|
||||||
{{elseif $_GET.msg|match:"detach"}}
|
{{elseif $_GET.msg|match:"detach_amort"}}
|
||||||
{{:assign msg="Détachement amortissement %s affectué"|args:$_GET.trans_id}}
|
{{:assign msg="Détachement amortissement affectué"}}
|
||||||
|
{{elseif $_GET.msg|match:"attach_avoir"}}
|
||||||
|
{{:assign msg="Attachement avoir affectué"}}
|
||||||
|
{{elseif $_GET.msg|match:"detach_avoir"}}
|
||||||
|
{{:assign msg="Détachement avoir affectué"}}
|
||||||
{{elseif $_GET.msg|match:"amortissement"}}
|
{{elseif $_GET.msg|match:"amortissement"}}
|
||||||
{{:assign msg="Amortissement enregistré"}}
|
{{:assign msg="Amortissement enregistré"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
@ -104,6 +108,49 @@
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<nav style="margin-bottom: 1em;">
|
||||||
|
<aside> {{* class="right">*}}
|
||||||
|
{{if $free_amort_lines}}
|
||||||
|
{{:linkbutton
|
||||||
|
label="Attacher un amortissement"
|
||||||
|
title="Attacher un amortissement existant"
|
||||||
|
href="other_amortizations.html?immo_doc_id=%s"|args:$_GET.immo_doc_id
|
||||||
|
shape="link"
|
||||||
|
target="_dialog"}}
|
||||||
|
{{/if}}
|
||||||
|
{{:linkbutton
|
||||||
|
label="Enregistrer un amortissement"
|
||||||
|
title="Enregistrer un nouvel amortissement"
|
||||||
|
href="save_amort.html?immo_doc_id=%s"|args:$_GET.immo_doc_id target="_dialog"
|
||||||
|
shape="plus"
|
||||||
|
}}
|
||||||
|
</aside>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
{{if $linked_immos != null}}
|
||||||
|
<aside class="right">
|
||||||
|
<table class="list">
|
||||||
|
<caption>Écritures d'avoir liées</caption>
|
||||||
|
<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.label}}</td>
|
||||||
|
<td>{{$line.date|date_short}}</td>
|
||||||
|
<td class="money">{{"%f"|math:$line.amount|money_currency_html:false|raw}}</td>
|
||||||
|
<td>
|
||||||
|
{{if $total_amort == 0}}
|
||||||
|
{{: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>
|
||||||
|
</aside>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
<div class="informations">
|
<div class="informations">
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>Immobilisation</dt>
|
<dt>Immobilisation</dt>
|
||||||
|
|
@ -180,15 +227,17 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</section>
|
</section>
|
||||||
{{else}}
|
|
||||||
<p class="block alert">Aucun amortissement enregistré pour cette immobilisation</p>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $free_amort_lines}}
|
{{if $free_amort_lines}}
|
||||||
<p class="block alert">
|
<p class="block alert">
|
||||||
Il y a des écritures d'amortissement qui ne sont pas rattachées à une immobilisation ! <br />
|
Il y a des écritures d'amortissement qui ne sont pas attachées à une immobilisation ! <br />
|
||||||
Utilisez le bouton « Rattacher un amortissement » pour les afficher ; vous pourrez choisir d'en attacher certaines à cette immobilisation.
|
Utilisez le bouton « Attacher un amortissement » pour les afficher ; vous pourrez choisir d'en attacher certaines à cette immobilisation.
|
||||||
</p>
|
</p>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{if $linked_amort == null}}
|
||||||
|
<p class="block alert">Aucun amortissement enregistré pour cette immobilisation ; utilisez le bouton « Enregistrer un amortissement » pour enregistrer un nouvel amortissement</p>
|
||||||
|
{{/if}}
|
||||||
{{:form_errors}}
|
{{:form_errors}}
|
||||||
{{:admin_footer}}
|
{{:admin_footer}}
|
||||||
|
|
|
||||||
|
|
@ -144,9 +144,9 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $_GET.from == "exit"}}
|
{{if $_GET.from == "exit"}}
|
||||||
{{:redirect to="exit_step2.html?immo_doc_id=%s"|args:$_GET.immo_doc_id}}
|
{{:redirect force="exit_step2.html?immo_doc_id=%s&ok=1&msg=attach_amort"|args:$_GET.immo_doc_id}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:redirect to="amortization.html?immo_doc_id=%s&type_immo=%s&ok=1&msg=attach_amort"|args:$_GET.immo_doc_id:$status}}
|
{{:redirect force="amortization.html?immo_doc_id=%s&type_immo=%s&ok=1&msg=attach_amort"|args:$_GET.immo_doc_id:$status}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/form}}
|
{{/form}}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -125,11 +125,11 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $_GET.from == "exit"}}
|
{{if $_GET.from == "exit"}}
|
||||||
{{:redirect force="exit_step1.html?immo_doc_id=%s"|args:$_GET.immo_doc_id}}
|
{{:redirect force="exit_step1.html?immo_doc_id=%s&ok=1&msg=attach_avoir"|args:$_GET.immo_doc_id}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:redirect to="amortization.html?immo_doc_id=%s&ok=1&msg=attach_avoir"|args:$_GET.immo_doc_id}}
|
{{:redirect force="details_immo.html?immo_doc_id=%s&ok=1&msg=attach_credit"|args:$_GET.immo_doc_id}}
|
||||||
|
{{*:redirect force="amortization.html?immo_doc_id=%s&ok=1&msg=attach_avoir"|args:$_GET.immo_doc_id*}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{*:redirect to="details_immo.html?immo_doc_id=%s&ok=1&msg=attach_credit"|args:$_GET.immo_doc_id*}}
|
|
||||||
{{/form}}
|
{{/form}}
|
||||||
|
|
||||||
{{:admin_header title="Écritures au crédit du compte d'immobilisation" custom_css="./style.css" current="module_amortization"}}
|
{{:admin_header title="Écritures au crédit du compte d'immobilisation" custom_css="./style.css" current="module_amortization"}}
|
||||||
|
|
|
||||||
|
|
@ -20,10 +20,9 @@
|
||||||
{{#select
|
{{#select
|
||||||
trans.id
|
trans.id
|
||||||
FROM acc_transactions_lines AS line
|
FROM acc_transactions_lines AS line
|
||||||
INNER JOIN !table ON $$.credit_line_id = line.id
|
INNER JOIN !table AS credit_link ON $$.credit_line_id = line.id
|
||||||
INNER JOIN acc_transactions AS trans ON line.id_transaction = trans.id
|
INNER JOIN acc_transactions AS trans ON line.id_transaction = trans.id
|
||||||
WHERE $$.type =
|
WHERE $$.type = "credit_link" AND $$.immo_doc_id = :immo_doc_id
|
||||||
"credit_link" AND $$.immo_doc_id = :immo_doc_id
|
|
||||||
;
|
;
|
||||||
!table = $module.table
|
!table = $module.table
|
||||||
:immo_doc_id = $_GET.immo_doc_id|intval
|
:immo_doc_id = $_GET.immo_doc_id|intval
|
||||||
|
|
@ -60,8 +59,7 @@
|
||||||
}}
|
}}
|
||||||
|
|
||||||
{{* supprimer les docs de liaison *}}
|
{{* supprimer les docs de liaison *}}
|
||||||
{{:delete type="immo_link" where="$$.immo_doc_id = :immo_doc_id" :immo_doc_id = $_GET.immo_doc_id|intval}}
|
{{:delete type="credit_link" where="$$.immo_doc_id = :immo_doc_id" :immo_doc_id = $_GET.immo_doc_id|intval}}
|
||||||
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{* supprimer les infos de l'immobilisation *}}
|
{{* supprimer les infos de l'immobilisation *}}
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
}}
|
}}
|
||||||
|
|
||||||
{{if $_GET.from == "exit"}}
|
{{if $_GET.from == "exit"}}
|
||||||
{{:redirect to="exit_step2.html?immo_doc_id=%s"|args:$_GET.immo_doc_id}}
|
{{:redirect force="exit_step2.html?immo_doc_id=%s&ok=1&msg=detach_amort"|args:$_GET.immo_doc_id}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:redirect to="amortization.html?immo_doc_id=%s&ok=1&msg=detach_amort"|args:$_GET.immo_doc_id:}}
|
{{:redirect force="amortization.html?immo_doc_id=%s&ok=1&msg=detach_amort"|args:$_GET.immo_doc_id:}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
|
||||||
|
|
@ -25,8 +25,8 @@
|
||||||
}}
|
}}
|
||||||
|
|
||||||
{{if $_GET.from == "exit"}}
|
{{if $_GET.from == "exit"}}
|
||||||
{{:redirect to="exit_step1.html?immo_doc_id=%s"|args:$_GET.immo_doc_id}}
|
{{:redirect force="exit_step1.html?immo_doc_id=%s&ok=1&msg=detach_avoir"|args:$_GET.immo_doc_id}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:redirect to="amortization.html?immo_doc_id=%s&ok=1&msg=detach_avoir&"|args:$_GET.immo_doc_id}}
|
{{:redirect force="details_immo.html?immo_doc_id=%s&ok=1&msg=detach&"|args:$_GET.immo_doc_id}}
|
||||||
|
{{*:redirect force="amortization.html?immo_doc_id=%s&ok=1&msg=detach_avoir"|args:$_GET.immo_doc_id*}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{*:redirect to="details_immo.html?immo_doc_id=%s&ok=1&msg=detach&"|args:$_GET.immo_doc_id*}}
|
|
||||||
|
|
|
||||||
|
|
@ -31,25 +31,19 @@
|
||||||
|
|
||||||
{{:admin_header title="Détails de l'immobilisation" custom_css="./style.css" current="module_amortization"}}
|
{{:admin_header title="Détails de l'immobilisation" custom_css="./style.css" current="module_amortization"}}
|
||||||
|
|
||||||
{{*
|
|
||||||
{{if ! $dialog}}
|
{{if ! $dialog}}
|
||||||
{{:assign subsubcurrent=null}}
|
{{:assign subsubcurrent=null}}
|
||||||
{{if $total_credits == 0 && $total_amort == 0}}
|
|
||||||
{{:assign subsubcurrent="credit"}}
|
|
||||||
{{/if}}
|
|
||||||
{{if $total_amort == 0}}
|
{{if $total_amort == 0}}
|
||||||
{{:assign subsubcurrent=$subsubcurrent|cat:"-modif"}}
|
{{:assign subsubcurrent="credit"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{:include file="_nav.html" current="index" subcurrent="details" subsubcurrent=$subsubcurrent}}
|
{{:include file="_nav.html" current="index" subcurrent="details" subsubcurrent=$subsubcurrent}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
*}}
|
|
||||||
{{: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}}
|
||||||
|
|
||||||
|
{{*
|
||||||
<nav class="tabs">
|
<nav class="tabs">
|
||||||
<aside>
|
<aside>
|
||||||
{{*if $total_credits == 0*}}
|
|
||||||
{{:linkbutton label="Rattacher une écriture d'avoir" href="link_immo.html?immo_doc_id=%s"|args:$_GET.immo_doc_id shape="link" target="_dialog"}}
|
{{:linkbutton label="Rattacher une écriture d'avoir" href="link_immo.html?immo_doc_id=%s"|args:$_GET.immo_doc_id shape="link" target="_dialog"}}
|
||||||
{{*/if*}}
|
|
||||||
</aside>
|
</aside>
|
||||||
<nav style="margin-bottom: 1em;">
|
<nav style="margin-bottom: 1em;">
|
||||||
{{:linkbutton shape="left" label="Retour à la liste des immobilisations" href="index.html}}
|
{{:linkbutton shape="left" label="Retour à la liste des immobilisations" href="index.html}}
|
||||||
|
|
@ -59,6 +53,7 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</nav>
|
</nav>
|
||||||
</nav>
|
</nav>
|
||||||
|
*}}
|
||||||
|
|
||||||
{{if $_GET.ok}}
|
{{if $_GET.ok}}
|
||||||
{{if $_GET.msg|match:"attach_amort"}}
|
{{if $_GET.msg|match:"attach_amort"}}
|
||||||
|
|
@ -96,7 +91,9 @@
|
||||||
<td>{{$line.date|date_short}}</td>
|
<td>{{$line.date|date_short}}</td>
|
||||||
<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>
|
<td>
|
||||||
|
{{if $total_amort == 0}}
|
||||||
{{: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"}}
|
{{: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>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,8 @@
|
||||||
{{* lister les amortissements liés à l'immobilisation *}}
|
{{* lister les amortissements liés à l'immobilisation *}}
|
||||||
{{:include file="./_get_amort_lines.html" immo_doc_id=$_GET.immo_doc_id keep="linked_amort, total_amort"}}
|
{{:include file="./_get_amort_lines.html" immo_doc_id=$_GET.immo_doc_id keep="linked_amort, total_amort"}}
|
||||||
|
|
||||||
{{* chercher des écritures au crédit du compte de l'immo sans doc associé *}}
|
|
||||||
{{*
|
{{*
|
||||||
|
chercher des écritures au crédit du compte de l'immo sans doc associé
|
||||||
- line.credit < ligne_immo.amount => peut-être un avoir
|
- line.credit < ligne_immo.amount => peut-être un avoir
|
||||||
- line.credit = ligne_immo.amount - avoirs => écriture de sortie du bilan
|
- line.credit = ligne_immo.amount - avoirs => écriture de sortie du bilan
|
||||||
*}}
|
*}}
|
||||||
|
|
@ -51,8 +51,12 @@
|
||||||
acc.code = :acc_code
|
acc.code = :acc_code
|
||||||
AND line.credit > 0
|
AND line.credit > 0
|
||||||
AND credit_line_id NOT IN (
|
AND credit_line_id NOT IN (
|
||||||
SELECT json_extract(link.document, '$.credit_line_id') AS line_id FROM !table as link
|
SELECT json_extract(credit_link.document, '$.credit_line_id') AS line_id FROM !table as credit_link
|
||||||
WHERE json_extract(link.document, '$.type') == "credit_link")
|
WHERE json_extract(credit_link.document, '$.type') == "credit_link"
|
||||||
|
UNION
|
||||||
|
SELECT json_extract(exit_link.document, '$.exit_line_id') AS line_id FROM !table as exit_link
|
||||||
|
WHERE json_extract(exit_link.document, '$.type') == "exit_link"
|
||||||
|
)
|
||||||
;
|
;
|
||||||
:acc_code=$ligne_immo.account_code
|
:acc_code=$ligne_immo.account_code
|
||||||
!table =$module.table
|
!table =$module.table
|
||||||
|
|
@ -60,8 +64,6 @@
|
||||||
}}
|
}}
|
||||||
{{if $credit_line.amount < $solde}}
|
{{if $credit_line.amount < $solde}}
|
||||||
{{:assign var="credit_lines." value=$credit_line}}
|
{{:assign var="credit_lines." value=$credit_line}}
|
||||||
{{elseif $credit_line.amount == $solde}}
|
|
||||||
{{:assign var="exit_lines." value=$credit_line}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
|
|
||||||
|
|
@ -122,6 +124,15 @@
|
||||||
|
|
||||||
{{: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.ok}}
|
||||||
|
{{if $_GET.msg|match:"attach_avoir"}}
|
||||||
|
{{:assign msg="Écriture d'avoir attachée"}}
|
||||||
|
{{elseif $_GET.msg|match:"detach_avoir"}}
|
||||||
|
{{:assign msg="Écriture d'avoir détachée"}}
|
||||||
|
{{/if}}
|
||||||
|
<p class="block confirm">{{$msg}}</p>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
<div class="informations">
|
<div class="informations">
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>Immobilisation</dt>
|
<dt>Immobilisation</dt>
|
||||||
|
|
@ -147,25 +158,27 @@
|
||||||
|
|
||||||
{{if $linked_immos != null}}
|
{{if $linked_immos != null}}
|
||||||
<h3 class="ruler">Écritures d'avoir attachées à l'immobilisation</h3>
|
<h3 class="ruler">Écritures d'avoir attachées à l'immobilisation</h3>
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{if $linked_immos != null}}
|
|
||||||
<table class="list">
|
<table class="list">
|
||||||
<thead>
|
<thead>
|
||||||
<td class="num">N°</td>
|
<td class="num">N°</td>
|
||||||
<td>Date</td>
|
<td>Date</td>
|
||||||
<td>Libellé</td>
|
<td>Libellé</td>
|
||||||
<td class="nombre">Montant</td>
|
<td class="nombre">Montant</td>
|
||||||
|
<td>N° compte</td>
|
||||||
|
<td>Compte</td>
|
||||||
<td class="actions"></td>
|
<td class="actions"></td>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{{#foreach from=$linked_immos item="line"}}
|
{{#foreach from=$linked_immos item="line"}}
|
||||||
{{:assign url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.trans_id}}
|
{{: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>
|
<tr>
|
||||||
<td class="num"><a href="{{$url}}">#{{$line.trans_id}}</a></td>
|
<td class="num"><a href="{{$url}}">#{{$line.trans_id}}</a></td>
|
||||||
<td>{{$line.date|date_short}}</td>
|
<td>{{$line.date|date_short}}</td>
|
||||||
<td>{{$line.label}}</td>
|
<td>{{$line.label}}</td>
|
||||||
<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><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
||||||
|
<td>{{$line.account_label}}</td>
|
||||||
<td>
|
<td>
|
||||||
{{: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"}}
|
{{: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>
|
</td>
|
||||||
|
|
@ -173,10 +186,14 @@
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{{else}}
|
{{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
|
||||||
</p>
|
</p>
|
||||||
|
{{else}}
|
||||||
|
<p class="block alert">
|
||||||
|
Aucune écriture au crédit du compte d'immobilisation ; vous pouvez passer à la suite
|
||||||
|
</p>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $credit_lines}}
|
{{if $credit_lines}}
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,16 @@
|
||||||
{{* -*- brindille -*- *}}
|
{{* -*- brindille -*- *}}
|
||||||
|
|
||||||
{{*
|
{{*
|
||||||
Associer les différentes écritures à une immo créée avant la mise
|
Associer les différentes écritures à une immo créée et sortie du
|
||||||
en service du module et sortie du bilan
|
bilan avant la mise en service du module
|
||||||
@param immo_doc_id : id du doc associé à l'immobilisation
|
@param immo_doc_id : id du doc associé à l'immobilisation
|
||||||
*}}
|
*}}
|
||||||
|
|
||||||
{{* données de l'immobilisation *}}
|
{{* données de l'immobilisation *}}
|
||||||
{{:include file="_get_immo_data.html" immo_doc_id=$_GET.immo_doc_id keep="ligne_immo, message"}}
|
{{:include file="_get_immo_data.html" immo_doc_id=$_GET.immo_doc_id keep="info_immo, ligne_immo, message"}}
|
||||||
{{if $message != null}}
|
{{if $message != null}}
|
||||||
{{:error message=$message}}
|
{{:error message=$message}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{* voir si un document a été associé à l'immo *}}
|
|
||||||
{{#load id=$ligne_immo.line_id assign="info_immo"}}{{/load}}
|
|
||||||
|
|
||||||
{{#form on="backward"}}
|
{{#form on="backward"}}
|
||||||
{{:redirect to="exit_step1.html?immo_doc_id=%s"|args:$_GET.immo_doc_id}}
|
{{:redirect to="exit_step1.html?immo_doc_id=%s"|args:$_GET.immo_doc_id}}
|
||||||
|
|
@ -37,44 +35,6 @@
|
||||||
{{* lister les amortissements liés à l'immobilisation *}}
|
{{* lister les amortissements liés à l'immobilisation *}}
|
||||||
{{:include file="./_get_amort_lines.html" immo_doc_id=$_GET.immo_doc_id keep="linked_amort, total_amort"}}
|
{{:include file="./_get_amort_lines.html" immo_doc_id=$_GET.immo_doc_id keep="linked_amort, total_amort"}}
|
||||||
|
|
||||||
{{*
|
|
||||||
chercher des écritures au crédit du compte de l'immo sans doc associé
|
|
||||||
- line.credit < ligne_immo.amount => peut-être un avoir
|
|
||||||
- line.credit = ligne_immo.amount - avoirs => écriture de sortie du bilan
|
|
||||||
*}}
|
|
||||||
{{#select
|
|
||||||
trans.id as trans_id,
|
|
||||||
trans.label as trans_label,
|
|
||||||
trans.date as date,
|
|
||||||
trans.id_year as year,
|
|
||||||
line.id as credit_line_id,
|
|
||||||
line.label as line_label,
|
|
||||||
line.credit as amount,
|
|
||||||
acc.id as account_id,
|
|
||||||
acc.code as account_code,
|
|
||||||
acc.label as account_label
|
|
||||||
FROM acc_transactions AS trans
|
|
||||||
INNER JOIN acc_transactions_lines AS line ON line.id_transaction = trans.id
|
|
||||||
INNER JOIN acc_accounts AS acc ON line.id_account = acc.id
|
|
||||||
LEFT JOIN module_data_amortization AS mda ON json_extract(mda.document, '$.amort_line_id') = line.id
|
|
||||||
WHERE
|
|
||||||
acc.code = :acc_code
|
|
||||||
AND line.credit > 0
|
|
||||||
AND credit_line_id NOT IN (
|
|
||||||
SELECT json_extract(link.document, '$.credit_line_id') AS line_id FROM !table as link
|
|
||||||
WHERE json_extract(link.document, '$.type') == "credit_link")
|
|
||||||
;
|
|
||||||
:acc_code=$ligne_immo.account_code
|
|
||||||
!table =$module.table
|
|
||||||
assign="credit_line"
|
|
||||||
}}
|
|
||||||
{{if $credit_line.amount < $solde}}
|
|
||||||
{{:assign var="credit_lines." value=$credit_line}}
|
|
||||||
{{elseif $credit_line.amount == $solde}}
|
|
||||||
{{:assign var="exit_lines." value=$credit_line}}
|
|
||||||
{{/if}}
|
|
||||||
{{/select}}
|
|
||||||
|
|
||||||
{{* déterminer le compte d'amortissement en fonction du compte d'immobilisation *}}
|
{{* déterminer le compte d'amortissement en fonction du compte d'immobilisation *}}
|
||||||
{{:include
|
{{:include
|
||||||
file="./_get_amort_code.html"
|
file="./_get_amort_code.html"
|
||||||
|
|
@ -132,6 +92,15 @@
|
||||||
|
|
||||||
{{: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.ok}}
|
||||||
|
{{if $_GET.msg|match:"attach_amort"}}
|
||||||
|
{{:assign msg="Écriture d'amortissement attachée"}}
|
||||||
|
{{elseif $_GET.msg|match:"detach_amort"}}
|
||||||
|
{{:assign msg="Écriture d'amortissement détachée"}}
|
||||||
|
{{/if}}
|
||||||
|
<p class="block confirm">{{$msg}}</p>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
<div class="informations">
|
<div class="informations">
|
||||||
<dl class="describe">
|
<dl class="describe">
|
||||||
<dt>Immobilisation</dt>
|
<dt>Immobilisation</dt>
|
||||||
|
|
@ -180,6 +149,9 @@
|
||||||
<td>
|
<td>
|
||||||
{{if $line.line_label != null}}
|
{{if $line.line_label != null}}
|
||||||
{{$line.line_label}}
|
{{$line.line_label}}
|
||||||
|
{{if $line.trans_label != $line.line_label}}
|
||||||
|
— {{$line.trans_label}}
|
||||||
|
{{/if}}
|
||||||
{{else}}
|
{{else}}
|
||||||
{{$line.trans_label}}
|
{{$line.trans_label}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
@ -194,15 +166,19 @@
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
{{elseif $free_amort_lines}}
|
||||||
|
<p class="block alert">
|
||||||
|
Vous pouvez attacher une ou plusieurs écritures d'amortissement à l'immobilisation
|
||||||
|
</p>
|
||||||
{{else}}
|
{{else}}
|
||||||
<p class="block alert">
|
<p class="block alert">
|
||||||
Vous pouvez attacher une ou plusieurs écritures d'amortissement à votre immobilisation
|
Aucune écriture d'amortissement à rattacher ; vous pouvez passer à la suite
|
||||||
</p>
|
</p>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<h3 class="ruler">Autres écritures d'amortissements</h3>
|
|
||||||
|
|
||||||
{{if $free_amort_lines}}
|
{{if $free_amort_lines}}
|
||||||
|
<h3 class="ruler">Autres écritures d'amortissements</h3>
|
||||||
<table class="list">
|
<table class="list">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -223,8 +199,19 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td class="num"><a href="{{$amort_url}}">#{{$line.amort_trans_id}}</a></td>
|
<td class="num"><a href="{{$amort_url}}">#{{$line.amort_trans_id}}</a></td>
|
||||||
<td>{{$line.date|date_short}}</td>
|
<td>{{$line.date|date_short}}</td>
|
||||||
<td>{{$line.trans_label}}
|
<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}}
|
||||||
|
{{*
|
||||||
|
{{$line.trans_label}}
|
||||||
{{if $line.line_label != null && $line.line_label != $line.trans_label}} — {{$line.line_label}}{{/if}}
|
{{if $line.line_label != null && $line.line_label != $line.trans_label}} — {{$line.line_label}}{{/if}}
|
||||||
|
*}}
|
||||||
</td>
|
</td>
|
||||||
<td class="money">{{"%f"|math:$line.amort_amount|money_html:false|raw}}</td>
|
<td class="money">{{"%f"|math:$line.amort_amount|money_html:false|raw}}</td>
|
||||||
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,11 @@
|
||||||
{{* -*- brindille -*- *}}
|
{{* -*- brindille -*- *}}
|
||||||
|
|
||||||
{{*
|
{{*
|
||||||
Associer les différentes écritures à une immo créée avant la mise
|
Associer les différentes écritures à une immo créée et sortie du
|
||||||
en service du module et sortie du bilan
|
bilan avant la mise en service du module
|
||||||
@param immo_doc_id : id du doc associé à l'immobilisation
|
@param immo_doc_id : id du doc associé à l'immobilisation
|
||||||
*}}
|
*}}
|
||||||
|
|
||||||
{{*
|
|
||||||
TODO : affichage après attachement écriture sortie bilan (ligne attachée, bouton détacher)
|
|
||||||
*}}
|
|
||||||
|
|
||||||
{{* 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=$_GET.immo_doc_id keep="info_immo, ligne_immo, message"}}
|
||||||
{{if $message != null}}
|
{{if $message != null}}
|
||||||
|
|
@ -29,6 +25,10 @@
|
||||||
{{:redirect to="index.html?type_immo=archived"}}
|
{{:redirect to="index.html?type_immo=archived"}}
|
||||||
{{/form}}
|
{{/form}}
|
||||||
|
|
||||||
|
{{#form on="finish"}}
|
||||||
|
{{:redirect to="index.html?type_immo=managed"}}
|
||||||
|
{{/form}}
|
||||||
|
|
||||||
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
{{:assign label_immo=$info_immo.label|or:$ligne_immo.trans_label}}
|
||||||
{{if $ligne_immo.line_label != null && $ligne_immo.line_label != $label_immo}}
|
{{if $ligne_immo.line_label != null && $ligne_immo.line_label != $label_immo}}
|
||||||
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
||||||
|
|
@ -68,8 +68,8 @@
|
||||||
{{/select}}
|
{{/select}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{* chercher des écritures au crédit du compte de l'immo sans doc associé *}}
|
|
||||||
{{*
|
{{*
|
||||||
|
chercher des écritures au crédit du compte de l'immo sans doc associé
|
||||||
- line.credit < ligne_immo.amount => peut-être un avoir
|
- line.credit < ligne_immo.amount => peut-être un avoir
|
||||||
- line.credit = ligne_immo.amount - avoirs => écriture de sortie du bilan
|
- line.credit = ligne_immo.amount - avoirs => écriture de sortie du bilan
|
||||||
*}}
|
*}}
|
||||||
|
|
@ -103,9 +103,7 @@
|
||||||
!table =$module.table
|
!table =$module.table
|
||||||
assign="credit_line"
|
assign="credit_line"
|
||||||
}}
|
}}
|
||||||
{{if $credit_line.amount < $solde}}
|
{{if $credit_line.amount == $solde}}
|
||||||
{{:assign var="credit_lines." value=$credit_line}}
|
|
||||||
{{elseif $credit_line.amount == $solde}}
|
|
||||||
{{:assign var="exit_lines." value=$credit_line}}
|
{{:assign var="exit_lines." value=$credit_line}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/select}}
|
{{/select}}
|
||||||
|
|
@ -233,9 +231,9 @@
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{{else}}
|
{{elseif $exit_lines}}
|
||||||
<p class="block alert">
|
<p class="block alert">
|
||||||
Vous pouvez attacher une écriture de sortie du bilan à votre immobilisation
|
Vous pouvez attacher une écriture de sortie du bilan à l'immobilisation
|
||||||
</p>
|
</p>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
|
@ -275,14 +273,16 @@
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
{{elseif $exit_line == null}}
|
{{elseif $exit_line == null}}
|
||||||
<p class="block alert">Aucune écriture de sortie du bilan</p>
|
<p class="block alert">Aucune écriture de sortie du bilan. Vérifiez l'attachement d'écriture d'avoir.</p>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
<p class="submit">
|
<p class="submit">
|
||||||
{{:button type="submit" name="backward" label="Revenir à l'étape précédente" shape="left" class="main"}}
|
{{:button type="submit" name="backward" label="Revenir à l'étape précédente" shape="left" class="main"}}
|
||||||
{{if $exit_line}}
|
{{if $exit_line}}
|
||||||
{{:button type="submit" name="validate" label="Valider" shape="check" class="main"}}
|
{{:button type="submit" name="validate" label="Terminer" shape="check" class="main"}}
|
||||||
|
{{else}}
|
||||||
|
{{:button type="submit" name="finish" label="Terminer" shape="export" class="main"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</p>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,10 @@
|
||||||
{{if $message != null}}
|
{{if $message != null}}
|
||||||
{{:error message=$message}}
|
{{:error message=$message}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
{{:assign label_immo=$ligne_immo.trans_label}}
|
||||||
|
{{if $ligne_immo.line_label != null && $ligne_immo.line_label != $label_immo}}
|
||||||
|
{{:assign label_immo=$label_immo|cat:" — "|cat:$ligne_immo.line_label}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{*
|
{{*
|
||||||
lister les écritures au crédit du compte de l'immobilisation
|
lister les écritures au crédit du compte de l'immobilisation
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,7 @@
|
||||||
{{else}}
|
{{else}}
|
||||||
{{:assign type_immo="other"}}
|
{{:assign type_immo="other"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{:redirect force="index.html?ok=1&msg=infos&type_immo=%s"|args:$type_immo}}
|
{{:redirect force="details_immo.html?immo_doc_id=%s&type_immo=%s&ok=1&msg=infos"|args:$_GET.immo_doc_id:$type_immo}}
|
||||||
|
|
||||||
{{/form}}
|
{{/form}}
|
||||||
|
|
||||||
|
|
@ -219,6 +219,7 @@
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{:input type="date" name="date_achat" label="Date d'acquisition" default=$info_immo.date_achat}}
|
{{:input type="date" name="date_achat" label="Date d'acquisition" default=$info_immo.date_achat}}
|
||||||
{{:input type="date" name="date_mes" label="Date de mise en service" default=$info_immo.date_mes}}
|
{{:input type="date" name="date_mes" label="Date de mise en service" default=$info_immo.date_mes}}
|
||||||
|
{{*
|
||||||
{{if $linked_immos != null}}
|
{{if $linked_immos != null}}
|
||||||
<dt><label>Écritures d'avoir liées à l'immobilisation</label></dt>
|
<dt><label>Écritures d'avoir liées à l'immobilisation</label></dt>
|
||||||
<dd>
|
<dd>
|
||||||
|
|
@ -233,6 +234,7 @@
|
||||||
</span>
|
</span>
|
||||||
</dd>
|
</dd>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
*}}
|
||||||
</div>
|
</div>
|
||||||
</dl>
|
</dl>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,12 @@
|
||||||
{{* lister les amortissements non rattachés à une immo *}}
|
{{* lister les amortissements non rattachés à une immo *}}
|
||||||
{{:include file="./_get_free_amort.html" filter_condition=$filter_condition keep="free_amort_lines"}}
|
{{:include file="./_get_free_amort.html" filter_condition=$filter_condition keep="free_amort_lines"}}
|
||||||
|
|
||||||
|
{{* déterminer le compte d'amortissement en fonction du compte d'immobilisation *}}
|
||||||
|
{{:include
|
||||||
|
file="./_get_amort_code.html"
|
||||||
|
code_immo=$ligne_immo.account_code
|
||||||
|
keep="code_amort"
|
||||||
|
}}
|
||||||
{{:admin_header title="Amortissements non rattachés" custom_css="./style.css" current="module_amortization"}}
|
{{:admin_header title="Amortissements non rattachés" custom_css="./style.css" current="module_amortization"}}
|
||||||
|
|
||||||
{{* barre de navigation *}}
|
{{* barre de navigation *}}
|
||||||
|
|
@ -52,7 +58,7 @@
|
||||||
|
|
||||||
<form method="post" action="">
|
<form method="post" action="">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
{{:input type="checkbox" value=1 name="unhide" checked="%s"|args:$checked label="Afficher les écritures ignorées"}}
|
{{:input type="checkbox" value=1 name="unhide" checked="%s"|args:$checked label="Afficher toutes les écritures"}}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
@ -73,13 +79,23 @@
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{{#foreach from=$free_amort_lines item="line"}}
|
{{#foreach from=$free_amort_lines item="line"}}
|
||||||
|
{{if $_POST.unhide == null && $line.account_code != $code_amort}}
|
||||||
|
{{:continue}}
|
||||||
|
{{/if}}
|
||||||
{{:assign trans_url="%s/acc/transactions/details.php?id=%s"|args:$admin_url:$line.trans_id}}
|
{{: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 compte_url="%s/acc/accounts/journal.php?id=%s&year=%s"|args:$admin_url:$line.account_id:$line.year}}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="num"><a href="{{$trans_url}}">#{{$line.trans_id}}</a></td>
|
<td class="num"><a href="{{$trans_url}}">#{{$line.trans_id}}</a></td>
|
||||||
<td>{{$line.trans_date|date_short}}</td>
|
<td>{{$line.trans_date|date_short}}</td>
|
||||||
<td>{{$line.trans_label}}
|
<td>
|
||||||
{{if $line.line_label != null && $line.line_label != $line.trans_label}} - {{$line.line_label}}{{/if}}
|
{{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>
|
||||||
<td class="money">{{"%f"|math:$line.amount|money_html:false|raw}}</td>
|
<td class="money">{{"%f"|math:$line.amount|money_html:false|raw}}</td>
|
||||||
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
<td><a href="{{$compte_url}}">{{$line.account_code}}</a></td>
|
||||||
|
|
|
||||||
|
|
@ -271,6 +271,7 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
|
<tr><td colspan="5"></td></tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
<tfoot>
|
<tfoot>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue