-- Table structure for table `itemsAdjustmentLog`
--

CREATE TABLE `itemsAdjustmentLog` (
  `ADJID` int NOT NULL AUTO_INCREMENT,
  `ITEMID` int NOT NULL,
  `QTY` int NOT NULL,
  `ADJDATE` datetime NOT NULL,
  `REASON` varchar(200) COLLATE utf8mb3_unicode_ci NOT NULL,
  PRIMARY KEY (`ADJID`)
) ENGINE=InnoDB AUTO_INCREMENT=274 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `itemsAdjustmentLog`
--

INSERT INTO `itemsAdjustmentLog` VALUES (1,172,-500,'2019-08-07 13:35:00','Shipment for Order# 31 Ship# 1'),(2,175,-250,'2019-09-16 14:17:04','Shipment for Order# 35 Ship# 2'),(3,195,-500,'2019-09-16 14:17:18','Shipment for Order# 36 Ship# 3'),(4,216,-500,'2019-09-16 14:17:18','Shipment for Order# 36 Ship# 3'),(5,213,-500,'2019-09-16 14:17:18','Shipment for Order# 36 Ship# 3'),(6,201,-500,'2019-09-16 14:17:18','Shipment for Order# 36 Ship# 3'),(7,211,-500,'2019-09-16 14:17:18','Shipment for Order# 36 Ship# 3'),(8,212,-500,'2019-09-16 14:17:18','Shipment for Order# 36 Ship# 3'),(9,204,-500,'2019-09-16 14:17:18','Shipment for Order# 36 Ship# 3'),(10,214,-500,'2019-09-16 14:17:18','Shipment for Order# 36 Ship# 3'),(11,208,-500,'2019-09-16 14:17:18','Shipment for Order# 36 Ship# 3'),(12,177,-500,'2019-09-16 14:17:37','Shipment for Order# 34 Ship# 4'),(13,178,-500,'2019-09-16 14:17:37','Shipment for Order# 34 Ship# 4'),(14,179,-500,'2019-09-16 14:17:37','Shipment for Order# 34 Ship# 4'),(15,180,-500,'2019-09-16 14:17:37','Shipment for Order# 34 Ship# 4'),(16,215,-500,'2019-09-16 14:17:52','Shipment for Order# 32 Ship# 5'),(17,182,-500,'2019-09-16 14:18:04','Shipment for Order# 33 Ship# 6'),(18,184,-500,'2019-09-16 14:18:04','Shipment for Order# 33 Ship# 6'),(19,209,-500,'2019-09-16 14:18:04','Shipment for Order# 33 Ship# 6'),(20,185,-500,'2019-09-16 14:18:04','Shipment for Order# 33 Ship# 6'),(21,191,-500,'2019-09-16 14:18:04','Shipment for Order# 33 Ship# 6'),(22,192,-500,'2019-09-16 14:18:04','Shipment for Order# 33 Ship# 6'),(23,190,-500,'2019-09-16 14:18:04','Shipment for Order# 33 Ship# 6'),(24,189,-500,'2019-09-16 14:18:04','Shipment for Order# 33 Ship# 6'),(25,198,-500,'2019-09-16 14:18:21','Shipment for Order# 37 Ship# 7'),(26,197,-250,'2019-09-16 14:18:21','Shipment for Order# 37 Ship# 7'),(27,196,-500,'2019-09-16 14:18:21','Shipment for Order# 37 Ship# 7'),(28,220,-500,'2019-09-16 20:59:17','Shipment for Order# 38 Ship# 8'),(29,221,-250,'2019-09-26 20:32:22','Shipment for Order# 39 Ship# 9'),(30,222,-250,'2019-10-11 14:10:03','Shipment for Order# 40 Ship# 10'),(31,232,-250,'2019-10-11 14:10:03','Shipment for Order# 40 Ship# 10'),(32,226,-250,'2019-10-11 14:18:26','Shipment for Order# 41 Ship# 11'),(33,228,-250,'2019-10-11 14:18:26','Shipment for Order# 41 Ship# 11'),(34,229,-250,'2019-10-11 14:18:26','Shipment for Order# 41 Ship# 11'),(35,230,-250,'2019-10-11 14:18:26','Shipment for Order# 41 Ship# 11'),(36,231,-250,'2019-10-11 14:18:26','Shipment for Order# 41 Ship# 11'),(37,233,-250,'2019-10-11 14:18:26','Shipment for Order# 41 Ship# 11'),(38,235,-250,'2019-10-21 15:05:10','Shipment for Order# 42 Ship# 12'),(39,238,-500,'2019-10-23 13:18:49','Shipment for Order# 44 Ship# 14'),(40,237,-250,'2019-10-28 13:40:30','Shipment for Order# 43 Ship# 15'),(41,247,-250,'2019-10-31 14:49:25','Shipment for Order# 48 Ship# 17'),(42,249,-500,'2019-10-31 14:49:25','Shipment for Order# 48 Ship# 17'),(43,250,-250,'2019-10-31 14:49:25','Shipment for Order# 48 Ship# 17'),(44,244,-500,'2019-10-31 15:46:46','Shipment for Order# 45 Ship# 18'),(45,245,-500,'2019-10-31 15:46:46','Shipment for Order# 45 Ship# 18'),(46,246,-250,'2019-10-31 15:47:06','Shipment for Order# 47 Ship# 19'),(47,240,-500,'2019-10-31 16:32:12','Shipment for Order# 46 Ship# 20'),(48,252,-500,'2019-11-04 16:26:08','Shipment for Order# 50 Ship# 21'),(49,253,-500,'2019-11-04 16:26:08','Shipment for Order# 50 Ship# 21'),(50,251,-500,'2019-11-07 21:27:43','Shipment for Order# 49 Ship# 22'),(51,255,-500,'2019-11-15 17:24:17','Shipment for Order# 51 Ship# 23'),(52,257,-250,'2019-11-15 17:24:28','Shipment for Order# 52 Ship# 24'),(53,254,-500,'2019-11-15 17:24:37','Shipment for Order# 53 Ship# 25'),(54,258,-250,'2020-01-08 23:31:16','Shipment for Order# 54 Ship# 26'),(55,259,-250,'2020-01-09 15:20:21','Shipment for Order# 55 Ship# 27'),(56,260,-500,'2020-01-20 15:05:14','Shipment for Order# 56 Ship# 28'),(57,261,-500,'2020-01-31 20:35:54','Shipment for Order# 57 Ship# 29'),(58,265,-500,'2020-01-31 20:36:29','Shipment for Order# 58 Ship# 30'),(59,263,-500,'2020-01-31 20:36:29','Shipment for Order# 58 Ship# 30'),(60,264,-500,'2020-01-31 20:36:29','Shipment for Order# 58 Ship# 30'),(61,267,-250,'2020-02-10 19:43:48','Shipment for Order# 59 Ship# 31'),(62,269,-250,'2020-02-10 19:43:59','Shipment for Order# 60 Ship# 32'),(63,270,-250,'2020-02-26 14:30:07','Shipment for Order# 61 Ship# 33'),(64,271,-250,'2020-02-26 14:30:07','Shipment for Order# 61 Ship# 33'),(65,272,-500,'2020-02-26 14:30:19','Shipment for Order# 62 Ship# 34'),(66,273,-500,'2020-02-26 14:30:19','Shipment for Order# 62 Ship# 34'),(67,276,-500,'2020-03-09 20:49:06','Shipment for Order# 63 Ship# 35'),(68,277,-500,'2020-03-09 20:49:06','Shipment for Order# 63 Ship# 35'),(69,278,-250,'2020-03-09 20:49:06','Shipment for Order# 63 Ship# 35'),(70,282,-250,'2020-03-11 20:27:48','Shipment for Order# 64 Ship# 36'),(71,283,-250,'2020-03-11 20:28:02','Shipment for Order# 65 Ship# 37'),(72,286,-250,'2020-03-11 20:28:03','Shipment for Order# 65 Ship# 37'),(73,287,-500,'2020-03-23 14:04:42','Shipment for Order# 66 Ship# 38'),(74,291,-250,'2020-07-17 12:27:37','Shipment for Order# 67 Ship# 39'),(75,293,-250,'2020-07-17 12:27:37','Shipment for Order# 67 Ship# 39'),(76,292,-500,'2020-07-17 12:27:38','Shipment for Order# 67 Ship# 39'),(77,290,-500,'2020-07-17 12:27:38','Shipment for Order# 67 Ship# 39'),(78,295,-500,'2020-07-17 12:28:00','Shipment for Order# 68 Ship# 40'),(79,296,-250,'2020-09-28 17:35:22','Shipment for Order# 69 Ship# 41'),(80,297,-250,'2020-11-11 15:12:02','Shipment for Order# 70 Ship# 42'),(81,298,-500,'2020-11-11 15:12:19','Shipment for Order# 71 Ship# 43'),(82,300,-250,'2020-11-26 16:20:28','Shipment for Order# 72 Ship# 44'),(83,301,-250,'2020-11-26 16:20:28','Shipment for Order# 72 Ship# 44'),(84,302,-250,'2020-12-14 14:15:58','Shipment for Order# 73 Ship# 45'),(85,304,-250,'2021-02-22 15:29:25','Shipment for Order# 74 Ship# 46'),(86,305,-500,'2021-03-08 16:51:38','Shipment for Order# 75 Ship# 47'),(87,309,-250,'2021-05-12 14:59:33','Shipment for Order# 77 Ship# 48'),(88,311,-250,'2021-05-12 14:59:33','Shipment for Order# 77 Ship# 48'),(89,312,-250,'2021-05-12 14:59:33','Shipment for Order# 77 Ship# 48'),(90,328,-250,'2021-05-12 14:59:33','Shipment for Order# 77 Ship# 48'),(91,314,-250,'2021-05-12 14:59:33','Shipment for Order# 77 Ship# 48'),(92,333,-250,'2021-05-12 14:59:46','Shipment for Order# 78 Ship# 49'),(93,334,-250,'2021-05-12 14:59:46','Shipment for Order# 78 Ship# 49'),(94,335,-250,'2021-05-12 14:59:46','Shipment for Order# 78 Ship# 49'),(95,336,-250,'2021-05-12 14:59:46','Shipment for Order# 78 Ship# 49'),(96,337,-250,'2021-05-12 14:59:46','Shipment for Order# 78 Ship# 49'),(97,338,-250,'2021-05-12 14:59:46','Shipment for Order# 78 Ship# 49'),(98,331,-250,'2021-05-12 14:59:47','Shipment for Order# 78 Ship# 49'),(99,322,-250,'2021-05-12 15:00:00','Shipment for Order# 79 Ship# 50'),(100,329,-250,'2021-05-12 15:00:00','Shipment for Order# 79 Ship# 50'),(101,324,-250,'2021-05-12 15:00:00','Shipment for Order# 79 Ship# 50'),(102,330,-250,'2021-05-12 15:00:00','Shipment for Order# 79 Ship# 50'),(103,326,-250,'2021-05-12 15:00:00','Shipment for Order# 79 Ship# 50'),(104,327,-250,'2021-05-12 15:00:00','Shipment for Order# 79 Ship# 50'),(105,332,-250,'2021-05-12 15:00:00','Shipment for Order# 79 Ship# 50'),(106,340,-500,'2021-06-14 13:29:27','Shipment for Order# 80 Ship# 51'),(107,341,-500,'2021-06-14 13:29:27','Shipment for Order# 80 Ship# 51'),(108,342,-500,'2021-06-14 13:29:27','Shipment for Order# 80 Ship# 51'),(109,346,-250,'2021-07-21 13:57:41','Shipment for Order# 81 Ship# 52'),(110,348,-500,'2021-07-21 13:57:41','Shipment for Order# 81 Ship# 52'),(111,349,-500,'2021-07-21 13:57:41','Shipment for Order# 81 Ship# 52'),(112,350,-500,'2021-07-21 13:57:54','Shipment for Order# 82 Ship# 53'),(113,346,-250,'2021-11-19 17:51:19','Shipment for Order# 81 Ship# 54'),(114,348,-500,'2021-11-19 17:51:19','Shipment for Order# 81 Ship# 54'),(115,349,-500,'2021-11-19 17:51:19','Shipment for Order# 81 Ship# 54'),(116,350,-500,'2021-11-19 17:51:38','Shipment for Order# 82 Ship# 55'),(117,351,-500,'2021-11-19 17:51:55','Shipment for Order# 83 Ship# 56'),(118,352,-500,'2021-11-19 17:51:55','Shipment for Order# 83 Ship# 56'),(119,353,-250,'2021-11-19 17:52:09','Shipment for Order# 84 Ship# 57'),(120,354,-250,'2021-11-19 17:52:23','Shipment for Order# 85 Ship# 58'),(121,357,-250,'2021-11-19 17:52:38','Shipment for Order# 86 Ship# 59'),(122,358,-250,'2021-11-19 17:52:38','Shipment for Order# 86 Ship# 59'),(123,359,-250,'2021-11-19 17:52:57','Shipment for Order# 87 Ship# 60'),(124,360,-500,'2021-11-19 17:53:06','Shipment for Order# 88 Ship# 61'),(125,361,-500,'2021-11-19 17:53:17','Shipment for Order# 89 Ship# 62'),(126,362,-250,'2021-11-19 17:53:27','Shipment for Order# 90 Ship# 63'),(127,370,-500,'2021-11-19 17:53:27','Shipment for Order# 90 Ship# 63'),(128,369,-500,'2021-11-19 17:53:27','Shipment for Order# 90 Ship# 63'),(129,368,-250,'2021-11-19 17:53:27','Shipment for Order# 90 Ship# 63'),(130,365,-250,'2021-11-19 17:53:27','Shipment for Order# 90 Ship# 63'),(131,371,-500,'2021-12-23 17:11:26','Shipment for Order# 91 Ship# 64'),(132,372,-500,'2021-12-23 17:11:26','Shipment for Order# 91 Ship# 64'),(133,373,-500,'2021-12-23 17:11:26','Shipment for Order# 91 Ship# 64'),(134,374,-250,'2022-01-10 15:45:33','Shipment for Order# 92 Ship# 65'),(135,375,-250,'2022-01-10 15:45:33','Shipment for Order# 92 Ship# 65'),(136,376,-250,'2022-01-10 15:45:33','Shipment for Order# 92 Ship# 65'),(137,377,-250,'2022-01-10 15:45:33','Shipment for Order# 92 Ship# 65'),(138,379,-250,'2022-01-10 15:45:33','Shipment for Order# 92 Ship# 65'),(139,380,-250,'2022-01-10 15:45:33','Shipment for Order# 92 Ship# 65'),(140,381,-250,'2022-01-10 15:45:33','Shipment for Order# 92 Ship# 65'),(141,382,-250,'2022-01-10 15:45:33','Shipment for Order# 92 Ship# 65'),(142,383,-250,'2022-01-10 15:45:33','Shipment for Order# 92 Ship# 65'),(143,384,-250,'2022-01-10 15:45:33','Shipment for Order# 92 Ship# 65'),(144,385,-250,'2022-01-10 15:45:33','Shipment for Order# 92 Ship# 65'),(145,386,-250,'2022-01-10 15:45:33','Shipment for Order# 92 Ship# 65'),(146,408,-500,'2022-02-07 18:08:52','Shipment for Order# 93 Ship# 66'),(147,409,-500,'2022-02-07 18:08:52','Shipment for Order# 93 Ship# 66'),(148,403,-500,'2022-02-07 18:08:52','Shipment for Order# 93 Ship# 66'),(149,404,-500,'2022-02-07 18:08:52','Shipment for Order# 93 Ship# 66'),(150,405,-500,'2022-02-07 18:08:52','Shipment for Order# 93 Ship# 66'),(151,407,-500,'2022-02-07 18:08:52','Shipment for Order# 93 Ship# 66'),(152,406,-500,'2022-02-07 18:08:52','Shipment for Order# 93 Ship# 66'),(153,387,-250,'2022-02-07 18:09:12','Shipment for Order# 94 Ship# 67'),(154,388,-250,'2022-02-07 18:09:12','Shipment for Order# 94 Ship# 67'),(155,389,-250,'2022-02-07 18:09:12','Shipment for Order# 94 Ship# 67'),(156,399,-500,'2022-02-07 18:09:32','Shipment for Order# 95 Ship# 68'),(157,400,-500,'2022-02-07 18:09:32','Shipment for Order# 95 Ship# 68'),(158,401,-250,'2022-02-07 18:09:53','Shipment for Order# 96 Ship# 69'),(159,402,-250,'2022-02-07 18:09:53','Shipment for Order# 96 Ship# 69'),(160,411,-500,'2022-03-11 17:31:30','Shipment for Order# 97 Ship# 70'),(161,413,-500,'2022-03-11 17:31:30','Shipment for Order# 97 Ship# 70'),(162,412,-500,'2022-03-11 17:31:30','Shipment for Order# 97 Ship# 70'),(163,415,-250,'2022-05-02 13:45:38','Shipment for Order# 98 Ship# 71'),(164,417,-500,'2022-05-02 13:45:38','Shipment for Order# 98 Ship# 71'),(165,416,-500,'2022-05-02 13:45:38','Shipment for Order# 98 Ship# 71'),(166,414,-250,'2022-05-02 13:45:39','Shipment for Order# 98 Ship# 71'),(167,448,-250,'2022-08-08 11:01:31','Shipment for Order# 100 Ship# 72'),(168,450,-250,'2022-08-08 11:01:32','Shipment for Order# 100 Ship# 72'),(169,452,-250,'2022-08-08 11:01:32','Shipment for Order# 100 Ship# 72'),(170,442,-500,'2022-08-08 11:01:32','Shipment for Order# 100 Ship# 72'),(171,453,-500,'2022-08-08 11:01:32','Shipment for Order# 100 Ship# 72'),(172,443,-500,'2022-08-08 11:01:32','Shipment for Order# 100 Ship# 72'),(173,444,-500,'2022-08-08 11:01:32','Shipment for Order# 100 Ship# 72'),(174,445,-500,'2022-08-08 11:01:32','Shipment for Order# 100 Ship# 72'),(175,446,-500,'2022-08-08 11:01:32','Shipment for Order# 100 Ship# 72'),(176,447,-500,'2022-08-08 11:01:32','Shipment for Order# 100 Ship# 72'),(177,421,-500,'2022-08-08 11:01:32','Shipment for Order# 100 Ship# 72'),(178,420,-500,'2022-08-08 11:01:32','Shipment for Order# 100 Ship# 72'),(179,418,-500,'2022-08-08 11:01:32','Shipment for Order# 100 Ship# 72'),(180,454,-250,'2022-10-28 16:09:13','Shipment for Order# 101 Ship# 73'),(181,462,-500,'2022-10-28 16:09:27','Shipment for Order# 102 Ship# 74'),(182,459,-500,'2022-10-28 16:09:27','Shipment for Order# 102 Ship# 74'),(183,463,-500,'2022-10-28 16:09:39','Shipment for Order# 103 Ship# 75'),(184,465,-250,'2022-11-11 14:00:10','Shipment for Order# 105 Ship# 76'),(185,456,-250,'2022-12-09 12:10:24','Shipment for Order# 104 Ship# 77'),(186,464,-500,'2022-12-09 12:10:24','Shipment for Order# 104 Ship# 77'),(187,457,-500,'2022-12-09 12:10:24','Shipment for Order# 104 Ship# 77'),(188,466,-500,'2023-02-08 14:31:51','Shipment for Order# 107 Ship# 78'),(189,467,-500,'2023-02-08 14:31:51','Shipment for Order# 107 Ship# 78'),(190,469,-250,'2023-02-08 14:31:51','Shipment for Order# 107 Ship# 78'),(191,470,-250,'2023-02-08 14:31:51','Shipment for Order# 107 Ship# 78'),(192,471,-250,'2023-02-08 14:31:51','Shipment for Order# 107 Ship# 78'),(193,472,-250,'2023-02-08 14:31:51','Shipment for Order# 107 Ship# 78'),(194,445,-250,'2023-02-08 14:31:51','Shipment for Order# 107 Ship# 78'),(195,481,-500,'2023-04-04 10:57:31','Shipment for Order# 108 Ship# 79'),(196,473,-250,'2023-04-04 10:57:32','Shipment for Order# 108 Ship# 79'),(197,474,-250,'2023-04-04 10:57:32','Shipment for Order# 108 Ship# 79'),(198,475,-250,'2023-04-04 10:57:33','Shipment for Order# 108 Ship# 79'),(199,479,-500,'2023-04-04 10:57:33','Shipment for Order# 108 Ship# 79'),(200,477,-250,'2023-04-04 10:57:33','Shipment for Order# 108 Ship# 79'),(201,480,-250,'2023-04-04 10:57:34','Shipment for Order# 108 Ship# 79'),(202,465,-40,'2023-04-10 14:18:02','Shipment for Order# 110 Ship# 80'),(203,484,-500,'2023-04-20 10:39:02','Shipment for Order# 109 Ship# 81'),(204,485,-500,'2023-04-20 10:39:02','Shipment for Order# 109 Ship# 81'),(205,486,-500,'2023-04-20 10:39:02','Shipment for Order# 109 Ship# 81'),(206,487,-500,'2023-04-20 10:39:02','Shipment for Order# 109 Ship# 81'),(207,488,-250,'2023-04-26 13:57:48','Shipment for Order# 111 Ship# 82'),(208,489,-250,'2023-05-03 10:40:01','Shipment for Order# 112 Ship# 83'),(209,490,-500,'2023-05-03 10:40:01','Shipment for Order# 112 Ship# 83'),(210,491,-250,'2023-05-15 17:53:34','Shipment for Order# 113 Ship# 84'),(211,215,-500,'2023-06-07 11:28:25','Shipment for Order# 114 Ship# 85'),(212,492,-500,'2023-06-07 11:28:47','Shipment for Order# 115 Ship# 86'),(213,493,-250,'2023-07-31 16:48:01','Shipment for Order# 117 Ship# 87'),(214,499,-500,'2023-07-31 16:48:20','Shipment for Order# 118 Ship# 88'),(215,494,-250,'2023-07-31 16:48:20','Shipment for Order# 118 Ship# 88'),(216,495,-250,'2023-07-31 16:48:20','Shipment for Order# 118 Ship# 88'),(217,497,-250,'2023-07-31 16:48:20','Shipment for Order# 118 Ship# 88'),(218,500,-250,'2023-07-31 16:48:20','Shipment for Order# 118 Ship# 88'),(219,504,-250,'2023-08-31 13:36:33','Shipment for Order# 119 Ship# 89'),(220,503,-500,'2023-08-31 13:36:33','Shipment for Order# 119 Ship# 89'),(221,501,-500,'2023-08-31 13:36:33','Shipment for Order# 119 Ship# 89'),(222,469,-250,'2023-09-25 12:39:08','Shipment for Order# 120 Ship# 90'),(223,443,-500,'2023-09-25 12:39:08','Shipment for Order# 120 Ship# 90'),(224,445,-500,'2023-09-25 12:39:08','Shipment for Order# 120 Ship# 90'),(225,471,-250,'2023-09-25 12:39:08','Shipment for Order# 120 Ship# 90'),(226,505,-500,'2023-10-11 13:31:35','Shipment for Order# 121 Ship# 91'),(227,507,-250,'2023-11-20 13:30:45','Shipment for Order# 122 Ship# 92'),(228,509,-250,'2024-02-05 10:33:48','Shipment for Order# 123 Ship# 93'),(229,513,-250,'2024-02-05 10:33:49','Shipment for Order# 123 Ship# 93'),(230,511,-500,'2024-02-05 10:33:49','Shipment for Order# 123 Ship# 93'),(231,512,-500,'2024-02-05 10:33:49','Shipment for Order# 123 Ship# 93'),(232,514,-250,'2024-02-05 10:33:50','Shipment for Order# 123 Ship# 93'),(233,515,-250,'2024-02-20 13:47:28','Shipment for Order# 124 Ship# 94'),(234,523,-250,'2024-03-25 17:00:54','Shipment for Order# 125 Ship# 95'),(235,524,-250,'2024-03-25 17:00:54','Shipment for Order# 125 Ship# 95'),(236,525,-250,'2024-03-25 17:00:54','Shipment for Order# 125 Ship# 95'),(237,526,-250,'2024-03-25 17:00:54','Shipment for Order# 125 Ship# 95'),(238,527,-250,'2024-03-25 17:00:55','Shipment for Order# 125 Ship# 95'),(239,528,-250,'2024-03-25 17:00:55','Shipment for Order# 125 Ship# 95'),(240,529,-250,'2024-03-25 17:00:55','Shipment for Order# 125 Ship# 95'),(241,530,-500,'2024-07-05 11:44:25','Shipment for Order# 126 Ship# 96'),(242,535,-500,'2024-07-30 12:06:41','Shipment for Order# 128 Ship# 97'),(243,536,-250,'2024-07-30 12:06:53','Shipment for Order# 130 Ship# 98'),(244,537,-250,'2024-07-30 12:06:53','Shipment for Order# 130 Ship# 98'),(245,532,-250,'2024-08-08 13:48:29','Shipment for Order# 131 Ship# 99'),(246,533,-250,'2024-08-08 13:48:29','Shipment for Order# 131 Ship# 99'),(247,539,-250,'2024-08-26 12:45:52','Shipment for Order# 133 Ship# 100'),(248,465,-500,'2024-09-23 15:54:09','Shipment for Order# 134 Ship# 101'),(249,542,-500,'2024-10-03 14:52:54','Shipment for Order# 136 Ship# 102'),(250,538,-500,'2024-10-07 12:51:49','Shipment for Order# 132 Ship# 103'),(251,543,-250,'2024-10-16 10:59:15','Shipment for Order# 137 Ship# 104'),(252,545,-250,'2024-10-16 10:59:26','Shipment for Order# 138 Ship# 105'),(253,546,-250,'2024-10-16 10:59:26','Shipment for Order# 138 Ship# 105'),(254,552,-250,'2025-01-13 15:19:19','Shipment for Order# 142 Ship# 106'),(255,551,-500,'2025-01-13 15:19:51','Shipment for Order# 141 Ship# 107'),(256,553,-500,'2025-01-17 16:17:56','Shipment for Order# 143 Ship# 108'),(257,554,-500,'2025-02-04 16:27:29','Shipment for Order# 144 Ship# 109'),(258,555,-250,'2025-02-07 19:59:32','Shipment for Order# 145 Ship# 110'),(259,547,-250,'2025-02-07 20:04:45','Shipment for Order# 139 Ship# 111'),(260,548,-250,'2025-02-07 20:04:46','Shipment for Order# 139 Ship# 111'),(261,465,-2000,'2025-03-01 23:29:41','Shipment for Order# 147 Ship# 112'),(262,557,-500,'2025-04-07 18:44:40','Shipment for Order# 149 Ship# 113'),(263,558,-250,'2025-04-30 16:51:35','Shipment for Order# 150 Ship# 114'),(264,560,-500,'2025-06-20 16:53:00','Shipment for Order# 151 Ship# 115'),(265,561,-250,'2025-07-02 15:51:33','Shipment for Order# 152 Ship# 116'),(266,565,-250,'2025-07-02 15:51:33','Shipment for Order# 152 Ship# 116'),(267,566,-250,'2025-07-02 15:51:33','Shipment for Order# 152 Ship# 116'),(268,567,-250,'2025-07-02 15:51:33','Shipment for Order# 152 Ship# 116'),(269,569,-500,'2025-07-23 17:32:56','Shipment for Order# 153 Ship# 117'),(270,568,-500,'2025-07-23 17:33:04','Shipment for Order# 154 Ship# 118'),(271,465,-1000,'2025-08-22 18:45:10','Shipment for Order# 155 Ship# 119'),(272,570,-250,'2025-09-25 14:30:51','Shipment for Order# 156 Ship# 120'),(273,572,-500,'2025-10-14 17:34:04','Shipment for Order# 157 Ship# 121');

--
-- Table structure for table `itemsBranchesLink`
--

