CustVendSettle Class [AX 2012]
The CustVendSettle class serves as the parent class of a hierarchy of five classes that serve as the engine for settling customer and vendor transactions.
| Method | Description | |
|---|---|---|
| accountLossProfit | |
| accountNonrealLossProfit | |
| addTransToTaxSortedList | Adds a record in the rslTmpOverUnderReverseTax record sorted list using the specified parameters. |
| adjustSettleAmountAcctForFullySettled | |
| adjustSettleAmountReportForFullySettled | |
| amount | |
| approvalVoucherDate | |
| calcActualCashDiscAmount | Calcuates the amount of cash discount for the amount being settled. |
| calcAndPostTaxExchRateDiff_RU | Calculates and posts tax on exchange rate difference. |
| calcBalanceOnSelectedDate_W | |
| calcCreditToDebitExchRate | Calculates the exchange rate between the credit and debit transactions. |
| calcExchRateForCreditTransDate | |
| calcExchRateReportingForCreditTransDate | |
| calcFinInterestOrFineForCreditCompany_BR | Calculates the amount of the Interest/Fine for the credit (payment) company. |
| calcFullSettlementAmount | Calculates the sum of the remaining amount. |
| calcInvoiceTaxWithholdAmount | Calculates the amount of tax withholding that was previously decided on the invoice. |
| calcRealizedExchAdjAmount | Calculates the amount of the realized exchange adjustment. |
| calcRealizedReportingExchAdjAmount | |
| calcRealizeExchAdjAmountForPayment | Calculates the amount of realized exchange adjustment in the monetary standard (MST) currency of the credit transaction. |
| calcRecoveryLOIByPaymVoucher_IN | Calculates the amount of interim recoverable Load On Inventory tax by payment tax trans. |
| calcSettleAmountCurForCredit | Calculates the amount to settle in the transaction currency of the credit transaction. |
| calcSettleAmountCurForDebit | Calculates the amount to settle in the transaction currency of the debit transaction. |
| calcSettleAmountMstForCredit | Calculates the amount to settle in the monetary standard (MST) currency for the credit transaction. |
| calcSettleAmountMstForDebit | Calculates the amount to settle in monetary standard (MST) currency for the debit transaction. |
| calcSettleAmtCurBasedOnPossibleCashDisc | Calculates the settled amount in the debit transaction currency assuming the possible cash discount is taken. |
| calcSettledFactor | Calculates the percent of the transaction that is being settled. |
| calcSettlementOutsideCashDiscDate | Calls the calcSettlementOutsideCashDiscDate method on the customer or vendor transaction respectively, and returns the result of that method. |
| calcSettleReportingAmountCredit | |
| calcSettleReportingAmountDebit | |
| calcUnrealizedExchAdjCurrencyDeal_RU | |
| calcUnrealizedExchAdjToReverse | Calculates the amount of the unrealized exchange adjustment to reverse in the monetary standard (MST) currency for the transaction. |
| calcUnrealizedReportingExchAdjToReverse | |
| calcWHTRealizedExchAdjAmount | Calculates the realized gain or loss for the withholding tax for a voucher. |
| cancelTimeOut | Cancels a previous method call to the setTimeOut method. (Inherited from Object.) |
| cashDiscAmount | Evaluates the cash discount amount on the basis of ledger dimension. |
| cashDiscForCreditNote | |
| cashDiscForPartialPaym | |
| cashDiscLedgerDimensionForCreditCompany | Gets the cash discount ledger account for the credit company. |
| cashDiscMethod | |
| cashDiscountLedgerDimension | |
| cashDiscountSystemLedgerDimension | |
| cashDiscVat | |
| checkCreditRemainAmountCur | Checks whether the settlement is about to set a customer/vendor transaction balance to more than the amount. |
| checkCurDealCanBeSettled_RU | |
| checkIfCanBeSettled_RU | |
| checkOverdueJournal_W | Checks if overdue journal exists, then takes the date of last journal and validates that overdue debt amount on that date will not be changed by settlement operation. |
| convertAcctToReportingForCreditDate | |
| convertTransToAcctForCreditTransDate | |
| convertTransToReportingForCreditDate | |
| createAndPostDueToDueFromTaxExpense | This method is used to create a due to or from transaction when the tax company is different then wither the invoice or payment company. |
| createBankChequeTrans | |
| createCreditNoteForCashDiscount_CZ | The method creates CustInvoiceJour and CustInvoiceTrans for discount trans CustTrans |
| createInterestFineCustVendTrans_BR | Creates the fine transactions for the settlement. |
| createLedgerTransSum_RU | |
| createLedgerVoucherForCashDisc | |
| createLedgerVoucherObject_RU | |
| createLedgerVoucherTransObject | This method is used to create a new LedgerVoucherTransObject corresponding to tax or expense and add it to the LedgerVoucher for the current company. |
| createPostingTransLog_RU | |
| createSettlementForDebitOrCreditTrans | Creates CustVendSettlement record for the debit or credit transaction. |
| createSettlementToReverseUnrealExchAdj | Creates the CustVendSettlement record to reverse the unrealized exchange adjustment. |
| createTaxPostingTransLog_RU | Creates records in CustVendTransPostingLog_RU table. |
| crossCompanyTxt | |
| curAmount2CurAmountFullSettlement | Converts the amount from one currency to another, considering that the currencies may be from different companies. |
| datePrinciple | Returns or sets the global variable for the dateprinciple. |
| determineGTAExpenseAmount_IN | Determines GTA Expense amount. |
| determineTransDate | |
| dialogDatePrinciple | Creates the dialog box for entering the date principle. |
| discGraceDays | |
| discTxtCustVend | Returns a CustCashDiscCust enum or VendCashDiscVend enum respectively. |
| discTxtLedger | |
| equal | Determines whether the specified object is equal to the current one. (Inherited from Object.) |
| exchAdjTxt | |
| fetchInvoice | |
| fetchPayment | |
| findCustVendTransByRecID | |
| findInvoice | |
| findInvVoucherFrmPymtRelVoucher_IN | Gets the Invoice voucher using the payment related voucher and transDate. |
| findLedgerInterCompany | Finds the LedgerInterCompany record for the specified parameters. |
| findLedgerJournalNum | Finds the ledger journal number for the specified parameter. |
| findLedgerVoucherByCompany | Finds the LedgerVoucher instance for the specified company. |
| findNumberSequenceCodeByCompany | Finds the number sequence code that is used to create settlement transaction voucher numbers for the specified company. |
| findOrCreateLedgerVoucherByCompany | Finds the LedgerVoucher instance for the specified company. |
| fineLedgerDimension_BR | Gets the default ledger dimension account |
| fineLedgerDimensionCreditCompany_BR | Gets the Fine ledger account for the credit (payment) company. |
| fineSystemAccount_BR | |
| fineTxtCustVend_BR | Returns a correct enum depending on Vendor or Customer. |
| fineTxtLedger_BR | |
| fullSettlementAmountCur | Returns the full settlement amount currency, adjusted from the currency code of the LedgerJournalTrans or CustTable respectively, to a new currency code. |
| getCustVendName_BR | Gets the name of third party related to the transaction. |
| getDifferentProfileSettlementTransText | |
| getLedgerPostingType_Balance | |
| getLedgerPostingType_CashDisc | |
| getLedgerPostingType_ExchRate | |
| getLedgerPostingType_Settlement | |
| getPrevCashDiscTaken | Gets the cash discount amount already taken for the open transaction. |
| getPrevSettledAmount | Gets the amount already settled for the open transaction. |
| getReverseChargeExpenseAmt_IN | |
| getReverseChargeRecoverableAmt_IN | |
| getTaxCompanyVoucherDate | This method is used to find all the vouchers, companies and transaction dates related to the invoice. |
| getTimeOutTimerHandle | Returns the timer handle for the object. (Inherited from Object.) |
| getVoucherNumberByCompany | Gets the voucher number for the specified company. |
| handle | Retrieves the handle of the class of the object. (Inherited from Object.) |
| init | Initializes class variables for the settlement process. |
| initCustVendSettlementBuffer | Instantiates either a CustSettlement or a VendSettlement. |
| initCustVendSettlementOffsetVoucher | Instantiates either a CustSettlementOffsetVoucher or a VendSettlementOffsetVoucher. |
| initCustVendTransBuffer | |
| initCustVendTransOpenBuffer | |
| initForNewSettlement | Initializes variables when a settlement is started. |
| initJournalNumCashDisc | |
| initParmDefault | This method is called when no SysLastValue record can be found in xSysLastValue.GetLast. |
| initTaxTrans_IN | |
| initTaxTransIN_IN | |
| insertAgreementRecordList_RU | Adds a container to a set. |
| insertSettlementOffsetVoucher | This method is used to insert a record in the CustSettlementOffsetVoucher or VendSettlementOffsetVoucher table.This record is used while reversing the settlement. |
| interestLedgerDimension_BR | Returns the interest ledger dimension |
| interestLedgerDimensionCreditCompany_BR | Gets the Interest ledger account for the credit (payment) company. |
| interestSystemAccount_BR | Gets the interest system account |
| interestTxtCustVend_BR | Returns a correct enum depending on Vendor or Customer. |
| interestTxtLedger_BR | Returns the transaction text type for financial interest |
| inventSumAdjustOnAmountDiff_RU | |
| isBadDebtAmortisation_RU | |
| isCashOnDeliveryPaymentMethod | Indicates if debit transaction payment method is cash on delivery. |
| isCurrencyDeal_RU | |
| isExchAmountDiff_RU | |
| isGTAPartialPaym_IN | Checks if it is the GTA partial payment. |
| isGTAPartialPaymAdv_IN | Checks if it is the GTA partial payment. |
| isReimbursementType | Determines whether the debit transaction is of reimbursement type. |
| isSettlementActive_W | |
| lastValueDataAreaId | Returns curext(), which is the current company code. |
| lastValueDesignName | Returns a blank value of the extended data type identifiername. |
| lastValueElementName | Returns the classname of the instance "this". |
| lastValueType | Returns the enumeration UtilElementType "Class". |
| lastValueUserId | Returns the current user ID. |
| ledgerDimensionObtainedEventHandler | Overrides account to profitLoss if _isOffset, dimension to RTax25 |
| ledgerJournalACType | |
| ledgerPostingType_W | |
| ledgerTransactionType | |
| maxInaccurateAmountMST | |
| maxMSTDiff | |
| maxPennyDiff | |
| mcrCalcOutOfBalanceWriteOff | Calculates the amount that is being written off, if a sales order has been released from the out of balance workbench. |
| moduleCustVend | |
| mstDiffTxtLedger | |
| mustOffsetOriginalSummaryDistributions | |
| new | Initializes a new instance of the CustVendSettle class. |
| notify | Releases the hold on an object that has called the wait method on this object. (Inherited from Object.) |
| notifyAll | Releases a lock on the object that was issued by the wait method on this object. (Inherited from Object.) |
| numRefCustVendPaymVoucher | |
| objectOnServer | Determines whether the object is on a server. (Inherited from Object.) |
| owner | Returns the instance that owns the object. (Inherited from Object.) |
| pack | Serializes the current instance of the CustVendSettle class. |
| parmBankTransactionTypes | Gets or sets the BankTransactionTypes parameter. |
| parmCustVendExchAdjParm_W | Gets or sets the CustVendExchAdjParm_W parameter. |
| parmCustVendTransCredit_W | Gets or sets the CustVendTransCredit_W parameter. |
| parmCustVendTransDebit_W | Gets or sets the CustVendTransDebit_W parameter. |
| parmCustVendTransSettlement_W | Gets or sets the CustVendTransSettlement_W parameter. |
| parmIsCashDiscountAdjustedForOverPayment | Gets or sets the IsCashDiscountAdjustedForOverPayment parameter. |
| parmIsTaxInvoiceInfoFilled | Gets or sets the IsTaxInvoiceInfoFilled parameter. |
| parmLedgerVoucher_W | |
| parmModule | Gets or sets the Module parameter. |
| parmParentCustTrans_IN | Gets or sets the ParentCustTrans_IN parameter. |
| parmParentLedgerVoucher_RU | Gets or sets the ParentLedgerVoucher_RU parameter. |
| parmRelatedJournalId | Gets or sets the RelatedJournalId parameter. |
| parmRelatedLedgerVoucher | Gets or sets the RelatedLedgerVoucher parameter. |
| parmSettlementGroupPlaceHolder_W | Gets or sets the SettlementGroupPlaceHolder_W parameter. |
| parmTransactionDate_W | Gets or sets the TransactionDate_W parameter. |
| pennyDiffTxt | |
| postCashDisc | |
| postCashDiscForTaxGeneralJournal | |
| postCashDiscForTaxLedgerVoucher | |
| postCashDiscForTaxSubLedger | |
| postCashDiscPerDimensionGeneralJournal | |
| postCashDiscPerDimensionSubLedger | |
| postClosing | |
| postConditionalTax | Creates conditional tax transactions for the settlement. |
| postDiscTrans | Creates the cash discount transactions for the settlement. |
| postDiscTransToCreditCompany | Creates the ledger transactions when the cash discount is posted to the payment company. |
| postDueToAndFrom | Creates due to and due from transactions for the settlement. |
| postDueToAndFromCreateTrans | Creates the due-to or due-from transactions for the specified settlement and transaction. |
| postExchRateDiff | Creates exchange adjustment transactions for the settlement. |
| postExchRateLedgerTrans | Posts the exchange rate adjustment in the ledger. |
| postFineTrans_BR | Creates and post fine transaction for the settlement. |
| postFineTransToCreditCompany_BR | Creates the ledger transactions when the Fine is posted to the payment company. |
| postForeignVendor_IN | Posts foreign vendor information. |
| postForeignVendorAdv_IN | Posts foreign vendor information. |
| postForeignVendorReverseCharge_IN | Posts foreign vendor reverse charge. |
| postForeignVendorReverseChargeAdv_IN | Posts advance foreign vendor reverse charge. |
| postGTAvendor_IN | Posts GTA vendor information. |
| postGTAVendorAdv_IN | Posts GTA vendor information. |
| postGTAVendorReverseCharge_IN | Posts GTA vendor information. |
| postGTAVendorReverseChargeAdv_IN | Posts GTA vendor information. |
| postingProfileSettle_CreateDistributions | Creates the general journal records for posting profile differences. |
| postingProfileSettle_CreateTrans | Creates the CustVendTrans and CustVendSettlement records for posting profile differences. |
| postingTypeFine_BR | Gets the fine posting type |
| postingTypeInterest_BR | Returns the interest posting type |
| postInterestTrans_BR | Creates and post interest transaction for the settlement. |
| postInterestTransToCreditCompany_BR | Creates the ledger transactions when the interest is posted to the payment company. |
| postPennyDiff | Creates the penny difference transactions for the settlement. |
| postPennyDiffOnCashDisc | Posts the penny difference on cash discount in the ledger. |
| postServiceTax_IN | Postss service tax information. |
| postTaxOverUnderPayment | Posts the tax for an over or under payment. |
| postTaxToInvoiceCompany_IN | Post the calculated tax to the invoice company. |
| postVATTransForTaxAgent_RU | |
| postVATTransit_RU | |
| postVATTransitAmountDiff_RU | |
| processCashDiscount | Calculates the amount of the cash discount for the debit and credit transactions. |
| processConditionalTax | Determines if the conditional tax must be calculated on the settlement transactions. |
| processConditionalTax_ES | Performs posting of conditional tax for Spanish scenarios (remittance without BOE/Promissory note). |
| processFine_BR | Calculates the amount of the Fine for the debit and credit transactions. |
| processInterest_BR | Calculates the amount of the Interest for the debit and credit transactions. |
| processServiceTax_IN | Process service tax. |
| processStillOpenTransactions | Processes transactions that that have a balance remaining after settlement. |
| processStillOpenTransSpecific | Posts transactions to settle the remaining amount on the transaction by using the cash discount administration specific rules. |
| processStillOpenTransUnspecific | Posts transactions to settle the remaining amount on the transaction using the cash discount administration unspecific rules. |
| processTaxChargeIntercompany | This method is used to process the set containing a collection of TaxChargeInterCompany objects.It creates two transactions, one for due to/from and the other for the expense. |
| processTaxOnOverPayment | Processes the tax on an over-payment. |
| processTaxOnOverPaymentCalcPercent | Calculates the percent of tax to be adjusted for an over payment. |
| processTaxOnUnderPayment | Processes the tax on an under-payment. |
| processVatTaxAgentAmounts_RU | |
| processVATTransit_RU | |
| reverseAmounts | |
| reversedAmount_RU | |
| reverseTax | Reverses unrealized VAT according to given reversal journal. |
| reverseTransOpenAmounts | |
| roundTransactionAmounts | Rounds the amounts for the specified transactions. |
| saveDate | Gets or sets the value of the variable saveDate. |
| setBuffer | |
| setCreditCompanyCurrency | |
| setDebitCompanyCurrency | |
| setDiscHistoryValues | Sets the cash discount array variables. |
| setIsDebitCreditVoucherCreated | This method is used to reset the isDebitVoucherCreated and isCrediVoucherCreated flags. |
| setLedgerVoucherGroup | |
| setOffsetVoucher | Sets the OffsetVoucher variable. |
| setPostingProfile | Sets the PostingProfile variable. |
| setStillOpenValues | Sets the still open array variables. |
| setTimeOut | Sets up the scheduled execution of a specified method. (Inherited from Object.) |
| settleForDifferentProfilesOrPrepayment | Creates settlement transactions when the transactions being settled have different posting profiles or are prepayment. |
| settlementControl | |
| settleNow | Settles the transactions associated with the specified parameters. |
| sumRemainAmount | Finds the sum of the amount that remains on the specification table, connected to the CustVendTransOpen table. |
| targetTaxLedgerParmsList_RU | Returns list targetTaxLedgerParmsList. |
| taxCashDisc | Calculates and posts the tax on the cash discount. |
| taxSettlement | Calls the TaxSettlement. |
| taxSettlement_IN | Settles tax of given transaction. |
| taxTransRecIDs_RU | Set of tax transactions recIDs inserted by calcAndPostTaxExchRateDiff_RU,which should be linked with posting log |
| toString | Returns a string that represents the current object. (Inherited from Object.) |
| totalTaxWithholdAmount_IN | Reads the table buffer and calculate the amount. |
| unpack | Deserializes the _packedClass parameter value to an instance of the CustVendSettle class. |
| updateAdvanceDefinition | |
| updateAmountsOnTransactionForFine_BR | |
| updateAmountsOnTransactionForInterest_BR | |
| updateCashDiscDate | Selects the CustTransOpen or VendTransOpen table from the SpecTrans table and sets the cash discount date equal to the due date. |
| updateCustReceipt | Updates cust receipt number. |
| updateCustTaxInvoice | Updates cust tax invoice number. |
| updateExchAdjAmountOnTrans | Updates the exchange adjustment fields on the specified transactions. |
| updateOtherSettlementFieldsOnTrans | Updates the fields on the CustVendTrans and SpecTrans tables for settlement. |
| updateSettleCurAmountOnTrans | Updates the amount settled in the transaction currency fields on the specified transactions. |
| updateSettleMstAmountOnTrans | Updates the amount settled in the monetary standard (MST) currency fields on the specified transactions. |
| updateSettleReportingAmountOnTrans | |
| updateSTAdvancePayment_IN | Updates STA advance payment information. |
| updateTaxWithholdTrans_IN | Updates the table for transaction record. |
| updateTransaction_W | |
| updateTransactionProject | |
| updateTransactionReverseExchAdj_W | |
| updateTransFor1099 | Updates the 1099 tax amount fields on the debit and credit transaction. |
| updateTransForCashDisc | Updates fields on the specified transaction for the specified cash discount amount. |
| updateTransForFine_BR | Updates fields on the specified transaction for the specified Fine amount. |
| updateTransForInterest_BR | Updates fields on the specified transaction for the specified Interet amount. |
| updateTransForVATTaxAgent_RU | |
| updateTransOpen | Transfers the customer or vendor transaction cash discount to the settlement. |
| updateVendSettlementTax1099 | Records the payments per invoice line for 1099 purposes. |
| usageCount | Returns the current number of references, that is, the value of the reference counter, that the object has. (Inherited from Object.) |
| useInvoiceLineAccount | Determines whether to use invoice line accout or cash discount account for discount posting |
| wait | Pauses a process. (Inherited from Object.) |
| xml | Returns an XML string that represents the current object. (Inherited from Object.) |
| ::checkServiceTaxPayment_IN | Validates advance payment of one company with taxes cannot be applied on the invoices of other company |
| ::checkTransDimension_RU | |
| ::construct | |
| ::constructCurrencyDeal_RU | |
| ::constructPayment | Creates a new instance of the CustVendSettle parent class by instantiating the derived classes CustVendSettle_CustPaym or CustVendSettle_VendPaym. |
| ::isOriginAdjustingInvoice_IN | Verifies if the free text invoice is a cancelling invoice. |
| ::newOffsetVoucher | Calls the construct method, and then sets the parameters OffsetVoucher, LedgerVoucher, TransactionDate, and PostingProfile. |
| ::postingProfileSettle_RU |
This settlement can be performed from the customer table form, vendor table form or from a journal.
The settleNow method is the main method that performs the settlement. All the other methods are sub-methods to this class. The settlement engine can only settle transactions from the customer or vendor transactions form and the journals. The engine cannot be used for extended development, if the functionality of settling customer or vendor transactions is needed from somewhere else.
This example demonstrates the use of the CustVendSettle class. However, this example will not compile in a job as it must be run in the context of a class, form, or other object.
// Upon selecting each transactions for settlement, a transaction in the
// Specification table is created. These Specification transactions are the
// foundation for settling.
Specification.create(CustTransOpen.RecId, AmountCur, CustTrans.CurrencyCode);
// Construct this class.
custVendSettle = CustVendSettle::newOffsetVoucher(
module,
offsetVoucher,
ledgerVoucher,
postingProfile)
// The settleNow method is called with the following parameters:
// tableId: Indicates whether customer or vendor transactions are to be
// settled.
// recId: Indicate which customer or vendor is to be settled. All
// specification transactions within that customer or vendor are settled.
used custVendSettle.settleNow(CustTable.tableId, CustTable.recId);