From 66a99b1a3040214895c43380ba39baa35d483d3c Mon Sep 17 00:00:00 2001 From: gopi17701 <41270090+gopi17701@users.noreply.github.com> Date: Wed, 22 Aug 2018 17:28:49 -0400 Subject: [PATCH 1/9] Add files via upload --- .../src/main/java/com/astute/dao/astute.sql | 474 ++++++++++++++++++ 1 file changed, 474 insertions(+) create mode 100644 AstuteSystem/src/main/java/com/astute/dao/astute.sql diff --git a/AstuteSystem/src/main/java/com/astute/dao/astute.sql b/AstuteSystem/src/main/java/com/astute/dao/astute.sql new file mode 100644 index 0000000..e8f673e --- /dev/null +++ b/AstuteSystem/src/main/java/com/astute/dao/astute.sql @@ -0,0 +1,474 @@ +-- -------------------------------------------------------- +-- Host: 127.0.0.1 +-- Server version: 5.7.12-log - MySQL Community Server (GPL) +-- Server OS: Win64 +-- HeidiSQL Version: 9.4.0.5125 +-- -------------------------------------------------------- + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET NAMES utf8 */; +/*!50503 SET NAMES utf8mb4 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; + + +-- Dumping database structure for astute +DROP DATABASE IF EXISTS `astute`; +CREATE DATABASE IF NOT EXISTS `astute` /*!40100 DEFAULT CHARACTER SET utf8 */; +USE `astute`; + +-- Dumping structure for table astute.change_order +CREATE TABLE IF NOT EXISTS `change_order` ( + `PO_num` varchar(20) NOT NULL, + `change_order_num` int(20) NOT NULL, + `change_order_date` date DEFAULT NULL, + `change_order_amt` double NOT NULL, + `description` varchar(500) DEFAULT NULL, + PRIMARY KEY (`PO_num`,`change_order_num`), + CONSTRAINT `fk_PO_CO_POnum` FOREIGN KEY (`PO_num`) REFERENCES `po` (`PO_num`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- Dumping data for table astute.change_order: ~0 rows (approximately) +/*!40000 ALTER TABLE `change_order` DISABLE KEYS */; +/*!40000 ALTER TABLE `change_order` ENABLE KEYS */; + +-- 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(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) +VALUES (customerid, customerName, billToDept, add1In, add2In, cityIn, stateIn, zipIn, ziplast4In, emailIn, phoneIn, faxIn); +SELECT LAST_INSERT_ID() into last_inserted_id; +return last_inserted_id; +END// +DELIMITER ; + +-- Dumping structure for procedure astute.create_invoice +DELIMITER // +CREATE DEFINER=`root`@`localhost` PROCEDURE `create_invoice`(invNo varchar(20),invDate date,PONo varchar(20),paymentStatus int,billAmt double,specialNotes varchar(500), certClause Varchar(500), invoiceStatus int) +BEGIN +INSERT INTO invoice (inv_no,inv_date,PO_num,pmt_status,bill_amt,special_notes,certification,inv_status) +VALUES (invNo, invDate, PONo, paymentStatus, billAmt, specialNotes, certClause, invoiceStatus); +END// +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, 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, 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), 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, title ) +VALUES (next_po_id, PONum, contractNum, PODate, contractAmt, customerId,astute_project_num_in, title_in); +END// +DELIMITER ; + +-- Dumping structure for procedure astute.create_po_detail +DELIMITER // +CREATE DEFINER=`root`@`localhost` PROCEDURE `create_po_detail`(PONum varchar(40), lineItemNo int, servicedesc varchar(500), feetypeid int(11), quantity double, fee_in double, servicetypeid int(1)) +BEGIN +INSERT INTO PO_DETAIL (PO_num,line_item_no,service_desc,fee_type_id,qty,fee,service_type_id) +VALUES (POnum,lineitemno,servicedesc,feetypeid,quantity,fee_in, servicetypeid); +END// +DELIMITER ; + +-- Dumping structure for table astute.customer +CREATE TABLE IF NOT EXISTS `customer` ( + `customer_id` varchar(10) NOT NULL, + `customer_name` varchar(100) DEFAULT NULL, + `bill_to_dept` varchar(50) DEFAULT NULL, + `add1` varchar(50) DEFAULT NULL, + `add2` varchar(50) DEFAULT NULL, + `city` varchar(50) DEFAULT NULL, + `state` varchar(2) DEFAULT NULL, + `zip` int(5) DEFAULT NULL, + `zip_last_4` int(4) DEFAULT NULL, + `email` varchar(50) DEFAULT NULL, + `phone` bigint(15) DEFAULT NULL, + `fax` bigint(15) DEFAULT NULL, + PRIMARY KEY (`customer_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- 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), + ('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), + ('test500', 'test500', 'test500', 'test500', 'test500', 'test500', 'md', 20874, 1234, 'Test@Test.com', 1231231233, 131231233); +/*!40000 ALTER TABLE `customer` ENABLE KEYS */; + +-- Dumping structure for function astute.duplicate_invoice +DELIMITER // +CREATE DEFINER=`root`@`localhost` FUNCTION `duplicate_invoice`(inv_no_in varchar(20)) RETURNS varchar(20) CHARSET utf8 +BEGIN + DECLARE generated_inv_number varchar(20); + DECLARE po_num_in varchar(20); + + SELECT po_num + INTO po_num_in + FROM invoice + WHERE inv_no = inv_no_in; + + SELECT generate_inv_number(po_num_in) + INTO generated_inv_number; + + INSERT INTO invoice + (inv_no,inv_date,PO_num,change_order_num,bill_amt,special_notes,certification,inv_status,pmt_status) + (SELECT generated_inv_number, inv_date, PO_num, change_order_num, bill_amt, special_notes, certification, inv_status, pmt_status + FROM invoice + WHERE inv_no = inv_no_in); + + INSERT INTO invoice_detail + (inv_num,line_item_num,PO_line_item_num,service_type_id,description,qty,fee,fee_type_id) + (SELECT generated_inv_number, line_item_num, PO_line_item_num, service_type_id, description, qty, fee, fee_type_id + FROM invoice_detail + WHERE inv_num = inv_no_in); + + return generated_inv_number; + +END// +DELIMITER ; + +-- Dumping structure for table astute.fee_type +CREATE TABLE IF NOT EXISTS `fee_type` ( + `fee_type_id` int(11) NOT NULL, + `fee_type_desc` varchar(40) NOT NULL, + PRIMARY KEY (`fee_type_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- Dumping data for table astute.fee_type: ~2 rows (approximately) +/*!40000 ALTER TABLE `fee_type` DISABLE KEYS */; +INSERT INTO `fee_type` (`fee_type_id`, `fee_type_desc`) VALUES + (1, 'Fixed fee'), + (2, 'Hourly'); +/*!40000 ALTER TABLE `fee_type` ENABLE KEYS */; + +-- Dumping structure for function astute.generate_inv_number +DELIMITER // +CREATE DEFINER=`root`@`localhost` FUNCTION `generate_inv_number`(po_num_in varchar(20)) RETURNS varchar(20) CHARSET utf8 +BEGIN + DECLARE customer_id_in int; + DECLARE customer_code varchar(4); + DECLARE po_count int; + DECLARE inv_count int; + DECLARE inv_number varchar(20); + + SELECT customer_id + INTO customer_id_in + FROM po + WHERE po.po_num = po_num_in; + + SELECT substr(customer.customer_name, 1, 4) + INTO customer_code + FROM customer + WHERE customer_id = customer_id_in; + + SELECT po_id + INTO po_count + FROM po + WHERE PO_num = po_num_in; + + SELECT count(*) + 1 + INTO inv_count + FROM invoice + WHERE invoice.PO_num = po_num_in; + SELECT concat(customer_code, '-',LPAD(po_count, 2, '0'), '_',date_format(now(),'%y'), date_format(now(),'%m'), '_', LPAD(inv_count, 2, '0')) INTO inv_number; + RETURN inv_number; + +END// +DELIMITER ; + +-- Dumping structure for function astute.get_payment_type +DELIMITER // +CREATE DEFINER=`root`@`localhost` FUNCTION `get_payment_type`(pmt_type int) RETURNS varchar(20) CHARSET utf8 +BEGIN + declare payment_type VARCHAR(20); + SELECT payment_type_name INTO payment_type FROM payment_type WHERE payment_type_id = pmt_type; + return payment_type; +END// +DELIMITER ; + +-- Dumping structure for function astute.get_previously_billed_amt +DELIMITER // +CREATE DEFINER=`root`@`localhost` FUNCTION `get_previously_billed_amt`(po_no varchar(20)) RETURNS double(10,2) +BEGIN + declare billed_amt double(10,2); + SELECT sum(bill_amt) INTO billed_amt FROM invoice WHERE invoice.PO_num = po_no; + return billed_amt; +END// +DELIMITER ; + +-- Dumping structure for function astute.get_remaining_qty_fun +DELIMITER // +CREATE DEFINER=`root`@`localhost` FUNCTION `get_remaining_qty_fun`(po_num_in varchar(40), item_no_in int) RETURNS double +BEGIN +DECLARE remaining_qty double; +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_num_in) +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 table astute.invoice +CREATE TABLE IF NOT EXISTS `invoice` ( + `inv_no` varchar(20) NOT NULL, + `inv_date` date NOT NULL, + `PO_num` varchar(40) NOT NULL, + `bill_amt` double NOT NULL, + `special_notes` varchar(500) DEFAULT NULL, + `certification` varchar(500) DEFAULT 'Certified that the above items and rates are in accordance with the contractual agreement as verified by the undersigned.', + `inv_status` int(2) DEFAULT '1', + `pmt_status` int(11) NOT NULL DEFAULT '1', + PRIMARY KEY (`inv_no`), + KEY `fk_InvMaster_POnum` (`PO_num`), + CONSTRAINT `fk_InvMaster_POnum` FOREIGN KEY (`PO_num`) REFERENCES `po` (`PO_num`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- 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), + ('NVCC-01_1712_21', '2017-12-28', 'EP2649247', 16854, '1. Completion of Phase 1 - Preliminaries\r\n2. Invoice not submitted to NVCC. For submitted invoice, see Excel copy\r\n', 'Certified that the above items and rates are in accordance with the contractual agreement as verified by the undersigned.', 1, 1), + ('test-04_1807_02', '2017-12-28', 'EP2649247', 16854, '1. Completion of Phase 1 - Preliminaries\r\n2. Invoice not submitted to NVCC. For submitted invoice, see Excel copy\r\n', 'Certified that the above items and rates are in accordance with the contractual agreement as verified by the undersigned.', 1, 1), + ('test10', '2017-12-28', 'EP2649247', 16854, '1. Completion of Phase 1 - Preliminaries\r\n2. Invoice not submitted to NVCC. For submitted invoice, see Excel copy\r\n', 'Certification: Certified that the above items and rates are in accordnace with the contractual aggrement as verified by the undersigned', 1, 1); +/*!40000 ALTER TABLE `invoice` ENABLE KEYS */; + +-- Dumping structure for table astute.invoice_detail +CREATE TABLE IF NOT EXISTS `invoice_detail` ( + `inv_num` varchar(20) NOT NULL, + `line_item_num` int(11) NOT NULL, + `PO_line_item_num` int(11) DEFAULT NULL, + `service_type_id` int(11) DEFAULT NULL, + `description` varchar(500) DEFAULT NULL, + `qty` double DEFAULT NULL, + `fee` double DEFAULT NULL, + `fee_type_id` int(11) DEFAULT NULL, + PRIMARY KEY (`inv_num`,`line_item_num`), + KEY `fk_InvDetail_FeeType` (`fee_type_id`), + CONSTRAINT `fk_InvDetail_FeeType` FOREIGN KEY (`fee_type_id`) REFERENCES `fee_type` (`fee_type_id`), + CONSTRAINT `fk_InvDetail_InvNum` FOREIGN KEY (`inv_num`) REFERENCES `invoice` (`inv_no`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- Dumping data for table astute.invoice_detail: ~13 rows (approximately) +/*!40000 ALTER TABLE `invoice_detail` DISABLE KEYS */; +INSERT INTO `invoice_detail` (`inv_num`, `line_item_num`, `PO_line_item_num`, `service_type_id`, `description`, `qty`, `fee`, `fee_type_id`) VALUES + ('123', 1, NULL, 1, 'tese', 34543, 345435, 1), + ('NVCC-01_1712_21', 1, 1, NULL, 'test', NULL, 14953, 1), + ('NVCC-01_1712_21', 2, 3, NULL, 'Additional Services: Third Party Utility Verification', NULL, 1500, 1), + ('NVCC-01_1712_21', 3, 3, NULL, 'Additional Services: Field Investigatoin Travel', NULL, 321, 1), + ('NVCC-01_1712_21', 4, 4, NULL, 'Reimbursable Expense: Printing and parking', NULL, 80, 1), + ('NVCC-01_1712_21', 10, 1, 0, 'Design Phase Service _Prelimanary', 0, 14953, 1), + ('NVCC-01_1712_21', 11, 1, 0, 'Design Phase Service _Prelimanary', 0, 14953, 1), + ('test-04_1807_02', 1, 1, NULL, 'test', NULL, 14953, 1), + ('test-04_1807_02', 2, 3, NULL, 'Additional Services: Third Party Utility Verification', NULL, 1500, 1), + ('test-04_1807_02', 3, 3, NULL, 'Additional Services: Field Investigatoin Travel', NULL, 321, 1), + ('test-04_1807_02', 4, 4, NULL, 'Reimbursable Expense: Printing and parking', NULL, 80, 1), + ('test-04_1807_02', 10, 1, 0, 'Design Phase Service _Prelimanary', 0, 14953, 1), + ('test-04_1807_02', 11, 1, 0, 'Design Phase Service _Prelimanary', 0, 14953, 1); +/*!40000 ALTER TABLE `invoice_detail` ENABLE KEYS */; + +-- Dumping structure for table astute.invoice_notes +CREATE TABLE IF NOT EXISTS `invoice_notes` ( + `inv_no` varchar(20) NOT NULL, + `inv_note` varchar(500) NOT NULL, + PRIMARY KEY (`inv_no`), + CONSTRAINT `fk_inv_notes_inv_no` FOREIGN KEY (`inv_no`) REFERENCES `invoice` (`inv_no`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- Dumping data for table astute.invoice_notes: ~0 rows (approximately) +/*!40000 ALTER TABLE `invoice_notes` DISABLE KEYS */; +/*!40000 ALTER TABLE `invoice_notes` ENABLE KEYS */; + +-- Dumping structure for table astute.invoice_payment +CREATE TABLE IF NOT EXISTS `invoice_payment` ( + `inv_no` varchar(20) NOT NULL, + `invoice_payment_type` int(11) NOT NULL, + `invoice_amount` double NOT NULL, + `payment_date` date NOT NULL, + `invoice_payment_id` int(11) NOT NULL AUTO_INCREMENT, + `description` varchar(50) DEFAULT NULL, + PRIMARY KEY (`invoice_payment_id`), + KEY `fk_inv_pmt_inv_no` (`inv_no`), + KEY `fk_pinv_pmt_type` (`invoice_payment_type`), + CONSTRAINT `fk_inv_pmt_inv_no` FOREIGN KEY (`inv_no`) REFERENCES `invoice` (`inv_no`), + CONSTRAINT `fk_pinv_pmt_type` FOREIGN KEY (`invoice_payment_type`) REFERENCES `payment_type` (`payment_type_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- Dumping data for table astute.invoice_payment: ~0 rows (approximately) +/*!40000 ALTER TABLE `invoice_payment` DISABLE KEYS */; +/*!40000 ALTER TABLE `invoice_payment` ENABLE KEYS */; + +-- Dumping structure for table astute.invoice_status +CREATE TABLE IF NOT EXISTS `invoice_status` ( + `inv_status_id` int(11) NOT NULL, + `inv_status_desc` varchar(20) NOT NULL, + PRIMARY KEY (`inv_status_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- Dumping data for table astute.invoice_status: ~3 rows (approximately) +/*!40000 ALTER TABLE `invoice_status` DISABLE KEYS */; +INSERT INTO `invoice_status` (`inv_status_id`, `inv_status_desc`) VALUES + (1, 'Draft'), + (2, 'Submitted'), + (3, 'Void'); +/*!40000 ALTER TABLE `invoice_status` ENABLE KEYS */; + +-- Dumping structure for table astute.payment_status +CREATE TABLE IF NOT EXISTS `payment_status` ( + `payment_status_id` int(11) NOT NULL, + `payment_status_desc` varchar(20) NOT NULL, + PRIMARY KEY (`payment_status_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- Dumping data for table astute.payment_status: ~3 rows (approximately) +/*!40000 ALTER TABLE `payment_status` DISABLE KEYS */; +INSERT INTO `payment_status` (`payment_status_id`, `payment_status_desc`) VALUES + (1, 'Outstanding'), + (2, 'Partially paid'), + (3, 'Paid'); +/*!40000 ALTER TABLE `payment_status` ENABLE KEYS */; + +-- Dumping structure for table astute.payment_type +CREATE TABLE IF NOT EXISTS `payment_type` ( + `payment_type_id` int(11) NOT NULL, + `payment_type_name` varchar(20) NOT NULL, + PRIMARY KEY (`payment_type_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- Dumping data for table astute.payment_type: ~3 rows (approximately) +/*!40000 ALTER TABLE `payment_type` DISABLE KEYS */; +INSERT INTO `payment_type` (`payment_type_id`, `payment_type_name`) VALUES + (1, 'Credit Card'), + (2, 'Check'), + (3, 'ACH'); +/*!40000 ALTER TABLE `payment_type` ENABLE KEYS */; + +-- Dumping structure for table astute.po +CREATE TABLE IF NOT EXISTS `po` ( + `PO_num` varchar(40) NOT NULL COMMENT 'Alpha numeric, auto generated in frontend', + `contract_num` varchar(20) DEFAULT NULL, + `PO_date` date DEFAULT NULL, + `contract_amt` double(10,2) DEFAULT NULL, + `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`), + KEY `po_customer_id` (`customer_id`), + CONSTRAINT `po_customer_id_fk` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- Dumping data for table astute.po: ~6 rows (approximately) +/*!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 + ('EP2649247', 'test123', NULL, 30000.00, '1', 'null', 1, 'SO Dummy Title for Test123'), + ('HRT-16-72046', '16-72046', NULL, 23360.00, '3', 'HRT-01-01', 1, 'SO Dummy Title for 16-72046 adding upto 200 characters ****************************'), + ('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'), + ('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'); +/*!40000 ALTER TABLE `po` ENABLE KEYS */; + +-- Dumping structure for table astute.po_detail +CREATE TABLE IF NOT EXISTS `po_detail` ( + `PO_num` varchar(40) NOT NULL, + `line_item_no` int(11) NOT NULL, + `service_desc` varchar(500) DEFAULT NULL, + `fee_type_id` int(11) DEFAULT '1' COMMENT '1-fixed fee, 2-hourly', + `qty` double DEFAULT NULL, + `service_type_id` int(1) DEFAULT '1' COMMENT '1-studies, 2-supplemental service, 3-out of pocket, 4-reimbursement, 5-', + `fee` double DEFAULT NULL, + `remaining_qty` double DEFAULT NULL, + PRIMARY KEY (`PO_num`,`line_item_no`), + KEY `fk_PODetail_ServType` (`service_type_id`), + CONSTRAINT `fk_PODetail_POnum` FOREIGN KEY (`PO_num`) REFERENCES `po` (`PO_num`), + CONSTRAINT `fk_PODetail_ServType` FOREIGN KEY (`service_type_id`) REFERENCES `service_type` (`service_type_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- 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`) 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 +CREATE TABLE IF NOT EXISTS `service_type` ( + `service_type_id` int(11) NOT NULL, + `desc` varchar(40) NOT NULL, + PRIMARY KEY (`service_type_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- Dumping data for table astute.service_type: ~5 rows (approximately) +/*!40000 ALTER TABLE `service_type` DISABLE KEYS */; +INSERT INTO `service_type` (`service_type_id`, `desc`) VALUES + (1, 'study'), + (2, 'design'), + (3, 'Peer review'), + (4, 'cost estimation'), + (5, 'forensic investigation'); +/*!40000 ALTER TABLE `service_type` ENABLE KEYS */; + +-- Dumping structure for table astute.session +CREATE TABLE IF NOT EXISTS `session` ( + `session_id` varchar(200) NOT NULL, + `user_id` int(11) NOT NULL, + `session_start_date` date DEFAULT NULL, + `session_end_date` date DEFAULT NULL, + PRIMARY KEY (`session_id`), + KEY `fk_session_user_id` (`user_id`), + CONSTRAINT `fk_session_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- Dumping data for table astute.session: ~3 rows (approximately) +/*!40000 ALTER TABLE `session` DISABLE KEYS */; +INSERT INTO `session` (`session_id`, `user_id`, `session_start_date`, `session_end_date`) VALUES + ('745de7a0e6c1480398ca36116512bc06', 1, NULL, NULL), + ('985874e08cb74fa08419f8883f3eeff7', 1, NULL, NULL), + ('a4b6bde153004b7ba17220f5ba2bb323', 1, NULL, NULL); +/*!40000 ALTER TABLE `session` ENABLE KEYS */; + +-- Dumping structure for table astute.user +CREATE TABLE IF NOT EXISTS `user` ( + `user_id` int(5) NOT NULL, + `username` varchar(20) DEFAULT NULL, + `password` varchar(20) DEFAULT NULL, + `first_name` varchar(20) DEFAULT NULL, + `middle_name` varchar(20) DEFAULT NULL, + `last_name` varchar(20) DEFAULT NULL, + `role` varchar(20) DEFAULT NULL, + `email` varchar(40) DEFAULT NULL, + `office_phone_ext` int(3) DEFAULT NULL, + `cell_phone` bigint(20) DEFAULT NULL, + PRIMARY KEY (`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- Dumping data for table astute.user: ~2 rows (approximately) +/*!40000 ALTER TABLE `user` DISABLE KEYS */; +INSERT INTO `user` (`user_id`, `username`, `password`, `first_name`, `middle_name`, `last_name`, `role`, `email`, `office_phone_ext`, `cell_phone`) VALUES + (1, 'sparikh', 'sparikh', 'Saurin', NULL, 'Parikh', 'Owner', 'sparikh@Astuteng.com', 2024002004, 3014616485), + (2, 'humarethiya', 'humarethiya', 'Haresh', NULL, 'Umaretiya', 'Owner', 'Humaretiya@astuteng.com', 2024002004, 0); +/*!40000 ALTER TABLE `user` ENABLE KEYS */; + +/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */; +/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; From 6250697684cc77df7e24a1e1e892600367221bb4 Mon Sep 17 00:00:00 2001 From: gopi17701 <41270090+gopi17701@users.noreply.github.com> Date: Wed, 22 Aug 2018 17:29:29 -0400 Subject: [PATCH 2/9] Delete astute.sql --- .../src/main/java/com/astute/dao/astute.sql | 474 ------------------ 1 file changed, 474 deletions(-) delete mode 100644 AstuteSystem/src/main/java/com/astute/dao/astute.sql diff --git a/AstuteSystem/src/main/java/com/astute/dao/astute.sql b/AstuteSystem/src/main/java/com/astute/dao/astute.sql deleted file mode 100644 index e8f673e..0000000 --- a/AstuteSystem/src/main/java/com/astute/dao/astute.sql +++ /dev/null @@ -1,474 +0,0 @@ --- -------------------------------------------------------- --- Host: 127.0.0.1 --- Server version: 5.7.12-log - MySQL Community Server (GPL) --- Server OS: Win64 --- HeidiSQL Version: 9.4.0.5125 --- -------------------------------------------------------- - -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET NAMES utf8 */; -/*!50503 SET NAMES utf8mb4 */; -/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; -/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; - - --- Dumping database structure for astute -DROP DATABASE IF EXISTS `astute`; -CREATE DATABASE IF NOT EXISTS `astute` /*!40100 DEFAULT CHARACTER SET utf8 */; -USE `astute`; - --- Dumping structure for table astute.change_order -CREATE TABLE IF NOT EXISTS `change_order` ( - `PO_num` varchar(20) NOT NULL, - `change_order_num` int(20) NOT NULL, - `change_order_date` date DEFAULT NULL, - `change_order_amt` double NOT NULL, - `description` varchar(500) DEFAULT NULL, - PRIMARY KEY (`PO_num`,`change_order_num`), - CONSTRAINT `fk_PO_CO_POnum` FOREIGN KEY (`PO_num`) REFERENCES `po` (`PO_num`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- Dumping data for table astute.change_order: ~0 rows (approximately) -/*!40000 ALTER TABLE `change_order` DISABLE KEYS */; -/*!40000 ALTER TABLE `change_order` ENABLE KEYS */; - --- 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(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) -VALUES (customerid, customerName, billToDept, add1In, add2In, cityIn, stateIn, zipIn, ziplast4In, emailIn, phoneIn, faxIn); -SELECT LAST_INSERT_ID() into last_inserted_id; -return last_inserted_id; -END// -DELIMITER ; - --- Dumping structure for procedure astute.create_invoice -DELIMITER // -CREATE DEFINER=`root`@`localhost` PROCEDURE `create_invoice`(invNo varchar(20),invDate date,PONo varchar(20),paymentStatus int,billAmt double,specialNotes varchar(500), certClause Varchar(500), invoiceStatus int) -BEGIN -INSERT INTO invoice (inv_no,inv_date,PO_num,pmt_status,bill_amt,special_notes,certification,inv_status) -VALUES (invNo, invDate, PONo, paymentStatus, billAmt, specialNotes, certClause, invoiceStatus); -END// -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, 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, 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), 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, title ) -VALUES (next_po_id, PONum, contractNum, PODate, contractAmt, customerId,astute_project_num_in, title_in); -END// -DELIMITER ; - --- Dumping structure for procedure astute.create_po_detail -DELIMITER // -CREATE DEFINER=`root`@`localhost` PROCEDURE `create_po_detail`(PONum varchar(40), lineItemNo int, servicedesc varchar(500), feetypeid int(11), quantity double, fee_in double, servicetypeid int(1)) -BEGIN -INSERT INTO PO_DETAIL (PO_num,line_item_no,service_desc,fee_type_id,qty,fee,service_type_id) -VALUES (POnum,lineitemno,servicedesc,feetypeid,quantity,fee_in, servicetypeid); -END// -DELIMITER ; - --- Dumping structure for table astute.customer -CREATE TABLE IF NOT EXISTS `customer` ( - `customer_id` varchar(10) NOT NULL, - `customer_name` varchar(100) DEFAULT NULL, - `bill_to_dept` varchar(50) DEFAULT NULL, - `add1` varchar(50) DEFAULT NULL, - `add2` varchar(50) DEFAULT NULL, - `city` varchar(50) DEFAULT NULL, - `state` varchar(2) DEFAULT NULL, - `zip` int(5) DEFAULT NULL, - `zip_last_4` int(4) DEFAULT NULL, - `email` varchar(50) DEFAULT NULL, - `phone` bigint(15) DEFAULT NULL, - `fax` bigint(15) DEFAULT NULL, - PRIMARY KEY (`customer_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- 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), - ('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), - ('test500', 'test500', 'test500', 'test500', 'test500', 'test500', 'md', 20874, 1234, 'Test@Test.com', 1231231233, 131231233); -/*!40000 ALTER TABLE `customer` ENABLE KEYS */; - --- Dumping structure for function astute.duplicate_invoice -DELIMITER // -CREATE DEFINER=`root`@`localhost` FUNCTION `duplicate_invoice`(inv_no_in varchar(20)) RETURNS varchar(20) CHARSET utf8 -BEGIN - DECLARE generated_inv_number varchar(20); - DECLARE po_num_in varchar(20); - - SELECT po_num - INTO po_num_in - FROM invoice - WHERE inv_no = inv_no_in; - - SELECT generate_inv_number(po_num_in) - INTO generated_inv_number; - - INSERT INTO invoice - (inv_no,inv_date,PO_num,change_order_num,bill_amt,special_notes,certification,inv_status,pmt_status) - (SELECT generated_inv_number, inv_date, PO_num, change_order_num, bill_amt, special_notes, certification, inv_status, pmt_status - FROM invoice - WHERE inv_no = inv_no_in); - - INSERT INTO invoice_detail - (inv_num,line_item_num,PO_line_item_num,service_type_id,description,qty,fee,fee_type_id) - (SELECT generated_inv_number, line_item_num, PO_line_item_num, service_type_id, description, qty, fee, fee_type_id - FROM invoice_detail - WHERE inv_num = inv_no_in); - - return generated_inv_number; - -END// -DELIMITER ; - --- Dumping structure for table astute.fee_type -CREATE TABLE IF NOT EXISTS `fee_type` ( - `fee_type_id` int(11) NOT NULL, - `fee_type_desc` varchar(40) NOT NULL, - PRIMARY KEY (`fee_type_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- Dumping data for table astute.fee_type: ~2 rows (approximately) -/*!40000 ALTER TABLE `fee_type` DISABLE KEYS */; -INSERT INTO `fee_type` (`fee_type_id`, `fee_type_desc`) VALUES - (1, 'Fixed fee'), - (2, 'Hourly'); -/*!40000 ALTER TABLE `fee_type` ENABLE KEYS */; - --- Dumping structure for function astute.generate_inv_number -DELIMITER // -CREATE DEFINER=`root`@`localhost` FUNCTION `generate_inv_number`(po_num_in varchar(20)) RETURNS varchar(20) CHARSET utf8 -BEGIN - DECLARE customer_id_in int; - DECLARE customer_code varchar(4); - DECLARE po_count int; - DECLARE inv_count int; - DECLARE inv_number varchar(20); - - SELECT customer_id - INTO customer_id_in - FROM po - WHERE po.po_num = po_num_in; - - SELECT substr(customer.customer_name, 1, 4) - INTO customer_code - FROM customer - WHERE customer_id = customer_id_in; - - SELECT po_id - INTO po_count - FROM po - WHERE PO_num = po_num_in; - - SELECT count(*) + 1 - INTO inv_count - FROM invoice - WHERE invoice.PO_num = po_num_in; - SELECT concat(customer_code, '-',LPAD(po_count, 2, '0'), '_',date_format(now(),'%y'), date_format(now(),'%m'), '_', LPAD(inv_count, 2, '0')) INTO inv_number; - RETURN inv_number; - -END// -DELIMITER ; - --- Dumping structure for function astute.get_payment_type -DELIMITER // -CREATE DEFINER=`root`@`localhost` FUNCTION `get_payment_type`(pmt_type int) RETURNS varchar(20) CHARSET utf8 -BEGIN - declare payment_type VARCHAR(20); - SELECT payment_type_name INTO payment_type FROM payment_type WHERE payment_type_id = pmt_type; - return payment_type; -END// -DELIMITER ; - --- Dumping structure for function astute.get_previously_billed_amt -DELIMITER // -CREATE DEFINER=`root`@`localhost` FUNCTION `get_previously_billed_amt`(po_no varchar(20)) RETURNS double(10,2) -BEGIN - declare billed_amt double(10,2); - SELECT sum(bill_amt) INTO billed_amt FROM invoice WHERE invoice.PO_num = po_no; - return billed_amt; -END// -DELIMITER ; - --- Dumping structure for function astute.get_remaining_qty_fun -DELIMITER // -CREATE DEFINER=`root`@`localhost` FUNCTION `get_remaining_qty_fun`(po_num_in varchar(40), item_no_in int) RETURNS double -BEGIN -DECLARE remaining_qty double; -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_num_in) -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 table astute.invoice -CREATE TABLE IF NOT EXISTS `invoice` ( - `inv_no` varchar(20) NOT NULL, - `inv_date` date NOT NULL, - `PO_num` varchar(40) NOT NULL, - `bill_amt` double NOT NULL, - `special_notes` varchar(500) DEFAULT NULL, - `certification` varchar(500) DEFAULT 'Certified that the above items and rates are in accordance with the contractual agreement as verified by the undersigned.', - `inv_status` int(2) DEFAULT '1', - `pmt_status` int(11) NOT NULL DEFAULT '1', - PRIMARY KEY (`inv_no`), - KEY `fk_InvMaster_POnum` (`PO_num`), - CONSTRAINT `fk_InvMaster_POnum` FOREIGN KEY (`PO_num`) REFERENCES `po` (`PO_num`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- 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), - ('NVCC-01_1712_21', '2017-12-28', 'EP2649247', 16854, '1. Completion of Phase 1 - Preliminaries\r\n2. Invoice not submitted to NVCC. For submitted invoice, see Excel copy\r\n', 'Certified that the above items and rates are in accordance with the contractual agreement as verified by the undersigned.', 1, 1), - ('test-04_1807_02', '2017-12-28', 'EP2649247', 16854, '1. Completion of Phase 1 - Preliminaries\r\n2. Invoice not submitted to NVCC. For submitted invoice, see Excel copy\r\n', 'Certified that the above items and rates are in accordance with the contractual agreement as verified by the undersigned.', 1, 1), - ('test10', '2017-12-28', 'EP2649247', 16854, '1. Completion of Phase 1 - Preliminaries\r\n2. Invoice not submitted to NVCC. For submitted invoice, see Excel copy\r\n', 'Certification: Certified that the above items and rates are in accordnace with the contractual aggrement as verified by the undersigned', 1, 1); -/*!40000 ALTER TABLE `invoice` ENABLE KEYS */; - --- Dumping structure for table astute.invoice_detail -CREATE TABLE IF NOT EXISTS `invoice_detail` ( - `inv_num` varchar(20) NOT NULL, - `line_item_num` int(11) NOT NULL, - `PO_line_item_num` int(11) DEFAULT NULL, - `service_type_id` int(11) DEFAULT NULL, - `description` varchar(500) DEFAULT NULL, - `qty` double DEFAULT NULL, - `fee` double DEFAULT NULL, - `fee_type_id` int(11) DEFAULT NULL, - PRIMARY KEY (`inv_num`,`line_item_num`), - KEY `fk_InvDetail_FeeType` (`fee_type_id`), - CONSTRAINT `fk_InvDetail_FeeType` FOREIGN KEY (`fee_type_id`) REFERENCES `fee_type` (`fee_type_id`), - CONSTRAINT `fk_InvDetail_InvNum` FOREIGN KEY (`inv_num`) REFERENCES `invoice` (`inv_no`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- Dumping data for table astute.invoice_detail: ~13 rows (approximately) -/*!40000 ALTER TABLE `invoice_detail` DISABLE KEYS */; -INSERT INTO `invoice_detail` (`inv_num`, `line_item_num`, `PO_line_item_num`, `service_type_id`, `description`, `qty`, `fee`, `fee_type_id`) VALUES - ('123', 1, NULL, 1, 'tese', 34543, 345435, 1), - ('NVCC-01_1712_21', 1, 1, NULL, 'test', NULL, 14953, 1), - ('NVCC-01_1712_21', 2, 3, NULL, 'Additional Services: Third Party Utility Verification', NULL, 1500, 1), - ('NVCC-01_1712_21', 3, 3, NULL, 'Additional Services: Field Investigatoin Travel', NULL, 321, 1), - ('NVCC-01_1712_21', 4, 4, NULL, 'Reimbursable Expense: Printing and parking', NULL, 80, 1), - ('NVCC-01_1712_21', 10, 1, 0, 'Design Phase Service _Prelimanary', 0, 14953, 1), - ('NVCC-01_1712_21', 11, 1, 0, 'Design Phase Service _Prelimanary', 0, 14953, 1), - ('test-04_1807_02', 1, 1, NULL, 'test', NULL, 14953, 1), - ('test-04_1807_02', 2, 3, NULL, 'Additional Services: Third Party Utility Verification', NULL, 1500, 1), - ('test-04_1807_02', 3, 3, NULL, 'Additional Services: Field Investigatoin Travel', NULL, 321, 1), - ('test-04_1807_02', 4, 4, NULL, 'Reimbursable Expense: Printing and parking', NULL, 80, 1), - ('test-04_1807_02', 10, 1, 0, 'Design Phase Service _Prelimanary', 0, 14953, 1), - ('test-04_1807_02', 11, 1, 0, 'Design Phase Service _Prelimanary', 0, 14953, 1); -/*!40000 ALTER TABLE `invoice_detail` ENABLE KEYS */; - --- Dumping structure for table astute.invoice_notes -CREATE TABLE IF NOT EXISTS `invoice_notes` ( - `inv_no` varchar(20) NOT NULL, - `inv_note` varchar(500) NOT NULL, - PRIMARY KEY (`inv_no`), - CONSTRAINT `fk_inv_notes_inv_no` FOREIGN KEY (`inv_no`) REFERENCES `invoice` (`inv_no`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- Dumping data for table astute.invoice_notes: ~0 rows (approximately) -/*!40000 ALTER TABLE `invoice_notes` DISABLE KEYS */; -/*!40000 ALTER TABLE `invoice_notes` ENABLE KEYS */; - --- Dumping structure for table astute.invoice_payment -CREATE TABLE IF NOT EXISTS `invoice_payment` ( - `inv_no` varchar(20) NOT NULL, - `invoice_payment_type` int(11) NOT NULL, - `invoice_amount` double NOT NULL, - `payment_date` date NOT NULL, - `invoice_payment_id` int(11) NOT NULL AUTO_INCREMENT, - `description` varchar(50) DEFAULT NULL, - PRIMARY KEY (`invoice_payment_id`), - KEY `fk_inv_pmt_inv_no` (`inv_no`), - KEY `fk_pinv_pmt_type` (`invoice_payment_type`), - CONSTRAINT `fk_inv_pmt_inv_no` FOREIGN KEY (`inv_no`) REFERENCES `invoice` (`inv_no`), - CONSTRAINT `fk_pinv_pmt_type` FOREIGN KEY (`invoice_payment_type`) REFERENCES `payment_type` (`payment_type_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- Dumping data for table astute.invoice_payment: ~0 rows (approximately) -/*!40000 ALTER TABLE `invoice_payment` DISABLE KEYS */; -/*!40000 ALTER TABLE `invoice_payment` ENABLE KEYS */; - --- Dumping structure for table astute.invoice_status -CREATE TABLE IF NOT EXISTS `invoice_status` ( - `inv_status_id` int(11) NOT NULL, - `inv_status_desc` varchar(20) NOT NULL, - PRIMARY KEY (`inv_status_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- Dumping data for table astute.invoice_status: ~3 rows (approximately) -/*!40000 ALTER TABLE `invoice_status` DISABLE KEYS */; -INSERT INTO `invoice_status` (`inv_status_id`, `inv_status_desc`) VALUES - (1, 'Draft'), - (2, 'Submitted'), - (3, 'Void'); -/*!40000 ALTER TABLE `invoice_status` ENABLE KEYS */; - --- Dumping structure for table astute.payment_status -CREATE TABLE IF NOT EXISTS `payment_status` ( - `payment_status_id` int(11) NOT NULL, - `payment_status_desc` varchar(20) NOT NULL, - PRIMARY KEY (`payment_status_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- Dumping data for table astute.payment_status: ~3 rows (approximately) -/*!40000 ALTER TABLE `payment_status` DISABLE KEYS */; -INSERT INTO `payment_status` (`payment_status_id`, `payment_status_desc`) VALUES - (1, 'Outstanding'), - (2, 'Partially paid'), - (3, 'Paid'); -/*!40000 ALTER TABLE `payment_status` ENABLE KEYS */; - --- Dumping structure for table astute.payment_type -CREATE TABLE IF NOT EXISTS `payment_type` ( - `payment_type_id` int(11) NOT NULL, - `payment_type_name` varchar(20) NOT NULL, - PRIMARY KEY (`payment_type_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- Dumping data for table astute.payment_type: ~3 rows (approximately) -/*!40000 ALTER TABLE `payment_type` DISABLE KEYS */; -INSERT INTO `payment_type` (`payment_type_id`, `payment_type_name`) VALUES - (1, 'Credit Card'), - (2, 'Check'), - (3, 'ACH'); -/*!40000 ALTER TABLE `payment_type` ENABLE KEYS */; - --- Dumping structure for table astute.po -CREATE TABLE IF NOT EXISTS `po` ( - `PO_num` varchar(40) NOT NULL COMMENT 'Alpha numeric, auto generated in frontend', - `contract_num` varchar(20) DEFAULT NULL, - `PO_date` date DEFAULT NULL, - `contract_amt` double(10,2) DEFAULT NULL, - `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`), - KEY `po_customer_id` (`customer_id`), - CONSTRAINT `po_customer_id_fk` FOREIGN KEY (`customer_id`) REFERENCES `customer` (`customer_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- Dumping data for table astute.po: ~6 rows (approximately) -/*!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 - ('EP2649247', 'test123', NULL, 30000.00, '1', 'null', 1, 'SO Dummy Title for Test123'), - ('HRT-16-72046', '16-72046', NULL, 23360.00, '3', 'HRT-01-01', 1, 'SO Dummy Title for 16-72046 adding upto 200 characters ****************************'), - ('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'), - ('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'); -/*!40000 ALTER TABLE `po` ENABLE KEYS */; - --- Dumping structure for table astute.po_detail -CREATE TABLE IF NOT EXISTS `po_detail` ( - `PO_num` varchar(40) NOT NULL, - `line_item_no` int(11) NOT NULL, - `service_desc` varchar(500) DEFAULT NULL, - `fee_type_id` int(11) DEFAULT '1' COMMENT '1-fixed fee, 2-hourly', - `qty` double DEFAULT NULL, - `service_type_id` int(1) DEFAULT '1' COMMENT '1-studies, 2-supplemental service, 3-out of pocket, 4-reimbursement, 5-', - `fee` double DEFAULT NULL, - `remaining_qty` double DEFAULT NULL, - PRIMARY KEY (`PO_num`,`line_item_no`), - KEY `fk_PODetail_ServType` (`service_type_id`), - CONSTRAINT `fk_PODetail_POnum` FOREIGN KEY (`PO_num`) REFERENCES `po` (`PO_num`), - CONSTRAINT `fk_PODetail_ServType` FOREIGN KEY (`service_type_id`) REFERENCES `service_type` (`service_type_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- 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`) 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 -CREATE TABLE IF NOT EXISTS `service_type` ( - `service_type_id` int(11) NOT NULL, - `desc` varchar(40) NOT NULL, - PRIMARY KEY (`service_type_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- Dumping data for table astute.service_type: ~5 rows (approximately) -/*!40000 ALTER TABLE `service_type` DISABLE KEYS */; -INSERT INTO `service_type` (`service_type_id`, `desc`) VALUES - (1, 'study'), - (2, 'design'), - (3, 'Peer review'), - (4, 'cost estimation'), - (5, 'forensic investigation'); -/*!40000 ALTER TABLE `service_type` ENABLE KEYS */; - --- Dumping structure for table astute.session -CREATE TABLE IF NOT EXISTS `session` ( - `session_id` varchar(200) NOT NULL, - `user_id` int(11) NOT NULL, - `session_start_date` date DEFAULT NULL, - `session_end_date` date DEFAULT NULL, - PRIMARY KEY (`session_id`), - KEY `fk_session_user_id` (`user_id`), - CONSTRAINT `fk_session_user_id` FOREIGN KEY (`user_id`) REFERENCES `user` (`user_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- Dumping data for table astute.session: ~3 rows (approximately) -/*!40000 ALTER TABLE `session` DISABLE KEYS */; -INSERT INTO `session` (`session_id`, `user_id`, `session_start_date`, `session_end_date`) VALUES - ('745de7a0e6c1480398ca36116512bc06', 1, NULL, NULL), - ('985874e08cb74fa08419f8883f3eeff7', 1, NULL, NULL), - ('a4b6bde153004b7ba17220f5ba2bb323', 1, NULL, NULL); -/*!40000 ALTER TABLE `session` ENABLE KEYS */; - --- Dumping structure for table astute.user -CREATE TABLE IF NOT EXISTS `user` ( - `user_id` int(5) NOT NULL, - `username` varchar(20) DEFAULT NULL, - `password` varchar(20) DEFAULT NULL, - `first_name` varchar(20) DEFAULT NULL, - `middle_name` varchar(20) DEFAULT NULL, - `last_name` varchar(20) DEFAULT NULL, - `role` varchar(20) DEFAULT NULL, - `email` varchar(40) DEFAULT NULL, - `office_phone_ext` int(3) DEFAULT NULL, - `cell_phone` bigint(20) DEFAULT NULL, - PRIMARY KEY (`user_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - --- Dumping data for table astute.user: ~2 rows (approximately) -/*!40000 ALTER TABLE `user` DISABLE KEYS */; -INSERT INTO `user` (`user_id`, `username`, `password`, `first_name`, `middle_name`, `last_name`, `role`, `email`, `office_phone_ext`, `cell_phone`) VALUES - (1, 'sparikh', 'sparikh', 'Saurin', NULL, 'Parikh', 'Owner', 'sparikh@Astuteng.com', 2024002004, 3014616485), - (2, 'humarethiya', 'humarethiya', 'Haresh', NULL, 'Umaretiya', 'Owner', 'Humaretiya@astuteng.com', 2024002004, 0); -/*!40000 ALTER TABLE `user` ENABLE KEYS */; - -/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */; -/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */; -/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; From 1c623512d9d0ebd7d87429c209d82b7d5863f25a Mon Sep 17 00:00:00 2001 From: gopi17701 <41270090+gopi17701@users.noreply.github.com> Date: Wed, 22 Aug 2018 17:29:56 -0400 Subject: [PATCH 3/9] Add files via upload --- .../src/main/java/com/astute/dao/DAO.java | 7 +++-- .../src/main/java/com/astute/dao/SqlDAO.java | 30 +++++++++++++------ 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/AstuteSystem/src/main/java/com/astute/dao/DAO.java b/AstuteSystem/src/main/java/com/astute/dao/DAO.java index 7539107..7d50517 100644 --- a/AstuteSystem/src/main/java/com/astute/dao/DAO.java +++ b/AstuteSystem/src/main/java/com/astute/dao/DAO.java @@ -10,6 +10,7 @@ import java.io.InputStream; import java.sql.Connection; import java.sql.Date; import java.sql.ResultSet; +import java.text.ParseException; import java.util.List; import java.util.Properties; @@ -92,15 +93,15 @@ public abstract class DAO { */ public abstract void connect() throws AstuteException; - public abstract List getPOMaster(String PONum, String contractNum, java.sql.Date PODate, String astuteProjectNumber) throws AstuteException; + public abstract List getPOMaster(String PONum, String contractNum, String PODate, String astuteProjectNumber) throws AstuteException; public abstract List getPODetail(String PONum, int lineItemNo) throws AstuteException; - public abstract void updatePOMaster(String PONum, String contractNum, java.sql.Date PODate, Double contractAmt, String astuteProjectNumber, String title) throws AstuteException; + public abstract void updatePOMaster(String PONum, String contractNum, String PODate, Double contractAmt, String astuteProjectNumber, String title) throws AstuteException; public abstract void updatePODetail(String POnum, int lineItemNo, String serviceDesc, int feeTypeId, Double qty, Double fee, int serviceTypeId, Double remainingQuantity) throws AstuteException; - public abstract void createPOMaster(String PONum, String contractNum, java.sql.Date PODate, Double contractAmt, String customerId, String astuteProjectNumber, String title) throws AstuteException; + public abstract void createPOMaster(String PONum, String contractNum, String PODate, Double contractAmt, String customerId, String astuteProjectNumber, String title) throws AstuteException, ParseException; public abstract void createPODetail(String POnum, int lineItemNo, String serviceDesc, int feeTypeId, Double qty, Double fee, int serviceTypeId, Double remainingQuantity) throws AstuteException; diff --git a/AstuteSystem/src/main/java/com/astute/dao/SqlDAO.java b/AstuteSystem/src/main/java/com/astute/dao/SqlDAO.java index de52af0..7559ecf 100644 --- a/AstuteSystem/src/main/java/com/astute/dao/SqlDAO.java +++ b/AstuteSystem/src/main/java/com/astute/dao/SqlDAO.java @@ -10,9 +10,11 @@ import java.security.NoSuchAlgorithmException; import java.security.SecureRandom; import java.security.spec.InvalidKeySpecException; import java.sql.*; +import java.text.ParseException; import java.util.ArrayList; import java.util.List; import java.util.UUID; +import java.text.SimpleDateFormat; import static com.astute.exceptions.AstuteException.DB_ERROR; @@ -36,17 +38,17 @@ public class SqlDAO extends DAO { =============================== PO Methods =============================================== */ - public List getPOMaster(String PONum, String contractNum, Date PODate, String astuteProjectNumber) throws AstuteException { + public List getPOMaster(String PONum, String contractNum, String PODate, String astuteProjectNumber) throws AstuteException { try { List pos = new ArrayList<>(); Statement stmt = conn.createStatement(); - String sql = "SELECT PO_num, contract_num, PO_date, customer_id, contract_amt, astute_project_num , title FROM PO "; + String sql = "SELECT PO_num, contract_num, PO_date, customer_id, contract_amt, astute_project_num , title, get_previously_billed_amt(PO_num) FROM PO "; if (PONum != null && !PONum.isEmpty()) { sql += "WHERE UPPER(PO_num) = '" + PONum.toUpperCase() + "'"; } else if (contractNum != null && !contractNum.isEmpty()) { sql += "WHERE UPPER(contract_num) = '" + contractNum.toUpperCase()+ "'"; } else if (PODate != null) { - sql += "WHERE PO_date = STR_TO_DATE(" + PODate + ", '%Y-%m-%d')"; + sql += "WHERE PO_date = STR_TO_DATE('" + PODate + "', '%m-%d-%Y')"; } else if (astuteProjectNumber!= null && !astuteProjectNumber.isEmpty() ) { sql += "WHERE UPPER(astute_project_num) = '" + astuteProjectNumber.toUpperCase()+ "'"; } @@ -60,7 +62,13 @@ public class SqlDAO extends DAO { Double contractAmt = rs.getDouble(5); String astuteProjectNum = rs.getString(6); String title = rs.getString(7); - PO po = new PO(poNum, cntrctNum, poDate, customerId, contractAmt,astuteProjectNum,title); + Double previouslyBilledAmount = rs.getDouble(8); + String date = null; + if (poDate != null) { + SimpleDateFormat formatter = new SimpleDateFormat("MM/DD/YYYY"); + date = formatter.format(poDate); + } + PO po = new PO(poNum, cntrctNum, date, customerId, contractAmt,astuteProjectNum,title,previouslyBilledAmount); pos.add(po); } return pos; @@ -109,8 +117,10 @@ public class SqlDAO extends DAO { } } - public void updatePOMaster(String PONum, String contractNum, Date PODate, Double contractAmt, String astuteProjectNumber, String title) throws AstuteException { + public void updatePOMaster(String PONum, String contractNum, String PODate, Double contractAmt, String astuteProjectNumber, String title) throws AstuteException { try { + System.out.println("PODate in SQLDAO is "+ PODate); + String sql = "UPDATE PO "; String updateClause = " SET "; String whereClause = ""; @@ -121,9 +131,9 @@ public class SqlDAO extends DAO { } updateClause = updateClause + " contract_num = '" + contractNum + "',"; - updateClause = updateClause + " PO_Date = STR_TO_DATE(" + PODate + ", '%Y-%m-%d')" + ","; + updateClause = updateClause + " PO_Date = STR_TO_DATE('" + PODate + "', '%m/%d/%y')" + ","; updateClause = updateClause + " contract_amt = " + contractAmt+ ","; - updateClause = updateClause + " astute_project_num = '" + astuteProjectNumber +"'"; + updateClause = updateClause + " astute_project_num = '" + astuteProjectNumber +"',"; updateClause = updateClause + " title = '" + title +"'"; sql = sql+ updateClause + whereClause; System.out.println(sql); @@ -187,12 +197,14 @@ public class SqlDAO extends DAO { } } - public void createPOMaster(String PONum, String contractNum, Date PODate, Double contractAmt, String customerId, String astuteProjectNumber, String title) throws AstuteException { + public void createPOMaster(String PONum, String contractNum, String PODate, Double contractAmt, String customerId, String astuteProjectNumber, String title) throws AstuteException, ParseException { try { + Date date= (Date) new SimpleDateFormat("yyyy/mm/dd").parse(PODate); + CallableStatement stmt = conn.prepareCall("{call create_PO(?,?,?,?,?,?,?)}"); stmt.setString(1, PONum); stmt.setString(2, contractNum); - stmt.setDate(3, PODate); + stmt.setDate(3, date); stmt.setDouble(4, contractAmt); stmt.setString(5, customerId); stmt.setString(6, astuteProjectNumber); From b43ebe439bec610bf94ed81378bceeadd57531d8 Mon Sep 17 00:00:00 2001 From: gopi17701 <41270090+gopi17701@users.noreply.github.com> Date: Wed, 22 Aug 2018 17:30:29 -0400 Subject: [PATCH 4/9] Add files via upload --- .../src/main/java/com/astute/model/PO.java | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/AstuteSystem/src/main/java/com/astute/model/PO.java b/AstuteSystem/src/main/java/com/astute/model/PO.java index 48f332f..2a55e39 100644 --- a/AstuteSystem/src/main/java/com/astute/model/PO.java +++ b/AstuteSystem/src/main/java/com/astute/model/PO.java @@ -7,13 +7,14 @@ import java.util.Date; public class PO implements Serializable{ private String contractNum; - private Date PODate; + private String PODate; private Double contractAmt; private String customerId; private String astuteProjectNumber; private String title; + private Double previouslyBilledAmount; - public PO(String PONum, String contractNum, Date PODate, String customerId, Double contractAmt, String astuteProjectNum, String title) { + public PO(String PONum, String contractNum, String PODate, String customerId, Double contractAmt, String astuteProjectNum, String title, Double previouslyBilledAmount) { this.PONum = PONum; this.contractNum = contractNum; this.PODate = PODate; @@ -21,7 +22,7 @@ public class PO implements Serializable{ this.contractAmt = contractAmt; this.astuteProjectNumber = astuteProjectNum; this.title = title; - + this.previouslyBilledAmount = previouslyBilledAmount; } private String PONum; @@ -42,11 +43,11 @@ public class PO implements Serializable{ this.contractNum = contractNum; } - public Date getPODate() { + public String getPODate() { return PODate; } - public void setPODate(Date PODate) { + public void setPODate(String PODate) { this.PODate = PODate; } @@ -81,4 +82,12 @@ public class PO implements Serializable{ public void setTitle(String title) { this.title = title; } + + public Double getPreviouslyBilledAmount() { + return previouslyBilledAmount; + } + + public void setPreviouslyBilledAmount(Double previouslyBilledAmount) { + this.previouslyBilledAmount = previouslyBilledAmount; + } } \ No newline at end of file From be901b0025be2776cfd93d628b4c522382a543f0 Mon Sep 17 00:00:00 2001 From: gopi17701 <41270090+gopi17701@users.noreply.github.com> Date: Wed, 22 Aug 2018 17:31:10 -0400 Subject: [PATCH 5/9] Add files via upload From 17a6be72bd73b56754298bc31456212fece577ab Mon Sep 17 00:00:00 2001 From: gopi17701 <41270090+gopi17701@users.noreply.github.com> Date: Wed, 22 Aug 2018 17:31:50 -0400 Subject: [PATCH 6/9] Add files via upload --- .../java/com/astute/resources/POResource.java | 25 ++++--------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/AstuteSystem/src/main/java/com/astute/resources/POResource.java b/AstuteSystem/src/main/java/com/astute/resources/POResource.java index 9233b21..8bc2861 100644 --- a/AstuteSystem/src/main/java/com/astute/resources/POResource.java +++ b/AstuteSystem/src/main/java/com/astute/resources/POResource.java @@ -29,12 +29,7 @@ public class POResource { @QueryParam("ContractNum") String contractNum, @QueryParam("PODate") String PODate, String astuteProjectNumber) throws AstuteException, ParseException { - Date date = null; - if (PODate != null) { - SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); - date = new java.sql.Date(df.parse(PODate).getTime()); - } - return new ApiResponse(POService.getPOMaster(PONum, contractNum, date, astuteProjectNumber)).toResponse(); + return new ApiResponse(POService.getPOMaster(PONum, contractNum, PODate, astuteProjectNumber)).toResponse(); } @Path("/detail") @@ -48,13 +43,9 @@ public class POResource { @PUT public Response updatePOMaster(@PathParam("PONum") String PONum, POMasterRequest request) throws AstuteException, ParseException { - Date date = null; - if (request.getPODate() != null) { - String dateStr = request.getPODate(); - SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); - date = new java.sql.Date(df.parse(dateStr).getTime()); - } - POService.updatePOMaster(PONum, request.getContractNum(), date, request.getContractAmt(), request.getAstuteProjectNumber(), request.getTitle()); + System.out.println("PODate in Resource is "+ request.getPODate()); + + POService.updatePOMaster(PONum, request.getContractNum(), request.getPODate(), request.getContractAmt(), request.getAstuteProjectNumber(), request.getTitle()); return new ApiResponse(ApiResponse.UPDATE_ACCESS_SUCESS).toResponse(); } @@ -70,14 +61,8 @@ public class POResource { @POST public Response createPOMaster(POMasterRequest request) throws AstuteException, ParseException { - String dateStr = request.getPODate(); - Date date = null; - if (dateStr != null) { - SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); - date = new java.sql.Date(df.parse(dateStr).getTime()); - } - POService.createPOMaster(request.getPoNum(), request.getContractNum(), date, request.getContractAmt(), request.getCustomerId(), request.getAstuteProjectNumber(),request.getTitle()); + POService.createPOMaster(request.getPoNum(), request.getContractNum(), request.getPODate(), request.getContractAmt(), request.getCustomerId(), request.getAstuteProjectNumber(),request.getTitle()); return new ApiResponse(ApiResponse.UPDATE_ACCESS_SUCESS).toResponse(); } @Path("/detail") From c5c055ca00da1be2c5aa38840945241fefee7d41 Mon Sep 17 00:00:00 2001 From: gopi17701 <41270090+gopi17701@users.noreply.github.com> Date: Wed, 22 Aug 2018 17:32:15 -0400 Subject: [PATCH 7/9] Add files via upload --- .../src/main/java/com/astute/service/POService.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/AstuteSystem/src/main/java/com/astute/service/POService.java b/AstuteSystem/src/main/java/com/astute/service/POService.java index 3d3fc19..e453353 100644 --- a/AstuteSystem/src/main/java/com/astute/service/POService.java +++ b/AstuteSystem/src/main/java/com/astute/service/POService.java @@ -6,6 +6,7 @@ import com.astute.model.PODetail; import java.sql.Date; import java.sql.SQLException; +import java.text.ParseException; import java.util.List; import static com.astute.dao.DAO.getDao; @@ -15,7 +16,7 @@ public class POService extends Service{ super(); } - public List getPOMaster(String PONum, String contractNum, Date PODate, String astuteProjectNumber) + public List getPOMaster(String PONum, String contractNum, String PODate, String astuteProjectNumber) throws AstuteException { return getDao().getPOMaster(PONum, contractNum, PODate, astuteProjectNumber); } @@ -27,8 +28,9 @@ public class POService extends Service{ } - public void updatePOMaster(String PONum, String contractNum, Date PODate, Double contractAmt, String astuteProjectNumber, String title) + public void updatePOMaster(String PONum, String contractNum, String PODate, Double contractAmt, String astuteProjectNumber, String title) throws AstuteException { + System.out.print("PODate in Service is "+ PODate); getDao().updatePOMaster(PONum, contractNum, PODate, contractAmt, astuteProjectNumber, title); } @@ -37,8 +39,8 @@ public class POService extends Service{ getDao().updatePODetail(POnum, lineItemNo, serviceDesc, feeTypeId, qty, fee, serviceTypeId, remainingQuantity); } - public void createPOMaster(String PONum, String contractNum, Date PODate, Double contractAmt, String customerId, String astuteProjectNumber, String title) - throws AstuteException { + public void createPOMaster(String PONum, String contractNum, String PODate, Double contractAmt, String customerId, String astuteProjectNumber, String title) + throws AstuteException, ParseException { getDao().createPOMaster(PONum, contractNum, PODate, contractAmt, customerId, astuteProjectNumber, title); } From 5448830fc33b8f16cb00db9415766d2107ef3fa6 Mon Sep 17 00:00:00 2001 From: gopi17701 <41270090+gopi17701@users.noreply.github.com> Date: Wed, 22 Aug 2018 17:34:40 -0400 Subject: [PATCH 8/9] Add files via upload --- .../app/sales-order/sales-order.component.html | 17 +++++++---------- .../app/sales-order/sales-order.component.ts | 8 ++++---- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/AstuteClient2/src/app/sales-order/sales-order.component.html b/AstuteClient2/src/app/sales-order/sales-order.component.html index 834438b..88aa39c 100644 --- a/AstuteClient2/src/app/sales-order/sales-order.component.html +++ b/AstuteClient2/src/app/sales-order/sales-order.component.html @@ -32,7 +32,7 @@
- +
@@ -46,7 +46,7 @@
- +
@@ -58,7 +58,7 @@
- +
@@ -170,7 +170,7 @@