// Stock decrementation when order is shipped

This commit is contained in:
mDeflotte
2011-10-20 09:08:59 +00:00
parent 61c672ceeb
commit 46c9939258
17 changed files with 212 additions and 125 deletions
+6 -5
View File
@@ -1118,14 +1118,15 @@ CREATE TABLE `PREFIX_order_slip_detail` (
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
CREATE TABLE `PREFIX_order_state` (
`id_order_state` int(10) unsigned NOT NULL auto_increment,
`invoice` tinyint(1) unsigned default '0',
`send_email` tinyint(1) unsigned NOT NULL default '0',
`id_order_state` int(10) UNSIGNED NOT NULL auto_increment,
`invoice` tinyint(1) UNSIGNED default '0',
`send_email` tinyint(1) UNSIGNED NOT NULL default '0',
`color` varchar(32) default NULL,
`unremovable` tinyint(1) unsigned NOT NULL,
`unremovable` tinyint(1) UNSIGNED NOT NULL,
`hidden` tinyint(1) UNSIGNED NOT NULL default '0',
`logable` tinyint(1) NOT NULL default '0',
`delivery` tinyint(1) unsigned NOT NULL default '0',
`delivery` tinyint(1) UNSIGNED NOT NULL default '0',
`shipped` tinyint(1) UNSIGNED NOT NULL default '0',
PRIMARY KEY (`id_order_state`)
) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8;
+4 -4
View File
@@ -265,9 +265,9 @@ INSERT INTO `PREFIX_category` (`id_category`, `id_parent`, `level_depth`, `nleft
INSERT INTO `PREFIX_category_lang` (`id_category`, `id_lang`, `name`, `description`, `link_rewrite`, `meta_title`, `meta_keywords`, `meta_description`) VALUES
(1, 1, 'Home', '', 'home', NULL, NULL, NULL),(1, 2, 'Accueil', '', 'home', NULL, NULL, NULL),(1, 3, 'Inicio', '', 'home', NULL, NULL, NULL),(1, 4, 'Start', '', 'home', NULL, NULL, NULL),(1, 5, 'Home page', '', 'home', NULL, NULL, NULL);
INSERT INTO `PREFIX_order_state` (`id_order_state`, `invoice`, `send_email`, `color`, `unremovable`, `logable`, `delivery`) VALUES
(1, 0, 1, 'lightblue', 1, 0, 0),(2, 1, 1, '#DDEEFF', 1, 1, 0),(3, 1, 1, '#FFDD99', 1, 1, 1),(4, 1, 1, '#EEDDFF', 1, 1, 1),(5, 1, 0, '#DDFFAA', 1, 1, 1),
(6, 0, 1, '#DADADA', 1, 0, 0),(7, 1, 1, '#FFFFBB', 1, 0, 0),(8, 0, 1, '#FFDFDF', 1, 0, 0),(9, 1, 1, '#FFD3D3', 1, 0, 0),(10, 0, 1, 'lightblue', 1, 0, 0),(11, 0, 0, 'lightblue', 1, 0, 0),(12, 1, 0, '#DDEEFF', 1, 1, 0);
INSERT INTO `PREFIX_order_state` (`id_order_state`, `invoice`, `send_email`, `color`, `unremovable`, `logable`, `delivery`, `shipped`) VALUES
(1, 0, 1, 'lightblue', 1, 0, 0, 0),(2, 1, 1, '#DDEEFF', 1, 1, 0, 0),(3, 1, 1, '#FFDD99', 1, 1, 1, 0),(4, 1, 1, '#EEDDFF', 1, 1, 1, 1),(5, 1, 0, '#DDFFAA', 1, 1, 1, 1),
(6, 0, 1, '#DADADA', 1, 0, 0, 0),(7, 1, 1, '#FFFFBB', 1, 0, 0, 0),(8, 0, 1, '#FFDFDF', 1, 0, 0, 0),(9, 1, 1, '#FFD3D3', 1, 0, 0, 0),(10, 0, 1, 'lightblue', 1, 0, 0, 0),(11, 0, 0, 'lightblue', 1, 0, 0, 0),(12, 1, 0, '#DDEEFF', 1, 1, 0, 0);
INSERT INTO `PREFIX_order_state_lang` (`id_order_state`, `id_lang`, `name`, `template`) VALUES
(1, 1, 'Awaiting cheque payment', 'cheque'),
@@ -1370,7 +1370,7 @@ INSERT INTO `PREFIX_stock_available` (`id_stock_available`, `id_product`, `id_pr
(38, 9, 0, 1, 1, 0, 2);
INSERT INTO `PREFIX_warehouse` (`id_warehouse`, `id_currency`, `id_address`, `id_employee`, `reference`, `name`, `management_type`) VALUES
(1, 1, 0, 1, 'default_warehouse', 'default warehous', 'FIFO');
(1, 1, 0, 1, 'default_warehouse', 'default warehouse', 'FIFO');
INSERT INTO `PREFIX_warehouse_shop` (`id_warehouse`, `id_shop`) VALUES
(1, 1);
+3
View File
@@ -218,3 +218,6 @@ INSERT INTO `PREFIX_module_access` (`id_profile`, `id_module`, `configure`, `vie
ALTER TABLE `PREFIX_carrier` ADD `position` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0';
/* PHP:add_carrier_position();*/
ALTER TABLE `PREFIX_order_state` ADD COLUMN `shipped` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0 AFTER `delivery`;
UPDATE `PREFIX_order_state` SET `shipped` = 1 WHERE id_order_states IN (4, 5);