]> git.koha-community.org Git - koha.git/commit
Bug 3050 - Add an option to upload scanned invoices #1/3
authorJacek Ablewicz <abl@biblos.pk.edu.pl>
Fri, 9 May 2014 09:30:28 +0000 (11:30 +0200)
committerGalen Charlton <gmc@esilibrary.com>
Sun, 25 May 2014 21:14:00 +0000 (21:14 +0000)
commit480847e81cca832a3e8eac35753532275ec49aec
tree73d4ce717ad367656ea088742650ab436942a474
parent7533b1c0a8369e072673f2c8102319fc9511149d
Bug 3050 - Add an option to upload scanned invoices #1/3

(part #1: new module w/ UT + script + template)

New feature, adds an ability to attach arbitrary files to
acquisition records (currently: to the invoices - but it can
be extended to baskets, basketgroups, budgets etc.).

Note: this code is (heavily) based on "Bug 8130 - attach PDF
files to a patron record" by Kale M Hall, main difference being
that new table (misc_files) and new module (Koha/Misc/Files.pm)
are intended to be a little more generic solution - they allow to
store and manage files associated with great many kinds of records,
from arbitrary tables.

Test plan:
1) Apply patch[es]
2) Run installer/data/mysql/updatedatabase.pl
3) Enable system preference 'AcqEnableFiles' in acquisition
4) New option 'Manage invoice files' appears in the invoice
detail page
5) Upload/view/download/delete some files for some invoices
6) Try to delete invoice with files attached (files should
get deleted as well)
7) Try to merge 2+ invoices with files attached; after merge,
all files previously attached to individual invoices being
merged should be attached to resulting invoice (merge destination)
8) prove t/db_dependent/Koha_Misc_Files.t
9) Ensure there are no regressions of any kind in invoice detail
page (acqui/invoice.pl).

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Koha/Misc/Files.pm [new file with mode: 0644]
acqui/invoice-files.pl [new file with mode: 0755]
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice-files.tt [new file with mode: 0644]
t/db_dependent/Koha_Misc_Files.t [new file with mode: 0755]