PrintCurrentOrder()
// Change: Table entry checking - attempt to save header record
// before entering a table (this is called by table. Return
// a non-zero if the save failed (i.e., don't enter table)
Function Save_Header Returns Integer
Boolean bHasRec bChanged
Handle hoSrvr
Get Server to hoSrvr // The Header DDO.
Get HasRecord of hoSrvr to bHasRec // Do we have a record?
Get Should_Save to bChanged // Are there any current changes?
// If there is no record and no changes we have an error.
If ( not(bHasRec) and not(bChanged) ) Begin // no rec
Send UserError "You must First Create & Save Main Order Header" ""
Function_Return 1
End
// Attempt to Save the current Record
// request_save_no_clear does a save without clearing.
Send Request_Save_No_Clear
// The save succeeded if there are now no changes, and we
// have a saved record. Should_save tells us if we've got changes.
// We must check the data-sets hasRecord property to see if
// we have a record. If it is not, we had no save.
Get Should_Save to bChanged // is a save still needed
Get HasRecord of hoSrvr to bHasRec // current record of the DD
// if no record or changes still exist, return an error code of 1
If ( not(bHasRec) or (bChanged)) ;
Function_Return 1
End_Function // Save_Header
print the current order. This message will be sent
by the print button
- Integer
hDD - Integer
iNum