icDraftReference | input | character | Description for the draft instance. This parameter will have a value when creating a draft instance. |
icDraftFormName | input | character | This parameter will have a value when creating a draft instance. |
ilDraftIsShared | input | logical | This parameter will have a value when creating a draft instance. |
oiReturnStatus | output | integer | Return status of the method. |
<ANCESTOR-CODE> /* ================================================================= */ /* If the instance contains uncommitted cinvoices, do not wait for */ /* housekeeping to release the reserved number. Release it now. */ /* When saving a draft instance, store the number to protect it */ /* from being released by housekeeping. */ /* (do not release numbr when cancelling a draft) */ /* ================================================================= */ if viCurrentDraftInstanceId = 0 then for each tExpNote where tExpNote.tc_Status = "N":U and tExpNote.ExpNoteNumber <> 0 and tExpNote.ExpNoteNumber <> ?: assign vhFcComponent = ?. if icDraftReference = "" then do: <M-2 run ReleaseNumber (input viCompanyId (iiCompanyId), input tExpNote.ExpNoteYear (iiNumbrYear), input 'EXPNOTE':U (icNumbrType), input tExpNote.ExpNoteNumber (iiNumbr), input viFcCurrentInstanceId (iiInstanceId), input vcFcComponentName (icClassName), output viFcReturnSuper (oiReturnStatus)) in BNumber> end. else do: <M-3 run StoreNumber (input viCompanyId (iiCompanyID), input tExpNote.ExpNoteYear (iiNumbrYear), input 'EXPNOTE':U (icNumbrType), input tExpNote.ExpNoteNumber (iiNumbr), output viFcReturnSuper (oiReturnStatus)) in BNumber> end. if viFcReturnSuper < 0 or (viFcReturnSuper > 0 and oiReturnStatus = 0) then assign oiReturnStatus = viFcReturnSuper. if oiReturnStatus < 0 then return. end.