Comment: | Invoice module: document cancellation implemented |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | invoice_module |
Files: | files | file ages | folders |
SHA3-256: |
3c7d136e37b0700d9a554ea0057cdb0b |
User & Date: | alinaar on 2023-03-14 10:59:00 |
Other Links: | branch diff | manifest | tags |
2023-03-14
| ||
14:13 | Invoice module: Merge dev branch check-in: a0f7e96e39 user: alinaar tags: invoice_module | |
10:59 | Invoice module: document cancellation implemented check-in: 3c7d136e37 user: alinaar tags: invoice_module | |
2023-03-10
| ||
20:23 | Invoice module: buttons added to document lists check-in: 381c218de4 user: alinaar tags: invoice_module | |
Modified src/skel-dist/modules/invoice/_modification_controller.tpl from [35dafc19b0] to [007fbe61b2].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | {{#restrict block=true section="accounting" level="write"}} {{if $_GET.action === 'sign' || $_POST.signing_submit || $_GET.action === 'delete'}} {{if !$_GET.id}} {{:assign var='check_errors.' value='Aucun devis sélectionné.'}} {{else}} {{#load id=$_GET.id|intval module=$module.name}} {{if $status !== $DRAFT_STATUS}} {{:assign var='check_errors.' value='Seuls les brouillons peuvent être signés ou supprimés.'}} {{elseif $_POST.signing_submit}} {{if !$_POST.signing_place}} {{:assign var='check_errors.' value='Lieu de la signature obligatoire.'}} {{/if}} {{:include file='./include/check_max_length.tpl' keep='check_errors' check_label='Lieu de la signature trop long' check_value=$_POST.signing_place check_max=128}} {{if !$_POST.signing_date}} | > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | {{#restrict block=true section="accounting" level="write"}} {{if $_GET.action === 'sign' || $_POST.signing_submit || $_GET.action === 'delete'}} {{if !$_GET.id}} {{:assign var='check_errors.' value='Aucun devis sélectionné.'}} {{else}} {{#load id=$_GET.id|intval module=$module.name}} {{if $status !== $DRAFT_STATUS}} {{:assign var='check_errors.' value='Seuls les brouillons peuvent être signés ou supprimés.'}} {{elseif $cancelled}} {{:assign var='check_errors.' value='Les documents annulés ne peuvent pas être signés ou supprimés.'}} {{elseif $_POST.signing_submit}} {{if !$_POST.signing_place}} {{:assign var='check_errors.' value='Lieu de la signature obligatoire.'}} {{/if}} {{:include file='./include/check_max_length.tpl' keep='check_errors' check_label='Lieu de la signature trop long' check_value=$_POST.signing_place check_max=128}} {{if !$_POST.signing_date}} |
︙ | ︙ | |||
35 36 37 38 39 40 41 42 43 44 45 46 47 48 | recipient_member_id=$recipient_member_id recipient_member_numero=$recipient_member_numero introduction_text=$introduction_text subject=$subject date=$date deadline=$deadline status=$AWAITING_STATUS items=$items total=$total vat_exemption=$vat_exemption siret=$siret org_contact=$org_contact author_id=$author_id last_modification_date=$now|atom_date | > | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | recipient_member_id=$recipient_member_id recipient_member_numero=$recipient_member_numero introduction_text=$introduction_text subject=$subject date=$date deadline=$deadline status=$AWAITING_STATUS cancelled=$cancelled items=$items total=$total vat_exemption=$vat_exemption siret=$siret org_contact=$org_contact author_id=$author_id last_modification_date=$now|atom_date |
︙ | ︙ | |||
63 64 65 66 67 68 69 | {{:http redirect="index.html?ok=3"}} {{/if}} {{/load}} {{/if}} {{elseif $_POST.reject_submit || $_POST.validate_submit}} {{if !$_GET.id}} | | > > | 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | {{:http redirect="index.html?ok=3"}} {{/if}} {{/load}} {{/if}} {{elseif $_POST.reject_submit || $_POST.validate_submit}} {{if !$_GET.id}} {{:assign var='check_errors.' value='Aucun devis sélectionné.'}} {{else}} {{#load id=$_GET.id|intval module=$module.name}} {{if $status !== $AWAITING_STATUS}} {{:assign var='check_errors.' value='Seuls les devis en attente peuvent être validés ou refusés.'}} {{elseif $cancelled}} {{:assign var='check_errors.' value='Les devis annulés ne peuvent pas être validés ou refusés.'}} {{/if}} {{if $_POST.reject_submit}} {{:assign new_status=$REJECTED_STATUS}} {{:assign redirection_code=4}} {{elseif $_POST.validate_submit}} {{:assign new_status=$VALIDATED_STATUS}} {{:assign validation_date=$now|date:'Y-m-d'}} |
︙ | ︙ | |||
99 100 101 102 103 104 105 106 107 108 109 110 111 112 | recipient_member_id=$recipient_member_id recipient_member_numero=$recipient_member_numero introduction_text=null subject=$subject date=$now|date:'Y-m-d' deadline=null status=$AWAITING_STATUS items=$items total=$total vat_exemption=$vat_exemption siret=$siret org_contact=$org_contact author_id=$logged_user.id|intval parent_id=$_GET.id|intval | > | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | recipient_member_id=$recipient_member_id recipient_member_numero=$recipient_member_numero introduction_text=null subject=$subject date=$now|date:'Y-m-d' deadline=null status=$AWAITING_STATUS cancelled=false items=$items total=$total vat_exemption=$vat_exemption siret=$siret org_contact=$org_contact author_id=$logged_user.id|intval parent_id=$_GET.id|intval |
︙ | ︙ | |||
129 130 131 132 133 134 135 136 137 138 139 140 141 142 | recipient_member_id=$recipient_member_id recipient_member_numero=$recipient_member_numero introduction_text=$introduction_text subject=$subject date=$date deadline=$deadline status=$new_status items=$items total=$total vat_exemption=$vat_exemption siret=$siret org_contact=$org_contact author_id=$author_id child_id=$invoice_id|intval | > | 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | recipient_member_id=$recipient_member_id recipient_member_numero=$recipient_member_numero introduction_text=$introduction_text subject=$subject date=$date deadline=$deadline status=$new_status cancelled=$cancelled items=$items total=$total vat_exemption=$vat_exemption siret=$siret org_contact=$org_contact author_id=$author_id child_id=$invoice_id|intval |
︙ | ︙ | |||
155 156 157 158 159 160 161 162 163 164 165 166 167 168 | {{/load}} {{/if}} {{elseif $_POST.mark_as_paid_submit}} {{#load id=$_GET.id|intval}}{{:assign .='invoice'}}{{/load}} {{if $invoice.status !== $AWAITING_STATUS}} {{:assign var='check_errors.' value='Seuls les factures "en attente de validation" peuvent être payées.'}} {{/if}} {{:assign date=$_POST.date|date:'Y-m-d'}} {{if !$_POST.date}} {{:assign var='check_errors.' value="La date est obligatoire."}} {{/if}} {{if $_POST.date|parse_date === null}} {{* Means data is not a date *}} | > > | 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 | {{/load}} {{/if}} {{elseif $_POST.mark_as_paid_submit}} {{#load id=$_GET.id|intval}}{{:assign .='invoice'}}{{/load}} {{if $invoice.status !== $AWAITING_STATUS}} {{:assign var='check_errors.' value='Seuls les factures "en attente de validation" peuvent être payées.'}} {{elseif $invoice.cancelled}} {{:assign var='check_errors.' value='Les factures annulées ne peuvent pas être marquées comme payées.'}} {{/if}} {{:assign date=$_POST.date|date:'Y-m-d'}} {{if !$_POST.date}} {{:assign var='check_errors.' value="La date est obligatoire."}} {{/if}} {{if $_POST.date|parse_date === null}} {{* Means data is not a date *}} |
︙ | ︙ | |||
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 | recipient_member_id=$invoice.recipient_member_id recipient_member_numero=$invoice.recipient_member_numero introduction_text=null subject=$invoice.subject date=$invoice.date deadline=null status=$PAID_STATUS items=$invoice.items total=$invoice.total vat_exemption=$invoice.vat_exemption siret=$invoice.siret org_contact=$invoice.org_contact author_id=$invoice.author_id parent_id=$invoice.parent_id last_modification_date=$now|atom_date signing_place=null signing_date=$invoice.signing_date validation_date=null payment_date=$date payment_comment=$_POST.comment transaction_id=$transaction.id|intval payment_detail=null extra_info=null module_version=$VERSION }} {{:http redirect="details.html?id=%d&ok=6&show=invoice"|args:$invoice.id}} {{/if}} | > > > > > > > > > > > | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | > > > | 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 | recipient_member_id=$invoice.recipient_member_id recipient_member_numero=$invoice.recipient_member_numero introduction_text=null subject=$invoice.subject date=$invoice.date deadline=null status=$PAID_STATUS cancelled=$invoice.cancelled items=$invoice.items total=$invoice.total vat_exemption=$invoice.vat_exemption siret=$invoice.siret org_contact=$invoice.org_contact author_id=$invoice.author_id parent_id=$invoice.parent_id last_modification_date=$now|atom_date signing_place=null signing_date=$invoice.signing_date validation_date=null payment_date=$date payment_comment=$_POST.comment transaction_id=$transaction.id|intval payment_detail=null extra_info=null module_version=$VERSION }} {{:http redirect="details.html?id=%d&ok=6&show=invoice"|args:$invoice.id}} {{/if}} {{elseif $_POST.cancel_submit}} {{if !$_GET.id}} {{:assign var='check_errors.' value='Aucun document sélectionné.'}} {{else}} {{#load id=$_GET.id}} {{if $status === $DRAFT_STATUS}} {{:assign var='check_errors.' value='Les brouillons ne peuvent pas être annulés. Vous pouvez néanmoins les supprimer.'}} {{elseif $cancelled}} {{:assign var='check_errors.' value='Le document est déjà annulé.'}} {{/if}} {{if !$check_errors}} {{if $type === $INVOICE_TYPE}} {{:save id=id|intval validate_schema="./include/schema/invoice.json" key=$key type=$type recipient_business_name=$recipient_business_name recipient_address=$recipient_address recipient_member_id=$recipient_member_id recipient_member_numero=$recipient_member_numero introduction_text=$introduction_text subject=$subject date=$date deadline=$deadline status=$status cancelled=true items=$items total=$total vat_exemption=$vat_exemption siret=$siret org_contact=$org_contact author_id=$author_id parent_id=$parent_id last_modification_date=$now|atom_date signing_place=$signing_place signing_date=$signing_date validation_date=$validation_date payment_date=$payment_date payment_comment=$comment transaction_id=$transaction_id payment_detail=$payment_detail extra_info=$extra_info module_version=$VERSION }} {{else}} {{:save id=$id|intval validate_schema="./include/schema/quotation.json" key=$key type=$type recipient_business_name=$recipient_business_name recipient_address=$recipient_address recipient_member_id=$recipient_member_id recipient_member_numero=$recipient_member_numero introduction_text=$introduction_text subject=$subject date=$date deadline=$deadline status=$status cancelled=true items=$items total=$total vat_exemption=$vat_exemption siret=$siret org_contact=$org_contact author_id=$author_id child_id=$child_id last_modification_date=$now|atom_date signing_place=$signing_place signing_date=$signing_date validation_date=$validation_date payment_detail=$payment_detail extra_info=$extra_info parent_id=$parent_id module_version=$VERSION }} {{/if}} {{:http redirect="index.html?id=%d&ok=5&show=%s"|args:$id:$type}} {{/if}} {{/load}} {{/if}} {{/if}} {{if $_POST.status_update_button}} {{* Only for developers *}} {{if !$_POST.id}} {{:error message='Aucun devis sélectionné.'}} {{else}} {{:assign var='new_status_label' from='INVOICE_STATUS_LABELS.%s'|args:$_POST.status}} {{if $new_status_label === null}} {{:assign var='check_errors.' value='Nouveau statut invalide : %s.'|args:$_POST.status}} {{/if}} {{if !$check_errors}} {{#load id=$_POST.id|intval module=$module.name}} {{:assign var='allowed_type' from='DOCUMENT_TYPES.%s'|args:$type}} {{if !$allowed_type}} {{:assign var='check_errors.' value='Type invalide : %s!'|args:$type}} {{else}} {{:assign cancelled=$_POST.cancelled|boolval}} {{:save id=$id validate_schema="./include/schema/%s.json"|args:$type key=$key type=$type recipient_business_name=$recipient_business_name recipient_address=$recipient_address recipient_member_id=$recipient_member_id recipient_member_numero=$recipient_member_numero introduction_text=$introduction_text subject=$subject date=$date deadline=$deadline status=$_POST.status cancelled=$cancelled items=$items total=$total vat_exemption=$vat_exemption siret=$siret org_contact=$org_contact author_id=$author_id parent_id=$parent_id |
︙ | ︙ |
Modified src/skel-dist/modules/invoice/action.html from [2d8922b2b6] to [d96ef86f21].
1 2 3 4 5 6 7 8 9 | {{#restrict section="accounting" level="write"}} {{* ==================== Header ==================== *}} {{:admin_header title="Devis et factures" current="acc"}} {{:include file='./include/constants.tpl' keep='DRAFT_STATUS, AWAITING_STATUS, VALIDATED_STATUS, REJECTED_STATUS, PAID_STATUS, DOCUMENT_TYPES, TYPE_LABELS, STATUS_LABELS, INVOICE_STATUS_LABELS, QUOTATION_TYPE, INVOICE_TYPE, VERSION'}} {{:include file='./include/style.tpl'}} | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | {{#restrict section="accounting" level="write"}} {{* ==================== Header ==================== *}} {{:admin_header title="Devis et factures" current="acc"}} {{:include file='./include/constants.tpl' keep='DRAFT_STATUS, AWAITING_STATUS, VALIDATED_STATUS, REJECTED_STATUS, PAID_STATUS, DOCUMENT_TYPES, TYPE_LABELS, STATUS_LABELS, INVOICE_STATUS_LABELS, QUOTATION_TYPE, INVOICE_TYPE, VERSION'}} {{:include file='./include/style.tpl'}} {{if $_GET.action === 'sign' || $_POST.signing_submit || $_GET.action === 'delete' || $_POST.reject_submit || $_POST.validate_submit || $_POST.mark_as_paid_submit || $_POST.cancel_submit || $_POST.status_update_button}} {{:include file='./_modification_controller.tpl' keep='check_errors'}} {{elseif $_GET.id === null}} <p class="error block">Aucun document séléctionné.</p> {{/if}} {{#load id=$_GET.id|intval}} |
︙ | ︙ | |||
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | {{if !$check_errors}}<p class="error block">Marquer la facture comme payée est définitif. Vous ne pourrez pas rétablir la facture comme "en attente de paiement".<br />Il sera néanmoins possible d''annuler la facture.</p>{{/if}} {{:input type="date" name="date" label="Date du paiement" default=$now required=true}} {{:input type="textarea" name="comment" label="Remarque" required=false cols="50" rows="4"}} {{:input type="list" name="transaction" label="Écriture correspondante" target="./transaction_selector.inc.tpl" can_delete=true required=false}} {{:button type="submit" name="mark_as_paid_submit" label="Marquer comme payée" shape="check" class="main"}} </fieldset> </form> {{/if}} {{/load}} {{:admin_footer}} {{else}} {{:error message="Seuls les membres avec accès en écriture à la comptabilité peuvent visualiser cette page."}} {{/restrict}} | > > > > > > > > > > > > > > > > > > | 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | {{if !$check_errors}}<p class="error block">Marquer la facture comme payée est définitif. Vous ne pourrez pas rétablir la facture comme "en attente de paiement".<br />Il sera néanmoins possible d''annuler la facture.</p>{{/if}} {{:input type="date" name="date" label="Date du paiement" default=$now required=true}} {{:input type="textarea" name="comment" label="Remarque" required=false cols="50" rows="4"}} {{:input type="list" name="transaction" label="Écriture correspondante" target="./transaction_selector.inc.tpl" can_delete=true required=false}} {{:button type="submit" name="mark_as_paid_submit" label="Marquer comme payée" shape="check" class="main"}} </fieldset> </form> {{elseif $_GET.action === 'ask_cancelling'}} <form method="POST" action=""> <fieldset> <legend><h2 class="irreversible">Annuler {{if $type === $INVOICE_TYPE}}la{{else}}le{{/if}} {{$label}} n° {{$key}} ?</h2></legend> <fieldset> <legend>Résumé</legend> <ul> <li>Destinataire : <strong class="business_name">{{$recipient_business_name}}</strong></li> <li>Intitulé : {{$subject}}</li> <li>Date : {{$date|date_short}}</li> <li>Total {{$total|money_currency}}</li> <li>Statut en cours : {{$status_label}}</li> </ul> </fieldset> {{:button type="submit" name="cancel_submit" label="Confirmer l'annulation" shape="check" class="main"}} </fieldset> </form> {{/if}} {{/load}} {{:admin_footer}} {{else}} {{:error message="Seuls les membres avec accès en écriture à la comptabilité peuvent visualiser cette page."}} {{/restrict}} |
Modified src/skel-dist/modules/invoice/customer.html from [926859a801] to [9d1fcd4d4b].
1 2 3 4 5 6 7 8 | {{#restrict section="accounting" level="read"}} {{* ==================== Header ==================== *}} {{:admin_header title="Devis et factures" current="acc"}} {{:include file='./include/style.tpl'}} {{:include file='./include/navigation.html'}} | | | > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | {{#restrict section="accounting" level="read"}} {{* ==================== Header ==================== *}} {{:admin_header title="Devis et factures" current="acc"}} {{:include file='./include/style.tpl'}} {{:include file='./include/navigation.html'}} {{:include file='./include/constants.tpl' keep='DRAFT_STATUS, AWAITING_STATUS, REJECTED_STATUS, VALIDATED_STATUS, MISC_STATUS, STATUS_LABELS, CANCELLED_LABEL, QUOTATION_TYPE'}} {{* ==================== Listing ==================== *}} <h2>Devis de "{{$_GET.id}}"</h2> {{#sql select='id' tables='module_data_invoice' where="json_extract(document, '$.recipient_business_name') = :business_name" :business_name=$_GET.id}} {{:assign found=true}} {{/sql}} {{if !$found}} <p class="error block">Aucun devis pour ce client.</p> {{#restrict section="accounting" level="write"}} <p class="infos">{{:linkbutton href="edit.html" label="Créer un devis" shape="plus"}}</p> {{/restrict}} {{/if}} {{:assign list_select="key; id AS 'Numéro'; datetime($$.date) AS 'Émission'; $$.deadline AS 'Échéance'; $$.subject AS 'Intitulé'; $$.total AS 'Montant'; $$.recipient_member_id AS 'Membre'; $$.recipient_member_numero; $$.status"}} {{:assign list_where="$$.cancelled = false AND $$.recipient_business_name = :business_name AND $$.type = :type AND $$.status = :status"}} {{:assign list_where_cancelled="$$.recipient_business_name = :business_name AND $$.type = :type AND $$.cancelled = true"}} {{:assign list_order=8}} {{:include file='./include/customer_documents_for_status.tpl' select=$list_select where=$list_where order=$list_order type=$QUOTATION_TYPE status=$AWAITING_STATUS STATUS_LABELS=$STATUS_LABELS}} {{:include file='./include/customer_documents_for_status.tpl' select=$list_select where=$list_where order=$list_order type=$QUOTATION_TYPE status=$REJECTED_STATUS STATUS_LABELS=$STATUS_LABELS}} {{:include file='./include/customer_documents_for_status.tpl' select=$list_select where=$list_where order=$list_order type=$QUOTATION_TYPE status=$VALIDATED_STATUS STATUS_LABELS=$STATUS_LABELS}} {{:include file='./include/customer_documents_for_status.tpl' select=$list_select where=$list_where order=$list_order type=$QUOTATION_TYPE status=$MISC_STATUS STATUS_LABELS=$STATUS_LABELS}} {{:include file='./include/customer_documents_for_status.tpl' select=$list_select where=$list_where_cancelled order=$list_order type=$QUOTATION_TYPE STATUS_LABELS=$STATUS_LABELS}} {{:admin_footer}} {{else}} {{:error message="Seuls les membres avec accès en lecture à la comptabilité peuvent visualiser cette page."}} {{/restrict}} |
Modified src/skel-dist/modules/invoice/details.html from [50dc31d2b0] to [236fcb430c].
︙ | ︙ | |||
37 38 39 40 41 42 43 44 45 46 | {{/if}} {{* ======================= Title =========================== *}} {{:assign var="label" from="TYPE_LABELS.%s"|args:$type}} {{if $type === $INVOICE_TYPE}} {{:assign var="status_label" from="INVOICE_STATUS_LABELS.%s"|args:$status}} {{else}} {{:assign var="status_label" from="STATUS_LABELS.%s"|args:$status}} {{/if}} | > > | > > | | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | {{/if}} {{* ======================= Title =========================== *}} {{:assign var="label" from="TYPE_LABELS.%s"|args:$type}} {{if $type === $INVOICE_TYPE}} {{:assign var="status_label" from="INVOICE_STATUS_LABELS.%s"|args:$status}} {{:assign cancelled_label='Annulée'}} {{else}} {{:assign var="status_label" from="STATUS_LABELS.%s"|args:$status}} {{:assign cancelled_label='Annulé'}} {{/if}} <h1>{{$label}} n° {{$key}} - {{if !$cancelled}}{{$status_label}}{{else}}{{$cancelled_label}}{{/if}}</h1> {{* ======================= Content =========================== *}} <fieldset> <legend><h2>Informations</h2></legend> {{if $cancelled}} <p class="infos">Statut en cours : <strong class="irreversible">{{$cancelled_label}}</strong>.<br />(dernier statut avant annulation : {{$status_label}})</p> {{elseif $status === $AWAITING_STATUS}} <p class="infos">{{$label}} <strong>{{if $type === $QUOTATION_TYPE}}signé{{else}}émise{{/if}} le {{$signing_date|date_short}} à {{$signing_place}}</strong>.</p> {{if $type === $QUOTATION_TYPE}} <p class="">En attente de validation par le/la client.e.</p> <p class="infos"> {{:linkbutton href="action.html?id=%d&show=quotation&action=ask_validation"|args:$id label="Marquer comme validé et générer la facture" shape="check"}} {{:linkbutton href="action.html?id=%d&show=quotation&action=ask_rejection"|args:$id label="Marquer comme refusé" shape="alert"}} </p> |
︙ | ︙ | |||
85 86 87 88 89 90 91 | <p class="infos">Écriture comptable correspondante : {{:link href='!acc/transactions/details.php?id=%d'|args:$id label='n°%d - %s'|args:$id:$label}}.</p> {{/transactions}} {{else}} <p class="infos">Aucune écriture comptable correspondante. {{:linkbutton href="#" label="Associer (prochainement)" shape="right"}}</p> {{/if}} {{else}} | | | 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | <p class="infos">Écriture comptable correspondante : {{:link href='!acc/transactions/details.php?id=%d'|args:$id label='n°%d - %s'|args:$id:$label}}.</p> {{/transactions}} {{else}} <p class="infos">Aucune écriture comptable correspondante. {{:linkbutton href="#" label="Associer (prochainement)" shape="right"}}</p> {{/if}} {{else}} <p class="infos">Statut en cours : {{$status_label}}.</p> {{/if}} {{if $type === $INVOICE_TYPE && $parent_id}} {{#load id=$parent_id}}{{:assign .='parent'}}{{/load}} <p class="infos">Correspondant au {{:link href="details.html?id=%d&show=quotation"|args:$parent.id label="devis n°%s"|args:$parent.key}}.</p> {{/if}} |
︙ | ︙ | |||
181 182 183 184 185 186 187 | <legend><h2>Infos complémentaires</h2></legend> {{if $payment_detail}}<p>{{$payment_detail|escape|nl2br}}</p>{{/if}} {{if $extra_info}}<p>{{$extra_info|escape|nl2br}}</p>{{/if}} </fieldset> {{/if}} {{#restrict section="config" level="admin"}} | | | | | | | | | > > > | | | | | | > | 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | <legend><h2>Infos complémentaires</h2></legend> {{if $payment_detail}}<p>{{$payment_detail|escape|nl2br}}</p>{{/if}} {{if $extra_info}}<p>{{$extra_info|escape|nl2br}}</p>{{/if}} </fieldset> {{/if}} {{#restrict section="config" level="admin"}} <div style="background-color: black; color: limegreen; padding: 1em;"> <fieldset style="border-color: limegreen;"> <legend><h2 style="color: limegreen;">Outils développeur/euse</h2></legend> <div class="infos inline"> <label for="f_status">Statut en cours :</label> <form method="POST" action="./action.html" style="display: inline;"> {{if $type === $INVOICE_TYPE}}{{:assign options=$INVOICE_STATUS_LABELS}}{{else}}{{:assign options=$STATUS_LABELS}}{{/if}} {{:input type="select" name="status" options=$options default=$status required=true}} {{* {{:input type="checkbox" name="cancelled" label="annulé" value='1' default=$cancelled style="display: inline;"}} *}} <input type="checkbox" name="cancelled" {{if $cancelled}}checked="checked"{{/if}} value="1" id="f_cancelled_1" style="display: inline;" /> <label id="cancel_checkbox_label" for="f_cancelled_1">annulé</label> {{:input type="hidden" name="id" default=$id|intval}} {{:button type="submit" name="status_update_button" label="Modifier"}} </form> </div> </fieldset> </div> <style>#cancel_checkbox_label::before { margin-right: 0; }</style> {{/restrict}} {{/load}} {{/if}} {{:admin_footer}} {{else}} {{:error message="Seuls les membres avec accès en lecture à la comptabilité peuvent visualiser cette page."}} {{/restrict}} |
Modified src/skel-dist/modules/invoice/edit.html from [7a7e9c97b3] to [7d7921a190].
︙ | ︙ | |||
15 16 17 18 19 20 21 22 23 24 25 26 27 28 | <h1>Édition du devis n°{{$document.key}} "{{$document.subject}}"</h1> {{else}} <h1>Création d'un devis</h1> {{/if}} {{if $document && $document.status !== $DRAFT_STATUS}} {{:error message="Ce document n'est plus un brouillon et ne peut plus être modifié."}} {{/if}} {{if $_POST.quotation_submit}} {{:assign computed_total=0}} {{:assign check_errors=null}} {{:assign items=null}} | > > | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | <h1>Édition du devis n°{{$document.key}} "{{$document.subject}}"</h1> {{else}} <h1>Création d'un devis</h1> {{/if}} {{if $document && $document.status !== $DRAFT_STATUS}} {{:error message="Ce document n'est plus un brouillon et ne peut plus être modifié."}} {{elseif $document && $document.cancelled}} {{:error message="Les document annulés ne peuvent plus être modifié."}} {{/if}} {{if $_POST.quotation_submit}} {{:assign computed_total=0}} {{:assign check_errors=null}} {{:assign items=null}} |
︙ | ︙ | |||
164 165 166 167 168 169 170 171 172 173 174 175 176 177 | recipient_member_id=$recipient_member_id recipient_member_numero=$recipient_member_numero introduction_text=$_POST.introduction_text subject=$_POST.subject date=$date deadline=$deadline status=$status items=$items total=$computed_total vat_exemption=$vat_exemption siret=$module.config.siret org_contact=$_POST.org_contact author_id=$logged_user.id|intval last_modification_date=$now|atom_date | > | 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 | recipient_member_id=$recipient_member_id recipient_member_numero=$recipient_member_numero introduction_text=$_POST.introduction_text subject=$_POST.subject date=$date deadline=$deadline status=$status cancelled=false items=$items total=$computed_total vat_exemption=$vat_exemption siret=$module.config.siret org_contact=$_POST.org_contact author_id=$logged_user.id|intval last_modification_date=$now|atom_date |
︙ | ︙ |
Modified src/skel-dist/modules/invoice/include/constants.tpl from [f029d9cc20] to [c2b6335cb9].
1 2 3 4 5 6 7 8 9 | {{:assign VERSION='0.2'}} {{:assign DRAFT_STATUS='draft' AWAITING_STATUS='awaiting' REJECTED_STATUS='rejected' VALIDATED_STATUS='validated' PAID_STATUS='paid' MISC_STATUS='misc'}} {{:assign QUOTATION_TYPE='quotation' INVOICE_TYPE='invoice'}} {{:assign var='DOCUMENT_TYPES.%s'|args:$QUOTATION_TYPE value='Devis'}} {{:assign var='DOCUMENT_TYPES.%s'|args:$INVOICE_TYPE value='Facture'}} {{:assign NONPROFIT_VAT_EXEMPTION_TYPE='nonprofit' PROFIT_VAT_EXEMPTION_TYPE='profit'}} {{* Labels *}} {{:assign var='TYPE_LABELS.%s'|args:$QUOTATION_TYPE value='Devis'}} | > | 1 2 3 4 5 6 7 8 9 10 | {{:assign VERSION='0.2'}} {{:assign DRAFT_STATUS='draft' AWAITING_STATUS='awaiting' REJECTED_STATUS='rejected' VALIDATED_STATUS='validated' PAID_STATUS='paid' MISC_STATUS='misc'}} {{:assign CANCELLED_FLAG='cancelled'}} {{:assign QUOTATION_TYPE='quotation' INVOICE_TYPE='invoice'}} {{:assign var='DOCUMENT_TYPES.%s'|args:$QUOTATION_TYPE value='Devis'}} {{:assign var='DOCUMENT_TYPES.%s'|args:$INVOICE_TYPE value='Facture'}} {{:assign NONPROFIT_VAT_EXEMPTION_TYPE='nonprofit' PROFIT_VAT_EXEMPTION_TYPE='profit'}} {{* Labels *}} {{:assign var='TYPE_LABELS.%s'|args:$QUOTATION_TYPE value='Devis'}} |
︙ | ︙ | |||
17 18 19 20 21 22 23 24 25 26 | {{:assign var='INVOICE_STATUS_LABELS.%s'|args:$DRAFT_STATUS value='Brouillon'}} {{:assign var='INVOICE_STATUS_LABELS.%s'|args:$AWAITING_STATUS value='En attente de paiement'}} {{:assign var='INVOICE_STATUS_LABELS.%s'|args:$REJECTED_STATUS value='Rejetée'}} {{:assign var='INVOICE_STATUS_LABELS.%s'|args:$VALIDATED_STATUS value='Validée'}} {{:assign var='INVOICE_STATUS_LABELS.%s'|args:$PAID_STATUS value='Payée'}} {{:assign var='INVOICE_STATUS_LABELS.%s'|args:$MISC_STATUS value='Autre'}} {{:assign var='VAT_EXEMPTION_TYPE_LABELS.%s'|args:$NONPROFIT_VAT_EXEMPTION_TYPE value='Non-lucratif'}} {{:assign var='VAT_EXEMPTION_TYPE_LABELS.%s'|args:$PROFIT_VAT_EXEMPTION_TYPE value='Lucratif'}} | > > | 18 19 20 21 22 23 24 25 26 27 28 29 | {{:assign var='INVOICE_STATUS_LABELS.%s'|args:$DRAFT_STATUS value='Brouillon'}} {{:assign var='INVOICE_STATUS_LABELS.%s'|args:$AWAITING_STATUS value='En attente de paiement'}} {{:assign var='INVOICE_STATUS_LABELS.%s'|args:$REJECTED_STATUS value='Rejetée'}} {{:assign var='INVOICE_STATUS_LABELS.%s'|args:$VALIDATED_STATUS value='Validée'}} {{:assign var='INVOICE_STATUS_LABELS.%s'|args:$PAID_STATUS value='Payée'}} {{:assign var='INVOICE_STATUS_LABELS.%s'|args:$MISC_STATUS value='Autre'}} {{:assign CANCELLED_LABEL='Annulé'}} {{:assign var='VAT_EXEMPTION_TYPE_LABELS.%s'|args:$NONPROFIT_VAT_EXEMPTION_TYPE value='Non-lucratif'}} {{:assign var='VAT_EXEMPTION_TYPE_LABELS.%s'|args:$PROFIT_VAT_EXEMPTION_TYPE value='Lucratif'}} |
Modified src/skel-dist/modules/invoice/include/customer_documents_for_status.tpl from [f004a26dd8] to [9a07e0b25a].
|
| > | > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 | {{if $status}} {{:assign var="label" from="STATUS_LABELS.%s"|args:$status}} {{else}} {{:assign label=$CANCELLED_LABEL}} {{/if}} <h3 class="ruler">{{$label}}</h3> {{#list select=$select where=$where order=$order :business_name=$_GET.id :type=$type |
︙ | ︙ | |||
20 21 22 23 24 25 26 | {{:link href="!users/details.php?id=%s"|args:$recipient_member_numero label=$recipient_member_numero}} {{else}} - {{/if}} </td> <td class="actions"> {{:include file='./document_list_buttons.html'}} | < < < < < < < < < < < < | 25 26 27 28 29 30 31 32 33 34 35 36 37 | {{:link href="!users/details.php?id=%s"|args:$recipient_member_numero label=$recipient_member_numero}} {{else}} - {{/if}} </td> <td class="actions"> {{:include file='./document_list_buttons.html'}} </td> </tr> {{else}} <p>Aucun document pour le status "{{$label}}".</p> {{/list}} |
Modified src/skel-dist/modules/invoice/include/document_details_menu.html from [bed57089df] to [8fdee29500].
︙ | ︙ | |||
9 10 11 12 13 14 15 | <li>{{:linkbutton href="./edit.html?id=%d"|args:$id label="Modifier" shape="edit"}}</li> <li>{{:linkbutton href="action.html?id=%d&action=sign&show=quotation"|args:$id label="Signer le devis" shape="check"}}</li> <li>{{:linkbutton href="action.html?id=%d&action=ask_deletion&show=quotation"|args:$id label="Supprimer" shape="delete" class="irreversible"}}</li> {{else}} <li>{{:linkbutton label="PDF" href="preview.html?id=%s&source=details"|args:$id shape="document"}}</li> {{if $status == $AWAITING_STATUS}} <li>{{:linkbutton href="action.html?id=%d&show=quotation&action=ask_validation"|args:$id label="Générer facture" shape="export"}}</li> | < < < < | > | > > | < > | > > > > > > | > > | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | <li>{{:linkbutton href="./edit.html?id=%d"|args:$id label="Modifier" shape="edit"}}</li> <li>{{:linkbutton href="action.html?id=%d&action=sign&show=quotation"|args:$id label="Signer le devis" shape="check"}}</li> <li>{{:linkbutton href="action.html?id=%d&action=ask_deletion&show=quotation"|args:$id label="Supprimer" shape="delete" class="irreversible"}}</li> {{else}} <li>{{:linkbutton label="PDF" href="preview.html?id=%s&source=details"|args:$id shape="document"}}</li> {{if $status == $AWAITING_STATUS}} <li>{{:linkbutton href="action.html?id=%d&show=quotation&action=ask_validation"|args:$id label="Générer facture" shape="export"}}</li> {{/if}} {{/if}} {{else}} <li>{{:linkbutton href="edit.html" label="Nouveau devis" shape="plus"}} |</li> {{if $status !== $DRAFT_STATUS}} <li>{{:linkbutton label="PDF" href="preview.html?id=%s&source=details"|args:$id shape="document"}}</li> {{/if}} {{/if}} {{if $type === $QUOTATION_TYPE}} {{:assign button_target_label='le devis'}} {{else}} {{:assign button_target_label='la facture'}} {{/if}} {{if !$cancelled && $_GET.action !== 'ask_cancelling'}} <li> <form method="POST" action="{{"action.html?id=%d&show=%s&action=ask_cancelling"|args:$id:$type}}"> {{:button type="submit" label="Annuler %s"|args:$button_target_label shape="delete" class="irreversible" name="cancel_button"}} </form> </li> {{/if}} {{if $status !== $AWAITING_STATUS}} <li>{{:linkbutton href="#" label="Archiver" shape="archive" title="prochainement"}}</li> {{/if}} </ul> </aside> {{:include file='./main_nav_tabs.html'}} </nav> |
Modified src/skel-dist/modules/invoice/include/document_list_buttons.html from [c9256f363b] to [7c1fa4b1ac].
︙ | ︙ | |||
11 12 13 14 15 16 17 | {{:button type="submit" title="Supprimer le devis (prochainement)" shape="delete" class="irreversible" name="delete_button" disabled=true}} </form></li> {{/restrict}} {{else}} <li>{{:linkbutton label="PDF" href="preview.html?id=%s"|args:$id shape="document"}}</li> {{if $status === $AWAITING_STATUS}} | > | | | | | | | | | | | | | | | > > > > > > > | | | | | > | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | {{:button type="submit" title="Supprimer le devis (prochainement)" shape="delete" class="irreversible" name="delete_button" disabled=true}} </form></li> {{/restrict}} {{else}} <li>{{:linkbutton label="PDF" href="preview.html?id=%s"|args:$id shape="document"}}</li> {{if $status === $AWAITING_STATUS}} {{if !$cancelled}} {{#restrict section="accounting" level="write"}} {{if $type === $QUOTATION_TYPE}} <li><form method="POST" action="{{"action.html?id=%d&show=quotation&action=ask_validation"|args:$id}}"> {{:button type="submit" title="Marquer comme validé et générer la facture" shape="check" name="validation_button"}} </form></li> <li><form method="POST" action="{{"action.html?id=%d&show=quotation&action=ask_rejection"|args:$id}}"> {{:button type="submit" title="Marquer comme refusé" shape="alert" name="rejection_button"}} </form></li> {{else}} <li><form method="POST" action="{{"action.html?id=%d&show=invoice&action=ask_mark_as_paid"|args:$id}}"> {{:button type="submit" title="Marquer comme payée" shape="check" name="mark_as_paid_button"}} </form></li> {{* <li>{{:linkbutton href="action.html?id=%d&show=quotation&action=ask_rejection"|args:$id title="Marquer comme abandonnée" shape="alert"}}</li> *}} {{/if}} {{/restrict}} {{/if}} {{elseif $status === $VALIDATED_STATUS}} {{if $type === $QUOTATION_TYPE && $child_id}} {{#load id=$child_id|intval}}{{:assign .='child'}}{{/load}} <li>{{:linkbutton href="?id=%d&show=invoice"|args:$child.id title="Consulter la Facture" label="F" shape="document"}}</li> {{/if}} {{elseif $status === $PAID_STATUS}} {{if $transaction_id}} {{#transactions id=$transaction_id|intval}} <li>{{:linkbutton href='!acc/transactions/details.php?id=%d'|args:$id title="Écriture comptable" label='📖'}}</li> {{/transactions}} {{/if}} {{/if}} {{#restrict section="accounting" level="write"}} {{if !$cancelled}} {{if $type === $INVOICE_TYPE}} {{:assign button_target_label='la facture'}} {{else}} {{:assign button_target_label='le devis'}} {{/if}} <li> <form method="POST" action="{{"action.html?id=%d&show=%s&action=ask_cancelling"|args:$id:$type}}"> {{:button type="submit" title="Annuler %s"|args:$button_target_label shape="delete" class="irreversible" name="cancel_button"}} </form> </li> {{/if}} {{/restrict}} {{/if}} </ul> |
Modified src/skel-dist/modules/invoice/include/preview_style.tpl from [d9d19a0772] to [45745d8d93].
1 2 3 4 5 | <style> h2.organization_name { margin-bottom: 0; } | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 | <style> h2.organization_name { margin-bottom: 0; } .organization_name, .business_name, .signing_place, .important_status { text-transform: uppercase; } ul.organization_details, ul.customer_details, ul.document_details { list-style-type: none; } |
︙ | ︙ |
Modified src/skel-dist/modules/invoice/include/schema/invoice.json from [8fceab4c16] to [f9785fbd86].
︙ | ︙ | |||
43 44 45 46 47 48 49 50 51 52 53 54 55 56 | "maxLength": 10 }, "status": { "description": "Statut", "type": "string", "enum": ["draft", "awaiting", "rejected", "validated", "paid", "misc"] }, "items": { "description": "Articles", "type": ["array", "null"], "items": { "type": "object", "properties": { "id": { "type": "integer" }, | > > > > | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | "maxLength": 10 }, "status": { "description": "Statut", "type": "string", "enum": ["draft", "awaiting", "rejected", "validated", "paid", "misc"] }, "cancelled": { "description": "Défini si la facture est annnulée", "type": "bool" }, "items": { "description": "Articles", "type": ["array", "null"], "items": { "type": "object", "properties": { "id": { "type": "integer" }, |
︙ | ︙ | |||
139 140 141 142 143 144 145 | }, "module_version": { "description": "Module version number from which the document has been generated", "type": "string", "maxLength": 12 } }, | | | 143 144 145 146 147 148 149 150 151 | }, "module_version": { "description": "Module version number from which the document has been generated", "type": "string", "maxLength": 12 } }, "required": [ "recipient_business_name", "recipient_address", "subject", "date", "status", "cancelled", "vat_exemption", "author_id", "org_contact", "last_modification_date", "module_version" ] } |
Modified src/skel-dist/modules/invoice/include/schema/quotation.json from [70b3d7ed1e] to [1d749f37a9].
︙ | ︙ | |||
43 44 45 46 47 48 49 50 51 52 53 54 55 56 | "maxLength": 10 }, "status": { "description": "Statut", "type": "string", "enum": ["draft", "awaiting", "rejected", "validated", "misc"] }, "items": { "description": "Articles", "type": ["array", "null"], "items": { "type": "object", "properties": { "id": { "type": "integer" }, | > > > > | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | "maxLength": 10 }, "status": { "description": "Statut", "type": "string", "enum": ["draft", "awaiting", "rejected", "validated", "misc"] }, "cancelled": { "description": "Défini si la facture est annnulée", "type": "bool" }, "items": { "description": "Articles", "type": ["array", "null"], "items": { "type": "object", "properties": { "id": { "type": "integer" }, |
︙ | ︙ | |||
130 131 132 133 134 135 136 | }, "module_version": { "description": "Module version number from which the document has been generated", "type": "string", "maxLength": 12 } }, | | | 134 135 136 137 138 139 140 141 142 | }, "module_version": { "description": "Module version number from which the document has been generated", "type": "string", "maxLength": 12 } }, "required": [ "recipient_business_name", "recipient_address", "subject", "date", "status", "cancelled", "vat_exemption", "author_id", "org_contact", "last_modification_date", "module_version" ] } |
Modified src/skel-dist/modules/invoice/include/style.tpl from [05954cfca6] to [28baa0b7ca].
︙ | ︙ | |||
18 19 20 21 22 23 24 | font-weight: bold; } .safe, .safe span { font-weight: bold; } | | > > > > > | 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | font-weight: bold; } .safe, .safe span { font-weight: bold; } .organization_name, .business_name, .signing_place, .important_status { text-transform: uppercase; } tr.cancelled_document, table.list tr.cancelled_document:nth-child(even) { background-color: grey; //color: black; } nav.tabs aside.menu ul, ul.list_action_buttons { border: 0; display: flex; } nav.tabs aside.menu li, .list_action_buttons li { |
︙ | ︙ |
Modified src/skel-dist/modules/invoice/index.html from [2749c8a26a] to [209945956c].
︙ | ︙ | |||
34 35 36 37 38 39 40 | {{* ==================== Listing ==================== *}} {{if $_GET.q}} <h2 class="ruler">Résultat(s) de recherche pour "{{$_GET.q}}"</h2> {{/if}} | | | | > > | | | | > > | | > | | 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | {{* ==================== Listing ==================== *}} {{if $_GET.q}} <h2 class="ruler">Résultat(s) de recherche pour "{{$_GET.q}}"</h2> {{/if}} {{:include file='./include/constants.tpl' keep='DRAFT_STATUS, AWAITING_STATUS, VALIDATED_STATUS, PAID_STATUS, TYPE_LABELS, STATUS_LABELS, CANCELLED_LABEL, QUOTATION_TYPE, INVOICE_TYPE, INVOICE_STATUS_LABELS'}} {{if $_GET.show == $QUOTATION_TYPE}} {{:assign filter="json_extract(document, '$.type') = '%s'"|args:$QUOTATION_TYPE}} {{elseif $_GET.show == 'paid'}} {{:assign filter="$$.type = :type AND $$.status = :status" type_filter=$INVOICE_TYPE status_filter=$PAID_STATUS}} {{elseif $_GET.show == 'unpaid'}} {{:assign filter="$$.type = :type AND $$.status = :status" type_filter=$INVOICE_TYPE status_filter=$AWAITING_STATUS}} {{else}} {{:assign filter="1"}} {{/if}} {{if $_GET.ok}} <p class="block confirm"> {{if $_GET.ok === '1'}} Devis enregistré. {{elseif $_GET.ok === '2'}} Devis modifié avec succès. {{elseif $_GET.ok === '4'}} Devis supprimé avec succès. {{elseif $_GET.ok === '5'}} Document annulé avec succès. {{/if}} </p> {{/if}} {{:assign list_select="key; id AS 'Numéro'; datetime($$.date) AS 'Émission'; $$.deadline AS 'Échéance'; $$.recipient_business_name AS 'Tiers'; $$.subject AS 'Intitulé'; $$.total AS 'Montant'; $$.status AS 'Statut'"}} {{:assign list_where="$$.type IN ('quotation', 'invoice') AND %s"|args:$filter}} {{:assign list_order=1}} {{if !$_GET.show}}{{:assign list_select='$$.parent_id AS "↳"; $$.type AS "Type"; '|cat:$list_select}}{{:assign list_order=3}}{{/if}} {{if $_GET.q}}{{:assign list_where=$list_where|cat:' AND ':$search_where}}{{/if}} {{#list select=$list_select where=$list_where order=$list_order desc=true :searched_id=$searched_id :searched_date=$searched_date :searched_text=$searched_text :type=$type_filter :status=$status_filter }} <tr class="{{$status}}{{if $cancelled}} cancelled_document{{/if}}"> {{if !$_GET.show}} {{:assign var="label" from="TYPE_LABELS.%s"|args:$type}} {{if $type === $INVOICE_TYPE && $parent_id}} <td colspan="2" style="text-align:left;">{{$label}} <span title="Associée au devis suivant">↴</span></td> {{else}} <td></td> <td>{{$label}}</td> |
︙ | ︙ | |||
94 95 96 97 98 99 100 | <td> {{if $type === $INVOICE_TYPE}} {{:assign var="label" from="INVOICE_STATUS_LABELS.%s"|args:$status}} {{else}} {{:assign var="label" from="STATUS_LABELS.%s"|args:$status}} {{/if}} | > | | > > > > < < | 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | <td> {{if $type === $INVOICE_TYPE}} {{:assign var="label" from="INVOICE_STATUS_LABELS.%s"|args:$status}} {{else}} {{:assign var="label" from="STATUS_LABELS.%s"|args:$status}} {{/if}} {{if !$cancelled}} {{$label}} {{if $status === $VALIDATED_STATUS}}- {{$validation_date|date_short}} {{elseif $type === $INVOICE_TYPE && $status === $PAID_STATUS}}- {{$payment_date|date_short}}{{/if}} {{else}} {{$CANCELLED_LABEL}} {{/if}} {{if $archived}} <span title="Archivé">🗃</span> {{/if}} </td> <td class="actions"> {{:include file='./include/document_list_buttons.html'}} </td> </tr> {{else}} |
︙ | ︙ |
Modified src/skel-dist/modules/invoice/preview.html from [ed0b2fa4e7] to [1584cd3f12].
1 2 3 4 5 6 7 8 9 | {{#restrict section="accounting" level="read"}} {{if !$_GET.id}} <p class="error block">Aucun document séléctionné.</p> {{/if}} {{#load id=$_GET.id}} {{:include file='./include/preview_style.tpl'}} | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | {{#restrict section="accounting" level="read"}} {{if !$_GET.id}} <p class="error block">Aucun document séléctionné.</p> {{/if}} {{#load id=$_GET.id}} {{:include file='./include/preview_style.tpl'}} {{:include file='./include/constants.tpl' keep='DRAFT_STATUS, TYPE_LABELS, CANCELLED_LABEL, NONPROFIT_VAT_EXEMPTION_TYPE'}} {{:assign var="document_type_label" from="TYPE_LABELS.%s"|args:$type}} {{:assign title='%s n°%s'|args:$document_type_label:$key}} {{if $_GET.source === 'details'}} {{:assign back='details.html?id=%d&show=%s'|args:$id:$type}} {{else}} |
︙ | ︙ | |||
47 48 49 50 51 52 53 | {{$recipient_address|escape|nl2br}} </li> {{if $recipient_member_numero || $recipient_member_id}} <li>Réf. membre : {{if $recipient_member_numero}}{{$recipient_member_numero}}{{else}}#{{$recipient_member_id}}{{/if}}</li> {{/if}} </ul> | > > | > > > | 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | {{$recipient_address|escape|nl2br}} </li> {{if $recipient_member_numero || $recipient_member_id}} <li>Réf. membre : {{if $recipient_member_numero}}{{$recipient_member_numero}}{{else}}#{{$recipient_member_id}}{{/if}}</li> {{/if}} </ul> <h1> Objet : {{$title}} {{if $status === $DRAFT_STATUS}} - <span class="important_status">BROUILLON</span> {{elseif $cancelled}} - <span class="important_status">{{$CANCELLED_LABEL}}</span> {{/if}} </h1> <ul class="document_details"> <li>Date : {{$date|date_short}}</li> <li>Référence : {{$key}}</li> <li>Intitulé : {{$subject}}</li> {{if !$introduction_text}} <li>Montant : {{$total|money_currency}}</li> {{/if}} |
︙ | ︙ |