src-db/database/model/functions/M_RESERVATION_POST.xml
changeset 26090 b6c2ecaf7e1a
parent 25779 aa854421dcf5
child 27059 d759928f7271
equal deleted inserted replaced
26089:e0dc3cac2184 26090:b6c2ecaf7e1a
    55 BEGIN
    55 BEGIN
    56   IF (p_PInstance_ID IS NOT NULL) THEN
    56   IF (p_PInstance_ID IS NOT NULL) THEN
    57     --  Update AD_PInstance
    57     --  Update AD_PInstance
    58     DBMS_OUTPUT.PUT_LINE('Updating PInstance - Processing ' || p_pinstance_id) ;
    58     DBMS_OUTPUT.PUT_LINE('Updating PInstance - Processing ' || p_pinstance_id) ;
    59     v_ResultStr:='PInstanceNotFound';
    59     v_ResultStr:='PInstanceNotFound';
    60     AD_UPDATE_PINSTANCE(p_PInstance_ID, NULL, 'Y', NULL, NULL) ;
    60     AD_UPDATE_PINSTANCE(p_PInstance_ID, NULL, 'Y', NULL, NULL, 'N') ;
    61     --  Get Parameters
    61     --  Get Parameters
    62     v_ResultStr:='ReadingParameters';
    62     v_ResultStr:='ReadingParameters';
    63     FOR Cur_Parameter IN (
    63     FOR Cur_Parameter IN (
    64         SELECT i.record_id, i.ad_user_id, p.parametername, p.p_string, p.p_number, p.p_date
    64         SELECT i.record_id, i.ad_user_id, p.parametername, p.p_string, p.p_number, p.p_date
    65         FROM ad_pinstance i
    65         FROM ad_pinstance i
   415         WHERE m_reservation_id = v_reservation_id;
   415         WHERE m_reservation_id = v_reservation_id;
   416       END IF;
   416       END IF;
   417 
   417 
   418   IF (p_pinstance_id IS NOT NULL) THEN
   418   IF (p_pinstance_id IS NOT NULL) THEN
   419     DBMS_OUTPUT.PUT_LINE('Updating PInstance - Finished ' || v_Message) ;
   419     DBMS_OUTPUT.PUT_LINE('Updating PInstance - Finished ' || v_Message) ;
   420     AD_UPDATE_PINSTANCE(p_PInstance_ID, NULL, 'N', v_Result, v_Message) ;
   420     AD_UPDATE_PINSTANCE(p_PInstance_ID, NULL, 'N', v_Result, v_Message, 'N') ;
   421     DBMS_OUTPUT.PUT_LINE('--<<M_Reservation_Post finished>> ' || v_Message) ;
   421     DBMS_OUTPUT.PUT_LINE('--<<M_Reservation_Post finished>> ' || v_Message) ;
   422   END IF;
   422   END IF;
   423   RETURN;
   423   RETURN;
   424 END; --BODY
   424 END; --BODY
   425 EXCEPTION
   425 EXCEPTION
   426 WHEN OTHERS THEN
   426 WHEN OTHERS THEN
   427   v_ResultStr:= '@ERROR=' || SQLERRM;
   427   v_ResultStr:= '@ERROR=' || SQLERRM;
   428   DBMS_OUTPUT.PUT_LINE(v_ResultStr) ;
   428   DBMS_OUTPUT.PUT_LINE(v_ResultStr) ;
   429   IF (p_pinstance_id IS NOT NULL) THEN
   429   IF (p_pinstance_id IS NOT NULL) THEN
   430     ROLLBACK;
   430     ROLLBACK;
   431     AD_UPDATE_PINSTANCE(p_pinstance_id, NULL, 'N', 0, v_ResultStr) ;
   431     AD_UPDATE_PINSTANCE(p_pinstance_id, NULL, 'N', 0, v_ResultStr, 'N') ;
   432   ELSE
   432   ELSE
   433     RAISE;
   433     RAISE;
   434   END IF;
   434   END IF;
   435   RETURN;
   435   RETURN;
   436 END M_RESERVATION_POST
   436 END M_RESERVATION_POST