FUNCTION AccumulateDistQty(tmpDocVar$, tmpLineKey$, tmpQtyVar$)
Accumulates the distributed Quantity from tiers for an entry detail line.
|
Parameter | Description |
tmpDocVar$ |
[input, string] Variable for document number in the detail line from which tiers will be read for accumulation. |
tmpLineKey$ |
[input, string] Line Key in the detail line from which tiers will be read for accumulation. |
tmpQtyVar$ |
[input, string] Variable for Quantity to be accumulated from tiers for a detail line. |
|
Returns |
[numeric] Accumulated distributed Quantity from tiers for a detail line. |
|
FUNCTION AddDistributionLine(lotSerial$)
|
FUNCTION AddDistributionLine(lotSerial$, line$)
Used to add a new distribution line. This method will do SetKeyValue() with the parts of the
key to this table that it knows (Document segments) + LineKey.
|
Parameter | Description |
lotSerial$ |
lot or serial number to create new distribution line for. This will be the |
line$ |
{optional} the LineKey$ for which the distribution is for. If not provided, will |
|
Returns |
0 - if SetKey() failed, 1 - if line exists, 2 - if new line added |
|
FUNCTION Addin()
|
FUNCTION BackOut()
|
FUNCTION CalcLotSerialDate(out.Date$)
|
FUNCTION CalcLotSerialDate(out.Date$, item$, dateType$, refDate$)
Function to calculate Sell-By, Use-By, Return-by display date or to calculate Expiration date for receipt type functions
|
Parameter | Description |
out.Date$ |
[output, date] Date that is calculated to be returned |
item$ |
[input, string] Item Code that is currently being distributed |
dateType$ |
[input, string] Type of date to calculated this will be one character. valid values: X - Expiration Date, S - Sell-By, U - Use-by, R - Return By |
refDate$ |
[input, string] Reference date to be used to calculate. This will normally be the expiration date |
|
|
FUNCTION CancelDistribution()
|
FUNCTION CancelDistribution(retainMemFile)
|
FUNCTION CheckDistributedQuantity(doc$, lkey$, qty)
|
FUNCTION CheckForDuplicateSerialNumbers()
|
FUNCTION CheckForMissingExpirationDates(firstMissing$)
Checks through current line distribution for any tiers for an expiration date that is missing that also has a distribution qty. Only returns values if TrackLotSerExpiration is turned on and is required.
|
Parameter | Description |
firstMissing$ |
[output, string] key to the first row that is missing a date |
|
Returns |
[integer] count of the number of rows missing dates, to be used for messaging |
|
FUNCTION CheckLotSerDates(expDate$, compareDate$, lotSerNo$)
Calculates sell-by, use-by, return-by date, using the expiration date and options set for the item. If not using those dates, will use the expiration date of the lot/serial item. It then checks transaction date versus potential sell-by, use-by and return by dates.
@prarm expDate$ [input, date] Lot Serial Expiration date to be used in calculation and comparisons
|
Parameter | Description |
compareDate$ |
[output, date] Date that was used for the compare. Done for calling function to be able to print or use date after |
lotSerNo$ |
[input, string] Lot Serial Number being tested. This is used only in messageing |
|
|
Value | Description |
retFAILURE(0) |
If date is outside the range and the user does not have rights to override |
retWARNING(-1) |
If date is outside the range and the user HAS rights to override |
retSUCCESS |
If there are no dates to check against or date is in acceptable range. |
|
FUNCTION CheckQuantity(doc$, lkey$, qty)
|
FUNCTION CheckTiersForClearExpDate(linesToClear$)
Function determines if there are tiers that exist that need to be cleared in the event the document date has changed. It also returns the line keys that need to be removed.
|
Parameter | Description |
linesToClear$ |
[output, string] SEP separated list of Linekeys that contain tier distributions that need to be removed. |
|
Returns |
Always returns retSUCCESS |
|
FUNCTION CheckTiersForRecalcExpDate()
Function will scan through tier distribution work file and determine if there are any expiration dates that were calculated that need to be recalulated due to a document date change. This function will only return whether there are tiers that fit the criteria.
|
|
Value | Description |
True |
- indicates that there are tiers that could be recalculated |
False |
- there are no tiers that can be recalculated or there are no tiers |
|
FUNCTION CleanUpLine()
|
FUNCTION ClearLine()
|
FUNCTION ClearSetFiles()
|
FUNCTION CommitDistributionRows()
|
FUNCTION CommitLineDistribution()
|
FUNCTION CommitRow()
|
FUNCTION DeleteTierLines(value$)
|
FUNCTION EditDistributionLine(lotSerial$)
|
FUNCTION EditDistributionLine(lotSerial$, line$)
|
FUNCTION FromCancel(value)
|
FUNCTION FromDelete(value)
|
FUNCTION FromTierDistributionCancel(value)
|
FUNCTION GenerateFormatMask$(mask$, decimals)
|
FUNCTION GetColumnLengths(itmLen, whseLen, lotSerLen, docLen, lkLen)
|
FUNCTION GetCurrentExpSettings(lotSerRefDate$, lotSerRefDateDesc$, lotSerUserAllowChangeDate, lotSerUserAllowOverrideDate)
Retrieves current settings for current item and user for lot/serial expiration dates. This public function primarily used by the UI
|
Parameter | Description |
lotSerRefDate$ |
[output, date] current transaction date used as a reference for calculations |
lotSerRefDateDesc$ |
[output, string] description of the reference date used. This will be "Sell-by", "Use-By", "Return-by" or empty |
lotSerUserAllowChangeDate |
[output, boolean] Flag to indicate that user can change expiration date |
lotSerUserAllowOverrideDate |
[output, boolean] Flag to indicate whether user can override sell-by, use-by, return-by warnings |
|
Returns |
Always returns retSUCCESS(1) |
|
FUNCTION GetOrderLineKey(value$)
|
FUNCTION GetSerialRecords(startingSerialNo$)
|
FUNCTION GetSerialRecords(startingSerialNo$, nextSerialNo$)
|
FUNCTION GetSerialRecords(startingSerialNo$, nextSerialNo$, expDate$)
|
FUNCTION IgnoreRequiredExpDate(value)
Sets internal flag cIgnoreRequiredExpDate for purposes of writing records from a list of records that may be missing this date.
|
Parameter | Description |
value |
[input, boolean] boolean value to set the flag too |
|
Returns |
Always returns retSUCCESS(1) |
|
FUNCTION IsSerialUsed(item$, whse$, serial$, doc$, line$)
Checks to see if serial number is currently used else where within the current data entry
|
Parameter | Description |
item$ |
Item number of serial item |
whse$ |
Warehouse code |
serial$ |
Serial number to check |
doc$ |
Current document being that item in question is being added to |
line$ |
Current LineKey so that if found and is the same line, will be ignored |
|
Returns |
TRUE if found FALSE if not found |
|
FUNCTION LoadLots()
Loads Lot Tiers from the IM_ItemCost table into the tier memory table with zero for quantity distributed. These will only be lots that have not expired if using lot/serial expiration date feature.
|
Returns |
[integer] Returns the number of rows added, if zero a message will be returned in LastErrorNum/LastErrorMsg$ variables |
|
FUNCTION RecalcBalance(value)
|
FUNCTION RecalcExpDates(newDate$)
Function will recalculate any expiration dates based on the new document reference date given. This function to be used in conjunction with the CheckTiersForRecalcExpDate() function.
|
Parameter | Description |
newDate$ |
[input, date] Value of the new document date reference to be used to calculate expiration dates. |
|
Returns |
[numeric] returns the number or tier lines changed. |
|
FUNCTION RemoveTierLines(document$, line$)
|
FUNCTION RemoveZeroLots()
|
FUNCTION ResetBalance()
|
FUNCTION ResetDistributionLine(line$)
|
FUNCTION ResetLotSerialDates(resetDate$)
This function will reset the LotSerialExpirationDate and Reference Date (Sell-by, Use-by) back to the given date.
|
Parameter | Description |
resetDate$ |
[input, date] Date to reset the LotSerialExpirationDate back to |
|
Returns |
Always returns retSUCCESS(1) |
|
FUNCTION RestoreDefaults()
Restores values for ItemCode and WarehouseCode that are potentially obliterated by reading a blank file.
This will use the cItemCode/cWarehouseCode values
|
|
FUNCTION RowResetAllFromMemFile()
|
FUNCTION RowResetFromMemFile(key$)
|
FUNCTION RowResetFromPhysicalFile()
|
FUNCTION RowResetFromPhysicalFile(key$)
|
FUNCTION SetCommonInfo(rec$, iol$)
|
FUNCTION SetDistributionFilter()
|
FUNCTION SetFilterValues(key$, item$, whse$)
|
FUNCTION SetUIHandle(uiHandle)
Sets the UI handle into the business object for use in updating values back into the UI. This is overridden from SY_Service.
|
Parameter | Description |
uiHandle |
[input] Value of the object handle to set the local variable coUI to in the business object. |
|
Returns |
retSUCCESS Always returns success. |
|
FUNCTION ValidateGroupExpUseRefDate()
Validation group method to test whether reference date is to be used.
|
|
Value | Description |
retSUCCESS(1) |
If item uses a reference date for the current transaction type. |
retFAILURE(0) |
If item does not use a reference date for the current transaction type |
|
FUNCTION ValidateGroupTrackExpiration()
Validation group method to test whether expiration dates are being tracked for this item or at all for the system
|
|
Value | Description |
retSUCCESS(1) |
If item is tracking expiration dates for lot/serial items |
retFAILURE(0) |
If item is not tracking expiration dates or option is turned off in IM_Options |
|
FUNCTION Write()
|
FUNCTION LOCAL PostDeleteRec()
|
FUNCTION LOCAL PostWriteRec()
|
FUNCTION LOCAL ResolveTierKeyLength(docKey$)
|
FUNCTION LOCAL SetCurrentKey(key$)
|
FUNCTION LOCAL SetDefaults()
|
FUNCTION LOCAL SetDistSecurity()
|
FUNCTION LOCAL ValidateDistributionQty(value)
|
FUNCTION LOCAL ValidateItemCode(value$)
|
FUNCTION LOCAL ValidateLineKey(value$)
|
FUNCTION LOCAL ValidateLotSerialExpirationDate(value$)
Function to valdiate the lot/serial expiration date. This will fail if Tracking for expiration dates is turned off, as well as invalid dates, or required dates missing
|
Parameter | Description |
value$ |
[input, date] Date to be validated |
|
Returns |
retSUCCESS(1) if date is valid and allowed to be entered retFAILURE(0) if invalid date or not allowed to be entered |
|
FUNCTION LOCAL ValidateLotSerialNo(value$)
|
FUNCTION LOCAL ValidateWarehouseCode(value$)
|