Bugzilla – Attachment 97816 Details for
Bug 23355
Add a 'cashup' process to accounts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23355: Add cash_register_actions table
Bug-23355-Add-cashregisteractions-table.patch (text/plain), 3.51 KB, created by
Martin Renvoize (ashimema)
on 2020-01-23 14:15:45 UTC
(
hide
)
Description:
Bug 23355: Add cash_register_actions table
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-01-23 14:15:45 UTC
Size:
3.51 KB
patch
obsolete
>From 8ab45a4bfc34fa81a8f45e682be0802ceab4a1c6 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 23 Jul 2019 14:05:18 +0100 >Subject: [PATCH] Bug 23355: Add cash_register_actions table > >This patch adds the new cash_register_actions database table to allow >for storing of cash register actions which are not already stored as >accountlines. > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > .../data/mysql/atomicupdate/bug_23355.perl | 19 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 16 ++++++++++++++++ > 2 files changed, 35 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_23355.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_23355.perl b/installer/data/mysql/atomicupdate/bug_23355.perl >new file mode 100644 >index 0000000000..6517d5361c >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_23355.perl >@@ -0,0 +1,19 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if ( CheckVersion($DBversion) ) { >+ >+ $dbh->do(qq{ >+CREATE TABLE `cash_register_actions` ( >+ `id` int(11) NOT NULL auto_increment, -- unique identifier for each account register action >+ `code` varchar(24) NOT NULL, -- action code denoting the type of action recorded (enum), >+ `manager_id` int(11) NOT NULL, -- staff member performing the action >+ `amount` decimal(28,6) DEFAULT NULL, -- amount recorded in action (signed) >+ `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, >+ PRIMARY KEY (`id`), >+ CONSTRAINT `cash_register_actions_manager` FOREIGN KEY (`manager_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE, >+ CONSTRAINT `cash_register_actions_register` FOREIGN KEY (`register_id`) REFERENCES `cash_registers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE >+) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci; >+ }); >+ >+ SetVersion($DBversion); >+ print "Upgrade to $DBversion done (Bug 23355 - Add cash_register_actions table)\n"; >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 3f28188c02..c82466c350 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -2747,6 +2747,22 @@ CREATE TABLE `account_offsets` ( > CONSTRAINT `account_offsets_ibfk_t` FOREIGN KEY (`type`) REFERENCES `account_offset_types` (`type`) ON DELETE CASCADE ON UPDATE CASCADE > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > >+-- >+-- Table structure for table `cash_register_actions` >+-- >+ >+CREATE TABLE `cash_register_actions` ( >+ `id` int(11) NOT NULL auto_increment, -- unique identifier for each account register action >+ `code` varchar(24) NOT NULL, -- action code denoting the type of action recorded (enum), >+ `register_id` int(11) NOT NULL, -- id of cash_register this action belongs to, >+ `manager_id` int(11) NOT NULL, -- staff member performing the action >+ `amount` decimal(28,6) DEFAULT NULL, -- amount recorded in action (signed) >+ `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, >+ PRIMARY KEY (`id`), >+ CONSTRAINT `cash_register_actions_manager` FOREIGN KEY (`manager_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE CASCADE ON UPDATE CASCADE, >+ CONSTRAINT `cash_register_actions_register` FOREIGN KEY (`register_id`) REFERENCES `cash_registers` (`id`) ON DELETE CASCADE ON UPDATE CASCADE >+) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_unicode_ci; >+ > -- > -- Table structure for table `action_logs` > -- >-- >2.20.1
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 23355
:
92941
|
92942
|
92943
|
92944
|
92945
|
92946
|
92947
|
92948
|
92949
|
92950
|
92951
|
92952
|
92953
|
97031
|
97032
|
97033
|
97034
|
97035
|
97036
|
97037
|
97038
|
97039
|
97040
|
97041
|
97043
|
97044
|
97045
|
97046
|
97047
|
97048
|
97049
|
97050
|
97051
|
97052
|
97053
|
97054
|
97077
|
97078
|
97079
|
97080
|
97081
|
97082
|
97083
|
97084
|
97085
|
97086
|
97087
|
97088
|
97089
|
97706
|
97707
|
97708
|
97709
|
97710
|
97711
|
97712
|
97713
|
97714
|
97715
|
97716
|
97784
|
97785
|
97786
|
97787
|
97788
|
97789
|
97790
|
97791
|
97792
|
97793
|
97794
|
97816
|
97817
|
97818
|
97819
|
97820
|
97821
|
97822
|
97823
|
98026
|
98027
|
98028
|
98835
|
98836
|
98837
|
98838
|
98839
|
98840
|
98841
|
98842
|
100009
|
100010
|
100011
|
100012
|
100013
|
100014
|
100015
|
100016
|
100017
|
100018
|
100019
|
100020
|
100021
|
100030
|
100090
|
101685