Class PM_WorkTicketStep_bus

Properties

LOCAL cMainTable$="PM_WorkTicketStep"  

[string] Main table for class

LOCAL cIsSysDB=isFALSE  

[boolean] True/False flag denoting whether the main table is a system table

LOCAL cNoUpdateUI=-1  

[integer] Flag to not update into UI record when setting a partial record in the copy from process

LOCAL cHeaderTotalVar$="OriginalBudgetHours, OriginalBudgetLaborCost, OriginalBudgetMaterialsCost, RevisedBudgetHours, RevisedBudgetLaborCost, RevisedBudgetMaterialsCost, TotalHours, "+"ScheduledHours, RemainingScheduledHours, TotalLaborCost, TotalLaborVariableOverheadCost, TotalLaborFixedOverheadCost, TotalMaterialsCost, TotalMaterialsOverheadCost, "+"TotalOtherCost, TotalOtherOverheadCost, "  

[string] List of numeric variables in the PM_WorkTicketHeader record that are updated when changes are made to PM_WorkTicketStep

LOCAL itmCOMMENT$="4"  

[string] Constant for item type of Comment

LOCAL cScheduleDays$="Sunday"+SEP+"Monday"+SEP+"Tuesday"+SEP+"Wednesday"+SEP+"Thursday"+SEP+"Friday"+SEP+"Saturday"+SEP  

[string] List of days of the week used for scheduling

LOCAL cAddtlSetCols$="StepText$"  
LOCAL cPerformVendorStatusChecking  
PROPERTY BudgetVar$   * Read Only *

[string] Variable name to use for budget value based work ticket status

PROPERTY Distribution   * Read Only *

[object handle] Value is always 0, this is required when switching detail object handles between steps and materials

PROPERTY UseRevisedBudget   * Read Only *

[boolean] True/False flag for whether to use the revised budget. This is true when the work ticket status is released

PROPERTY StepListFH   * Read Only *

[filehandle] File handle to a *memory* table containing step records for the current work ticket

PROPERTY NewStepNo$  

[string] New Step Number to assign when copying steps

PROPERTY SubassemblyStep  

[boolean] True/False flag for whether the steps being copied are for a subassemblies' template

PROPERTY SubassemblyScalingFactor  

[numeric] Subassembly Scaling Factor. Used when creating steps for a subassemblies' template.

PROPERTY SkipTemplateMaterials  

[boolean] True/False flag for whether to skip copying template materials when copying template steps

PROPERTY StepRenumber  

[boolean] True/False flag for whether to renumber step numbers when copying from a template

PROPERTY StepStart  

[integer] Starting step number when renumbering steps during the copy from a template

PROPERTY StepIncrement  

[integer] Step increment value when renumbering steps during the copy from a template

PROPERTY StepRenumberFH  

[filehandle] File handle to a *memory* table that is populated during the copy of template steps when a template step number is renumbered in the work ticket

PROPERTY StepScheduleFH  

[filehandle] File handle to a *memory* table that is populated during the scheduling of the work ticket

PROPERTY ScaleWorkTicketCopy  

[boolean] True/False flag for whether to scale budgets when copying from a existing work ticket or historical work ticket

PROPERTY SchedulingRequired  

[boolean] True/False flag for whether scheduling is required for the current work ticket. Only applies when enhanced scheduling is being used.

PROPERTY StepTextObj   * Read Only *

[object handle] Object handle to the CI_ExtendedDescription_bus

Methods

FUNCTION AddInStep(stepLineKey$, data$, IOList$)  

Add In Step information for calculating totals

ParameterDescription
stepLineKey$ [input, string] step line key
data$ [input/output, string] totals fields to be added to
IOList$ [input, string] IOlist of the names of the totals fields
Returns [boolean] True, always returns success
FUNCTION AddStepNo(tmpStepNo$, newLineKey$)  

Add Step Number

ParameterDescription
tmpStepNo$ [input, string] Step Number to add
newLineKey$ [output, string] Line Key of new record
Returns [boolean] True if adding new step record is successful, False if it is not added
FUNCTION BuildStepList$()  

Build a list of step numbers for the current work ticket

Returns [string] list of step numbers
FUNCTION ChangeStepCostActivity(stepLineKey$, flag$)  

Change Step Cost Activity

ParameterDescription
stepLineKey$ [input, string] step line key
flag$ [input, string] activity flag value to change to, Y=Yes, N=No
Returns [boolean] True if successful, False if method fails
FUNCTION CheckAllStepsRequiredUDI()  

