src-db/database/model/functions/M_INOUT_POST.xml
changeset 24913 e10ca5e6571f
parent 24291 4e55d4ef021a
child 24928 b27f9251113c
equal deleted inserted replaced
24912:fa7c2a34e0fc 24913:e10ca5e6571f
  1128           UPDATE M_INOUT
  1128           UPDATE M_INOUT
  1129             SET Updated=now(),
  1129             SET Updated=now(),
  1130             UpdatedBy=v_User,
  1130             UpdatedBy=v_User,
  1131             DocStatus='VO' -- the reversal transaction
  1131             DocStatus='VO' -- the reversal transaction
  1132           WHERE M_InOut_ID=v_RInOut_ID;
  1132           WHERE M_InOut_ID=v_RInOut_ID;
       
  1133 
       
  1134           -- transactions related with original inout and with voided inout will be mark as is cost permanent
       
  1135           UPDATE M_TRANSACTION TRX
       
  1136           SET ISCOSTPERMANENT='Y'
       
  1137           WHERE TRX.M_INOUTLINE_ID IN (SELECT M_INOUTLINE_ID 
       
  1138                                        FROM M_INOUTLINE
       
  1139                                        WHERE (M_INOUT_ID = v_RInOut_ID 
       
  1140                                               OR M_INOUT_ID = Cur_InOut.m_inout_id));
  1133         END IF; -- ReverseCorrection
  1141         END IF; -- ReverseCorrection
  1134 
  1142 
  1135         --M_Inout_Post - Finish_Process Extension Point
  1143         --M_Inout_Post - Finish_Process Extension Point
  1136         --Extension point at the end of the M_Inout_Post. It has 5 available parameters Record_ID, DocAction, User, Message and Result
  1144         --Extension point at the end of the M_Inout_Post. It has 5 available parameters Record_ID, DocAction, User, Message and Result
  1137         SELECT count(*) INTO v_count
  1145         SELECT count(*) INTO v_count