請求書 : Public クラス
作成日: 2013/09/07 7:57:30
更新日: 2014/01/12 17:53:50
プロジェクト:
追加情報:
Invoice Model. Please do not set DocStatus and C_DocType_ID directly. They are set in the process() method. Use DocAction and C_DocTypeTarget_ID instead. <br /></p><p>@see http://sourceforge.net/tracker/?func=detail&atid=879335&aid=1948157&group_id=176962<br /></p><p><li> FR [ 2520591 ] Support multiples calendar for Org<br />@see http://sourceforge.net/tracker2/?func=detail&atid=879335&aid=2520591&group_id=176962 Modifications: Added RMA functionality (Ashley Ramdass) Modifications: Generate DocNo^ instead of using a new number whan an invoice is reversed (Diego Ruiz-globalqss)<br /></p>
属性
Private static const long
  serialVersionUID
D詳細:
 
Private static CCache<Integer,MInvoice>
  s_cache
D詳細:
ノート: 2 minutes
Private BigDecimal
  m_openAmt
D詳細:
ノート: Open Amount
Private MInvoiceLine
  m_lines
D詳細:
ノート: Invoice Lines
Private MInvoiceTax
  m_taxes
D詳細:
ノート: Invoice Taxes
Private static CLogger
  s_log
D詳細:
ノート: Logger
Private boolean
  m_reversal
D詳細:
ノート: Reversal Flag
Private String
  m_processMsg
D詳細:
ノート: Process Message
Private boolean
  m_justPrepared
D詳細:
ノート: Just Prepared Flag
Package ArrayList<PO>
  docsPostProcess
