Class SO_Invoice_bus

Known SubClasses

SO_Shipping_bus

Properties

LOCAL cBatchModule$="S/O"  
LOCAL cBatchType$="01"  
LOCAL cBatchTotalVars$="ExtensionAmt"+SEP+"TaxableSalesAmt"+SEP+"NonTaxableSalesAmt"+SEP+"Discounts"+SEP+"Deposits"  
LOCAL cBrowseOmit$="InvoiceType$ = "+QUO+"XD"+QUO  
LOCAL cDefaultTermsCode$="00"  
LOCAL cIsSysDB=isFALSE  
LOCAL cJobConfirmationVar$  
LOCAL cJobDateVar$  
LOCAL cMainTable$="SO_InvoiceHeader"  
LOCAL cPerformCustomerStatusChecking=isTRUE  
LOCAL cRestartFile$  
LOCAL cUserKey$  
LOCAL cWorkstationName$  
LOCAL cPaymentObjectName$  
PROPERTY AllLinesBackordered   * Read Only *
PROPERTY ApplySalesOrdersValidation$  

apply sales orders validation conditions based on header Sales Order Number

PROPERTY AllowCreditCard$  
A/R Options Allow Credit Card / ACH Payments
PROPERTY AR_OpenItemBalForward$   * Read Only *
PROPERTY AR_PaymentMethod$  
PROPERTY AR_RetainDetailedInvHist$   * Read Only *
PROPERTY AR_TrackJCRetentionAmount$   * Read Only *
PROPERTY AR_TrackJCRetentionRecvbls$   * Read Only *
PROPERTY BarCodeImport  
PROPERTY BatchSubType$   * Read Only *
PROPERTY copyPrompt   * Read Only *
PROPERTY CreditCardMsg$   * Read Only *
Message about status of credit card transactions.
PROPERTY CreditCardStatus   * Read Only *
Status of credit card transactions in the invoice. retSUCCESS when no SPS deposit, credit, or post authorization transaction has been processed. retFAILURE when payment has been post authorized or credit transaciton has been authorized, and user doesn't have right to void transaction. retWARNING when payment has been post authorized or credit transaciton has been authorized, and user has right to void transaction. OR when only a deposit or pre-authorization transaction has been processed.
PROPERTY CustomerEInvoice$   * Read Only *
Bill to customer option: eInvoice Payments (Y/N)
PROPERTY CRMSetup   * Read Only *
PROPERTY DefaultWarehouseCode$   * Read Only *
Default warehouse code
PROPERTY DefaultWarehouseStatus$   * Read Only *
Status of the default warehouse
PROPERTY DefaultWhseRestrictEndDate$   * Read Only *
Restriction End Date, if default warehouse is restricted
PROPERTY DocumentTotal   * Read Only *
PROPERTY EInvoice$   * Read Only *
Company option: Enable Payments for eInvoices (Y/N)
PROPERTY FreightCalcMethod$   * Read Only *
PROPERTY InHistory   * Read Only *
PROPERTY JC_RetentionTaxable$   * Read Only *
PROPERTY SO_CheckQtyOnHand$   * Read Only *
PROPERTY SO_PrintCODLabels$   * Read Only *
PROPERTY SO_IncludeBackorderedLines$   * Read Only *
PROPERTY SO_IntegrateBillOfMaterials   * Read Only *
PROPERTY SO_IntegrateIT   * Read Only *
PROPERTY SO_IntegrateWorkOrder   * Read Only *
PROPERTY SO_LineType$   * Read Only *
PROPERTY SO_PrintSalesOrders$   * Read Only *
PROPERTY SO_PrintShippingLabels$   * Read Only *
PROPERTY SO_RetainOrderQuoteHistory$   * Read Only *
PROPERTY SO_UseDefaultItemWhse$   * Read Only *
PROPERTY SO_WarrantyCalcBasedOn$   * Read Only *
PROPERTY TaxCalcError  
PROPERTY DepositAmtAvailable  
PROPERTY InvoiceTotal  
PROPERTY NetInvoice  
PROPERTY QuantityForBackOrder  
PROPERTY SeenLines  
PROPERTY ShipComplete$  
PROPERTY OrderTotal   * Read Only *

