Bugzilla – Attachment 66475 Details for
Bug 19166
Add the ability to add adjustments to an invoice
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19166 - Database changes
Bug-19166---Database-changes.patch (text/plain), 3.28 KB, created by
Nick Clemens (kidclamp)
on 2017-08-25 13:14:12 UTC
(
hide
)
Description:
Bug 19166 - Database changes
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2017-08-25 13:14:12 UTC
Size:
3.28 KB
patch
obsolete
>From a27e6d2141748aba7f8432cfdea0be8856a6e928 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 23 Aug 2017 16:12:25 +0000 >Subject: [PATCH] Bug 19166 - Database changes > >--- > installer/data/mysql/atomicupdate/bug_19166.perl | 19 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 18 ++++++++++++++++++ > 2 files changed, 37 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug_19166.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_19166.perl b/installer/data/mysql/atomicupdate/bug_19166.perl >new file mode 100644 >index 0000000..51d6682 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_19166.perl >@@ -0,0 +1,19 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ $dbh->do( " >+ CREATE TABLE IF NOT EXISTS invoice_adjustments ( >+ adjustment_id int(11) NOT NULL AUTO_INCREMENT, >+ invoiceid int(11) NOT NULL, >+ adjustment decimal(28,6), >+ reason mediumtext default NULL, >+ budget_id int(11) default NULL, >+ encumber_open smallint(1) NOT NULL default 1, >+ timestamp timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, >+ PRIMARY KEY (adjustment_id), >+ CONSTRAINT invoice_adjustments_fk_invoiceid FOREIGN KEY (invoiceid) REFERENCES aqinvoices (invoiceid) ON DELETE CASCADE ON UPDATE CASCADE, >+ CONSTRAINT invoice_adjustments_fk_budget_id FOREIGN KEY (budget_id) REFERENCES aqbudgets (budget_id) ON DELETE SET NULL ON UPDATE CASCADE >+ ) >+ " ); >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 19166 - Add the ability to add adjustments to an invoice)\n"; >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index e227125..7e96176 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -848,6 +848,24 @@ CREATE TABLE `import_items` ( > ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; > > -- >+-- Table structure for table 'invoice_adjustments' >+-- >+ >+DROP TABLE IF EXISTS invoice_adjustments; >+CREATE TABLE IF NOT EXISTS invoice_adjustments ( >+ adjustment_id int(11) NOT NULL AUTO_INCREMENT, -- primary key for adjustments >+ invoiceid int(11) NOT NULL, -- foreign key to link an adjustment to an invoice >+ adjustment decimal(28,6), -- amount of adjustment >+ reason mediumtext default NULL, -- text to explain reason for adjustment >+ budget_id int(11) default NULL, -- optional link to budget to apply adjustment to >+ encumber_open smallint(1) NOT NULL default 1, -- whether or not to encumber the finds when invoice is still open, 1 = yes, 0 = no >+ timestamp timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- timestamp of last adjustment to adjustment >+ PRIMARY KEY (adjustment_id), >+ CONSTRAINT invoice_adjustments_fk_invoiceid FOREIGN KEY (invoiceid) REFERENCES aqinvoices (invoiceid) ON DELETE CASCADE ON UPDATE CASCADE, >+ CONSTRAINT invoice_adjustments_fk_budget_id FOREIGN KEY (budget_id) REFERENCES aqbudgets (budget_id) ON DELETE SET NULL ON UPDATE CASCADE >+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; >+ >+-- > -- Table structure for table `issuingrules` > -- > >-- >2.1.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 19166
:
66475
|
66476
|
67599
|
67600
|
67601
|
67602
|
67890
|
70413
|
70414
|
70415
|
70416
|
72702
|
72703
|
72704
|
72705
|
72744
|
72978
|
73481
|
73482
|
73483
|
73484
|
73485
|
73486
|
73487
|
74742
|
74743
|
74744
|
74745
|
74746
|
74747
|
74748
|
74843
|
74893
|
74894
|
74895
|
74896
|
74897
|
74898
|
74899
|
74900
|
75014
|
75043
|
76994
|
76995
|
76996
|
76997
|
76998
|
76999
|
77000
|
77001
|
77002
|
77003
|
77004
|
77104
|
77105
|
77106
|
77107
|
77108
|
77109
|
77110
|
77111
|
77112
|
77113
|
77114
|
77115
|
77116
|
77117
|
77118
|
77119
|
77120
|
77121
|
77122
|
77123
|
77124
|
77125
|
77126
|
77127
|
77128
|
77129
|
77130
|
77131
|
77132
|
77133
|
77134
|
77329