project QadFinancials > class BJournalEntry > method UpdateManualPostingSafStructure
Description
Update the SAF structure code on a posting line that was created by manual input.
Parameters
icPostingLineRowid | input | character | tPostingLine.tc_Rowid |
icParentType | input | character | ParentType |
iiSafStructureID | input | integer | SAF structure |
tUpdatePostingSaf | input-output | temp-table | PostingSaf |
icGLCode | input | character | |
icCostCentreCode | input | character | |
icProjectCode | input | character | |
icComponentList | input | character | Chr(2) separated list of extra components to check during SAF defaulting. |
icComponentValueList | input | character | Chr(2) separated list of extra component values to check during SAF defaulting. |
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
unused
program code (program1/bjournalentry.p)
<Q-2 run SafStructurePrim (all) (Read) (NoCache)
(input iiSafStructureID, (SafStructureID)
input '', (SafStructureCode)
output dataset tqSafStructurePrim) in BSafStructure >
find first tqSafStructurePrim no-error.
if not available tqSafStructurePrim
then do:
assign oiReturnStatus = -98.
return.
end.
/* Delete Saf's before re-create */
for each tUpdatePostingSaf where
tUpdatePostingSaf.tc_ParentRowid = icPostingLineRowid and
tUpdatePostingSaf.PostingSafParentType = {&POSTINGSAFPARENTTYPE-GL} and
tUpdatePostingSaf.tc_status <> "D":U:
if tUpdatePostingSaf.tc_status = "N":U
then delete tUpdatePostingSaf.
else assign tUpdatePostingSaf.tc_status = "D":U.
end.
for each tPostingSaf where
tPostingSaf.tc_ParentRowid = icPostingLineRowid and
tPostingSaf.PostingSafParentType = {&POSTINGSAFPARENTTYPE-GL} and
tPostingSaf.tc_Status <> "D":U:
if tPostingSaf.tc_Status = "N":U
then delete tPostingSaf.
else assign tPostingSaf.tc_Status = "D":U.
end.
if iiSafStructureID > 0
then
<M-1 run PostingLineSafs (input iiSafStructureID (iiSafStructureID),
input tqSafStructurePrim.tcSafStructureCode (icSafStructureCode),
input icPostingLineRowid (icPostingLineRowid),
input icParentType (icParentType),
input icGLCode (icGLCode),
input icCostCentreCode (icCostCentreCode),
input icProjectCode (icProjectCode),
input icComponentList (icComponentList),
input icComponentValueList (icComponentValueList),
output oiReturnStatus (oiReturnStatus)) in BJournalEntry> .