Overview
Comment: | Fix reference value was missing in simple transaction edit |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
c8034ab4818e72b059ce87f66370fbc3 |
User & Date: | bohwaz on 2020-12-08 02:06:26 |
Other Links: | manifest | tags |
Context
2020-12-08
| ||
15:50 | Don't repeat similar label if fee label is same as service label check-in: 416d123b08 user: bohwaz tags: trunk | |
02:06 | Fix reference value was missing in simple transaction edit check-in: c8034ab481 user: bohwaz tags: trunk | |
00:58 | Show volunteering accounts differently, mark them in the chart, and allow to select them in advanced transaction creation check-in: b59f477a0f user: bohwaz tags: trunk | |
Changes
Modified src/include/lib/Garradin/Entities/Accounting/Transaction.php from [acd6868e2d] to [d9fc699598].
︙ | ︙ | |||
155 156 157 158 159 160 161 162 163 164 165 166 167 168 | if ($line->id === $id) { return $line; } } return null; } public function getLinesCreditSum() { $sum = 0; foreach ($this->getLines() as $line) { $sum += $line->credit; | > > > > > > > > > > > | 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | if ($line->id === $id) { return $line; } } return null; } public function getFirstLine() { $lines = $this->getLines(); if (!count($lines)) { return null; } return reset($lines); } public function getLinesCreditSum() { $sum = 0; foreach ($this->getLines() as $line) { $sum += $line->credit; |
︙ | ︙ |
Modified src/templates/acc/transactions/edit.tpl from [ca18285ee8] to [4887135527].
︙ | ︙ | |||
50 51 52 53 54 55 56 | {/if} </fieldset> {/foreach} <fieldset> <legend>Détails facultatifs</legend> <dl data-types="t{$transaction::TYPE_REVENUE} t{$transaction::TYPE_EXPENSE} t{$transaction::TYPE_TRANSFER}"> | | | | 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 | {/if} </fieldset> {/foreach} <fieldset> <legend>Détails facultatifs</legend> <dl data-types="t{$transaction::TYPE_REVENUE} t{$transaction::TYPE_EXPENSE} t{$transaction::TYPE_TRANSFER}"> {input type="text" name="payment_reference" label="Référence de paiement" help="Numéro de chèque, numéro de transaction CB, etc." default=$first_line.reference} </dl> <dl> {input type="list" multiple=true name="users" label="Membres associés" target="membres/selector.php" default=$linked_users} {input type="textarea" name="notes" label="Remarques" rows=4 cols=30 source=$transaction} {input type="file" name="file" label="Ajouter un fichier joint"} </dl> <dl data-types="all-but-advanced"> {if count($analytical_accounts) > 1} {input type="select" name="id_analytical" label="Projet (compte analytique)" options=$analytical_accounts default=$first_line.id_analytical} {/if} </dl> </fieldset> <p class="submit"> {csrf_field key="acc_edit_%d"|args:$transaction.id} {button type="submit" name="save" label="Enregistrer" shape="right" class="main"} |
︙ | ︙ |
Modified src/www/admin/acc/transactions/edit.php from [c7a0fc0b35] to [88e340bd1d].
︙ | ︙ | |||
78 79 80 81 82 83 84 | $lines = $transaction->getLinesWithAccounts(); foreach ($lines as $k => &$line) { $line->account = [$line->id_account => sprintf('%s — %s', $line->account_code, $line->account_name)]; } } | | < < | | 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | $lines = $transaction->getLinesWithAccounts(); foreach ($lines as $k => &$line) { $line->account = [$line->id_account => sprintf('%s — %s', $line->account_code, $line->account_name)]; } } $first_line = $transaction->getFirstLine(); if ($transaction->type != Transaction::TYPE_ADVANCED) { $types_accounts = $transaction->getTypesAccounts(); } $amount = $transaction->getLinesCreditSum(); $tpl->assign(compact('transaction', 'lines', 'types_accounts', 'amount', 'first_line')); $tpl->assign('types_details', Transaction::getTypesDetails()); $tpl->assign('chart_id', $chart->id()); $tpl->assign('analytical_accounts', ['' => '-- Aucun'] + $accounts->listAnalytical()); $tpl->assign('linked_users', $transaction->listLinkedUsersAssoc()); $tpl->display('acc/transactions/edit.tpl'); |