Methods

the SOCustomerPONo$ returned will be used to set the CustomerPONo$ on the sales order added for added backordered lines

FUNCTION AllowCreditCard()  
FUNCTION AllowCreditCard(field$)  

Determines if credit card is allowed for this document

ParameterDescription
field$ {optional} [input, string] field that this check is being used for.
Returns [boolean] True if credit card is allowed, False if credit card is not allowed
FUNCTION ApplySalesOrderAdd(tmpSalesOrder$)  

Add a sales order to be applied to this invoice

ParameterDescription
tmpSalesOrder$ [input,string] sales order number to add
Returns [boolean] True = success, False = failure, -1 = warning
FUNCTION ApplySalesOrderCancel(tmpCancelInvoice)  

Cancel selections of sales orders to be applied to this invoice

ParameterDescription
tmpCancelInvoice [input,boolean] True = cancel all s/o selections for invoice entry, False = cancel only new s/o selections where lines have not been copied
Returns [boolean] True = success
FUNCTION ApplySalesOrderCopyLines(copyCount)  

Copy lines for all sales orders selected to be applied to this invoice

ParameterDescription
copyCount [output,integer] number of sales orders that had lines copied to invoice
Returns [boolean] True = success, False = failure, -1 = warning
FUNCTION ApplySalesOrderRemove(tmpSalesOrder$)  

Remove a sales order from selections to be applied

ParameterDescription
tmpSalesOrder$ [input,string] sales order number to remove
Returns [boolean] True = success, False = failure
FUNCTION ApplySalesOrderUpdate(tmpSalesOrder$, tmpLinesCopied$, tmpShipComplete$)  

Update sales order to apply selection

ParameterDescription
tmpSalesOrder$ [input,string] sales order number to update
tmpLinesCopied$ [input,string] Y/N, have the lines from the s/o been copied to the invoice detail?
tmpShipComplete$ [input,string] Y/N, when copying the lines from the s/o to the invoice detail should the ship quantity be set to ordered quantity?
Returns [boolean] True = success, False = failure
FUNCTION BatchPreDelete(tmpBatchNo$)  
FUNCTION CalcRetentionRate()  
FUNCTION CalculateDepositAmt()  
FUNCTION CalculateTotals()  
FUNCTION ChangeDefaults(record$)  
FUNCTION ChangeDefaults(record$, iolist$)  
FUNCTION CheckApplySalesOrderNo(tmpSalesOrder$)  

Check Sales Order Number to Apply, validate value and check against first sales order number selected

ParameterDescription
tmpSalesOrder$ [input,string] sales order number to check
Returns [boolean] True = success, False = failure
FUNCTION CheckBatchStatus(batchNumber$)  
FUNCTION CheckDeleteSecurity(BatchNo$)  
FUNCTION CheckForACHPayment()  

Check for ACH Payments on sales orders applied to an invoice

Returns [boolean] False (0) when no sales orders applied on the invoice contain an ACH payment, true (1) when a sales order applied on the invoice contains an ACH payment
FUNCTION CheckForCreditMemo()  
FUNCTION CheckForInvInHistory(testInvoiceNo$)  
FUNCTION CheckMergeBatch(sourceSubType$, destSubType$)  
FUNCTION CheckShippingBatch(batchno$)  
FUNCTION Clear()  
FUNCTION ClearInvoiceNoInSO(invoiceNo$, orderNo$)  

Clear CurrentInvoiceNo$ in sales order

