|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compiere.framework.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.
| Field Summary |
|---|
| Fields inherited from class org.compiere.framework.PO |
|---|
ACCESSLEVEL_ALL, ACCESSLEVEL_CLIENT, ACCESSLEVEL_CLIENTORG, ACCESSLEVEL_ORG, ACCESSLEVEL_SYSTEM, ACCESSLEVEL_SYSTEMCLIENT, ENTITYTYPE_Dictionary, ENTITYTYPE_UserMaintained, I_ZERO, log, p_changeVO, p_info, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID |
| Constructor Summary | |
|---|---|
MInvoice(Ctx ctx,
int C_Invoice_ID,
String trxName)
Invoice Constructor |
|
MInvoice(Ctx ctx,
ResultSet rs,
String trxName)
Load Constructor |
|
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 |
|
| 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 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(Ctx 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(Ctx 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? |
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_BPartner_ID(String oldC_BPartner_ID,
String newC_BPartner_ID,
int WindowNo)
Invoice Header- BPartner |
void |
setC_DocTypeTarget_ID()
Set Target Document Type. |
void |
setC_DocTypeTarget_ID(int C_DocTypeTarget_ID,
boolean setReturnTrx)
Set Target Document Type |
void |
setC_DocTypeTarget_ID(String DocBaseType)
Set Target Document Type |
void |
setC_DocTypeTarget_ID(String oldC_DocTypeTarget_ID,
String newC_DocTypeTarget_ID,
int WindowNo)
Invoice Header - DocType |
void |
setC_PaymentTerm_ID(String oldC_PaymentTerm_ID,
String newC_PaymentTerm_ID,
int windowNo)
|
void |
setClientOrg(int AD_Client_ID,
int AD_Org_ID)
Overwrite Client/Org if required |
void |
setDateInvoiced(String oldDateInvoiced,
String newDateInvoiced,
int windowNo)
Set DateInvoiced - Callout |
static void |
setIsPaid(Ctx 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 |
setM_PriceList_ID(String oldM_PriceList_ID,
String newM_PriceList_ID,
int windowNo)
Set Price List - Callout |
void |
setOrder(MOrder order)
Set Order References |
void |
setPriceListVersion(int windowNo)
|
void |
setProcessed(boolean processed)
Set Processed. |
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, 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 |
| Constructor Detail |
|---|
public MInvoice(Ctx ctx,
int C_Invoice_ID,
String trxName)
ctx - contextC_Invoice_ID - invoice or 0 for newtrxName - trx name
public MInvoice(Ctx 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(Ctx 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 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(Ctx 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 MDocBaseType.DOCBASETYPE_public void setC_DocTypeTarget_ID()
public void setC_DocTypeTarget_ID(int C_DocTypeTarget_ID,
boolean setReturnTrx)
C_DocTypeTarget_ID - idsetReturnTrx - if true set ReturnTrx and SOTrxpublic 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 MInvoiceTax[] getTaxes(boolean requery)
requery - requery
public void addDescription(String description)
description - textpublic boolean isCreditMemo()
public void setProcessed(boolean processed)
setProcessed 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 class X_C_InvoiceM_PriceList_ID - price listpublic BigDecimal getAllocatedAmt()
public boolean testAllocation()
public static void setIsPaid(Ctx 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 DocAction
@UICallout
public void setM_PriceList_ID(String oldM_PriceList_ID,
String newM_PriceList_ID,
int windowNo)
throws Exception
oldM_PriceList_ID - old valuenewM_PriceList_ID - new valuewindowNo - window
Exception
@UICallout
public void setC_PaymentTerm_ID(String oldC_PaymentTerm_ID,
String newC_PaymentTerm_ID,
int windowNo)
throws Exception
oldC_PaymentTerm_ID - newC_PaymentTerm_ID - windowNo -
Exception
@UICallout
public void setC_DocTypeTarget_ID(String oldC_DocTypeTarget_ID,
String newC_DocTypeTarget_ID,
int WindowNo)
throws Exception
ctx - contextWindowNo - window nomTab - tabmField - fieldvalue - value
Exception
@UICallout
public void setC_BPartner_ID(String oldC_BPartner_ID,
String newC_BPartner_ID,
int WindowNo)
throws Exception
ctx - contextWindowNo - window nomTab - tabmField - fieldvalue - value
Exception
@UICallout
public void setDateInvoiced(String oldDateInvoiced,
String newDateInvoiced,
int windowNo)
throws Exception
oldDateInvoiced - oldnewDateInvoiced - newwindowNo - window no
Exceptionpublic void setPriceListVersion(int windowNo)
|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||