Add files via upload

This commit is contained in:
gopi17701 2018-08-23 13:21:08 -04:00 committed by GitHub
parent 9276f3c042
commit c01ebde767
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,18 +94,18 @@ CREATE TABLE IF NOT EXISTS `customer` (
`zip` int(5) DEFAULT NULL, `zip` int(5) DEFAULT NULL,
`zip_last_4` int(4) DEFAULT NULL, `zip_last_4` int(4) DEFAULT NULL,
`email` varchar(50) DEFAULT NULL, `email` varchar(50) DEFAULT NULL,
`phone` bigint(15) DEFAULT NULL, `phone` varchar(20) DEFAULT NULL,
`fax` bigint(15) DEFAULT NULL, `fax` varchar(20) DEFAULT NULL,
PRIMARY KEY (`customer_id`) PRIMARY KEY (`customer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping data for table astute.customer: ~3 rows (approximately) -- Dumping data for table astute.customer: ~4 rows (approximately)
/*!40000 ALTER TABLE `customer` DISABLE KEYS */; /*!40000 ALTER TABLE `customer` DISABLE KEYS */;
INSERT INTO `customer` (`customer_id`, `customer_name`, `bill_to_dept`, `add1`, `add2`, `city`, `state`, `zip`, `zip_last_4`, `email`, `phone`, `fax`) VALUES INSERT INTO `customer` (`customer_id`, `customer_name`, `bill_to_dept`, `add1`, `add2`, `city`, `state`, `zip`, `zip_last_4`, `email`, `phone`, `fax`) VALUES
('1', 'test4565', 'test123', 'test123', 'null', 'test123', 'md', 20874, 0, 'null', 0, 0), ('1', 'test4565', 'test123', 'test123', 'null', 'test123', 'md', 20874, 0, 'null', '123-123-1233', '123-123-1233'),
('2', 'test123', 'test123', 'test123', NULL, 'test123', 'md', 20874, 0, NULL, 0, 0), ('2', 'test123', 'test123', 'test123', NULL, 'test123', 'md', 20874, 0, NULL, '0', '0'),
('3', 'Hampton Road Transit', 'Accounts Payable', '3400 Victoria Blvd', '', 'Hampton', 'VA', 23661, 0, 'wcollins@hrtransit.org', 7572226000, 7572226000), ('3', 'Hampton Road Transit', 'Accounts Payable', '3400 Victoria Blvd', '', 'Hampton', 'VA', 23661, 0, 'wcollins@hrtransit.org', '7572226000', '7572226000'),
('test500', 'test500', 'test500', 'test500', 'test500', 'test500', 'md', 20874, 1234, 'Test@Test.com', 1231231233, 131231233); ('test500', 'test500', 'test500', 'test500', 'test500', 'test500', 'md', 20874, 1234, 'Test@Test.com', '1231231233', '131231233');
/*!40000 ALTER TABLE `customer` ENABLE KEYS */; /*!40000 ALTER TABLE `customer` ENABLE KEYS */;
-- Dumping structure for function astute.duplicate_invoice -- Dumping structure for function astute.duplicate_invoice
@ -189,6 +189,21 @@ BEGIN
END// END//
DELIMITER ; DELIMITER ;
-- Dumping structure for function astute.get_inv_remaining_qty_fun
DELIMITER //
CREATE DEFINER=`root`@`localhost` FUNCTION `get_inv_remaining_qty_fun`(inv_num_in varchar(40), item_no_in int) RETURNS double
BEGIN
DECLARE remaining_qty double;
DECLARE po_no varchar(40);
SELECT po_num INTO po_no FROM invoice where inv_no = inv_num_in;
select po_detail.qty - sum(invoice_detail.qty) into remaining_qty from invoice_detail, po_detail
where invoice_detail.inv_num in (select inv_num from invoice where invoice.PO_num = po_no)
and invoice_detail.line_item_num = item_no_in
and invoice_detail.line_item_num = po_detail.line_item_no;
return remaining_qty;
END//
DELIMITER ;
-- Dumping structure for function astute.get_payment_type -- Dumping structure for function astute.get_payment_type
DELIMITER // DELIMITER //
CREATE DEFINER=`root`@`localhost` FUNCTION `get_payment_type`(pmt_type int) RETURNS varchar(20) CHARSET utf8 CREATE DEFINER=`root`@`localhost` FUNCTION `get_payment_type`(pmt_type int) RETURNS varchar(20) CHARSET utf8
@ -237,7 +252,7 @@ CREATE TABLE IF NOT EXISTS `invoice` (
CONSTRAINT `fk_InvMaster_POnum` FOREIGN KEY (`PO_num`) REFERENCES `po` (`PO_num`) CONSTRAINT `fk_InvMaster_POnum` FOREIGN KEY (`PO_num`) REFERENCES `po` (`PO_num`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping data for table astute.invoice: ~3 rows (approximately) -- Dumping data for table astute.invoice: ~4 rows (approximately)
/*!40000 ALTER TABLE `invoice` DISABLE KEYS */; /*!40000 ALTER TABLE `invoice` DISABLE KEYS */;
INSERT INTO `invoice` (`inv_no`, `inv_date`, `PO_num`, `bill_amt`, `special_notes`, `certification`, `inv_status`, `pmt_status`) VALUES INSERT INTO `invoice` (`inv_no`, `inv_date`, `PO_num`, `bill_amt`, `special_notes`, `certification`, `inv_status`, `pmt_status`) VALUES
('123', '2018-01-01', 'EP2649247', 5000, 'asdf', 'Certified that the above items and rates are in accordance with the contractual agreement as verified by the undersigned.', 1, 1), ('123', '2018-01-01', 'EP2649247', 5000, 'asdf', 'Certified that the above items and rates are in accordance with the contractual agreement as verified by the undersigned.', 1, 1),
@ -373,15 +388,17 @@ CREATE TABLE IF NOT EXISTS `po` (
CONSTRAINT `po_customer_id_fk` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) CONSTRAINT `po_customer_id_fk` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping data for table astute.po: ~6 rows (approximately) -- Dumping data for table astute.po: ~8 rows (approximately)
/*!40000 ALTER TABLE `po` DISABLE KEYS */; /*!40000 ALTER TABLE `po` DISABLE KEYS */;
INSERT INTO `po` (`PO_num`, `contract_num`, `PO_date`, `contract_amt`, `customer_id`, `astute_project_num`, `po_id`, `title`) VALUES INSERT INTO `po` (`PO_num`, `contract_num`, `PO_date`, `contract_amt`, `customer_id`, `astute_project_num`, `po_id`, `title`) VALUES
('EP2649247', 'test123', NULL, 30000.00, '1', 'null', 1, 'SO Dummy Title for Test123'), ('ABC1234', 'ABC1234', '2018-08-23', 50000.00, '3', 'ABC1234', 2, 'new from HRT'),
('HRT-16-72046', '16-72046', NULL, 23360.00, '3', 'HRT-01-01', 1, 'SO Dummy Title for 16-72046 adding upto 200 characters ****************************'), ('EP2649247', 'test123', '2018-08-19', 30000.00, '1', 'null', 1, 'null'),
('HRT-16-72046', '16-72046', '2018-08-07', 23360.00, '3', 'HRT-01-01', 1, 'SO Dummy Title for 16-72046 '),
('test12', 'test', '2018-07-11', 60000.00, '1', 'adf', 2, 'SO Dummy Title for test'), ('test12', 'test', '2018-07-11', 60000.00, '1', 'adf', 2, 'SO Dummy Title for test'),
('test3', 'test', '2018-07-12', 60000.00, '1', 'adf', 3, 'SO Dummy Title for test'), ('test3', 'test', '2018-07-12', 60000.00, '1', 'adf', 3, 'SO Dummy Title for test'),
('test5', 'test', '2018-07-13', 60000.00, '1', 'adf', 4, 'SO Dummy Title for test'), ('test5', 'test', '2018-07-13', 60000.00, '1', 'adf', 4, 'SO Dummy Title for test'),
('test500', 'test', NULL, 60000.00, 'Test500', 'test', 1, 'SO Dummy Title for test'); ('test500', 'test', '2018-08-13', 60000.00, 'Test500', 'test', 1, 'SO Dummy Title for test'),
('test55', 'test', '2018-01-12', 60000.00, '1', 'test', 5, NULL);
/*!40000 ALTER TABLE `po` ENABLE KEYS */; /*!40000 ALTER TABLE `po` ENABLE KEYS */;
-- Dumping structure for table astute.po_detail -- Dumping structure for table astute.po_detail