D詳細:
ノート: Save array of documents to process AFTER completing this one
操作
Public static
getOfBPartner( ctx: Properties,
C_BPartner_ID: int,
trxName: String,
):MInvoice
詳細:
Sequential
ノート: Get Payments Of BPartner<br /></p><p>@return array<br /></p>
Public static
copyFrom( from: MInvoice,
dateDoc: Timestamp,
dateAcct: Timestamp,
C_DocTypeTarget_ID: int,
isSOTrx: boolean,
counter: boolean,
trxName: String,
setOrder: boolean,
):MInvoice
詳細:
Sequential
ノート: Create new Invoice by copying<br /></p><p>@param acctDate original account date<br /></p><p>@return Invoice<br /></p>
Public static
copyFrom( from: MInvoice,
dateDoc: Timestamp,
dateAcct: Timestamp,
C_DocTypeTarget_ID: int,
isSOTrx: boolean,
counter: boolean,
trxName: String,
setOrder: boolean,
documentNo: String,
):MInvoice
詳細:
Sequential
ノート: Create new Invoice by copying<br /></p><p>@param acctDate original account date<br /></p><p>@param Document Number for reversed invoices<br /></p><p>@return Invoice<br /></p>
Public static
copyFrom( from: MInvoice,
dateDoc: Timestamp,
C_DocTypeTarget_ID: int,
isSOTrx: boolean,
counter: boolean,
trxName: String,
setOrder: boolean,
):MInvoice
詳細:
Sequential
ノート: @deprecated Create new Invoice by copying<br /></p><p>@return Invoice<br /></p>
Public static
getPDFFileName( documentDir: String,
C_Invoice_ID: int,
):String
詳細:
Sequential
ノート: Get PDF File Name<br /></p><p>@return file name<br /></p>
Public static
get( ctx: Properties,
C_Invoice_ID: int,
):MInvoice
詳細:
Sequential
ノート: Get MInvoice from Cache<br /></p><p>@return MInvoice<br /></p>
Public
MInvoice( ctx: Properties,
C_Invoice_ID: int,
trxName: String,
):
詳細:
Sequential
ノート: Invoice Constructor
Public
MInvoice( ctx: Properties,
rs: ResultSet,
trxName: String,
):
詳細:
Sequential
ノート: Load Constructor
Public
MInvoice( order: MOrder,
C_DocTypeTarget_ID: int,
invoiceDate: Timestamp,
):
詳細:
Sequential
ノート: Create Invoice from Order
Public
MInvoice( ship: MInOut,
invoiceDate: Timestamp,
):
詳細:
Sequential
ノート: Create Invoice from Shipment
Public
MInvoice( batch: MInvoiceBatch,
line: MInvoiceBatchLine,
):
詳細:
Sequential
ノート: Create Invoice from Batch Line
Public
setClientOrg( AD_Client_ID: int,
AD_Org_ID: int,
):void
詳細:
Sequential
ノート: Overwrite Client/Org if required
Public
setBPartner( bp: MBPartner,
):void
詳細:
Sequential
ノート: Set Business Partner Defaults & Details
Public
setOrder( order: MOrder,
):void
詳細:
Sequential
ノート: Set Order References
Public
setShipment( ship: MInOut,
):void
詳細:
Sequential
ノート: Set Shipment References
Public
setC_DocTypeTarget_ID( DocBaseType: String,
):void
詳細:
Sequential
ノート: Set Target Document Type
Public
setC_DocTypeTarget_ID():void
詳細:
Sequential
ノート: Set Target Document Type. Based on SO flag AP/AP Invoice
Public
getGrandTotal( creditMemoAdjusted: boolean,
):BigDecimal
詳細:
Sequential
ノート: Get Grand Total<br /></p><p>@return grand total<br /></p>
Private
getLines( whereClause: String,
):MInvoiceLine
詳細:
Sequential
ノート: Get Invoice Lines of Invoice<br /></p><p>@return lines<br /></p>
Public
getLines( requery: boolean,
):MInvoiceLine
詳細:
Sequential
ノート: Get Invoice Lines<br /></p><p>@return lines<br /></p>
Public
getLines():MInvoiceLine
詳細:
Sequential
ノート: Get Lines of Invoice<br /></p><p>@return lines<br /></p>
Public
renumberLines( step: int,
):void
詳細:
Sequential
ノート: Renumber Lines
Public
copyLinesFrom( otherInvoice: MInvoice,
counter: boolean,
setOrder: boolean,
):int
詳細:
Sequential
ノート: Copy Lines From other Invoice.<br /></p><p>@return number of lines copied<br /></p>
Private
setReversal( reversal: boolean,
):void
詳細:
Sequential
ノート: Set Reversal
Public
isReversal():boolean
詳細:
Sequential
ノート: Is Reversal<br /></p><p>@return reversal<br /></p>
Public
getTaxes( requery: boolean,
):MInvoiceTax
詳細:
Sequential
ノート: Get Taxes<br /></p><p>@return array of taxes<br /></p>
Public
addDescription( description: String,
):void
詳細:
Sequential
ノート: Add to Description
Public
isCreditMemo():boolean
詳細:
Sequential
ノート: Is it a Credit Memo?<br /></p><p>@return true if CM<br /></p>
Public
setProcessed( processed: boolean,
):void
詳細:
Sequential
ノート: Set Processed. Propergate to Lines/Taxes
Public
validatePaySchedule():boolean
詳細:
Sequential
ノート: Validate Invoice Pay Schedule<br /></p><p>@return pay schedule is valid<br /></p>
Protected
beforeSave( newRecord: boolean,
):boolean
詳細:
Sequential
ノート: Before Save<br /></p><p>@return true<br /></p>
Protected
beforeDelete():boolean
詳細:
Sequential
ノート: Before Delete<br /></p><p>@return true if it can be deleted<br /></p>
Protected
afterDelete( success: boolean,
):boolean
詳細:
Sequential
ノート: After Delete<br /></p><p>@return deleted<br /></p>
Public
toString():String
詳細:
Sequential
ノート: String Representation<br /></p><p>@return info<br /></p>
Public
getDocumentInfo():String
詳細:
Sequential
ノート: Get Document Info<br /></p><p>@return document info (untranslated)<br /></p>
Protected
afterSave( newRecord: boolean,
success: boolean,
):boolean
詳細:
Sequential
ノート: After Save<br /></p><p>@return success<br /></p>
Public
setM_PriceList_ID( M_PriceList_ID: int,
):void
詳細:
Sequential
タグ: annotations=@Override
ノート: Set Price List (and Currency) when valid
Public
getAllocatedAmt():BigDecimal
詳細:
Sequential
ノート: Get Allocated Amt in Invoice Currency<br /></p><p>@return pos/neg amount or null<br /></p>
Public
testAllocation( beingCompleted: boolean,
):boolean
詳細:
Sequential
ノート: Test Allocation (and set paid flag)<br /></p><p>@return true if updated<br /></p>
Public
testAllocation():boolean
詳細:
Sequential
ノート: testAllocation
Public static
setIsPaid( ctx: Properties,
C_BPartner_ID: int,
trxName: String,
):void
詳細:
Sequential
ノート: Set Paid Flag for invoices
Public
getOpenAmt():BigDecimal
詳細:
Sequential
ノート: Get Open Amount. Used by web interface<br /></p><p>@return Open Amt<br /></p>
Public
getOpenAmt( creditMemoAdjusted: boolean,
paymentDate: Timestamp,
):BigDecimal
詳細:
Sequential
ノート: Get Open Amount<br /></p><p>@return Open Amt<br /></p>
Public
getDocStatusName():String
詳細:
Sequential
ノート: Get Document Status<br /></p><p>@return Document Status Clear Text<br /></p>
Public
createPDF():File
詳細:
Sequential
ノート: Create PDF<br /></p><p>@return File or null<br /></p>
Public
createPDF( file: File,
):File
詳細:
Sequential
ノート: Create PDF file<br /></p><p>@return file if success<br /></p>
Public
getPDFFileName( documentDir: String,
):String
詳細:
Sequential
ノート: Get PDF File Name<br /></p><p>@return file name<br /></p>
Public
getCurrencyISO():String
詳細:
Sequential
ノート: Get ISO Code of Currency<br /></p><p>@return Currency ISO<br /></p>
Public
getPrecision():int
詳細:
Sequential
ノート: Get Currency Precision<br /></p><p>@return precision<br /></p>
Public
processIt( processAction: String,
):boolean
詳細:
Sequential
ノート: Process document<br /></p><p>@return true if performed<br /></p>
Public
unlockIt():boolean
詳細:
Sequential
ノート: Unlock Document.<br /></p><p>@return true if success<br /></p>
Public
invalidateIt():boolean
詳細:
Sequential
ノート: Invalidate Document<br /></p><p>@return true if success<br /></p>
Public
prepareIt():String
詳細:
Sequential
ノート: Prepare Document<br /></p><p>@return new status (In Progress or Invalid)<br /></p>
Private
explodeBOM():void
詳細:
Sequential
ノート: Explode non stocked BOM.
Public
calculateTaxTotal():boolean
詳細:
Sequential
ノート: Calculate Tax and Total<br /></p><p>@return true if calculated<br /></p>
Private
createPaySchedule():boolean
詳細:
Sequential
ノート: (Re) Create Pay Schedule<br /></p><p>@return true if valid schedule<br /></p>
Public
approveIt():boolean
詳細:
Sequential
ノート: Approve Document<br /></p><p>@return true if success<br /></p>
Public
rejectIt():boolean
詳細:
Sequential
ノート: Reject Approval<br /></p><p>@return true if success<br /></p>
Public
completeIt():String
詳細:
Sequential
ノート: Complete Document<br /></p><p>@return new status (Complete, In Progress, Invalid, Waiting ..)<br /></p>
Private
addDocsPostProcess( doc: PO,
):void
詳細:
Sequential
Public
getDocsPostProcess():ArrayList<PO>
詳細:
Sequential
Private
setDefiniteDocumentNo():void
詳細:
Sequential
ノート: Set the definite document number after completed
Private
createCounterDoc():MInvoice
詳細:
Sequential
ノート: Create Counter Document<br /></p><p>@return counter invoice<br /></p>
Public
voidIt():boolean
詳細:
Sequential
ノート: Void Document.<br /></p><p>@return true if success<br /></p>
Public
closeIt():boolean
詳細:
Sequential
ノート: Close Document.<br /></p><p>@return true if success<br /></p>
Public
reverseCorrectIt():boolean
詳細:
Sequential
ノート: Reverse Correction - same date<br /></p><p>@return true if success<br /></p>
Private
reverse( accrual: boolean,
):MInvoice
詳細:
Sequential
ノート: reverseCorrectIt
Public
reverseAccrualIt():boolean
詳細:
Sequential
ノート: Reverse Accrual - none<br /></p><p>@return false<br /></p>
Public
reActivateIt():boolean
詳細:
Sequential
ノート: Re-activate<br /></p><p>@return false<br /></p>
Public
getSummary():String
詳細:
Sequential
ノート: Get Summary<br /></p><p>@return Summary of Document<br /></p>
Public
getProcessMsg():String
詳細:
Sequential
ノート: Get Process Message<br /></p><p>@return clear text error message<br /></p>
Public
getDoc_User_ID():int
詳細:
Sequential
ノート: Get Document Owner (Responsible)<br /></p><p>@return AD_User_ID<br /></p>
Public
getApprovalAmt():BigDecimal
詳細:
Sequential
ノート: Get Document Approval Amount<br /></p><p>@return amount<br /></p>
Public
setRMA( rma: MRMA,
):void
詳細:
Sequential
Public
isComplete():boolean
詳細:
Sequential
ノート: Document Status is Complete or Closed<br /></p><p>@return true if CO, CL or RE<br /></p>
要素 ソースの役割 ターゲットの役割
CCache
クラス  
名前:  
 
