|
FUNCTION BatchPendingTransfer() |
Function is called from UI when Batch Transfer is done, this will dirty the cFileChanged flag, so that if this was the only change that the
save of the batch will still occur.
|
| Returns |
Always returns retSUCCESS(1) |
|
|
FUNCTION BatchTransfers(memFH) |
Function that receives memory file handle for batch transfers to be done as part of the CommitRow()
|
| Parameter | Description |
| [input, |
fileHandle] Memory file handle from the UI, with the transactions that need to be transferred to another batch. |
|
| Returns |
Alwyas returns retSUCCESS(1) |
|
|
FUNCTION Clear() |
Function overridden from SY_Maint, overridden to clean up lock file for the record.
|
| Returns |
value from the call to the base class. |
|
|
FUNCTION ClearSetFiles() |
Function overridden from SY_Maint to clean up lock file for the records associated with the Batch + Date
|
| Returns |
Returns the value from the call to the base class in SY_Maint |
|
|
FUNCTION CommitRow() |
Function overridden from SY_Maint. Overridden to handle batch transfers after CommitRow() from the base class has finished.
|
|
|
| Value | Description |
| retSUCCESS(1) |
If committing of rows was successful and any batch transfers were successful |
| retFAILURE(0) |
If an error occurred in the committing of the rows to the physical table or any batch transfers had errors. |
|
|
FUNCTION Delete(key$) |
Function will delete the current labor entry record. This routine will verify the work ticket & step number aren't in use before allowing delete.
Also, the lock file record will be cleaned up.
|
| Parameter | Description |
| key$ |
[input, string] key to be deleted from the PM_LaborEntry table. |
|
|
|
| Value | Description |
| retSUCCESS(1) |
If record was successfully deleted |
| retFAILURE(0) |
If record could not be deleted |
|
|
FUNCTION DeleteAllRows() |
Function will delete all records currently being worked on in the data sheet. This function will not work unless in "SET" mode.
|
|
|
| Value | Description |
| retSUCCESS(1) |
If all rows were successfully deleted |
| retFAILURE(0) |
If not in "SET" mode. |
|
|
FUNCTION DeleteBatch(batch$) |
Function overridden from base class SY_BatchMaintSet to set a flag (cInBatchDelete) indicating that a delete batch is in progress.
|
| Parameter | Description |
| batch$ |
[input, string] Batch number to be deleted. |
|
| Returns |
[boolean] returns value returned form call to base class SY_BatchMaintSet |
|
|
FUNCTION GetCrewExplosionFile() |
Retrieves the memory file handle created when a labor crew record is exploded into individual employee records. This should only be called
if the property CrewRecsExploded is greater than zero and following a write of a crew record.
|
| Returns |
[filehandle] Returns the cCrewExpFH filehandle, that is created during the PostWrite() of a crew type transaction. |
|
|
FUNCTION GetDatesWithEntries() |
Populates a memory table with one record for each date, and a total of regular hours, overtime hours, miscellaneous hours, and
and a total labor cost. This will be restricted to the current batch only.
|
| Returns |
[filehandle] Filehandle to a memory table with data for the entries. One record per date. |
|
|
FUNCTION GetEmployeeEntries(transDate$, empKey$) |
Populates a memory table with entries for the given employee for the given transaction date. The transactions returned will need to be in
the current batch. The file handle to this memory table will be returned to the calling function.
|
| Parameter | Description |
| transDate$ |
[input, date] Transaction Date to inquire on |
| empKey$ |
[input, string] Employee Key to inquire on. |
|
| Returns |
[filehandle] Filehandle to a memory table with data for the entries. |
|
|
FUNCTION GetNextSequenceNo$(transDate$, transType$, empKey$, workTicket$, stepKey$) |
Function will search the PM_LaborEntry table and return the next sequence number for a transaction.
|
| Parameter | Description |
| transDate$ |
[input, date] Transaction Date for the current record |
| transType$ |
[input, string] Transaction Type for the current record |
| empKey$ |
[input, string] Employee Key for the current record |
| workTicket$ |
[input, string] Work Ticket number for the current record |
| stepKey$ |
[input, string] Step line key of the Step number for the current record |
|
| Returns |
[string] returns a zero-padded sequence number, to be used for creating new keys. |
|
|
FUNCTION GetNextTransferBatch(nextBatch$) |
Function will get the next batch number. This function is used in the UI in the Transfer Batch dialogue.
|
| Parameter | Description |
| nextBatch$ |
[output, string] Next batch number is returned. |
|
| Returns |
Always returns retSUCCESS(1) |
|
|
FUNCTION GetOpenEntries$(opType$, transDate$, transType$, empKey$) |
|
FUNCTION GetOpenEntries$(opType$, transDate$, transType$, empKey$, workTicket$, stepKey$) |
Function to query the PM_LaborEntry table for transactions that match the given arguments.
|
| Parameter | Description |
| opType$ |
[input, string] operation type, this has 2 valid values. "C" for check, to indicate that records exist that match and "E" for Entries, which will retrieve all entries that match. |
| transDate$ |
[input, date] Transaction date to search for |
| transType$ |
[input, string] Transaction Type to search for |
| empKey$ |
[input, string] Employee key to search for |
| workTicket$ |
[input, string] {optional} Work Ticket to search for |
| stepKey$ |
[input, string] {optional} Step number line key to search for |
|
|
|
| Value | Description |
| if |
opType="C" returns either "" for no records found or "FOUND" if an entry was found that matches the criteria |
| if |
opType="E" returns concatenated list of keys that match. |
|
|
FUNCTION GetStepLineKey$(workTicket$, step$) |
Function returns the step line key for the given work ticket and step number
|
| Parameter | Description |
| workTicket$ |
[input, string] work ticket number that the step belongs to |
| step$ |
[input, string] step number on the work ticket. |
|
| Returns |
[string] returns the StepLineKey$ for the given work ticket and step number. |
|
|
FUNCTION GetStepLookup$(workTicket$) |
Function returns the lookup name to be used within the UI. This will be determined by whether the work ticket is only found in history.
|
| Parameter | Description |
| workTicket$ |
[input, string] work ticket number that the step belongs to |
| stepKey$ |
[input, string] step line key of the step on the work ticket. |
|
| Returns |
[string] returns the StepNo$ for the given work ticket and step line key. |
|
|
FUNCTION GetStepNo$(workTicket$, stepKey$) |
Function returns the step number for the given step line key
|
| Parameter | Description |
| workTicket$ |
[input, string] work ticket number that the step belongs to |
| stepKey$ |
[input, string] step line key for the step on the work ticket. |
|
| Returns |
[string] returns the StepNo$ for the given work ticket and step line key |
|
|
FUNCTION IsEmployeeClockedIn(transDate$, empKey$) |
Function determines whether employee has been clocked in for the given date.
|
| Parameter | Description |
| transDate$ |
[input, date] date to be queried |
| empKey$ |
[input, string] employee key to be used to look up. |
|
|
|
| Value | Description |
| True |
if employee is clocked in for the given day. |
| False |
if employee has not clocked in for the given day |
|
|
FUNCTION PieceRate() |
Checks if activity code/work center in the current record has piece rate set up
|
|
|
| Value | Description |
| True |
if piece rate is set up |
| False |
if piece rate is not set up |
|
|
FUNCTION SetBatchTotalVars(vars$) |
Function to return the batch total variables. This class maintains no batch totals.
|
| Parameter | Description |
| vars$ |
[input, string] list of variables to set. |
|
| Returns |
Always returns retSUCCESS(1) |
|
|
FUNCTION SetFilter(whereClause$) |
|
FUNCTION SetFilter(whereClause$, restrictKey$) |
Override to base class function found in SY_BatchMaintSet. This is overridden to create a lock file for the current
set of data. The name of the lock file will be Company Code + Batch Number + Transaction Date
|
| Parameter | Description |
| whereClause$ |
[input, string] Where clause that is applied to select of the physical table into the memory tables |
| restrictKey$ |
[input, string] {optional} This value is applied to the select as part of the begin/end, this value should be padded appropriately. |
|
| Returns |
[boolean] Returns the value from the call to the base class |
|
|
FUNCTION TrackingQtyCompleted$(workTicket$) |
Function reads the work ticket class table with the work ticket class used on the given work ticket, and retrieves the flag TrackCompletedQuantity and returns it.
If a record cannot be found then "N" will be returned.
|
| Parameter | Description |
| workTicket$ |
[input, string] Work Ticket Key to lookup in history and Work Ticket Class tables |
|
| Returns |
[string] Value of TrackCompletedQuantity from PM_WorkTicketClass or "N" if not found. |
|
|
FUNCTION ValidateGroupAllowPunchInOut() |
Function is used in conjunction with hiding of groups of fields in the UI grid. This hides the AllowPunchInOut group of fields
if Allow Entry of Punch In/Out Time in P/M Options is equal to "Yes"
|
|
|
| Value | Description |
| retSUCCESS(1) |
if P/M Option for Set Punch In/Out from Work Ticket Time is equal to "Y" |
| retFAILURE(0) |
if P/M Option for Set Punch In/Out from Work Ticket Time is not equal to "Y" |
|
|
FUNCTION ValidateGroupCaptureTime() |
Function is used in conjunction with hiding of groups of fields in the UI grid. This hides the CaptureTime group of fields
if Capture Time in Labor Entry in P/M Options is not equal to "No"
|
|
|
| Value | Description |
| retSUCCESS(1) |
if P/M Option for Capture Time in Labor Entry is not equal to "N" |
| retFAILURE(0) |
if P/M Option for Capture Time in Labor Entry is equal to "N" |
|
|
FUNCTION ValidateGroupCaptureTimeNoEdit() |
|
FUNCTION ValidateGroupCaptureWorkPerformed() |
Function is used in conjunction with hiding of groups of fields in the UI grid. This hides the CaptureWorkPerformed group of fields
if Capture Description of Work Performed in P/M Options is equal to "No"
|
|
|
| Value | Description |
| retSUCCESS(1) |
if P/M Option for Capture Description of Work Performed is equal to "Y" |
| retFAILURE(0) |
if P/M Option for Capture Description of Work Performed is not equal to "Y" |
|
|
FUNCTION ValidateGroupTypeRequired() |
Function to ensure fields in this group cannot be set until the Transaction Type is set.
|
|
|
| Value | Description |
| retSUCCESS(1) |
If Transaction Type has been set. |
| retFAILURE(0) |
If Transaction Type has not been set. |
|
|
FUNCTION ValidateStepNo(value$) |
Function will take the given value for step and format it, and ensure it exists and then translate that to a step line key.
It will then use SetValue() to validate the line key.
|
| Parameter | Description |
| value$ |
[input, string] Step number value to be validated. |
|
|
|
| Value | Description |
| retSUCCESS(1) |
if step successfully validated and StepLineKey successfully validated |
| retFAILURE(0) |
if step not found or validation of StepLineKey fails. |
|
|
FUNCTION ValidateTransferBatch(value$) |
Function will take the given value for Transfer Batch # and validate it using the GL_CompanyActiveBatch_svc object.
|
| Parameter | Description |
| value$ |
[input, string] Value to be validated. |
|
|
|
| Value | Description |
| retSUCCESS(1) |
Validation for this batch number passed, and the user is allowed to use this batch. |
| retFAILURE(0) |
Validation for this batch number failed, due to being in-use, invalid number, or an existing private batch |
|
|
FUNCTION Write() |
Function writes the current record into the PM_LaborEntry table.
|
| Returns |
[boolean] retSUCCESS(1) if record written successfully, retFAILURE(0) if record is not written successfully |
|