|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compiere.model.PO
org.compiere.model.X_C_Invoice
org.compiere.model.MInvoice
public class MInvoice
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.
Modifications: Added RMA functionality (Ashley Ramdass),
Serialized Form| Field Summary |
|---|
| Fields inherited from class org.compiere.model.PO |
|---|
ACCESSLEVEL_ALL, ACCESSLEVEL_CLIENT, ACCESSLEVEL_CLIENTORG, ACCESSLEVEL_ORG, ACCESSLEVEL_SYSTEM, ACCESSLEVEL_SYSTEMCLIENT, ENTITYTYPE_Dictionary, ENTITYTYPE_UserMaintained, I_ZERO, log, p_ctx, p_info, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID |
| Constructor Summary | |
|---|---|
MInvoice(MInOut ship,
Timestamp invoiceDate)
Create Invoice from Shipment |
|
MInvoice(MInvoiceBatch batch,
MInvoiceBatchLine line)
Create Invoice from Batch Line |
|
MInvoice(MOrder order,
int C_DocTypeTarget_ID,
Timestamp invoiceDate)
Create Invoice from Order |
|
MInvoice(Properties ctx,
int C_Invoice_ID,
String trxName)
Invoice Constructor |
|
MInvoice(Properties ctx,
ResultSet rs,
String trxName)
Load Constructor |
|
| Method Summary | |
|---|---|
void |
addDescription(String description)
Add to Description |
protected boolean |
afterSave(boolean newRecord,
boolean success)
After Save |
boolean |
approveIt()
Approve Document |
protected boolean |
beforeDelete()
Before Delete |
protected boolean |
beforeSave(boolean newRecord)
Before Save |
boolean |
closeIt()
Close Document. |
String |
completeIt()
Complete Document |
static MInvoice |
copyFrom(MInvoice from,
Timestamp dateDoc,
int C_DocTypeTarget_ID,
boolean isSOTrx,
boolean counter,
String trxName,
boolean setOrder)
Create new Invoice by copying |
int |
copyLinesFrom(MInvoice otherInvoice,
boolean counter,
boolean setOrder)
Copy Lines From other Invoice. |
File |
createPDF()
Create PDF |
File |
createPDF(File file)
Create PDF file |
static MInvoice |
get(Properties ctx,
int C_Invoice_ID)
Get MInvoice from Cache |
BigDecimal |
getAllocatedAmt()
Get Allocated Amt in Invoice Currency |
BigDecimal |
getApprovalAmt()
Get Document Approval Amount |
String |
getCurrencyISO()
Get ISO Code of Currency |
int |
getDoc_User_ID()
Get Document Owner (Responsible) |
String |
getDocStatusName()
Get Document Status |
String |
getDocumentInfo()
Get Document Info |
BigDecimal |
getGrandTotal(boolean creditMemoAdjusted)
Get Grand Total |
MInvoiceLine[] |
getLines()
Get Lines of Invoice |
MInvoiceLine[] |
getLines(boolean requery)
Get Invoice Lines |
static MInvoice[] |
getOfBPartner(Properties ctx,
int C_BPartner_ID,
String trxName)
Get Payments Of BPartner |
BigDecimal |
getOpenAmt()
Get Open Amount. |
BigDecimal |
getOpenAmt(boolean creditMemoAdjusted,
Timestamp paymentDate)
Get Open Amount |
String |
getPDFFileName(String documentDir)
Get PDF File Name |
static String |
getPDFFileName(String documentDir,
int C_Invoice_ID)
Get PDF File Name |
int |
getPrecision()
Get Currency Precision |
String |
getProcessMsg()
Get Process Message |
String |
getSummary()
Get Summary |
MInvoiceTax[] |
getTaxes(boolean requery)
Get Taxes |
boolean |
invalidateIt()
Invalidate Document |
boolean |
isCreditMemo()
Is it a Credit Memo? |
boolean |
isReversal()
Is Reversal |
String |
prepareIt()
Prepare Document |
boolean |
processIt(String processAction)
Process document |
boolean |
reActivateIt()
Re-activate |
boolean |
rejectIt()
Reject Approval |
void |
renumberLines(int step)
Renumber Lines |
boolean |
reverseAccrualIt()
Reverse Accrual - none |
boolean |
reverseCorrectIt()
Reverse Correction - same date |
void |
setBPartner(MBPartner bp)
Set Business Partner Defaults & Details |
void |
setC_DocTypeTarget_ID()
Set Target Document Type. |
void |
setC_DocTypeTarget_ID(String DocBaseType)
Set Target Document Type |
void |
setClientOrg(int AD_Client_ID,
int AD_Org_ID)
Overwrite Client/Org if required |
static void |
setIsPaid(Properties ctx,
int C_BPartner_ID,
String trxName)
Set Paid Flag for invoices |
void |
setM_PriceList_ID(int M_PriceList_ID)
Set Price List (and Currency) when valid |
void |
setOrder(MOrder order)
Set Order References |
void |
setProcessed(boolean processed)
Set Processed. |
void |
setRMA(MRMA rma)
|
void |
setShipment(MInOut ship)
Set Shipment References |
boolean |
testAllocation()
Test Allocation (and set paid flag) |
String |
toString()
String Representation |
boolean |
unlockIt()
Unlock Document. |
boolean |
validatePaySchedule()
Validate Invoice Pay Schedule |
boolean |
voidIt()
Void Document. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.compiere.process.DocAction |
|---|
get_ID, get_Logger, get_Table_ID, get_TrxName, getAD_Client_ID, getAD_Org_ID, getC_Currency_ID, getCtx, getDocAction, getDocStatus, getDocumentNo, save, setDocStatus |
| Methods inherited from interface org.compiere.model.I_Persistent |
|---|
save |
| Constructor Detail |
|---|
public MInvoice(Properties ctx,
int C_Invoice_ID,
String trxName)
ctx - contextC_Invoice_ID - invoice or 0 for newtrxName - trx name
public MInvoice(Properties ctx,
ResultSet rs,
String trxName)
ctx - contextrs - result set recordtrxName - transaction
public MInvoice(MOrder order,
int C_DocTypeTarget_ID,
Timestamp invoiceDate)
order - orderC_DocTypeTarget_ID - target document typeinvoiceDate - date or null
public MInvoice(MInOut ship,
Timestamp invoiceDate)
ship - shipmentinvoiceDate - date or null
public MInvoice(MInvoiceBatch batch,
MInvoiceBatchLine line)
batch - batchline - batch line| Method Detail |
|---|
public static MInvoice[] getOfBPartner(Properties ctx,
int C_BPartner_ID,
String trxName)
ctx - contextC_BPartner_ID - idtrxName - transaction
public static MInvoice copyFrom(MInvoice from,
Timestamp dateDoc,
int C_DocTypeTarget_ID,
boolean isSOTrx,
boolean counter,
String trxName,
boolean setOrder)
from - invoicedateDoc - date of the document dateC_DocTypeTarget_ID - target doc typeisSOTrx - sales ordercounter - create counter linkstrxName - trxsetOrder - set Order links
public static String getPDFFileName(String documentDir,
int C_Invoice_ID)
documentDir - directoryC_Invoice_ID - invoice
public static MInvoice get(Properties ctx,
int C_Invoice_ID)
ctx - contextC_Invoice_ID - id
public void setClientOrg(int AD_Client_ID,
int AD_Org_ID)
setClientOrg in class POAD_Client_ID - clientAD_Org_ID - orgpublic void setBPartner(MBPartner bp)
bp - business partnerpublic void setOrder(MOrder order)
order - orderpublic void setShipment(MInOut ship)
ship - shipmentpublic void setC_DocTypeTarget_ID(String DocBaseType)
DocBaseType - doc type MDocType.DOCBASETYPE_public void setC_DocTypeTarget_ID()
public BigDecimal getGrandTotal(boolean creditMemoAdjusted)
creditMemoAdjusted - adjusted for CM (negative)
public MInvoiceLine[] getLines(boolean requery)
requery -
public MInvoiceLine[] getLines()
public void renumberLines(int step)
step - start and step
public int copyLinesFrom(MInvoice otherInvoice,
boolean counter,
boolean setOrder)
otherInvoice - invoicecounter - create counter linkssetOrder - set order links
public boolean isReversal()
public MInvoiceTax[] getTaxes(boolean requery)
requery - requery
public void addDescription(String description)
description - textpublic boolean isCreditMemo()
public void setProcessed(boolean processed)
setProcessed in interface I_C_InvoicesetProcessed in class X_C_Invoiceprocessed - processedpublic boolean validatePaySchedule()
protected boolean beforeSave(boolean newRecord)
beforeSave in class POnewRecord - new
protected boolean beforeDelete()
beforeDelete in class POpublic String toString()
toString in class X_C_Invoicepublic String getDocumentInfo()
getDocumentInfo in interface DocAction
protected boolean afterSave(boolean newRecord,
boolean success)
afterSave in class POnewRecord - newsuccess - success
public void setM_PriceList_ID(int M_PriceList_ID)
setM_PriceList_ID in interface I_C_InvoicesetM_PriceList_ID in class X_C_InvoiceM_PriceList_ID - price listpublic BigDecimal getAllocatedAmt()
public boolean testAllocation()
public static void setIsPaid(Properties ctx,
int C_BPartner_ID,
String trxName)
ctx - contextC_BPartner_ID - if 0 alltrxName - transactionpublic BigDecimal getOpenAmt()
public BigDecimal getOpenAmt(boolean creditMemoAdjusted,
Timestamp paymentDate)
creditMemoAdjusted - adjusted for CM (negative)paymentDate - ignored Payment Date
public String getDocStatusName()
public File createPDF()
createPDF in interface DocActionpublic File createPDF(File file)
file - output file
public String getPDFFileName(String documentDir)
documentDir - directory
public String getCurrencyISO()
public int getPrecision()
public boolean processIt(String processAction)
processIt in interface DocActionprocessAction - document action
public boolean unlockIt()
unlockIt in interface DocActionpublic boolean invalidateIt()
invalidateIt in interface DocActionpublic String prepareIt()
prepareIt in interface DocActionpublic boolean approveIt()
approveIt in interface DocActionpublic boolean rejectIt()
rejectIt in interface DocActionpublic String completeIt()
completeIt in interface DocActionpublic boolean voidIt()
voidIt in interface DocActionpublic boolean closeIt()
closeIt in interface DocActionpublic boolean reverseCorrectIt()
reverseCorrectIt in interface DocActionpublic boolean reverseAccrualIt()
reverseAccrualIt in interface DocActionpublic boolean reActivateIt()
reActivateIt in interface DocActionpublic String getSummary()
getSummary in interface DocActionpublic String getProcessMsg()
getProcessMsg in interface DocActionpublic int getDoc_User_ID()
getDoc_User_ID in interface DocActionpublic BigDecimal getApprovalAmt()
getApprovalAmt in interface DocActionpublic void setRMA(MRMA rma)
rma -
|
Adempiere 3.5.2a | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||