名前: s_cache
 
詳細:
 
MInvoiceLine
クラス  
名前:  
 
名前: m_lines
 
詳細:
 
MInvoiceTax
クラス  
名前:  
 
名前: m_taxes
 
詳細:
 
CLogger
クラス  
名前:  
 
名前: s_log
 
詳細:
 
要素 ソースの役割 ターゲットの役割
CreateFromShipment
クラス  
名前:  
 
名前: m_invoice
 
詳細:
 
MAllocationLine
クラス  
名前:  
 
名前: m_invoice
 
詳細:
 
MCashLine
クラス  
名前:  
 
名前: m_invoice
 
詳細:
 
MDunningRunLine
クラス  
名前:  
 
名前: m_invoice
 
詳細:
 
MInvoiceLine
クラス  
名前:  
 
名前: m_parent
 
詳細:
 
MInOutConfirm
クラス  
名前:  
 
名前: m_creditMemo
 
詳細:
 
MInvoicePaySchedule
クラス  
名前:  
 
名前: m_parent
 
詳細:
 
MPaymentAllocate
クラス  
名前:  
 
名前: m_invoice
 
詳細:
 
MPaySelectionLine
クラス  
名前:  
 
名前: m_invoice
 
詳細:
 
AllocationAuto
クラス  
名前:  
 
