Class PM_Template_bus

Properties

LOCAL cMainTable$="PM_Template"  

[string] Name of the table being maintained by this business objects

LOCAL cIsSysDB=isFALSE  

[boolean] Flag to indicate whether main table is defined in the MAS_SYSTEM directory

LOCAL cMaxLevels=99  

[numeric] to store the maximum BOM levels allowed

LOCAL cTemplateTextCol$="TemplateText"  

[string] to store the TemplateHeader.TemplateText variable name used, distinguishing header from sub-header when validating the proper maximum length

PROPERTY RecordChanged   * Read Only *

[boolean] Flag to indicate if the record as been changed; override of base class modified for template text

PROPERTY TemplateDescription$   * Read Only *

[string] to store the TemplateHeader.TemplateDesc$ value; TemplateHeader --> StepNo$ = stepZERO$

PROPERTY TemplateTextExtended$  

[string] to store the ExtendedDescription retrieved from the template record

PROPERTY IsHeader   * Read Only *

[boolean] Flag to indicate if the record is the template header record; TemplateHeader --> StepNo$ = stepZERO$; utilized by the UI class to enable/disable, hide/show of controls included in the Nomads lib.

PROPERTY oExtDesc   * Read Only *

[objhandle] Object handle to the CI_ExtendedDescription_bus

PROPERTY IntegrateWithAP   * Read Only *

[boolean] Flag to indicate when PM is integrated with A/P in PM_Options

PROPERTY IntegrateWithBM   * Read Only *

[boolean] Flag to indicate when PM is integrated with B/M in PM_Options

PROPERTY IntegrateWithPO   * Read Only *

[boolean] Flag to indicate when PM is integrated with P/O in PM_Options

PROPERTY WorkTicketClassRec$   * Read Only *

[string] to store the values of WorkTicketClass record for the work ticket clas code on the current TemplateHeader record; TemplateHeader --> StepNo$ = stepZERO$

PROPERTY WorkTicketClassIOL$   * Read Only *

[string] to store the IOList used to generate WorkTicketClassRec$

PROPERTY PostDeleteErrorNum$   * Read Only *

[string] to store PostDeleteRec() message library number to be used the UI class after executing BT_Delete()

PROPERTY PostDeleteErrorMsg$   * Read Only *

[string] to store PostDeleteRec() resolved message to be displayed by the UI class after executing BT_Delete()

PROPERTY Lines  

Methods

FUNCTION ConfirmDelete()  

Checks tables where Template are assigned, if template and revision number exist in any of those tables it be cannot deleted

Returns [boolean] True = success (1) If able to delete template, False = failure (0) if template is assigned within P/M and cannot be deleted
FUNCTION CopyFromTemplate(sourceTemplate$, sourceRevision$)  
FUNCTION CopyFromTemplate(sourceTemplate$, sourceRevision$, copyMemos)  
FUNCTION CopyFromTemplate(sourceTemplate$, sourceRevision$, copyMemos, sourceStepNo$)  

Method used to copy from another Template

ParameterDescription
sourceTemplate$ [input, string] source TemplateNo to copy
sourceRevision$ [input, string] source RevisionNo to copy
copyMemos {optional} [input, boolean] flag when true (1) will include copying memos from the source template
sourceStepNo$ {optional} [input, string] source StepNo, if blank, all steps will be copied
Returns [boolean] True = success (1), False = failure (0)
FUNCTION CopyFromWorkTicket(sourceWorkTicket$)  
FUNCTION CopyFromWorkTicket(sourceWorkTicket$, copyMemos)  
FUNCTION CopyFromWorkTicket(sourceWorkTicket$, copyMemos, sourceStepNo$)  

Method used to copy from a WorkTicket

ParameterDescription
sourceWorkTicket$ [input, string] source WorkTicket to copy
copyMemos {optional} [input, boolean] flag when true (1) will include copying memos from the source work ticket & work ticket steps
sourceStepNo$ {optional} [input, string] source work ticket StepNo, if blank, all steps will be copied
Returns [boolean] True = success (1), False = failure (0)
FUNCTION CopyFromWorkTicketHistory(sourceWorkTicket$)  
FUNCTION CopyFromWorkTicketHistory(sourceWorkTicket$, copyMemos)  
FUNCTION CopyFromWorkTicketHistory(sourceWorkTicket$, copyMemos, sourceStepNo$)  

Method used to copy from a WorkTicket in history

ParameterDescription
sourceWorkTicket$ [input, string] source WorkTicket to copy
copyMemos {optional} [input, boolean] flag when true (1) will include copying memos from the source work ticket history & work ticket history steps
sourceStepNo$ {optional} [input, string] source work ticket StepNo, if blank, all steps will be copied
Returns [boolean] True = success (1), False = failure (0)
FUNCTION DoStepsExist(tempNo$, revNo$)  