Check All Steps for Required User Defined Information fields

Returns [boolean] True if all steps have all required UDI fields set, False if not
FUNCTION ClearCopiedList()  

Clear Copied List of template steps

Returns [boolean] True, always returns success
FUNCTION ClearSetFiles()  

Function overridden from SY_LineEntryDetail_bus, overridden to setup memory table with secondary keys

Returns value from the call to the base class.
FUNCTION ClearUDI()  

Clear User Defined Info fields from a step record

Returns [boolean] True, always returns success
FUNCTION CopySingleTemplateStep(templateNo$, templateRevNo$, templateStep$, srcWTClass$, qtyBasis, tmpCopyStepMemo$)  

Copy single template step into current work ticket

ParameterDescription
templateNo$ [input, string] template number to copy from
templateRevNo$ [input, string] template revision number to copy from
templateStep$ [input, string] template step number to copy from
srcWTClass$ [input, string] work ticket class code assigned to template
qtyBasis [input, numeric] quantity basis
tmpCopyStepMemo$ [input, string] Y/N copy step memos from source
Returns [boolean] True if copy successful, False if not successful
FUNCTION CopySingleWorkTicketHistoryStep(srcWorkTicketKey$, srcStep$, srcWTClass$, qtyBasis, tmpCopyStepMemo$, tmpCopyBudget$)  
FUNCTION CopySingleWorkTicketHistoryStep(srcWorkTicketKey$, srcStep$, srcWTClass$, qtyBasis, tmpCopyStepMemo$, tmpCopyBudget$, scaleParam)  

Copy single work ticket history step into current work ticket

ParameterDescription
srcWorkTicketKey$ [input, string] work ticket key to copy from
srcStep$ [input, string] step number to copy from
srcWTClass$ [input, string] work ticket class code assigned to source work ticket
qtyBasis [input, numeric] quantity basis
tmpCopyStepMemo$ [input, string] Y/N copy step memos from source
tmpCopyBudget$ [input, string] Copy Budget, B-budget, A-actual
scaleParam {optional} [input, boolean] True/False scale budget amounts and materials quantities
Returns [boolean] True if copy successful, False if not successful
FUNCTION CopySingleWorkTicketStep(srcWorkTicketKey$, srcStep$, srcWTClass$, qtyBasis, tmpCopyStepMemo$)  
FUNCTION CopySingleWorkTicketStep(srcWorkTicketKey$, srcStep$, srcWTClass$, qtyBasis, tmpCopyStepMemo$, scaleParam)  

Copy single work ticket step into current work ticket

ParameterDescription
srcWorkTicketKey$ [input, string] work ticket key to copy from
srcStep$ [input, string] step number to copy from
srcWTClass$ [input, string] work ticket class code assigned to source work ticket
qtyBasis [input, numeric] quantity basis
tmpCopyStepMemo$ [input, string] Y/N copy step memos from source
scaleParam {optional} [input, boolean] True/False scale budget amounts and materials quantities
Returns [boolean] True if copy successful, False if not successful
FUNCTION CopyTemplateSteps(tempNo$, templateRevNo$, srcWTClass$, tmpCopyStepMemo$)  
FUNCTION CopyTemplateSteps(tempNo$, templateRevNo$, srcWTClass$, tmpCopyStepMemo$, templateSeq$)  

Copy template steps into current work ticket

ParameterDescription
tempNo$ [input, string] template number to copy from
templateRevNo$ [input, string] template revision number to copy from
srcWTClass$ [input, string] work ticket class code assigned to template
tmpCopyStepMemo$ [input, string] Y/N copy step memos from source
templateSeq$ {optional} [input, string] sub assembly explosion level template is from
Returns [boolean] True if copy successful, False if not successful
FUNCTION CopyWorkTicketHistorySteps(srcWorkTicketKey$, tmpCopyBudget$, srcWTClass$, tmpCopyStepMemo$, tmpStartDate$)  

Copy Work Ticket Steps from a source work ticket into current work ticket

ParameterDescription
srcWorkTicketKey$ [input, string] source work ticket key to copy from
tmpCopyBudget$ [input, string] Copy Budget, B-budget, A-actual
srcWTClass$ [input, string] work ticket class code assigned to source work ticket
tmpCopyStepMemo$ [input, string] Y/N copy step memos from source
tmpStartDate$ [input, string] production start date for adjusting step production start and end dates
Returns [integer] 1 if copy successful, 0 if not successful, -1 if errors encountered
FUNCTION CopyWorkTicketSteps(srcWorkTicketKey$, srcWTClass$, tmpCopyStepMemo$, tmpStartDate$)  

