3 /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
6 * Contributions related routes
10 * Copyright © 2014-2016 The Galette Team
12 * This file is part of Galette (http://galette.tuxfamily.org).
14 * Galette is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation, either version 3 of the License, or
17 * (at your option) any later version.
19 * Galette is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with Galette. If not, see <http://www.gnu.org/licenses/>.
30 * @author Johan Cwiklinski <johan@x-tnd.be>
31 * @copyright 2014-2016 The Galette Team
32 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL License 3.0 or (at your option) any later version
34 * @link http://galette.tuxfamily.org
35 * @since 0.8.2dev 2014-11-27
38 use Galette\Controllers\Crud
;
39 use Galette\Controllers\PdfController
;
41 use Galette\Repository\Contributions
;
42 use Galette\Entity\Transaction
;
43 use Galette\Repository\Transactions
;
44 use Galette\Repository\Members
;
45 use Galette\Entity\Adherent
;
46 use Galette\Entity\ContributionsTypes
;
47 use Galette\Core\GaletteMail
;
48 use Galette\Entity\Texts
;
49 use Galette\Repository\PaymentTypes
;
52 '/{type:transactions|contributions}[/{option:page|order|member}/{value:\d+|all}]',
53 Crud\ContributionsController
::class . ':list'
54 )->setName('contributions')->add($authenticate);
57 '/{type:contributions|transactions}/filter',
58 Crud\ContributionsController
::class . ':filter'
59 )->setName('payments_filter')->add($authenticate);
62 '/contribution/{type:fee|donation}/add',
63 Crud\ContributionsController
::class . ':add'
64 )->setName('addContribution')->add($authenticate);
67 '/contribution/{type:fee|donation}/edit/{id:\d+}',
68 Crud\ContributionsController
::class . ':edit'
69 )->setName('editContribution')->add($authenticate);
72 '/contribution/{type:fee|donation}/add',
73 Crud\ContributionsController
::class . ':doAdd'
74 )->setName('doAddContribution')->add($authenticate);
77 '/contribution/{type:fee|donation}/edit/{id:\d+}',
78 Crud\ContributionsController
::class . ':doEdit'
79 )->setName('doEditContribution')->add($authenticate);
82 '/transaction/{action:add|edit}[/{id:\d+}]',
83 Crud\TransactionsController
::class . ':edit'
84 )->setName('transaction')->add($authenticate);
87 '/transaction/{id}/attach/{cid}',
88 Crud\TransactionsController
::class . ':attach'
89 )->setName('attach_contribution')->add($authenticate);
92 '/transaction/{id}/detach/{cid}',
93 Crud\TransactionsController
::class . ':detach'
94 )->setName('detach_contribution')->add($authenticate);
98 Crud\TransactionsController
::class . ':doAdd'
99 )->setName('doEditTransaction')->add($authenticate);
102 '/transaction/edit/{id:\d+}',
103 Crud\TransactionsController
::class . ':doEdit'
104 )->setName('doEditTransaction')->add($authenticate);
107 '/{type:contributions|transactions}/remove' . '/{id:\d+}',
108 Crud\ContributionsController
::class . ':confirmDelete'
109 )->setName('removeContribution')->add($authenticate);
112 '/{type:contributions|transactions}/batch/remove',
113 Crud\ContributionsController
::class . ':confirmDelete'
114 )->setName('removeContributions')->add($authenticate);
117 '/{type:contributions|transactions}/remove[/{id}]',
118 Crud\ContributionsController
::class . ':delete'
119 )->setName('doRemoveContribution')->add($authenticate);
123 '/contribution/print/{id:\d+}',
124 PdfController
::class . ':contribution'
125 )->setName('printContribution')->add($authenticate);
129 GaletteController
::class . ':documentLink'
130 )->setName('directlink');
134 PdfController
::class . ':directlinkDocument'
135 )->setName('get-directlink');