public class ARInformation extends ERPInterfaceAS400 implements IARInformation
ERPInterfaceAS400.Pcml, ERPInterfaceAS400.Received| Modifier and Type | Field and Description |
|---|---|
private static java.text.DecimalFormat |
FMT5
A number formatter of length 5.
|
protected ARSummary |
ivARSummary
A WIP AR summary object.
|
protected int |
ivDaysOfInvoices
The supplied value that limits the invoices retrieved to this many days
in the past.
|
protected java.lang.String |
ivErrorCode
A WIP error code.
|
protected java.lang.String |
ivFullPath
A WIP full path name to the invoice PDF file.
|
protected java.lang.String |
ivInvoiceNumber
The supplied value for invoice number.
|
protected char |
ivMode
The current mode being processed.
|
protected int |
ivMonthsOfAging
The supplied value that limits the aging retrieved to this many months
in the past.
|
protected boolean |
ivOpenInvoices
The supplied flag that designates whether open invoices are retrieved
true or all invoices are retrieved false. |
protected java.io.OutputStream |
ivOutputStream
The supplied value for output stream.
|
private static char |
MODE_GET_ARSUM
Constants for interface mode.
|
private static char |
MODE_INVOICE_PDF |
private static char |
MODE_WRITE_PDF_DATA |
private static long |
serialVersionUID
The class' serialization version id.
|
AS400TEXT3, ivAS400, ivConfigivHashCode, ivHashFlds, ivObjAttrsERROR_CONNECT, ERROR_NONE, ERROR_PROGRAM, WARN_DUPLICATE, WARN_NONE| Constructor and Description |
|---|
ARInformation()
Constructs a new ERP accounts receivable information interface.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
callCreateInvoicePDF()
Calls the ERP program for creating an invoice as a PDF file.
|
protected boolean |
callGetARSummary()
Calls the ERP program for retrieving A/R summary information.
|
protected boolean |
callProgram()
Calls the ERP program for execution.
|
boolean |
createInvoicePDF(java.lang.String invoiceNumber)
Creates an existing invoice as a PDF file.
|
protected boolean |
executeTransferPdfData()
Transfers PDF file data from the IFS on the backend system to the supplied
output stream.
|
ARSummary |
getAR(boolean openInvoices,
int daysOfInvoices,
int monthsOfAging)
Returns accounts receivable information for the current shopping user.
|
java.lang.String |
getErrorCode()
Returns the retrieved error code.
|
java.util.ArrayList<PaymentDetail> |
getInvoicePayments(java.lang.String paidbyCustId,
java.lang.String invoiceNumber)
Returns a collection of payment details for an invoice.
|
protected ARAging |
parseARAging(ERPInterfaceAS400.Received rec)
Parses AR aging data from the receive data queue and returns an AR aging
object.
|
protected ARDetail |
parseARDetail(ERPInterfaceAS400.Received rec)
Parses AR detail data from the receive data queue and returns an AR detail
object.
|
protected ARSummary |
parseARSummary(ERPInterfaceAS400.Received rec)
Parses AR summary data from the receive data queue and returns an AR
summary object.
|
protected boolean |
parseQueueEntry(java.lang.String fmtid,
byte[] qbytes)
Parses a data queue entry that was received on the inbound receiving
data queue.
|
protected void |
readDataQueue()
Reads information placed on the inbound receiving data queue by the
called ERP program.
|
protected void |
resetVariables()
Resets the class' instance variables for the start of a new request.
|
protected void |
sendDataQueue()
Places information on the outbound sending data queue.
|
boolean |
writeInvoicePDFData(java.io.OutputStream out)
Writes the invoice PDF data to the supplied output stream.
|
equals, getContext, getEncryptAESLength, getErrorType, getMixedCase, getQueueKey, getRecordFormat, getRecordFormatFieldDecimals, getRecvQueue, getSendQueue, getStoreCompany, getStoreWarehouse, getWarningType, isEncryptAES, isYes, process, setContext, setErrorType, setQueueKey, setWarningTypecloneMapAttributes, formatValue, formatValue, getHashFields, getMapArrayList, getMapAttributes, getMapBigDecimal, getMapBoolean, getMapDate, getMapDouble, getMapInteger, getMapLong, getMapMapped, getMapObject, getMapShort, getMapString, getMapString, getMapStringBuffer, getMapStringBuilder, getMapTime, getMapTimestamp, getMapVector, hashCode, setHashFields, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMap, setMapAttributes, setMapObject, setMapTime, setMapTimestamp, toStringArrayclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetContext, getErrorType, getWarningType, setContext, setErrorType, setWarningTypeprivate static final long serialVersionUID
private static final char MODE_GET_ARSUM
private static final char MODE_INVOICE_PDF
private static final char MODE_WRITE_PDF_DATA
private static final java.text.DecimalFormat FMT5
protected boolean ivOpenInvoices
true or all invoices are retrieved false.protected int ivDaysOfInvoices
protected int ivMonthsOfAging
protected java.lang.String ivInvoiceNumber
protected java.io.OutputStream ivOutputStream
protected ARSummary ivARSummary
protected java.lang.String ivErrorCode
protected java.lang.String ivFullPath
protected char ivMode
public ARInformation()
public ARSummary getAR(boolean openInvoices, int daysOfInvoices, int monthsOfAging)
getAR in IARInformation.getAR in interface IARInformationopenInvoices - (boolean) A flag that designates whether open
invoices are retrieved true or all invoices are retrieved
false.daysOfInvoices - (int) Limits the invoices retrieved to this many
days in the past.monthsOfAging - (int) Limits the aging retrieved to this many
months in the past.public java.util.ArrayList<PaymentDetail> getInvoicePayments(java.lang.String paidbyCustId, java.lang.String invoiceNumber)
getInvoicePayments in interface IARInformationpaidbyCustId - (String) The paid-by customer for the desired
payment details.invoiceNumber - (String) The invoice number for the desired
payment details.public boolean createInvoicePDF(java.lang.String invoiceNumber)
createInvoicePDF in interface IARInformationinvoiceNumber - (String) Invoice number.true if creating the invoice was successful,
otherwise false.public boolean writeInvoicePDFData(java.io.OutputStream out)
createInvoicePDF() must be made before executing this method.writeInvoicePDFData in interface IARInformationout - (OutputStream) The target output stream.true if operation was successful,
otherwise false.public java.lang.String getErrorCode()
getErrorCode in interface IARInformationprotected boolean callProgram()
throws java.lang.Exception
process after
any data to be placed on the send queue has been successfully placed and
sent.
Implements callProgram in ERPInterfaceAS400.callProgram in class ERPInterfaceAS400true if the call was successful, otherwise
false.java.lang.Exception - - if an error occurs with the running of
the ERP program.protected boolean callGetARSummary()
throws java.lang.Exception
true if the call was successful, otherwise
false.java.lang.Exception - - if an error occurs with the running of
the ERP program.protected boolean callCreateInvoicePDF()
throws java.lang.Exception
true if the call was successful, otherwise
false.java.lang.Exception - - if an error occurs with the running of
the ERP program.protected boolean executeTransferPdfData()
throws java.lang.Exception
true if the transfer was successful, otherwise
false.java.lang.Exception - - if an error occurs with the running of
the ERP program.protected boolean parseQueueEntry(java.lang.String fmtid,
byte[] qbytes)
throws java.lang.Exception
readDataQueue for each queue entry that
is read for the current queue key.
Implements parseQueueEntry in ERPInterfaceAS400.parseQueueEntry in class ERPInterfaceAS400fmtid - (String) The record format id of the queue entry.qbytes - (byte[]) The data queue entry's raw data.true to read the next entry from the receive
data queue or false to stop reading.java.lang.Exception - - if an error occurs with reading data on
the queue.protected void sendDataQueue()
throws java.lang.Exception
process as the first step after a connection to the ERP system
has been successfully established.
Implements sendDataQueue in ERPInterfaceAS400.sendDataQueue in class ERPInterfaceAS400java.lang.Exception - - if an error occurs with placing data on
the queue and sending the queue.protected void readDataQueue()
throws java.lang.Exception
process after a successful
call to the ERP program. Iterates through the received queue entries for
the current queue key, determines each queue entry's record format id,
and then invokes the parseQueueEntry method.
Overrides readDataQueue in ERPInterfaceAS400.readDataQueue in class ERPInterfaceAS400java.lang.Exception - - if an error occurs with reading data on
the queue.protected ARSummary parseARSummary(ERPInterfaceAS400.Received rec) throws java.lang.Exception
rec - (Received) The receive data queue data.java.lang.Exception - - if an error occurs during the parsing of
the queue's data.protected ARAging parseARAging(ERPInterfaceAS400.Received rec) throws java.lang.Exception
rec - (Received) The receive data queue data.java.lang.Exception - - if an error occurs during the parsing of
the queue's data.protected ARDetail parseARDetail(ERPInterfaceAS400.Received rec) throws java.lang.Exception
rec - (Received) The receive data queue data.java.lang.Exception - - if an error occurs during the parsing of
the queue's data.protected void resetVariables()