Class PM_WorkTicketDetail_bus

Properties

LOCAL cMainTable$="PM_WorkTicketDetail"  

[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 billCATEGORYNUM=9  

[integer] Constant value indicating the maximum number of bill option categories

LOCAL cImportFieldDelim$=", "  

[string] Import Field Delimiter

LOCAL cDistDstIOList$=CPL("IOLIST WorkTicketKey$, LineKey$, ItemCode$, WarehouseCode$, Valuation$, UnitOfMeasureConvFactor, QuantityRequired, DetailBus, cLotSerRefDate$, cLotSerTransType")  
LOCAL cDistSrcIOList$=CPL("IOLIST WorkTicketKey$, LineKey$, ItemCode$, WarehouseCode$, Valuation$, UnitOfMeasureConvFactor, QuantityRequired, _OBJ, cLotSerRefDate$, cLotSerTransType")  
LOCAL cDistObject$="PM_WorkTicketTierDistribution_bus"  
LOCAL cDistQtyVar$="QuantityIssued"  
LOCAL cLotSerTransType  
LOCAL cPerformVendorStatusChecking  
PROPERTY InAutoIssue  

[boolean] True/False flag for whether processing is being done as part of auto issue of materials

PROPERTY InScaling  

[boolean] True/False flag for whether processing is being done as part of scaling the materials. When changes are made to QuantityRequired/BaseQuantity the QuantityPerParent will not be changed.

PROPERTY ItemValuation$   * Read Only *

[string] Item Valuation of current item code

PROPERTY MaterialsListFH   * Read Only *

[filehandle] File handle to a *memory* table that contains a list of materials for current work ticket

PROPERTY BudgetCost   * Read Only *

[numeric] Budget Cost of materials

PROPERTY SourceQuantity  

[numeric] Source Quantity from work ticket being copied from

PROPERTY UseActualQuantityIssued  

[boolean] True/False Use Actual Quantity Issued when copying materials

PROPERTY ExtensionQtyCol$="ExtensionAmt"  

[string] List of Extension Quantity Columns used by Item Code UI validation logic

Methods

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

Add In Material 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 CalculateCost()  

Calculate Cost for item code

Returns [boolean] True, always returns success
FUNCTION CalculateQtyAvailable()  
FUNCTION CalculateQtyAvailable(stdQtyAvail)  
FUNCTION CalculateQtyAvailable(stdQtyAvail, stdUM$)  

Calculate Quantity Available

ParameterDescription
stdQtyAvail {optional} [output, numeric] Quantity Available
stdUM$ {optional} [output, string] Standard Unit Of Measure
Returns [numeric] Quantity Available
FUNCTION CommitRow()  

Overrides base class function from SY_LineEntryTierDetail. This is done to add logic to handle dynamic inventory

Returns [boolean] True if successful, False if method fails
FUNCTION CopyBillDetail(tmpBillNo$, tmpBillRevNo$, tmpBillOptions$, tmpExplodeSubassemblies$)  
FUNCTION CopyBillDetail(tmpBillNo$, tmpBillRevNo$, tmpBillOptions$, tmpExplodeSubassemblies$, destStepLineKey$, qtyBasis)  

Copy Bill Detail. Arguments for this method should match the current values of the fields in the work ticket header.

ParameterDescription
tmpBillNo$ [input, string] bill number to copy from
tmpBillRevNo$ [input, string] bill revision number to copy from
tmpBillOptions$ [input, string] bill option codes to copy from
tmpExplodeSubassemblies$ [input, string] Yes/No/subComponents only flag value whether to explode subassemblies
destStepLineKey$ {optional} [input, string] destination step line key
qtyBasis {optional} [input, numeric] quantity basis for scaling
Returns [boolean] True if copy successful, False if not successful
FUNCTION CopyTemplateMaterials(tempNo$, tempRevNo$, tempStepNo$, pmMaterialsScale, templateScalingMethod$, templateScale$, templateBudgetCalc$, destStepLineKey$)  

Copy Template Materials

ParameterDescription
tempNo$ [input, string] template number to copy from
tempRevNo$ [input, string] template revision number to copy from
tempStepNo$ [input, string] template step number to copy from
pmMaterialsScale [input, numeric] scaling factor for materials
templateScalingMethod$ [input, string] template scaling method
templateScale$ [input, string] Yes/No whether to scale materials
templateBudgetCalc$ [input, string] Yes/No whether the budget is calculated
destStepLineKey$ [input, string] line key for step line
Returns [boolean] True if copy successful, False if not successful
FUNCTION CopyWorkTicketHistoryMaterials(srcWorkTicketKey$, stepLKey$, copyToStepLineKey$)  
FUNCTION CopyWorkTicketHistoryMaterials(srcWorkTicketKey$, stepLKey$, copyToStepLineKey$, qtyBasis)  

Copy Work Ticket Materials from a source work ticket and step in history into current work ticket

ParameterDescription
srcWorkTicketKey$ [input, string] source work ticket key to copy from
stepLKey$ [input, string] Y/N copy source step line key to copy from
copyToStepLineKey$ [input, string] step line key to copy to
qtyBasis {optional} [input, numeric] quantity basis for scaling
Returns [integer] 1 if copy successful, 0 if not successful, -1 if errors encountered
FUNCTION CopyWorkTicketMaterials(srcWorkTicketKey$, stepLKey$, copyToStepLineKey$)  
FUNCTION CopyWorkTicketMaterials(srcWorkTicketKey$, stepLKey$, copyToStepLineKey$, qtyBasis)  

Copy Work Ticket Materials from a source work ticket and step into current work ticket

ParameterDescription
srcWorkTicketKey$ [input, string] source work ticket key to copy from
stepLKey$ [input, string] source step line key to copy from
copyToStepLineKey$ [input, string] step line key to copy to
qtyBasis {optional} [input, numeric] quantity basis for scaling
Returns [integer] 1 if copy successful, 0 if not successful, -1 if errors encountered
FUNCTION DeleteLine(key$)  

Delete Line

ParameterDescription
key$ [input, string] key of line to delete
Returns [boolean] True if successful, False if method fails
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 GetHeaderFields()  

Get Work Ticket header information for current work ticket

Returns [boolean] True, always returns success
FUNCTION ImportFile(file$, destStepLineKey$, qtyBasis)  

Import Materials from an external file

ParameterDescription
file$ [input, string] filename to import materials from
destStepLineKey$ [input, string] destination step line key
qtyBasis [input, numeric] quantity basis for scaling
Returns [integer] 1 if material detail lines are imported, 0 if import fails, -1 if one or more material detail lines fail to import
FUNCTION IssuedMaterialsExist()  

Method to determine if issued materials exist for detail line

Returns [boolean] True if issued materials exist, False if they do not
FUNCTION PrepareMaterialsList()  

Prepare list of materials for the current work ticket. Property MaterialsListFH is a filehandle to a *memory* table containing records.

Returns [boolean] True, always returns success
FUNCTION RecalcMaterialsCost(stepLineKeyFilter$)  

Recalculate Materials Cost for a step

Returns [numeric] Total materials cost for step
FUNCTION ReleaseLines()  

Release Lines, committing quantities required for each item and warehouse on the work ticket

Returns [boolean] True, always returns success
FUNCTION RemoveMaterialsFromStep(stepLineKey$, newStepLKey$)  

Remove Materials From Step, when deleting a step remove all detail lines assigned to that step

ParameterDescription
stepLineKey$ [input,string] step line key being deleted
newStepLKey$ [input,string] new step line key value
Returns [boolean] True, always returns success
FUNCTION ResetLine(lineKey$)  

Function overridden from SY_LineEntryDetail_bus, overridden to delete dynamic materials work file records when a row is reset

ParameterDescription
lineLKey$ [input,string] line key
Returns [boolean] True if successful, False if method fails
FUNCTION ResetMaterialsForSteps(tmpOldSteps$, tmpNewSteps$)  

Reset Materials For Steps, when resetting all rows on the Steps folder this method resets the material detail assigned to those steps For deleted steps, the assigned materials will be removed. For deleted steps that were restored by a Reset All, the assigned materials will be restored.

ParameterDescription
tmpOldSteps$ [input,string] delimited list of step line keys before reset all
tmpNewSteps$ [input,string] delimited list of step line keys after reset all
Returns [boolean] True, always returns success
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 SortLines(stepLineKeyFilter$)  

Sort Material Lines

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

Summarize Material Lines by Step by Item Code. Used during the initial creation of step and material detail.

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

Unrelease Lines, backing out quantities required for each item and warehouse on the work ticket

Returns [boolean] True, always returns success
FUNCTION UpdateStepPromiseDate(stepNo$, newPromiseDate$)  

Update the Step Promise Date on all material records assigned to a specific step

ParameterDescription
stepNo$ [input,string] step number to update
newPromiseDate$ [input,string] new promise date to update to the material records
Returns [boolean] True, always returns success
FUNCTION ValidateGroupItemRequired()  

Validation Group, Is the Item Code field set? returns [boolean] True if integrated, False if not

FUNCTION ValidateGroupItemTypes()  

Validation Group, Is the item type either regular, special or miscellaneous item? returns [boolean] True if integrated, False if not

FUNCTION ValidateGroupNotComment()  

Validation Group, Is the item type not a comment? returns [boolean] True if integrated, False if not

FUNCTION ValidateGroupNotNulWarehouseCode()  

Validation Group, For regular inventory item codes is the warehouse code set? returns [boolean] True if a regular item and the warehouse code is set, False if not

FUNCTION ValidateGroupPurchaseOrder()  

Validation Group, Is the Purchase Order module integrated with Production Management? returns [boolean] True if integrated, False if not

FUNCTION ValidateLines()  

Overrides base class method to skip validation in update returns [boolean] True if successful, False if method fails

FUNCTION VerifyPOLinks()  

Function will scan work ticket detail records for any links to purchase orders and then validate it against the referenced purchase order. If links have been removed or are different on the purchase order side the link references will be removed from the work ticket material line.

Returns [numeric] Returns number of lines changed, a zero indicates no lines were changed.

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_ItemCode_Val

cItemTypes$, cAllowAliasItems, cAliasItemTypes$, cItemCodeDescCol$, cItemTypeCol$, cExtDescKeyCol$, ItemTypes$, AllowAliasItems, AliasItemTypes$, ExtendedDescriptionBusiness, ItemCodeDescCol$, AllowPhantom, AllowEngineering, AllowInactive, InvalidPurchase, IMIntegrated

Properties inherited from: CI_ItemWarehouse

cPrecisionQty, IM_IsSetup

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_LineEntryTierDetail

cDistItemCode$, cDistWarehouseCode$, Distribution, DistributionBalanced, DistributionIOL$, DistributionMessage, ResettingAllLines

Methods inherited from: CI_APDivision_val

ClassValidateAPDivision()

Methods inherited from: CI_Constant

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

Methods inherited from: CI_ItemCode_Val

Write(), PERFORM CheckForAlias(), PERFORM CheckUseIn(), CheckValidBill(), ClassOverrideDescription(), ClassOverrideItemCode(), ClassValidateDescription(), ClassValidateItemCode(), ItemTypeSetDefaults(), PERFORM ItemTypeSetDefaults(), UpdateGridExtendedDescKey(), ValidateGroupNotCurrentItemType()

Methods inherited from: CI_ItemWarehouse

CommitQuantity()

Methods inherited from: CI_UnitOfMeasure_val

ClassValidateUnitOfMeasure()

Methods inherited from: CI_VendorNo_Val

ClassValidateVendorNo()

Methods inherited from: CI_Warehouse_val

SetAllowInactiveRestrictedWhse(), ClassValidateWarehouse(), GetClassName$()

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_LineEntryTierDetail

AddLine(), ClearLine(), ClearSetFiles(), CommitRow(), DeleteLine(), DistributionMissingInfo(), DistributionRequired(), RemoveTiersExpDate(), ResetLine(), SetHeader(), ValidateLines(), WRITE(), ClearLastLine(), DeleteTierLines(), GetMemoryEditKey$(), PostDeleteRec(), PostWriteRec(), ResetRow(), SetCurrentKey(), ValidateAccumulateLines()