diff --git a/_unfinished.html b/_unfinished.html index 5db1083..3565470 100644 --- a/_unfinished.html +++ b/_unfinished.html @@ -31,6 +31,9 @@
+| {{"%f"|math:$debit|money:false}} | {{$account_code}} | {{$account_label}} | -+ | + {{:linkbutton + label="Modifier" + href="ignore.html?immo_id=%s"|args:$immo_id + shape="edit" + target="_dialog" + }} + | {{/select}} @@ -132,4 +152,13 @@ } +function changeVisibility(evt, idcheck = 'f_unhide_1') { + this.form.dispatchEvent(new Event('submit')); + this.form.submit(); +} + +(function () { + document.getElementById('f_unhide_1').onclick = changeVisibility; +})(); + diff --git a/ignore.html b/ignore.html new file mode 100644 index 0000000..a8d4ec6 --- /dev/null +++ b/ignore.html @@ -0,0 +1,85 @@ +{{* -*- brindille -*- *}} + +{{* + Marquer la ligne d'écriture « à ignorer » + @param immo_id : numéro de ligne +*}} + +{{#select + trans.id AS trans_id, + trans.date AS date, + trans.label AS label, + line.debit AS amount + FROM acc_transactions_lines AS line + INNER JOIN acc_transactions AS trans ON line.id_transaction = trans.id + WHERE line.id = :line_id + ; + :line_id = $_GET.immo_id + assign=ligne_immo +}} +{{else}} + {{:error message="Il n'y a aucune écriture avec le numéro de ligne %s !"|args:$_GET.immo_id}} +{{/select}} +{{#load type="immo" assign="info_immo" where="$$.line = :line_id" :line_id=$_GET.immo_id|intval}}{{/load}} + +{{* Traiter l'envoi du formulaire *}} +{{#form on="proceed"}} + {{if $_POST.ignore != null && $info_immo == null}} + {{* ignorer l'écriture *}} + {{:assign duration=0}} + {{:assign status="ignored"}} + {{:save + key=""|uuid + validate_schema="schema.json" + type="immo" + line=$_GET.immo_id|intval + duration=$duration + date=$ligne_immo.date + status=$status + }} + {{:redirect force="index.html?ok=1&msg=infos&type_immo=unfinished"}} + {{elseif $_POST.ignore == null && $info_immo != null}} + {{* dés-ignorer l'écriture *}} + {{:delete id=$info_immo.id}} + {{:redirect force="index.html?ok=1&msg=infos&type_immo=unfinished"}} + {{else}} + {{:redirect force="index.html?type_immo=unfinished"}} + {{/if}} +{{else}} + {{:form_errors}} +{{/form}} + +{{:admin_header title="Ignorer l'écriture" custom_css="./style.css" current="module_amortissement"}} + +{{* barre de navigation *}} +{{if ! $dialog}} + {{:include file="_nav.html" current="index"}} +{{/if}} + + + +{{:admin_footer}} diff --git a/style.css b/style.css index 40922ee..5c0e9c6 100644 --- a/style.css +++ b/style.css @@ -38,6 +38,11 @@ h2[class="aide"], h3[class="aide"] { margin-right: 0; } +.informations dl.describe > dd { + margin-left: 0; + margin-right: 0; +} + nav.amort aside { margin-top : 0; }