Parameters
oiReturnStatus | output | integer | Return status of the method. |
Internal usage
QadFinancials
program code (program1/bexpensenote.p)
/*====================================*/
/* Load the selected records */
/*====================================*/
<M-2 run ClearData (output viFcReturnSuper (oiReturnStatus)) in BExpenseNote>
if viFcReturnSuper <> 0
then oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then return.
empty temp-table tFcDynRel.
for each t_sExpNoteIds break by t_sExpNoteIds.tiExpNote_ID:
if last-of(t_sExpNoteIds.tiExpNote_ID)
then do:
create tFcDynRel.
assign tFcDynRel.tcFcFrom = "":U
tFcDynRel.tcFcTo = "ExpNote":U
tFcDynRel.tcFcRel = "for each ExpNote where ":U
+ "ExpNote.ExpNote_ID = ":U + string(t_sExpNoteIds.tiExpNote_ID)
tFcDynRel.thFcBuffer = buffer t_oExpNote:handle
tFcDynRel.thFcIBuffer = buffer t_iExpNote:handle.
end.
end.
create tFcDynRel.
assign tFcDynRel.tcFcFrom = "ExpNote":U
tFcDynRel.tcFcTo = "ExpNoteLine":U
tFcDynRel.tcFcRel = "for each ExpNoteLine where ":U
+ "ExpNoteLine.ExpNote_ID = ExpNote.ExpNote_ID":U
tFcDynRel.thFcBuffer = buffer t_oExpNoteLine:handle
tFcDynRel.thFcIBuffer = buffer t_iExpNoteLine:handle.
create tFcDynRel.
assign tFcDynRel.tcFcFrom = "ExpNote":U
tFcDynRel.tcFcTo = "ExpNoteCInvoice":U
tFcDynRel.tcFcRel = "for each ExpNoteCInvoice where ":U
+ "ExpNoteCInvoice.ExpNote_ID = ExpNote.ExpNote_ID":U
tFcDynRel.thFcBuffer = buffer t_oExpNoteCInvoice:handle
tFcDynRel.thFcIBuffer = buffer t_iExpNoteCInvoice:handle.
create tFcDynRel.
assign tFcDynRel.tcFcFrom = "ExpNoteLine":U
tFcDynRel.tcFcTo = "ExpNoteLineSaf":U
tFcDynRel.tcFcRel = "for each ExpNoteLineSaf where ":U
+ " ExpNoteLineSaf.ExpNoteLine_ID = ExpNoteLine.ExpNoteLine_ID":U
tFcDynRel.thFcBuffer = buffer t_oExpNoteLineSaf:handle
tFcDynRel.thFcIBuffer = buffer t_iExpNoteLineSaf:handle.
<M-3 run StartPersistence (output vhFcComponent (ohPersistence),
output viFcReturnSuper (oiReturnStatus)) in BExpenseNote>
if viFcReturnSuper <> 0
then oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then return.
<M-4 run ReadData
(input tFcDynRel (tDynRel),
input {&TARGETPROCEDURE} (ihClass),
output viFcReturnSuper (oiReturnStatus)) in persistence>
if viFcReturnSuper <> 0
then oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then return.
<M-5 run Calculate (output viFcReturnSuper (oiReturnStatus)) in BExpenseNote>
if viFcReturnSuper <> 0
then oiReturnStatus = viFcReturnSuper.
if viFcReturnSuper < 0
then return.