Do steps exist for a template + revision?

ParameterDescription
tempNo$ [input, string] template number
revNo$ [input, string] revision number
Returns [boolean] True if steps exist for the template + revision, 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 GetItemCost(costItemCode$, itemPurchased$, explode$)  

Retrieves the item cost for an item

ParameterDescription
costItemCode$ [input, string] item code to retrieve cost for
itemPurchased$ [input, string] Y/N flag, when 'Y'es, return CI_Item.LastTotalUnitCost as ItemCost
explode$ [input, string] Y/N flag, when 'Y'es, return exploded BOM cost
Returns [numeric] returns the item cost
FUNCTION GetNextRevisionNo(revNo$)  

Return the next logical Revision No for the current TemplateNo

ParameterDescription
revNo$ [output, string] next logical Revision No for the current TemplateNo
Returns [boolean] Always returns success (1)
FUNCTION GetNextStepNo(sNo$)  

Return the next logical Step No for the current TemplateNo

ParameterDescription
sNo$ [output, string] next logical Step No for the current TemplateNo
Returns [boolean] Always returns success (1)
FUNCTION GetUserDefinedInfoCodeDesc$(udiNum)  

Retrieve the UserDefinedInfoCodes code description for a user defined info column

ParameterDescription
udiNum [input, integer] UserDefinedInfo (1 - 5) column
Returns [string] the UserDefinedInfoCodes code description for a user defined info column, null when not found
FUNCTION GetWorkTicketClassInfo(wtcRec$, wtcIOL$)  
FUNCTION GetWorkTicketClassInfo(wtcRec$, wtcIOL$, wtcCode$)  

Retrieve WorkTicketClass column values from the TemplateHeader; TemplateHeader --> StepNo$ = stepZERO$

ParameterDescription
wtcRec$ [output, string] concatenated string using REC() of work ticket class column values
wtcIOL$ [output, string] compiled IOList of columns used to generate wtcRec$
wtcCode$ {optional} [input, string] work ticket class code to retrieve work ticket class code for, if blank the current work ticket class code value will be used.
Returns [boolean] success (1) if TemplateHeader.WorkTicketClassCode found, failure (0) if not
FUNCTION RecalcBudget()  

Method to recalculate material and labor budgets

Returns [boolean] Always returns success (1)
FUNCTION Write()  

Override of base class Write() record method

Returns [boolean] True = success (1), False = failure (0)

Properties inherited from: CI_Constant

itmREGULAR$, itmSPECIAL$, itmCHARGE$, itmCOMMENT$, itmMISC$, valSTANDARD$, valAVERAGE$, valFIFO$, valLIFO$, valLOT$, valSERIAL$, typFINISHEDGOODS$, typRAWMATERIALS$, typDISCONTINUED$, typKIT$, proMAKE$, proBUY$, proSUBCONTRACT$, proMAKETOORDER$, proBUYTOORDER$, tierFIFO$, tierLIFO$, tierLOT$, tierSERIAL$, upceanTYPENONE$, upceanTYPEOTHER$

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_LineEntryHeader_bus

BatchEnabled, Lines, ScriptPreTotalsDone

Methods inherited from: CI_ActivityCode_Val

ClassValidateActivityCode()

Methods inherited from: CI_APDivision_val

ClassValidateAPDivision()

Methods inherited from: CI_Constant

GetCalendarEndingDate(), GetDefaultExtendedDescriptionKey$(), UPCEANCheckDigit(), UPCEANFetch(), UPCEANUpdate()

Methods inherited from: CI_MFGEmployee_Val

ClassValidateMFG_Employee()

Methods inherited from: CI_NextNumber

FormatLotSerialNo$(), IncrementSerialNo(), NextNumber(), FindPrefix(), GetColumnInfo(), IncrementNumber()

Methods inherited from: CI_StatusCode_Val

ClassValidateStatusCode()

Methods inherited from: CI_ToolCode_Val

ClassValidateToolCode()

Methods inherited from: CI_VendorFormatter

ParseVendor()

Methods inherited from: CI_VendorNo_Val

ClassValidateVendorNo()

Methods inherited from: CI_WorkCenter_Val

ClassValidateWorkCenter()

Methods inherited from: CI_WorkTicketClass_Val

ClassValidateWorkTicketClass()

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_LineEntryHeader_bus

ActivityLogOverride(), ActivityLogPrepare(), AddLine(), AFMapTotalColumns(), CLEAR(), CommitLines(), DELETE(), Delete(), DeleteLine(), EditLine(), InsertLine(), MoveFirst(), MoveLast(), MoveNext(), MovePrevious(), ResetLine(), ScriptPreTotals(), SetCurrentKey(), SetHeader(), Write(), WriteLine(), ActivityLogCreateFile(), ActivityLogWasLineRenumbered(), ClearLastRecord()