write_exit : correction erreur id exercice

This commit is contained in:
Jean-Christophe Engel 2025-11-05 14:39:34 +01:00
parent 2d65bf0f33
commit 2bf3234ec1

View file

@ -33,21 +33,6 @@
{{#load type="immo" assign="info_immo" where="$$.line = :line_id" :line_id=$_GET.immo_id|intval}} {{#load type="immo" assign="info_immo" where="$$.line = :line_id" :line_id=$_GET.immo_id|intval}}
{{/load}} {{/load}}
{{* date de début de l'exercice *}}
{{#select start_date FROM acc_years WHERE id = :year_id; :year_id = $_GET.year}}
{{*
{{if $start_date < "2025-01-01"
*}}
{{:assign vnc_code="675"}}
{{:assign cession_code="775"}}
{{*
{{else}}
{{:assign vnc_code="657"}}
{{:assign cession_code="757"}}
{{/if}}
*}}
{{/select}}
{{:assign valeur_nette="%f-%f"|math:$ligne_immo.montant:$_GET.amort_amount}} {{:assign valeur_nette="%f-%f"|math:$ligne_immo.montant:$_GET.amort_amount}}
{{:assign amort_comp=0}} {{* amortissement complémentaire jqà date sortie *}} {{:assign amort_comp=0}} {{* amortissement complémentaire jqà date sortie *}}
{{:assign amort_except=0}} {{* amortissement exceptionnel jqà date fin amortissement *}} {{:assign amort_except=0}} {{* amortissement exceptionnel jqà date fin amortissement *}}
@ -269,16 +254,25 @@
{{if ! $dialog}} {{if ! $dialog}}
{{:include file="_nav.html" current="index" subcurrent="balance_exit"}} {{:include file="_nav.html" current="index" subcurrent="balance_exit"}}
{{/if}} {{/if}}
{{:form_errors}}
{{* Préparer les infos pour le formulaire *}} {{*
Préparer les infos pour le formulaire
déterminer les comptes pour les différentes écritures
*}}
{{* déterminer les comptes pour les différentes écritures *}}
{{:include {{:include
file="./_get_amort_code.html" file="./_get_amort_code.html"
code_immo=$ligne_immo.code code_immo=$ligne_immo.code
keep="code_amort" keep="code_amort"
}} }}
{{*
Utilisation des « anciens » numéros de comptes because conflit
avec les nouveaux numéros ; voir info.org
*}}
{{:assign vnc_code="675"}}
{{:assign cession_code="775"}}
{{:assign var="liste_codes.6811" name="comp_account"}} {{:assign var="liste_codes.6811" name="comp_account"}}
{{:assign var="liste_codes.687" name="except_account"}} {{:assign var="liste_codes.687" name="except_account"}}
{{:assign var="liste_codes.462" name="creance_account"}} {{:assign var="liste_codes.462" name="creance_account"}}
@ -297,7 +291,8 @@
FROM acc_accounts as acc FROM acc_accounts as acc
INNER JOIN acc_charts as chart ON chart.id = acc.id_chart INNER JOIN acc_charts as chart ON chart.id = acc.id_chart
INNER JOIN acc_years as year ON chart.id = year.id_chart INNER JOIN acc_years as year ON chart.id = year.id_chart
WHERE year.id = 1 AND !condition; WHERE year.id = :year_id AND !condition;
:year_id = $_GET.year
!condition=$condition !condition=$condition
}} }}
{{:assign var="liste_codes.%s.id"|args:$acc_code value=$id}} {{:assign var="liste_codes.%s.id"|args:$acc_code value=$id}}
@ -492,7 +487,7 @@
</tr> </tr>
{{/if}} {{/if}}
<tr> <tr>
<td> {{* style="pointer-events: none; opacity: 0.6;">*}} <td>
{{:input {{:input
type="list" type="list"
name="immo_account" name="immo_account"
@ -550,4 +545,5 @@
{{:button type="submit" name="save" label="Enregistrer" shape="right" class="main"}} {{:button type="submit" name="save" label="Enregistrer" shape="right" class="main"}}
</p> </p>
</form> </form>
{{:form_errors}}
{{:admin_footer}} {{:admin_footer}}