Overview
Comment: | Dynamic quotation form added to invoice module |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | invoice_module |
Files: | files | file ages | folders |
SHA3-256: |
d5fe087e012c73cc57552d5a8e7a2464 |
User & Date: | alinaar on 2023-01-18 15:31:01 |
Other Links: | branch diff | manifest | tags |
Context
2023-01-20
| ||
09:59 | Module configuration from file (module.json) implemented check-in: 09b52087f2 user: alinaar tags: invoice_module | |
2023-01-18
| ||
15:31 | Dynamic quotation form added to invoice module check-in: d5fe087e01 user: alinaar tags: invoice_module | |
15:28 | Invoice module configuration added check-in: c925f86d64 user: alinaar tags: invoice_module | |
Changes
src/include/data/schema.sql became a regular file with contents [57116110a2].
Modified src/skel-dist/modules/invoice/index.html from [8f331d0c5a] to [ac4e8dc81f].
︙ | ︙ | |||
63 64 65 66 67 68 69 70 71 | </td> </tr> {{else}} <tr><td colspan="6">Aucun document</td></tr> {{/load}} </tbody> </table> {{:admin_footer}} | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 99 100 101 102 103 104 105 106 107 108 109 110 111 | </td> </tr> {{else}} <tr><td colspan="6">Aucun document</td></tr> {{/load}} </tbody> </table> <h1>Création d'un devis</h1> <form method="POST" action=""> <fieldset> <legend><h2>Liste des articles</h2></legend> <p id="item_list_no_item_message">Aucun article pour le moment.</p> <table id="item_list" style="display: none;"> <tr> <th>Dénomination</th> <th>Prix unitaire</th> <th>Quantité</th> <th>Total</th> </tr> <tr> <td colspan="3">Total :</td> <td><em id="quotation_total">0</em></td> </tr> </table> <p>{{:linkbutton label="Ajouter un article" href="item_form.html" shape="settings" target="_dialog"}}</p> </fieldset> <input type="submit" name="" label="" value="Valider la création de devis (prochainement)" disabled="disabled" /> </form> {{if $module.config.payment_detail || $module.config.bic}} <h2>Informations affichées en bas du devis</h2> {{if $module.config.payment_detail}} <p> {{$module.config.payment_detail}} </p> {{/if}} {{if $module.config.bic}} <p> BIC : {{$module.config.bic}}<br /> IBAN : {{$module.config.iban}}<br /> BANQUE : {{$module.config.bank}} </p> {{/if}} <p>(Ces informations sont modifiables dans la configuration du module.)</p> {{/if}} {{:admin_footer}} |
Added src/skel-dist/modules/invoice/item_form.html version [66af0a20fb].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 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 | {{:admin_header title="Ajouter un article au devis"}} <script type="text/javascript"> function add_item() { const DEVISE = '€'; // Need to load paheko constant here let rowLine; let td; rowLine = document.createElement('tr'); rowLine.classList.add('item'); let fields = ['item_name_0', 'item_description_0', 'item_unit_price_0', 'item_quantity_0']; for (let i = 0; i < 4; ++i) { td = document.createElement('td'); td.classList.add(fields[i]); td.innerHTML = document.getElementById(fields[i]).value; rowLine.appendChild(td); } window.parent.document.getElementById('item_list_no_item_message').style.display = 'none'; window.parent.document.getElementById('item_list').style.display = 'block'; window.parent.document.getElementById('item_list').appendChild(rowLine); window.parent.document.getElementById('quotation_total').textContent = computeTotal() + ' ' + DEVISE; window.parent.g.closeDialog(); } function computeTotal() { let items = window.parent.document.getElementById('item_list').getElementsByClassName('item'); let total = 0.0; for (let i = 0; i < items.length; ++i) { total += items[i].children[2].textContent * items[i].children[3].textContent; } return total; } </script> <form method="POST" action="" id="item_creation_form"> <fieldset> <legend>Ajouter un article</legend> <ul> <li><label for="item_name_0">Dénomination</label><input type="text" name="item_name[]" id="item_name_0" label="" placeholder="ex : barnum" value="" /></li> <li><label for="item_description_0">Description</label><textarea name="item_description[]" id="item_description_0" label="" placeholder=""></textarea></li> <li><label for="item_unit_price">Prix unitaire</label><input type="text" name="item_unit_price[]" id="item_unit_price_0" label="" placeholder="" value="" /></li> <li><label for="item_quantity">Quantité</label><input type="text" name="item_quantity[]" id="item_quantity_0" label="" placeholder="" value="" /></li> </ul> <input type="button" name="" id="item_addition_button" onclick="add_item()" value="Ajouter l'article au devis" /> </fieldset> </form> {{:admin_footer}} |
Modified src/templates/services/user/add.tpl from [75a53db512] to [3d0b894a61].
︙ | ︙ |
Modified src/templates/users/selector.tpl from [3a80c4c617] to [2d479c3439].
︙ | ︙ |