mirror of
https://github.com/dyiop/astute.git
synced 2025-04-05 21:10:16 -04:00
Add files via upload
This commit is contained in:
parent
c1f6a0171a
commit
5b2e5d422e
|
@ -34,7 +34,7 @@ CREATE TABLE IF NOT EXISTS `change_order` (
|
|||
|
||||
-- Dumping structure for function astute.create_customer_fun
|
||||
DELIMITER //
|
||||
CREATE DEFINER=`root`@`localhost` FUNCTION `create_customer_fun`(customerid varchar(20), customerName varchar(100), billToDept varchar(100), add1In varchar(100), add2In varchar(100), cityIn varchar(50), stateIn varchar(20), zipIn int(5), zipLast4In int(4), emailIn varchar(50), phoneIn int(10), faxIn int(10)) RETURNS varchar(20) CHARSET utf8
|
||||
CREATE DEFINER=`root`@`localhost` FUNCTION `create_customer_fun`(customerid varchar(20), customerName varchar(100), billToDept varchar(100), add1In varchar(100), add2In varchar(100), cityIn varchar(50), stateIn varchar(20), zipIn int(5), zipLast4In int(4), emailIn varchar(50), phoneIn int(15), faxIn int(15)) RETURNS varchar(20) CHARSET utf8
|
||||
BEGIN
|
||||
DECLARE last_inserted_id varchar(20);
|
||||
INSERT INTO customer (customer_id, customer_name, bill_to_dept, add1, add2, city, state ,zip, zip_last_4, email, phone, fax)
|
||||
|
@ -55,21 +55,21 @@ DELIMITER ;
|
|||
|
||||
-- Dumping structure for procedure astute.create_invoice_detail
|
||||
DELIMITER //
|
||||
CREATE DEFINER=`root`@`localhost` PROCEDURE `create_invoice_detail`(invoiceNum varchar(20), lineItemNum int, POLineItemNum varchar(20), serviceTypeId int, description varchar(500), qty_in double, fee_in double)
|
||||
CREATE DEFINER=`root`@`localhost` PROCEDURE `create_invoice_detail`(invoiceNum varchar(20), lineItemNum int, POLineItemNum varchar(20), serviceTypeId int, description varchar(500), qty_in double, fee_in double, fee_type_id_in int)
|
||||
BEGIN
|
||||
INSERT INTO INVOICE_DETAIL (inv_num, line_item_num, PO_line_item_num, service_type_id, description, qty, fee)
|
||||
VALUES (invoiceNum, lineItemNum, POLineItemNum, serviceTypeId, description, qty_in, fee_in);
|
||||
INSERT INTO INVOICE_DETAIL (inv_num, line_item_num, PO_line_item_num, service_type_id, description, qty, fee, fee_type_id)
|
||||
VALUES (invoiceNum, lineItemNum, POLineItemNum, serviceTypeId, description, qty_in, fee_in, fee_type_id_in);
|
||||
END//
|
||||
DELIMITER ;
|
||||
|
||||
-- Dumping structure for procedure astute.create_po
|
||||
DELIMITER //
|
||||
CREATE DEFINER=`root`@`localhost` PROCEDURE `create_po`(PONum varchar(40), contractNum varchar(20), PODate date, contractAmt double(10,2), customerid varchar(20), astute_project_num_in varchar(20))
|
||||
CREATE DEFINER=`root`@`localhost` PROCEDURE `create_po`(PONum varchar(40), contractNum varchar(20), PODate date, contractAmt double(10,2), customerid varchar(20), astute_project_num_in varchar(20), title_in varchar(200))
|
||||
BEGIN
|
||||
DECLARE next_po_id int(11);
|
||||
SELECT count(*) + 1 INTO next_po_id FROM PO WHERE customer_id = customerid;
|
||||
INSERT INTO PO (po_id, PO_num, contract_num, PO_date, contract_amt, customer_id,astute_project_num)
|
||||
VALUES (next_po_id, PONum, contractNum, PODate, contractAmt, customerId,astute_project_num_in);
|
||||
INSERT INTO PO (po_id, PO_num, contract_num, PO_date, contract_amt, customer_id,astute_project_num, title )
|
||||
VALUES (next_po_id, PONum, contractNum, PODate, contractAmt, customerId,astute_project_num_in, title_in);
|
||||
END//
|
||||
DELIMITER ;
|
||||
|
||||
|
@ -99,7 +99,7 @@ CREATE TABLE IF NOT EXISTS `customer` (
|
|||
PRIMARY KEY (`customer_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- Dumping data for table astute.customer: ~4 rows (approximately)
|
||||
-- Dumping data for table astute.customer: ~3 rows (approximately)
|
||||
/*!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
|
||||
('1', 'test4565', 'test123', 'test123', 'null', 'test123', 'md', 20874, 0, 'null', 0, 0),
|
||||
|
@ -237,7 +237,7 @@ CREATE TABLE IF NOT EXISTS `invoice` (
|
|||
CONSTRAINT `fk_InvMaster_POnum` FOREIGN KEY (`PO_num`) REFERENCES `po` (`PO_num`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- Dumping data for table astute.invoice: ~4 rows (approximately)
|
||||
-- Dumping data for table astute.invoice: ~3 rows (approximately)
|
||||
/*!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
|
||||
('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),
|
||||
|
@ -365,6 +365,7 @@ CREATE TABLE IF NOT EXISTS `po` (
|
|||
`customer_id` varchar(11) NOT NULL,
|
||||
`astute_project_num` varchar(20) NOT NULL,
|
||||
`po_id` int(11) NOT NULL,
|
||||
`title` varchar(200) DEFAULT NULL,
|
||||
PRIMARY KEY (`PO_num`),
|
||||
KEY `ind_pomaster_contractno` (`contract_num`),
|
||||
KEY `ind_pomaster_podate` (`PO_date`),
|
||||
|
@ -401,13 +402,13 @@ CREATE TABLE IF NOT EXISTS `po_detail` (
|
|||
|
||||
-- Dumping data for table astute.po_detail: ~6 rows (approximately)
|
||||
/*!40000 ALTER TABLE `po_detail` DISABLE KEYS */;
|
||||
INSERT INTO `po_detail` (`PO_num`, `line_item_no`, `service_desc`, `fee_type_id`, `qty`, `service_type_id`, `fee`, `remaining_qty`, `title`) VALUES
|
||||
('EP2649247', 1, 'test', 2, 38073, 1, NULL, NULL, NULL),
|
||||
('EP2649247', 2, 'test', 2, 16345, 1, NULL, NULL, NULL),
|
||||
('EP2649247', 3, 'test', 2, 4642, 2, NULL, NULL, NULL),
|
||||
('EP2649247', 4, 'test', 2, 880, 4, NULL, NULL, NULL),
|
||||
('EP2649247', 6, 'test', 2, 456, 1, NULL, NULL, NULL),
|
||||
('EP2649247', 16, 'test', 1, 1555, 1, NULL, NULL, NULL);
|
||||
INSERT INTO `po_detail` (`PO_num`, `line_item_no`, `service_desc`, `fee_type_id`, `qty`, `service_type_id`, `fee`, `remaining_qty`) VALUES
|
||||
('EP2649247', 1, 'test', 2, 38073, 1, NULL, NULL),
|
||||
('EP2649247', 2, 'test', 2, 16345, 1, NULL, NULL),
|
||||
('EP2649247', 3, 'test', 2, 4642, 2, NULL, NULL),
|
||||
('EP2649247', 4, 'test', 2, 880, 4, NULL, NULL),
|
||||
('EP2649247', 6, 'test', 2, 456, 1, NULL, NULL),
|
||||
('EP2649247', 16, 'test', 1, 1555, 1, NULL, NULL);
|
||||
/*!40000 ALTER TABLE `po_detail` ENABLE KEYS */;
|
||||
|
||||
-- Dumping structure for table astute.service_type
|
||||
|
|
Loading…
Reference in New Issue
Block a user