CREATE TABLE `itemsBranchesLink` (
  `ITEMID` int NOT NULL,
  `BRANCHCODE` varchar(20) COLLATE utf8mb3_unicode_ci NOT NULL,
  PRIMARY KEY (`ITEMID`,`BRANCHCODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `itemsBranchesLink`
--

INSERT INTO `itemsBranchesLink` VALUES (117,'ALL_BRANCHES'),(118,'CPDI'),(119,'amico'),(120,'amico'),(121,'amico'),(122,'CPDI'),(123,'amico'),(124,'ALL_BRANCHES'),(125,'amico'),(126,'amico'),(127,'amico'),(128,'amico'),(129,'amico'),(130,'amico'),(131,'amico'),(132,'amico'),(133,'ALL_BRANCHES'),(134,'ALL_BRANCHES'),(135,'ALL_BRANCHES'),(136,'ALL_BRANCHES'),(137,'ALL_BRANCHES'),(138,'ALL_BRANCHES'),(139,'ALL_BRANCHES'),(140,'ALL_BRANCHES'),(141,'ALL_BRANCHES'),(142,'ALL_BRANCHES'),(143,'ALL_BRANCHES'),(144,'ALL_BRANCHES'),(145,'ALL_BRANCHES'),(146,'ALL_BRANCHES'),(147,'ALL_BRANCHES'),(150,'amico'),(151,'amico'),(152,'amico'),(153,'amico'),(154,'amico'),(155,'amico'),(156,'amico'),(159,'amico'),(160,'amico'),(161,'amico'),(162,'amico'),(163,'amico'),(164,'amico'),(165,'amico'),(166,'amico'),(168,'amico'),(170,'amico'),(172,'amico'),(173,'amico'),(174,'amico'),(175,'amico'),(176,'amico'),(177,'amico'),(178,'amico'),(179,'amico'),(180,'amico'),(182,'amico'),(183,'amico'),(184,'amico'),(185,'amico'),(186,'amico'),(187,'amico'),(188,'amico'),(189,'amico'),(190,'amico'),(191,'amico'),(192,'amico'),(193,'amico'),(194,'amico'),(195,'amico'),(199,'amico'),(200,'amico'),(201,'amico'),(202,'amico'),(203,'amico'),(204,'amico'),(205,'amico'),(206,'amico'),(207,'amico'),(208,'amico'),(209,'amico'),(210,'amico'),(211,'amico'),(212,'amico'),(213,'amico'),(214,'amico'),(215,'amico'),(216,'amico'),(218,'amico'),(219,'amico'),(220,'amico'),(221,'amico'),(222,'amico'),(223,'amico'),(224,'amico'),(225,'amico'),(226,'amico'),(227,'amico'),(228,'amico'),(229,'amico'),(230,'amico'),(231,'amico'),(232,'amico'),(233,'amico'),(234,'amico'),(235,'amico'),(236,'amico'),(237,'amico'),(238,'amico'),(241,'ALL_BRANCHES'),(242,'CPDI'),(243,'CPDI'),(247,'amico'),(249,'amico'),(250,'amico'),(252,'amico'),(253,'amico'),(254,'amico'),(255,'amico'),(256,'amico'),(257,'amico'),(258,'amico'),(259,'amico'),(260,'amico'),(260,'CPDI'),(261,'amico'),(263,'amico'),(263,'CPDI'),(264,'amico'),(264,'CPDI'),(265,'amico'),(265,'CPDI'),(267,'amico'),(268,'amico'),(269,'amico'),(270,'amico'),(271,'amico'),(272,'amico'),(273,'amico'),(282,'amico'),(288,'amico'),(289,'amico'),(290,'amico'),(291,'amico'),(292,'amico'),(293,'amico'),(293,'CPDI'),(296,'amico'),(297,'amico'),(298,'amico'),(299,'amico'),(300,'amico'),(301,'amico'),(303,'amico'),(304,'amico'),(305,'amico'),(306,'amico'),(307,'ALL_BRANCHES'),(308,'CPDI'),(315,'amico'),(316,'amico'),(317,'amico'),(318,'amico'),(319,'amico'),(320,'amico'),(321,'amico'),(322,'amico'),(323,'amico'),(324,'amico'),(325,'amico'),(326,'amico'),(327,'amico'),(329,'amico'),(330,'amico'),(331,'amico'),(332,'amico'),(333,'amico'),(334,'amico'),(335,'amico'),(336,'amico'),(337,'amico'),(338,'amico'),(339,'amico'),(340,'amico'),(340,'CPDI'),(341,'amico'),(341,'CPDI'),(342,'amico'),(342,'CPDI'),(350,'amico'),(353,'amico'),(354,'amico'),(354,'CPDI'),(355,'amico'),(356,'amico'),(357,'amico'),(357,'CPDI'),(358,'amico'),(358,'CPDI'),(359,'amico'),(359,'CPDI'),(360,'ALL_BRANCHES'),(360,'CPDI'),(361,'amico'),(362,'amico'),(363,'amico'),(364,'amico'),(365,'amico'),(366,'amico'),(367,'amico'),(368,'amico'),(369,'amico'),(370,'amico'),(371,'amico'),(372,'amico'),(373,'amico'),(374,'amico'),(375,'amico'),(376,'amico'),(377,'amico'),(378,'amico'),(379,'amico'),(380,'amico'),(381,'amico'),(382,'amico'),(383,'amico'),(384,'amico'),(385,'amico'),(386,'amico'),(393,'amico'),(394,'amico'),(395,'amico'),(396,'amico'),(398,'amico'),(399,'amico'),(400,'amico'),(401,'amico'),(402,'amico'),(403,'amico'),(404,'amico'),(405,'amico'),(406,'amico'),(407,'amico'),(410,'amico'),(411,'amico'),(413,'amico'),(415,'amico'),(418,'amico'),(420,'amico'),(441,'amico'),(442,'amico'),(443,'amico'),(444,'amico'),(445,'amico'),(446,'amico'),(447,'amico'),(448,'amico'),(449,'amico'),(450,'amico'),(451,'amico'),(452,'amico'),(453,'amico'),(454,'amico'),(459,'amico'),(460,'amico'),(461,'amico'),(462,'amico'),(463,'amico'),(465,'CPDI'),(466,'amico'),(467,'amico'),(468,'amico'),(469,'amico'),(470,'amico'),(471,'amico'),(472,'amico'),(473,'amico'),(474,'amico'),(475,'amico'),(476,'amico'),(477,'amico'),(480,'amico'),(481,'amico'),(482,'amico'),(483,'amico'),(484,'amico'),(485,'amico'),(486,'amico'),(487,'amico'),(488,'amico'),(489,'amico'),(491,'amico'),(494,'amico'),(495,'amico'),(497,'amico'),(498,'amico'),(500,'amico'),(501,'amico'),(504,'amico'),(505,'amico'),(507,'amico'),(508,'amico'),(509,'amico'),(510,'amico'),(511,'amico'),(512,'amico'),(513,'amico'),(514,'amico'),(515,'amico'),(516,'amico'),(517,'amico'),(518,'amico'),(523,'amico'),(524,'amico'),(525,'amico'),(530,'CPDI'),(531,'ALL_BRANCHES'),(532,'amico'),(533,'amico'),(534,'amico'),(535,'amico'),(537,'amico'),(538,'amico'),(539,'amico'),(540,'amico'),(541,'amico'),(542,'amico'),(543,'amico'),(544,'amico'),(545,'amico'),(546,'amico'),(547,'amico'),(548,'amico'),(549,'CPDI'),(550,'amico'),(551,'amico'),(552,'amico'),(553,'amico'),(554,'amico'),(555,'amico'),(556,'CPDI'),(557,'amico'),(558,'amico'),(559,'amico'),(560,'amico'),(561,'amico'),(562,'amico'),(563,'amico'),(564,'amico'),(565,'amico'),(566,'amico'),(567,'amico'),(568,'amico'),(569,'amico'),(570,'amico'),(572,'CPDI');

--
-- Table structure for table `itemsInventory`
--

CREATE TABLE `itemsInventory` (
  `ITEMID` int NOT NULL,
  `QTYONHAND` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`ITEMID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `itemsInventory`
--


--
-- Table structure for table `itemsPrintDefinition`
--

CREATE TABLE `itemsPrintDefinition` (
  `ID` int NOT NULL,
  `PRESS` varchar(50) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `NUMPAGES` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `BLEEDS` int DEFAULT NULL,
  `COLOURS` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `FLATSIZE` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `FINISHSIZE` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `STOCK` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `PARENTSHEETSIZE` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `PRESSSHEETSIZE` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `NUMUP` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `LAYOUTORIENTATION` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `COATING` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `CONTOURCUT` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `LAMINATION` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `FINISHING` varchar(200) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `ACCESSORY` varchar(200) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `SPECIALINSTRUCTIONS` varchar(200) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `PACKAGELOCATION` varchar(200) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `OUT` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `FINISHED` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `OVERS` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `GROSS` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `MEMO` varchar(200) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `itemsPrintDefinitioncol` varchar(45) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `itemsPrintDefinition`
--

INSERT INTO `itemsPrintDefinition` VALUES (117,'iGen5','2',1,'4/4','3.5\" x 2\"','3.5\" x 2\"','16pt Cover','','','20up','Sheetwork','Silver Raised Foil','','','Silver Raised Foil only on front, Trim to size','','','','','','','',NULL,NULL),(124,'iGen5','2',1,'4/4','3.5\" x 2\"','3.5\" x 2\"','16pt Cover','','','20up','Sheetwork','Silver Raised Foil','','','Silver Raised Foil only on front, Trim to size','','','',NULL,NULL,NULL,NULL,NULL,NULL),(133,'iGen5','2',1,'4/4','3.5\" x 2\"','3.5\" x 2\"','16pt Cover','','','20up','Sheetwork','Silver Raised Foil','','','Silver Raised Foil only on front, Trim to size','','','',NULL,NULL,NULL,NULL,NULL,NULL),(134,'iGen5','2',1,'4/4','3.5\" x 2\"','3.5\" x 2\"','16pt Cover','','','20up','Sheetwork','Silver Raised Foil','','','Silver Raised Foil only on front, Trim to size','','','',NULL,NULL,NULL,NULL,NULL,NULL),(135,'iGen5','2',1,'4/4','3.5\" x 2\"','3.5\" x 2\"','16pt Cover','','','20up','Sheetwork','Silver Raised Foil','','','Silver Raised Foil only on front, Trim to size','','','',NULL,NULL,NULL,NULL,NULL,NULL),(136,'iGen5','2',1,'4/4','3.5\" x 2\"','3.5\" x 2\"','16pt Cover','','','20up','Sheetwork','Silver Raised Foil','','','Silver Raised Foil only on front, Trim to size','','','',NULL,NULL,NULL,NULL,NULL,NULL),(137,'iGen5','2',1,'4/4','3.5\" x 2\"','3.5\" x 2\"','16pt Cover','','','20up','Sheetwork','Silver Raised Foil','','','Silver Raised Foil only on front, Trim to size','','','',NULL,NULL,NULL,NULL,NULL,NULL),(138,'iGen5','2',1,'4/4','3.5\" x 2\"','3.5\" x 2\"','16pt Cover','','','20up','Sheetwork','Silver Raised Foil','','','Silver Raised Foil only on front, Trim to size','','','',NULL,NULL,NULL,NULL,NULL,NULL),(139,'iGen5','2',1,'4/4','3.5\" x 2\"','3.5\" x 2\"','16pt Cover','','','20up','Sheetwork','Silver Raised Foil','','','Silver Raised Foil only on front, Trim to size','','','',NULL,NULL,NULL,NULL,NULL,NULL),(140,'iGen5','2',1,'4/4','3.5\" x 2\"','3.5\" x 2\"','16pt Cover','','','20up','Sheetwork','Silver Raised Foil','','','Silver Raised Foil only on front, Trim to size','','','',NULL,NULL,NULL,NULL,NULL,NULL),(141,'iGen5','2',1,'4/4','3.5\" x 2\"','3.5\" x 2\"','16pt Cover','','','20up','Sheetwork','Silver Raised Foil','','','Silver Raised Foil only on front, Trim to size','','','',NULL,NULL,NULL,NULL,NULL,NULL),(142,'iGen5','2',1,'4/4','3.5\" x 2\"','3.5\" x 2\"','16pt Cover','','','20up','Sheetwork','Silver Raised Foil','','','Silver Raised Foil only on front, Trim to size','','','',NULL,NULL,NULL,NULL,NULL,NULL),(143,'iGen5','2',1,'4/4','3.5\" x 2\"','3.5\" x 2\"','16pt Cover','','','20up','Sheetwork','Silver Raised Foil','','','Silver Raised Foil only on front, Trim to size','','','',NULL,NULL,NULL,NULL,NULL,NULL),(144,'iGen5','2',1,'4/4','3.5\" x 2\"','3.5\" x 2\"','16pt Cover','','','20up','Sheetwork','Silver Raised Foil','','','Silver Raised Foil only on front, Trim to size','','','',NULL,NULL,NULL,NULL,NULL,NULL),(145,'iGen5','2',1,'4/4','3.5\" x 2\"','3.5\" x 2\"','16pt Cover','','','20up','Sheetwork','Silver Raised Foil','','','Silver Raised Foil only on front, Trim to size','','','',NULL,NULL,NULL,NULL,NULL,NULL),(146,'iGen5','2',1,'4/4','3.5\" x 2\"','3.5\" x 2\"','16pt Cover','','','20up','Sheetwork','Silver Raised Foil','','','Silver Raised Foil only on front, Trim to size','','','',NULL,NULL,NULL,NULL,NULL,NULL),(147,'iGen5','2',1,'4/4','3.5\" x 2\"','3.5\" x 2\"','16pt Cover','','','20up','Sheetwork','Silver Raised Foil','','','Silver Raised Foil only on front, Trim to size','','','',NULL,NULL,NULL,NULL,NULL,NULL),(158,'iGen5','2',1,'4/4','3.5\" x 2\"','3.5\" x 2\"','16pt Cover','','','20up','Sheetwork','Silver Raised Foil','','','Silver Raised Foil only on front, Trim to size','','','',NULL,NULL,NULL,NULL,NULL,NULL),(241,'iGen5','2',1,'4/4','3.5\" x 2\"','3.5\" x 2\"','16pt Cover','','','20up','Sheetwork','Silver Raised Foil','','','Silver Raised Foil only on front, Trim to size','','','',NULL,NULL,NULL,NULL,NULL,NULL),(260,'iGen5','2',1,'4/4','3.5\" x 2\"','3.5\" x 2\"','16pt Gloss Cover','','18\" x 12\"','20','Sheetwork','','','','Raised Silver Foil (Logn & Line only), Trim','','The line for foil is different than others. The client paid for additional setup $20.00 on Jan 14 for setup.  ','','','','','','',NULL),(307,'iGen5','2',1,'4/4','3.5\" x 2\"','3.5\" x 2\"','16pt Cover','','','20up','Sheetwork','Silver Raised Foil','','','Silver Raised Foil only on front, Trim to size','','','',NULL,NULL,NULL,NULL,NULL,NULL),(531,'iGen5','2',1,'4/4','3.5\" x 2\"','3.5\" x 2\"','16pt Cover','','','20up','Sheetwork','Silver Raised Foil','','','Silver Raised Foil only on front, Trim to size','','','',NULL,NULL,NULL,NULL,NULL,NULL);

--
-- Table structure for table `itemsSubcategoryLink`
--

CREATE TABLE `itemsSubcategoryLink` (
  `ITEMID` int NOT NULL,
  `SUBCATID` int NOT NULL,
  PRIMARY KEY (`ITEMID`,`SUBCATID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `itemsSubcategoryLink`
--

INSERT INTO `itemsSubcategoryLink` VALUES (118,50),(119,50),(120,50),(121,50),(122,50),(123,50),(124,50),(125,50),(126,50),(127,50),(128,50),(129,50),(130,50),(131,50),(132,50),(133,51),(134,53),(135,52),(136,59),(137,54),(138,56),(139,57),(140,58),(141,61),(142,60),(143,62),(144,54),(145,57),(146,58),(147,60),(150,58),(151,60),(152,50),(153,50),(154,50),(155,58),(156,58),(159,62),(160,51),(161,51),(162,53),(163,52),(164,59),(165,54),(166,56),(168,58),(170,60),(172,50),(173,50),(174,50),(175,60),(176,58),(177,56),(178,56),(179,56),(180,56),(182,50),(183,52),(184,50),(185,52),(186,52),(187,52),(188,52),(189,52),(190,52),(191,52),(192,52),(193,52),(194,52),(195,51),(199,51),(200,51),(201,51),(202,51),(203,51),(204,51),(205,51),(206,51),(207,51),(208,51),(209,52),(210,51),(211,51),(212,51),(213,51),(214,51),(215,50),(216,51),(218,51),(219,52),(220,52),(221,52),(222,51),(223,51),(224,51),(225,51),(226,51),(227,51),(228,51),(229,51),(230,51),(231,51),(232,51),(233,51),(234,60),(235,59),(236,53),(237,53),(238,56),(241,62),(242,62),(243,58),(247,58),(248,58),(249,58),(250,58),(252,52),(253,52),(254,56),(255,51),(256,62),(257,62),(258,50),(259,50),(260,51),(261,58),(263,60),(264,60),(265,60),(266,62),(267,62),(268,56),(269,56),(270,50),(271,50),(272,51),(273,51),(282,52),(288,50),(289,50),(290,50),(291,50),(292,50),(293,50),(296,51),(297,51),(298,50),(299,50),(300,50),(301,50),(303,51),(304,51),(305,51),(306,58),(307,63),(308,63),(315,58),(316,58),(317,58),(318,58),(319,58),(320,58),(321,58),(322,63),(323,63),(324,63),(325,63),(326,63),(327,63),(329,63),(330,63),(331,58),(332,63),(333,58),(334,58),(335,58),(336,58),(337,58),(338,58),(339,59),(340,60),(341,60),(342,60),(350,51),(353,50),(354,59),(355,60),(356,60),(357,60),(358,60),(359,60),(360,60),(361,51),(362,51),(363,52),(364,52),(365,52),(366,52),(367,52),(368,52),(369,52),(370,52),(371,51),(372,51),(373,52),(374,52),(375,52),(376,52),(377,52),(378,52),(379,52),(380,52),(381,52),(382,52),(383,52),(384,52),(385,52),(386,52),(393,58),(394,58),(395,58),(396,63),(398,58),(399,51),(400,51),(401,50),(402,50),(403,58),(404,58),(405,58),(406,63),(407,63),(410,50),(411,51),(413,51),(415,51),(418,58),(420,58),(441,57),(442,57),(443,57),(444,57),(445,57),(446,57),(447,57),(448,57),(449,57),(450,57),(451,57),(452,57),(453,57),(454,50),(459,51),(460,59),(461,51),(462,51),(463,51),(465,51),(466,51),(467,51),(468,60),(469,57),(470,57),(471,57),(472,57),(473,52),(474,52),(475,52),(476,63),(477,58),(480,63),(481,51),(482,51),(483,51),(484,51),(485,51),(486,51),(487,51),(488,51),(489,58),(491,52),(494,52),(495,52),(497,52),(498,52),(500,52),(501,52),(504,50),(505,62),(507,61),(508,60),(509,51),(510,61),(511,57),(512,57),(513,61),(514,59),(515,51),(516,58),(517,63),(518,63),(523,58),(524,63),(525,63),(530,59),(531,51),(532,50),(533,50),(534,51),(535,51),(537,63),(538,51),(539,51),(540,51),(541,51),(542,51),(543,58),(544,57),(545,57),(546,57),(547,57),(548,57),(549,62),(550,61),(551,61),(552,51),(553,61),(554,61),(555,51),(556,51),(557,61),(558,50),(559,61),(560,61),(561,54),(562,54),(563,63),(564,63),(565,54),(566,63),(567,63),(568,51),(569,61),(570,50),(572,51);

--
-- Table structure for table `newsItems`
--

CREATE TABLE `newsItems` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `STARTDATE` date NOT NULL,
  `ENDDATE` date NOT NULL,
  `LANGUAGE` varchar(2) COLLATE utf8mb3_unicode_ci NOT NULL,
  `TITLE` varchar(1000) COLLATE utf8mb3_unicode_ci NOT NULL,
  `MESSAGE` varchar(1000) COLLATE utf8mb3_unicode_ci NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `newsItems`
--


--
-- Table structure for table `orderDetail`
--

CREATE TABLE `orderDetail` (
  `ITEMLINE` int NOT NULL AUTO_INCREMENT,
  `ORDERID` int NOT NULL,
  `ITEMID` int NOT NULL,
  `ITEMCODE` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL,
  `ITEMDESC` varchar(200) COLLATE utf8mb3_unicode_ci NOT NULL,
  `ITEMOPTION` varchar(30) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `ORDERQTY` int NOT NULL,
  `SHIPTODATEQTY` int NOT NULL,
  `UNITPRICE` decimal(19,4) DEFAULT NULL,
  `EXTPRICE` decimal(19,4) DEFAULT NULL,
  `TAXAMT1` decimal(19,4) DEFAULT NULL,
  `TAXAMT2` decimal(19,4) DEFAULT NULL,
  `TAXAMT3` decimal(19,4) DEFAULT NULL,
  `TAXAMT4` decimal(19,4) DEFAULT NULL,
  `TAXAMT5` decimal(19,4) DEFAULT NULL,
  `ITEMLENGTH` varchar(45) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `ITEMWIDTH` varchar(45) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `ITEMHEIGHT` varchar(45) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `ITEMWEIGHT` varchar(45) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `ITEMPIECES` int DEFAULT NULL,
  `PROOFCONFIRMATION` varchar(200) COLLATE utf8mb3_unicode_ci NOT NULL,
  `DOWNLOADLINK` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`ITEMLINE`,`ORDERID`)
) ENGINE=InnoDB AUTO_INCREMENT=353 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `orderDetail`
--

INSERT INTO `orderDetail` VALUES (46,28,125,'CORP_BC_Single-00001','CORP - Single Sided  (kimberley)','',0,0,0.5625,56.2500,7.3125,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.000000',1,'k',NULL),(48,29,125,'CORP_BC_Single-00001','CORP - Single Sided  (kimberley)','',0,0,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(50,31,172,'CORP_BC_Single-00007','CORP - Single Sided (Albert - President) - Foil First & Last Name','',500,500,0.1690,84.5000,10.9850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(51,32,215,'CORP_BC_Single-00012','CORP - Single Sided','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(52,33,182,'CORP_BC_Single-00010','CORP - Single Sided  (Joanna)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(54,33,184,'CORP_BC_Single-00011','CORP - Single Sided  (Mark)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(55,33,209,'ACA_BC_Single-00013','Architectural Solutions - Single Sided  (Scott)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(56,33,185,'ACA_BC_Single-00003','Architectural Solutions - Single Sided  (John)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(57,33,191,'ACA_BC_Single-00009','Architectural Solutions - Single Sided  (Matthew)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(58,33,192,'ACA_BC_Single-00010','Architectural Solutions - Single Sided  (Bob)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(59,33,190,'ACA_BC_Single-00008','Architectural Solutions - Single Sided  (Dylan)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(60,33,189,'ACA_BC_Single-00007','Architectural Solutions - Single Sided  (Megan)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(61,34,177,'AIC_BC_Single-00002','Interiors - Single Sided  (Charles)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(62,34,178,'AIC_BC_Single-00003','Interiors - Single Sided  (Marco)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(63,34,179,'AIC_BC_Single-00004','Interiors - Single Sided  (Joey)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(64,34,180,'AIC_BC_Single-00005','Interiors - Single Sided  (Mackenzie)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(65,35,175,'AS_BC_Double-00002','Source Equipment - Double Sided  (Veronica)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(67,36,195,'AA_BC_Double-00002','Accessories - Double Sided  (Drago)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(68,36,216,'AA_BC_Double-00018','Accessories - Double Sided  (Danielle)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(69,36,213,'AA_BC_Double-00016','Accessories - Double Sided  (Lou)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(70,36,201,'AA_BC_Double-00005','Accessories - Double Sided  (Aidan)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(71,36,211,'AA_BC_Double-00014','Accessories - Double Sided  (Will)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(72,36,212,'AA_BC_Double-00015','Accessories - Double Sided  (Kelly)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(73,36,204,'AA_BC_Double-00008','Accessories - Double Sided  (Michelle)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(74,36,214,'AA_BC_Double-00017','Accessories - Double Sided  (Blake)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(75,36,208,'AA_BC_Double-00012','Accessories - Double Sided  (Jay)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(76,37,198,'APC_BC_Single-00004','Patient Care Corporation - Single Sided  (Tyler)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(77,37,197,'APC_BC_Single-00003','Patient Care Corporation - Single Sided  (Andrew)','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(78,37,196,'APC_BC_Single-00002','Patient Care Corporation - Single Sided  (Daniel)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(79,38,220,'ACA_BC_Single-00015','Architectural Solutions - Single Sided  (Kyle)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(80,39,221,'ACA_BC_Single-00016','Architectural Solutions - Single Sided  (Dean)','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(81,40,222,'AA_BC_Double-00020','Accessories - Double Sided  (Benny)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(82,40,232,'AA_BC_Double-00030','Accessories - Double Sided  (Joshua)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(83,41,226,'AA_BC_Double-00024','Accessories - Double Sided  (Eitan )','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(84,41,228,'AA_BC_Double-00026','Accessories - Double Sided  (Padmaraja)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(85,41,229,'AA_BC_Double-00027','Accessories - Double Sided  (Daryl)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(86,41,230,'AA_BC_Double-00028','Accessories - Double Sided  (Alireza)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(87,41,231,'AA_BC_Double-00029','Accessories - Double Sided  (Husein)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(88,41,233,'AA_BC_Double-00031','Accessories - Double Sided  (Martin)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(89,42,235,'ACP_BC_Single-00002','Pipeline Equipment - Single Sided  (Diana)','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(90,43,237,'AB_BC_Single-00003','Beds & Stretchers - Single Sided  (Yanely)','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(91,44,238,'AIC_BC_Single-00006','Interiors - Single Sided  (Tom)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(92,45,244,'ALT_BC_Double-00006','Lighting Solutions - Double Sided  (Phillip)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(93,45,245,'ALT_BC_Double-00007','Lighting Solutions - Double Sided  (Scot)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(94,46,240,'ACS_BC_Double-00002','Clinical Solutions - Double Sided  (Matt)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(95,47,246,'APC_BC_Single-00005','Patient Care Corporation - Single Sided  (Aaron)','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(96,48,247,'AMO_BC_Double-00005','Mobility Solutions - Double Sided  (Collin)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(97,48,249,'AMO_BC_Double-00007','Mobility Solutions - Double Sided  (Mike)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(98,48,250,'AMO_BC_Double-00008','Mobility Solutions - Double Sided  (Veronika)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(99,49,251,'APC_BC_Single-00006','Patient Care Corporation - Single Sided  (Tyler)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(100,50,252,'ACA_BC_Single-00017','Architectural Solutions - Single Sided  (Scott)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(101,50,253,'ACA_BC_Single-00018','Architectural Solutions - Single Sided  (Matthew)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(102,51,255,'AA_BC_Double-00032','Accessories - Double Sided  (Jim)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(103,52,257,'INTL_BC_Double-00003','Medical Equipment - Double Sided  (Zuman)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(104,53,254,'AIC_BC_Single-00007','Interiors - Single Sided  (Lutfur)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(105,54,258,'CORP_BC_Single-00013','CORP - Single Sided  (Ivy)','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(106,55,259,'CORP_BC_Single-00014','CORP - Single Sided  (Katherine)','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(107,56,260,'AA_BC_Double-00033','Accessories - Double Sided  (George)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(108,57,261,'AMO_BC_Double-00009','Mobility Solutions - Double Sided  (Matt)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(109,58,265,'AS_BC_Double-00006','Source Equipment - Double Sided  (STEPHANIE)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(110,58,263,'AS_BC_Double-00004','Source Equipment - Double Sided  (James T.)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(111,58,264,'AS_BC_Double-00005','Source Equipment - Double Sided  (LAURA)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(112,59,267,'INTL_BC_Double-00005','Medical Equipment - Double Sided  (Xione)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(113,60,269,'AIC_BC_Single-00009','Interiors - Single Sided  (Cecilia)','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(114,61,270,'CORP_BC_Single-00015','CORP - Single Sided  (Sarah)','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(115,61,271,'CORP_BC_Single-00016','CORP - Single Sided  (Nina)','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(116,62,272,'AA_BC_Double-00034','Accessories - Double Sided  (Aidan)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(117,62,273,'AA_BC_Double-00035','Accessories - Double Sided  (Lou)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(118,63,276,'ALT_BC_Double-00010','Lighting Solutions - Double Sided  (Aaron)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(119,63,277,'ALT_BC_Double-00011','Lighting Solutions - Double Sided  (Jordan)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(120,63,278,'ALT_BC_Double-00012','Lighting Solutions - Double Sided  (Jenny)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(121,64,282,'ACA_BC_Single-00019','Architectural Solutions - Single Sided  (Baha)','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(122,65,283,'APC_BC_Single-00007','Patient Care Corporation - Single Sided  (Eric)','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(123,65,286,'APC_BC_Single-00009','Patient Care Corporation - Single Sided  (JOYJIT)','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(124,66,287,'ALT_BC_Double-00017','Lighting Solutions - Double Sided  (Michelle)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(125,67,291,'CORP_BC_Single-00020','CORP - Single Sided  (Joanna)','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(126,67,293,'CORP_BC_Single-00022','CORP - Single Sided  (Dean)','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(127,67,292,'CORP_BC_Single-00021','CORP - Single Sided  (Scott)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(128,67,290,'CORP_BC_Single-00019','CORP - Single Sided  (Lynda)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(129,68,295,'ACS_BC_Double-00004','Clinical Solutions - Double Sided  (Kimberly)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(130,69,296,'AA_BC_Double-00036','Accessories - Double Sided  (Andrew)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(131,70,297,'AA_BC_Double-00037','Accessories - Double Sided  (Gara)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(132,71,298,'CORP_BC_Single-00023','CORP - Single Sided  (John)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(133,72,300,'CORP_BC_Single-00025','CORP - Single Sided  (Julia)','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(134,72,301,'CORP_BC_Single-00026','CORP - Single Sided  (Anis)','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(135,73,302,'APC_BC_Single-00010','Patient Care Corporation - Single Sided  (Andrew)','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(136,74,304,'AA_BC_Double-00039','Accessories - Double Sided  (Gordon)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(137,75,305,'AA_BC_Double-00040','Accessories - Double Sided  (Jim)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(139,77,309,'ACS_BC_Double-00005','Clinical Solutions - Double Sided  (Peter)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(140,77,311,'ACS_BC_Double-00007','Clinical Solutions - Double Sided  (Salar)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(141,77,312,'ACS_BC_Double-00008','Clinical Solutions - Double Sided  (Kyle)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(142,77,328,'ACS_BC_Double-00011','Clinical Solutions - Double Sided  (David)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(143,77,314,'ACS_BC_Double-00010','Clinical Solutions - Double Sided  (Wayne)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(144,78,333,'AMO_BC_Double-00019','Mobility Solutions - Double Sided  (Matt)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(145,78,334,'AMO_BC_Double-00020','Mobility Solutions - Double Sided  (Alex)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(146,78,335,'AMO_BC_Double-00021','Mobility Solutions - Double Sided  (Ravi)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(147,78,336,'AMO_BC_Double-00022','Mobility Solutions - Double Sided  (Katrina)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(148,78,337,'AMO_BC_Double-00023','Mobility Solutions - Double Sided  (Collin)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(149,78,338,'AMO_BC_Double-00024','Mobility Solutions - Double Sided  (Wayne)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(150,78,331,'AMO_BC_Double-00018','Mobility Solutions - Double Sided  (Stephanie)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(151,79,322,'ACS_AMO_BC_Double-00002','Clinical and Mobility Solutions - Double Sided  (Hayden)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(152,79,329,'ACS_AMO_BC_Double-00008','Clinical and Mobility Solutions - Double Sided  (Mike)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(153,79,324,'ACS_AMO_BC_Double-00004','Clinical and Mobility Solutions - Double Sided  (Matthew )','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(154,79,330,'ACS_AMO_BC_Double-00009','Clinical and Mobility Solutions - Double Sided  (Varun )','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(155,79,326,'ACS_AMO_BC_Double-00006','Clinical and Mobility Solutions - Double Sided  (Dorothy)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(156,79,327,'ACS_AMO_BC_Double-00007','Clinical and Mobility Solutions - Double Sided  (April )','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(157,79,332,'ACS_AMO_BC_Double-00010','Clinical and Mobility Solutions - Double Sided  (Brandon)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(158,80,340,'AS_BC_Double-00007','Source Equipment (US) - Double Sided  (Eddie)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(159,80,341,'AS_BC_Double-00008','Source Equipment (US) - Double Sided  (Jesse)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(160,80,342,'AS_BC_Double-00009','Source Equipment (US) - Double Sided  (Shane)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(161,81,346,'APC_BC_Single-00014','Patient Care Corporation - Single Sided  (Trevor)','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(162,81,348,'APC_BC_Single-00016','Patient Care Corporation - Single Sided  (Aleisha)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(163,81,349,'APC_BC_Single-00017','Patient Care Corporation - Single Sided  (Riley)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(165,82,350,'AA_BC_Double-00041','Accessories - Double Sided  (Lou)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(166,83,351,'ALT_BC_Double-00018','Lighting Solutions - Double Sided  (Sandeep)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(167,83,352,'ALT_BC_Double-00019','Lighting Solutions - Double Sided  (John)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(168,84,353,'CORP_BC_Single-00027','CORP - Single Sided  (Zoey )','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(169,85,354,'ACP_BC_Single-00004','Pipeline / Source & Industrial Equipment (US) - Single Sided  (ALEX)','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(170,86,357,'AS_BC_Double-00012','Source Equipment (US) - Double Sided  (AATHI)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(171,86,358,'AS_BC_Double-00013','Source Equipment (US) - Double Sided  (ALDO)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(172,87,359,'AS_BC_Double-00014','Source Equipment - Double Sided  (Matthew)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'km',NULL),(173,88,360,'AS_BC_Double-00015','Source Equipment (US) - Double Sided  (James T.)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'km',NULL),(174,89,361,'AA_BC_Double-00042','Accessories - Double Sided  (Anthony)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'SANDY DEAK',NULL),(175,90,362,'AA_BC_Double-00043','Accessories - Double Sided  (Caitlin)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'SANDY DEAK',NULL),(176,90,370,'ACA_BC_Single-00027','Architectural Solutions - Single Sided  (Marco)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'SANDY DEAK',NULL),(177,90,369,'ACA_BC_Single-00026','Architectural Solutions - Single Sided  (Adriano)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'SANDY DEAK',NULL),(178,90,368,'ACA_BC_Single-00025','Architectural Solutions - Single Sided  (Cari)','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'SANDY DEAK',NULL),(179,90,365,'ACA_BC_Single-00022','Architectural Solutions - Single Sided  (Nancy)','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'SANDY DEAK',NULL),(180,91,371,'AA_BC_Double-00044','Accessories - Double Sided  (Alan)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(181,91,372,'AA_BC_Double-00045','Accessories - Double Sided  (Ben)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(182,91,373,'ACA_BC_Single-00028','Architectural Solutions - Single Sided  (David)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(183,92,374,'ACA_BC_Single-00029','Architectural Solutions - Single Sided  (Alia)','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(184,92,375,'ACA_BC_Single-00030','Architectural Solutions - Single Sided  (Brad )','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(185,92,376,'ACA_BC_Single-00031','Architectural Solutions - Single Sided  (Daniel )','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(186,92,377,'ACA_BC_Single-00032','Architectural Solutions - Single Sided  (Rifat )','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(187,92,379,'ACA_BC_Single-00034','Architectural Solutions - Single Sided  (Andrew )','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(188,92,380,'ACA_BC_Single-00035','Architectural Solutions - Single Sided  (Rikin )','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(189,92,381,'ACA_BC_Single-00036','Architectural Solutions - Single Sided  (Robert )','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(190,92,382,'ACA_BC_Single-00037','Architectural Solutions - Single Sided  (Ronald)','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(191,92,383,'ACA_BC_Single-00038','Architectural Solutions - Single Sided  (Adanna)','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(192,92,384,'ACA_BC_Single-00039','Architectural Solutions - Single Sided  (Ana )','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(193,92,385,'ACA_BC_Single-00040','Architectural Solutions - Single Sided  (Maryam )','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(194,92,386,'ACA_BC_Single-00041','Architectural Solutions - Single Sided  (May )','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(195,93,408,'ACS_BC_Double-00016','Clinical Solutions - Double Sided  (Vincent )','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(196,93,409,'ACS_BC_Double-00017','Clinical Solutions - Double Sided  (Brett )','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(197,93,403,'AMO_BC_Double-00029','Mobility Solutions - Double Sided  (Matthew)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(198,93,404,'AMO_BC_Double-00030','Mobility Solutions - Double Sided  (Andrew)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(199,93,405,'AMO_BC_Double-00031','Mobility Solutions - Double Sided  (Nick)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(200,93,407,'ACS_AMO_BC_Double-00013','Clinical and Mobility Solutions - Double Sided  (Karim )','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(201,93,406,'ACS_AMO_BC_Double-00012','Clinical and Mobility Solutions - Double Sided  (Brandon )','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(202,94,387,'ALT_BC_Double-00020','Lighting Solutions - Double Sided  (Lingbin)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(203,94,388,'ALT_BC_Double-00021','Lighting Solutions - Double Sided  (Darrell)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(204,94,389,'ALT_BC_Double-00022','Lighting Solutions - Double Sided  (Jenny)','',250,250,0.2920,73.0000,9.4900,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(205,95,399,'AA_BC_Double-00046','Accessories - Double Sided  (Tom)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(206,95,400,'AA_BC_Double-00047','Accessories - Double Sided  (Menan )','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(207,96,401,'CORP_BC_Single-00028','CORP - Single Sided  (Zach )','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(208,96,402,'CORP_BC_Single-00029','CORP - Single Sided  (Rouby)','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(209,97,411,'AA_BC_Double-00048','Accessories - Double Sided  (Angela)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'SANDY DEAK',NULL),(210,97,413,'AA_BC_Double-00049','Accessories - Double Sided  (Navdeep)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'SANDY DEAK',NULL),(211,97,412,'APC_BC_Single-00018','Patient Care Corporation - Single Sided  (Riley)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'SANDY DEAK',NULL),(212,98,415,'AA_BC_Single-00002','Accessories - Single Sided  (Aidan)','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(213,98,417,'APC_BC_Single-00021','Patient Care Corporation - Single Sided  (Andrew)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(214,98,416,'APC_BC_Single-00020','Patient Care Corporation - Single Sided  (Ally )','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(215,98,414,'APC_BC_Single-00019','Patient Care Corporation - Single Sided  (DIVYANG)','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(229,100,448,'ALT_BC_Single-00008','Lighting Solutions - Single Sided  (Anand)','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(230,100,450,'ALT_BC_Single-00010','Lighting Solutions - Single Sided  (Leon )','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(231,100,452,'ALT_BC_Single-00012','Lighting Solutions - Single Sided  (Mario)','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(232,100,442,'ALT_BC_Single-00013','Lighting Solutions - Single Sided  (Brett)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(233,100,453,'ALT_BC_Single-00013','Lighting Solutions - Single Sided  (Sarah)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(234,100,443,'ALT_BC_Single-00014','Lighting Solutions - Single Sided  (Scot)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(235,100,444,'ALT_BC_Single-00015','Lighting Solutions - Single Sided  (Mario)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(236,100,445,'ALT_BC_Single-00016','Lighting Solutions - Single Sided  (John)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(237,100,446,'ALT_BC_Single-00017','Lighting Solutions - Single Sided  (Erin)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(238,100,447,'ALT_BC_Single-00018','Lighting Solutions - Single Sided  (Rocky)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(239,100,421,'ACS_BC_Double-00019','Clinical Solutions - Double Sided  (Nicole )','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(240,100,420,'AMO_BC_Double-00033','Mobility Solutions - Double Sided  (Jay)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(241,100,418,'AMO_BC_Double-00032','Mobility Solutions - Double Sided  (Christian)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(242,101,454,'CORP_BC_Single-00031','CORP - Single Sided  (Vanessa)','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(243,102,462,'AA_BC_Double-00052','Accessories - Double Sided  (Menan)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(244,102,459,'AA_BC_Double-00050','Accessories - Double Sided  (Daniel)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(246,103,463,'AA_BC_Double-00053','Accessories - Double Sided  (Angelo)','',500,500,0.1550,77.5000,10.0750,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(247,104,456,'APC_BC_Single-00023','Patient Care Corporation - Single Sided  (Andy)','',250,250,0.2360,59.0000,7.6700,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(248,104,464,'APC_BC_Single-00026','Patient Care Corporation - Single Sided  (Trevor)','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(249,104,457,'APC_BC_Single-00024','Patient Care Corporation - Single Sided  (Julia )','',500,500,0.1290,64.5000,8.3850,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(250,105,465,'OfflineOrder','Business Card without Foil - Offline Order (See PO)','',250,250,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,'0.0000','0.0000','0.0000','0.000000',0,'s',NULL),(258,107,466,'AA_BC_Double-00054','Accessories - Double Sided  (Drago)','',500,500,0.2300,115.0000,14.9500,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(259,107,467,'AA_BC_Double-00055','Accessories - Double Sided  (Andrew)','',500,500,0.2300,115.0000,14.9500,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(260,107,469,'ALT_BC_Single-00014','Lighting Solutions - Single Sided  (Kareem)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(261,107,470,'ALT_BC_Single-00015','Lighting Solutions - Single Sided  (RILEY)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(262,107,471,'ALT_BC_Single-00016','Lighting Solutions - Single Sided  (NICOLE)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(263,107,472,'ALT_BC_Single-00017','Lighting Solutions - Single Sided  (ABBY)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(264,107,445,'ALT_BC_Single-00016','Lighting Solutions - Single Sided  (John)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(265,108,481,'AA_BC_Double-00056','Accessories - Double Sided  (Ian)','',500,500,0.2300,115.0000,14.9500,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(266,108,473,'ACA_BC_Single-00042','Architectural Solutions - Single Sided  (Cari)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(267,108,474,'ACA_BC_Single-00043','Architectural Solutions - Single Sided  (Niloofar)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(268,108,475,'ACA_BC_Single-00044','Architectural Solutions - Single Sided  (Shivani)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(269,108,479,'ACS_BC_Double-00021','Clinical Solutions - Double Sided  (Matthew)','',500,500,0.2300,115.0000,14.9500,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(270,108,477,'AMO_BC_Double-00034','Mobility Solutions - Double Sided  (Nick)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(271,108,480,'ACS_AMO_BC_Double-00015','Clinical and Mobility Solutions - Double Sided  (Hayden)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(272,109,484,'AA_BC_Double-00059','Accessories - Double Sided  (Jas)','',500,500,0.2300,115.0000,14.9500,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(273,109,485,'AA_BC_Double-00060','Accessories - Double Sided  (Zac)','',500,500,0.2300,115.0000,14.9500,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(274,109,486,'AA_BC_Double-00061','Accessories - Double Sided  (Marko)','',500,500,0.2300,115.0000,14.9500,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(275,109,487,'AA_BC_Double-00062','Accessories - Double Sided  (Aidan)','',500,500,0.2300,115.0000,14.9500,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(276,110,465,'OfflineOrder','Business Card without Foil - Offline Order (See PO)','',40,40,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,'0.0000','0.0000','0.0000','0.000000',1,'d',NULL),(277,111,488,'AA_BC_Double-00063','Accessories - Double Sided  (Christina)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(278,112,489,'AMO_BC_Double-00035','Mobility Solutions - Double Sided  (Konstantin)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(279,112,490,'APC_BC_Single-00027','Patient Care Corporation - Single Sided  (Aaron)','',500,500,0.2300,115.0000,14.9500,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(280,113,491,'ACA_BC_Single-00045','Architectural Solutions - Single Sided  (Paul)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(281,114,215,'CORP_BC_Single-00012','CORP - Single Sided','',500,500,0.2300,115.0000,14.9500,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(282,115,492,'APC_BC_Single-00028','Patient Care Corporation - Single Sided  (Nadia)','',500,500,0.2300,115.0000,14.9500,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(284,117,493,'APC_BC_Single-00029','Patient Care Corporation - Single Sided  (Niki)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(285,118,499,'APC_BC_Single-00031','Patient Care Corporation - Single Sided  (Ron)','',500,500,0.2300,115.0000,14.9500,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(286,118,494,'ACA_BC_Single-00046','Architectural Solutions - Single Sided  (Stanislaw)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(287,118,495,'ACA_BC_Single-00047','Architectural Solutions - Single Sided  (EUSEBIO)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(288,118,497,'ACA_BC_Single-00048','Architectural Solutions - Single Sided  (Ida)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(289,118,500,'ACA_BC_Single-00050','Architectural Solutions - Single Sided  (Lance)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(290,119,504,'CORP_BC_Single-00032','CORP - Single Sided  (Julia)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(291,119,503,'APC_BC_Single-00032','Patient Care Corporation - Single Sided  (Brooklyn)','',500,500,0.2300,115.0000,14.9500,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(292,119,501,'ACA_BC_Single-00051','Architectural Solutions - Single Sided  (Baha)','',500,500,0.2300,115.0000,14.9500,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(293,120,469,'ALT_BC_Single-00014','Lighting Solutions - Single Sided  (Kareem)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(294,120,443,'ALT_BC_Single-00014','Lighting Solutions - Single Sided  (Scot)','',500,500,0.2300,115.0000,14.9500,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(295,120,445,'ALT_BC_Single-00016','Lighting Solutions - Single Sided  (John)','',500,500,0.2300,115.0000,14.9500,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(296,120,471,'ALT_BC_Single-00016','Lighting Solutions - Single Sided  (NICOLE)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(297,121,505,'INTL_BC_Double-00006','Medical Equipment - Double Sided  (Zuman)','',500,500,0.2300,115.0000,14.9500,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(298,122,507,'APC_BC_Single-00001','Patient Care Corporation - Single Sided  (Tera)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(299,123,509,'AA_BC_Double-00064','Accessories - Double Sided  (Hafeez)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(300,123,513,'APC_BC_Single-00003','Patient Care Corporation - Single Sided  (Stephanie)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(301,123,511,'ALT_BC_Single-00018','Lighting Solutions - Single Sided  (Kareem)','',500,500,0.2300,115.0000,14.9500,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(302,123,512,'ALT_BC_Single-00019','Lighting Solutions - Single Sided  (Stefani)','',500,500,0.2300,115.0000,14.9500,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(303,123,514,'ACP_BC_Single-00006','Pipeline Equipment - Single Sided  (MEHMEt)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(304,124,515,'AA_BC_Double-00065','Accessories - Double Sided  (Navdeep )','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(305,125,523,'AMO_BC_Double-00037','Mobility Solutions - Double Sided  (Francesco)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(306,125,524,'ACS_AMO_BC_Double-00018','Clinical and Mobility Solutions - Double Sided  (Stephen)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(307,125,525,'ACS_AMO_BC_Double-00019','Clinical and Mobility Solutions - Double Sided  (Hayden)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(308,125,526,'ACS_BC_Double-00027','Clinical Solutions - Double Sided  (Braydon)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(309,125,527,'ACS_BC_Double-00028','Clinical Solutions - Double Sided  (Brandon)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(310,125,528,'ACS_BC_Double-00029','Clinical Solutions - Double Sided  (Prashanthan)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(311,125,529,'ACS_BC_Double-00030','Clinical Solutions - Double Sided  (Matthew)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(312,126,530,'ACP_BC_Single-00007','Pipeline Equipment - Single Sided  (Brett W.)','',500,500,0.2300,115.0000,14.9500,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'r',NULL),(314,128,535,'AA_BC_Double_0724-00002','Accessories - Double Sided (Logo)  (Christy)','',500,500,0.3040,152.0000,19.7600,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(315,129,465,'OfflineOrder','Business Card without Foil - Offline Order (See PO)','',0,0,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,'0.0000','0.0000','0.0000','0',1,'d',NULL),(316,130,536,'ACS_BC_Double-00031','Clinical Solutions - Double Sided  (Ian)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(317,130,537,'ACS_AMO_BC_Double-00020','Clinical and Mobility Solutions - Double Sided  (Habib)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(318,131,532,'CORP_BC_Single-00033','CORP - Single Sided  (Steve)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(319,131,533,'CORP_BC_Single-00034','CORP - Single Sided  (Jancy)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(320,132,538,'AA_BC_Double_0724-00003','Accessories - Double Sided (Logo)  (Jason)','',500,500,0.3040,152.0000,19.7600,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(321,133,539,'AA_BC_Single-00003','Accessories - Single Sided  (Tony)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(322,134,465,'OfflineOrder','Business Card without Foil - Offline Order (See PO)','',500,500,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,'0.0000','0.0000','0.0000','0',1,'r',NULL),(323,135,211,'AA_BC_Double-00014','Accessories - Double Sided  (Will)','',0,0,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'zoey',NULL),(324,136,542,'AA_BC_Single-00006','Accessories - Single Sided  (Menan)','',500,500,0.2300,115.0000,14.9500,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(325,137,543,'AMO_BC_Double-00038','Mobility Solutions - Double Sided  (Emerson)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(326,138,545,'ALT_BC_Single-00021','Lighting Solutions - Single Sided  (Stefani)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(327,138,546,'ALT_BC_Single-00022','Lighting Solutions - Single Sided  (Ahmad)','',250,250,0.3600,90.0000,11.7000,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(328,139,547,'ALT_BC_Single-00023','Lighting Solutions - Single Sided  (Anand)','',250,250,0.3920,98.0000,12.7400,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(329,139,548,'ALT_BC_Single-00024','Lighting Solutions - Single Sided  (Leon)','',250,250,0.3920,98.0000,12.7400,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(330,140,549,'INTL_BC_Double-00007','Medical Equipment - Double Sided  (Test)','',0,0,0.3920,98.0000,12.7400,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Zoey Cui - Testing',NULL),(331,141,551,'APC_BC_Single-00005','Patient Care Corporation - Single Sided  (Michael)','',500,500,0.2640,132.0000,17.1600,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(332,142,552,'AA_BC_Single-00007','Accessories - Single Sided  (Ian)','',250,250,0.3920,98.0000,12.7400,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(333,143,553,'APC_BC_Single-00006','Patient Care Corporation - Single Sided  (Daniel)','',500,500,0.2640,132.0000,17.1600,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(334,144,554,'APC_BC_Single-00007','Patient Care Corporation - Single Sided  (Julia)','',500,500,0.2640,132.0000,17.1600,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(335,145,555,'AA_BC_Single-00008','Accessories - Single Sided  (Zac)','',250,250,0.3920,98.0000,12.7400,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(337,147,465,'OfflineOrder','Business Card without Foil - Offline Order (See PO)','',2000,2000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,'0.0000','0.0000','0.0000','0',1,'d',NULL),(339,149,557,'APC_BC_Single-00008','Patient Care Corporation - Single Sided  (Tabi)','',500,500,0.2640,132.0000,17.1600,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(340,150,558,'CORP_BC_Single-00035','CORP - Single Sided  (Rouby)','',250,250,0.3920,98.0000,12.7400,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(341,151,560,'APC_BC_Single-00010','Patient Care Corporation - Single Sided  (Nadia )','',500,500,0.2640,132.0000,17.1600,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(342,152,561,'ACS_BC_Double-00032','Clinical Solutions - Double Sided  (Melanie )','',250,250,0.3920,98.0000,12.7400,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(343,152,565,'ACS_BC_Double-00034','Clinical Solutions - Double Sided  (Brandon)','',250,250,0.3920,98.0000,12.7400,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(344,152,566,'ACS_AMO_BC_Double-00023','Clinical and Mobility Solutions - Double Sided  (Pradeep)','',250,250,0.3920,98.0000,12.7400,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(345,152,567,'ACS_AMO_BC_Double-00024','Clinical and Mobility Solutions - Double Sided  (Salar)','',250,250,0.3920,98.0000,12.7400,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(346,153,569,'APC_BC_Single-00011','Patient Care Corporation - Single Sided  (Brooklyn)','',500,500,0.2640,132.0000,17.1600,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(347,154,568,'AA_BC_Single-00009','Accessories - Single Sided  (Marko)','',500,500,0.2640,132.0000,17.1600,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','3.000000',1,'Sonia Yaqub',NULL),(349,155,465,'OfflineOrder','Business Card without Foil - Offline Order (See PO)','',1000,1000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,'0.0000','0.0000','0.0000','0',1,'f',NULL),(350,156,570,'CORP_BC_Single-00036','CORP - Single Sided  (Paul)','',250,250,0.3920,98.0000,12.7400,0.0000,0.0000,0.0000,0.0000,'9.0000','6.0000','3.0000','1.500000',1,'Sonia Yaqub',NULL),(352,157,572,'OfflineOrder_Single','Business Card - Single Sided - Offline Order (See PO)','',500,500,0.2640,132.0000,17.1600,0.0000,0.0000,0.0000,0.0000,'0.0000','0.0000','0.0000','0.000000',1,'d',NULL);

--
-- Table structure for table `orderHeader`
--

CREATE TABLE `orderHeader` (
  `ORDERID` int NOT NULL AUTO_INCREMENT,
  `USERNAME` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL,
  `ORDERDATE` datetime NOT NULL,
  `ORDERMODIFIED` datetime NOT NULL,
  `PONUMBER` varchar(200) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `SHIPCONTACTFIRSTNAME` varchar(200) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `SHIPCONTACTLASTNAME` varchar(200) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `SHIPCONTACTPHONE` varchar(45) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `SHIPCONTACTFAX` varchar(45) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `SHIPCONTACTEMAIL` varchar(45) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `SHIPNAME` varchar(200) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `SHIPADDRESS` varchar(200) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `SHIPADDRESS2` varchar(200) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `SHIPCITY` varchar(200) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `SHIPPROVINCE` varchar(200) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `SHIPCOUNTRY` varchar(200) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `SHIPPOSTAL` varchar(200) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `ORDERSTATUS` varchar(20) COLLATE utf8mb3_unicode_ci NOT NULL,
  `TAXNAME1` varchar(45) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `TAXNAME2` varchar(45) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `TAXNAME3` varchar(45) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `TAXNAME4` varchar(45) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `TAXNAME5` varchar(45) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `TAXRATE1` decimal(19,4) DEFAULT NULL,
  `TAXRATE2` decimal(19,4) DEFAULT NULL,
  `TAXRATE3` decimal(19,4) DEFAULT NULL,
  `TAXRATE4` decimal(19,4) DEFAULT NULL,
  `TAXRATE5` decimal(19,4) DEFAULT NULL,
  `SHIPPINGCOST` decimal(19,4) NOT NULL DEFAULT '0.0000',
  `SPECIALINSTRUCTIONS` varchar(1000) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `RECEIVERINSTRUCTIONS` varchar(1000) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `APPROVALLINK` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `EXPDATE` datetime DEFAULT NULL,
  `SHIPTAXGROUP` varchar(6) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `ORDERREF` int DEFAULT NULL,
  `PAYMENTREF` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `SHIPSTOREID` varchar(20) COLLATE utf8mb3_unicode_ci NOT NULL,
  `SHIPPINGCOSTTAXAMT1` decimal(19,4) DEFAULT '0.0000',
  `SHIPPINGCOSTTAXAMT2` decimal(19,4) DEFAULT '0.0000',
  `SHIPPINGCOSTTAXAMT3` decimal(19,4) DEFAULT '0.0000',
  `SHIPPINGCOSTTAXAMT4` decimal(19,4) DEFAULT '0.0000',
  `SHIPPINGCOSTTAXAMT5` decimal(19,4) DEFAULT '0.0000',
  `SHIPPINGMETHOD` varchar(45) COLLATE utf8mb3_unicode_ci DEFAULT 'N/A',
  `REQCONTACTFIRSTNAME` varchar(200) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `REQCONTACTLASTNAME` varchar(200) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `REQCONTACTPHONE` varchar(45) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `REQCONTACTFAX` varchar(45) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `REQNAME` varchar(200) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `REQADDRESS` varchar(200) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `REQADDRESS2` varchar(200) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `REQCITY` varchar(200) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `REQPROVINCE` varchar(200) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `REQCOUNTRY` varchar(200) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `REQPOSTAL` varchar(200) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `EXTRADATA1` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `APPROVALDATE` datetime DEFAULT NULL,
  `BILLINGCATEGORY` varchar(200) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`ORDERID`)
) ENGINE=InnoDB AUTO_INCREMENT=158 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `orderHeader`
--

INSERT INTO `orderHeader` VALUES (28,'amico','2019-06-20 13:49:29','2019-06-20 13:49:29','','k','k','905.764.0800','','patrick@creativepath.com','Amico','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','CANCELLED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'20190620164412','',NULL,'2019-06-28 13:49:29','ON',10000,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(29,'amico','2019-06-21 14:09:08','2019-06-21 14:09:08','','K','M','905.764.0800','','kmatuska@amico.com','Amico','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','CANCELLED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'20190807133511','THIS IS A TEST - PLEASE DO NOT PRINT THIS \nJUST WANT TO SEE WHAT HAPPENS IF I SELECT ORDER ',NULL,'2019-06-29 14:09:08','ON',10001,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(31,'amico','2019-07-31 13:36:21','2019-07-31 13:36:21','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'For our President, Albert so cards need to be perfect\nFoil on first and last name - just to be done on his card\nFoil on Amico logo and vertical line (standard on all cards)','',NULL,'2019-08-08 13:36:21','ON',10002,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(32,'amico','2019-08-29 19:35:52','2019-08-29 19:35:52','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'Bulk order\nPO# AC7004719','',NULL,'2019-09-06 19:35:52','ON',10003,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(33,'amico','2019-08-29 19:43:43','2019-08-29 19:43:43','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'Bulk order \nPO# AC7004717','',NULL,'2019-09-06 19:43:43','ON',10004,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(34,'amico','2019-08-29 19:47:52','2019-08-29 19:47:52','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'Bulk order\nPO# AIC0034330','',NULL,'2019-09-06 19:47:52','ON',10005,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(35,'amico','2019-08-29 19:50:01','2019-08-29 19:50:01','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'Bulk order \nPO# AS729961','',NULL,'2019-09-06 19:50:01','ON',10006,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(36,'amico','2019-08-29 19:57:13','2019-08-29 19:57:13','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'Bulk order\nPO# AA0134820','',NULL,'2019-09-06 19:57:13','ON',10007,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(37,'amico','2019-08-29 19:59:50','2019-08-29 19:59:50','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'Bulk order\nPO# AP0717996','',NULL,'2019-09-06 19:59:50','ON',10008,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(38,'amico','2019-09-06 13:42:02','2019-09-06 13:42:02','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO#: AC7004749','',NULL,'2019-09-14 13:42:02','ON',10009,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(39,'amico','2019-09-23 16:11:13','2019-09-23 16:11:13','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# AC7004855','',NULL,'2019-10-01 16:11:13','ON',10010,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(40,'amico','2019-10-04 15:22:14','2019-10-04 15:22:14','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# AA0135016','',NULL,'2019-10-12 15:22:14','ON',10011,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(41,'amico','2019-10-04 15:26:59','2019-10-04 15:26:59','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# AA0135017','',NULL,'2019-10-12 15:26:59','ON',10012,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(42,'amico','2019-10-15 13:35:55','2019-10-15 13:35:55','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# AC7004957','',NULL,'2019-10-23 13:35:55','ON',10013,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(43,'amico','2019-10-18 19:04:21','2019-10-18 19:04:21','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# AB0304311','',NULL,'2019-10-26 19:04:21','ON',10014,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(44,'amico','2019-10-21 13:43:59','2019-10-21 13:43:59','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'RUSH ORDER\nI do not have the PO# yet but once i do i will send Peggy an email with the PO #\nNeed the business cards by EOD Tuesday, October 22 - informed by Peggy that this could be done. \nThank you very much for your help! ','',NULL,'2019-10-29 13:43:59','ON',10015,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(45,'amico','2019-10-24 13:44:27','2019-10-24 13:44:27','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# LT0505921','',NULL,'2019-11-01 13:44:27','ON',10016,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(46,'amico','2019-10-24 13:48:03','2019-10-24 13:48:03','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# CS0472680','',NULL,'2019-11-01 13:48:03','ON',10017,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(47,'amico','2019-10-24 13:50:54','2019-10-24 13:50:54','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO#APC7005039','',NULL,'2019-11-01 13:50:54','ON',10018,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(48,'amico','2019-10-24 13:55:59','2019-10-24 13:55:59','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# CS0472693\nIs it possible to get Collin Maronese cards by EOD Monday, Oct 28? Just his, the others can wait for the week turnaround. Thank you ','',NULL,'2019-11-01 13:55:59','ON',10019,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(49,'amico','2019-10-29 18:59:25','2019-10-29 18:59:25','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# APC7005071','',NULL,'2019-11-06 18:59:25','ON',10020,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(50,'amico','2019-10-30 15:18:54','2019-10-30 15:18:54','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# AC7005084\nRush order - have been informed by Peggy that we can have the order by EOD on Friday, Nov 1. \nThank you for your help!  ','',NULL,'2019-11-07 15:18:54','ON',10021,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(51,'amico','2019-11-07 21:17:16','2019-11-07 21:17:16','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# AA0135295','',NULL,'2019-11-15 21:17:16','ON',10022,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(52,'amico','2019-11-07 21:20:08','2019-11-07 21:20:08','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# AC7005139','',NULL,'2019-11-15 21:20:08','ON',10023,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(53,'amico','2019-11-07 21:59:15','2019-11-07 21:59:15','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO # AIC0034740','',NULL,'2019-11-15 21:59:15','ON',10024,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(54,'amico','2019-12-16 14:41:55','2019-12-16 14:41:55','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# AC7005391','',NULL,'2019-12-24 14:41:55','ON',10025,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(55,'amico','2020-01-02 14:30:54','2020-01-02 14:30:54','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# AC7005453','',NULL,'2020-01-10 14:30:54','ON',10026,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(56,'amico','2020-01-13 15:18:32','2020-01-13 15:18:32','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'POAA0135647','',NULL,'2020-01-21 15:18:32','ON',10027,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(57,'amico','2020-01-17 13:53:03','2020-01-17 13:53:03','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# MO0302252','',NULL,'2020-01-25 13:53:03','ON',10028,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(58,'amico','2020-01-24 16:29:13','2020-01-24 16:29:13','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# AS731156','',NULL,'2020-02-01 16:29:13','ON',10029,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(59,'amico','2020-02-04 20:41:07','2020-02-04 20:41:07','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# AC7005675','',NULL,'2020-02-12 20:41:07','ON',10030,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(60,'amico','2020-02-04 20:42:35','2020-02-04 20:42:35','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# AIC0035130','',NULL,'2020-02-12 20:42:35','ON',10031,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(61,'amico','2020-02-11 15:32:59','2020-02-11 15:32:59','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# AC7005735','',NULL,'2020-02-19 15:32:59','ON',10032,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(62,'amico','2020-02-13 19:55:10','2020-02-13 19:55:10','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO#AA0135863','',NULL,'2020-02-21 19:55:10','ON',10033,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(63,'amico','2020-02-25 16:39:18','2020-02-25 16:39:18','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# LT0506367','',NULL,'2020-03-04 16:39:18','ON',10034,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(64,'amico','2020-03-02 16:31:29','2020-03-02 16:31:29','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# AC7005865','',NULL,'2020-03-10 16:31:29','ON',10035,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(65,'amico','2020-03-06 18:55:02','2020-03-06 18:55:02','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# APC7005914','',NULL,'2020-03-14 18:55:02','ON',10036,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(66,'amico','2020-03-13 17:43:02','2020-03-13 17:43:02','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# LT0506465','',NULL,'2020-03-21 17:43:02','ON',10037,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(67,'amico','2020-05-11 10:11:01','2020-05-11 10:11:01','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# AC7006371','',NULL,'2020-05-19 10:11:01','ON',10038,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(68,'amico','2020-07-07 10:51:58','2020-07-07 10:51:58','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# CS0474132','',NULL,'2020-07-15 10:51:58','ON',10039,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(69,'amico','2020-09-18 09:24:26','2020-09-18 09:24:26','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# AA0137610','',NULL,'2020-09-26 09:24:26','ON',10040,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(70,'amico','2020-10-23 16:23:56','2020-10-23 16:23:56','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO: AA0137836','',NULL,'2020-10-31 16:23:56','ON',10041,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','85 Fulton Way','','Richmond Hill','ON','Canada','L4B 2N4',NULL,NULL,NULL),(71,'amico','2020-11-03 14:00:43','2020-11-03 14:00:43','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO: AC7007478','',NULL,'2020-11-11 14:00:43','ON',10042,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(72,'amico','2020-11-10 11:05:45','2020-11-10 11:05:45','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# AC7007517','',NULL,'2020-11-18 11:05:45','ON',10043,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(73,'amico','2020-12-03 16:06:50','2020-12-03 16:06:50','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO: APC7007669','',NULL,'2020-12-11 16:06:50','ON',10044,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(74,'amico','2021-02-16 13:51:32','2021-02-16 13:51:32','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# AA0138575','',NULL,'2021-02-24 13:51:32','ON',10045,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(75,'amico','2021-02-19 16:28:23','2021-02-19 16:28:23','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO: AA0138600','',NULL,'2021-02-27 16:28:23','ON',10046,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(77,'amico','2021-05-03 10:51:57','2021-05-03 10:51:57','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# CS0475941\nPlease include $15 fee for changing back image so total on invoice will be $380 + tax - thank you ','',NULL,'2021-05-11 10:51:57','ON',10047,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(78,'amico','2021-05-03 11:00:04','2021-05-03 11:00:04','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# MO0303348\nPlease include the $15 fee to change the back image on the invoice so total will be $526+tax - thank you ','',NULL,'2021-05-11 11:00:04','ON',10048,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(79,'amico','2021-05-03 11:07:14','2021-05-03 11:07:14','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# CS0475942\nPlease include the fee of $50 to set-up this new division so invoice will be $561+tax - thank you ','',NULL,'2021-05-11 11:07:14','ON',10049,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(80,'amico','2021-06-03 13:42:45','2021-06-03 13:42:45','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# AC7008792','',NULL,'2021-06-11 13:42:45','ON',10050,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(81,'amico','2021-06-29 10:05:44','2021-06-29 10:05:44','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# APC7008951','',NULL,'2021-07-07 10:05:44','ON',10051,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(82,'amico','2021-07-15 09:49:01','2021-07-15 09:49:01','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# AA0139479','',NULL,'2021-07-23 09:49:01','ON',10052,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(83,'amico','2021-07-23 13:45:33','2021-07-23 13:45:33','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# LT0508250','',NULL,'2021-07-31 13:45:33','ON',10053,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(84,'amico','2021-08-04 14:37:04','2021-08-04 14:37:04','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# AC7009155','',NULL,'2021-08-12 14:37:04','ON',10054,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(85,'amico','2021-08-16 12:12:48','2021-08-16 12:12:48','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# AC7009215','',NULL,'2021-08-24 12:12:48','ON',10055,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(86,'amico','2021-08-30 09:35:07','2021-08-30 09:35:07','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# AS735653','',NULL,'2021-09-07 09:35:07','ON',10056,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(87,'amico','2021-09-13 13:53:40','2021-09-13 13:53:40','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO: AC7009372','',NULL,'2021-09-21 13:53:40','ON',10057,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(88,'amico','2021-09-16 08:39:56','2021-09-16 08:39:56','','Kimberley','Matuska','905.764.0800','','kmatuska@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO: AS735783','',NULL,'2021-09-24 08:39:56','ON',10058,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(89,'amico','2021-09-21 17:11:58','2021-09-21 17:11:58','','Sandy ','Deak','905.764.0800','','marketing@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'PO# AA0139862\nThis is an order for the temporary 250 cards with the Blue Amico Logo, to then be the full order of 500 cards when the foil machine is running.','',NULL,'2021-09-29 17:11:58','ON',10059,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(90,'amico','2021-11-15 15:06:25','2021-11-15 15:06:25','','Sonia','Yaqub','905.764.0800','','marketing@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'New Silver Foil Business Cards order.','Deliver to 55 East Wilmot Street, attn: Sonia Yaqub. ',NULL,'2021-11-23 15:06:25','ON',10060,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(91,'amico','2021-12-17 16:25:48','2021-12-17 16:25:48','','Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','Doing this for the first time, I will email purchase orders. This is the most I could collect for this batch. Thank you.',NULL,'2021-12-25 16:25:48','ON',10061,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(92,'amico','2021-12-30 11:45:18','2021-12-30 11:45:18','','Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'I will send you the Purchase order shortly. ','',NULL,'2022-01-07 11:45:18','ON',10062,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(93,'amico','2022-01-28 14:57:10','2022-01-28 14:57:10','','Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','I will email Purchase orders shortly.',NULL,'2022-02-05 14:57:10','ON',10063,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(94,'amico','2022-01-28 14:58:58','2022-01-28 14:58:58','','Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','I will send purchase orders shortly. ',NULL,'2022-02-05 14:58:58','ON',10064,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(95,'amico','2022-01-28 15:00:23','2022-01-28 15:00:23','','Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','I will send you purchase orders shortly. ',NULL,'2022-02-05 15:00:23','ON',10065,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(96,'amico','2022-01-28 15:03:34','2022-01-28 15:03:34','','Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','I will send you purchase orders shortly. ',NULL,'2022-02-05 15:03:34','ON',10066,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(97,'amico','2022-03-02 13:28:31','2022-03-02 13:28:31','','Sandy','Deak','905.764.0800','','marketing@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'attn: Marketing/Sandy Deak\n','',NULL,'2022-03-10 13:28:31','ON',10067,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(98,'amico','2022-04-22 14:56:57','2022-04-22 14:56:57','','Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2022-04-30 14:56:57','ON',10068,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(100,'amico','2022-07-22 14:23:54','2022-07-22 14:23:54','','Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2022-07-30 14:23:54','ON',10069,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Kimberley','Matuska','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(101,'amico','2022-09-28 15:08:05','2022-09-28 15:08:05','','Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'There are two orders of business cards; the other one is a custom business card. Please see the email I sent to Peggy. ','',NULL,'2022-10-06 15:08:05','ON',10070,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(102,'amico','2022-10-19 14:11:12','2022-10-19 14:11:12','','Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'Delivery to 120 Fulton way receiving department. attn to Sonia Yaqub (Marketing) ','',NULL,'2022-10-27 14:11:12','ON',10071,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(103,'amico','2022-10-20 14:19:20','2022-10-20 14:19:20','','Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'I will send you the P.O. in the email.','',NULL,'2022-10-28 14:19:20','ON',10072,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(104,'amico','2022-10-26 10:43:58','2022-10-26 10:43:58','','Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2022-11-03 10:43:58','ON',10073,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(105,'peggy','2022-11-09 16:40:23','2022-11-09 16:40:23','','Peggy','Cheng','905-709-9609','905-709-9610','peggy@creativepath.com','Creative Path Digital Imaging Inc. ','1455-16th Avenue, Unit 1 & 2','','Richmond Hill','ON','Canada','L4B 4W5','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'Eric, please see PO for more information. ','',NULL,'2022-11-17 16:40:23','ON',10074,'','CPDI',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Peggy','Cheng','905-709-9609','905-709-9610','Creative Path Digital Imaging Inc. ','1455-16th Avenue, Unit 1 & 2','','Richmond Hill','ON','Canada','L4B 4W5',NULL,NULL,NULL),(107,'amico','2023-01-25 11:26:53','2023-01-25 11:26:53','','Marketin','Department','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'Shipping to 120 Fulton Way, c. ','',NULL,'2023-02-02 11:26:53','ON',10075,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(108,'amico','2023-03-06 16:12:43','2023-03-06 16:12:43','','Marketing','Department','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'Delivery to 55 East Wilmot St','',NULL,'2023-03-14 16:12:43','ON',10076,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(109,'amico','2023-03-23 12:07:12','2023-03-23 12:07:12','','Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2023-03-31 12:07:12','ON',10077,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(110,'peggy','2023-04-04 10:56:58','2023-04-04 10:56:58','','Peggy','Cheng','905-709-9609','905-709-9610','peggy@creativepath.com','Creative Path Digital Imaging Inc. ','1455-16th Avenue, Unit 1 & 2','','Richmond Hill','ON','Canada','L4B 4W5','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'Offline order','',NULL,'2023-04-12 10:56:58','ON',10078,'','CPDI',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Peggy','Cheng','905-709-9609','905-709-9610','Creative Path Digital Imaging Inc. ','1455-16th Avenue, Unit 1 & 2','','Richmond Hill','ON','Canada','L4B 4W5',NULL,NULL,NULL),(111,'amico','2023-04-06 13:58:59','2023-04-06 13:58:59','','Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2023-04-14 13:58:59','ON',10079,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(112,'amico','2023-04-14 16:10:37','2023-04-14 16:10:37','','Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2023-04-22 16:10:37','ON',10080,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(113,'amico','2023-04-28 10:44:07','2023-04-28 10:44:07','','Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'Deliver to 55 East Wilmot ','',NULL,'2023-05-06 10:44:07','ON',10081,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(114,'amico','2023-05-19 15:43:27','2023-05-19 15:43:27','','Marketing','Department','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2023-05-27 15:43:27','ON',10082,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(115,'amico','2023-05-23 14:31:52','2023-05-23 14:31:52','','Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2023-05-31 14:31:52','ON',10083,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(117,'amico','2023-06-07 16:17:25','2023-06-07 16:17:25','','Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2023-06-15 16:17:25','ON',10084,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(118,'amico','2023-07-13 14:21:05','2023-07-13 14:21:05','','Sonia ','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2023-07-21 14:21:05','ON',10085,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(119,'amico','2023-08-16 11:03:26','2023-08-16 11:03:26','','Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2023-08-24 11:03:26','ON',10086,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(120,'amico','2023-09-11 15:48:21','2023-09-11 15:48:21','','Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2023-09-19 15:48:21','ON',10087,'','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(121,'amico','2023-09-27 11:33:42','2023-09-27 11:33:42','','Marketing','Department','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2023-10-05 11:33:42','ON',10088,'BHO','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(122,'amico','2023-10-26 16:30:22','2023-10-26 16:30:22',NULL,'Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2023-11-03 16:30:22','ON',10089,'BHO','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(123,'amico','2024-01-19 14:20:33','2024-01-19 14:20:33',NULL,'Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'Please deliver to 55 Receiving dock area ','',NULL,'2024-01-27 14:20:33','ON',10090,'BHO','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(124,'amico','2024-02-09 14:21:37','2024-02-09 14:21:37',NULL,'Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'Delivery to Receiving area at 55 East Wilmot','',NULL,'2024-02-17 14:21:37','ON',10091,'BHO','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(125,'amico','2024-03-08 16:31:34','2024-03-08 16:31:34',NULL,'Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'Ship to Receiving area of 55 East Wilmot. ','',NULL,'2024-03-16 16:31:34','ON',10092,'BHO','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(126,'peggy','2024-06-26 15:56:38','2024-06-26 15:56:38',NULL,'Peggy','Cheng','905-709-9609','905-709-9610','peggy@creativepath.com','Creative Path Digital Imaging Inc. ','1455-16th Avenue, Unit 1 & 2','','Richmond Hill','ON','Canada','L4B 4W5','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'Offline order - custom card','',NULL,'2024-07-04 15:56:38','ON',10093,'BHO','CPDI',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Peggy','Cheng','905-709-9609','905-709-9610','Creative Path Digital Imaging Inc. ','1455-16th Avenue, Unit 1 & 2','','Richmond Hill','ON','Canada','L4B 4W5',NULL,NULL,NULL),(128,'amico','2024-07-19 16:21:58','2024-07-19 16:21:58',NULL,'Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2024-07-27 16:21:58','ON',10094,'BHO','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(129,'peggy','2024-07-22 12:17:04','2024-07-22 12:17:04',NULL,'Peggy','Cheng','905-709-9609','905-709-9610','peggy@creativepath.com','Creative Path Digital Imaging Inc. ','1455-16th Avenue, Unit 1 & 2','','Richmond Hill','ON','Canada','L4B 4W5','CANCELLED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'20240723104512','',NULL,'2024-07-30 12:17:04','ON',10095,'BHO','CPDI',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Peggy','Cheng','905-709-9609','905-709-9610','Creative Path Digital Imaging Inc. ','1455-16th Avenue, Unit 1 & 2','','Richmond Hill','ON','Canada','L4B 4W5',NULL,NULL,NULL),(130,'amico','2024-07-22 14:22:02','2024-07-22 14:22:02',NULL,'Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2024-07-30 14:22:02','ON',10096,'BHO','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(131,'amico','2024-07-25 16:12:27','2024-07-25 16:12:27',NULL,'Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2024-08-02 16:12:27','ON',10097,'BHO','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(132,'amico','2024-08-08 11:39:53','2024-08-08 11:39:53',NULL,'Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2024-08-16 11:39:53','ON',10098,'BHO','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(133,'amico','2024-08-14 16:44:40','2024-08-14 16:44:40',NULL,'Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2024-08-22 16:44:40','ON',10099,'BHO','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(134,'peggy','2024-08-27 14:33:48','2024-08-27 14:33:48',NULL,'Peggy','Cheng','905-709-9609','905-709-9610','peggy@creativepath.com','Creative Path Digital Imaging Inc. ','1455-16th Avenue, Unit 1 & 2','','Richmond Hill','ON','Canada','L4B 4W5','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'SEE PO for Invoicing. ','',NULL,'2024-09-04 14:33:48','ON',10100,'BHO','CPDI',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Peggy','Cheng','905-709-9609','905-709-9610','Creative Path Digital Imaging Inc. ','1455-16th Avenue, Unit 1 & 2','','Richmond Hill','ON','Canada','L4B 4W5',NULL,NULL,NULL),(135,'zoeyc','2024-09-07 13:50:15','2024-09-07 13:50:15',NULL,'Zoey','Cui','905-709-9609','905-709-9610','zoeyc@cpfulfillment.com','Creative Path Digital Imaging Inc. ','1455-16th Avenue, Unit 1 & 2','','Richmond Hill','ON','Canada','L4B 4W5','CANCELLED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'20240916110116','',NULL,'2024-09-15 13:50:15','ON',10101,'BHO','CPDI',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Zoey','C','905-709-9609','905-709-9610','Creative Path Digital Imaging Inc. ','1455-16th Avenue, Unit 1 & 2','','Richmond Hill','ON','Canada','L4B 4W5',NULL,NULL,NULL),(136,'amico','2024-09-19 13:27:48','2024-09-19 13:27:48',NULL,'Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2024-09-27 13:27:48','ON',10102,'BHO','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(137,'amico','2024-09-27 11:58:09','2024-09-27 11:58:09',NULL,'Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2024-10-05 11:58:09','ON',10103,'BHO','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(138,'amico','2024-10-03 16:53:51','2024-10-03 16:53:51',NULL,'Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2024-10-11 16:53:51','ON',10104,'BHO','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(139,'amico','2024-11-19 14:22:04','2024-11-19 14:22:04',NULL,'Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2024-11-27 14:22:04','ON',10105,'BHO','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,NULL),(140,'zoeyc','2024-12-01 16:19:32','2024-12-01 16:19:32','','Zoey','Cui','905-709-9609','905-709-9610','zoeyc@cpfulfillment.com','Creative Path Digital Imaging Inc. ','1455-16th Avenue, Unit 1 & 2','','Richmond Hill','ON','Canada','L4B 4W5','CANCELLED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'20250204180526','',NULL,'2024-12-09 16:19:32','ON',10106,'BHO','CPDI',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Zoey','C','905-709-9609','905-709-9610','Creative Path Digital Imaging Inc. ','1455-16th Avenue, Unit 1 & 2','','Richmond Hill','ON','Canada','L4B 4W5',NULL,NULL,''),(141,'amico','2024-12-17 19:11:22','2024-12-17 19:11:22','','Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2024-12-25 19:11:22','ON',10107,'BHO','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,''),(142,'amico','2025-01-03 20:37:54','2025-01-03 20:37:54','','Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2025-01-11 20:37:54','ON',10108,'BHO','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,''),(143,'amico','2025-01-09 15:41:01','2025-01-09 15:41:01','','Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2025-01-17 15:41:01','ON',10109,'BHO','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,''),(144,'amico','2025-01-27 21:31:19','2025-01-27 21:31:19','','Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2025-02-04 21:31:19','ON',10110,'BHO','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,''),(145,'amico','2025-01-31 19:55:53','2025-01-31 19:55:53','','Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2025-02-08 19:55:53','ON',10111,'BHO','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,''),(147,'peggy','2025-02-21 16:47:28','2025-02-21 16:47:28','','Peggy','Cheng','905.764.0800','','peggy@creativepath.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'This is an offline. Please see the PO for details. 1,000 (250x 4 versions) + 1,000 (500x 2 versions)','',NULL,'2025-03-01 16:47:28','ON',10112,'BHO','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Peggy','Cheng','905-709-9609','905-709-9610','Creative Path Digital Imaging Inc. ','1455-16th Avenue, Unit 1 & 2','','Richmond Hill','ON','Canada','L4B 4W5',NULL,NULL,''),(149,'amico','2025-04-01 14:22:42','2025-04-01 14:22:42','','Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2025-04-09 14:22:42','ON',10113,'BHO','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,''),(150,'amico','2025-04-17 19:36:24','2025-04-17 19:36:24','','Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2025-04-25 19:36:24','ON',10114,'BHO','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,''),(151,'amico','2025-06-12 20:18:04','2025-06-12 20:18:04','','Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2025-06-20 20:18:04','ON',10115,'BHO','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,''),(152,'amico','2025-06-23 16:13:19','2025-06-23 16:13:19','','Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2025-07-01 16:13:19','ON',10116,'BHO','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,''),(153,'amico','2025-07-15 19:42:35','2025-07-15 19:42:35','','Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2025-07-23 19:42:35','ON',10117,'BHO','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,''),(154,'amico','2025-07-15 20:06:58','2025-07-15 20:06:58','','Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2025-07-23 20:06:58','ON',10118,'BHO','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,''),(155,'peggy','2025-08-18 17:39:14','2025-08-18 17:39:14','','Peggy','Cheng','905-709-9609','905-709-9610','peggy@creativepath.com','Creative Path Digital Imaging Inc. ','1455-16th Avenue, Unit 1 & 2','','Richmond Hill','ON','Canada','L4B 4W5','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'Eric, this is an offline order. Please see the PO for invoicing ','',NULL,'2025-08-26 17:39:14','ON',10119,'BHO','CPDI',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Peggy','Cheng','905-709-9609','905-709-9610','Creative Path Digital Imaging Inc. ','1455-16th Avenue, Unit 1 & 2','','Richmond Hill','ON','Canada','L4B 4W5',NULL,NULL,''),(156,'amico','2025-09-16 15:19:42','2025-09-16 15:19:42','','Sonia','Yaqub','905.764.0800','','syaqub@amico.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'','',NULL,'2025-09-24 15:19:42','ON',10120,'BHO','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Sonia','Yaqub','905.764.0800','','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3',NULL,NULL,''),(157,'peggy','2025-10-02 17:19:57','2025-10-02 17:19:57','','Peggy','Cheng','905.764.0800','','peggy@creativepath.com','Amico Corporation','55 East Wilmot St','','Richmond Hill','ON','Canada','L4B 1A3','SHIPPED','HST','','','','',0.1300,0.0000,0.0000,0.0000,0.0000,0.0000,'Invoice to Sonia use PO AS0746016','',NULL,'2025-10-10 17:19:57','ON',10121,'BHO','amico',0.0000,0.0000,0.0000,0.0000,0.0000,'Ground','Peggy','Cheng','905-709-9609','905-709-9610','Creative Path Digital Imaging Inc. ','1455-16th Avenue, Unit 1 & 2','','Richmond Hill','ON','Canada','L4B 4W5',NULL,NULL,'');

--
-- Table structure for table `orderPromos`
--

CREATE TABLE `orderPromos` (
  `ORDERID` int NOT NULL,
  `PROMOCODE` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL,
  `PROMONAME` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL,
  `PROMOTYPE` varchar(12) COLLATE utf8mb3_unicode_ci NOT NULL,
  `SINGLEITEM` int NOT NULL DEFAULT '0',
  `PROMOVALUE` decimal(19,2) NOT NULL,
  `CALCDISCOUNT` decimal(19,2) NOT NULL,
  `TAXAMT1` decimal(19,2) NOT NULL,
  `TAXAMT2` decimal(19,2) NOT NULL,
  `TAXAMT3` decimal(19,2) NOT NULL,
  `TAXAMT4` decimal(19,2) NOT NULL,
  `TAXAMT5` decimal(19,2) NOT NULL,
  PRIMARY KEY (`ORDERID`,`PROMOCODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `orderPromos`
--


--
-- Table structure for table `preOrderDefinition`
--

CREATE TABLE `preOrderDefinition` (
  `CODE` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL,
  `ITEMNAME` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL,
  `SHORTDESC` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '',
  `FULLDESC` varchar(1000) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '',
  `COMPONENTINPUTS` varchar(1000) COLLATE utf8mb3_unicode_ci DEFAULT '',
  `DISPLAYIMAGEPATH` varchar(200) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '',
  `ACTIVE` int NOT NULL DEFAULT '1',
  `BRAND` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'ALL',
  `EMAILDESC` varchar(1000) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '',
  `AVAILABLELANGS` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'English|Bilingual',
  PRIMARY KEY (`CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `preOrderDefinition`
--


--
-- Table structure for table `preOrderDefinitionV2`
--

CREATE TABLE `preOrderDefinitionV2` (
  `ACTIVE` int NOT NULL DEFAULT '1',
  `CODE` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL,
  `BRAND` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'ALL',
  `ITEMNAME` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL,
  `INTRODESC` varchar(1000) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '',
  `INTRODESC_EMAIL` varchar(1000) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '',
  `ELIGIBLEQUESTION` varchar(1000) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '',
  `ELIGIBLENO` varchar(1000) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '',
  `AVAILABLELANGS` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'English|Bilingual',
  `SECTION1NAME` varchar(1000) COLLATE utf8mb3_unicode_ci DEFAULT '',
  `SECTION1INTRO` varchar(1000) COLLATE utf8mb3_unicode_ci DEFAULT '',
  `SECTION1INTRO_EMAIL` varchar(1000) COLLATE utf8mb3_unicode_ci DEFAULT '',
  `SECTION1COMPONENT` varchar(1000) COLLATE utf8mb3_unicode_ci DEFAULT '',
  `SECTION1FOOTER` varchar(1000) COLLATE utf8mb3_unicode_ci DEFAULT '',
  `SECTION2NAME` varchar(1000) COLLATE utf8mb3_unicode_ci DEFAULT '',
  `SECTION2INTRO` varchar(1000) COLLATE utf8mb3_unicode_ci DEFAULT '',
  `SECTION2INTRO_EMAIL` varchar(1000) COLLATE utf8mb3_unicode_ci DEFAULT '',
  `SECTION2COMPONENT` varchar(1000) COLLATE utf8mb3_unicode_ci DEFAULT '',
  `SECTION2FOOTER` varchar(1000) COLLATE utf8mb3_unicode_ci DEFAULT '',
  `SECTION3NAME` varchar(1000) COLLATE utf8mb3_unicode_ci DEFAULT '',
  `SECTION3INTRO` varchar(1000) COLLATE utf8mb3_unicode_ci DEFAULT '',
  `SECTION3INTRO_EMAIL` varchar(1000) COLLATE utf8mb3_unicode_ci DEFAULT '',
  `SECTION3COMPONENT` varchar(1000) COLLATE utf8mb3_unicode_ci DEFAULT '',
  `SECTION3FOOTER` varchar(1000) COLLATE utf8mb3_unicode_ci DEFAULT '',
  `SUBMITMESSAGE` varchar(1000) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '',
  `BANNERIMAGE` varchar(1000) COLLATE utf8mb3_unicode_ci DEFAULT '',
  PRIMARY KEY (`CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `preOrderDefinitionV2`
--


--
-- Table structure for table `preOrders`
--

CREATE TABLE `preOrders` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `CODE` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL,
  `USERNAME` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL,
  `BRANCH` varchar(20) COLLATE utf8mb3_unicode_ci NOT NULL,
  `SKIN` varchar(20) COLLATE utf8mb3_unicode_ci NOT NULL,
  `STORENAME` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `ADDRESS` varchar(1000) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `ADDRESS2` varchar(1000) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `CITY` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `PROVINCE` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `COUNTRY` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `POSTALCODE` varchar(20) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `CONTACTNAME` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL,
  `CONTACTEMAIL` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL,
  `BASEQTY` int NOT NULL DEFAULT '1',
  `COMPONENTS` varchar(1000) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `LANGUAGE` varchar(45) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `preOrders`
--


--
-- Table structure for table `preOrdersV2`
--

CREATE TABLE `preOrdersV2` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `CODE` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL,
  `USERNAME` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL,
  `BRANCH` varchar(20) COLLATE utf8mb3_unicode_ci NOT NULL,
  `SKIN` varchar(20) COLLATE utf8mb3_unicode_ci NOT NULL,
  `STORENAME` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `ADDRESS` varchar(1000) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `ADDRESS2` varchar(1000) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `CITY` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `PROVINCE` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `COUNTRY` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `POSTALCODE` varchar(20) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `CONTACTNAME` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL,
  `CONTACTEMAIL` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL,
  `CONTACTPHONE` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL,
  `COMPONENTS1` varchar(1000) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `COMPONENTS2` varchar(1000) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `COMPONENTS3` varchar(1000) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `LANGUAGE` varchar(45) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `preOrdersV2`
--


--
-- Table structure for table `promos`
--

CREATE TABLE `promos` (
  `CODE` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL,
  `NAME` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL,
  `CODETYPE` varchar(12) COLLATE utf8mb3_unicode_ci NOT NULL,
  `STARTDATE` date NOT NULL,
  `ENDDATE` date NOT NULL,
  `SINGLEUSE` int NOT NULL DEFAULT '0',
  `REDEEMED` int NOT NULL DEFAULT '0',
  `PROMOVALUE` decimal(19,2) NOT NULL DEFAULT '0.00',
  `SINGLEITEM` int NOT NULL DEFAULT '0',
  `MAXQTY` int DEFAULT '0',
  `MINQTY` int DEFAULT '0',
  `EXACTQTY` int DEFAULT '0',
  `QTYTYPE` varchar(12) COLLATE utf8mb3_unicode_ci NOT NULL,
  PRIMARY KEY (`CODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `promos`
--


--
-- Table structure for table `promosCategories`
--

CREATE TABLE `promosCategories` (
  `CODE` varchar(50) NOT NULL,
  `CATID` int NOT NULL,
  PRIMARY KEY (`CODE`,`CATID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `promosCategories`
--


--
-- Table structure for table `promosItems`
--

CREATE TABLE `promosItems` (
  `CODE` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL,
  `ITEMID` int NOT NULL,
  PRIMARY KEY (`CODE`,`ITEMID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `promosItems`
--


--
-- Table structure for table `settings`
--

CREATE TABLE `settings` (
  `key` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL,
  `value` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL,
  PRIMARY KEY (`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `settings`
--

INSERT INTO `settings` VALUES ('site_maint','0');

--
-- Table structure for table `shipToAddresses`
--

CREATE TABLE `shipToAddresses` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `STOREID` varchar(10) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `NAME` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL,
  `ADDRESS` varchar(1000) COLLATE utf8mb3_unicode_ci NOT NULL,
  `ADDRESS2` varchar(1000) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '',
  `CITY` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL,
  `PROVINCE` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL,
  `COUNTRY` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL,
  `POSTAL` varchar(20) COLLATE utf8mb3_unicode_ci NOT NULL,
  `PHONE` varchar(20) COLLATE utf8mb3_unicode_ci NOT NULL,
  `FAX` varchar(20) COLLATE utf8mb3_unicode_ci NOT NULL,
  `TAXGROUP` varchar(6) COLLATE utf8mb3_unicode_ci NOT NULL,
  `SHIPZONE` varchar(6) COLLATE utf8mb3_unicode_ci NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `shipToAddresses`
--


--
-- Table structure for table `shipToAddressesUserList`
--

CREATE TABLE `shipToAddressesUserList` (
  `ID` int NOT NULL,
  `USERNAME` varchar(50) NOT NULL,
  PRIMARY KEY (`ID`,`USERNAME`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `shipToAddressesUserList`
--


--
-- Table structure for table `shipZoneCosts`
--

CREATE TABLE `shipZoneCosts` (
  `WEIGHT` int NOT NULL,
  `None` decimal(16,2) NOT NULL DEFAULT '0.00',
  `Zone1` decimal(16,2) NOT NULL DEFAULT '0.00',
  `Zone2` decimal(16,2) NOT NULL DEFAULT '0.00',
  `Zone3` decimal(16,2) NOT NULL DEFAULT '0.00',
  `Zone4` decimal(16,2) NOT NULL DEFAULT '0.00',
  `Zone5` decimal(16,2) NOT NULL DEFAULT '0.00',
  `Zone6` decimal(16,2) NOT NULL DEFAULT '0.00',
  `Zone7` decimal(16,2) NOT NULL DEFAULT '0.00',
  `Zone8` decimal(16,2) NOT NULL DEFAULT '0.00',
  `Zone9` decimal(16,2) NOT NULL DEFAULT '0.00',
  `Zone10` decimal(16,2) NOT NULL DEFAULT '0.00',
  `Zone11` decimal(16,2) NOT NULL DEFAULT '0.00',
  `Zone12` decimal(16,2) NOT NULL DEFAULT '0.00',
  `Zone13` decimal(16,2) NOT NULL DEFAULT '0.00',
  `Zone14` decimal(16,2) NOT NULL DEFAULT '0.00',
  `Zone15` decimal(16,2) NOT NULL DEFAULT '0.00',
  `Zone16` decimal(16,2) NOT NULL DEFAULT '0.00',
  `Zone17` decimal(16,2) NOT NULL DEFAULT '0.00',
  `Zone18` decimal(16,2) NOT NULL DEFAULT '0.00',
  `Zone19` decimal(16,2) NOT NULL DEFAULT '0.00',
  PRIMARY KEY (`WEIGHT`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `shipZoneCosts`
--

INSERT INTO `shipZoneCosts` VALUES (0,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00);

--
-- Table structure for table `shipmentCostLog`
--

CREATE TABLE `shipmentCostLog` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `CARRIER` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `METHOD` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `SHIPFROM_NAME` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `SHIPFROM_STREETNUM` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `SHIPFROM_STREET` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `SHIPFROM_CITY` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `SHIPFROM_PROVINCE` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `SHIPFROM_COUNTRY` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `SHIPFROM_POSTAL` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `TOTALWEIGHT` decimal(19,4) DEFAULT NULL,
  `TOTALBOXES` int DEFAULT NULL,
  `SHIPTO_PROVINCE` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `SHIPTO_POSTAL` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `SHIPTO_CITY` varchar(100) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `TOTALPRICE` decimal(19,4) DEFAULT NULL,
  `OURMARKUP` decimal(19,4) DEFAULT NULL,
  `OURSLEEVECHARGE` decimal(19,4) DEFAULT NULL,
  `ORDERID` int DEFAULT NULL,
  `CREATEDATETIME` datetime DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `shipmentCostLog`
--

INSERT INTO `shipmentCostLog` VALUES (1,'PUROLATOR','Express','Creative Path','1455','16th Avenue','Richmond Hill','ON','CA','L4B4W5',1.5000,1,'ON','L4B 2N4','Richmond Hill',9.6600,1.3000,0.0000,23,'2019-05-24 15:29:57'),(2,'PUROLATOR','Ground','Creative Path','1455','16th Avenue','Richmond Hill','ON','CA','L4B4W5',1.5000,1,'ON','L4B 2N4','Richmond Hill',9.4900,1.3000,0.0000,23,'2019-05-24 15:29:57'),(3,'CANPAR','Ground','Creative Path','1455','16th Avenue','Richmond Hill','ON','CA','L4B4W5',1.5000,1,'ON','L4B 2N4','Richmond Hill',8.2000,1.3000,0.0000,23,'2019-05-24 15:29:58'),(4,'CANPAR','Express','Creative Path','1455','16th Avenue','Richmond Hill','ON','CA','L4B4W5',1.5000,1,'ON','L4B 2N4','Richmond Hill',26.5300,1.3000,0.0000,23,'2019-05-24 15:29:58'),(5,'PUROLATOR','Express','Creative Path','1455','16th Avenue','Richmond Hill','ON','CA','L4B4W5',1.5000,1,'ON','L4B 2N4','Richmond Hill',9.6600,1.3000,0.0000,23,'2019-05-24 19:53:47'),(6,'PUROLATOR','Ground','Creative Path','1455','16th Avenue','Richmond Hill','ON','CA','L4B4W5',1.5000,1,'ON','L4B 2N4','Richmond Hill',9.4900,1.3000,0.0000,23,'2019-05-24 19:53:47'),(7,'CANPAR','Ground','Creative Path','1455','16th Avenue','Richmond Hill','ON','CA','L4B4W5',1.5000,1,'ON','L4B 2N4','Richmond Hill',8.2000,1.3000,0.0000,23,'2019-05-24 19:53:48'),(8,'CANPAR','Express','Creative Path','1455','16th Avenue','Richmond Hill','ON','CA','L4B4W5',1.5000,1,'ON','L4B 2N4','Richmond Hill',26.5300,1.3000,0.0000,23,'2019-05-24 19:53:48'),(9,'PUROLATOR','Express','Creative Path','1455','16th Avenue','Richmond Hill','ON','CA','L4B4W5',1.5000,1,'ON','L4B 2N4','Richmond Hill',9.6600,1.3000,0.0000,23,'2019-05-24 19:53:54'),(10,'PUROLATOR','Ground','Creative Path','1455','16th Avenue','Richmond Hill','ON','CA','L4B4W5',1.5000,1,'ON','L4B 2N4','Richmond Hill',9.4900,1.3000,0.0000,23,'2019-05-24 19:53:54'),(11,'CANPAR','Ground','Creative Path','1455','16th Avenue','Richmond Hill','ON','CA','L4B4W5',1.5000,1,'ON','L4B 2N4','Richmond Hill',8.2000,1.3000,0.0000,23,'2019-05-24 19:53:55'),(12,'CANPAR','Express','Creative Path','1455','16th Avenue','Richmond Hill','ON','CA','L4B4W5',1.5000,1,'ON','L4B 2N4','Richmond Hill',26.5300,1.3000,0.0000,23,'2019-05-24 19:53:55'),(13,'PUROLATOR','Express','Creative Path','1455','16th Avenue','Richmond Hill','ON','CA','L4B4W5',1.5000,1,'ON','L4B 2N4','Richmond Hill',9.7500,1.3000,0.0000,24,'2019-06-11 19:57:22'),(14,'PUROLATOR','Ground','Creative Path','1455','16th Avenue','Richmond Hill','ON','CA','L4B4W5',1.5000,1,'ON','L4B 2N4','Richmond Hill',9.5700,1.3000,0.0000,24,'2019-06-11 19:57:22'),(15,'CANPAR','Ground','Creative Path','1455','16th Avenue','Richmond Hill','ON','CA','L4B4W5',1.5000,1,'ON','L4B 2N4','Richmond Hill',8.2000,1.3000,0.0000,24,'2019-06-11 19:57:22'),(16,'CANPAR','Express','Creative Path','1455','16th Avenue','Richmond Hill','ON','CA','L4B4W5',1.5000,1,'ON','L4B 2N4','Richmond Hill',26.5300,1.3000,0.0000,24,'2019-06-11 19:57:22'),(17,'PUROLATOR','Express','Creative Path','1455','16th Avenue','Richmond Hill','ON','CA','L4B4W5',1.0000,1,'ON','L4B 2N4','Richmond Hill',9.7500,1.3000,0.0000,25,'2019-06-13 18:00:39'),(18,'PUROLATOR','Ground','Creative Path','1455','16th Avenue','Richmond Hill','ON','CA','L4B4W5',1.0000,1,'ON','L4B 2N4','Richmond Hill',9.5700,1.3000,0.0000,25,'2019-06-13 18:00:39'),(19,'CANPAR','Ground','Creative Path','1455','16th Avenue','Richmond Hill','ON','CA','L4B4W5',1.0000,1,'ON','L4B 2N4','Richmond Hill',8.2000,1.3000,0.0000,25,'2019-06-13 18:00:39'),(20,'CANPAR','Express','Creative Path','1455','16th Avenue','Richmond Hill','ON','CA','L4B4W5',1.0000,1,'ON','L4B 2N4','Richmond Hill',26.5300,1.3000,0.0000,25,'2019-06-13 18:00:39'),(21,'PUROLATOR','Express','Creative Path','1455','16th Avenue','Richmond Hill','ON','CA','L4B4W5',1.0000,1,'ON','L4B 2N4','Richmond Hill',9.7500,1.3000,0.0000,25,'2019-06-13 18:31:34'),(22,'PUROLATOR','Ground','Creative Path','1455','16th Avenue','Richmond Hill','ON','CA','L4B4W5',1.0000,1,'ON','L4B 2N4','Richmond Hill',9.5700,1.3000,0.0000,25,'2019-06-13 18:31:34'),(23,'CANPAR','Ground','Creative Path','1455','16th Avenue','Richmond Hill','ON','CA','L4B4W5',1.0000,1,'ON','L4B 2N4','Richmond Hill',8.2000,1.3000,0.0000,25,'2019-06-13 18:31:35'),(24,'CANPAR','Express','Creative Path','1455','16th Avenue','Richmond Hill','ON','CA','L4B4W5',1.0000,1,'ON','L4B 2N4','Richmond Hill',26.5300,1.3000,0.0000,25,'2019-06-13 18:31:35');

--
-- Table structure for table `shipmentDetail`
--

CREATE TABLE `shipmentDetail` (
  `SHIPID` int NOT NULL,
  `SHIPLINE` int NOT NULL AUTO_INCREMENT,
  `ORDERID` int NOT NULL,
  `ORDERLINE` int NOT NULL,
  `SHIPQTY` int NOT NULL,
  PRIMARY KEY (`SHIPLINE`)
) ENGINE=InnoDB AUTO_INCREMENT=274 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `shipmentDetail`
--

INSERT INTO `shipmentDetail` VALUES (1,1,31,50,500),(2,2,35,65,250),(3,3,36,67,500),(3,4,36,68,500),(3,5,36,69,500),(3,6,36,70,500),(3,7,36,71,500),(3,8,36,72,500),(3,9,36,73,500),(3,10,36,74,500),(3,11,36,75,500),(4,12,34,61,500),(4,13,34,62,500),(4,14,34,63,500),(4,15,34,64,500),(5,16,32,51,500),(6,17,33,52,500),(6,18,33,54,500),(6,19,33,55,500),(6,20,33,56,500),(6,21,33,57,500),(6,22,33,58,500),(6,23,33,59,500),(6,24,33,60,500),(7,25,37,76,500),(7,26,37,77,250),(7,27,37,78,500),(8,28,38,79,500),(9,29,39,80,250),(10,30,40,81,250),(10,31,40,82,250),(11,32,41,83,250),(11,33,41,84,250),(11,34,41,85,250),(11,35,41,86,250),(11,36,41,87,250),(11,37,41,88,250),(12,38,42,89,250),(14,39,44,91,500),(15,40,43,90,250),(17,41,48,96,250),(17,42,48,97,500),(17,43,48,98,250),(18,44,45,92,500),(18,45,45,93,500),(19,46,47,95,250),(20,47,46,94,500),(21,48,50,100,500),(21,49,50,101,500),(22,50,49,99,500),(23,51,51,102,500),(24,52,52,103,250),(25,53,53,104,500),(26,54,54,105,250),(27,55,55,106,250),(28,56,56,107,500),(29,57,57,108,500),(30,58,58,109,500),(30,59,58,110,500),(30,60,58,111,500),(31,61,59,112,250),(32,62,60,113,250),(33,63,61,114,250),(33,64,61,115,250),(34,65,62,116,500),(34,66,62,117,500),(35,67,63,118,500),(35,68,63,119,500),(35,69,63,120,250),(36,70,64,121,250),(37,71,65,122,250),(37,72,65,123,250),(38,73,66,124,500),(39,74,67,125,250),(39,75,67,126,250),(39,76,67,127,500),(39,77,67,128,500),(40,78,68,129,500),(41,79,69,130,250),(42,80,70,131,250),(43,81,71,132,500),(44,82,72,133,250),(44,83,72,134,250),(45,84,73,135,250),(46,85,74,136,250),(47,86,75,137,500),(48,87,77,139,250),(48,88,77,140,250),(48,89,77,141,250),(48,90,77,142,250),(48,91,77,143,250),(49,92,78,144,250),(49,93,78,145,250),(49,94,78,146,250),(49,95,78,147,250),(49,96,78,148,250),(49,97,78,149,250),(49,98,78,150,250),(50,99,79,151,250),(50,100,79,152,250),(50,101,79,153,250),(50,102,79,154,250),(50,103,79,155,250),(50,104,79,156,250),(50,105,79,157,250),(51,106,80,158,500),(51,107,80,159,500),(51,108,80,160,500),(52,109,81,161,0),(52,110,81,162,0),(52,111,81,163,0),(53,112,82,165,0),(54,113,81,161,250),(54,114,81,162,500),(54,115,81,163,500),(55,116,82,165,500),(56,117,83,166,500),(56,118,83,167,500),(57,119,84,168,250),(58,120,85,169,250),(59,121,86,170,250),(59,122,86,171,250),(60,123,87,172,250),(61,124,88,173,500),(62,125,89,174,500),(63,126,90,175,250),(63,127,90,176,500),(63,128,90,177,500),(63,129,90,178,250),(63,130,90,179,250),(64,131,91,180,500),(64,132,91,181,500),(64,133,91,182,500),(65,134,92,183,250),(65,135,92,184,250),(65,136,92,185,250),(65,137,92,186,250),(65,138,92,187,250),(65,139,92,188,250),(65,140,92,189,250),(65,141,92,190,250),(65,142,92,191,250),(65,143,92,192,250),(65,144,92,193,250),(65,145,92,194,250),(66,146,93,195,500),(66,147,93,196,500),(66,148,93,197,500),(66,149,93,198,500),(66,150,93,199,500),(66,151,93,200,500),(66,152,93,201,500),(67,153,94,202,250),(67,154,94,203,250),(67,155,94,204,250),(68,156,95,205,500),(68,157,95,206,500),(69,158,96,207,250),(69,159,96,208,250),(70,160,97,209,500),(70,161,97,210,500),(70,162,97,211,500),(71,163,98,212,250),(71,164,98,213,500),(71,165,98,214,500),(71,166,98,215,250),(72,167,100,229,250),(72,168,100,230,250),(72,169,100,231,250),(72,170,100,232,500),(72,171,100,233,500),(72,172,100,234,500),(72,173,100,235,500),(72,174,100,236,500),(72,175,100,237,500),(72,176,100,238,500),(72,177,100,239,500),(72,178,100,240,500),(72,179,100,241,500),(73,180,101,242,250),(74,181,102,243,500),(74,182,102,244,500),(75,183,103,246,500),(76,184,105,250,250),(77,185,104,247,250),(77,186,104,248,500),(77,187,104,249,500),(78,188,107,258,500),(78,189,107,259,500),(78,190,107,260,250),(78,191,107,261,250),(78,192,107,262,250),(78,193,107,263,250),(78,194,107,264,250),(79,195,108,265,500),(79,196,108,266,250),(79,197,108,267,250),(79,198,108,268,250),(79,199,108,269,500),(79,200,108,270,250),(79,201,108,271,250),(80,202,110,276,40),(81,203,109,272,500),(81,204,109,273,500),(81,205,109,274,500),(81,206,109,275,500),(82,207,111,277,250),(83,208,112,278,250),(83,209,112,279,500),(84,210,113,280,250),(85,211,114,281,500),(86,212,115,282,500),(87,213,117,284,250),(88,214,118,285,500),(88,215,118,286,250),(88,216,118,287,250),(88,217,118,288,250),(88,218,118,289,250),(89,219,119,290,250),(89,220,119,291,500),(89,221,119,292,500),(90,222,120,293,250),(90,223,120,294,500),(90,224,120,295,500),(90,225,120,296,250),(91,226,121,297,500),(92,227,122,298,250),(93,228,123,299,250),(93,229,123,300,250),(93,230,123,301,500),(93,231,123,302,500),(93,232,123,303,250),(94,233,124,304,250),(95,234,125,305,250),(95,235,125,306,250),(95,236,125,307,250),(95,237,125,308,250),(95,238,125,309,250),(95,239,125,310,250),(95,240,125,311,250),(96,241,126,312,500),(97,242,128,314,500),(98,243,130,316,250),(98,244,130,317,250),(99,245,131,318,250),(99,246,131,319,250),(100,247,133,321,250),(101,248,134,322,500),(102,249,136,324,500),(103,250,132,320,500),(104,251,137,325,250),(105,252,138,326,250),(105,253,138,327,250),(106,254,142,332,250),(107,255,141,331,500),(108,256,143,333,500),(109,257,144,334,500),(110,258,145,335,250),(111,259,139,328,250),(111,260,139,329,250),(112,261,147,337,2000),(113,262,149,339,500),(114,263,150,340,250),(115,264,151,341,500),(116,265,152,342,250),(116,266,152,343,250),(116,267,152,344,250),(116,268,152,345,250),(117,269,153,346,500),(118,270,154,347,500),(119,271,155,349,1000),(120,272,156,350,250),(121,273,157,352,500);

--
-- Table structure for table `shipmentHeader`
--

CREATE TABLE `shipmentHeader` (
  `SHIPID` int NOT NULL AUTO_INCREMENT,
  `ORDERID` int NOT NULL,
  `TRACKNUM` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL,
  `SHIPDATE` datetime NOT NULL,
  `SHIPMETHOD` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL,
  `SHIPAMOUNT` decimal(16,2) NOT NULL,
  `SHIPWEIGHT` decimal(16,4) NOT NULL,
  `SHIPPIECES` int NOT NULL,
  `SHIPINSTRUCTIONS` varchar(1000) COLLATE utf8mb3_unicode_ci NOT NULL,
  PRIMARY KEY (`SHIPID`)
) ENGINE=InnoDB AUTO_INCREMENT=122 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `shipmentHeader`
--

INSERT INTO `shipmentHeader` VALUES (1,31,'CPDI - 08/06/2019','2019-08-07 13:34:59','CP Delivery',0.00,0.0000,1,''),(2,35,'CPDI - 09/13/2019','2019-09-16 14:17:04','CP Delivery',0.00,0.0000,1,''),(3,36,'CPDI - 09/13/2019','2019-09-16 14:17:18','CP Delivery',0.00,0.0000,1,''),(4,34,'CPDI - 09/13/2019','2019-09-16 14:17:37','CP Delivery',0.00,0.0000,1,''),(5,32,'CPDI - 09/13/2019','2019-09-16 14:17:52','CP Delivery',0.00,0.0000,1,''),(6,33,'CPDI - 09/13/2019','2019-09-16 14:18:04','CP Delivery',0.00,0.0000,1,''),(7,37,'CPDI - 09/13/2019','2019-09-16 14:18:21','CP Delivery',0.00,0.0000,1,''),(8,38,'CPDI - 09/16/2019','2019-09-16 20:59:17','CP Delivery',0.00,0.0000,1,''),(9,39,'CPDI - 09/26/2019','2019-09-26 20:32:22','CP Delivery',0.00,0.0000,1,''),(10,40,'CPDI - 10/10/2019','2019-10-11 14:10:03','CP Delivery',0.00,0.0000,1,''),(11,41,'CPDI - 10/10/2019','2019-10-11 14:18:26','CP Delivery',0.00,0.0000,1,''),(12,42,'CPDI - 10/18/2019','2019-10-21 15:05:10','CP Delivery',0.00,0.0000,1,''),(13,0,'CPDI - 10/22/2019','2019-10-23 13:18:37','CP Delivery',0.00,0.0000,1,''),(14,44,'CPDI - 10/22/2019','2019-10-23 13:18:49','CP Delivery',0.00,0.0000,1,''),(15,43,'CPDI - 10/25/2019','2019-10-28 13:40:30','CP Delivery',0.00,0.0000,1,''),(16,0,'CPDI - 10/28/2019','2019-10-29 19:38:45','CP Delivery',0.00,0.0000,1,''),(17,48,'CPDI','2019-10-31 14:49:25','Ground',0.00,0.0000,1,''),(18,45,'CPDI - 10/30/2019','2019-10-31 15:46:46','CP Delivery',0.00,0.0000,1,''),(19,47,'CPDI - 10/30/2019','2019-10-31 15:47:06','CP Delivery',0.00,0.0000,1,''),(20,46,'CPDI','2019-10-31 16:32:12','Ground',0.00,0.0000,1,''),(21,50,'CPDI','2019-11-04 16:26:08','Ground',0.00,0.0000,1,''),(22,49,'CPDI - 11/06/2019','2019-11-07 21:27:43','CP Delivery',0.00,0.0000,0,''),(23,51,'CPDI - 11/15/2019','2019-11-15 17:24:17','CP Delivery',0.00,0.0000,1,''),(24,52,'CPDI - 11/15/2019','2019-11-15 17:24:28','CP Delivery',0.00,0.0000,1,''),(25,53,'CPDI - 11/15/2019','2019-11-15 17:24:37','CP Delivery',0.00,0.0000,1,''),(26,54,'','2020-01-08 23:31:16','Ground',0.00,0.0000,0,''),(27,55,'CPDI - 01/07/2020','2020-01-09 15:20:21','CP Delivery',0.00,0.0000,1,''),(28,56,'CPDI - 01/20/2020','2020-01-20 15:05:14','CP Delivery',0.00,0.0000,1,''),(29,57,'CPDI - 01/23/2020','2020-01-31 20:35:53','CP Delivery',0.00,0.0000,1,''),(30,58,'CPDI - 01/31/2020','2020-01-31 20:36:29','CP Delivery',0.00,0.0000,1,''),(31,59,'CPDI - 02/10/2020','2020-02-10 19:43:48','CP Delivery',0.00,0.0000,1,''),(32,60,'CPDI - 02/10/2020','2020-02-10 19:43:59','CP Delivery',0.00,0.0000,1,''),(33,61,'CPDI - 02/25/2020','2020-02-26 14:30:07','CP Delivery',0.00,0.0000,0,''),(34,62,'CPDI - 02/25/2020','2020-02-26 14:30:19','CP Delivery',0.00,0.0000,0,''),(35,63,'CPDI - 03/05/2020','2020-03-09 20:49:06','CP Delivery',0.00,0.0000,1,''),(36,64,'CPDI - 03/11/2020','2020-03-11 20:27:48','CP Delivery',0.00,0.0000,1,''),(37,65,'CPDI - 03/11/2020','2020-03-11 20:28:02','CP Delivery',0.00,0.0000,1,''),(38,66,'Deliver by CPDI by EOD Mar 23','2020-03-23 14:04:42','CP Delivery',0.00,0.0000,1,''),(39,67,'','2020-07-17 12:27:37','CP Delivery',0.00,0.0000,0,''),(40,68,'CPDI - 07/17/2020','2020-07-17 12:28:00','CP Delivery',0.00,0.0000,1,''),(41,69,'CP','2020-09-28 17:35:22','CP Delivery',0.00,0.0000,1,''),(42,70,'CPDI - 11/04/2020','2020-11-11 15:12:01','CP Delivery',0.00,0.0000,1,''),(43,71,'CPDI - 11/11/2020','2020-11-11 15:12:19','CP Delivery',0.00,0.0000,1,''),(44,72,'Client Pick-Up - Nov 18/2020','2020-11-26 16:20:28','Ground',0.00,0.0000,1,''),(45,73,'CPDI - 12/07/2020','2020-12-14 14:15:57','CP Delivery',0.00,0.0000,0,''),(46,74,'CPDI - 02/22/2021','2021-02-22 15:29:25','CP Delivery',0.00,0.0000,1,''),(47,75,'CPDI - 03/05/2021','2021-03-08 16:51:38','CP Delivery',0.00,0.0000,1,''),(48,77,'CPDI - 05/12/2021','2021-05-12 14:59:33','CP Delivery',0.00,0.0000,1,''),(49,78,'CPDI - 05/12/2021','2021-05-12 14:59:46','CP Delivery',0.00,0.0000,0,''),(50,79,'CPDI - 05/12/2021','2021-05-12 15:00:00','CP Delivery',0.00,0.0000,0,''),(51,80,'CPDI - 06/14/2021','2021-06-14 13:29:27','CP Delivery',0.00,0.0000,1,''),(52,81,'CPDI - 07/21/2021','2021-07-21 13:57:41','CP Delivery',0.00,0.0000,1,''),(53,82,'CPDI - 07/21/2021`','2021-07-21 13:57:54','CP Delivery',0.00,0.0000,1,''),(54,81,'NA','2021-11-19 17:51:19','CP Delivery',0.00,0.0000,1,''),(55,82,'NA','2021-11-19 17:51:38','CP Delivery',0.00,0.0000,1,''),(56,83,'NA','2021-11-19 17:51:55','CP Delivery',0.00,0.0000,1,''),(57,84,'NA','2021-11-19 17:52:09','CP Delivery',0.00,0.0000,1,''),(58,85,'NA','2021-11-19 17:52:23','CP Delivery',0.00,0.0000,1,''),(59,86,'NA','2021-11-19 17:52:38','CP Delivery',0.00,0.0000,1,''),(60,87,'NA','2021-11-19 17:52:57','CP Delivery',0.00,0.0000,1,''),(61,88,'NA','2021-11-19 17:53:06','CP Delivery',0.00,0.0000,1,''),(62,89,'NA','2021-11-19 17:53:17','CP Delivery',0.00,0.0000,1,''),(63,90,'NA','2021-11-19 17:53:27','CP Delivery',0.00,0.0000,1,''),(64,91,'NA','2021-12-23 17:11:26','CP Delivery',0.00,0.0000,1,''),(65,92,'NA','2022-01-10 15:45:33','CP Delivery',0.00,0.0000,1,''),(66,93,'NA','2022-02-07 18:08:52','CP Delivery',0.00,0.0000,1,''),(67,94,'NA','2022-02-07 18:09:12','CP Delivery',0.00,0.0000,1,''),(68,95,'NA','2022-02-07 18:09:32','CP Delivery',0.00,0.0000,1,''),(69,96,'NA','2022-02-07 18:09:53','CP Delivery',0.00,0.0000,1,''),(70,97,'NA','2022-03-11 17:31:30','CP Delivery',0.00,0.0000,1,''),(71,98,'cpdi','2022-05-02 13:45:38','CP Delivery',0.00,0.0000,1,''),(72,100,'NA','2022-08-08 11:01:31','CP Delivery',0.00,0.0000,1,''),(73,101,'NA','2022-10-28 16:09:13','CP Delivery',0.00,0.0000,1,''),(74,102,'NA','2022-10-28 16:09:27','CP Delivery',0.00,0.0000,1,''),(75,103,'NA','2022-10-28 16:09:39','CP Delivery',0.00,0.0000,1,''),(76,105,'NA','2022-11-11 14:00:10','Purolator Express',0.00,0.0000,1,''),(77,104,'NA','2022-12-09 12:10:24','CP Delivery',0.00,0.0000,1,''),(78,107,'NA','2023-02-08 14:31:51','CP Delivery',0.00,0.0000,1,'With 8 offline orders'),(79,108,'NA','2023-04-04 10:57:31','CP Delivery',0.00,0.0000,1,''),(80,110,'NA','2023-04-10 14:18:02','CP Delivery',0.00,0.0000,1,''),(81,109,'NA','2023-04-20 10:39:02','CP Delivery',0.00,0.0000,1,''),(82,111,'Delivery by CP','2023-04-26 13:57:48','CP Delivery',0.00,0.0000,1,''),(83,112,'NA','2023-05-03 10:40:01','CP Delivery',0.00,0.0000,1,''),(84,113,'NA','2023-05-15 17:53:34','CP Delivery',0.00,0.0000,1,'Delivered to 55 East Wilmot'),(85,114,'NA','2023-06-07 11:28:25','CP Delivery',0.00,0.0000,1,''),(86,115,'na','2023-06-07 11:28:47','CP Delivery',0.00,0.0000,0,''),(87,117,'na','2023-07-31 16:48:01','CP Delivery',0.00,0.0000,0,''),(88,118,'na','2023-07-31 16:48:20','CP Delivery',0.00,0.0000,1,''),(89,119,'NA','2023-08-31 13:36:33','CP Delivery',0.00,0.0000,1,''),(90,120,'NA','2023-09-25 12:39:07','CP Delivery',0.00,0.0000,1,''),(91,121,'na','2023-10-11 13:31:35','CP Delivery',0.00,0.0000,1,''),(92,122,'NA','2023-11-20 13:30:45','CP Delivery',0.00,0.0000,1,''),(93,123,'na','2024-02-05 10:33:48','CP Delivery',0.00,0.0000,0,''),(94,124,'na','2024-02-20 13:47:28','CP Delivery',0.00,0.0000,1,''),(95,125,'NA','2024-03-25 17:00:54','CP Delivery',0.00,0.0000,0,''),(96,126,'Delivery by CP','2024-07-05 11:44:25','CP Delivery',0.00,0.0000,1,''),(97,128,'NA','2024-07-30 12:06:41','CP Delivery',0.00,0.0000,1,''),(98,130,'NA','2024-07-30 12:06:53','CP Delivery',0.00,0.0000,2,''),(99,131,'NA','2024-08-08 13:48:29','CP Delivery',0.00,0.0000,2,''),(100,133,'NA','2024-08-26 12:45:52','CP Delivery',0.00,0.0000,1,''),(101,134,'NA','2024-09-23 15:54:09','Ground',0.00,0.0000,0,''),(102,136,'N/A','2024-10-03 14:52:54','CP Delivery',0.00,0.0000,1,''),(103,132,'','2024-10-07 12:51:49','CP Delivery',0.00,0.0000,0,''),(104,137,'NA','2024-10-16 10:59:15','CP Delivery',0.00,0.0000,1,''),(105,138,'NA','2024-10-16 10:59:26','CP Delivery',0.00,0.0000,1,''),(106,142,'N/A','2025-01-13 15:19:19','CP Delivery',0.00,0.0000,1,''),(107,141,'N/A','2025-01-13 15:19:51','CP Delivery',0.00,0.0000,1,'Shipped with Order 10108 - one box.'),(108,143,'Delivery by CP','2025-01-17 16:17:56','CP Delivery',0.00,0.0000,1,''),(109,144,'N/A','2025-02-04 16:27:29','CP Delivery',0.00,0.0000,1,''),(110,145,'N/A','2025-02-07 19:59:32','CP Delivery',0.00,0.0000,1,''),(111,139,'NA','2025-02-07 20:04:45','CP Delivery',0.00,0.0000,0,''),(112,147,'NA','2025-03-01 23:29:41','CP Delivery',0.00,0.0000,1,''),(113,149,'NA','2025-04-07 18:44:40','CP Delivery',0.00,0.0000,1,''),(114,150,'NA','2025-04-30 16:51:35','CP Delivery',0.00,0.0000,0,''),(115,151,'Delivery by CP','2025-06-20 16:53:00','CP Delivery',0.00,0.0000,1,''),(116,152,'Delivery by CP','2025-07-02 15:51:33','CP Delivery',0.00,0.0000,1,''),(117,153,'NA','2025-07-23 17:32:56','CP Delivery',0.00,0.0000,1,''),(118,154,'NA','2025-07-23 17:33:04','CP Delivery',0.00,0.0000,1,''),(119,155,'NA','2025-08-22 18:45:10','Ground',0.00,0.0000,0,''),(120,156,'NA','2025-09-25 14:30:51','CP Delivery',0.00,0.0000,0,''),(121,157,'','2025-10-14 17:34:04','Ground',0.00,0.0000,0,'');

--
-- Table structure for table `shippingGroup`
--

CREATE TABLE `shippingGroup` (
  `SGRPNAME` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL,
  `SGRPPIECES` int NOT NULL,
  `SGRPBOXTYPE` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL,
  `SGRPWEIGHTPIECE` decimal(19,4) NOT NULL,
  PRIMARY KEY (`SGRPNAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `shippingGroup`
--


--
-- Table structure for table `shippingGroupItems`
--

CREATE TABLE `shippingGroupItems` (
  `SGRPNAME` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL,
  `ITEMID` int NOT NULL,
  PRIMARY KEY (`ITEMID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `shippingGroupItems`
--


--
-- Table structure for table `subcategories`
--

CREATE TABLE `subcategories` (
  `SUBCATID` int NOT NULL AUTO_INCREMENT,
  `CATID` int NOT NULL,
  `NAME` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL,
  `DESCRIPTION` varchar(200) COLLATE utf8mb3_unicode_ci NOT NULL,
  `PARENTSUBCATID` int NOT NULL DEFAULT '-1',
  `ICONURL` varchar(200) COLLATE utf8mb3_unicode_ci DEFAULT '',
  `USERLEVEL` int NOT NULL DEFAULT '0',
  PRIMARY KEY (`SUBCATID`)
) ENGINE=InnoDB AUTO_INCREMENT=64 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `subcategories`
--

INSERT INTO `subcategories` VALUES (50,10,'CORP','Amico Corporation',-1,'icon_businesscard.png',0),(51,10,'AA','Accessories',-1,'icon_businesscard.png',0),(52,10,'ACA','Architectural Solutions',-1,'icon_businesscard.png',0),(53,10,'AB','Beds & Stretchers',-1,'icon_businesscard.png',0),(54,10,'ACS','Clinical Solutions',-1,'icon_businesscard.png',0),(56,10,'AIC','Interiors',-1,'icon_businesscard.png',0),(57,10,'ALT','Lighting Solutions',-1,'icon_businesscard.png',0),(58,10,'AMO','Mobility Solutions',-1,'icon_businesscard.png',0),(59,10,'ACP','Pipeline Equipment',-1,'icon_businesscard.png',0),(60,10,'AS','Source Equipment',-1,'icon_businesscard.png',0),(61,10,'APC','Patient Care Corporation',-1,'icon_businesscard.png',0),(62,10,'INTL','Medical Equipment',-1,'icon_businesscard.png',0),(63,10,'ACS & AMO','Clinical & Mobility Solutions',-1,'icon_businesscard.png',0);

--
-- Table structure for table `taxes`
--

CREATE TABLE `taxes` (
  `TAXCODE` varchar(6) COLLATE utf8mb3_unicode_ci NOT NULL,
  `TAXGROUPNAME` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL,
  `TAXNAME1` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '',
  `TAXNAME2` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '',
  `TAXNAME3` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '',
  `TAXNAME4` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '',
  `TAXNAME5` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '',
  `TAXRATE1` decimal(19,5) NOT NULL DEFAULT '0.00000',
  `TAXRATE2` decimal(19,5) NOT NULL DEFAULT '0.00000',
  `TAXRATE3` decimal(19,5) NOT NULL DEFAULT '0.00000',
  `TAXRATE4` decimal(19,5) NOT NULL DEFAULT '0.00000',
  `TAXRATE5` decimal(19,5) NOT NULL DEFAULT '0.00000',
  PRIMARY KEY (`TAXCODE`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `taxes`
--

INSERT INTO `taxes` VALUES ('AB','AB','GST','','','','',0.05000,0.00000,0.00000,0.00000,0.00000),('BC','BC','GST','PST','','','',0.05000,0.07000,0.00000,0.00000,0.00000),('MB','MB','GST','PST','','','',0.05000,0.07000,0.00000,0.00000,0.00000),('NB','NB','HST','','','','',0.15000,0.00000,0.00000,0.00000,0.00000),('NL','NL','HST','','','','',0.15000,0.00000,0.00000,0.00000,0.00000),('NOTAX','NOTAX','','','','','',0.00000,0.00000,0.00000,0.00000,0.00000),('NS','NS','HST','','','','',0.14000,0.00000,0.00000,0.00000,0.00000),('NT','NT','GST','','','','',0.05000,0.00000,0.00000,0.00000,0.00000),('NU','NU','GST','','','','',0.05000,0.00000,0.00000,0.00000,0.00000),('ON','ON','HST','','','','',0.13000,0.00000,0.00000,0.00000,0.00000),('PE','PE','HST','','','','',0.15000,0.00000,0.00000,0.00000,0.00000),('QC','QC','GST','QST','','','',0.05000,0.09975,0.00000,0.00000,0.00000),('SK','SK','GST','PST','','','',0.05000,0.06000,0.00000,0.00000,0.00000),('YT','YT','GST','','','','',0.05000,0.00000,0.00000,0.00000,0.00000);

--
-- Table structure for table `ticketAttachment`
--

CREATE TABLE `ticketAttachment` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `TICKETID` int DEFAULT NULL,
  `MESSAGEID` int DEFAULT NULL,
  `STOREFILENAME` varchar(200) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  `ORIGFILENAME` varchar(200) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `ticketAttachment`
--


--
-- Table structure for table `ticketDetail`
--

CREATE TABLE `ticketDetail` (
  `MESSAGEID` int NOT NULL AUTO_INCREMENT,
  `TICKETID` int NOT NULL,
  `DATEENTERED` datetime NOT NULL,
  `ENTEREDBY` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL,
  `CLIENTMESSAGE` int NOT NULL,
  `MESSAGE` varchar(1000) COLLATE utf8mb3_unicode_ci NOT NULL,
  PRIMARY KEY (`MESSAGEID`,`TICKETID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `ticketDetail`
--


--
-- Table structure for table `ticketHeader`
--

CREATE TABLE `ticketHeader` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `ENTEREDBY` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL,
  `DATEENTERED` datetime NOT NULL,
  `STATUS` int NOT NULL,
  `TITLE` varchar(1000) COLLATE utf8mb3_unicode_ci NOT NULL,
  `DATECLOSED` datetime DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `ticketHeader`
--


--
-- Table structure for table `user`
--

CREATE TABLE `user` (
  `USERNAME` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL,
  `BRANCH` varchar(20) COLLATE utf8mb3_unicode_ci NOT NULL,
  `PASSWORD` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL,
  `PLAINPASSWORD` varchar(50) COLLATE utf8mb3_unicode_ci NOT NULL,
  `FIRSTNAME` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL,
  `LASTNAME` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL,
  `EMAIL` varchar(100) COLLATE utf8mb3_unicode_ci NOT NULL,
  `LANGUAGE` varchar(2) COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT 'EN',
  `USERLEVEL` int NOT NULL DEFAULT '0',
  `CREATEDDATE` datetime DEFAULT NULL,
  `MODIFIEDDATE` datetime DEFAULT NULL,
  `STATUS` int NOT NULL,
  `COMMENTS` varchar(1000) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`USERNAME`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;

--
-- Dumping data for table `user`
--

INSERT INTO `user` VALUES ('amico','amico','*20E4EAD3D1D1B9C6B3CF9336DFF9F41B6C7F53D0','y5723S','Sonia','Yaqub','SYaqub@amico.com','EN',9,NULL,'2025-08-12 16:11:28',1,''),('demo','CPDI','*C142FB215B6E05B7C134B1A653AD4B455157FD79','demo','demo','demo','peggy@creativepath.com','EN',1,NULL,NULL,1,''),('eric','CPDI','*C5EC559C0EA7C49430B0006B94ACD3B9DD1D4F9D','E6359S','Eric','Sin','eric@creativepath.com','EN',81,'2020-03-26 16:08:45','2021-04-15 15:08:22',1,'CPDI'),('jen','CPDI','*1B971235F80D472237329258498BAF8F1D43BE0D','Hl5982','Jen','Lor','jennifer@cpfulfillment.com','EN',81,'2022-04-22 12:41:28','2022-04-22 17:02:06',1,'CPDI'),('miir','CPDI','*3B06CA329998DCF7B3AD9E850D9D3F120B0AC356','miir2280','Miranda','Lee','miranda@creativepath.com','EN',81,'2024-07-24 15:39:05','2024-07-24 15:39:24',1,'CPDI'),('patrick','CPDI','*04AE7ABE88B8C7F153AD654C1410AFFC6072339B','cpdi905711','Patrick','Sinn','patrick@creativepath.com','EN',99,'2017-01-21 20:14:11','2021-04-15 14:05:55',1,'CPDI'),('peggy','CPDI','*A45967DAC55BE870539FA0BA1B8AF799AD65EBB8','momo73449','Peggy','Cheng','peggy@creativepath.com','EN',99,'2017-01-21 20:14:11','2024-05-27 13:44:13',1,'CPDI'),('Sam','CPDI','*48910925EF9C280FA11348D3968E9F9B2E98E539','sam8500','Sam','Stratigeas','sam@samstratigeas.ca','EN',99,'2022-04-18 14:36:25','2022-04-18 14:36:46',1,'CPDI'),('zoeyc','CPDI','*C7C2E49F12068D26F3FB0709B11EBB4516B3BE98','zc5689','Zoey','C','zoeyc@cpfulfillment.com','EN',99,'2023-06-26 12:14:59','2023-06-26 12:15:22',1,'CPDI');

--
-- Dumping routines for database 'cpfulfillment_PrintOS_Amico'
--
/*!50003 DROP PROCEDURE IF EXISTS `AddDownloadLogEntry` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `AddDownloadLogEntry`(__USERNAME VARCHAR(50), __ITEMID INT)
BEGIN
	INSERT INTO 
		downloadLog
        (USERNAME,BRANCHCODE,ITEMID,LOGTIME)
	SELECT
		USERNAME,
        BRANCH,
        __ITEMID,
        CURRENT_TIMESTAMP
	FROM
		user
	WHERE
		USERNAME = __USERNAME;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `AddItemToCart` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `AddItemToCart`(__USERNAME VARCHAR(50), __ITEMID INT, __PROOF VARCHAR(200), __QTY INT, __ITEMOPTION VARCHAR(30), __ADDCOST DECIMAL)
BEGIN



SELECT @ORDERNUM := COUNT(*) FROM orderHeader WHERE USERNAME = __USERNAME AND ORDERSTATUS = 'CART';


SELECT @LOTPRICE := COUNT(*) FROM itemPricing WHERE ITEMID = __ITEMID AND QTY = __QTY AND ITEMOPTION = __ITEMOPTION;
SELECT @VARPRICE := COUNT(*) FROM itemPricing WHERE ITEMID = __ITEMID AND QTY = -1 AND ITEMOPTION = __ITEMOPTION;


IF @ORDERNUM = 0 THEN
 INSERT INTO
 orderHeader
 (USERNAME,ORDERDATE,ORDERMODIFIED,PONUMBER,SHIPCONTACTFIRSTNAME,SHIPCONTACTLASTNAME,SHIPCONTACTPHONE,SHIPCONTACTFAX,SHIPCONTACTEMAIL,
 SHIPNAME,SHIPADDRESS,SHIPADDRESS2,SHIPCITY,SHIPPROVINCE,SHIPCOUNTRY,SHIPPOSTAL,SHIPTAXGROUP,ORDERSTATUS,SHIPSTOREID,
 REQCONTACTFIRSTNAME,REQCONTACTLASTNAME,REQCONTACTPHONE,REQCONTACTFAX,
 REQNAME,REQADDRESS,REQADDRESS2,REQCITY,REQPROVINCE,REQCOUNTRY,REQPOSTAL)
 SELECT
 __USERNAME AS USERNAME ,
 CURRENT_TIMESTAMP AS ORDERDATE,
 CURRENT_TIMESTAMP AS ORDERMODIFIED,
 '' AS PONUMBER,
 USER.FIRSTNAME AS SHIPCONTACTFIRSTNAME,
 USER.LASTNAME AS SHIPCONTACTLASTNAME,
 BADDR.PHONE AS SHIPCONTACTPHONE,
 BADDR.FAX AS SHIPCONTACTFAX,
 USER.EMAIL AS SHIPCONTACTEMAIL,
 BINFO.NAME AS SHIPNAME,
 BADDR.ADDRESS AS SHIPADDRESS,
 BADDR.ADDRESS2 AS SHIPADDRESS2,
 BADDR.CITY AS SHIPCITY,
 BADDR.PROVINCE AS SHIPPROVINCE,
 BADDR.COUNTRY AS SHIPCOUNTRY,
 BADDR.POSTALCODE AS SHIPPOSTAL,
 BINFO.TAXGROUP AS SHIPTAXGROUP,
        'CART' AS ORDERSTATUS,
        BINFO.CODE AS SHIPSTOREID,
		USER.FIRSTNAME AS REQCONTACTFIRSTNAME,
        USER.LASTNAME AS REQCONTACTLASTNAME,
        BADDR.PHONE AS REQCONTACTPHONE,
        BADDR.FAX AS REQCONTACTFAX,
		BINFO.NAME AS REQNAME,
        BADDR.ADDRESS AS REQADDRESS,
        BADDR.ADDRESS2 AS REQADDRESS2,
        BADDR.CITY AS REQCITY,
        BADDR.PROVINCE AS REQPROVINCE,
        BADDR.COUNTRY AS REQCOUNTRY,
        BADDR.POSTALCODE AS REQPOSTAL        
	FROM
		user USER
	INNER JOIN
		branches BINFO ON 
			USER.BRANCH = BINFO.CODE
	INNER JOIN
		branchesAddresses BADDR ON 
			USER.BRANCH = BADDR.CODE 
	WHERE
		USER.USERNAME  = __USERNAME AND
        BADDR.ISMAIN = 1
    ;
END IF;


SELECT @ORDERID := ORDERID FROM orderHeader WHERE USERNAME = __USERNAME AND ORDERSTATUS = 'CART';


IF @LOTPRICE > 0 THEN

	INSERT INTO
		orderDetail
			(ORDERID,ITEMID,ITEMCODE,ITEMDESC,ORDERQTY,SHIPTODATEQTY,UNITPRICE,EXTPRICE,
             TAXAMT1,TAXAMT2,TAXAMT3,TAXAMT4,TAXAMT5,ITEMLENGTH,ITEMWIDTH,ITEMHEIGHT,ITEMWEIGHT,ITEMPIECES,PROOFCONFIRMATION,ITEMOPTION)
	SELECT
		@ORDERID AS ORDERID,
        ITEM.ID AS ITEMID,
        ITEM.CODE AS ITEMCODE,
        ITEM.DESCRIPTION AS ITEMDESC,
        ITEMPRICE.QTY AS ORDERQTY,
        0 AS SHIPTODATEQTY,
        (ITEMPRICE.PRICE / ITEMPRICE.QTY) + (__ADDCOST / ITEMPRICE.QTY) AS UNITPRICE,
        ITEMPRICE.PRICE + __ADDCOST AS EXTPRICE,
		0 AS TAXAMT1,
        0 AS TAXAMT2,
        0 AS TAXAMT3,
        0 AS TAXAMT4,
        0 AS TAXAMT5,
        ITEMPRICE.LENGTH AS ITEMLENGTH,
        ITEMPRICE.WIDTH AS ITEMWIDTH,
        ITEMPRICE.HEIGHT AS ITEMHEIGHT,
        ITEMPRICE.WEIGHT AS ITEMWEIGHT,
        ITEMPRICE.PIECES AS ITEMPIECES,
        __PROOF AS PROOFCONFIRMATION,
        ITEMPRICE.ITEMOPTION AS ITEMOPTION
	FROM
		items ITEM
	INNER JOIN
		itemPricing ITEMPRICE ON 
			ITEM.ID = ITEMPRICE.ITEMID
	WHERE
		ITEM.ID = __ITEMID AND
        ITEMPRICE.QTY = __QTY AND
        ITEMPRICE.ITEMOPTION = __ITEMOPTION;
        
ELSEIF @VARPRICE > 0 AND @LOTPRICE = 0 THEN

INSERT INTO
		orderDetail
			(ORDERID,ITEMID,ITEMCODE,ITEMDESC,ORDERQTY,SHIPTODATEQTY,UNITPRICE,EXTPRICE,
             TAXAMT1,TAXAMT2,TAXAMT3,TAXAMT4,TAXAMT5,ITEMLENGTH,ITEMWIDTH,ITEMHEIGHT,ITEMWEIGHT,ITEMPIECES,PROOFCONFIRMATION,ITEMOPTION)
	SELECT
		@ORDERID AS ORDERID,
        ITEM.ID AS ITEMID,
        ITEM.CODE AS ITEMCODE,
        ITEM.DESCRIPTION AS ITEMDESC,
        __QTY AS ORDERQTY,
        0 AS SHIPTODATEQTY,
        ITEMPRICE.PRICE + __ADDCOST AS UNITPRICE,
        (ITEMPRICE.PRICE + __ADDCOST) * __QTY AS EXTPRICE,
		0 AS TAXAMT1,
        0 AS TAXAMT2,
        0 AS TAXAMT3,
        0 AS TAXAMT4,
        0 AS TAXAMT5,
        ITEMPRICE.LENGTH AS ITEMLENGTH,
        ITEMPRICE.WIDTH AS ITEMWIDTH,
        ITEMPRICE.HEIGHT AS ITEMHEIGHT,
        ITEMPRICE.WEIGHT * __QTY AS ITEMWEIGHT,
        ITEMPRICE.PIECES AS ITEMPIECES,
        __PROOF AS PROOFCONFIRMATION,
        ITEMPRICE.ITEMOPTION AS ITEMOPTION
	FROM
		items ITEM
	INNER JOIN
		itemPricing ITEMPRICE ON 
			ITEM.ID = ITEMPRICE.ITEMID
	WHERE
		ITEM.ID = __ITEMID AND
        ITEMPRICE.QTY = -1 AND 
        ITEMPRICE.ITEMOPTION = __ITEMOPTION;

ELSE 
	SIGNAL SQLSTATE '45000'
		SET MESSAGE_TEXT = 'Invalid Pricing Found For Item';
END IF;  

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `AddReportingExtraData` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `AddReportingExtraData`(__USERNAME VARCHAR(20), __EXTRADATA VARCHAR(100))
BEGIN

SET SQL_SAFE_UPDATES = 0;

UPDATE
	orderHeader
SET
	EXTRADATA1 = __EXTRADATA
WHERE 
	USERNAME  = __USERNAME AND 
    ORDERSTATUS = 'CART';

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `AddShipmentCostEntry` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `AddShipmentCostEntry`(__CARRIER VARCHAR(100), __METHOD VARCHAR(100),
__SHIPFROM_NAME VARCHAR(100), __SHIPFROM_STREETNUM VARCHAR(100), __SHIPFROM_STREET VARCHAR(100),
__SHIPFROM_CITY VARCHAR(100), __SHIPFROM_PROVINCE VARCHAR(100), __SHIPFROM_COUNTRY VARCHAR(100),
__SHIPFROM_POSTAL VARCHAR(100), __TOTALWEIGHT DECIMAL(19,4), __TOTALBOXES DECIMAL(19,4),
__SHIPTO_PROVINCE VARCHAR(100), __SHIPTO_POSTAL VARCHAR(100), __SHIPTO_CITY VARCHAR(100),
__TOTALPRICE DECIMAL(19,4), __OURMARUP DECIMAL(19,4), __OURSLEEVECHARGE DECIMAL(19,4),
__ORDERID INT)
BEGIN
INSERT INTO `shipmentCostLog`
(
`CARRIER`,
`METHOD`,
`SHIPFROM_NAME`,
`SHIPFROM_STREETNUM`,
`SHIPFROM_STREET`,
`SHIPFROM_CITY`,
`SHIPFROM_PROVINCE`,
`SHIPFROM_COUNTRY`,
`SHIPFROM_POSTAL`,
`TOTALWEIGHT`,
`TOTALBOXES`,
`SHIPTO_PROVINCE`,
`SHIPTO_POSTAL`,
`SHIPTO_CITY`,
`TOTALPRICE`,
`OURMARKUP`,
`OURSLEEVECHARGE`,
`ORDERID`,
`CREATEDATETIME`)
VALUES
(
__CARRIER,
__METHOD,
__SHIPFROM_NAME,
__SHIPFROM_STREETNUM,
__SHIPFROM_STREET,
__SHIPFROM_CITY,
__SHIPFROM_PROVINCE,
__SHIPFROM_COUNTRY,
__SHIPFROM_POSTAL,
__TOTALWEIGHT,
__TOTALBOXES,
__SHIPTO_PROVINCE,
__SHIPTO_POSTAL,
__SHIPTO_CITY,
__TOTALPRICE,
__OURMARUP,
__OURSLEEVECHARGE,
__ORDERID,
CURRENT_TIMESTAMP);
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `AdjustItemQty` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `AdjustItemQty`(__ITEMID INT, __QTY INT, __REASON VARCHAR(200))
BEGIN
	UPDATE 
		itemsInventory
	SET
		QTYONHAND = QTYONHAND + __QTY
	WHERE
		ITEMID = __ITEMID;
            
	INSERT INTO 
		itemsAdjustmentLog
       (ITEMID,QTY,ADJDATE,REASON)
	VALUES 
		(__ITEMID,__QTY,CURRENT_TIMESTAMP,__REASON);
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `ApplyPromoCode` */;
DELIMITER ;;
CREATE DEFINER=`admin`@`localhost` PROCEDURE `ApplyPromoCode`(__USERNAME VARCHAR(50), __PROMO VARCHAR(50))
BEGIN
 SET @RESULT = '';
 
 SET @ORDERID = (SELECT ORDERID FROM orderHeader WHERE ORDERSTATUS = 'CART' AND USERNAME = __USERNAME);
 SET @PROMOTYPE= (SELECT CODETYPE FROM promos WHERE CODE = __PROMO);
 SET @CHKCOUNT= (SELECT COUNT(*) FROM promos WHERE CODE = __PROMO);
 SET @CHKREDEEMED= (SELECT COUNT(*) FROM promos WHERE CODE = __PROMO AND REDEEMED = 0);
 SET @CHKDATES= (SELECT COUNT(*) FROM promos WHERE CODE = __PROMO AND STARTDATE <= CURRENT_TIMESTAMP AND ENDDATE >= CURRENT_TIMESTAMP);
 SET @CHKPROMOCOUNT= (SELECT COUNT(*) FROM orderPromos WHERE ORDERID = @ORDERID);
 SET @CHKITEMCOUNT= (SELECT COUNT(*) 
 FROM orderDetail D 
 INNER JOIN items I ON D.ITEMID = I.ID 
 INNER JOIN promosItems PI ON (PI.ITEMID = I.ID OR PI.ITEMID = I.PARENTITEM) 
 INNER JOIN promos PIHDR ON PI.CODE = PIHDR.CODE
 WHERE 
 ORDERID = @ORDERID AND 
 PI.CODE = __PROMO AND
 ((PIHDR.QTYTYPE = '' AND (PIHDR.MAXQTY = 0 OR ORDERQTY <= PIHDR.MAXQTY)) OR PIHDR.QTYTYPE = 'NOLIMIT' OR (PIHDR.QTYTYPE = 'EXACT' AND ORDERQTY = PIHDR.EXACTQTY) OR (PIHDR.QTYTYPE = 'RANGE' AND PIHDR.MINQTY <= ORDERQTY AND ORDERQTY <= PIHDR.MAXQTY))
 ); 
SET @CHKALLCATCOUNT= (SELECT
COUNT(*)
FROM orderDetail D 
INNER JOIN items I ON D.ITEMID = I.ID 
INNER JOIN itemsSubcategoryLink ISL ON I.ID = ISL.ITEMID
INNER JOIN subcategories SUBCATS ON ISL.SUBCATID = SUBCATS.SUBCATID
CROSS JOIN (SELECT * FROM promos WHERE CODE = __PROMO) PROMO 
WHERE
D.ORDERID = @ORDERID AND 
SUBCATS.CATID NOT IN (SELECT CATID FROM promos PIHDR INNER JOIN promosCategories PC ON PC.CODE = PIHDR.CODE WHERE PC.CODE = __PROMO) AND
((PROMO.QTYTYPE = '' AND (PROMO.MAXQTY = 0 OR ORDERQTY <= PROMO.MAXQTY)) OR PROMO.QTYTYPE = 'NOLIMIT' OR (PROMO.QTYTYPE = 'EXACT' AND ORDERQTY = PROMO.EXACTQTY) OR (PROMO.QTYTYPE = 'RANGE' AND PROMO.MINQTY <= ORDERQTY AND ORDERQTY <= PROMO.MAXQTY))
);
SET @CHKNOTITEMCOUNT= (SELECT COUNT(*)
 FROM orderDetail D 
 INNER JOIN items I ON D.ITEMID = I.ID 
 INNER JOIN promos PIHDR ON PIHDR.CODE = __PROMO
 LEFT OUTER JOIN promosItems PI ON (PI.ITEMID = I.ID OR PI.ITEMID = I.PARENTITEM) 
 WHERE 
 ORDERID = @ORDERID AND 
 PI.ITEMID IS NULL AND 
 ((PIHDR.QTYTYPE = '' AND (PIHDR.MAXQTY = 0 OR ORDERQTY <= PIHDR.MAXQTY)) OR PIHDR.QTYTYPE = 'NOLIMIT' OR (PIHDR.QTYTYPE = 'EXACT' AND ORDERQTY = PIHDR.EXACTQTY) OR (PIHDR.QTYTYPE = 'RANGE' AND PIHDR.MINQTY <= ORDERQTY AND ORDERQTY <= PIHDR.MAXQTY))
 ); 

  IF @CHKCOUNT=0 THEN
    SET @RESULT = 'NOEXIST';
  ELSEIF @CHKDATES = 0 THEN 
    SET @RESULT = 'NOTACTIVEDATE';
  ELSEIF @CHKREDEEMED = 0 THEN 
    SET @RESULT = 'ALREADYREDEEMED';        
  ELSEIF @CHKPROMOCOUNT > 0 THEN 
    SET @RESULT = 'ALREADYPROMO';   
  ELSEIF @CHKITEMCOUNT = 0 AND (@PROMOTYPE = 'ITM$DISC' OR @PROMOTYPE = 'ITM%DISC') THEN
    SET @RESULT = 'NOVALIDITEMS';
  ELSEIF @CHKALLCATCOUNT = 0 AND (@PROMOTYPE = 'ALLCAT$DISC' OR @PROMOTYPE = 'ALLCAT%DISC') THEN
    SET @RESULT = 'NOVALIDITEMS'; 
  ELSEIF @CHKNOTITEMCOUNT = 0 AND (@PROMOTYPE = 'ALLITM$DISC' OR @PROMOTYPE = 'ALLITM%DISC') THEN
    SET @RESULT = 'NOVALIDITEMS';
  ELSE
    SET @RESULT = 'OK';
        INSERT INTO orderPromos
        (ORDERID,PROMOCODE,PROMONAME,SINGLEITEM,PROMOTYPE,PROMOVALUE,CALCDISCOUNT,
         TAXAMT1,TAXAMT2,TAXAMT3,TAXAMT4,TAXAMT5)
    SELECT
      @ORDERID,CODE,NAME,SINGLEITEM,CODETYPE,PROMOVALUE,0.00,0.00,0.00,0.00,0.00,0.00
    FROM
      promos
    WHERE 
      CODE = __PROMO;
        
        UPDATE promos SET REDEEMED = 1 WHERE CODE = __PROMO AND SINGLEUSE = 1;
        
  END IF;

  SELECT @RESULT AS RESULT;

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `ApproveItem` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ApproveItem`(__CODE VARCHAR(200))
BEGIN

	SELECT
		ITEM.ID AS ITEMID,
        USERS.EMAIL AS USEREMAIL,
        ITEM.DISPLAYIMAGEPATH
	FROM
		items ITEM 
	INNER JOIN
		user USERS ON 
			USERS.USERNAME = ITEM.GENERATEDBY
	WHERE 
		APPROVALLINK = __CODE;

	UPDATE
		items
	SET
		ASSETAPPROVED = 1,
        APPROVALLINK = NULL
	WHERE
		APPROVALLINK = __CODE;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `ApproveOrder` */;
DELIMITER ;;
CREATE DEFINER=`admin`@`localhost` PROCEDURE `ApproveOrder`(__APPROVALLINK NVARCHAR(100))
BEGIN

SET @ORDERREF = IFNULL((SELECT MAX(ORDERREF)+1 FROM orderHeader),10000);
UPDATE orderDetail
    SET 
        SHIPTODATEQTY = ORDERQTY,
        DOWNLOADLINK = CONCAT(ORDERID,'-',ITEMLINE,'-',MD5(MD5(MD5(NOW())+ORDERID)+ITEMLINE))
  WHERE
    ORDERQTY = -2 AND
        ORDERID IN (SELECT ORDERID FROM orderHeader WHERE APPROVALLINK  COLLATE utf8_unicode_ci = __APPROVALLINK AND APPROVALLINK IS NOT NULL);    

UPDATE
  orderHeader
SET
  ORDERREF = @ORDERREF
WHERE
  APPROVALLINK  COLLATE utf8_unicode_ci = __APPROVALLINK AND
    APPROVALLINK IS NOT NULL;


SELECT
  HDR.*,
    DTL.*,
    ITEM.TYPE,
    USER.FIRSTNAME AS USER_FIRSTNAME,
    USER.LASTNAME AS USER_LASTNAME,
    USER.EMAIL AS USER_EMAIL,
    USER.LANGUAGE AS USER_LANGUAGE,
    BRANCH.NAME AS BRANCH_NAME,
    BRANCH.MANAGEMENTEMAIL AS BRANCH_MANAGEMENTEMAIL,
    COALESCE(BRANCHADDRESS.LANGUAGE,'EN') AS BRANCH_LANGUAGE,
    'ACTIVE' AS REALSTATUS,
    COALESCE(ITEM.DLSUGGESTIONS,'') AS DLSUGGESTIONS
FROM
  orderHeader HDR
INNER JOIN
  orderDetail DTL ON 
    HDR.ORDERID = DTL.ORDERID
INNER JOIN
  items ITEM ON 
    DTL.ITEMID = ITEM.ID        
INNER JOIN
  user USER ON 
    HDR.USERNAME = USER.USERNAME
INNER JOIN
  branches BRANCH ON 
    USER.BRANCH = BRANCH.CODE
LEFT OUTER JOIN
  (SELECT * FROM branchesAddresses WHERE ISMAIN = 1) BRANCHADDRESS ON 
    BRANCH.CODE = BRANCHADDRESS.CODE
WHERE
  HDR.APPROVALLINK  COLLATE utf8_unicode_ci = __APPROVALLINK AND
    HDR.APPROVALLINK IS NOT NULL;
      
SELECT @SHIPLINECOUNT := COUNT(*) FROM orderDetail 
    WHERE ORDERQTY <> -2 AND
        ORDERID IN (SELECT ORDERID FROM orderHeader WHERE APPROVALLINK  COLLATE utf8_unicode_ci = __APPROVALLINK AND APPROVALLINK IS NOT NULL);
      
      
UPDATE
  orderHeader
SET
  APPROVALLINK = NULL,
    ORDERSTATUS = CASE WHEN @SHIPLINECOUNT = 0 THEN 'SHIPPED' ELSE 'ACTIVE' END,
    ORDERMODIFIED = CURRENT_TIMESTAMP,
    APPROVALDATE = CURRENT_TIMESTAMP
WHERE
  APPROVALLINK  COLLATE utf8_unicode_ci = __APPROVALLINK AND
    APPROVALLINK IS NOT NULL; 

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `ArchiveItem` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ArchiveItem`(__ITEMID INT, __USERNAME VARCHAR(50))
BEGIN

	UPDATE
		items
	SET
		ARCHIVED = 1
	WHERE
		ID = __ITEMID AND
        ID IN (SELECT ITEMID FROM itemsBranchesLink LINK INNER JOIN user USR ON LINK.BRANCHCODE = USR.BRANCH WHERE USR.USERNAME = __USERNAME);

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CancelRemaindingOrder` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `CancelRemaindingOrder`(__ORDERID INT)
BEGIN

UPDATE
	orderHeader
SET
	ORDERSTATUS = 'CANCELLED',
    SPECIALINSTRUCTIONS = 'Order Cancelled on ' + CURRENT_TIMESTAMP
    
WHERE
	ORDERID = __ORDERID;

UPDATE
	orderDetail
SET
	ORDERQTY = SHIPTODATEQTY
WHERE
	ORDERID = __ORDERID;
    
SELECT * FROM orderHeader WHERE ORDERID = __ORDERID;

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `ChangeAccountTicketStatus` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ChangeAccountTicketStatus`(__TICKETID INT, __STATUS INT)
BEGIN

	UPDATE
		accountMgrHeader
	SET
		STATUS = __STATUS,
        DATECLOSED = CURRENT_TIMESTAMP
	WHERE
		ID = __TICKETID;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `ChangeOrderShipToAddress` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ChangeOrderShipToAddress`(__USERNAME VARCHAR(50), __ID VARCHAR(50))
BEGIN


SET SQL_SAFE_UPDATES = 0;

UPDATE
	orderHeader
SET
	SHIPNAME = ( SELECT NAME FROM ( SELECT 'S' AS RC, ID,NAME FROM shipToAddresses UNION ALL SELECT 'B' AS RC,B.CODE,NAME FROM branches B INNER JOIN branchesAddresses BB ON B.CODE = BB.CODE WHERE ISMAIN = 1) ADDR WHERE CONCAT(ADDR.RC,'-',ADDR.ID) = __ID ),
    SHIPADDRESS = ( SELECT ADDRESS FROM ( SELECT 'S' AS RC, ID,ADDRESS FROM shipToAddresses UNION ALL SELECT 'B' AS RC,CODE,ADDRESS FROM branchesAddresses WHERE ISMAIN = 1) ADDR WHERE CONCAT(ADDR.RC,'-',ADDR.ID) = __ID ),
    SHIPADDRESS2 = ( SELECT ADDRESS2 FROM ( SELECT 'S' AS RC, ID,ADDRESS2 FROM shipToAddresses UNION ALL SELECT 'B' AS RC,CODE,ADDRESS2 FROM branchesAddresses WHERE ISMAIN = 1) ADDR WHERE CONCAT(ADDR.RC,'-',ADDR.ID) = __ID ),
    SHIPCITY = ( SELECT CITY FROM ( SELECT 'S' AS RC, ID,CITY FROM shipToAddresses UNION ALL SELECT 'B' AS RC,CODE,CITY FROM branchesAddresses WHERE ISMAIN = 1) ADDR WHERE CONCAT(ADDR.RC,'-',ADDR.ID) = __ID ),
	SHIPPROVINCE = ( SELECT PROVINCE FROM ( SELECT 'S' AS RC, ID,PROVINCE FROM shipToAddresses UNION ALL SELECT 'B' AS RC,CODE,PROVINCE FROM branchesAddresses WHERE ISMAIN = 1) ADDR WHERE CONCAT(ADDR.RC,'-',ADDR.ID) = __ID ),
    SHIPCOUNTRY = ( SELECT COUNTRY FROM ( SELECT 'S' AS RC, ID,COUNTRY FROM shipToAddresses UNION ALL SELECT 'B' AS RC,CODE,COUNTRY FROM branchesAddresses WHERE ISMAIN = 1) ADDR WHERE CONCAT(ADDR.RC,'-',ADDR.ID) = __ID ),
    SHIPPOSTAL = ( SELECT POSTAL FROM ( SELECT 'S' AS RC, ID,POSTAL FROM shipToAddresses UNION ALL SELECT 'B' AS RC,CODE,POSTALCODE FROM branchesAddresses WHERE ISMAIN = 1) ADDR WHERE CONCAT(ADDR.RC,'-',ADDR.ID) = __ID ),
	SHIPCONTACTPHONE = ( SELECT PHONE FROM ( SELECT 'S' AS RC, ID,PHONE FROM shipToAddresses UNION ALL SELECT 'B' AS RC,CODE,PHONE FROM branchesAddresses WHERE ISMAIN = 1) ADDR WHERE CONCAT(ADDR.RC,'-',ADDR.ID) = __ID ),
    SHIPCONTACTFAX = ( SELECT FAX FROM ( SELECT 'S' AS RC, ID,FAX FROM shipToAddresses UNION ALL SELECT 'B' AS RC,CODE,FAX FROM branchesAddresses WHERE ISMAIN = 1) ADDR WHERE CONCAT(ADDR.RC,'-',ADDR.ID) = __ID ),
    SHIPTAXGROUP = ( SELECT TAXGROUP FROM ( SELECT 'S' AS RC, ID,TAXGROUP FROM shipToAddresses UNION ALL SELECT 'B' AS RC,B.CODE,TAXGROUP FROM branches B INNER JOIN branchesAddresses BB ON B.CODE = BB.CODE WHERE ISMAIN = 1) ADDR WHERE CONCAT(ADDR.RC,'-',ADDR.ID) = __ID ),
    SHIPSTOREID = ( SELECT STOREID FROM ( SELECT 'S' AS RC, ID,STOREID FROM shipToAddresses UNION ALL SELECT 'B' AS RC,B.CODE,B.CODE AS STOREID FROM branches B INNER JOIN branchesAddresses BB ON B.CODE = BB.CODE WHERE ISMAIN = 1) ADDR WHERE CONCAT(ADDR.RC,'-',ADDR.ID) = __ID )
WHERE 
	USERNAME  = __USERNAME AND 
    ORDERSTATUS = 'CART';


END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `ChangeTicketStatus` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ChangeTicketStatus`(__TICKETID INT, __STATUS INT)
BEGIN

	UPDATE
		ticketHeader
	SET
		STATUS = __STATUS,
        DATECLOSED = CURRENT_TIMESTAMP
	WHERE
		ID = __TICKETID;

	
    SELECT 
		HDR.*,
        USR.EMAIL,
        USR.LANGUAGE
	FROM 
		ticketHeader HDR 
	LEFT OUTER JOIN
		user USR ON 
			HDR.ENTEREDBY = USR.USERNAME
	WHERE 
    ID = __TICKETID; 

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CheckCartItemDuplicates` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `CheckCartItemDuplicates`(__USERNAME VARCHAR(50), __ITEMID INT)
BEGIN

SET @RECCNT := (SELECT 
					COUNT(*) 
				FROM 
					orderHeader HDR 
				INNER JOIN 
					orderDetail DTL ON 
						HDR.ORDERID = DTL.ORDERID 
				WHERE 
					HDR.USERNAME = __USERNAME AND
                    HDR.ORDERSTATUS = 'CART' AND
                    DTL.ITEMID = __ITEMID
				);

IF @RECCNT > 0 THEN
	SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'Cannot add the same item to the cart.';
END IF;

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CheckCartItemLowInventory` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `CheckCartItemLowInventory`(__USERNAME VARCHAR(50), __ITEMID INT, __QTY INT)
BEGIN

	SELECT
		ITM.ID,
        IFNULL(ITMINV.QTYONHAND,0) AS INVQTY,
        IFNULL(ONORDER.ONORDER,0) AS ALLOCATEDQTY,
        CASE 
			WHEN 
				ITM.TYPE <> 0 THEN 1
			ELSE
				CASE WHEN __QTY <= IFNULL(ITMINV.QTYONHAND,0) - IFNULL(ONORDER.ONORDER,0) THEN 1 ELSE 0 END
		END AS ENOUGHQTY
	FROM
		items ITM
	LEFT OUTER JOIN
		itemsInventory ITMINV ON 
			ITM.ID = ITMINV.ITEMID
	LEFT OUTER JOIN
		( SELECT ITEMID,SUM(ORDERQTY-SHIPTODATEQTY) AS ONORDER FROM orderDetail
		  WHERE ORDERID IN (SELECT ORDERID FROM orderHeader WHERE ORDERSTATUS IN ('ACTIVE'))
          GROUP BY ITEMID) ONORDER ON
			ITM.ID = ONORDER.ITEMID
	WHERE
		ITM.ID = __ITEMID;


END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CheckForLowLevelItems` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `CheckForLowLevelItems`(__ORDERID INT)
BEGIN
	SELECT
		THISORDER.ORDERID,
        THISORDER.ORDERREF,
		ITEM.ID,
		ITEM.CODE,
        ITEM.DESCRIPTION,
        THISORDER.REMQTY AS ORDERQTY,
        COALESCE(OTHORDER.REMQTY,0) AS OTHQTY,
        ITEM.TYPE,
        COALESCE(ITEM.MINLEVEL,0) AS MINLEVEL,
        COALESCE(INV.QTYONHAND,0) AS QTYONHAND
	FROM
		( SELECT H.ORDERID, H.ORDERREF, ITEMID,SUM(ORDERQTY-SHIPTODATEQTY) AS REMQTY FROM orderHeader H INNER JOIN orderDetail D ON H.ORDERID = D.ORDERID WHERE  H.ORDERID = __ORDERID GROUP BY H.ORDERID, H.ORDERREF, D.ITEMID) THISORDER  
	INNER JOIN
		items ITEM ON 
			THISORDER.ITEMID = ITEM.ID
	LEFT OUTER JOIN
		itemsInventory INV ON 
			THISORDER.ITEMID = INV.ITEMID
	LEFT OUTER JOIN
		( SELECT ITEMID,SUM(ORDERQTY-SHIPTODATEQTY) AS REMQTY FROM orderHeader H INNER JOIN orderDetail D ON H.ORDERID = D.ORDERID WHERE ORDERSTATUS = 'ACTIVE' AND H.ORDERID <> __ORDERID GROUP BY D.ITEMID) OTHORDER ON 
			OTHORDER.ITEMID = THISORDER.ITEMID
	WHERE
		COALESCE(INV.QTYONHAND,0) - COALESCE(ITEM.MINLEVEL,0) - COALESCE(OTHORDER.REMQTY,0) - THISORDER.REMQTY <= 0
	ORDER BY
		ITEM.TYPE,
		ITEM.CODE;

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CheckIfItemAppliesPromo` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `CheckIfItemAppliesPromo`(__ORDERID INT, __PROMO VARCHAR(50), __ITEMID INT)
BEGIN

SELECT 
 PI.* 
FROM 
 orderDetail D 
INNER JOIN 
 items I ON D.ITEMID = I.ID 
INNER JOIN 
 promosItems PI ON (PI.ITEMID = I.ID OR PI.ITEMID = I.PARENTITEM)
INNER JOIN 
	promos PIHDR ON PI.CODE = PIHDR.CODE AND (PIHDR.MAXQTY = 0 OR D.ORDERQTY <= PIHDR.MAXQTY)
WHERE 
	ORDERID = __ORDERID AND PI.CODE = __PROMO AND D.ITEMID = __ITEMID;

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CheckIfItemAppliesPromoCat` */;
DELIMITER ;;
CREATE DEFINER=`admin`@`localhost` PROCEDURE `CheckIfItemAppliesPromoCat`(__ORDERID INT, __PROMO VARCHAR(50), __ITEMID INT)
BEGIN

SELECT
 D.*
FROM orderDetail D 
INNER JOIN items I ON D.ITEMID = I.ID 
INNER JOIN itemsSubcategoryLink ISL ON I.ID = ISL.ITEMID
INNER JOIN subcategories SUBCATS ON ISL.SUBCATID = SUBCATS.SUBCATID
CROSS JOIN (SELECT * FROM promos WHERE CODE = __PROMO) PROMO 
WHERE
D.ORDERID = __ORDERID AND 
D.ITEMID = __ITEMID AND
SUBCATS.CATID NOT IN (SELECT CATID FROM promos PIHDR INNER JOIN promosCategories PC ON PC.CODE = PIHDR.CODE WHERE PC.CODE = __PROMO) AND
(PROMO.MAXQTY = 0 OR ORDERQTY <= PROMO.MAXQTY);


END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CheckIfItemAppliesPromoExceptionList` */;
DELIMITER ;;
CREATE DEFINER=`admin`@`localhost` PROCEDURE `CheckIfItemAppliesPromoExceptionList`(__ORDERID INT, __PROMO VARCHAR(50), __ITEMID INT)
BEGIN

SELECT 
 PIHDR.* 
FROM 
 orderDetail D 
INNER JOIN 
 items I ON D.ITEMID = I.ID 
INNER JOIN 
  promos PIHDR ON PIHDR.CODE = __PROMO AND (PIHDR.MAXQTY = 0 OR D.ORDERQTY <= PIHDR.MAXQTY)
LEFT OUTER JOIN 
  promosItems PI ON (PI.ITEMID = I.ID OR PI.ITEMID = I.PARENTITEM)
WHERE 
  ORDERID = __ORDERID AND D.ITEMID = __ITEMID AND PI.ITEMID IS NULL;

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CheckUserAccount` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `CheckUserAccount`(UNAME VARCHAR(50), PASS VARCHAR(50))
BEGIN
	SELECT 
		USERS.*,
        COALESCE(SKINDEF.STYLEFILENAME,'DEFAULT') AS SKIN,
        COALESCE(BRANCH.SKIN,'DEFAULT') AS BANNER
	FROM 
		user USERS
	LEFT OUTER JOIN
		branches BRANCH ON 
			USERS.BRANCH = BRANCH.CODE
	LEFT OUTER JOIN
		branchSkinDefinition SKINDEF ON 
			BRANCH.SKIN = SKINDEF.SKINNAME
	WHERE USERNAME=UNAME AND PASSWORD=CONCAT('*', UPPER(SHA1(UNHEX(SHA1(PASS))))) AND USERS.STATUS=1;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CheckUserAccount_ByIdBranch` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `CheckUserAccount_ByIdBranch`(__USERNAME VARCHAR(50), __BRANCHNAME VARCHAR(100))
BEGIN

	SELECT 
		USERS.*,
        COALESCE(SKINDEF.STYLEFILENAME,'DEFAULT') AS SKIN,
        COALESCE(BRANCH.SKIN,'DEFAULT') AS BANNER
	FROM 
		user USERS
	LEFT OUTER JOIN
		branches BRANCH ON 
			USERS.BRANCH = BRANCH.CODE
	LEFT OUTER JOIN
		branchSkinDefinition SKINDEF ON 
			BRANCH.SKIN = SKINDEF.SKINNAME
	WHERE 
        USERNAME=__USERNAME AND 
        USERS.STATUS=1 AND 
        USERS.USERLEVEL < 90;
    
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `ClearAllAdBrandLink` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ClearAllAdBrandLink`(__ID INT)
BEGIN
	DELETE FROM AdItemsBrand WHERE ID = __ID;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `ClearAllCategoryBrandLink` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ClearAllCategoryBrandLink`(__CATID INT)
BEGIN
	DELETE FROM categoriesBrand WHERE CATID = __CATID;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CreateAccountTicket` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `CreateAccountTicket`(__ENTEREDBY VARCHAR(50), __LANGUAGE VARCHAR(20), __ACCOUNT VARCHAR(20), __BANNER VARCHAR(20),
__BRANCHNUMBER VARCHAR(20), __BRANCHNAME VARCHAR(100), __ADDRESS VARCHAR(1000), __CITY VARCHAR(100), __PROVINCE VARCHAR(100),
__POSTAL VARCHAR(100), __COUNTRY VARCHAR(100), __PHONE VARCHAR(100), __FAX VARCHAR(100), __APPOINTMENTPHONE VARCHAR(100),
__CONTACTFIRST VARCHAR(100), __CONTACTLAST VARCHAR(100), __EMAIL VARCHAR(100), __NOTE VARCHAR(1000),
__BOUTIQUEFIRST VARCHAR(100), __BOUTIQUELAST VARCHAR(100), __TAGLINENAME VARCHAR(100), __AFFILIATEDNAME VARCHAR(100),
__PHARMLEGALNAME VARCHAR(100), __PHARMPHOTONAME VARCHAR(100))
BEGIN

DECLARE __TICKETID INT;

INSERT INTO accountMgrHeader
(ENTEREDBY,DATEENTERED,STATUS,TITLE,DATECLOSED,LANGUAGE,ACCOUNT,BANNER,BRANCHNUMBER,ADDRESS,CITY,PROVINCE,COUNTRY,POSTAL,
PHONE,FAX,APPOINTMENTPHONE,CONTACTFIRST,CONTACTLAST,EMAIL,NOTE,BOUTIQUEFIRST,BOUTIQUELAST,TAGLINENAME,AFFILIATEDNAME,PHARMLEGALNAME,PHARMPHOTONAME)
VALUES
(__ENTEREDBY,CURRENT_TIMESTAMP,1,__BRANCHNAME,NULL,__LANGUAGE,__ACCOUNT,__BANNER,__BRANCHNUMBER,
__ADDRESS,__CITY,__PROVINCE,__COUNTRY,__POSTAL,__PHONE,__FAX,__APPOINTMENTPHONE,__CONTACTFIRST,__CONTACTLAST,__EMAIL,__NOTE,
__BOUTIQUEFIRST,__BOUTIQUELAST,__TAGLINENAME,__AFFILIATEDNAME, __PHARMLEGALNAME, __PHARMPHOTONAME);

SET __TICKETID = LAST_INSERT_ID();

SELECT *,UNIX_TIMESTAMP(DATEENTERED) AS UNIX_DATEENTERED FROM accountMgrHeader WHERE ID = __TICKETID;

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CreateAccountTicketReply` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `CreateAccountTicketReply`(__TICKETID INT, __MESSAGE VARCHAR(1000), __ENTEREDBY VARCHAR(50))
BEGIN

 DECLARE __TICCHECK INT;
 SELECT COUNT(*) INTO __TICCHECK FROM accountMgrHeader WHERE ( ENTEREDBY = __ENTEREDBY OR __ENTEREDBY IN (SELECT USERNAME FROM user WHERE USERLEVEL >= 99)) AND ID = __TICKETID;
 
 IF __TICCHECK > 0 THEN

 INSERT INTO
 accountMgrMessages
 (TICKETID,DATEENTERED,ENTEREDBY,CLIENTMESSAGE,MESSAGE)
 VALUES
 (
 __TICKETID,
 CURRENT_TIMESTAMP,
 __ENTEREDBY,
 CASE WHEN __ENTEREDBY IN (SELECT USERNAME FROM user WHERE USERLEVEL >= 99) THEN 0 ELSE 1 END,
 __MESSAGE
 );
 
 SELECT 
 HDR.*,
 DTL.MESSAGE,
 DTL.DATEENTERED AS RDATEENTERED,
 USR.FIRSTNAME,
 USR.LASTNAME,
 USR.EMAIL,
 USR.LANGUAGE,
 USR2.FIRSTNAME AS RFIRSTNAME, 
 USR2.LASTNAME AS RLASTNAME,
 USR2.EMAIL AS REMAIL 
 FROM 
 accountMgrHeader HDR 
 LEFT OUTER JOIN
 accountMgrMessages DTL ON 
 HDR.ID = DTL.TICKETID
 LEFT OUTER JOIN
 user USR ON 
 HDR.ENTEREDBY = USR.USERNAME
 LEFT OUTER JOIN
 user USR2 ON 
 DTL.ENTEREDBY = USR2.USERNAME                
		WHERE 
		ID = __TICKETID AND
        DTL.MESSAGEID = LAST_INSERT_ID();
        
	END IF;

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CreateAdBrandLink` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `CreateAdBrandLink`(__ADID INT, __BRANDNAME VARCHAR(20))
BEGIN
	INSERT INTO AdItemsBrand (ID,BRANDNAME)
    VALUES (__ADID,__BRANDNAME);
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CreateCategoryBrandLink` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `CreateCategoryBrandLink`(__CATID INT, __BRANDNAME VARCHAR(20))
BEGIN
	INSERT INTO categoriesBrand (CATID,BRANDNAME)
    VALUES (__CATID,__BRANDNAME);
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CreateItemBranchLink` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `CreateItemBranchLink`(__ITEMID INT, __BRANCHCODE VARCHAR(20))
BEGIN
	INSERT INTO
		itemsBranchesLink
		(ITEMID,BRANCHCODE)
	VALUES
		(__ITEMID,__BRANCHCODE);
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CreateItemCategoryLink` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `CreateItemCategoryLink`(__ITEMID INT, __SUBCATID INT)
BEGIN
	INSERT INTO 
		itemsSubcategoryLink
		(ITEMID,SUBCATID)
	VALUES
		(__ITEMID,__SUBCATID);
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CreateItemPricing` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `CreateItemPricing`(__ITEMID INT, __QTY INT, __ITEMOPTION VARCHAR(30), __PRICE DECIMAL(19,4), __LENGTH DECIMAL(19,4), __WIDTH DECIMAL(19,4), __HEIGHT DECIMAL(19,4), __WEIGHT DECIMAL(19,4), __PIECES INT)
BEGIN
	INSERT INTO
		itemPricing
		(ITEMID,QTY,PRICE,LENGTH,WIDTH,HEIGHT,WEIGHT,PIECES,ITEMOPTION)
	VALUES
		(__ITEMID,__QTY,__PRICE,__LENGTH,__WIDTH,__HEIGHT,__WEIGHT,__PIECES,__ITEMOPTION);
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CreateNewAd` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `CreateNewAd`(__NAME VARCHAR(1000), __STARTDATE DATE, __ENDDATE DATE, __LANGUAGE VARCHAR(2), __SORTORDER INT, __URL VARCHAR(500), __ADPATH VARCHAR(200))
BEGIN

	INSERT INTO 
		AdItems
        (`NAME`,STARTDATE,ENDDATE,`LANGUAGE`,SORTORDER,IMAGEPATH,URL)
	VALUES
		(__NAME,__STARTDATE,__ENDDATE,__LANGUAGE,__SORTORDER,__ADPATH,__URL);

	SELECT LAST_INSERT_ID() AS ADID;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CreateNewBranch` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `CreateNewBranch`(__CODE VARCHAR(20), __NAME VARCHAR(100), __MGREMAIL VARCHAR(100), __TREEMAIL VARCHAR(100), __TAXGROUP VARCHAR(6), __SKIN VARCHAR(20), __STATUS INTEGER, __COMMENTS VARCHAR(1000), __SHIPZONE VARCHAR(20))
BEGIN
INSERT INTO
	branches (CODE,NAME,MANAGEMENTEMAIL,TREASUREREMAIL,TAXGROUP,SKIN,STATUS,COMMENTS,SHIPZONE)
VALUES
	(__CODE, __NAME, __MGREMAIL, __TREEMAIL,__TAXGROUP,__SKIN, __STATUS, __COMMENTS, __SHIPZONE);

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CreateNewBranchAddress` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `CreateNewBranchAddress`(__CODE VARCHAR(20), __LANG VARCHAR(2), __ISMAIN INTEGER, __ADDRESS VARCHAR(1000), __ADDRESS2 VARCHAR(1000), __CITY VARCHAR(100), __PROVINCE VARCHAR(100), __COUNTRY VARCHAR(100), __POSTALCODE VARCHAR(20), __PHONE VARCHAR(20), __FAX VARCHAR(20))
BEGIN

INSERT INTO
	branchesAddresses
		(CODE, LANGUAGE, ISMAIN, ADDRESS, ADDRESS2, CITY, PROVINCE, COUNTRY, POSTALCODE, PHONE, FAX)
VALUES
	(__CODE, __LANG, __ISMAIN, __ADDRESS, __ADDRESS2, __CITY, __PROVINCE, __COUNTRY, __POSTALCODE, __PHONE, __FAX);

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CreateNewCategory` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `CreateNewCategory`(__NAME VARCHAR(50), __DESCRIPTION VARCHAR(200), __LANGUAGE VARCHAR(2), __ICON VARCHAR(200), __USERLEVEL INTEGER, __COMMENTS VARCHAR(1000))
BEGIN

	INSERT	INTO
		categories
        (NAME,DESCRIPTION,ICONURL,LANGUAGE,USERLEVEL,COMMENTS,CREATEDDATE,MODIFIEDDATE)
	VALUES
		(__NAME,__DESCRIPTION,__ICON,__LANGUAGE,__USERLEVEL,__COMMENTS,CURRENT_TIMESTAMP,CURRENT_TIMESTAMP);

	SELECT LAST_INSERT_ID() AS CATID;

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CreateNewItem` */;
DELIMITER ;;
CREATE DEFINER=`admin`@`localhost` PROCEDURE `CreateNewItem`(IN `__TYPE` INT, IN `__CODE` VARCHAR(50), IN `__DESCRIPTION` VARCHAR(200), IN `__PRODUCEDETAIL` VARCHAR(1000), IN `__SIZE` VARCHAR(50), IN `__NUMPAGES` VARCHAR(50), IN `__PRINTINGTYPE` VARCHAR(50), IN `__STOCK` VARCHAR(50), IN `__STATUS` INT, IN `__MINLEVEL` INT, IN `__LEADTIME` INT, IN `__INITIALQTY` INT, IN `__DISPLAYNAME` VARCHAR(1000), IN `__PROOFNAME` VARCHAR(1000), IN `__PARAMETERSNAME` VARCHAR(1000), IN `__UPLOADDIR` VARCHAR(1000), IN `__PREVIEWNAME` VARCHAR(1000), IN `__SHIPBOXINSLEEVE` INT, IN `__SKIPPDFPERMISSIONCHECK` INT, IN `__DLSUGGESTIONS` VARCHAR(1000))
BEGIN
        INSERT INTO 
                items
                (TYPE,CODE,DESCRIPTION,PRODUCEDETAIL,SIZE,NUMPAGES,PRINTINGTYPE,STOCK,STATUS,MINLEVEL,LEADTIME,DISPLAYIMAGENAME,PROOFPDFNAME,PARAMETERSFILENAME,PREVIEWIMAGENAME,DISPLAYIMAGEPATH,PROOFPDFPATH,PARAMETERSFILEPATH,PREVIEWIMAGEPATH,SHIPBOXINSLEEVE,SKIPPDFPERMISSIONCHECK,DLSUGGESTIONS)
        VALUES
                (__TYPE,__CODE,__DESCRIPTION,__PRODUCEDETAIL,__SIZE,__NUMPAGES,__PRINTINGTYPE,__STOCK,__STATUS,__MINLEVEL,__LEADTIME,__DISPLAYNAME,__PROOFNAME,__PARAMETERSNAME,__PREVIEWNAME,
         CASE WHEN LENGTH(__DISPLAYNAME) > 0 THEN CONCAT(__UPLOADDIR,__DISPLAYNAME) ELSE '' END,
         CASE WHEN LENGTH(__PROOFNAME) > 0 THEN CONCAT(__UPLOADDIR,__PROOFNAME) ELSE '' END,
         CASE WHEN LENGTH(__PARAMETERSNAME) > 0 THEN CONCAT(__UPLOADDIR,__PARAMETERSNAME) ELSE '' END,
         CASE WHEN LENGTH(__PREVIEWNAME) > 0 THEN CONCAT(__UPLOADDIR,__PREVIEWNAME) ELSE '' END,
         __SHIPBOXINSLEEVE,
         __SKIPPDFPERMISSIONCHECK,
         __DLSUGGESTIONS
                );
 
        SELECT LAST_INSERT_ID() AS ITEMID;
           
        IF __TYPE = 0 THEN
                INSERT INTO 
                        itemsInventory
                        (ITEMID,QTYONHAND)
                VALUES (LAST_INSERT_ID(),0);
        END IF;
 
        IF __INITIALQTY > 0 THEN
                UPDATE 
                        itemsInventory
                SET
                        QTYONHAND = __INITIALQTY
                WHERE
                        ITEMID = LAST_INSERT_ID();
            
                INSERT INTO 
                        itemsAdjustmentLog
            (ITEMID,QTY,ADJDATE,REASON)
                VALUES (LAST_INSERT_ID(),__INITIALQTY,CURRENT_TIMESTAMP,'Initial Inventory');
    END IF;

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CreateNewNewsItem` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `CreateNewNewsItem`(__STARTDATE DATE, __ENDDATE DATE, __LANGUAGE VARCHAR(2), __TITLE VARCHAR(1000), __MESSAGE VARCHAR(1000))
BEGIN
	INSERT INTO 
		newsItems
		(STARTDATE,ENDDATE,LANGUAGE,TITLE,MESSAGE)
	VALUES
		(__STARTDATE,__ENDDATE,__LANGUAGE,__TITLE,__MESSAGE);
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CreateNewPromo` */;
DELIMITER ;;
CREATE DEFINER=`admin`@`localhost` PROCEDURE `CreateNewPromo`(__NAME VARCHAR(100), __CODE VARCHAR(50), __CODETYPE VARCHAR(12), __PROMOVALUE DECIMAL(19,2), __QTYTYPE VARCHAR(12), __MAXQTY INT, __MINQTY INT, __EXACTQTY INT, __STARTDATE DATE, __ENDDATE DATE, __SINGLEUSE INT, __REDEEMED INT, __SINGLEITEM INT)
BEGIN

 INSERT INTO 
 promos
 (NAME,CODE,CODETYPE,PROMOVALUE,QTYTYPE,MAXQTY,MINQTY,EXACTQTY,STARTDATE,ENDDATE,SINGLEUSE,REDEEMED,SINGLEITEM)
 VALUES
 (__NAME,__CODE,__CODETYPE,__PROMOVALUE,__QTYTYPE,__MAXQTY,__MINQTY,__EXACTQTY,__STARTDATE,__ENDDATE,__SINGLEUSE,__REDEEMED,__SINGLEITEM);

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CreateNewShipToAddress` */;
DELIMITER ;;
CREATE DEFINER=`admin`@`localhost` PROCEDURE `CreateNewShipToAddress`(__NAME VARCHAR(100), __STOREID VARCHAR(20), __ADDRESS VARCHAR(1000), __ADDRESS2 VARCHAR(1000), __CITY VARCHAR(100),
__PROVINCE VARCHAR(100), __COUNTRY VARCHAR(100), __POSTAL VARCHAR(20), __PHONE VARCHAR(20), __FAX VARCHAR(20),
__TAXGROUP VARCHAR(6), __SHIPZONE VARCHAR(6))
BEGIN

INSERT INTO
	shipToAddresses
    (NAME,STOREID,ADDRESS,ADDRESS2,CITY,PROVINCE,COUNTRY,POSTAL,PHONE,FAX,TAXGROUP,SHIPZONE)
VALUES
	(__NAME,__STOREID,__ADDRESS,__ADDRESS2,__CITY,__PROVINCE,__COUNTRY,__POSTAL,__PHONE,__FAX,__TAXGROUP,__SHIPZONE);

SELECT LAST_INSERT_ID() AS SHIPID;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CreateNewSubCategory` */;
DELIMITER ;;
CREATE DEFINER=`admin`@`localhost` PROCEDURE `CreateNewSubCategory`(__CATID INTEGER, __PARENTSUBCATID INTEGER, __NAME VARCHAR(50), __DESCRIPTION VARCHAR(200), __ICONURL VARCHAR(200), __USERLEVEL INT)
BEGIN
    INSERT INTO subcategories (CATID,PARENTSUBCATID,NAME,DESCRIPTION,ICONURL,USERLEVEL)
    VALUES (__CATID,__PARENTSUBCATID,__NAME,__DESCRIPTION, __ICONURL, __USERLEVEL);
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CreateNewUser` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `CreateNewUser`(UNAME VARCHAR(50), __BRANCH VARCHAR(20), PASS VARCHAR(50), FNAME VARCHAR(50), LNAME VARCHAR(50), LANG VARCHAR(2), STAT INTEGER, USERLVL INTEGER, COMMENTS VARCHAR(1000), EMAIL VARCHAR(100))
BEGIN

INSERT INTO 
	`user` (`USERNAME`,`BRANCH`,`PASSWORD`,`PLAINPASSWORD`,`FIRSTNAME`,`LASTNAME`,`LANGUAGE`,`STATUS`,`USERLEVEL`,`COMMENTS`,`EMAIL`) 
VALUES 
  (UNAME,__BRANCH,CONCAT('*', UPPER(SHA1(UNHEX(SHA1(PASS))))),PASS,FNAME,LNAME,LANG,STAT,USERLVL,COMMENTS,EMAIL);
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CreateShipmentHeader` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `CreateShipmentHeader`(__ORDERID INT, __TRACKNUM VARCHAR(100), __METHOD VARCHAR(100), __AMOUNT DECIMAL(16,2), __WEIGHT DECIMAL(16,2), __PIECES INT, __INSTRUCTIONS VARCHAR(1000))
BEGIN

	INSERT INTO 
		shipmentHeader
        (ORDERID,TRACKNUM,SHIPDATE,SHIPMETHOD,SHIPAMOUNT,SHIPWEIGHT,SHIPPIECES,SHIPINSTRUCTIONS)
	VALUES
		(__ORDERID,__TRACKNUM,CURRENT_TIMESTAMP,__METHOD,__AMOUNT,__WEIGHT,__PIECES,__INSTRUCTIONS);
    
    SELECT
		SHIPID,
        ORDERID
	FROM
		shipmentHeader
	WHERE
		SHIPID = LAST_INSERT_ID();
    
    
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CreateShipmentLine` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `CreateShipmentLine`(__SHIPID INT, __ORDERID INT, __ORDERLINE INT, __SHIPQTY INT)
BEGIN

	INSERT INTO
		shipmentDetail
		(SHIPID,ORDERID,ORDERLINE,SHIPQTY)
	VALUES
		(__SHIPID,__ORDERID,__ORDERLINE,__SHIPQTY);
        
	UPDATE
		orderDetail
	SET
		SHIPTODATEQTY = SHIPTODATEQTY + __SHIPQTY
	WHERE
		ORDERID = __ORDERID AND
        ITEMLINE = __ORDERLINE;
        
	UPDATE
		itemsInventory
	SET
		QTYONHAND = QTYONHAND - __SHIPQTY
	WHERE
		ITEMID IN (SELECT ITEMID FROM orderDetail WHERE ORDERID = __ORDERID AND ITEMLINE = __ORDERLINE);
        
	INSERT INTO 
		itemsAdjustmentLog
			(ITEMID,QTY,ADJDATE,REASON)
	SELECT
		ITEMID,
        __SHIPQTY * -1 AS QTY,
        CURRENT_TIMESTAMP AS ADJDATE,
        CONCAT('Shipment for Order# ', ORDERID, ' Ship# ', __SHIPID) AS REASON
	FROM
		orderDetail
	WHERE
		ORDERID = __ORDERID AND
        ITEMLINE = __ORDERLINE;  
        
	UPDATE
		orderHeader
	SET
		ORDERSTATUS = 'SHIPPED'
	WHERE
		ORDERID = __ORDERID AND
        ORDERID IN (SELECT ORDERID FROM orderDetail WHERE ORDERID = __ORDERID GROUP BY ORDERID HAVING SUM(ORDERQTY) = SUM(SHIPTODATEQTY));

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CreateShipToAddressUserLink` */;
DELIMITER ;;
CREATE DEFINER=`admin`@`localhost` PROCEDURE `CreateShipToAddressUserLink`(__shipid INT, __username VARCHAR(30))
BEGIN

	INSERT INTO shipToAddressesUserList (ID,USERNAME) VALUES (__shipid, __username); 

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CreateSupportTicket` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `CreateSupportTicket`(__TITLE VARCHAR(1000), __MESSAGE VARCHAR(1000), __ENTEREDBY VARCHAR(50))
BEGIN
 
 DECLARE __TICKETID INT;

 
 INSERT INTO ticketHeader
 (ENTEREDBY,DATEENTERED,STATUS,TITLE,DATECLOSED)
 VALUES
 (__ENTEREDBY,CURRENT_TIMESTAMP,1,__TITLE,NULL);
 
 
 SET __TICKETID = LAST_INSERT_ID();
 
 
 INSERT INTO ticketDetail
 (TICKETID,DATEENTERED,ENTEREDBY,CLIENTMESSAGE,MESSAGE)
 VALUES
 (__TICKETID,CURRENT_TIMESTAMP,__ENTEREDBY,1,__MESSAGE);
 
 
 SELECT 
 HDR.*,
 DTL.MESSAGEID,
 DTL.MESSAGE,
 USR.FIRSTNAME,
 USR.LASTNAME,
 USR.EMAIL,
 USR.LANGUAGE,
 UNIX_TIMESTAMP(DTL.DATEENTERED) AS UNIX_DATEENTERED
 FROM 
 ticketHeader HDR 
 LEFT OUTER JOIN
 ticketDetail DTL ON 
 HDR.ID = DTL.TICKETID
 LEFT OUTER JOIN
 user USR ON 
 HDR.ENTEREDBY = USR.USERNAME
 WHERE 
 ID = __TICKETID;

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CreateSupportTicketAttachment` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `CreateSupportTicketAttachment`(__TICKETID INT, __MESSAGEID INT, __STORENAME VARCHAR(200), __FILENAME VARCHAR(200))
BEGIN

INSERT INTO ticketAttachment (TICKETID,MESSAGEID, STOREFILENAME,ORIGFILENAME)
VALUES (__TICKETID, __MESSAGEID, __STORENAME,__FILENAME);
	

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `CreateSupportTicketReply` */;
DELIMITER ;;
CREATE DEFINER=`admin`@`localhost` PROCEDURE `CreateSupportTicketReply`(__TICKETID INT, __MESSAGE VARCHAR(1000), __ENTEREDBY VARCHAR(50))
BEGIN

DECLARE __TICCHECK INT;
 SELECT COUNT(*) INTO __TICCHECK FROM ticketHeader WHERE ( ENTEREDBY = __ENTEREDBY OR __ENTEREDBY IN (SELECT USERNAME FROM user WHERE USERLEVEL >= 81)) AND ID = __TICKETID;
 
 IF __TICCHECK > 0 THEN

		INSERT INTO
			ticketDetail
			(TICKETID,DATEENTERED,ENTEREDBY,CLIENTMESSAGE,MESSAGE)
		VALUES
			(
				__TICKETID,
				CURRENT_TIMESTAMP,
				__ENTEREDBY,
				CASE WHEN __ENTEREDBY IN (SELECT USERNAME FROM user WHERE USERLEVEL >= 81) THEN 0 ELSE 1 END,
				__MESSAGE
			);
            
		SELECT 
			HDR.*,
			DTL.MESSAGE,
			DTL.DATEENTERED AS RDATEENTERED,
			USR.FIRSTNAME,
			USR.LASTNAME,
			USR.EMAIL,
            USR.LANGUAGE,
			USR2.FIRSTNAME AS RFIRSTNAME, 
			USR2.LASTNAME AS RLASTNAME,
			USR2.EMAIL AS REMAIL            
		FROM 
			ticketHeader HDR 
		LEFT OUTER JOIN
			ticketDetail DTL ON 
				HDR.ID = DTL.TICKETID
		LEFT OUTER JOIN
			user USR ON 
				HDR.ENTEREDBY = USR.USERNAME
		LEFT OUTER JOIN
			user USR2 ON 
				DTL.ENTEREDBY = USR2.USERNAME                
		WHERE 
		ID = __TICKETID AND
        DTL.MESSAGEID = LAST_INSERT_ID();
        
	END IF;

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `DeleteAdItem` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `DeleteAdItem`(__ID INT)
BEGIN
	DELETE FROM AdItems WHERE ID = __ID;
    DELETE FROM AdItemsBrand WHERE ID = __ID;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `DeleteAllBranchLinks` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `DeleteAllBranchLinks`(__ITEMID INT)
BEGIN
	DELETE FROM itemsBranchesLink WHERE ITEMID = __ITEMID;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `DeleteAllItemCategoryLinks` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `DeleteAllItemCategoryLinks`(__ITEMID INT)
BEGIN
	DELETE FROM itemsSubcategoryLink WHERE ITEMID = __ITEMID;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `DeleteAllPricingLinks` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `DeleteAllPricingLinks`(__ITEMID INT)
BEGIN
	DELETE FROM itemPricing WHERE ITEMID = __ITEMID;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `DeleteAllShipToAddressUserLinks` */;
DELIMITER ;;
CREATE DEFINER=`admin`@`localhost` PROCEDURE `DeleteAllShipToAddressUserLinks`(__shipid INT)
BEGIN
	DELETE FROM shipToAddressesUserList WHERE ID = __shipid; 
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `DeleteBranchAddress` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `DeleteBranchAddress`(__CODE VARCHAR(20), __LANG VARCHAR(2))
BEGIN
	DELETE FROM branchesAddresses WHERE CODE = __CODE AND LANGUAGE = __LANG;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `DeleteBranchProfile` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `DeleteBranchProfile`(__CODE VARCHAR(20))
BEGIN
	DELETE FROM branches WHERE CODE = __CODE;
    DELETE FROM branchesAddresses WHERE CODE = __CODE;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `DeleteCategoryProfile` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `DeleteCategoryProfile`(__CATID INTEGER)
BEGIN
	DELETE FROM categories WHERE CATID = __CATID;
    DELETE FROM subcategories WHERE CATID = __CATID;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `DeleteItem` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `DeleteItem`(__ITEMID INT)
BEGIN
  DELETE FROM items WHERE ID = __ITEMID;
    DELETE FROM itemPricing WHERE ITEMID = __ITEMID;
    DELETE FROM itemsBranchesLink WHERE ITEMID = __ITEMID;
    DELETE FROM itemsSubcategoryLink WHERE ITEMID = __ITEMID;
    DELETE FROM itemsInventory WHERE ITEMID = __ITEMID;
    DELETE FROM itemsPrintDefinition WHERE ID = __ITEMID;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `DeleteNewsItem` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `DeleteNewsItem`(__ID INTEGER)
BEGIN
	DELETE FROM newsItems WHERE ID = __ID;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `DeletePromoCategories` */;
DELIMITER ;;
CREATE DEFINER=`admin`@`localhost` PROCEDURE `DeletePromoCategories`(__CODE VARCHAR(50))
BEGIN
  DELETE FROM promosCategories WHERE CODE = __CODE;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `DeletePromoItems` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `DeletePromoItems`(__CODE VARCHAR(50))
BEGIN
	DELETE FROM promosItems WHERE CODE = __CODE;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `DeletePromoProfile` */;
DELIMITER ;;
CREATE DEFINER=`admin`@`localhost` PROCEDURE `DeletePromoProfile`(__CODE VARCHAR(50))
BEGIN
  DELETE FROM promosCategories WHERE CODE = __CODE;
    DELETE FROM promosItems WHERE CODE = __CODE;
  DELETE FROM promos WHERE CODE = __CODE;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `DeleteShipToAddress` */;
DELIMITER ;;
CREATE DEFINER=`admin`@`localhost` PROCEDURE `DeleteShipToAddress`(__ID INT)
BEGIN

DELETE FROM shipToAddressesUserList WHERE ID = __ID;
DELETE FROM shipToAddresses WHERE ID = __ID;

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `DeleteSubCategoryProfile` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `DeleteSubCategoryProfile`(__SUBCATID INTEGER)
BEGIN
	DELETE FROM subcategories WHERE SUBCATID = __SUBCATID;
    DELETE FROM subcategories WHERE PARENTSUBCATID = __SUBCATID;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `DeleteUserProfile` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `DeleteUserProfile`(UNAME VARCHAR(100))
BEGIN

DELETE FROM user WHERE USERNAME = UNAME;

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `DuplicateBranchProfile` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `DuplicateBranchProfile`(__CODE VARCHAR(20), __NEWCODE VARCHAR(20))
BEGIN

	INSERT INTO
		branches
        (CODE,NAME,MANAGEMENTEMAIL,TREASUREREMAIL,TAXGROUP,STATUS,COMMENTS,CREATEDDATE,MODIFIEDDATE,SHIPZONE)
	SELECT
		__NEWCODE AS CODE,
        NAME,
        MANAGEMENTEMAIL,
        TREASUREREMAIL,
        TAXGROUP,
        STATUS,
        COMMENTS,
        CURRENT_TIMESTAMP AS CREATEDDATE,
        CURRENT_TIMESTAMP AS MODIFIEDDATE,
        SHIPZONE
	FROM
		branches
	WHERE
		CODE = __CODE;
        
	INSERT INTO
		branchesAddresses
        (CODE,LANGUAGE,ISMAIN,ADDRESS,CITY,PROVINCE,COUNTRY,POSTALCODE,PHONE,FAX)
	SELECT
		__NEWCODE AS CODE,
        LANGUAGE,
        ISMAIN,
        ADDRESS,
        CITY,
        PROVINCE,
        COUNTRY,
        POSTALCODE,
        PHONE,
        FAX
	FROM
		branchesAddresses
	WHERE
		CODE = __CODE;

	INSERT INTO
		branchesAssetData
        (BRANCHCODE,TAG,VALUE)
    SELECT
		__NEWCODE AS BRANCHCODE,
        TAG,
        VALUE
	FROM
		branchesAssetData
	WHERE
		BRANCHCODE = __CODE;

	INSERT INTO
		itemsBranchesLink
        (ITEMID,BRANCHCODE)
	SELECT
		ITEMID,
        __NEWCODE AS BRANCHCODE
	FROM
		itemsBranchesLink
	WHERE
		BRANCHCODE = __CODE;

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `DuplicateCategoryProfile` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `DuplicateCategoryProfile`(__CATID INT)
BEGIN

INSERT INTO
	categories
	(NAME,DESCRIPTION,ICONURL,LANGUAGE,USERLEVEL,COMMENTS,CREATEDDATE,MODIFIEDDATE)
SELECT
	CONCAT(NAME,' **DUP**') AS NAME,
    DESCRIPTION,
    ICONURL,
    LANGUAGE,
    USERLEVEL,
    COMMENTS,
    CURRENT_TIMESTAMP AS CREATEDDATE,
    CURRENT_TIMESTAMP AS MODIFIEDDATE
FROM
	categories
WHERE
	CATID = __CATID;
    
SET @CATID = LAST_INSERT_ID();    
   
INSERT INTO categoriesBrand (CATID,BRANDNAME)
SELECT @CATID,BRANDNAME FROM categoriesBrand WHERE CATID = __CATID;
    
SELECT @CATID AS CATID;

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `DuplicateItem` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `DuplicateItem`(__ITEMID INT)
BEGIN

  INSERT INTO
    items
        (TYPE,CODE,DESCRIPTION,SIZE,NUMPAGES,STATUS,MINLEVEL,LEADTIME,PARENTITEM,
         ARCHIVED,GENERATEDBY,ASSETAPPROVED,SHIPBOXINSLEEVE,PRINTINGTYPE,STOCK) 
  SELECT
    TYPE,
        CONCAT(CODE,' **DUP**'),
        DESCRIPTION,
        SIZE,
        NUMPAGES,
        STATUS,
        MINLEVEL,
        LEADTIME,
        PARENTITEM,
        ARCHIVED,
        GENERATEDBY,
        ASSETAPPROVED,
        SHIPBOXINSLEEVE,
        PRINTINGTYPE,
        STOCK
  FROM
    items
  WHERE
    ID = __ITEMID;
        
  SET @ITEMID = LAST_INSERT_ID();
 
  INSERT INTO
    itemPricing
        (ITEMID,QTY,PRICE,LENGTH,WIDTH,HEIGHT,WEIGHT,PIECES,ITEMOPTION)
  SELECT
    @ITEMID AS ITEMID,
        QTY,
        PRICE,
        LENGTH,
        WIDTH,
        HEIGHT,
        WEIGHT,
        PIECES,
        ITEMOPTION
  FROM
    itemPricing
  WHERE
    ITEMID = __ITEMID;
 
  INSERT INTO
    itemsBranchesLink
        (ITEMID,BRANCHCODE)
  SELECT
    @ITEMID AS ITEMID,
        BRANCHCODE
  FROM
    itemsBranchesLink
  WHERE
    ITEMID = __ITEMID;
        
  INSERT INTO
    itemsInventory
        (ITEMID,QTYONHAND)
  SELECT
    @ITEMID AS ITEMID,
        0 AS QTYONHAND
  FROM
    itemsInventory
  WHERE
    ITEMID = __ITEMID;
        
  INSERT INTO
    itemsSubcategoryLink
        (ITEMID,SUBCATID)
  SELECT
    @ITEMID AS ITEMID,
        SUBCATID
  FROM
    itemsSubcategoryLink
  WHERE
    ITEMID = __ITEMID;
        
  INSERT INTO
    itemsPrintDefinition
        (ID,PRESS,NUMPAGES,BLEEDS,COLOURS,FLATSIZE,FINISHSIZE,STOCK,PARENTSHEETSIZE,
         PRESSSHEETSIZE,NUMUP,LAYOUTORIENTATION,COATING,CONTOURCUT,LAMINATION,FINISHING,
         ACCESSORY,SPECIALINSTRUCTIONS,PACKAGELOCATION)
  SELECT
    @ITEMID AS ID,
        PRESS,NUMPAGES,BLEEDS,COLOURS,FLATSIZE,FINISHSIZE,STOCK,PARENTSHEETSIZE,
    PRESSSHEETSIZE,NUMUP,LAYOUTORIENTATION,COATING,CONTOURCUT,LAMINATION,FINISHING,
    ACCESSORY,SPECIALINSTRUCTIONS,PACKAGELOCATION
  FROM
    itemsPrintDefinition
  WHERE
    ID = __ITEMID;        
  
        
  SELECT @ITEMID AS ID;

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `DuplicateShipToAddress` */;
DELIMITER ;;
CREATE DEFINER=`admin`@`localhost` PROCEDURE `DuplicateShipToAddress`(__ID INT)
BEGIN

	INSERT INTO
		shipToAddresses
		(NAME,ADDRESS,CITY,PROVINCE,COUNTRY,POSTAL,PHONE,FAX,TAXGROUP,SHIPZONE)
	SELECT
		NAME,
        ADDRESS,
        CITY,
        PROVINCE,
        COUNTRY,
        POSTAL,
        PHONE,
        FAX,
        TAXGROUP,
        SHIPZONE
	FROM
		shipToAddresses
	WHERE
		ID = __ID;
        
	SELECT @SHIPID := LAST_INSERT_ID() AS ID;
    
    INSERT INTO 
		shipToAddressesUserList
        (ID,USERNAME)
	SELECT
		@SHIPID,
        USERNAME
	FROM
		shipToAddressesUserList
	WHERE
		ID = __ID;
    

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `DuplicateUserProfile` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `DuplicateUserProfile`(__USERNAME VARCHAR(50), __NEWUSERNAME VARCHAR(50))
BEGIN

	INSERT INTO
		user
        (USERNAME,BRANCH,PASSWORD,PLAINPASSWORD,FIRSTNAME,LASTNAME,EMAIL,LANGUAGE,USERLEVEL,CREATEDDATE,MODIFIEDDATE,STATUS,COMMENTS)
	SELECT
		__NEWUSERNAME AS USERNAME,
        BRANCH,
        PASSWORD,
        PLAINPASSWORD,
        FIRSTNAME,
        LASTNAME,
        EMAIL,
        LANGUAGE,
        USERLEVEL,
        CURRENT_TIMESTAMP AS CREATEDDATE,
        CURRENT_TIMESTAMP AS MODIFIEDDATE,
        STATUS,
        COMMENTS
	FROM
		user
	WHERE
		USERNAME = __USERNAME;

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `ExpireDownloadLinks` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `ExpireDownloadLinks`()
BEGIN

UPDATE
	orderDetail
SET
	DOWNLOADLINK = NULL
WHERE
	DOWNLOADLINK IS NOT NULL AND
    ORDERID IN (SELECT ORDERID FROM orderHeader WHERE ORDERDATE < DATE_ADD(CURRENT_TIMESTAMP,INTERVAL -30 DAY));



END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `extractTableData_branchAssetDefinition` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `extractTableData_branchAssetDefinition`()
BEGIN
	SELECT * FROM branchAssetDefinition;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `extractTableData_branches` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `extractTableData_branches`()
BEGIN
	SELECT
		*
	FROM
		branches;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `extractTableData_branchesAddresses` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `extractTableData_branchesAddresses`()
BEGIN
	SELECT
		*
	FROM
		branchesAddresses;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `extractTableData_branchesAssetData` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `extractTableData_branchesAssetData`()
BEGIN
	SELECT
		*
	FROM
		branchesAssetData;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `extractTableData_branchesFixtures` */;
DELIMITER ;;
CREATE DEFINER=`admin`@`localhost` PROCEDURE `extractTableData_branchesFixtures`()
BEGIN
	SELECT * FROM branchesFixtures ORDER BY BRANCHCODE,FIXTURECODE;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `extractTableData_branchSkinDefinition` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `extractTableData_branchSkinDefinition`()
BEGIN

	SELECT
		*
	FROM
		branchSkinDefinition;

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `extractTableData_campaign_fixtures` */;
DELIMITER ;;
CREATE DEFINER=`admin`@`localhost` PROCEDURE `extractTableData_campaign_fixtures`()
BEGIN
	SELECT * FROM campaign_fixtures;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `extractTableData_categories` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `extractTableData_categories`()
BEGIN
	SELECT
		*
	FROM
		categories;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `extractTableData_itemPricing` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `extractTableData_itemPricing`()
BEGIN
SELECT * FROM itemPricing left outer join items on itemPricing.ITEMID = items.ID;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `extractTableData_items` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `extractTableData_items`()
BEGIN
SELECT
		*
	FROM
		items;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `extractTableData_itemsBranchesLink` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `extractTableData_itemsBranchesLink`()
BEGIN
SELECT
		*
	FROM
		itemsBranchesLink;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `extractTableData_itemsInventory` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `extractTableData_itemsInventory`()
BEGIN
SELECT
		*
	FROM
		itemsInventory;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `extractTableData_itemsPrintDefinition` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `extractTableData_itemsPrintDefinition`()
BEGIN
  SELECT items.CODE, items.DESCRIPTION, itemsPrintDefinition.* from itemsPrintDefinition left join items on itemsPrintDefinition.ID = items.ID;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `extractTableData_itemsSubcategoryLink` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `extractTableData_itemsSubcategoryLink`()
BEGIN
SELECT
		*
	FROM
		itemsSubcategoryLink;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `extractTableData_newsItems` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `extractTableData_newsItems`()
BEGIN
SELECT
		*
	FROM
		newsItems;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `extractTableData_promos` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `extractTableData_promos`()
BEGIN
	SELECT * FROM promos;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `extractTableData_promosCategories` */;
DELIMITER ;;
CREATE DEFINER=`admin`@`localhost` PROCEDURE `extractTableData_promosCategories`()
BEGIN
SELECT * FROM promosCategories;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `extractTableData_promosItems` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `extractTableData_promosItems`()
BEGIN
	SELECT * FROM promosItems;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `extractTableData_shipToAddresses` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `extractTableData_shipToAddresses`()
BEGIN
	SELECT
		*
	FROM
		shipToAddresses;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `extractTableData_shipToAddressesUserList` */;
DELIMITER ;;
CREATE DEFINER=`admin`@`localhost` PROCEDURE `extractTableData_shipToAddressesUserList`()
BEGIN
SELECT * FROM shipToAddressesUserList;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `extractTableData_shipZoneCosts` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `extractTableData_shipZoneCosts`()
BEGIN
SELECT
		*
	FROM
		shipZoneCosts;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `extractTableData_subcategories` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `extractTableData_subcategories`()
BEGIN
SELECT
		*
	FROM
		subcategories;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `extractTableData_taxes` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `extractTableData_taxes`()
BEGIN
SELECT
		*
	FROM
		taxes;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `extractTableData_user` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `extractTableData_user`()
BEGIN
SELECT
		*
	FROM
		user;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `extract_TableData_branchAssetDefinition` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `extract_TableData_branchAssetDefinition`()
BEGIN
	SELECT * FROM branchAssetDefinition;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetAccountTicket` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetAccountTicket`(__TICKETID INT)
BEGIN

SELECT 
 HDR.*,
 DTL.*,
 USR.FIRSTNAME,
 USR.LASTNAME,
 UNIX_TIMESTAMP(DTL.DATEENTERED) AS UNIX_DATEENTERED 
FROM 
 accountMgrHeader HDR
LEFT OUTER JOIN
 accountMgrMessages DTL ON 
 HDR.ID = DTL.TICKETID
LEFT OUTER JOIN
user USR ON 
 DTL.ENTEREDBY = USR.USERNAME 
WHERE 
 ID = __TICKETID
ORDER BY
 DTL.DATEENTERED DESC;

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetAccountTicketList` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetAccountTicketList`(__USERNAME VARCHAR(50))
BEGIN

	SELECT
		*,
        UNIX_TIMESTAMP(HDR.DATEENTERED) AS UNIX_DATEENTERED
	FROM
		accountMgrHeader HDR
	WHERE
		( HDR.STATUS = 1 OR (HDR.STATUS = 0 AND DATECLOSED >= DATE_ADD(NOW(), INTERVAL -14 DAY)) ) AND
        ( HDR.ENTEREDBY = __USERNAME OR __USERNAME IN (SELECT USERNAME FROM user WHERE USERLEVEL >= 99))
	ORDER BY
		HDR.STATUS DESC,
		HDR.DATEENTERED DESC;

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetActiveAdItems` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetActiveAdItems`(__LANGUAGE VARCHAR(2), __SKIN VARCHAR(20))
BEGIN
	SELECT DISTINCT
		ADS.*
	FROM
		AdItems ADS
	INNER JOIN
		AdItemsBrand ADSBRAND ON 
			ADS.ID = ADSBRAND.ID
	WHERE
		(LANGUAGE = '--' OR LANGUAGE = __LANGUAGE) AND
        (ADSBRAND.BRANDNAME = 'ALL' OR ADSBRAND.BRANDNAME = __SKIN) AND
        CURRENT_TIMESTAMP >= STARTDATE AND CURRENT_TIMESTAMP <= ENDDATE
	ORDER BY
		COALESCE(SORTORDER,999);        
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetActiveNewsItems` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetActiveNewsItems`(__LANGUAGE VARCHAR(2))
BEGIN
	SELECT
		*
	FROM
		newsItems
	WHERE
		(LANGUAGE = '--' OR LANGUAGE = __LANGUAGE) AND
        CURRENT_TIMESTAMP >= STARTDATE AND CURRENT_TIMESTAMP <= ENDDATE;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetAdBrandInformation` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetAdBrandInformation`(__ID INT)
BEGIN

SELECT 
	BSD.SKINNAME AS BRANDNAME,
    CASE WHEN ADB.BRANDNAME IS NOT NULL THEN 1 ELSE 0 END AS SELECTED
FROM
	(
		SELECT SKINNAME FROM branchSkinDefinition UNION ALL
        SELECT 'ALL' UNION ALL
        SELECT ''
	) BSD
LEFT OUTER JOIN
	(SELECT * FROM AdItemsBrand WHERE ID = __ID ) ADB ON 
		BSD.SKINNAME = ADB.BRANDNAME
ORDER BY 
	BSD.SKINNAME;

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetAdItem` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetAdItem`(__ID INT)
BEGIN
	SELECT * FROM AdItems WHERE ID = __ID;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetAllAdItems` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetAllAdItems`()
BEGIN
	SELECT 
		*
	FROM	
		AdItems;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetAllNewsItems` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetAllNewsItems`()
BEGIN
	SELECT
		*
	FROM
		newsItems;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetAllShipToAddresses` */;
DELIMITER ;;
CREATE DEFINER=`admin`@`localhost` PROCEDURE `GetAllShipToAddresses`(__USEBRANCHES BOOLEAN, __USERNAME VARCHAR(30))
BEGIN

  SELECT
    RECTYPE,ID,NAME,ADDRESS,STOREID
  FROM
    (
  SELECT
    'S' AS RECTYPE,SADDR.ID, SADDR.NAME,SADDR.ADDRESS,CASE WHEN IFNULL(SADDR.STOREID,'') = '' THEN 'NA' ELSE STOREID END AS STOREID
  FROM
    shipToAddresses SADDR
  WHERE
    SADDR.ID IN (SELECT ID FROM shipToAddressesUserList WHERE USERNAME = '**ALL**' OR USERNAME = 'ALL' OR USERNAME = __USERNAME) 
        
  UNION ALL
    
    SELECT
    'B' AS RECTYPE,BRANCH.CODE,BRANCH.NAME,BADDR.ADDRESS,BRANCH.CODE AS STOREID
    FROM
    branches BRANCH
  INNER JOIN
    branchesAddresses BADDR ON 
      BRANCH.CODE = BADDR.CODE
  WHERE
    __USEBRANCHES = 1 AND
        BRANCH.STATUS = 1 AND
        BADDR.ISMAIN = 1
    ) ADDR
    ORDER BY
    NAME;

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetAvailableShippingZones` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetAvailableShippingZones`()
BEGIN
	SELECT  * FROM shipZoneCosts LIMIT 1;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetBranchAddressInformation` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetBranchAddressInformation`(__CODE VARCHAR(20))
BEGIN
	SELECT
		*
	FROM
		branchesAddresses
	WHERE
		CODE = __CODE;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetBranchAssets` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetBranchAssets`(__CODE VARCHAR(20))
BEGIN

	SELECT
		BAD.TAG,
        BAD.TYPE,
        BAD.NAME,
	IFNULL(BAD.VALIDATEPATTERN,'') AS VALIDATEPATTERN,
	IFNULL(BAD.VALIDATEERRORMSG,'') AS VALIDATEERRORMSG,
        IFNULL(BDATA.VALUE,'') AS VALUE
	FROM
		branchAssetDefinition BAD
	LEFT OUTER JOIN
		(SELECT * FROM branchesAssetData WHERE BRANCHCODE = __CODE) BDATA ON 
			BAD.TAG = BDATA.TAG
	ORDER BY
		BAD.DISPLAYORDER;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetBranchDropDown` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetBranchDropDown`()
BEGIN
	SELECT CODE,NAME FROM branches WHERE STATUS = 1 ORDER BY NAME;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetBranchInformation` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetBranchInformation`(__CODE VARCHAR(20))
BEGIN
	SELECT * FROM branches WHERE CODE = __CODE;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetBranchProfile` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetBranchProfile`(IN `__USERNAME` VARCHAR(50))
    NO SQL
SELECT
		BRANCH.NAME,
		BADDR.*
	FROM
		branches BRANCH
	INNER JOIN
		branchesAddresses BADDR ON 
			BRANCH.CODE = BADDR.CODE
	WHERE
		ISMAIN = 1 AND
		BRANCH.CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetCartCheckoutInformation` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetCartCheckoutInformation`(__USERNAME VARCHAR(20))
BEGIN

SET SQL_SAFE_UPDATES = 0;

UPDATE
	orderHeader
SET
	ORDERDATE = CURRENT_TIMESTAMP,
    ORDERMODIFIED = CURRENT_TIMESTAMP,
    EXPDATE = DATE_ADD(CURRENT_TIMESTAMP,INTERVAL 8 DAY),
    TAXNAME1 = (SELECT TAXNAME1 FROM taxes TAXES  WHERE SHIPTAXGROUP = TAXES.TAXCODE),
    TAXNAME2 = (SELECT TAXNAME2 FROM taxes TAXES  WHERE SHIPTAXGROUP = TAXES.TAXCODE),
    TAXNAME3 = (SELECT TAXNAME3 FROM taxes TAXES  WHERE SHIPTAXGROUP = TAXES.TAXCODE),
    TAXNAME4 = (SELECT TAXNAME4 FROM taxes TAXES  WHERE SHIPTAXGROUP = TAXES.TAXCODE),
    TAXNAME5 = (SELECT TAXNAME5 FROM taxes TAXES  WHERE SHIPTAXGROUP = TAXES.TAXCODE),
    TAXRATE1 = (SELECT TAXRATE1 FROM taxes TAXES  WHERE SHIPTAXGROUP = TAXES.TAXCODE),
    TAXRATE2 = (SELECT TAXRATE2 FROM taxes TAXES  WHERE SHIPTAXGROUP = TAXES.TAXCODE),
    TAXRATE3 = (SELECT TAXRATE3 FROM taxes TAXES  WHERE SHIPTAXGROUP = TAXES.TAXCODE),
    TAXRATE4 = (SELECT TAXRATE4 FROM taxes TAXES  WHERE SHIPTAXGROUP = TAXES.TAXCODE),
    TAXRATE5 = (SELECT TAXRATE5 FROM taxes TAXES  WHERE SHIPTAXGROUP = TAXES.TAXCODE)
WHERE 
	USERNAME  = __USERNAME AND 
    ORDERSTATUS = 'CART';

UPDATE 
	orderDetail I 
INNER JOIN 
(
	SELECT
		DTL.ITEMLINE,
        DTL.EXTPRICE * HDR.TAXRATE1 AS TAXAMT1,
        DTL.EXTPRICE * HDR.TAXRATE2 AS TAXAMT2,
        DTL.EXTPRICE * HDR.TAXRATE3 AS TAXAMT3,
        DTL.EXTPRICE * HDR.TAXRATE4 AS TAXAMT4,
        DTL.EXTPRICE * HDR.TAXRATE5 AS TAXAMT5
	FROM
		orderHeader HDR
	INNER JOIN
		orderDetail DTL ON
			HDR.ORDERID = DTL.ORDERID
	WHERE
		USERNAME = __USERNAME AND 
		ORDERSTATUS = 'CART'		
) II ON 
	I.ITEMLINE = II.ITEMLINE
SET
	I.TAXAMT1 = II.TAXAMT1,
    I.TAXAMT2 = II.TAXAMT2,
    I.TAXAMT3 = II.TAXAMT3,
    I.TAXAMT4 = II.TAXAMT4,
    I.TAXAMT5 = II.TAXAMT5
;

SELECT
	HDR.*,
    DTL.*,
    ITEM.*,
    COALESCE(SGROUP.SGRPNAME,'') AS SGRPNAME,
    COALESCE(SGROUP.SGRPPIECES,1) AS SGRPPIECES,
    COALESCE(SGROUP.SGRPBOXTYPE,'') AS SGRPBOXTYPE,
    COALESCE(SGROUP.SGRPWEIGHTPIECE,1.0) AS SGRPWEIGHTPIECE
FROM
	orderHeader HDR
INNER JOIN
	orderDetail DTL ON 
		HDR.ORDERID = DTL.ORDERID
INNER JOIN
	items ITEM ON 
		DTL.ITEMID = ITEM.ID
LEFT OUTER JOIN
	shippingGroupItems SGROUPITEMS ON 
		ITEM.ID = SGROUPITEMS.ITEMID
LEFT OUTER JOIN 
	shippingGroup SGROUP ON 
		SGROUPITEMS.SGRPNAME = SGROUP.SGRPNAME
WHERE 
	USERNAME  = __USERNAME AND 
    ORDERSTATUS = 'CART';
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetCartDiscountCodes` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetCartDiscountCodes`(__ORDERID INT)
BEGIN
	SELECT * FROM orderPromos WHERE ORDERID = __ORDERID;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetCartItems` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetCartItems`(__USERNAME NVARCHAR(20))
BEGIN

SELECT 
	DTL.*
FROM 
	orderHeader HDR
INNER JOIN
	orderDetail DTL ON 
		HDR.ORDERID = DTL.ORDERID
WHERE 
	USERNAME COLLATE utf8_unicode_ci = __USERNAME AND 
    ORDERSTATUS = 'CART';


END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetCategoriesBySearchTerm` */;
DELIMITER ;;
CREATE DEFINER=`admin`@`localhost` PROCEDURE `GetCategoriesBySearchTerm`(__TERM VARCHAR(50))
BEGIN

SELECT
  CATID,
    CONCAT(NAME, ' - ', DESCRIPTION) AS CATNAME
FROM
  categories
WHERE
  (
  NAME LIKE CONCAT('%',__TERM,'%') OR 
    DESCRIPTION LIKE CONCAT('%',__TERM,'%')
    ) 
ORDER BY 
  NAME,DESCRIPTION
LIMIT 20;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetCategoriesListByUsername` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetCategoriesListByUsername`(__USERNAME VARCHAR(50))
BEGIN
	SELECT
		CATS.*
	FROM
		categories CATS
	CROSS JOIN
		( SELECT * FROM user WHERE USERNAME = __USERNAME) USERS
	WHERE
		USERS.USERLEVEL >= CATS.USERLEVEL AND
        CATS.LANGUAGE IN (SELECT BADDR.LANGUAGE FROM user USERS INNER JOIN branchesAddresses BADDR ON USERS.BRANCH = BADDR.CODE  WHERE USERS.USERNAME = __USERNAME) AND
        CATS.CATID IN (
						SELECT CC.CATID 
						FROM categories CC 
                        INNER JOIN categoriesBrand CCC ON CC.CATID = CCC.CATID
                        INNER JOIN ( SELECT SKIN FROM branches BB INNER JOIN user UU ON BB.CODE = UU.BRANCH WHERE USERNAME = __USERNAME) UBS ON 
							(UBS.SKIN = CCC.BRANDNAME OR CCC.BRANDNAME = 'ALL')
                            )
	ORDER BY
		CATS.NAME
	;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetCategoryAndSubCatDropDown` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetCategoryAndSubCatDropDown`()
BEGIN
	SELECT
		SUBCATS.SUBCATID,
		CASE 
			WHEN SUBCATS_2.SUBCATID IS NOT NULL THEN CONCAT(CATS.NAME," - ", SUBCATS_2.NAME," - ",SUBCATS.NAME)
            ELSE CONCAT(CATS.NAME," - ",SUBCATS.NAME) 
		END AS  NAME
	FROM
		categories CATS
	INNER JOIN
		subcategories SUBCATS ON 
			CATS.CATID = SUBCATS.CATID
	LEFT OUTER JOIN
		subcategories SUBCATS_2 ON 
			SUBCATS.PARENTSUBCATID = SUBCATS_2.SUBCATID
	WHERE
		SUBCATS.SUBCATID NOT IN (SELECT DISTINCT PARENTSUBCATID FROM subcategories)
	ORDER BY
		CATS.NAME,
		SUBCATS_2.NAME,
        SUBCATS.NAME
	;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetCategoryBrandInformation` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetCategoryBrandInformation`(__CATID INT)
BEGIN

SELECT 
	BSD.SKINNAME AS BRANDNAME,
    CASE WHEN CB.BRANDNAME IS NOT NULL THEN 1 ELSE 0 END AS SELECTED
FROM
	(
		SELECT SKINNAME FROM branchSkinDefinition UNION ALL
        SELECT 'ALL' UNION ALL
        SELECT ''
	) BSD
LEFT OUTER JOIN
	(SELECT * FROM categoriesBrand WHERE CATID = __CATID ) CB ON 
		BSD.SKINNAME = CB.BRANDNAME
ORDER BY 
	BSD.SKINNAME;

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetCategoryInformation` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetCategoryInformation`(__CATID INTEGER)
BEGIN
	SELECT * FROM categories WHERE CATID = __CATID;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetCategoryItems` */;
DELIMITER ;;
CREATE DEFINER=`admin`@`localhost` PROCEDURE `GetCategoryItems`(__USERNAME VARCHAR(50), __CATID INT, __SUBCATID INT)
BEGIN
    SELECT 
        CATS.NAME AS CATNAME,
        CATS.DESCRIPTION AS CATDESC,
        CASE WHEN ITEMS.TYPE = 2 THEN -99 ELSE SUBCATS.SUBCATID END AS SUBCATID,
        CASE WHEN ITEMS.TYPE = 2 THEN '{{!GENERATE!}}' ELSE SUBCATS.NAME END AS SUBCATNAME,
        CASE WHEN ITEMS.TYPE = 2 THEN CONCAT('{{!CUST_ART!}} ',SUBCATS.NAME) ELSE SUBCATS.DESCRIPTION END AS SUBCATDESC,
      SUBCATS.SUBCATID AS REALSUBCATID,
        ITEMS.ID AS ITEMID,
        ITEMS.CODE AS ITEMCODE,
        ITEMS.DESCRIPTION AS ITEMDESC,
        ITEMS.DISPLAYIMAGEPATH,
        ITEMS.PROOFPDFNAME,
        ITEMS.SIZE,
        ITEMS.NUMPAGES,
        ITEMS.MINLEVEL,
        ITEMS.STATUS,
        ITEMS.TYPE AS ITEMTYPE,
        COALESCE(ONORDERSTAT.TOTORDERQTY,0) AS ONORDER, 
        COALESCE(DATE(ONORDERSTAT.ORDERDATE),'') AS LASTORDERED,
        CASE WHEN ITEMS.TYPE = 3 THEN 1 WHEN BRANCHLINK.ITEMID IS NULL THEN 0 ELSE 1 END AS PARTOFBRANCH,
        COALESCE(ITEMINV.QTYONHAND,0) AS INSTOCK,
        ITEMS.ASSETAPPROVED
    FROM
        categories CATS
    LEFT OUTER JOIN
        subcategories SUBCATS ON 
            CATS.CATID = SUBCATS.CATID
    LEFT OUTER JOIN
        itemsSubcategoryLink SCTOI ON
            SCTOI.SUBCATID = SUBCATS.SUBCATID
    LEFT OUTER JOIN
        items ITEMS ON 
            ITEMS.ID = SCTOI.ITEMID
    LEFT OUTER JOIN
    
    (SELECT DISTINCT 
        ITEMID 
     FROM
        (
            SELECT 
                ITOB.ITEMID 
            FROM 
                user USERS 
            INNER JOIN 
                itemsBranchesLink ITOB ON USERS.BRANCH = ITOB.BRANCHCODE 
            WHERE 
                USERS.USERNAME = __USERNAME
                
            UNION ALL 
            SELECT ITOB.ITEMID FROM itemsBranchesLink ITOB WHERE ITOB.BRANCHCODE = 'ALL_BRANCHES'
            
            UNION ALL
            SELECT ITOB.ITEMID FROM user UU INNER JOIN branches BB ON UU.BRANCH = BB.CODE
            INNER JOIN itemsBranchesLink ITOB ON CONCAT('BRN_',BB.SKIN) = ITOB.BRANCHCODE 
            WHERE UU.USERNAME = __USERNAME
        ) LINKS
    )  BRANCHLINK ON 
            BRANCHLINK.ITEMID = ITEMS.ID
    LEFT OUTER JOIN
        (SELECT ITEMID, SUM(CASE WHEN ORDERQTY-SHIPTODATEQTY < 0 THEN 0 ELSE ORDERQTY-SHIPTODATEQTY END) AS TOTORDERQTY, MAX(ORDERDATE) AS ORDERDATE FROM orderHeader HDR INNER JOIN orderDetail DTL ON HDR.ORDERID = DTL.ORDERID WHERE ORDERSTATUS NOT IN ('WAITMA','CART', 'CANCELLED') GROUP BY ITEMID) ONORDERSTAT ON
            ONORDERSTAT.ITEMID = SCTOI.ITEMID  
    LEFT OUTER JOIN
        itemsInventory ITEMINV ON 
            ITEMS.ID = ITEMINV.ITEMID
    CROSS JOIN
        ( SELECT * FROM user WHERE USERNAME = __USERNAME) USERS                
    WHERE
        (__SUBCATID = -1 OR __SUBCATID = SUBCATS.SUBCATID OR __SUBCATID = SUBCATS.PARENTSUBCATID) AND
        CATS.CATID = __CATID AND
        IFNULL(ITEMS.ARCHIVED,0) = 0 AND
        (BRANCHLINK.ITEMID IS NOT NULL OR (ITEMS.TYPE = 3 AND __USERNAME IN (SELECT USERNAME FROM user WHERE USERLEVEL >= 99))) AND
        USERS.USERLEVEL >= CATS.USERLEVEL AND
        USERS.USERLEVEL >= SUBCATS.USERLEVEL 
    ORDER BY
        CASE WHEN ITEMS.TYPE = 2 THEN 1 ELSE 99 END, 
        SUBCATS.NAME,
        CASE WHEN PARENTITEM = 0 THEN 1 ELSE 99 END, 
        ITEMS.CODE
    ;
    



END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetCategorySubcategoryTiles` */;
DELIMITER ;;
CREATE DEFINER=`admin`@`localhost` PROCEDURE `GetCategorySubcategoryTiles`(__USERNAME VARCHAR(50), __CATID INT)
BEGIN

    SELECT
        CATS.CATID,
        CATS.NAME AS CATNAME,
        CATS.DESCRIPTION AS CATDESC,
        SUBCATS.SUBCATID  AS SUBCATID,
        SUBCATS.NAME  AS SUBCATNAME,
        SUBCATS.DESCRIPTION  AS SUBCATDESC,
        SUBCATS.ICONURL AS SUBCATICONURL
    FROM
        categories CATS
    LEFT OUTER JOIN
        subcategories SUBCATS ON 
            CATS.CATID = SUBCATS.CATID  
    CROSS JOIN
        ( SELECT * FROM user WHERE USERNAME = __USERNAME) USERS            
    WHERE
        CATS.CATID = __CATID AND
        SUBCATS.PARENTSUBCATID = -1 AND
        USERS.USERLEVEL >= CATS.USERLEVEL AND
        USERS.USERLEVEL >= SUBCATS.USERLEVEL
    ORDER BY
        SUBCATS.NAME
    ;            

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetDownloadFileData` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetDownloadFileData`(__ID VARCHAR(200))
BEGIN
	SELECT * FROM ticketAttachment WHERE STOREFILENAME = __ID;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetDownloadItem` */;
DELIMITER ;;
CREATE DEFINER=`admin`@`localhost` PROCEDURE `GetDownloadItem`(__DOWNLOADLINK VARCHAR(100))
BEGIN

SELECT
  ITEM.*,
    OH.USERNAME
FROM
  orderDetail OD
INNER JOIN
  items ITEM ON 
    ITEM.ID = OD.ITEMID
INNER JOIN 
  orderHeader OH ON OD.ORDERID = OH.ORDERID
WHERE
  OD.DOWNLOADLINK = __DOWNLOADLINK;

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetDownloadLog` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetDownloadLog`()
BEGIN
	SELECT 
		LOG.*,
        ITEM.CODE AS ITEMCODE,
        ITEM.DESCRIPTION AS ITEMDESCRIPTION
	FROM
		downloadLog LOG
	INNER JOIN
		items ITEM ON 
			LOG.ITEMID = ITEM.ID;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetFaqBySearchTerm` */;
DELIMITER ;;
CREATE DEFINER=`admin`@`localhost` PROCEDURE `GetFaqBySearchTerm`(__TERM VARCHAR(50),__LANG VARCHAR(2))
BEGIN

  SELECT 
    ID,
        CASE WHEN __LANG = 'EN' THEN NAMEEN ELSE NAMEFR END AS NAME 
  FROM
    faq 
  WHERE
    (
    ID = __TERM OR 
        ( __LANG = 'EN' AND NAMEEN LIKE CONCAT('%',__TERM,'%')) OR 
        ( __LANG = 'FR' AND NAMEFR LIKE CONCAT('%',__TERM,'%')) OR 
        ( __LANG = 'EN' AND CONTENTEN LIKE CONCAT('%',__TERM,'%')) OR 
        ( __LANG = 'FR' AND CONTENTFR LIKE CONCAT('%',__TERM,'%'))
    )
  ORDER BY 
    NAMEEN
  LIMIT 20;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetGeneratorBranchVariables` */;
DELIMITER ;;
CREATE DEFINER=`admin`@`localhost` PROCEDURE `GetGeneratorBranchVariables`(__USERNAME VARCHAR(50))
BEGIN

SELECT
	'Param-BranchName' AS TAG,
    NAME AS TAGVALUE
FROM
	branches
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) 

UNION ALL

SELECT
	'Param-Address1' AS TAG,
    ADDRESS AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    ISMAIN = 1
    
UNION ALL

SELECT
	'Param-Address1Ext' AS TAG,
    ADDRESS2 AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    ISMAIN = 1    

UNION ALL

SELECT
	'Param-Address2' AS TAG,
    CONCAT(CITY,', ',PROVINCE,', ', COUNTRY, '  ', POSTALCODE) AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    ISMAIN = 1

UNION ALL

SELECT
	'Param-City' AS TAG,
    CITY AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    ISMAIN = 1
   
UNION ALL
   
SELECT
	'Param-Prov' AS TAG,
    PROVINCE AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    ISMAIN = 1   
    
UNION ALL
   
SELECT
	'Param-Country' AS TAG,
    COUNTRY AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    ISMAIN = 1      

UNION ALL

SELECT
	'Param-CityProvPostal' AS TAG,
    CONCAT(CITY,', ',PROVINCE,' ', POSTALCODE) AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    ISMAIN = 1
    
UNION ALL

SELECT
	'Param-CityProv' AS TAG,
    CONCAT(CITY,', ',PROVINCE) AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    ISMAIN = 1 
    
UNION ALL

SELECT
	'Param-Postal' AS TAG,
    POSTALCODE AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    ISMAIN = 1      

UNION ALL

SELECT
	'Param-AddressAll' AS TAG,
    CONCAT(ADDRESS, ', ', CITY,', ',PROVINCE, '  ', POSTALCODE) AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    ISMAIN = 1

UNION ALL

SELECT
	'Param-BranchPhone' AS TAG,
    PHONE AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    ISMAIN = 1
    
UNION ALL

SELECT
	'Param-BranchFax' AS TAG,
    FAX AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    ISMAIN = 1    

UNION ALL
   
SELECT
	'Param-Address1EN' AS TAG,
    ADDRESS AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    LANGUAGE = 'EN'
    
UNION ALL
   
SELECT
	'Param-Address1ExtEN' AS TAG,
    ADDRESS2 AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    LANGUAGE = 'EN'    

UNION ALL

SELECT
	'Param-Address2EN' AS TAG,
    CONCAT(CITY,', ',PROVINCE,', ', COUNTRY, '  ', POSTALCODE) AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    LANGUAGE = 'EN' 
    
UNION ALL

SELECT
	'Param-AddressAllEN' AS TAG,
    CONCAT(ADDRESS, ', ', CITY,', ',PROVINCE, '  ', POSTALCODE) AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    LANGUAGE = 'EN' 

UNION ALL

SELECT
	'Param-CityEN' AS TAG,
    CITY AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    LANGUAGE = 'EN' 

UNION ALL
   
SELECT
	'Param-ProvEN' AS TAG,
    PROVINCE AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    LANGUAGE = 'EN'   
    
UNION ALL
   
SELECT
	'Param-CountryEN' AS TAG,
    COUNTRY AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    LANGUAGE = 'EN'   

UNION ALL

SELECT
	'Param-CityProvPostalEN' AS TAG,
    CONCAT(CITY,', ',PROVINCE,' ', POSTALCODE) AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    LANGUAGE = 'EN' 
    
UNION ALL

SELECT
	'Param-CityProvEN' AS TAG,
    CONCAT(CITY,', ',PROVINCE) AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    LANGUAGE = 'EN'   
    
UNION ALL

SELECT
	'Param-PostalEN' AS TAG,
    POSTALCODE AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    LANGUAGE = 'EN'      

UNION ALL

SELECT
	'Param-BranchPhoneEN' AS TAG,
    PHONE AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    LANGUAGE = 'EN'
    
UNION ALL

SELECT
	'Param-BranchFaxEN' AS TAG,
    FAX AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    LANGUAGE = 'EN'    

UNION ALL
   
SELECT
	'Param-Address1FR' AS TAG,
    ADDRESS AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    LANGUAGE = 'FR'
    
UNION ALL
   
SELECT
	'Param-Address1ExtFR' AS TAG,
    ADDRESS2 AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    LANGUAGE = 'FR'    

UNION ALL

SELECT
	'Param-Address2FR' AS TAG,
    CONCAT(CITY,', ',PROVINCE,', ', COUNTRY, '  ', POSTALCODE) AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    LANGUAGE = 'FR'    
    
UNION ALL

SELECT
	'Param-AddressAllFR' AS TAG,
    CONCAT(ADDRESS, ', ', CITY,', ',PROVINCE, '  ', POSTALCODE) AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    LANGUAGE = 'FR'     
 
UNION ALL

SELECT
	'Param-CityFR' AS TAG,
    CITY AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    LANGUAGE = 'FR'  

UNION ALL
   
SELECT
	'Param-ProvFR' AS TAG,
    PROVINCE AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    LANGUAGE = 'FR'   
    
UNION ALL
   
SELECT
	'Param-CountryFR' AS TAG,
    COUNTRY AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    LANGUAGE = 'FR'   
 
UNION ALL

SELECT
	'Param-CityProvPostalFR' AS TAG,
    CONCAT(CITY,', ',PROVINCE,' ', POSTALCODE) AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    LANGUAGE = 'FR' 
    
UNION ALL

SELECT
	'Param-CityProvFR' AS TAG,
    CONCAT(CITY,', ',PROVINCE) AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    LANGUAGE = 'FR'  
    
UNION ALL

SELECT
	'Param-PostalFR' AS TAG,
    POSTALCODE AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    LANGUAGE = 'FR'       
    
UNION ALL

SELECT
	'Param-BranchPhoneFR' AS TAG,
    PHONE AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    LANGUAGE = 'FR'
    
UNION ALL

SELECT
	'Param-BranchFaxFR' AS TAG,
    FAX AS TAGVALUE
FROM
	branchesAddresses
WHERE
	CODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME) AND
    LANGUAGE = 'FR'    

UNION ALL

SELECT
	CONCAT('Param-',TAG) AS TAG,
	VALUE
FROM
	branchesAssetData
WHERE
	BRANCHCODE IN (SELECT BRANCH FROM user WHERE USERNAME = __USERNAME);


END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetInventoryData` */;
DELIMITER ;;
CREATE DEFINER=`admin`@`localhost` PROCEDURE `GetInventoryData`(__INVTYPE INT)
BEGIN

IF __INVTYPE = 1 THEN
	
	SELECT
		ITEMS.ID,
        ITEMS.CODE,
        ITEMS.DESCRIPTION,
        COALESCE(INV.QTYONHAND,0) AS STOCK,
        COALESCE(ONORDERSTAT.TOTORDERQTY,0) AS ONORDER, 
        ITEMS.MINLEVEL,
        COALESCE(DATE(ONORDERSTAT.ORDERDATE),'') AS LASTORDERED,
        COALESCE(DATE(SHIPSTAT.SHIPDATE),'') AS LASTSHIPPED,
        COALESCE(SUBCATNAME.NAME,'') AS L2CAT,
		COALESCE(SUBCATNAME1.NAME,'') AS L1CAT,
		COALESCE(CAT1.NAME,'') AS L0CAT        
	FROM
		items ITEMS
	LEFT OUTER JOIN
		itemsInventory INV ON 
			ITEMS.ID = INV.ITEMID
	LEFT OUTER JOIN
		(SELECT ITEMID, SUM(ORDERQTY-SHIPTODATEQTY) AS TOTORDERQTY, MAX(ORDERDATE) AS ORDERDATE FROM orderHeader HDR INNER JOIN orderDetail DTL ON HDR.ORDERID = DTL.ORDERID WHERE ORDERSTATUS NOT IN ('WAITMA','CART') GROUP BY ITEMID) ONORDERSTAT ON
			ONORDERSTAT.ITEMID = ITEMS.ID
	LEFT OUTER JOIN
		(SELECT ITEMID, MAX(SHIPDATE) AS SHIPDATE FROM orderHeader HDR INNER JOIN orderDetail DTL ON HDR.ORDERID = DTL.ORDERID INNER JOIN shipmentDetail SDTL ON DTL.ORDERID = SDTL.ORDERID AND DTL.ITEMLINE = SDTL.ORDERLINE INNER JOIN shipmentHeader SHDR ON SDTL.SHIPID = SHDR.SHIPID WHERE ORDERSTATUS NOT IN ('WAITMA','CART') GROUP BY ITEMID) SHIPSTAT ON
			SHIPSTAT.ITEMID = ITEMS.ID   
	LEFT OUTER JOIN 
		(SELECT ITEMID,MIN(SUBCATID) AS SUBCATID FROM itemsSubcategoryLink GROUP BY ITEMID) SUBCAT ON 
			ITEMS.ID = SUBCAT.ITEMID
	LEFT OUTER JOIN 
		subcategories SUBCATNAME ON 
			SUBCAT.SUBCATID = SUBCATNAME.SUBCATID
	LEFT OUTER JOIN 
		subcategories SUBCATNAME1 ON 
			SUBCATNAME.PARENTSUBCATID = SUBCATNAME1.SUBCATID            
	LEFT OUTER JOIN 
		categories CAT1 ON 
			SUBCATNAME.CATID = CAT1.CATID 
	;
	
ELSEIF __INVTYPE = 2 THEN 
	
	SELECT
		ITEMS.ID,
        ITEMS.CODE,
        ITEMS.DESCRIPTION,
        COALESCE(INV.QTYONHAND,0) AS STOCK,
        COALESCE(ONORDERSTAT.TOTORDERQTY,0) AS ONORDER, 
        ITEMS.MINLEVEL,
        COALESCE(DATE(ONORDERSTAT.ORDERDATE),'') AS LASTORDERED,
        COALESCE(DATE(SHIPSTAT.SHIPDATE),'') AS LASTSHIPPED,
        COALESCE(SUBCATNAME.NAME,'') AS L2CAT,
		COALESCE(SUBCATNAME1.NAME,'') AS L1CAT,
		COALESCE(CAT1.NAME,'') AS L0CAT        
	FROM
		items ITEMS
	INNER JOIN
		itemsInventory INV ON 
			ITEMS.ID = INV.ITEMID
	LEFT OUTER JOIN
		(SELECT ITEMID, SUM(ORDERQTY-SHIPTODATEQTY) AS TOTORDERQTY, MAX(ORDERDATE) AS ORDERDATE FROM orderHeader HDR INNER JOIN orderDetail DTL ON HDR.ORDERID = DTL.ORDERID WHERE ORDERSTATUS NOT IN ('WAITMA','CART') GROUP BY ITEMID) ONORDERSTAT ON
			ONORDERSTAT.ITEMID = ITEMS.ID 
	LEFT OUTER JOIN
		(SELECT ITEMID, MAX(SHIPDATE) AS SHIPDATE FROM orderHeader HDR INNER JOIN orderDetail DTL ON HDR.ORDERID = DTL.ORDERID INNER JOIN shipmentDetail SDTL ON DTL.ORDERID = SDTL.ORDERID AND DTL.ITEMLINE = SDTL.ORDERLINE INNER JOIN shipmentHeader SHDR ON SDTL.SHIPID = SHDR.SHIPID WHERE ORDERSTATUS NOT IN ('WAITMA','CART') GROUP BY ITEMID) SHIPSTAT ON
			SHIPSTAT.ITEMID = ITEMS.ID
	LEFT OUTER JOIN 
		(SELECT ITEMID,MIN(SUBCATID) AS SUBCATID FROM itemsSubcategoryLink GROUP BY ITEMID) SUBCAT ON 
			ITEMS.ID = SUBCAT.ITEMID
	LEFT OUTER JOIN 
		subcategories SUBCATNAME ON 
			SUBCAT.SUBCATID = SUBCATNAME.SUBCATID
	LEFT OUTER JOIN 
		subcategories SUBCATNAME1 ON 
			SUBCATNAME.PARENTSUBCATID = SUBCATNAME1.SUBCATID            
	LEFT OUTER JOIN 
		categories CAT1 ON 
			SUBCATNAME.CATID = CAT1.CATID             
	WHERE 
		INV.QTYONHAND > 0;
        
        
ELSEIF __INVTYPE = 3 THEN
	
	SELECT
		ITEMS.ID,
        ITEMS.CODE,
        ITEMS.DESCRIPTION,
        COALESCE(INV.QTYONHAND,0) AS STOCK,
        COALESCE(ONORDERSTAT.TOTORDERQTY,0) AS ONORDER, 
        ITEMS.MINLEVEL,
        COALESCE(DATE(ONORDERSTAT.ORDERDATE),'') AS LASTORDERED,
        COALESCE(DATE(SHIPSTAT.SHIPDATE),'') AS LASTSHIPPED,
        COALESCE(SUBCATNAME.NAME,'') AS L2CAT,
		COALESCE(SUBCATNAME1.NAME,'') AS L1CAT,
		COALESCE(CAT1.NAME,'') AS L0CAT        
	FROM
		items ITEMS
	INNER JOIN
		itemsInventory INV ON 
			ITEMS.ID = INV.ITEMID
	LEFT OUTER JOIN
		(SELECT ITEMID, SUM(ORDERQTY-SHIPTODATEQTY) AS TOTORDERQTY, MAX(ORDERDATE) AS ORDERDATE FROM orderHeader HDR INNER JOIN orderDetail DTL ON HDR.ORDERID = DTL.ORDERID WHERE ORDERSTATUS NOT IN ('WAITMA','CART') GROUP BY ITEMID) ONORDERSTAT ON
			ONORDERSTAT.ITEMID = ITEMS.ID  
	LEFT OUTER JOIN
		(SELECT ITEMID, MAX(SHIPDATE) AS SHIPDATE FROM orderHeader HDR INNER JOIN orderDetail DTL ON HDR.ORDERID = DTL.ORDERID INNER JOIN shipmentDetail SDTL ON DTL.ORDERID = SDTL.ORDERID AND DTL.ITEMLINE = SDTL.ORDERLINE INNER JOIN shipmentHeader SHDR ON SDTL.SHIPID = SHDR.SHIPID WHERE ORDERSTATUS NOT IN ('WAITMA','CART') GROUP BY ITEMID) SHIPSTAT ON
			SHIPSTAT.ITEMID = ITEMS.ID
	LEFT OUTER JOIN 
		(SELECT ITEMID,MIN(SUBCATID) AS SUBCATID FROM itemsSubcategoryLink GROUP BY ITEMID) SUBCAT ON 
			ITEMS.ID = SUBCAT.ITEMID
	LEFT OUTER JOIN 
		subcategories SUBCATNAME ON 
			SUBCAT.SUBCATID = SUBCATNAME.SUBCATID
	LEFT OUTER JOIN 
		subcategories SUBCATNAME1 ON 
			SUBCATNAME.PARENTSUBCATID = SUBCATNAME1.SUBCATID            
	LEFT OUTER JOIN 
		categories CAT1 ON 
			SUBCATNAME.CATID = CAT1.CATID             
	WHERE 
		INV.QTYONHAND <= 0;

ELSE

	
	SELECT
		ITEMS.ID,
        ITEMS.CODE,
        ITEMS.DESCRIPTION,
        COALESCE(INV.QTYONHAND,0) AS STOCK,
        COALESCE(ONORDERSTAT.TOTORDERQTY,0) AS ONORDER, 
        ITEMS.MINLEVEL,
        COALESCE(DATE(ONORDERSTAT.ORDERDATE),'') AS LASTORDERED,
        COALESCE(DATE(SHIPSTAT.SHIPDATE),'') AS LASTSHIPPED,
        COALESCE(SUBCATNAME.NAME,'') AS L2CAT,
		COALESCE(SUBCATNAME1.NAME,'') AS L1CAT,
		COALESCE(CAT1.NAME,'') AS L0CAT        
	FROM
		items ITEMS
	INNER JOIN
		itemsInventory INV ON 
			ITEMS.ID = INV.ITEMID
	LEFT OUTER JOIN
		(SELECT ITEMID, SUM(ORDERQTY-SHIPTODATEQTY) AS TOTORDERQTY, MAX(ORDERDATE) AS ORDERDATE FROM orderHeader HDR INNER JOIN orderDetail DTL ON HDR.ORDERID = DTL.ORDERID WHERE ORDERSTATUS NOT IN ('WAITMA','CART') GROUP BY ITEMID) ONORDERSTAT ON
			ONORDERSTAT.ITEMID = ITEMS.ID   
	LEFT OUTER JOIN
		(SELECT ITEMID, MAX(SHIPDATE) AS SHIPDATE FROM orderHeader HDR INNER JOIN orderDetail DTL ON HDR.ORDERID = DTL.ORDERID INNER JOIN shipmentDetail SDTL ON DTL.ORDERID = SDTL.ORDERID AND DTL.ITEMLINE = SDTL.ORDERLINE INNER JOIN shipmentHeader SHDR ON SDTL.SHIPID = SHDR.SHIPID WHERE ORDERSTATUS NOT IN ('WAITMA','CART') GROUP BY ITEMID) SHIPSTAT ON
			SHIPSTAT.ITEMID = ITEMS.ID 
	LEFT OUTER JOIN 
		(SELECT ITEMID,MIN(SUBCATID) AS SUBCATID FROM itemsSubcategoryLink GROUP BY ITEMID) SUBCAT ON 
			ITEMS.ID = SUBCAT.ITEMID
	LEFT OUTER JOIN 
		subcategories SUBCATNAME ON 
			SUBCAT.SUBCATID = SUBCATNAME.SUBCATID
	LEFT OUTER JOIN 
		subcategories SUBCATNAME1 ON 
			SUBCATNAME.PARENTSUBCATID = SUBCATNAME1.SUBCATID            
	LEFT OUTER JOIN 
		categories CAT1 ON 
			SUBCATNAME.CATID = CAT1.CATID             
	WHERE 
		INV.QTYONHAND < ITEMS.MINLEVEL;

END IF;

END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetInventoryMovementHistory` */;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `GetInventoryMovementHistory`(IN `__STARTDATE` DATE, IN `__ENDDATE` DATE)
BEGIN
	SELECT
		ITEM.ID,
        ITEM.CODE,
        ITEM.DESCRIPTION,
        LOG.ADJID,
        LOG.QTY,
        CAST(LOG.ADJDATE AS DATE) AS ADJDATE,
        LOG.REASON
	FROM
		items ITEM
	INNER JOIN
		itemsAdjustmentLog LOG ON 
			ITEM.ID = LOG.ITEMID
	WHERE
		LOG.ADJDATE BETWEEN __STARTDATE AND DATE_ADD(__ENDDATE,INTERVAL 1 DAY) AND
            ITEM.TYPE = 0
	ORDER BY
		ITEM.ID,
        LOG.ADJDATE;
END ;;
DELIMITER ;
/*!50003 DROP PROCEDURE IF EXISTS `GetItemBranches` */;
