Class CI_ItemPrice

Properties

LOCAL cFieldsFromItem$=CPL("IOLIST ItemCode$, ItemType$, PriceCode$, StandardUnitPrice, "+"StandardUnitCost, LastTotalUnitCost, SalesPromotionCode$, "+"SaleMethod$, SalesPromotionPrice, SalesPromotionDiscountPercent, "+"SaleStartingDate$, SaleEndingDate$")  
PROPERTY SO_EnablePriceByTotalQtyBasedOn$   * Read Only *

The value of the 'Enable Price By Total Quantity Based On' parameter from SO_Options.

PROPERTY SO_UnitOfMeasureForTotalQty$   * Read Only *
The value of the 'Unit of Measure for Total Quantity' parameter from SO_Options.
PROPERTY SO_ApplyPricingByTotalQtyAuto$   * Read Only *
The value of the 'Apply Pricing By Total Quantity Automatically' parameter from SO_Options.
PROPERTY PreventItemPriceByTotQtyCalc  
[boolean] Switch used to identify if auto Price By Total Quantity calculation should be made.
PROPERTY ApplyPriceByTotalQty   * Read Only *
[boolean] Flag to determine for which tasks Price By Total Quantity should apply.

Methods

FUNCTION AddInItemPriceByQty(item$, qty, convFactor)  

AddIn for updating quantity values in memory file used to accumulate totals needed for Pricing By Total Quantity.

ParameterDescription
item$ [input, string] ItemCode$ from detail line.
qty [input, numeric] Quantity from detail line.
convFactor [input, numeric] UnitofMeasureConvFactor from detail line.
Returns [numeric] Always returns retSUCCESS.
FUNCTION BackOutItemPriceByQty(oldItem$, oldQty, oldConvFactor)  

BackOut for updating quantity values in memory file used to accumulate totals needed for Pricing By Total Quantity .

ParameterDescription
oldItem$ [input, string] ItemCode$ from old detail line.
oldQty [input, numeric] Quantity from old detail line.
oldConvFactor [input, numeric] UnitofMeasureConvFacor from old detail line.
Returns [numeric] Always returns retSUCCESS
FUNCTION CalculateItemPrice(item$, div$, cust$, pl$, uocf, qty, date$, opt$, price)  
FUNCTION CalculateItemPrice(item$, div$, cust$, pl$, uocf, qty, date$, opt$, price, salePriceUsed)  
FUNCTION CalculateOptionsPrice(item$, opts$)  
FUNCTION RecalcLinePriceByTotQty(date$)  
FUNCTION RecalcLinePriceByTotQty(date$, refreshPriceLevel)  

Recalculates UnitPrice on detail lines based on Pricing By Total Quantity.

ParameterDescription
date$ [input, date] Date used to determine pricing.
refreshPriceLevel {optional} [input, boolean] If true, refresh customer price level on lines (used when customer number changes).
Returns [numeric] True if prices recalculated, false if calculation not done.
FUNCTION ResetItemPriceByQtyTotals()  

Reinitializes memory file used to accumulate totals needed for Pricing By Total Quantity.

Returns [numeric] True if memory file reinitialized, false if not using Pricing By Total Quantity.
FUNCTION SetApplyPriceByTotalQty(value)  

Sets ApplyPriceByTotalQty property.

ParameterDescription
flag [input, boolean] Value to attempt to use for ApplyPriceBytotalQty property.
Returns [boolean] Success unless setting to isTRUE when Pricing By Total Quantity is not used.
FUNCTION WriteItemPriceByQtyTotals(date$)  

Called from Header business objects to recalculate unitprices based on Pricing By Total Quantity if needed.

ParameterDescription
date$ [input, date] Date to use in determining pricing.
Returns [numeric] True if UnitPrices are susessfully recalculated, false if not using Pricing By Total Quantity.
FUNCTION LOCAL LoadPriceByTotQtyWorkTable(item$, qty, convFactor)  

Updates quantity values in memory file for existing records on initial load of detail worktable.

ParameterDescription
item$ [input, string] ItemCode$ value from detail line
qty [input, numeric] Quantity to be used for price calculation
convFactor [input, numeric] Unit of Measure Conversion Factor
Returns [numeric] True if quantity updated to memory file, false if not using Pricing By Total Quantity.
FUNCTION LOCAL PERFORM ReadItemData(item$)  

Reads CI_Item record for specified ItemCode$ and populates iolist with "item." prefix.

ParameterDescription
item$ [input, string] ItemCode$ value to use.
Returns [numeric] True if record found, false if record not found.
FUNCTION LOCAL PERFORM RegularItemPricing()  
FUNCTION LOCAL PERFORM SetPriceByTotQtyVariables()  

Sets variables used to update memory file used to accumulate totals needed for Pricing By Total Quantity.

Returns [boolean] Success if variables set, failure if not using Pricing By Total Quantity.
FUNCTION LOCAL UpdatePricingByTotalQty(item$, qty)  

Updates quantity values in memory file used to accumulate totals needed for Pricing By Total Quantity