ParameterDescription
invoiceNo$ [input,string] Invoice No
orderNo$ [input,string] Sales Order No
Returns [boolean] True = success
FUNCTION ClearJobNo()  
FUNCTION DELETE(Key$)  
FUNCTION DeleteBatch(batch$, curSubType$)  
FUNCTION GetApplySalesOrderRecord(tmpSalesOrder$, tmpRec$, tmpIOL$)  

Get apply sales order record

ParameterDescription
tmpSalesOrder$ [input,string] sales order number to get record for
tmpRec$ [output,string] record
tmpIOL$ [output,string] iolist of fields
Returns [boolean] True = if record found, False = if no record found
FUNCTION GetApplySalesOrderStatus(tmpSalesOrder$)  

Get apply sales order status

ParameterDescription
tmpSalesOrder$ [input,string] sales order number to get status of
Returns [integer] 0 = sales order has not been applied to invoice, 1 = sales order has been applied, 2 = sales order is newly applied
FUNCTION GetInvoiceDefaults(Record$)  
FUNCTION GetNextInvoiceNo(value$)  
FUNCTION GetSOCustomerPONo$()  
FUNCTION GetSOCustomerPONo$(tmpSalesOrder$)  

Get SOCustomerPONo$ value from AppliedSalesOrders record

ParameterDescription
{optional} tmpSalesOrder$ [input,string] applied sales order number to retrieve SOCustomerPONo$ (CustomerPONo$ saved from Sales Order), when blank the value returned is the value that will be used when setting the CustomerPONo$ on a sales order added during update for added backordered lines
Returns [string] SOCustomerPONo$ (CustomerPONo$ saved) from applied sales order or value that will be used when setting the CustomerPONo$ on a sales order added during update for added backordered lines
FUNCTION RecalcFreightFromSalesOrder()  
FUNCTION RecalcFreightFromSalesOrder(soApply)  

Recalc Freight From Sales Order conditionally executes CheckForUseShipZone() method test if freight should be recalculated

ParameterDescription
soApply {optional} [input, boolean] whenTrue ignores editNew edit state requirement to determine when to execute CheckForUseShipZone method
Returns [boolean] True = to indicate freight should be recalculated, False = if not
FUNCTION RecalcRetentionAmt()  
FUNCTION ResetAllCopyLines()  

Reset All for a new invoice, copy lines for all sales orders

Returns [boolean] True = success
FUNCTION SalesTaxCalculation()  
FUNCTION SalesTaxCalculation(calcDiscount)  
FUNCTION SalesTaxRecalculation()  
FUNCTION SetCheckForHold()  
FUNCTION SetCommonTaxInfo()  
FUNCTION SetCurrentKey(Key$)  
FUNCTION SetInvoiceDefaults(record$)  
FUNCTION SetKey()  
FUNCTION SetKey(key$)  
FUNCTION SetMergeTypes(types$)  
FUNCTION SetReValidate()  
FUNCTION SetSOCustomerPONo(soCustPONo$)  

Set SOCustomerPONo$ value on AppliedSalesOrders record for new sales order to be added for added backordered lines

ParameterDescription
soCustPONo$ [input,string] SOCustomerPONo$ to save for update to sales order to be added for added backordered lines
Returns [boolean] True (1) = success, False (0) = if currently in a no record state or multiple sales orders have not been applied to the invoice
FUNCTION SetWeight(oldVal, newVal)  
FUNCTION ValidateAppliedCustomerPONo(value$)  

Execute SO_CommonEntry'ValidateCustomerPONo() CustomerPONo common busines rules on AppliedCustomerPONo entered on added detail line not assigned to a sales order applied to the invoice

ParameterDescription
value$ [input, string] AppliedCustomerPONo$ to validate
Returns [boolean] True = success, False = failure
FUNCTION ValidateApplyToInvoiceNo(value$)  
FUNCTION ValidateGroupCU_Integrated()  
FUNCTION ValidateGroupMultipleDep()  

Validate Group Muliple Deposit precludes changing the column value once multiple sales orders with deposits have been applied to an invoice