名前: m_invoices
 
詳細:
 
InvoiceBatchProcess
クラス  
名前:  
 
名前: m_invoice
 
詳細:
 
InvoiceGenerate
クラス  
名前:  
 
名前: m_invoice
 
詳細:
 
RequestInvoice
クラス  
名前:  
 
名前: m_invoice
 
詳細:
 
MAllocationLine
クラス  
名前:  
 
名前: m_invoice
 
詳細:
 
要素 種類 接続 方向 ノート
InvoiceGenerateRMA Class 依存 From  
Doc_Invoice Class 依存 From  
Doc_AllocationHdr Class 依存 From  
MInvoiceBatch Class 依存 To  
MInOut Class 依存 From  
X_C_Invoice Class 汎化 To  
DocAction Interface 実現 To  
MRMA Class 依存 To  
PO Class 依存 To  
MInOut Class 依存 To  
MOrder Class 依存 To  
MBPartner Class 依存 To  
MInvoiceBatchLine Class 依存 To  
MOrder Class 依存 From  
MPaymentTerm Class 依存 From  
MProject Class 依存 From  
MRMA Class 依存 From  
MTaxDeclarationLine Class 依存 From  
ExpenseAPInvoice Class 依存 From  
InvoiceCreateInOut Class 依存 From  
TaxDeclarationCreate Class 依存 From  
WebInfo Class 依存 From  
InvoiceCalculateTax Class 依存 From  
ModelValidator Class 依存 From