src-db/database/model/functions/A_ASSET_POST.xml
changeset 799 fef2c5e2feb7
parent 763 8db499a07d0e
child 1178 9d1c8b3fd305
equal deleted inserted replaced
798:4994e5a604bb 799:fef2c5e2feb7
    82     v_PercentageGeneral NUMBER;
    82     v_PercentageGeneral NUMBER;
    83     v_TotalAmt NUMBER;
    83     v_TotalAmt NUMBER;
    84     v_Currency_Pre NUMBER:= 0;
    84     v_Currency_Pre NUMBER:= 0;
    85     v_Inserted NUMBER:= 0;
    85     v_Inserted NUMBER:= 0;
    86     finish boolean;
    86     finish boolean;
       
    87     v_DBA_ErrorLog_ID NUMBER;
    87   BEGIN
    88   BEGIN
    88     IF(p_PInstance_ID IS NOT NULL) THEN
    89     IF(p_PInstance_ID IS NOT NULL) THEN
    89       --  Update AD_PInstance
    90       --  Update AD_PInstance
    90       DBMS_OUTPUT.PUT_LINE('Updating PInstance - Processing ' || p_PInstance_ID) ;
    91       DBMS_OUTPUT.PUT_LINE('Updating PInstance - Processing ' || p_PInstance_ID) ;
    91       v_ResultStr:='PInstanceNotFound';
    92       v_ResultStr:='PInstanceNotFound';
   407     AD_UPDATE_PINSTANCE(p_PInstance_ID, NULL, 'N', 0, v_ResultStr) ;
   408     AD_UPDATE_PINSTANCE(p_PInstance_ID, NULL, 'N', 0, v_ResultStr) ;
   408   ELSE
   409   ELSE
   409     DECLARE
   410     DECLARE
   410       v_Code NUMBER:=SQLCODE;
   411       v_Code NUMBER:=SQLCODE;
   411     BEGIN
   412     BEGIN
       
   413       AD_SEQUENCE_NEXT('DBA_ERRORLOG', v_AD_CLIENT_ID, v_DBA_ErrorLog_ID);
   412       INSERT
   414       INSERT
   413       INTO DBA_ERRORLOG
   415       INTO DBA_ERRORLOG
   414         (
   416         (
   415           DBA_ErrorLog_ID, Created, Code, Msg, Info
   417           DBA_ErrorLog_ID, Created, Code, Msg, Info
   416         )
   418         )
   417         VALUES
   419         VALUES
   418         (DBA_ErrorLog_Seq.NEXTVAL, now(), v_Code, v_ResultStr, 'A_Asset_Post') ;
   420         (v_DBA_ErrorLog_ID, now(), v_Code, v_ResultStr, 'A_Asset_Post') ;
   419     END;
   421     END;
   420     RAISE;
   422     RAISE;
   421   END IF;
   423   END IF;
   422   RAISE_APPLICATION_ERROR(-20100, v_ResultStr) ;
   424   RAISE_APPLICATION_ERROR(-20100, v_ResultStr) ;
   423 -- Commented by cromero 19102006 RETURN;
   425 -- Commented by cromero 19102006 RETURN;