Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #457 from atm-maxime/mko559
Task # 559 : price by quantity
- Loading branch information
Showing
12 changed files
with
707 additions
and
156 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
htdocs/install/mysql/tables/llx_product_price_by_qty.key.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
-- ============================================================================ | ||
-- Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> | ||
-- Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr> | ||
-- Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es> | ||
-- Copyright (C) 2012 Maxime Kohlhaas <maxime.kohlhaas@atm-consulting.fr> | ||
-- | ||
-- This program is free software; you can redistribute it and/or modify | ||
-- it under the terms of the GNU General Public License as published by | ||
-- the Free Software Foundation; either version 2 of the License, or | ||
-- (at your option) any later version. | ||
-- | ||
-- This program is distributed in the hope that it will be useful, | ||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
-- GNU General Public License for more details. | ||
-- | ||
-- You should have received a copy of the GNU General Public License | ||
-- along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
-- | ||
-- ============================================================================ | ||
|
||
ALTER TABLE llx_product_price_by_qty ADD UNIQUE INDEX uk_product_price_by_qty_level (fk_product_price, quantity); | ||
|
||
ALTER TABLE llx_product_price_by_qty ADD INDEX idx_product_price_by_qty_fk_product_price (fk_product_price); | ||
|
||
ALTER TABLE llx_product_price_by_qty ADD CONSTRAINT fk_product_price_by_qty_fk_product_price FOREIGN KEY (fk_product_price) REFERENCES llx_product_price (rowid); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
-- ============================================================================ | ||
-- Copyright (C) 2002-2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> | ||
-- Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr> | ||
-- Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es> | ||
-- Copyright (C) 2012 Maxime Kohlhaas <maxime.kohlhaas@atm-consulting.fr> | ||
-- | ||
-- This program is free software; you can redistribute it and/or modify | ||
-- it under the terms of the GNU General Public License as published by | ||
-- the Free Software Foundation; either version 2 of the License, or | ||
-- (at your option) any later version. | ||
-- | ||
-- This program is distributed in the hope that it will be useful, | ||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
-- GNU General Public License for more details. | ||
-- | ||
-- You should have received a copy of the GNU General Public License | ||
-- along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
-- | ||
-- ============================================================================ | ||
|
||
create table llx_product_price_by_qty | ||
( | ||
rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY, | ||
fk_product_price integer NOT NULL, | ||
date_price timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | ||
price double(24,8) DEFAULT 0, | ||
quantity double DEFAULT NULL, | ||
remise_percent double NOT NULL DEFAULT 0, | ||
remise double NOT NULL DEFAULT 0, | ||
unitprice double(24,8) DEFAULT 0 | ||
)ENGINE=innodb; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.