Bugzilla – Attachment 18810 Details for
Bug 10412
The ability to update Acquisitions with credit notes, with the option to link to an existing invoice
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Adding new table aqcreditnotes
0002-Bug-10412-Adding-new-table-aqcreditnotes.patch (text/plain), 3.57 KB, created by
Amit Gupta
on 2013-06-10 08:27:07 UTC
(
hide
)
Description:
Adding new table aqcreditnotes
Filename:
MIME Type:
Creator:
Amit Gupta
Created:
2013-06-10 08:27:07 UTC
Size:
3.57 KB
patch
obsolete
>From 66383c70424f07690e921a562b118b0fd2328352 Mon Sep 17 00:00:00 2001 >From: Amit Gupta <amitddng135@gmail.com> >Date: Mon, 10 Jun 2013 13:34:41 +0530 >Subject: [PATCH 2/4] Bug 10412 - Adding new table aqcreditnotes. > >--- > installer/data/mysql/kohastructure.sql | 21 +++++++++++++++++++++ > installer/data/mysql/updatedatabase.pl | 20 ++++++++++++++++++++ > 2 files changed, 41 insertions(+) > >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index ca2f2b2..2a53385 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -2961,6 +2961,27 @@ CREATE TABLE aqinvoices ( > > > -- >+-- Table structure for table 'aqcreditnotes' >+-- >+ >+DROP TABLE IF EXISTS aqcreditnotes; >+CREATE TABLE aqcreditnotes ( >+ `creditnote_id` int(11) NOT NULL AUTO_INCREMENT, -- ID of the creditnote, primary key >+ `booksellerid` int(11) NOT NULL, -- foreign key to aqbooksellers >+ `invoiceid` int(11) NOT NULL, -- foreign key to aqinvoices >+ `vendorrefid` varchar(20) NOT NULL, -- Vendorreferenceid >+ `budget_id` int(11) NOT NULL, -- foreign key to aqbudgets >+ `amountcredit` decimal(28,6) default NULL, -- amountcredit cost >+ `creditdate` date default NULL, -- date of amountcredit >+ `notes` mediumtext, -- notes of amountcredit >+ `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, -- date and time this record was last touched >+ PRIMARY KEY (creditnote_id), >+ CONSTRAINT aqcreditnotes_fk_aqbooksellerid FOREIGN KEY (booksellerid) REFERENCES aqbooksellers (id) ON DELETE CASCADE ON UPDATE CASCADE, >+ CONSTRAINT aqcreditnotes_fk_invoiceid FOREIGN KEY (invoiceid) REFERENCES aqinvoices (invoiceid) ON DELETE CASCADE ON UPDATE CASCADE, >+ CONSTRAINT aqcreditnotes_fk_budget_id FOREIGN KEY (budget_id) REFERENCES aqbudgets (budget_id) ON DELETE CASCADE ON UPDATE CASCADE >+) ENGINE=InnoDB DEFAULT CHARSET=utf8; >+ >+-- > -- Table structure for table `fieldmapping` > -- > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 648e161..30f9c70 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -6990,6 +6990,26 @@ if ( CheckVersion($DBversion) ) { > SetVersion($DBversion); > } > >+$DBversion = "3.13.00.XXX"; >+if (C4::Context->preference("Version") < TransformToNum($DBversion)) { >+ $dbh->do("CREATE TABLE aqcreditnotes ( >+ `creditnote_id` int(11) NOT NULL AUTO_INCREMENT, >+ `booksellerid` int(11) NOT NULL, >+ `invoiceid` int(11) NOT NULL, >+ `vendorrefid` varchar(80) NOT NULL, >+ `budget_id` int(11) NOT NULL, >+ `amountcredit` decimal(28,6) default NULL, >+ `creditdate` date default NULL, >+ `notes` mediumtext, >+ `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, >+ PRIMARY KEY (creditnote_id), >+ CONSTRAINT aqcreditnotes_fk_aqbooksellerid FOREIGN KEY (booksellerid) REFERENCES aqbooksellers (id) ON DELETE CASCADE ON UPDATE CASCADE, >+ CONSTRAINT aqcreditnotes_fk_invoiceid FOREIGN KEY (invoiceid) REFERENCES aqinvoices (invoiceid) ON DELETE CASCADE ON UPDATE CASCADE, >+ CONSTRAINT aqcreditnotes_fk_budget_id FOREIGN KEY (`budget_id`) REFERENCES `aqbudgets` (`budget_id`) ON DELETE CASCADE ON UPDATE CASCADE >+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8"); >+ print "Upgrade to $DBversion done (Added new table aqcreditnotes)\n"; >+ SetVersion($DBversion); >+} > > =head1 FUNCTIONS > >-- >1.7.9.5 >
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 10412
:
18809
|
18810
|
22059
|
22060
|
22538
|
22539