Copy Work Ticket Steps from a source work ticket into current work ticket

ParameterDescription
srcWorkTicketKey$ [input, string] source work ticket key to copy from
srcWTClass$ [input, string] work ticket class code assigned to source work ticket
tmpCopyStepMemo$ [input, string] Y/N copy step memos from source
tmpStartDate$ [input, string] production start date for adjusting step production start and end dates
Returns [integer] 1 if copy successful, 0 if not successful, -1 if errors encountered
FUNCTION CreateStepZero()  

Create Step Zero for a new work ticket and steps are not allowed

Returns [boolean] True if creating step zero record is successful, False if it is not created
FUNCTION DeleteLine(delKey$)  

Function overridden from SY_LineEntryDetail_bus, overridden to manage materials relationships with steps

ParameterDescription
delKey$ [input, string] key of line to delete
Returns value from the call to the base class.
FUNCTION DistributionRequired()  

Function overridden from SY_LineEntryTierDetail_bus, overridden to manage having two detail classes, one for steps and one for materials

ParameterDescription
delKey$ [input, string] key of line to delete
FUNCTION DoStepsOnHoldExist()  

Method to determine if steps that are on hold exist.

Returns [boolean] True if a step record exists that is assigned to a hold status, False if none exist
FUNCTION GetContext$(destTable$)  

Get the contexts available for a table

ParameterDescription
destTable$ [input,string] table name
Returns [string] all contexts available for a given table
FUNCTION GetContextSourceTables$(context$)  

Get the source table for a context

ParameterDescription
context$ [input,string] context
Returns [string] source table for a given context
FUNCTION GetNextStepNo$()  

Get Next Step Number

Returns [string] Next Step Number, blank if no step number is available
FUNCTION GetStepLineKey$(tmpStepNo$)  

Get Step Line Key value

ParameterDescription
tmpStepNo$ [input, string] step number
Returns [string] Line Key for record with step number, blank if no record exists
FUNCTION GetStepLineKeyList$()  

Get Step Line Key List

Returns [string] list of step line keys for current work ticket
FUNCTION GetStepNo$(tmpStepLineKey$)  

Get Step Number value for a specific step line key

ParameterDescription
tmpStepLineKey$ [input, string] step line key
Returns [string] Step Number for record with step line key, blank if no record exists
FUNCTION InitWorkTable()  

Function overridden from SY_LineEntryDetail_bus, overridden to add a field for the step text which is stored in CI_ExtendedDescription

Returns value from the call to the base class.
FUNCTION PrepareStepList$()  

Prepare Step List, both as a list of step numbers and populating a *memory* table accessible with the file handle property StepListFH

Returns [string] list of step numbers
FUNCTION PrepareStepsToSchedule$()  

Prepare Steps To Schedule, both as a list of step numbers to schedule and populating a *memory* table accessible with the file handle property StepScheduleFH

Returns [string] list of step numbers to schedule
FUNCTION RecalcBudget()  
FUNCTION RecalcBudget(step$)  
FUNCTION RecalcBudget(step$, recalcMatlsOnly)  

Recalculate budget for a specific step or all steps

ParameterDescription
step$ {optional} [input, string] specific step number to recalculate for
recalcMatlsOnly {optional} [input, boolean] True/False recalculate material budgets only
Returns [boolean] True, always returns success
FUNCTION ResetRow(tmpKey$)  

Function overridden from SY_LineEntryDetail_bus, overridden to allow for step text to be reset

Returns value from the call to the base class.
FUNCTION ScaleSteps(tmpOriginalQuantity, tmpRevisedQuantity)  

Scale Steps. When quantity planned is changed on the header, steps and materials will be scaled. tmpOriginalQuantity [input, numeric] Original quantity planned tmpRevisedQuantity [input, numeric] Revised quantity planned to scale to

Returns [boolean] True, always returns success
FUNCTION ScheduleApply()  

Schedule Apply when using enhanced scheduling

Returns [boolean] True if successful, False if method fails
FUNCTION ScheduleCleanup()  

Schedule Cleanup when using enhanced scheduling

Returns [boolean] True, always returns success
FUNCTION ScheduleWorkTicket(tmpScheduleDirection$, tmpFirstStep$, tmpDate$, tmpOverrideMax, tmpCalcStart$, tmpCalcDue$)  
FUNCTION ScheduleWorkTicket(tmpScheduleDirection$, tmpFirstStep$, tmpDate$, tmpOverrideMax, tmpCalcStart$, tmpCalcDue$, tmpApplySchedule)  

