Overview
Comment: | Invoice module: buttons added to document lists |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | invoice_module |
Files: | files | file ages | folders |
SHA3-256: |
381c218de4c179625fc8b337f3447032 |
User & Date: | alinaar on 2023-03-10 20:23:29 |
Other Links: | branch diff | manifest | tags |
Context
2023-03-14
| ||
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 | |
19:13 | Invoice module: document actions externalized into a specific controller check-in: bd9b700573 user: alinaar tags: invoice_module | |
Changes
Modified src/skel-dist/modules/invoice/action.html from [4f15690282] to [2d8922b2b6].
︙ | ︙ | |||
38 39 40 41 42 43 44 | {{/if}} {{* ======== Forms (deletion/signing/reject/validation/payment) ============= *}} {{if $_GET.action === 'ask_deletion'}} <h2 class="ruler irreversible">Action irreversible</h2> <fieldset> | | | | | | | 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 91 92 93 94 95 96 97 98 | {{/if}} {{* ======== Forms (deletion/signing/reject/validation/payment) ============= *}} {{if $_GET.action === 'ask_deletion'}} <h2 class="ruler irreversible">Action irreversible</h2> <fieldset> <legend><h2>Suppression</h2></legend> <div class="block error"> <h3 class="infos">Vous allez supprimer définitivement le brouillon de devis n° {{$key}} : "{{$subject}}".</h3> <p class="infos">Êtes-vous sûr de vouloir continuer ?</p> <p> {{:linkbutton href="action.html?id=%d&show=quotation&action=delete"|args:$_GET.id label="Supprimer le devis" shape="delete"}} {{:linkbutton href="details.html?id=%d&show=quotation&ok=3"|args:$_GET.id label="Conserver le brouillon" shape="lock" class="safe"}} </p> </div> </fieldset> {{elseif $_GET.action === 'sign'}} <form method="POST" action=""> <fieldset> <legend><h2>Signature du devis</h2></legend> <ul id="signing_inputs"> <li>{{:input type="text" name="signing_place" label="Lieu de la signature" placeholder="ex : Dijon" default=$module.config.signing_place required=true}}</li> <li>{{:input type="date" name="signing_date" label="Date de la signature" default=$now required=true}}</li> {{if !$check_errors}}<li class="error block">Signer le devis est définitif. Vous ne pourrez plus modifier son contenu par la suite.</li>{{/if}} <li>{{:button type="submit" name="signing_submit" label="Signer le devis" class="main"}}</li> </ul> </fieldset> </form> {{elseif $_GET.action === 'ask_rejection'}} <form method="POST" action=""> <fieldset> <legend><h2>Refus du devis par le/la client.e</h2></legend> {{if !$check_errors}}<p class="error block">Refuser le devis est définitif. Vous ne pourrez pas rétablir le devis comme "en attente de validation".<br />Il sera néanmoins possible d'annuler le devis.</p>{{/if}} {{:button type="submit" name="reject_submit" label="Marquer comme refusé" class="main"}} </fieldset> </form> {{elseif $_GET.action === 'ask_validation'}} <form method="POST" action=""> <fieldset> <legend><h2>Validation du devis par le/la client.e</h2></legend> {{if !$check_errors}}<p class="error block">Valider le devis est définitif. Vous ne pourrez pas rétablir le devis comme "en attente de validation".<br />Il sera néanmoins possible d'annuler le devis.</p>{{/if}} <div class="infos">{{:input type="checkbox" name="invoice" value="1" label="Générer automatiquement une facture"}}</div> {{:button type="submit" name="validate_submit" label="Marquer comme validé" shape="check" class="main"}} </fieldset> </form> {{elseif $_GET.action === 'ask_mark_as_paid'}} <form method="POST" action=""> <fieldset> <legend><h2>Marquer la facture comme payée</h2></legend> {{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> |
︙ | ︙ |
Modified src/skel-dist/modules/invoice/include/customer_documents_for_status.tpl from [63a09b5e56] to [f004a26dd8].
︙ | ︙ | |||
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | {{if $recipient_member_id}} {{:link href="!users/details.php?id=%s"|args:$recipient_member_numero label=$recipient_member_numero}} {{else}} - {{/if}} </td> <td class="actions"> {{#restrict section="accounting" level="write"}} {{if !$archived && $status == $DRAFT_STATUS}} {{:linkbutton shape="edit" label="Modifier" href="edit.html?id=%d"|args:$id}} {{/if}} {{/restrict}} {{if $status !== $DRAFT_STATUS}} {{:linkbutton label="PDF" href="preview.html?id=%s"|args:$id shape="document"}} {{else}} {{:linkbutton label="Aperçu" href="preview.html?id=%s"|args:$id shape="document"}} {{/if}} </td> </tr> {{else}} <p>Aucun document pour le status "{{$label}}".</p> {{/list}} | > > > | 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 | {{if $recipient_member_id}} {{: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'}} {{* {{#restrict section="accounting" level="write"}} {{if !$archived && $status == $DRAFT_STATUS}} {{:linkbutton shape="edit" label="Modifier" href="edit.html?id=%d"|args:$id}} {{/if}} {{/restrict}} {{if $status !== $DRAFT_STATUS}} {{:linkbutton label="PDF" href="preview.html?id=%s"|args:$id shape="document"}} {{else}} {{:linkbutton label="Aperçu" href="preview.html?id=%s"|args:$id shape="document"}} {{/if}} *}} </td> </tr> {{else}} <p>Aucun document pour le status "{{$label}}".</p> {{/list}} |
Added src/skel-dist/modules/invoice/include/document_list_buttons.html version [c9256f363b].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | <ul class="list_action_buttons"> {{if $status == $DRAFT_STATUS}} {{#restrict section="accounting" level="write"}} <li><form method="POST" action="{{"edit.html?id=%d"|args:$id}}"> {{:button type="submit" label="Modifier" shape="edit" name="edit_button"}} </form></li> {{/restrict}} <li>{{:linkbutton label="Aperçu" href="preview.html?id=%s"|args:$id shape="document"}}</li> {{#restrict section="accounting" level="write"}} <li><form method="POST" action="{{"edit.html?id=%d"|args:$id}}"> {{: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}} {{#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}} {{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"}} <li> <form method="POST" action="{{"action.html?id=%d&show=invoice&action=ask_mark_as_paid"|args:$id}}"> {{:button type="submit" title="Annuler la facture (prochainement)" shape="delete" class="irreversible" name="cancel_button" disabled=true}} </form> </li> {{/restrict}} {{/if}} </ul> |
Modified src/skel-dist/modules/invoice/include/style.tpl from [1e09546159] to [05954cfca6].
︙ | ︙ | |||
22 23 24 25 26 27 28 | font-weight: bold; } .organization_name, .business_name, .signing_place { text-transform: uppercase; } | | > | | | | | 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 | font-weight: bold; } .organization_name, .business_name, .signing_place { text-transform: uppercase; } nav.tabs aside.menu ul, ul.list_action_buttons { border: 0; display: flex; } nav.tabs aside.menu li, .list_action_buttons li { margin: 0; } nav.tabs aside.menu li a, .list_action_buttons li a { background: none; border-radius: 0; padding: 0.2em 0.4em; } nav.tabs aside.menu li a:hover, .list_action_buttons li a:hover { border: 1px solid rgba(var(--gMainColor), 0.5); } nav.tabs aside.menu li a.icn-btn, .list_action_buttons li a.icn-btn { margin: 0.2em 0.2em; } </style> |
Modified src/skel-dist/modules/invoice/index.html from [a98e18125d] to [2749c8a26a].
︙ | ︙ | |||
104 105 106 107 108 109 110 | {{if $archived}} <span title="Archivé">🗃</span> {{elseif $type === $INVOICE_TYPE && $status === $PAID_STATUS}} - {{$payment_date|date_short}} {{/if}} </td> <td class="actions"> | < < < < | < < < | 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | {{if $archived}} <span title="Archivé">🗃</span> {{elseif $type === $INVOICE_TYPE && $status === $PAID_STATUS}} - {{$payment_date|date_short}} {{/if}} </td> <td class="actions"> {{:include file='./include/document_list_buttons.html'}} </td> </tr> {{else}} <tr><td colspan="6">{{if !$_GET.q}}Aucun document.{{else}}Aucun résultat correspondant à "{{$_GET.q}}".{{/if}}</td></tr> {{/list}} {{:admin_footer}} {{else}} {{:error message="Seuls les membres avec accès en lecture à la comptabilité peuvent visualiser cette page."}} {{/restrict}} |