ParameterDescription
item$ [input, string] ItemCode$ value from detail line
qty [input, numeric] Quantity to be used for price calculation
Returns [numeric] True if quantity updated to memory file, false if not using Pricing By Total Quantity.
FUNCTION LOCAL ValidateGroupItemPriceByTotQty()  

Sets PreventItemPriceByTotQtyCalc property to isFALSE when changing validating columns that affect the calculation

Returns [numeric] Always returns success.

Properties inherited from: CI_Constant

itmREGULAR$, itmSPECIAL$, itmCHARGE$, itmCOMMENT$, itmMISC$, valSTANDARD$, valAVERAGE$, valFIFO$, valLIFO$, valLOT$, valSERIAL$, typFINISHEDGOODS$, typRAWMATERIALS$, typDISCONTINUED$, typKIT$, proMAKE$, proBUY$, proSUBCONTRACT$

Properties inherited from: SY_Constant

retFAILURE, retSUCCESS, retNEW, retWARNING, retCANCEL, retYES, retNO, msgYES$, msgNO$, msgCANCEL$, msgOK$, msgRETRY$, msgABORT$, msgIGNORE$, msgNOTONFILE$, msgTIMEOUT$, msgDISABLE, msgACTIVE, msgLinkHELP$, msgLinkMSG$, isFALSE, isTRUE, isYES$, isNO$, isBUSY$, edtNONE, edtEXISTS, edtNEW, ctlDISABLE, ctlENABLE, ctlSHOW, ctlHIDE, ctlLOCK, ctlUNLOCK, ctlLOCKORDISABLE, ctlUNLOCKORENABLE, popHIDE, popDISABLE, popSHOW, popSHOWCHECKED, grdMODEVIEW, grdMODEMAINT, grdMODEADD, filCREATE, filLOCK, filCREATELOCK, filGLOBAL, filCREATEGLOBAL, filLOCKGLOBAL, filCREATELOCKGLOBAL, filCHANNEL, filRAW, filPURGE, filLOAD, filINPUT, filNOOBJECT, filPVX, filREFRESH, filPVX4$, filPVX5$, pthCOMPANY$, pthOTHERCOMPANY$, pthPRCOMPANY$, pthOTHERPRCOMPANY$, pthSYSTEM$, pthUSER$, pthSOA$, pthHOME$, pthROOT$, pthDICTIONARY$, pthTEXTOUT$, pthLOCK$, pthLOCKSYS$, pthPREFIX$, pthARCHIVE$, pthLOGFILES$, folderCOMMONPROGRAMFILES, folderCOMMONAPPLICATIONDATA, errOBJECT, errSYSTEMLOCK, errCONTINUE, errEMBEDDEDIO, errSYSLOCK, extSQLCREATETABLE$, extSQLALLOWNULLDATES$, dbALL$, dbNONE$, dateTOSTRINGFORMAT$, dateLONGMASK$, dateSHORTFMT, dateLONGFMT, dateYEARFIRST, dateMONTHFIRST, dateDAYFIRST, timeMINUTESMASK$, timeMINUTES24MASK$, timeSECONDSMASK$, timeSECONDS24MASK$, idxPRIMARY$, idxBATCH$, idxDISPLAY$, dirFIRST, dirLAST, dirNEXT, dirPREVIOUS, typALPHANUM, typZEROFILL, typCHARNUM, typMASTERNUM, typALPHANUMNF, typMASTERNUMC, typALPHA$, typNUMBERS$, typALPHANUM$, typALPHANUMNF$, typCHARNUM$, typMASTERNUM$, typMASTERNUMCLEN, modTASKOTFDISALLOW$, logALLACTIVITY$, logACTIVITY$, logERROR$, logACTNEWCUSTOMER$, logACTDATASYNC$, logACTDATAIMPORT$, logACTOPTIONCHANGED$, logACTPROGRAMLAUNCH$, logDFDM$, logSECURITY$, logTASKSCHEDULER$, logWEBERROR$, logVISUALINTEGRATOR$, logEntryIDLength, chkOFF$, chkON$, chkGRAYED$, secVIEWONLY, secCREATEONLY, secMODIFYONLY, secCREATEMODIFY, secDELETEONLY, secCREATEDELETE, secMODIFYDELETE, secFULLACCESS, secDEFAULTUSER$, secDEFAULTROLE$, regHKEY_CLASSES_ROOT, regHKEY_CURRENT_USER, regHKEY_LOCAL_MACHINE, regHKEY_USERS, regHKEY_CURRENT_CONFIG, regODBC_PATH$, regMAS_PATH$, E3_MYHANDLE, E3_TASK, E3_QUIT, E3_COCHANGE, E3_DATECHANGE, E3_USERCHANGE, E3_SRVRPATH, E3_HELPFILE, E3_TECHSUPPORT, E3_QUERYTOQUIT, E3_SUPERVISOR, E3_CUSTOMIZE, E3_SWITCHMODULE, E3_DISABLEWIN, E3_CURSOR, E3_USERID, E3_PRIVATETASK, E3_CHAT, E3_BROADCAST, E3_RELOAD, E3_PASSTHROUGH, E3_EXECUTE, E3_EXPCOCHANGE, E3_EXPTASK, E3_EXPLAUNCH, E3_SILENT, E3_DIRECT, E3_NODELIST, E3_OCXITEM, E3_MODULEID, E3_CUSTFAV, E3_HOMEPAGE, E3_MINIMIZE, E3_UNDOCKED, E3_DOCKED, E3_PUBLICTASK, E3_LAUNCHURL, E3_BTNCHANGE, E3_STDBTNRELOAD, E3_MYBUSINESS, E3_REGLOADED, E3_LOADED, E3_V4TASK, E3_PUBMODIFY, E3_TASKRELOAD, E3_SETAUTOHIDE, E3_COCHANGE2, E3_TASK_NC, E3_V4TASK_NC, E3_TASK_ALTC, E3_V4TASK_ALTC, E3_PASSWORD, E3_LAUNCHVIEW, E3_LAUNCHBIETASK, E3_CLEANUPBIE, E3_STARTVIEW, E3_BIE_ADMIN, E3_HELPPATH, E3_CUSTOMERID, E3_MASVERSION, E3_LAUNCHEMBEDDED, E3_LAUNCHERMENU, E3_APP_POINTSIZE, E3_LAUNCHERVERSION, E3_DISABLE, E3_ENABLE, E3_SHOW, E3_HIDE, E3_REFRESH, E3_LIBMASTER, WM_COPY, wtsINITIALPROGRAM, wtsAPPLICATIONNAME, wtsWORKINGDIRECTORY, wtsOEMID, wtsSESSIONID, wtsUSERNAME, wtsWINSTATIONNAME, wtsDOMAINNAME, wtsCONNECTSTATE, wtsCLIENTBUILDNUMBER, wtsCLIENTNAME, wtsCLIENTDIRECTORY, wtsCLIENTPRODUCTID, wtsCLIENTHARDWAREID, wtsCLIENTADDRESS, wtsCLIENTDISPLAY, wtsCLIENTPROTOCOLTYPE, thmNORMAL, thmMETAL, thmOLIVE, rptREPORTTYPESTD, rptREPORTTYPELABEL, rptREPORTTYPEMULTCOL, rptISTRUE, rptISFALSE, rptISDEFAULT, rptPORTRAIT, rptLANDSCAPE, rptASCENDING, rptDESCENDING, rptRIGHTALIGN, rptLEFTALIGN, rptHORCENTERALIGN, rptLSSINGLELINE, rptSTSUM, rptSTAVERAGE, rptSTCOUNT, rptDFLTHSPACING, rptDFLTVSPACING, rptDFLTFONTSIZE, rptDFLTLEFT, rptDFLTTOP, rptTWIPSPERCHARW, rptTWIPSPERCHARH, rptSVTREPORTTITLE, rptEDTDISKFILE, rptGCANYVALUE, rptGCDAILY, rptCRDATEFIELD, rptCRDATETIMEFIELD, crEFTCrystalReport, crEFTRichText, crEFTWordForWindows, crEFTExcel, crEFTPortableDocFormat, crEFTHTML32, crEFTHTML40, crEFTExcelRecord, crEFTText, crEFTCharacterSeparatedValues, crEFTTabSeparatedText, crEFTEditableRTF, crEFTXml, crEFTRPTR, crEFTExcelWorkbook, cContextKeyLen1, cContextKeyLen2, cContextKeyLen3, adCmdText, adCmdStoredProc, adClipString, adExecuteNoRecords, adVarChar, adInteger, adParamInput, adParamOutput, adParamInputOutput, adParamReturnValue, adTextNoRecords, adOpenForwardOnly, adOpenStatic, adLockReadOnly, adUseServer, adUseClient, dbTMP$, dbTEMPDB$, dbSYSDB$, dbPVXDDF, dbPVXDB, dbMYSQL, dbADO, dbSQL, LastErrorMsg$, LastErrorNum$, SageCloudAppDesc$, IolNomads$

Properties inherited from: SY_OpenObject

cLockInfoNOKEY$

Methods inherited from: CI_Constant

GetCalendarEndingDate(), GetDefaultExtendedDescriptionKey$()

Methods inherited from: SY_Constant

GetNOMADSIolist$(), MaskString(), RawString(), ClassValidateEMailAddress(), dateTODAY$(), Element$(), fmtMODCODE$(), fmtMODPREFIX$(), PERFORM FunctionBreak(), GetExceptionMsg$(), GetFileName(), GetJobTitles(), GetPrinterProps(), GetRecordCount(), isALPHA(), isDATE(), isNUMERIC(), MsgPath$(), ParseString(), ParseTagField(), Position(), QUO$(), ValidateFormatType()

Methods inherited from: SY_OpenObject

CheckWhoHasLock(), CreateLockInfo(), RemoveLockInfo(), OpenTable(), OpenTempFile()