From 56fb6591b54a0dc707d87c27f5a9636924a8e56e Mon Sep 17 00:00:00 2001 From: Gopi Katwala Date: Sat, 8 Jun 2019 22:36:57 -0400 Subject: [PATCH] Updated Service Type resource to accept the Request object rather than path paramenters --- AstuteSystem/sql/astute.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AstuteSystem/sql/astute.sql b/AstuteSystem/sql/astute.sql index 44a0b41..33255fa 100644 --- a/AstuteSystem/sql/astute.sql +++ b/AstuteSystem/sql/astute.sql @@ -39,7 +39,7 @@ DECLARE last_inserted_id varchar(20); DECLARE new_contact_id int; DECLARE contactCount int; -SELECT COUNT(customer_contact_id) INTO contactCount FROM customer_contact WHERE customer_id = customer_id_in; +SELECT COUNT(contact_id) INTO contactCount FROM customer_contact WHERE customer_id = customer_id_in; if contactCount > 0 then SELECT max(contact_id)+1 into new_contact_id FROM customer_contact where customer_id = customer_id_in; else @@ -111,11 +111,11 @@ BEGIN declare maxlineItemNo int; DECLARE podetailCount int; -SELECT COUNT(customer_contact_id) INTO podetailCount FROM customer_contact WHERE customer_id = customer_id_in; +SELECT COUNT(line_item_no) INTO podetailCount FROM po_detail where po_num = ponum; if lineItemNo is null or lineItemNo = 0 then if podetailCount > 0 then - select max(lineItemNo) into maxlineItemNo from po_detail where po_num = ponum; + select max(line_item_no) into maxlineItemNo from po_detail where po_num = ponum; else SET maxlineItemNo = 1; end if;