Returns [boolean] False (0) when multiple sales orders with deposits have been applied on invoice, true (1) when one or no sales orders with deposits have been applied on invoice
FUNCTION ValidateGroupMultipleSO()  

Validate Group Muliple SO precludes changing the column value once multiple sales orders have been applied to an invoice

Returns [boolean] False (0) when multiple sales orders applied on invoice, true (1) when one or no sales orders applied on invoice
FUNCTION ValidBatch(curSubTypeBatch$, subTypeBatch$)  
FUNCTION WRITE()  
FUNCTION LOCAL CheckForDuplicateInvoice(ARDivisionNo$, CustomerNo$, InvoiceNo$, InvoiceType$, BillToDivisionNo$, BillToCustomerNo$)  
FUNCTION LOCAL CRM_GetSet()  
FUNCTION LOCAL CRM_SetCuChildColl()  
FUNCTION LOCAL GetOptions()  
FUNCTION LOCAL GetShippingRateLineType()  
FUNCTION LOCAL PostDeleteRec()  
FUNCTION LOCAL PostWriteRec()  
FUNCTION LOCAL SetApplySalesOrderStatus(tmpSalesOrder$, tmpInvoiceNo$)  

Set status of sales order selected to be applied

ParameterDescription
tmpSalesOrder$ [input,string] sales order number to set status of
tmpInvoiceNo$ [input,string] invoice number
Returns [boolean] True = success, False = failure
FUNCTION LOCAL SetChildColl()  
FUNCTION LOCAL SetCRMFields(histInvoiceNo$, histHeaderSeqNo$)  

Set CRM Fields from AR_InvoiceHistoryHeader file

ParameterDescription
histInvoiceNo$ [input,string] History InvoiceNo
histHeaderSeqNo$ [input,string] History HeaderSeqNo
Returns [boolean] retSuccess, invoice doesn't always exist in history
FUNCTION LOCAL SetCustomerEInvoice()  

This function sets CustomerEInvoice$ based on customer and invoice type

Returns [boolean] True = success.
FUNCTION LOCAL SetDefaults()  
FUNCTION LOCAL SetSplitCommission(ArDivisionNo$, CustomerNo$, InvoiceNo$, InvoiceType$)  
FUNCTION LOCAL UpdateCMFromRMA()  

Update transaction amount in credit memo generated by RMA

Returns [boolean] True = success
FUNCTION LOCAL UpdateSODailyShipment()  

Update SO_DailyShipment for shipping invoice

Returns [boolean] True = success
FUNCTION LOCAL ValidateAcceptCashOnly(value$)  
FUNCTION LOCAL ValidateActualPercentComplete(value)  

Validation logic for Job ActualPercentComplete

ParameterDescription
value [input, numeric] ActualPercentComplete
Returns [boolean] Success (1) if value is valid, else Failure (0).
FUNCTION LOCAL ValidateBatchNo(value$)  
FUNCTION LOCAL ValidateBillToCustomerNo(value$)  
FUNCTION LOCAL ValidateCheckNoForDeposit(value$)  
FUNCTION LOCAL ValidateCustomerNo(value$)  
FUNCTION LOCAL ValidateDepositAmt(value)  

Validation logic for DepositAmt.

ParameterDescription
value [input, numeric] DepositAmt
Returns [boolean] Success (1) if value is valid, else Failure (0).
FUNCTION LOCAL ValidateDiscountAmt(value)  
FUNCTION LOCAL ValidateDiscountDueDate(value$)  
FUNCTION LOCAL ValidateEInvoicePayments(value$)  
FUNCTION LOCAL ValidateFreightAmt(value)  
FUNCTION LOCAL ValidateInvoiceDate(value$)  
FUNCTION LOCAL ValidateInvoiceDueDate(value$)  
FUNCTION LOCAL ValidateInvoiceNo(value$)  
FUNCTION LOCAL ValidateInvoiceType(value$)  
FUNCTION LOCAL ValidateJobNo(value$)  
FUNCTION LOCAL ValidateNumberOfCODLabels(value)  
FUNCTION LOCAL ValidatePaymentType(value$)  
FUNCTION LOCAL ValidateRetentionAmt(value)  
FUNCTION LOCAL ValidateSalesOrderNo(value$)  
FUNCTION LOCAL ValidateShipDate(value$)  

