|
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_Order
org.compiere.model.MOrder
public class MOrder
Order 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 | |
|---|---|
static String |
DocSubTypeSO_OnCredit
Sales Order Sub Type - WI |
static String |
DocSubTypeSO_POS
Sales Order Sub Type - WR |
static String |
DocSubTypeSO_Prepay
Sales Order Sub Type - PR |
static String |
DocSubTypeSO_Proposal
Sales Order Sub Type - ON |
static String |
DocSubTypeSO_Quotation
Sales Order Sub Type - OB |
static String |
DocSubTypeSO_RMA
Sales Order Sub Type - RM |
static String |
DocSubTypeSO_Standard
Sales Order Sub Type - SO |
static String |
DocSubTypeSO_Warehouse
Sales Order Sub Type - WP |
| 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 | |
|---|---|
MOrder(Ctx ctx,
int C_Order_ID,
String trxName)
Default Constructor |
|
MOrder(Ctx ctx,
ResultSet rs,
String trxName)
Load Constructor |
|
MOrder(MProject project,
boolean IsSOTrx,
String DocSubTypeSO)
Project 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 MOrder |
copyFrom(MOrder from,
Timestamp dateDoc,
int C_DocTypeTarget_ID,
boolean counter,
boolean copyASI,
String trxName)
Create new Order by copying |
int |
copyLinesFrom(MOrder otherOrder,
boolean counter,
boolean copyASI)
Copy Lines From other Order |
File |
createPDF()
Create PDF |
File |
createPDF(File file)
Create PDF file |
MInOut |
generateShipment(MDocType dt,
Timestamp movementDate)
Generate Shipment |
BigDecimal |
getApprovalAmt()
Get Document Approval Amount |
int |
getC_Invoice_ID()
Get latest Invoice of Order |
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 |
MInvoice[] |
getInvoices(boolean hearderLinkOnly)
Get Invoices of Order |
MOrderLine[] |
getLines()
Get Lines of Order. |
MOrderLine[] |
getLines(boolean requery,
String orderBy)
Get Lines of Order |
MOrderLine[] |
getLines(int M_Product_ID,
String whereClause,
String orderClause)
Get Lines of Order for a given product |
MOrderLine[] |
getLines(String whereClause,
String orderClause)
Get Lines of Order |
MInOut |
getOpenShipment(int M_Warehouse_ID,
int C_BPartner_ID,
int C_BPartner_Location_ID)
Get Latest Shipment for the Order |
int |
getPrecision()
Get Currency Precision |
String |
getProcessMsg()
Get Process Message |
MOrder[] |
getRMAs()
Get RMAs of Order |
MInOutLine[] |
getShipmentLines()
Get Shipment Lines of Order |
MInOut[] |
getShipments(boolean hearderLinkOnly)
Get Shipments of Order |
String |
getSummary()
Get Summary |
MOrderTax[] |
getTaxes(boolean requery)
Get Taxes of Order |
boolean |
invalidateIt()
Invalidate Document |
boolean |
isOrderLine(int C_OrderLine_ID)
Does the Order Line belong to this Order |
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 void |
void |
setAD_User_ID(int AD_User_ID)
Set Business Partner Contact (Ship+Bill) |
void |
setBill_BPartner_ID(String oldBill_BPartner_ID,
String newBill_BPartner_ID,
int windowNo)
Set Bill Business Partner - Callout |
void |
setBPartner(MBPartner bp)
Set Business Partner Defaults & Details. |
void |
setC_BPartner_ID(int C_BPartner_ID)
Set Business Partner (Ship+Bill) |
void |
setC_BPartner_ID(String oldC_BPartner_ID,
String newC_BPartner_ID,
int windowNo)
Set Business Partner - Callout |
void |
setC_BPartner_Location_ID(int C_BPartner_Location_ID)
Set Business Partner Location (Ship+Bill) |
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 DocSubTypeSO_x)
Set Target Sales Document Type |
void |
setC_DocTypeTarget_ID(String oldC_DocTypeTarget_ID,
String newC_DocTypeTarget_ID,
int windowNo)
Set Target Sales Document Type - Callout. |
void |
setClientOrg(int AD_Client_ID,
int AD_Org_ID)
Overwrite Client/Org if required |
void |
setDateOrdered(String oldDateOrdered,
String newDateOrdered,
int windowNo)
Set DateOrdered - Callout |
void |
setDateOrdered(Timestamp dateOrdered)
Set Date Ordered and Acct Date |
void |
setDocAction(String DocAction)
Set DocAction |
void |
setDocAction(String DocAction,
boolean forceCreation)
Set DocAction |
void |
setIsDropShip(boolean IsDropShip)
Set Drop Ship |
void |
setM_PriceList_ID(int M_PriceList_ID)
Set Price List (and Currency, TaxIncluded) when valid |
void |
setM_PriceList_ID(String oldM_PriceList_ID,
String newM_PriceList_ID,
int windowNo)
Set Price List - Callout |
void |
setM_ReturnPolicy_ID()
Set Return Policy |
void |
setM_Warehouse_ID(int M_Warehouse_ID)
Set Warehouse |
void |
setM_Warehouse_ID(String oldM_Warehouse_ID,
String newM_Warehouse_ID,
int windowNo)
Set M_Warehouse_ID - Callout |
void |
setOrig_InOut_ID(String oldOrig_InOut_ID,
String newOrig_InOut_ID,
int windowNo)
Set Original Shipment - Callout |
void |
setOrig_Order_ID(String oldOrig_Order_ID,
String newOrig_Order_ID,
int windowNo)
Set Original Order - Callout |
void |
setOrigInOut(MInOut origInOut)
Set Original Shipment for RMA SOTrx should be set. |
void |
setOrigOrder(MOrder origOrder)
Set Original Order for RMA SOTrx should be set. |
void |
setPriceListVersion(int windowNo)
|
void |
setProcessed(boolean processed)
Set Processed. |
void |
setShip_BPartner_ID(int C_BPartner_ID)
Set Ship Business Partner |
void |
setShip_Location_ID(int C_BPartner_Location_ID)
Set Ship Business Partner Location |
void |
setShip_User_ID(int AD_User_ID)
Set Ship Business Partner Contact |
String |
toString()
String Representation |
boolean |
unlockIt()
Unlock Document. |
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 |
| Field Detail |
|---|
public static final String DocSubTypeSO_Standard
public static final String DocSubTypeSO_Quotation
public static final String DocSubTypeSO_Proposal
public static final String DocSubTypeSO_Prepay
public static final String DocSubTypeSO_POS
public static final String DocSubTypeSO_Warehouse
public static final String DocSubTypeSO_OnCredit
public static final String DocSubTypeSO_RMA
| Constructor Detail |
|---|
public MOrder(Ctx ctx,
int C_Order_ID,
String trxName)
ctx - contextC_Order_ID - order to load, (0 create new order)trxName - trx name
public MOrder(MProject project,
boolean IsSOTrx,
String DocSubTypeSO)
project - Project to create Order fromIsSOTrx - sales orderDocSubTypeSO - if SO DocType Target (default DocSubTypeSO_OnCredit)
public MOrder(Ctx ctx,
ResultSet rs,
String trxName)
ctx - contextrs - result set recordtrxName - transaction| Method Detail |
|---|
public static MOrder copyFrom(MOrder from,
Timestamp dateDoc,
int C_DocTypeTarget_ID,
boolean counter,
boolean copyASI,
String trxName)
from - orderdateDoc - date of the document dateC_DocTypeTarget_ID - target document typeisSOTrx - sales ordercounter - create counter linkscopyASI - copy line attributes Attribute Set Instance, Resource AssignmenttrxName - trx
public void setClientOrg(int AD_Client_ID,
int AD_Org_ID)
setClientOrg in class POAD_Client_ID - clientAD_Org_ID - orgpublic void addDescription(String description)
description - textpublic void setC_BPartner_ID(int C_BPartner_ID)
setC_BPartner_ID in class X_C_OrderC_BPartner_ID - bpartnerpublic void setBPartner(MBPartner bp)
bp - business partner
@UICallout
public void setC_BPartner_ID(String oldC_BPartner_ID,
String newC_BPartner_ID,
int windowNo)
throws Exception
oldC_BPartner_ID - old BPnewC_BPartner_ID - new BPwindowNo - window no
Exception
@UICallout
public void setBill_BPartner_ID(String oldBill_BPartner_ID,
String newBill_BPartner_ID,
int windowNo)
throws Exception
oldBill_BPartner_ID - old BPnewBill_BPartner_ID - new BPwindowNo - window no
Exceptionpublic void setC_BPartner_Location_ID(int C_BPartner_Location_ID)
setC_BPartner_Location_ID in class X_C_OrderC_BPartner_Location_ID - bp locationpublic void setAD_User_ID(int AD_User_ID)
setAD_User_ID in class X_C_OrderAD_User_ID - userpublic void setShip_BPartner_ID(int C_BPartner_ID)
C_BPartner_ID - bpartnerpublic void setShip_Location_ID(int C_BPartner_Location_ID)
C_BPartner_Location_ID - bp locationpublic void setShip_User_ID(int AD_User_ID)
AD_User_ID - userpublic void setM_Warehouse_ID(int M_Warehouse_ID)
setM_Warehouse_ID in class X_C_OrderM_Warehouse_ID - warehouse
@UICallout
public void setM_Warehouse_ID(String oldM_Warehouse_ID,
String newM_Warehouse_ID,
int windowNo)
throws Exception
oldM_Warehouse_ID - oldnewM_Warehouse_ID - newwindowNo - window no
Exceptionpublic void setIsDropShip(boolean IsDropShip)
setIsDropShip in class X_C_OrderIsDropShip - drop shippublic void setPriceListVersion(int windowNo)
@UICallout
public void setDateOrdered(String oldDateOrdered,
String newDateOrdered,
int windowNo)
throws Exception
oldDateOrdered - oldnewDateOrdered - newwindowNo - window no
Exceptionpublic void setDateOrdered(Timestamp dateOrdered)
setDateOrdered in class X_C_OrderdateOrdered - Date of Order
@UICallout
public void setC_DocTypeTarget_ID(String oldC_DocTypeTarget_ID,
String newC_DocTypeTarget_ID,
int windowNo)
throws Exception
oldC_DocTypeTarget_ID - old IDnewC_DocTypeTarget_ID - new IDwindowNo - window
Exceptionpublic void setC_DocTypeTarget_ID(String DocSubTypeSO_x)
DocSubTypeSO_x - SO sub type - see DocSubTypeSO_*
public void setC_DocTypeTarget_ID(int C_DocTypeTarget_ID,
boolean setReturnTrx)
C_DocTypeTarget_ID - idsetReturnTrx - if true set ReturnTrx and SOTrxpublic void setC_DocTypeTarget_ID()
public int copyLinesFrom(MOrder otherOrder,
boolean counter,
boolean copyASI)
otherOrder - ordercounter - set counter infocopyASI - copy line attributes Attribute Set Instance, Resaouce Assignment
public String toString()
toString in class X_C_Orderpublic String getDocumentInfo()
getDocumentInfo in interface DocActionpublic File createPDF()
createPDF in interface DocActionpublic File createPDF(File file)
file - output file
public void setM_PriceList_ID(int M_PriceList_ID)
setM_PriceList_ID in class X_C_OrderM_PriceList_ID - price list
@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
Exceptionpublic void setM_ReturnPolicy_ID()
- public void setOrigOrder(MOrder origOrder)
origOrder - MOrder
@UICallout
public void setOrig_Order_ID(String oldOrig_Order_ID,
String newOrig_Order_ID,
int windowNo)
throws Exception
oldOrig_Order_ID - old Orig OrdernewOrig_Order_ID - new Orig OrderwindowNo - window no
Exceptionpublic void setOrigInOut(MInOut origInOut)
origInOut - MInOut
@UICallout
public void setOrig_InOut_ID(String oldOrig_InOut_ID,
String newOrig_InOut_ID,
int windowNo)
throws Exception
oldOrig_InOut_ID - old Orig OrdernewOrig_InOut_ID - new Orig OrderwindowNo - window no
Exception
public MOrderLine[] getLines(String whereClause,
String orderClause)
whereClause - where clause or null (starting with AND)orderClause - order clause
public MOrderLine[] getLines(int M_Product_ID,
String whereClause,
String orderClause)
orderClause - order clause
public MOrderLine[] getLines(boolean requery,
String orderBy)
requery - requeryorderBy - optional order by column
public MOrderLine[] getLines()
public void renumberLines(int step)
step - start and steppublic boolean isOrderLine(int C_OrderLine_ID)
C_OrderLine_ID - line
public MOrderTax[] getTaxes(boolean requery)
requery - requery
public MInvoice[] getInvoices(boolean hearderLinkOnly)
hearderLinkOnly - shipments based on header only
public int getC_Invoice_ID()
public MInOut getOpenShipment(int M_Warehouse_ID,
int C_BPartner_ID,
int C_BPartner_Location_ID)
public MInOut[] getShipments(boolean hearderLinkOnly)
hearderLinkOnly - shipments based on header only
public MOrder[] getRMAs()
public MInOutLine[] getShipmentLines()
public String getCurrencyISO()
public int getPrecision()
public String getDocStatusName()
public void setDocAction(String DocAction)
setDocAction in class X_C_OrderDocAction - doc action
public void setDocAction(String DocAction,
boolean forceCreation)
DocAction - doc octionforceCreation - force creationpublic void setProcessed(boolean processed)
setProcessed in class X_C_Orderprocessed - processedprotected boolean beforeSave(boolean newRecord)
beforeSave in class POnewRecord - new
protected boolean afterSave(boolean newRecord,
boolean success)
afterSave in class POnewRecord - newsuccess - success
protected boolean beforeDelete()
beforeDelete in class POpublic 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
public MInOut generateShipment(MDocType dt,
Timestamp movementDate)
dt - order document typemovementDate - optional movement date (default today)
|
Compiere 3.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||