Bugzilla – Attachment 2576 Details for
Bug 5173
Allow the discount to be editable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Second patch - database update
0002-Bug-5173-database-changes-to-save-the-discount-value.patch (text/plain), 2.74 KB, created by
Robin Sheat
on 2010-08-26 05:37:55 UTC
(
hide
)
Description:
Second patch - database update
Filename:
MIME Type:
Creator:
Robin Sheat
Created:
2010-08-26 05:37:55 UTC
Size:
2.74 KB
patch
obsolete
>From a5e3a6f11e095745e83edf787948f29903d10e63 Mon Sep 17 00:00:00 2001 >From: Robin Sheat <robin@catalyst.net.nz> >Date: Thu, 26 Aug 2010 17:31:29 +1200 >Subject: [PATCH 2/2] Bug 5173 - database changes to save the discount value > >This will save the discount value specified for an order so that it >doesn't come up as '0.00%' when you view an order again. >--- > acqui/neworderempty.pl | 1 + > installer/data/mysql/kohastructure.sql | 1 + > installer/data/mysql/updatedatabase.pl | 8 ++++++++ > kohaversion.pl | 2 +- > 4 files changed, 11 insertions(+), 1 deletions(-) > >diff --git a/acqui/neworderempty.pl b/acqui/neworderempty.pl >index a580ae7..6dd4848 100755 >--- a/acqui/neworderempty.pl >+++ b/acqui/neworderempty.pl >@@ -347,6 +347,7 @@ $template->param( > quantity => $data->{'quantity'}, > quantityrec => $data->{'quantity'}, > rrp => $data->{'rrp'}, >+ discount => $data->{'discount'}, > listprice => sprintf("%.2f", $data->{'listprice'}||$listprice), > total => sprintf("%.2f", ($data->{'ecost'}||0)*($data->{'quantity'}||0) ), > ecost => $data->{'ecost'}, >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index e42652c..592bcb4 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -2522,6 +2522,7 @@ CREATE TABLE `aqorders` ( > `currency` varchar(3) default NULL, > `listprice` decimal(28,6) default NULL, > `totalamount` decimal(28,6) default NULL, >+ `discount` float(6,4) default 0, > `datereceived` date default NULL, > `booksellerinvoicenumber` mediumtext, > `freight` decimal(28,6) default NULL, >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index a0b5c4a..e289a21 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -3701,6 +3701,14 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { > SetVersion ($DBversion); > } > >+$DBversion = "3.01.00.146"; >+if (C4::Context->preference("Version") < TransformToNum($DBversion)) { >+ $dbh->do('ALTER TABLE aqorders ADD COLUMN discount FLOAT(6,4) DEFAULT NULL;'); >+ print "Upgrade to $DBversion done (Add 'discount' column on aqorders)\n"; >+ SetVersion ($DBversion); >+} >+ >+ > =item DropAllForeignKeys($table) > > Drop all foreign keys of the table $table >diff --git a/kohaversion.pl b/kohaversion.pl >index 63b6d31..ffd2e69 100644 >--- a/kohaversion.pl >+++ b/kohaversion.pl >@@ -11,7 +11,7 @@ use strict; > > sub kohaversion { > >- our $VERSION = '3.01.00.145'; >+ our $VERSION = '3.01.00.146'; > > # version needs to be set this way > # so that it can be picked up by Makefile.PL >-- >1.7.0.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 5173
:
2575
| 2576 |
2583