Validation logic for ship date

ParameterDescription
value$ [input, string] ship date
Returns [boolean] Success (1) if value is valid, else Failure (0)
FUNCTION LOCAL ValidateShipperId(value$)  
FUNCTION LOCAL ValidateShipToCode(value$)  
FUNCTION LOCAL ValidateTaxSchedule(value$)  
FUNCTION LOCAL ValidateTermsCode(value$)  
FUNCTION LOCAL VoidCCTrans(whatToVoid$)  

Void credit card transactions already processed through sage exchange

ParameterDescription
whatToVoid$ [input, string] "OLD" (void transactions already saved) or "NEW" (void unsaved transactions)
Returns [boolean] True = success, False = failure

Properties inherited from: SO_CommonEntry

cTaxModule$, cAllowMultipleEMailAddresses, AddJobOnTheFly, AllowBillToOverride, AR_BillToCustomerRpting$, AR_Divisions$, AR_SalesTaxReporting$, AR_SalespersonCommRpting$, AR_SegmentForSalesPostings$, oCustomerChild, BillToSvcObj, BM_Integrated$, BM_UseBillRevisionCodes$, BM_UseOptionBills$, CalculateTax, CalculateFreight, CreateSOFromRMA, UserCode$, CreditExceeded, CreditHold, CreditWarning$, SplitCommRate1, UseBillToCustPricing, CreditCardVoidReqd, CreditCardPaymentTypeExist, ACHPaymentTypeExist, DuplicatePOCheckingObj, EBM_Integrated$, IgnoreError, IM_GLSegmentNumberForWhse$, IM_IncludePOOrWOInQtyAvailable$, IM_MultipleWarehouses$, IM_EnableWarrantyTracking$, JC_DefaultJobType$, JC_JobNoFormat$, JC_PostWIPToGL$, JC_RecognizeWIPMethod$, OriginalJobNo$, PaymentObj, PrecisionCost, PrecisionPrice, PrecisionQty, SalesTaxCalcObj, ShipWeightMax$, SO_AllowDiscountRate$, SO_AllowJobsToBeCreated$, SO_BaseNewPriceLevelRecordsOn$, SO_CheckQtyOnHand$, SO_CustomerSplitComOverrideShipTo$, SO_DefaultSpecialItemsToDS$, SO_DisplayProfitMargin$, SO_DisplayUnitCost$, SO_EnableDefaultPriceLevelByCust$, SO_EnableLotSerialDist$, SO_EnableShipping$, SO_EnablePurchaseControl$, SO_IncludeBackorderedLines$, SO_IntegrateInventory$, SO_IntegrateJobCost$, SO_PostInvoiceCostsToJC$, SO_PostSalesByDivision$, SO_PrintCODLabels$, SO_PrintPickingSheets$, SO_ProfitMarginPercent, SO_RelieveWorkInProcess$, SO_RequireCostCode$, SO_RequireFullyDistributedLines$, SO_RequireJobNo$, SO_RetainCustLastPurchHistory$, SO_ShippingIntegrated$, SO_SpecialItemCOGSAcctKey$, SO_SpecialItemSalesAcctKey$, SO_SplitCommissions$, SO_UseAlternateWhse$, SO_UseDefaultItemWhse$, SO_UseShippingCode$, UseBillToAddress, UseBillToCreditLimit, UseBillToCreditHold, UseBillToTermsCode, JC_PostDropShipCostsToJC$, JC_RelieveInventory$, JC_ValidateCustomer$, JC_ValidSOCostTypes$, JC_UseSOAcctsForCOGS$, JC_UseSOAcctsForSales$

