Updated Service Type resource to accept the Request object rather than path paramenters

This commit is contained in:
Gopi Katwala 2019-06-08 22:36:57 -04:00
parent d9971900dd
commit 56fb6591b5

View File

@ -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;