Bugzilla – Attachment 28125 Details for
Bug 3050
Add an option to upload scanned invoices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 3050 - Add an option to upload scanned invoices #3/3
Bug-3050---Add-an-option-to-upload-scanned-invoice.patch (text/plain), 5.30 KB, created by
Jacek Ablewicz
on 2014-05-09 10:32:42 UTC
(
hide
)
Description:
Bug 3050 - Add an option to upload scanned invoices #3/3
Filename:
MIME Type:
Creator:
Jacek Ablewicz
Created:
2014-05-09 10:32:42 UTC
Size:
5.30 KB
patch
obsolete
>From 047ae0efcda9d88ddd1cae752d0700780f124f15 Mon Sep 17 00:00:00 2001 >From: Jacek Ablewicz <abl@biblos.pk.edu.pl> >Date: Fri, 9 May 2014 11:47:16 +0200 >Subject: [PATCH] Bug 3050 - Add an option to upload scanned invoices #3/3 > >(part #3: DB updates + new syspref) >--- > installer/data/mysql/kohastructure.sql | 18 ++++++++++++++++ > installer/data/mysql/sysprefs.sql | 1 + > installer/data/mysql/updatedatabase.pl | 22 ++++++++++++++++++++ > .../en/modules/admin/preferences/acquisitions.pref | 6 ++++++ > 4 files changed, 47 insertions(+) > >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 92ab713..8111305 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -3402,6 +3402,24 @@ CREATE TABLE IF NOT EXISTS marc_modification_template_actions ( > CONSTRAINT `mmta_ibfk_1` FOREIGN KEY (`template_id`) REFERENCES `marc_modification_templates` (`template_id`) ON DELETE CASCADE ON UPDATE CASCADE > ) ENGINE=InnoDB DEFAULT CHARSET=utf8; > >+-- >+-- Table structure for table `misc_files` >+-- >+ >+CREATE TABLE IF NOT EXISTS `misc_files` ( -- miscellaneous files attached to records from various tables >+ `file_id` int(11) NOT NULL AUTO_INCREMENT, -- unique id for the file record >+ `table_tag` varchar(255) NOT NULL, -- usually table name, or arbitrary unique tag >+ `record_id` int(11) NOT NULL, -- record id from the table this file is associated to >+ `file_name` varchar(255) NOT NULL, -- file name >+ `file_type` varchar(255) NOT NULL, -- MIME type of the file >+ `file_description` varchar(255) DEFAULT NULL, -- description given to the file >+ `file_content` longblob NOT NULL, -- file content >+ `date_uploaded` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, -- date and time the file was added >+ PRIMARY KEY (`file_id`), >+ KEY `table_tag` (`table_tag`), >+ KEY `record_id` (`record_id`) >+) ENGINE=InnoDB DEFAULT CHARSET=utf8; >+ > /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; > /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; > /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index be2f63f..9c1123e 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -1,5 +1,6 @@ > INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES > ('AcqCreateItem','ordering','ordering|receiving|cataloguing','Define when the item is created : when ordering, when receiving, or in cataloguing module','Choice'), >+('AcqEnableFiles','0',NULL,'If enabled, allows librarians to upload and attach arbitrary files to invoice records.','YesNo'), > ('AcqItemSetSubfieldsWhenReceived','','','Upon receiving items, update their subfields if they were created when placing an order (e.g. o=5|a="foo bar")','Free'), > ('AcquisitionDetails', '1', '', 'Hide/Show acquisition details on the biblio detail page.', 'YesNo'), > ('AcqViewBaskets','user','user|branch|all','Define which baskets a user is allowed to view: his own only, any within his branch or all','Choice'), >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 3b1718c..5a7e3d9 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -8465,6 +8465,28 @@ if ( CheckVersion($DBversion) ) { > SetVersion($DBversion); > } > >+$DBversion = "3.15.00.XXX"; >+if (CheckVersion($DBversion)) { >+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,type) VALUES('AcqEnableFiles','0','If enabled, allows librarians to upload and attach arbitrary files to invoice records.','YesNo')"); >+ $dbh->do(" >+CREATE TABLE IF NOT EXISTS `misc_files` ( >+ `file_id` int(11) NOT NULL AUTO_INCREMENT, >+ `table_tag` varchar(255) NOT NULL, >+ `record_id` int(11) NOT NULL, >+ `file_name` varchar(255) NOT NULL, >+ `file_type` varchar(255) NOT NULL, >+ `file_description` varchar(255) DEFAULT NULL, >+ `file_content` longblob NOT NULL, -- file content >+ `date_uploaded` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, >+ PRIMARY KEY (`file_id`), >+ KEY `table_tag` (`table_tag`), >+ KEY `record_id` (`record_id`) >+) ENGINE=InnoDB DEFAULT CHARSET=utf8; >+ "); >+ print "Upgrade to $DBversion done (Bug 3050 - Add an option to upload scanned invoices)\n"; >+ SetVersion($DBversion); >+} >+ > =head1 FUNCTIONS > > =head2 TableExists($table) >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref >index b32acdc..ac57f95 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/acquisitions.pref >@@ -46,6 +46,12 @@ Acquisitions: > - Upon receiving items, update their subfields if they were created when placing an order (e.g. o=5|a="foo bar"). > - pref: AcqItemSetSubfieldsWhenReceived > - >+ - pref: AcqEnableFiles >+ choices: >+ yes: Do >+ no: "Don't" >+ - enable the ability to upload and attach arbitrary files to invoices. >+ - > - Set the mapping values for a new order line created from a MARC record in a staged file. > - pref: MarcFieldsToOrder > type: textarea >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 3050
:
25253
|
25306
|
26724
|
28123
|
28124
|
28125
|
28362
|
28363
|
28364
|
28391
|
28392
|
28393
|
28394