Properties inherited from: SY_BatchDataEntry

BatchEnabled, ErrorBatchNo$

Methods inherited from: CI_ShipperId_Val

ClassValidateShipperId()

Methods inherited from: CI_TierCostCalc

CalcCost(), ClearCCByBatch(), ClearCCByDeKey(), ClearCCByJournal(), ClearCCWorkFile(), PERFORM ClearCommits(), PERFORM PostTableReadCI_TierCostCalc(), PERFORM PreNextRecordCI_TierCostCalc(), PERFORM PreTableWriteCI_TierCostCalc(), PERFORM ProcessTierDistribution()

Methods inherited from: SO_CommonEntry

AdjustCalculatedValue(), AllowCreditCard(), CheckCopyFromWarehouse(), CheckForUseShipZone(), CLEAR(), CopyShipToAddress(), CreditCardPreDelete(), RecalcPriceByTotalQty(), RecalculatePricing(), RecalculateShipWeight(), SalesTaxCalculation(), SalesTaxReCalculation(), StripRequiredVal$(), UpdateTaxAmounts(), ValidatePurchaseControl(), CheckForSalesperson(), PERFORM ClearSalespeople(), ColumnOverrideJobNo(), ColumnOverrideSalesPersonNo2(), ColumnOverrideSalesPersonNo3(), ColumnOverrideSalesPersonNo4(), ColumnOverrideSalesPersonNo5(), CommitPayment(), GetCustomerFields(), GetShipViaFields(), IsJobStillValid(), LocalizeIOList(), MoveSalespersons(), PostDeleteRec(), PostWriteRec(), PurgePDFLog(), RetrieveOptions(), SetCommonChildColl(), SetCurrentKey(), SetDefaultPayment(), SetOptions(), SetShipZone(), ValidateBatchFax(), ValidateBillToCustomerNo(), ValidateBillToDivisionNo(), ValidateBillToZipCode(), ValidateCheckNoForDeposit(), ValidateCommissionRate(), ValidateConfirmTo(), ValidateCustomerNo(), ValidateCustomerPoNo(), ValidateDepositAmt(), ValidateDiscountAmt(), ValidateDiscountRate(), ValidateFaxNo(), ValidateFreightAmt(), ValidateGroupARSalesTax(), ValidateGroupBillToCustomerRpting(), ValidateGroupCustomerRequired(), ValidateGroupIMIntegrated(), ValidateGroupJCIntegrated(), ValidateGroupMultiWarehouse(), ValidateGroupRMAOrder(), ValidateGroupSalespersonReporting(), ValidateGroupSalespersonRequired(), ValidateJobNo(), ValidateOtherPaymentTypeRefNo(), ValidatePayBalance(), ValidatePaymentType(), ValidateSalesPersonNo(), ValidateSalesPersonNo2(), ValidateSalesPersonNo3(), ValidateSalesPersonNo4(), ValidateSalesPersonNo5(), ValidateShipToCode(), ValidateShipToState(), ValidateShipToZipCode(), ValidateShipVia(), ValidateShipWeight(), ValidateShipZone(), ValidateShipZoneActual(), ValidateSplitCommissions(), ValidateSplitCommRate2(), ValidateSplitCommRate3(), ValidateSplitCommRate4(), ValidateSplitCommRate5(), ValidateTaxExemptNo(), ValidateTaxSchedule(), ValidateTermsCode(), ValidateWarehouseCode(), VoidCCTrans()

Methods inherited from: SY_BatchDataEntry

DELETE(), DeleteBatch(), DeleteBatchNo(), GetBatchHandle(), IsBatchActive(), ResetBatchSubType(), SelectBatch(), SelectNewBatch(), SetCurrentKey(), VerifyBatch(), WRITE(), ClassValidateBatchNo$()