Schedule Work Ticket

ParameterDescription
tmpScheduleDirection$ [input, string] scheduling direction, F=Forward, B=Backward
tmpFirstStep$ [input, string] first step number for scheduling
tmpDate$ [input, string] date to begin scheduling from
tmpOverrideMax [input, boolean] True/False override maximum scheduling date
tmpCalcStart$ [output, string] calculated production start date
tmpCalcDue$ [output, string] calculated production due date
tmpApplySchedule {optional} [input, boolean] True/False apply schedule after calculation is completed
Returns [integer] 1=Success, 0=Failure, -1=Warning the maximum scheduling date exceeded
FUNCTION SetActCodeAndWorkCenter(value1$, value2$)  

Set the Activity Code and Work Center fields

ParameterDescription
value1$ [input, string] Activiy Code value to set
value2$ [input, string] Work Center value to set
Returns [boolean] True if successful, False if method fails
FUNCTION SetHeader(header$)  

Set current header information in the step business object

ParameterDescription
header$ [input,string] key value of current header for the entry
Returns [boolean] True if successful, False if method fails
FUNCTION SortSteps()  

Sort Step Lines by Step Number

Returns [boolean] True, always returns success
FUNCTION ValidateCopyFrom(tmpCopyFrom$, tmpCopyTemplate$, tmpCopyTemplateRev$, tmpCopyWTKey$, tmpCopyStep$, tmpHasStepMemos$, tmpStepDesc$)  

Validate Copy From. Used when copying from a template, open work ticket or work ticket from history.

ParameterDescription
tmpCopyFrom$ [input, string] copy from, T=template, O=open work ticket, H=work ticket history
tmpCopyTemplate$ [input, string] template number to use to validate step
tmpCopyTemplateRev$ [input, string] template revision number to use to validate step
tmpCopyWTKey$ [input, string] work ticket key to use to validate step
tmpCopyStep$ [input, string] step number to use to validate step
tmpHasStepMemos$ [output, string] Y/N does the step being copied from have memos
tmpStepDesc$ [output, string] step description when step is valid
Returns [boolean] True if step number is valid, False if not
FUNCTION ValidateGroupAdminRights()  

Validation Group, Does current user have administrative rights?

Returns [boolean] True if integrated, False if not
FUNCTION ValidateGroupAdvanced()  

Validation Group, Is P/M Options set to use enhanced scheduling?

Returns [boolean] True if enhanced scheduling is enabled, False if not
FUNCTION ValidateGroupPurchaseOrder()  

Validation Group, Does parent item code bill have options?

Returns [boolean] True if integrated, False if not
FUNCTION ValidateGroupStepRequired()  

Validation Group, Is the Purchase Order module integrated with Production Management?

Returns [boolean] True if integrated, False if not
FUNCTION ValidateStepLineKey(stepLineKey$)  
FUNCTION ValidateStepLineKey(stepLineKey$, stepRec$, stepIOL$)  

Validate Step Line Key exists for current work ticket. Optionally can return step record and iolist.

ParameterDescription
stepLineKey$ [input, string] Step Line Key value to validate exists
stepRec$ {optional} [output, string] If StepLineKey$ exists, step record
stepIOL$ {optional} [output, string] If StepLineKey$ exists, step iolist
FUNCTION Write()  

Function overridden from SY_LineEntryDetail_bus, overridden to check for required user defined info fields

Returns value from the call to the base class.

Properties inherited from: CI_VendorNo_val

HoldPayment, SeparateCheck

Properties inherited from: PM_Constant

