public class CRMProcessVoucherBean extends CRMProcess
Constructor and Description |
---|
CRMProcessVoucherBean() |
Modifier and Type | Method and Description |
---|---|
void |
acceptVouchers(java.lang.String processNum,
java.lang.String lotID)
Handles the lot acceptance process invoked by the scheduler.
|
void |
activateVoucher(com.crm.dataobject.vouchers.CRMDOVoucher voucher,
java.lang.String processRunLogID)
Activates a voucher.
|
void |
activateVouchers(java.lang.String processRunLogID)
Handles the voucher activation process invoked by the scheduler.
|
void |
activateVouchers(java.lang.String processRunLogID,
java.lang.String voucherTypeID,
java.lang.String lotID,
java.lang.String fromNumber,
java.lang.String toNumber)
Handles the voucher activation process invoked by the scheduler.
|
void |
amendLot(java.lang.String processNum,
java.lang.String lotID,
java.lang.Integer additionalVouchersToBeGenerated)
Amends the lot.
|
com.crm.dataobject.financialtransactions.CRMDOInvoiceLine |
calculateAvailableQuantity(com.crm.dataobject.financialtransactions.CRMDOInvoiceLine invoiceLine)
Calculates the available quantity of vouchers for the given invoice line
|
com.crm.dataobject.vouchers.CRMDOVoucher |
cancelElectronicVoucher(com.crm.dataobject.vouchers.CRMDOVoucher voucher,
com.crm.dataobject.vouchers.VoucherCancellationReason cancellationReason)
Cancels an electronic voucher.
|
void |
cancelVouchers(java.lang.String processRunLogID)
Handles the voucher cancellation process invoked by the scheduler.
|
void |
cancelVouchers(java.lang.String processRunLogID,
java.lang.String voucherTypeID,
java.lang.String lotID,
java.lang.String fromNumber,
java.lang.String toNumber,
java.lang.String partnerAccountID,
java.lang.String invoiceID)
Handles the voucher cancellation process invoked by the scheduler.
|
java.lang.String |
constructInvoicedVouchersFile(com.crm.dataobject.financialtransactions.CRMDOInvoice invoice) |
com.crm.dataobject.financialtransactions.CRMDOCreditNote |
createCreditNoteForReturnVoucherProcess(com.crm.dataobject.accounts.CRMDOAccountReceivable account,
java.util.ArrayList<com.crm.dataobject.financialtransactions.CRMDOInvoiceLine> invoiceLines)
Creates and posts a credit note for the return vouchers process.
|
java.lang.String |
exportLotVouchers(com.crm.dataobject.vouchers.CRMDOLot lot) |
java.lang.String |
exportLotVouchers(com.crm.dataobject.vouchers.CRMDOLot lot,
java.lang.String fileName)
Exports a lot's vouchers to a file.
|
java.lang.String |
exportLotVouchers(java.lang.String lotId,
java.lang.String fileName)
Exports the specified lot to an encrypted file.
|
void |
generateLotVouchers(java.lang.String processNum,
java.lang.String lotID,
java.math.BigDecimal voucherValue,
java.math.BigDecimal voucherExtraAddedValue)
This method is invoked by the scheduler to generate a lot's vouchers.
|
com.crm.framework.util.ResultSetUtil |
getDraftVouchers(java.lang.String lotID)
Returns the draft vouchers of a lot.
|
java.lang.String[] |
getFileHeaders()
Return an array with the header of the export file
|
java.lang.String |
getProcessRestrictedStateList(com.crm.dataobject.vouchers.VoucherProcess voucherProcess)
Returns the restricted state list of a process.
|
java.lang.String |
getProcessRestrictedStateListLabels(com.crm.dataobject.vouchers.VoucherProcess voucherProcess)
Returns the labels of the restricted states of a process.
|
com.crm.framework.util.ResultSetUtil |
getVouchersToBeActivated(java.lang.String voucherTypeID,
java.lang.String lotID,
java.lang.String fromNumber,
java.lang.String toNumber)
Returns the vouchers to be activated by a set of criteria.
|
com.crm.framework.util.ResultSetUtil |
getVouchersToBeCanceled(java.lang.String voucherTypeID,
java.lang.String lotID,
java.lang.String fromNumber,
java.lang.String toNumber,
java.lang.String partnerAccountID,
java.lang.String invoiceID)
Returns the vouchers to be cancelled by a set of criteria.
|
com.crm.framework.util.ResultSetUtil |
getVouchersToBeExported(java.lang.String lotID)
Returns the vouchers of a lot to be exported.
|
com.crm.framework.util.ResultSetUtil |
getVouchersToBePurged(java.lang.String lotIDs,
java.lang.String voucherTypeIDs,
java.lang.Integer daysAfterExpiration,
java.lang.Integer applyOnDraft,
java.lang.Integer applyOnAccepted,
java.lang.Integer applyOnNotAccepted,
java.lang.Integer applyOnCancelled)
Returns the vouchers to be purged by a set of criteria.
|
com.crm.framework.util.ResultSetUtil |
getVouchersToBeReturned(java.lang.String partnerAccountID,
java.lang.String invoicedByID,
java.lang.String fromNumber,
java.lang.String toNumber)
Returns the vouchers to be activated by a set of criteria.
|
void |
importVoucher(com.crm.dataobject.vouchers.CRMDOVoucher voucher,
com.crm.dataobject.CRMDOAttachment attachment,
com.crm.dataobject.vouchers.ImportVoucherDefinition importVoucherDefinition,
com.crm.dataobject.processrun.CRMDOProcessRunLog processRun) |
void |
modifyVouchers(java.lang.String processNum,
java.lang.String lotID,
java.lang.String newEffectiveDateSQL,
java.lang.String newExpirationDateSQL,
java.lang.String voucherTypeID,
java.math.BigDecimal voucherValue,
java.math.BigDecimal voucherExtraAddedValue)
Handles the voucher modification process invoked by the scheduler.
|
com.crm.dataobject.vouchers.CRMDOVoucher |
purchaseElectronicVoucher(com.crm.dataobject.vouchers.CRMDOVoucher voucher)
Purchases an electronic voucher.
|
com.crm.dataobject.vouchers.CRMDOVoucher |
purchaseElectronicVoucherThroughRetailer(com.crm.dataobject.vouchers.CRMDOVoucher voucher)
Purchases an electronic voucher through a Retailer.
|
java.util.Set<com.crm.dataobject.vouchers.CRMDOVoucher> |
purchaseElectronicVoucherUsingWalletFunds(com.crm.dataobject.wallets.CRMDOWallet wallet,
com.crm.dataobject.vouchers.CRMDOVoucherType voucherType,
java.lang.Integer quantity)
Purchases an electronic voucher using wallet funds.
|
void |
purgeVouchers(java.lang.String processRunLogID)
Handles the voucher purging process invoked by the scheduler.
|
void |
purgeVouchers(java.lang.String processRunLogID,
java.lang.String lotIDs,
java.lang.String voucherTypeIDs,
java.lang.Integer daysAfterExpiration,
java.lang.Integer applyOnDraft,
java.lang.Integer applyOnAccepted,
java.lang.Integer applyOnNotAccepted,
java.lang.Integer applyOnCancelled)
Handles the voucher purging process invoked by the scheduler.
|
void |
rejectVouchers(java.lang.String processNum,
java.lang.String lotID)
Handles the lot rejection process invoked by the scheduler.
|
void |
returnVouchers(java.lang.String processRunLogID)
Handles the voucher return process invoked by the scheduler.
|
void |
returnVouchers(java.lang.String processRunLogID,
java.lang.String fromNumber,
java.lang.String toNumber,
java.lang.String partnerAccountID,
java.lang.String invoicedByID)
Handles the voucher return process invoked by the scheduler.
|
void |
scheduleLotAcceptance(com.crm.dataobject.vouchers.CRMDOLot lot,
java.util.Date executionDate)
Creates a scheduled job for the lot acceptance process.
|
void |
scheduleLotAmendment(com.crm.dataobject.vouchers.CRMDOLot lot,
java.lang.Integer additionalVouchersToBeGenerated,
java.util.Date executionDate)
Schedules a lot amendment.
|
void |
scheduleVoucherActivation(com.crm.dataobject.vouchers.CRMDOVoucherType voucherType,
com.crm.dataobject.vouchers.CRMDOLot lot,
java.lang.String fromNumber,
java.lang.String toNumber,
java.util.Date executionDate)
Creates a scheduled job for the voucher activation process.
|
void |
scheduleVoucherCancellation(com.crm.dataobject.vouchers.CRMDOVoucherType voucherType,
com.crm.dataobject.vouchers.CRMDOLot lot,
java.lang.String fromNumber,
java.lang.String toNumber,
com.crm.dataobject.accounts.CRMDOAccountReceivable partnerAccount,
com.crm.dataobject.financialtransactions.CRMDOInvoice invoice,
java.util.Date executionDate)
Creates a scheduled job for the voucher cancellation process.
|
void |
scheduleVoucherGeneration(java.lang.String lotID,
java.util.Date executionDate,
java.math.BigDecimal voucherValue,
java.math.BigDecimal voucherExtraAddedValue)
Creates a scheduled job for the voucher generation process.
|
void |
scheduleVoucherModification(com.crm.dataobject.vouchers.CRMDOLot lot,
java.util.Date newEffectiveDate,
java.util.Date newExpirationDate,
java.lang.String voucherTypeID,
java.math.BigDecimal voucherValue,
java.math.BigDecimal voucherExtraAddedValue,
java.util.Date executionDate)
Creates a scheduled job for the voucher modification process.
|
void |
scheduleVoucherPurging(java.lang.Integer daysAfterExpiration,
java.lang.Integer applyOnDraft,
java.lang.Integer applyOnAccepted,
java.lang.Integer applyOnNotAccepted,
java.lang.Integer applyOnCancelled,
java.util.Date executionDate,
java.util.ArrayList<com.crm.dataobject.vouchers.CRMDOLot> lots,
java.util.ArrayList<com.crm.dataobject.vouchers.CRMDOVoucherType> voucherTypes)
Creates a scheduled job for the voucher purging process.
|
void |
scheduleVoucherRejection(com.crm.dataobject.vouchers.CRMDOLot lot,
java.util.Date executionDate)
Creates a scheduled job for the lot rejection process.
|
void |
scheduleVoucherReturn(java.lang.String fromNumber,
java.lang.String toNumber,
com.crm.dataobject.accounts.CRMDOAccountReceivable partnerAccount,
com.crm.dataobject.financialtransactions.CRMDOInvoice invoicedBy,
java.util.Date executionDate)
Creates a scheduled job for the voucher return process.
|
com.crm.dataobject.financialtransactions.CRMDOInvoice |
sellVouchers(com.crm.dataobject.financialtransactions.CRMDOInvoice invoice)
Processes a vouchers sale.
|
com.crm.dataobject.financialtransactions.CRMDOInvoice |
sellVouchers(java.util.Set<com.crm.dataobject.vouchers.VouchersSaleProduct> products,
com.crm.dataobject.accounts.CRMDOAccountReceivable accountReceivable,
com.crm.dataobject.financialtransactions.CRMDOFinancialTransactionType invoiceType,
com.crm.dataobject.financialtransactions.CRMDOFinancialTransactionCategory category,
java.util.Date dueDate)
Processes a vouchers sale.
|
com.crm.dataobject.vouchers.CRMDOVoucher |
useVoucher(com.crm.dataobject.vouchers.CRMDOVoucher voucher,
com.crm.dataobject.accounts.CRMDOAccountReceivable accountReceivable,
com.crm.dataobject.financialtransactions.CRMDOFinancialTransactionCategory paymentCategory,
java.lang.String notes)
Uses a voucher.
|
void |
validatePurchaseElectronicVoucherUsingWalletFunds(com.crm.dataobject.wallets.CRMDOWallet wallet,
com.crm.dataobject.vouchers.CRMDOVoucherType voucherType)
Validates the purchase of the Electronic Voucher Using Wallet Funds
|
createCronExpressionFromDate, createCronExpressionFromDate, setMandatoryField
public void generateLotVouchers(java.lang.String processNum, java.lang.String lotID, java.math.BigDecimal voucherValue, java.math.BigDecimal voucherExtraAddedValue) throws java.lang.Exception
processNum
- - the process numberlotID
- - the id of the lot to generate the vouchers forjava.lang.Exception
public void scheduleVoucherGeneration(java.lang.String lotID, java.util.Date executionDate, java.math.BigDecimal voucherValue, java.math.BigDecimal voucherExtraAddedValue) throws java.lang.Exception
lotID
- - the id of the lot to be processedexecutionDate
- - the process execution datevoucherExtraAddedValue
- voucherValue
- java.lang.Exception
public void scheduleLotAcceptance(com.crm.dataobject.vouchers.CRMDOLot lot, java.util.Date executionDate) throws java.lang.Exception
lot
- - a lot to be processedexecutionDate
- - the process execution datejava.lang.Exception
public void acceptVouchers(java.lang.String processNum, java.lang.String lotID) throws java.lang.Exception
processNum
- - the number of the scheduler processlotID
- - the id of the vouchers lotjava.lang.Exception
public void scheduleVoucherRejection(com.crm.dataobject.vouchers.CRMDOLot lot, java.util.Date executionDate) throws java.lang.Exception
lot
- - a lot to be processedexecutionDate
- - the process execution datejava.lang.Exception
public void rejectVouchers(java.lang.String processNum, java.lang.String lotID) throws java.lang.Exception
lotID
- - a lot id to be processedjava.lang.Exception
public void scheduleVoucherActivation(com.crm.dataobject.vouchers.CRMDOVoucherType voucherType, com.crm.dataobject.vouchers.CRMDOLot lot, java.lang.String fromNumber, java.lang.String toNumber, java.util.Date executionDate) throws java.lang.Exception, com.crm.exception.AtLeastOneFieldException, com.crm.exception.vouchers.VoucherNotFoundException
voucherType
- - the voucher type of the vouchers to be activatedlot
- - the lot to be activatedfromNumber
- - the start of the number range of the vouchers to be activatedtoNumber
- - the end of the number range of the vouchers to be activatedexecutionDate
- - the process execution datejava.lang.Exception
com.crm.exception.AtLeastOneFieldException
com.crm.exception.vouchers.VoucherNotFoundException
public void activateVoucher(com.crm.dataobject.vouchers.CRMDOVoucher voucher, java.lang.String processRunLogID) throws java.lang.Exception
voucher
- - the voucher to activateprocessRunLogID
- - the process run log IDjava.lang.Exception
public void activateVouchers(java.lang.String processRunLogID) throws java.lang.Exception
processRunLogID
- - the process run logjava.lang.Exception
public void activateVouchers(java.lang.String processRunLogID, java.lang.String voucherTypeID, java.lang.String lotID, java.lang.String fromNumber, java.lang.String toNumber) throws java.lang.Exception
processRunLogID
- - the process run logvoucherTypeID
- - the voucher type of the vouchers to be activatedlotID
- - the id of the lot to be activatedfromNumber
- - the start of the voucher number range to be activatedtoNumber
- - the end of the voucher number range to be activatedjava.lang.Exception
public void scheduleVoucherCancellation(com.crm.dataobject.vouchers.CRMDOVoucherType voucherType, com.crm.dataobject.vouchers.CRMDOLot lot, java.lang.String fromNumber, java.lang.String toNumber, com.crm.dataobject.accounts.CRMDOAccountReceivable partnerAccount, com.crm.dataobject.financialtransactions.CRMDOInvoice invoice, java.util.Date executionDate) throws java.lang.Exception, com.crm.exception.AtLeastOneFieldException, com.crm.exception.vouchers.VoucherCannotBeCancelledException
voucherType
- - the voucher type of the vouchers to be cancelledlot
- - the lot to be cancelledfromNumber
- - the start of the number range of the vouchers to be cancelledtoNumber
- - the end of the number range of the vouchers to be cancelledexecutionDate
- - the process execution datejava.lang.Exception
com.crm.exception.AtLeastOneFieldException
com.crm.exception.vouchers.VoucherCannotBeCancelledException
public void cancelVouchers(java.lang.String processRunLogID) throws java.lang.Exception
processRunLogID
- - the process run logjava.lang.Exception
public void cancelVouchers(java.lang.String processRunLogID, java.lang.String voucherTypeID, java.lang.String lotID, java.lang.String fromNumber, java.lang.String toNumber, java.lang.String partnerAccountID, java.lang.String invoiceID) throws java.lang.Exception
processRunLogID
- - the process run logvoucherTypeID
- - the voucher type of the vouchers to be cancelledlotID
- - the ID of the lot to be cancelledfromNumber
- - the start of the voucher number range to be cancelledtoNumber
- - the end of the voucher number range to be cancelledpartnerAccountID
- - the partner account that owns the vouchers to be cancelledinvoiceID
- - the invoice that billed the vouchers to be cancelledjava.lang.Exception
public void scheduleVoucherReturn(java.lang.String fromNumber, java.lang.String toNumber, com.crm.dataobject.accounts.CRMDOAccountReceivable partnerAccount, com.crm.dataobject.financialtransactions.CRMDOInvoice invoicedBy, java.util.Date executionDate) throws java.lang.Exception, com.crm.exception.AtLeastOneFieldException, com.crm.exception.vouchers.VoucherCannotBeReturnedException
fromNumber
- - the start of the number range of the vouchers to be returnedtoNumber
- - the end of the number range of the vouchers to be returnedpartnerAccount
- - the partner account that owns the vouchers to be returnedinvoicedBy
- - the invoice that billed the account that owns the vouchers to be returnedexecutionDate
- - the process execution datejava.lang.Exception
com.crm.exception.AtLeastOneFieldException
com.crm.exception.vouchers.VoucherCannotBeReturnedException
public void returnVouchers(java.lang.String processRunLogID) throws java.lang.Exception
processRunLogID
- - the process run logjava.lang.Exception
public void returnVouchers(java.lang.String processRunLogID, java.lang.String fromNumber, java.lang.String toNumber, java.lang.String partnerAccountID, java.lang.String invoicedByID) throws java.lang.Exception
processRunLogID
- - the process run logfromNumber
- - the start of the voucher number range to be returnedtoNumber
- - the end of the voucher number range to be returnedpartnerAccountID
- - the partner account that owns the vouchers to be returnedinvoicedByID
- - the invoice that billed the vouchers to be returnedjava.lang.Exception
public com.crm.dataobject.financialtransactions.CRMDOCreditNote createCreditNoteForReturnVoucherProcess(com.crm.dataobject.accounts.CRMDOAccountReceivable account, java.util.ArrayList<com.crm.dataobject.financialtransactions.CRMDOInvoiceLine> invoiceLines) throws java.lang.Exception
account
- - the account to post the credit note againstinvoiceLines
- - the invoice lines of the invoices that billed the vouchers to be returnedjava.lang.Exception
public void scheduleVoucherPurging(java.lang.Integer daysAfterExpiration, java.lang.Integer applyOnDraft, java.lang.Integer applyOnAccepted, java.lang.Integer applyOnNotAccepted, java.lang.Integer applyOnCancelled, java.util.Date executionDate, java.util.ArrayList<com.crm.dataobject.vouchers.CRMDOLot> lots, java.util.ArrayList<com.crm.dataobject.vouchers.CRMDOVoucherType> voucherTypes) throws java.lang.Exception, com.crm.exception.AtLeastOneFieldException
daysAfterExpiration
- - the number of days after the expiration dateapplyOnDraft
- - indicates that only the vouchers with state Draft should be purged (1) or not (0)applyOnAccepted
- - indicates that only the vouchers with state Accepted for Activation should be purged (1) or not (0)applyOnNotAccepted
- - indicates that only the vouchers with state Not Accepted for Activation should be purged (1) or not (0)applyOnCancelled
- - indicates that only the vouchers with state Cancelled should be purged (1) or not (0)executionDate
- - the process execution datevoucherTypes
- lots
- java.lang.Exception
com.crm.exception.AtLeastOneFieldException
public void purgeVouchers(java.lang.String processRunLogID) throws java.lang.Exception
processRunLogID
- - the process run logjava.lang.Exception
public void purgeVouchers(java.lang.String processRunLogID, java.lang.String lotIDs, java.lang.String voucherTypeIDs, java.lang.Integer daysAfterExpiration, java.lang.Integer applyOnDraft, java.lang.Integer applyOnAccepted, java.lang.Integer applyOnNotAccepted, java.lang.Integer applyOnCancelled) throws java.lang.Exception
processRunLogID
- - the process run loglotIDs
- - the lots of the vouchers that should be purgedvoucherTypeIDs
- - the voucher types of the vouchers that should be purgeddaysAfterExpiration
- - the number of days after the expiration dateapplyOnDraft
- - indicates that only the vouchers with state Draft should be purged (1) or not (0)applyOnAccepted
- - indicates that only the vouchers with state Accepted for Activation should be purged (1) or not (0)applyOnNotAccepted
- - indicates that only the vouchers with state Not Accepted for Activation should be purged (1) or not (0)applyOnCancelled
- - indicates that only the vouchers with state Cancelled should be purged (1) or not (0)java.lang.Exception
public void scheduleVoucherModification(com.crm.dataobject.vouchers.CRMDOLot lot, java.util.Date newEffectiveDate, java.util.Date newExpirationDate, java.lang.String voucherTypeID, java.math.BigDecimal voucherValue, java.math.BigDecimal voucherExtraAddedValue, java.util.Date executionDate) throws java.lang.Exception
lot
- - a lot to be processednewEffectiveDate
- - the lot and lot's vouchers new effective datenewExpirationDate
- - the lot and lot's vouchers new expiration datevoucherTypeID
- - the lot and lot's vouchers new voucher typevoucherExtraAddedValue
- voucherValue
- executionDate
- - the process execution datejava.lang.Exception
public void modifyVouchers(java.lang.String processNum, java.lang.String lotID, java.lang.String newEffectiveDateSQL, java.lang.String newExpirationDateSQL, java.lang.String voucherTypeID, java.math.BigDecimal voucherValue, java.math.BigDecimal voucherExtraAddedValue) throws java.lang.Exception
processNum
- lotID
- newEffectiveDateSQL
- newExpirationDateSQL
- voucherTypeID
- voucherValue
- voucherExtraAddedValue
- java.lang.Exception
public java.lang.String exportLotVouchers(java.lang.String lotId, java.lang.String fileName) throws java.lang.Exception
lotId
- the ID of the lot to exportjava.lang.Exception
public java.lang.String exportLotVouchers(com.crm.dataobject.vouchers.CRMDOLot lot) throws java.lang.Exception
java.lang.Exception
public java.lang.String exportLotVouchers(com.crm.dataobject.vouchers.CRMDOLot lot, java.lang.String fileName) throws java.lang.Exception
lot
- - the lot to export the vouchers forfileName
- - the export file namejava.lang.Exception
public java.lang.String getProcessRestrictedStateList(com.crm.dataobject.vouchers.VoucherProcess voucherProcess) throws java.lang.Exception
voucherProcess
- - the process idjava.lang.Exception
public java.lang.String getProcessRestrictedStateListLabels(com.crm.dataobject.vouchers.VoucherProcess voucherProcess) throws java.lang.Exception
voucherProcess
- - the process idjava.lang.Exception
public com.crm.dataobject.vouchers.CRMDOVoucher purchaseElectronicVoucher(com.crm.dataobject.vouchers.CRMDOVoucher voucher) throws java.lang.Exception
voucher
- - the voucher to purchasejava.lang.Exception
public com.crm.dataobject.vouchers.CRMDOVoucher purchaseElectronicVoucherThroughRetailer(com.crm.dataobject.vouchers.CRMDOVoucher voucher) throws java.lang.Exception
voucher
- - the voucher to purchasejava.lang.Exception
public java.util.Set<com.crm.dataobject.vouchers.CRMDOVoucher> purchaseElectronicVoucherUsingWalletFunds(com.crm.dataobject.wallets.CRMDOWallet wallet, com.crm.dataobject.vouchers.CRMDOVoucherType voucherType, java.lang.Integer quantity) throws java.lang.Exception
wallet
- - the wallet to purchase the voucher forvoucherType
- - The voucher type that the participant wants to buyquantity
- - The quantity of vouchers to buyjava.lang.Exception
public void validatePurchaseElectronicVoucherUsingWalletFunds(com.crm.dataobject.wallets.CRMDOWallet wallet, com.crm.dataobject.vouchers.CRMDOVoucherType voucherType) throws java.lang.Exception
wallet
- - the wallet to validatevoucherType
- - the voucher Type to validatejava.lang.Exception
public com.crm.dataobject.vouchers.CRMDOVoucher cancelElectronicVoucher(com.crm.dataobject.vouchers.CRMDOVoucher voucher, com.crm.dataobject.vouchers.VoucherCancellationReason cancellationReason) throws java.lang.Exception
voucher
- - the voucher to cancelcancellationReason
- - the cancellation reasonjava.lang.Exception
public com.crm.dataobject.vouchers.CRMDOVoucher useVoucher(com.crm.dataobject.vouchers.CRMDOVoucher voucher, com.crm.dataobject.accounts.CRMDOAccountReceivable accountReceivable, com.crm.dataobject.financialtransactions.CRMDOFinancialTransactionCategory paymentCategory, java.lang.String notes) throws java.lang.Exception
voucher
- - the voucher to useaccountReceivable
- - the voucher account receivablepaymentCategory
- - the payment category to set on the created paymentnotes
- - the notes to set on the created paymentjava.lang.Exception
public com.crm.framework.util.ResultSetUtil getVouchersToBeCanceled(java.lang.String voucherTypeID, java.lang.String lotID, java.lang.String fromNumber, java.lang.String toNumber, java.lang.String partnerAccountID, java.lang.String invoiceID) throws java.lang.Exception
voucherTypeID
- - the voucher type IDlotID
- - the lot IDfromNumber
- - the voucher From Number of the vouchers to be cancelledtoNumber
- - the voucher To Number of the vouchers to be cancelledpartnerAccountID
- - the partner account that owns the vouchers to be cancelledinvoiceID
- - the invoice that billed the vouchers to be cancelledjava.lang.Exception
public com.crm.framework.util.ResultSetUtil getVouchersToBeActivated(java.lang.String voucherTypeID, java.lang.String lotID, java.lang.String fromNumber, java.lang.String toNumber) throws java.lang.Exception
voucherTypeID
- - the voucher type IDlotID
- - the lot IDfromNumber
- - the voucher From Number of the vouchers to be cancelledtoNumber
- - the voucher To Number of the vouchers to be cancelledjava.lang.Exception
public com.crm.framework.util.ResultSetUtil getVouchersToBePurged(java.lang.String lotIDs, java.lang.String voucherTypeIDs, java.lang.Integer daysAfterExpiration, java.lang.Integer applyOnDraft, java.lang.Integer applyOnAccepted, java.lang.Integer applyOnNotAccepted, java.lang.Integer applyOnCancelled) throws java.lang.Exception
daysAfterExpiration
- - the number of days after the expiration dateapplyOnDraft
- - indicates that only the vouchers with state Draft should be purged (1) or not (0)applyOnAccepted
- - indicates that only the vouchers with state Accepted for Activation should be purged (1) or not (0)applyOnNotAccepted
- - indicates that only the vouchers with state Not Accepted for Activation should be purged (1) or not (0)applyOnCancelled
- - indicates that only the vouchers with state Cancelled should be purged (1) or not (0)java.lang.Exception
public com.crm.framework.util.ResultSetUtil getVouchersToBeReturned(java.lang.String partnerAccountID, java.lang.String invoicedByID, java.lang.String fromNumber, java.lang.String toNumber) throws java.lang.Exception
partnerAccountID
- - the partner account IDinvoicedByID
- - the invoice IDfromNumber
- - the voucher From Number of the vouchers to be cancelledtoNumber
- - the voucher To Number of the vouchers to be cancelledjava.lang.Exception
public com.crm.framework.util.ResultSetUtil getDraftVouchers(java.lang.String lotID) throws java.lang.Exception
lotID
- - the lot IDjava.lang.Exception
public com.crm.framework.util.ResultSetUtil getVouchersToBeExported(java.lang.String lotID) throws java.lang.Exception
lotID
- - the lot IDjava.lang.Exception
public void scheduleLotAmendment(com.crm.dataobject.vouchers.CRMDOLot lot, java.lang.Integer additionalVouchersToBeGenerated, java.util.Date executionDate) throws java.lang.Exception
lot
- - the lot to amendadditionalVouchersToBeGenerated
- - the additional number of vouchers to be generatedexecutionDate
- - the execution datejava.lang.Exception
public void amendLot(java.lang.String processNum, java.lang.String lotID, java.lang.Integer additionalVouchersToBeGenerated) throws java.lang.Exception
processNum
- - the process numberlotID
- - the lot idadditionalVouchersToBeGenerated
- - the additional number of vouchers to be generatedjava.lang.Exception
public java.lang.String constructInvoicedVouchersFile(com.crm.dataobject.financialtransactions.CRMDOInvoice invoice) throws java.lang.Exception
java.lang.Exception
public java.lang.String[] getFileHeaders() throws java.lang.Exception
java.lang.Exception
public com.crm.dataobject.financialtransactions.CRMDOInvoice sellVouchers(java.util.Set<com.crm.dataobject.vouchers.VouchersSaleProduct> products, com.crm.dataobject.accounts.CRMDOAccountReceivable accountReceivable, com.crm.dataobject.financialtransactions.CRMDOFinancialTransactionType invoiceType, com.crm.dataobject.financialtransactions.CRMDOFinancialTransactionCategory category, java.util.Date dueDate) throws java.lang.Exception
products
- - the products that will be used to create the invoice lines. (mandatory)accountReceivable
- - the account receivable to which the vouchers will be sold. (mandatory)invoiceType
- - the type of the invoice to be created. (mandatory)category
- - the category of the invoice to be createddueDate
- - the invoice's due datejava.lang.Exception
public com.crm.dataobject.financialtransactions.CRMDOInvoiceLine calculateAvailableQuantity(com.crm.dataobject.financialtransactions.CRMDOInvoiceLine invoiceLine) throws java.lang.Exception
invoiceLine
- - the invoice line to calculate the available vouchers quantity forjava.lang.Exception
public com.crm.dataobject.financialtransactions.CRMDOInvoice sellVouchers(com.crm.dataobject.financialtransactions.CRMDOInvoice invoice) throws java.lang.Exception
invoice
- - the invoice generated to bill the owner of the account for the vouchers salejava.lang.Exception
public void importVoucher(com.crm.dataobject.vouchers.CRMDOVoucher voucher, com.crm.dataobject.CRMDOAttachment attachment, com.crm.dataobject.vouchers.ImportVoucherDefinition importVoucherDefinition, com.crm.dataobject.processrun.CRMDOProcessRunLog processRun) throws java.lang.Exception
java.lang.Exception