actClassEMPLOYEE$, actClassGENERAL$, actClassMACHINE$, actClassOUTSIDESVC$, capTimeNO$, capTimeNOEDIT$, capTimeYES$, earnTypeALLOCTIPS$, earnTypeEXCLUDETIPCALC$, earnTypeEXEMPTTIPS$, earnTypeFRINGE$, earnTypeMISC$, earnTypeOVERTIME$, earnTypeREGULAR$, earnTypeTAXABLETIPS$, earnTypeTIMEOFF1$, earnTypeTIMEOFF2$, earnTypeTIMEOFF3$, cAllEarningsTypes$, earnMethodADDAMOUNT$, earnMethodFIXED$, earnMethodSTANDARD$, cAllEarnMethods$, lttLABOR$, lttCREW$, lttMISC$, lttINOUT$, lttCOST$, dpcSTANDARD$, dpcAVERAGE$, dpcLAST$, overheadTypeAMOUNT$, overheadTypePERCENT$, prtPickNONE$, prtPickBYWHSE$, prtPickBYTICK$, tcmCodeACTUAL$, tcmCodeBUDGET$, tcmCodeSTANDARD$, tcmCodeLOWER$, tcmDescACTUAL$, tcmDescBUDGET$, tcmDescSTANDARD$, tcmDescLOWER$, trnLABOR$, trnMATERIALS$, trnCLOSE$, trnCOMPLETION$, trcSTATUS$, trcLABOR$, trcINVENTORY$, trcDIRECTCHARGE$, trcINVOICE$, trcCLOSE$, trcSCRAP$, udiSTRING$, udiNUMBER$, udiYESNO$, udiCODE$, udiDATE$, mftCodeSALESORDER$, mftCodeSALESORDERLINE$, mftCodeWORKTICKET$, mftCodeINVENTORY$, mftDescSALESORDER$, mftDescSALESORDERLINE$, mftDescWORKTICKET$, mftDescINVENTORY$, wtsOPEN$, wtsQUOTE$, wtsRELEASED$, wtsCLOSED$, wtsDELETED$, lbrIssMethodAUTOISSUE$, lbrIssMethodBACKFLUSH$, lbrIssMethodMANUAL$, matIssMethodAUTOISSUE$, matIssMethodBACKFLUSH$, matIssMethodMANUAL$, prtWORKTICKET$, prtOPERATIONTICKET$, prtCOMPLETEMISSINGCOST$, prtCOMPLETEVARFROMSTD$, prtCLOSEMISSINGCOST$, prtCLOSEVARFROMSTD$, prtCLOSECOSTLEDGER$, prtPICKSHEET$, drtBACKOUT$, drtADDIN$, drsNEW$, drsUPDATED$, drsCOMPLETED$, schFIXED$, schACTSPERHOUR$, schHOURSPERACT$, scaleNOSCALING$, scalePRODUCTIONRUN$, scalePARENTSPERTEMPLATE$, scaleTEMPLATESPERPARENT$, stepZERO$, dfltClosureWorkCenter$

Properties inherited from: SY_Customization

cDummyIol$

Properties inherited from: SY_LineEntryDetail_Bus

cActivityLogDelete$, cActivityLogDtlLevel$, HeaderKy$, HeaderHasLines, ReloadGrid, ValidHeader, NumberOfLines

Methods inherited from: CI_ActivityCode_val

ClassValidateActivityCode()

Methods inherited from: CI_APDivision_val

ClassValidateAPDivision()

Methods inherited from: CI_MFGEmployee_Val

ClassValidateMFG_Employee()

Methods inherited from: CI_StatusCode_val

ClassValidateStatusCode()

Methods inherited from: CI_ToolCode_val

ClassValidateToolCode()

Methods inherited from: CI_VendorNo_val

ClassValidateVendorNo()

Methods inherited from: CI_WorkCenter_Val

ClassValidateWorkCenter()

Methods inherited from: PM_Constant

BuildAlternateIOL$(), BuildMemoryFile(), ConvertCalendarToJulian(), ConvertJulianToCalendar$(), FormatTime$(), HHMMToMinutes(), HHMMToNum(), LoadCustomLabelConstants(), NumToHHMM$(), TimeToHHMM()

Methods inherited from: SY_Customization

GetCustomizations(), PostTableRead(), PreNextRecord(), PreTableWrite()

Methods inherited from: SY_LineEntryDetail_Bus

AccumulateBatchTotals(), AddIn(), AddLine(), AddPrimarySrc(), BackOut(), ClearBindings(), ClearLine(), ClearSetFiles(), CommitRow(), DeleteLine(), EditLine(), GetBatchTotalVars(), GetEditKey$(), GetInsertSeq$(), GetSequenceLengths(), InitWorkTable(), InsertLine(), QuickRowLoad(), RemovePrimarySrc(), ResequenceLine(), ResetLine(), ResetRow(), SetBatchTotalVars(), SetHeader(), SetKey(), SwapLines(), ValidateLines(), Write(), ClearSetFileDeleteWorkTable(), ClearSetFileWorkTable(), CommitRowRemove(), CommitRowWrite(), PostDeleteRec(), PostWriteRec(), RenumberSequence(), WriteWorkTable()