Package org.compiere.pos
Class PosOrderModel
- java.lang.Object
-
- org.compiere.model.PO
-
- org.compiere.model.X_C_Order
-
- org.compiere.model.MOrder
-
- org.compiere.pos.PosOrderModel
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparator<Object>
,I_C_Order
,I_Persistent
,DocAction
,Evaluatee
public class PosOrderModel extends MOrder
Wrapper for standard order- Author:
- Paul Bowden Adaxa Pty Ltd
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.compiere.model.MOrder
DocSubTypeSO_OnCredit, DocSubTypeSO_POS, DocSubTypeSO_Prepay, DocSubTypeSO_Proposal, DocSubTypeSO_Quotation, DocSubTypeSO_RMA, DocSubTypeSO_Standard, DocSubTypeSO_Warehouse, m_forceCreation, m_justPrepared, m_lines, m_processMsg, m_taxes
-
Fields inherited from class org.compiere.model.X_C_Order
DELIVERYRULE_AD_Reference_ID, DELIVERYRULE_AfterReceipt, DELIVERYRULE_Availability, DELIVERYRULE_CompleteLine, DELIVERYRULE_CompleteOrder, DELIVERYRULE_Force, DELIVERYRULE_Manual, DELIVERYVIARULE_AD_Reference_ID, DELIVERYVIARULE_Delivery, DELIVERYVIARULE_Pickup, DELIVERYVIARULE_Shipper, DOCACTION_AD_Reference_ID, DOCACTION_Approve, DOCACTION_Close, DOCACTION_Complete, DOCACTION_Invalidate, DOCACTION_None, DOCACTION_Post, DOCACTION_Prepare, DOCACTION_Re_Activate, DOCACTION_Reject, DOCACTION_Reverse_Accrual, DOCACTION_Reverse_Correct, DOCACTION_Unlock, DOCACTION_Void, DOCACTION_WaitComplete, DOCSTATUS_AD_Reference_ID, DOCSTATUS_Approved, DOCSTATUS_Closed, DOCSTATUS_Completed, DOCSTATUS_Drafted, DOCSTATUS_InProgress, DOCSTATUS_Invalid, DOCSTATUS_NotApproved, DOCSTATUS_Reversed, DOCSTATUS_Unknown, DOCSTATUS_Voided, DOCSTATUS_WaitingConfirmation, DOCSTATUS_WaitingPayment, FREIGHTCOSTRULE_AD_Reference_ID, FREIGHTCOSTRULE_Calculated, FREIGHTCOSTRULE_FixPrice, FREIGHTCOSTRULE_FreightIncluded, FREIGHTCOSTRULE_Line, INVOICERULE_AD_Reference_ID, INVOICERULE_AfterDelivery, INVOICERULE_AfterOrderDelivered, INVOICERULE_CustomerScheduleAfterDelivery, INVOICERULE_Immediate, PAYMENTRULE_AD_Reference_ID, PAYMENTRULE_Cash, PAYMENTRULE_Check, PAYMENTRULE_CreditCard, PAYMENTRULE_DirectDebit, PAYMENTRULE_DirectDeposit, PAYMENTRULE_MixedPOSPayment, PAYMENTRULE_OnCredit, PRIORITYRULE_AD_Reference_ID, PRIORITYRULE_High, PRIORITYRULE_Low, PRIORITYRULE_Medium, PRIORITYRULE_Minor, PRIORITYRULE_Urgent
-
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, LOCAL_TRX_PREFIX, log, p_ctx, p_info, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID
-
Fields inherited from interface org.compiere.process.DocAction
ACTION_Approve, ACTION_Close, ACTION_Complete, ACTION_Invalidate, ACTION_None, ACTION_Post, ACTION_Prepare, ACTION_ReActivate, ACTION_Reject, ACTION_Reverse_Accrual, ACTION_Reverse_Correct, ACTION_Unlock, ACTION_Void, ACTION_WaitComplete, AD_REFERENCE_ID, STATUS_Approved, STATUS_Closed, STATUS_Completed, STATUS_Drafted, STATUS_InProgress, STATUS_Invalid, STATUS_NotApproved, STATUS_Reversed, STATUS_Unknown, STATUS_Voided, STATUS_WaitingConfirmation, STATUS_WaitingPayment
-
Fields inherited from interface org.compiere.model.I_C_Order
accessLevel, COLUMNNAME_AD_Client_ID, COLUMNNAME_AD_Org_ID, COLUMNNAME_AD_OrgTrx_ID, COLUMNNAME_AD_User_ID, COLUMNNAME_AmountRefunded, COLUMNNAME_AmountTendered, COLUMNNAME_Bill_BPartner_ID, COLUMNNAME_Bill_Location_ID, COLUMNNAME_Bill_User_ID, COLUMNNAME_C_Activity_ID, COLUMNNAME_C_BPartner_ID, COLUMNNAME_C_BPartner_Location_ID, COLUMNNAME_C_Campaign_ID, COLUMNNAME_C_CashLine_ID, COLUMNNAME_C_CashPlanLine_ID, COLUMNNAME_C_Charge_ID, COLUMNNAME_C_ConversionType_ID, COLUMNNAME_C_Currency_ID, COLUMNNAME_C_DocType_ID, COLUMNNAME_C_DocTypeTarget_ID, COLUMNNAME_C_Opportunity_ID, COLUMNNAME_C_Order_ID, COLUMNNAME_C_Order_UU, COLUMNNAME_C_OrderSource_ID, COLUMNNAME_C_Payment_ID, COLUMNNAME_C_PaymentTerm_ID, COLUMNNAME_C_POS_ID, COLUMNNAME_C_Project_ID, COLUMNNAME_ChargeAmt, COLUMNNAME_CopyFrom, COLUMNNAME_Created, COLUMNNAME_CreatedBy, COLUMNNAME_DateAcct, COLUMNNAME_DateOrdered, COLUMNNAME_DatePrinted, COLUMNNAME_DatePromised, COLUMNNAME_DeliveryRule, COLUMNNAME_DeliveryViaRule, COLUMNNAME_Description, COLUMNNAME_DocAction, COLUMNNAME_DocStatus, COLUMNNAME_DocumentNo, COLUMNNAME_DropShip_BPartner_ID, COLUMNNAME_DropShip_Location_ID, COLUMNNAME_DropShip_User_ID, COLUMNNAME_FreightAmt, COLUMNNAME_FreightCostRule, COLUMNNAME_GrandTotal, COLUMNNAME_InvoiceRule, COLUMNNAME_IsActive, COLUMNNAME_IsApproved, COLUMNNAME_IsCreditApproved, COLUMNNAME_IsDelivered, COLUMNNAME_IsDiscountPrinted, COLUMNNAME_IsDropShip, COLUMNNAME_IsInvoiced, COLUMNNAME_IsPayScheduleValid, COLUMNNAME_IsPrinted, COLUMNNAME_IsPriviledgedRate, COLUMNNAME_IsSelected, COLUMNNAME_IsSelfService, COLUMNNAME_IsSOTrx, COLUMNNAME_IsTaxIncluded, COLUMNNAME_IsTransferred, COLUMNNAME_Link_Order_ID, COLUMNNAME_M_FreightCategory_ID, COLUMNNAME_M_PriceList_ID, COLUMNNAME_M_Shipper_ID, COLUMNNAME_M_Warehouse_ID, COLUMNNAME_Pay_BPartner_ID, COLUMNNAME_Pay_Location_ID, COLUMNNAME_PaymentRule, COLUMNNAME_POReference, COLUMNNAME_Posted, COLUMNNAME_PriorityRule, COLUMNNAME_Processed, COLUMNNAME_ProcessedOn, COLUMNNAME_Processing, COLUMNNAME_PromotionCode, COLUMNNAME_QuotationOrder_ID, COLUMNNAME_Ref_Order_ID, COLUMNNAME_SalesRep_ID, COLUMNNAME_SendEMail, COLUMNNAME_ShippingRateInquiry, COLUMNNAME_TotalLines, COLUMNNAME_Updated, COLUMNNAME_UpdatedBy, COLUMNNAME_User1_ID, COLUMNNAME_User2_ID, COLUMNNAME_Volume, COLUMNNAME_Weight, Model, Table_ID, Table_Name
-
-
Constructor Summary
Constructors Constructor Description PosOrderModel(Properties ctx, int C_Order_ID, String trxName, MPOS pos)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MOrderLine
createLine(MProduct product, BigDecimal QtyOrdered, BigDecimal PriceActual)
Create new Linestatic PosOrderModel
createOrder(MPOS pos, MBPartner partner, String trxName)
Get/create Ordervoid
deleteLine(int C_OrderLine_ID)
to erase the lines from orderboolean
deleteOrder()
Delete order from databaseString
getCreditCardName(String CreditCardType)
Duplicated from MPayment Get Name of Credit CardValueNamePair[]
getCreditCards(BigDecimal amt)
Duplicated from MPayment Get Accepted Credit Cards for amountBigDecimal
getPaidAmt()
BigDecimal
getSubtotal()
BigDecimal
getTaxAmt()
boolean
payCash(BigDecimal amt)
boolean
payCheck(BigDecimal amt, String accountNo, String routingNo, String checkNo)
boolean
payCreditCard(BigDecimal amt, String accountName, int month, int year, String cardNo, String cvc, String cardtype)
boolean
processOrder()
Process Ordervoid
reload()
void
setBPartner(MBPartner partner)
Set Business Partner Defaults & Details.-
Methods inherited from class org.compiere.model.MOrder
addDescription, afterSave, approveIt, beforeDelete, beforeSave, calculateFreightCharge, calculateTaxTotal, closeIt, completeIt, copyFrom, copyLinesFrom, createCounterDoc, createInvoice, createPaySchedule, createPDF, createPDF, createPOSPayments, createReversals, createShipment, deleteMatchPOCostDetail, explodeBOM, getApprovalAmt, getC_Invoice_ID, getCurrencyISO, getDoc_User_ID, getDocStatusName, getDocTypeID, getDocumentInfo, getInvoices, getLines, getLines, getLines, getPrecision, getProcessMsg, getShipments, getSummary, getTaxes, getTaxProviders, invalidateIt, isComplete, isOrderLine, landedCostAllocation, prepareIt, processIt, reActivateIt, rejectIt, renumberLines, reopenIt, reserveStock, reverseAccrualIt, reverseCorrectIt, setAD_User_ID, setC_BPartner_ID, setC_BPartner_Location_ID, setC_DocTypeTarget_ID, setC_DocTypeTarget_ID, setClientOrg, setDefiniteDocumentNo, setDocAction, setDocAction, setIsDropShip, setM_PriceList_ID, setM_Warehouse_ID, setProcessed, setProcessMessage, setShip_BPartner_ID, setShip_Location_ID, setShip_User_ID, toString, unlockIt, validatePaySchedule, voidIt
-
Methods inherited from class org.compiere.model.X_C_Order
get_AccessLevel, getAD_OrgTrx_ID, getAD_User, getAD_User_ID, getAmountRefunded, getAmountTendered, getBill_BPartner, getBill_BPartner_ID, getBill_Location, getBill_Location_ID, getBill_User, getBill_User_ID, getC_Activity, getC_Activity_ID, getC_BPartner, getC_BPartner_ID, getC_BPartner_Location, getC_BPartner_Location_ID, getC_Campaign, getC_Campaign_ID, getC_CashLine, getC_CashLine_ID, getC_CashPlanLine, getC_CashPlanLine_ID, getC_Charge, getC_Charge_ID, getC_ConversionType, getC_ConversionType_ID, getC_Currency, getC_Currency_ID, getC_DocType, getC_DocType_ID, getC_DocTypeTarget, getC_DocTypeTarget_ID, getC_Opportunity, getC_Opportunity_ID, getC_Order_ID, getC_Order_UU, getC_OrderSource, getC_OrderSource_ID, getC_Payment, getC_Payment_ID, getC_PaymentTerm, getC_PaymentTerm_ID, getC_POS, getC_POS_ID, getC_Project, getC_Project_ID, getChargeAmt, getCopyFrom, getDateAcct, getDateOrdered, getDatePrinted, getDatePromised, getDeliveryRule, getDeliveryViaRule, getDescription, getDocAction, getDocStatus, getDocumentNo, getDropShip_BPartner, getDropShip_BPartner_ID, getDropShip_Location, getDropShip_Location_ID, getDropShip_User, getDropShip_User_ID, getFreightAmt, getFreightCostRule, getGrandTotal, getInvoiceRule, getKeyNamePair, getLink_Order, getLink_Order_ID, getM_FreightCategory, getM_FreightCategory_ID, getM_PriceList, getM_PriceList_ID, getM_Shipper, getM_Shipper_ID, getM_Warehouse, getM_Warehouse_ID, getPay_BPartner_ID, getPay_Location_ID, getPaymentRule, getPOReference, getPriorityRule, getProcessedOn, getPromotionCode, getQuotationOrder, getQuotationOrder_ID, getRef_Order, getRef_Order_ID, getSalesRep, getSalesRep_ID, getShippingRateInquiry, getTotalLines, getUser1, getUser1_ID, getUser2, getUser2_ID, getVolume, getWeight, initPO, isApproved, isCreditApproved, isDelivered, isDiscountPrinted, isDropShip, isInvoiced, isPayScheduleValid, isPosted, isPrinted, isPriviledgedRate, isProcessed, isProcessing, isSelected, isSelfService, isSendEMail, isSOTrx, isTaxIncluded, isTransferred, setAD_OrgTrx_ID, setAmountRefunded, setAmountTendered, setBill_BPartner_ID, setBill_Location_ID, setBill_User_ID, setC_Activity_ID, setC_Campaign_ID, setC_CashLine_ID, setC_CashPlanLine_ID, setC_Charge_ID, setC_ConversionType_ID, setC_Currency_ID, setC_DocType_ID, setC_DocTypeTarget_ID, setC_Opportunity_ID, setC_Order_ID, setC_Order_UU, setC_OrderSource_ID, setC_Payment_ID, setC_PaymentTerm_ID, setC_POS_ID, setC_Project_ID, setChargeAmt, setCopyFrom, setDateAcct, setDateOrdered, setDatePrinted, setDatePromised, setDeliveryRule, setDeliveryViaRule, setDescription, setDocStatus, setDocumentNo, setDropShip_BPartner_ID, setDropShip_Location_ID, setDropShip_User_ID, setFreightAmt, setFreightCostRule, setGrandTotal, setInvoiceRule, setIsApproved, setIsCreditApproved, setIsDelivered, setIsDiscountPrinted, setIsInvoiced, setIsPayScheduleValid, setIsPrinted, setIsPriviledgedRate, setIsSelected, setIsSelfService, setIsSOTrx, setIsTaxIncluded, setIsTransferred, setLink_Order_ID, setM_FreightCategory_ID, setM_Shipper_ID, setPay_BPartner_ID, setPay_Location_ID, setPaymentRule, setPOReference, setPosted, setPriorityRule, setProcessedOn, setProcessing, setPromotionCode, setQuotationOrder_ID, setRef_Order_ID, setSalesRep_ID, setSendEMail, setShippingRateInquiry, setTotalLines, setUser1_ID, setUser2_ID, setVolume, setWeight
-
Methods inherited from class org.compiere.model.PO
afterDelete, clone, compare, copyValues, copyValues, createAttachment, delete, delete, delete_Accounting, delete_Tree, deleteEx, deleteEx, dump, dump, equals, get_Attribute, get_Attributes, get_ColumnCount, get_ColumnDescription, get_ColumnDisplayType, get_ColumnIndex, get_ColumnLabel, get_ColumnLookup, get_ColumnName, get_DisplayValue, get_HashMap, get_ID, get_IDOld, get_KeyColumns, get_Logger, get_Table_ID, get_TableName, get_Translation, get_Translation, get_Translation, get_Translation, get_Translation, get_TrxName, get_Value, get_Value, get_ValueAsBoolean, get_ValueAsInt, get_ValueAsInt, get_ValueAsString, get_ValueDifference, get_ValueDifference, get_ValueE, get_ValueOfColumn, get_ValueOld, get_ValueOld, get_ValueOldAsInt, get_WhereClause, get_xmlDocument, get_xmlString, getAD_Client_ID, getAD_Org_ID, getAllIDs, getAttachment, getAttachment, getAttachmentData, getCreated, getCreatedBy, getCtx, getDoc, getFindParameter, getPdfAttachment, getUpdated, getUpdatedBy, getUUIDColumnName, getUUIDColumnName, hashCode, insert_Accounting, insert_Tree, insert_Tree, is_Changed, is_new, is_ValueChanged, is_ValueChanged, isActive, isAttachment, isColumnMandatory, isColumnUpdateable, isMandatoryOK, isPdfAttachment, isReplication, load, load, load, load, loadComplete, loadDefaults, loadSpecial, lock, retrieveIdOfParentValue, retrieveIdOfParentValue, save, save, saveEx, saveEx, saveNew_getID, saveNewSpecial, saveReplica, saveUpdate, set_Attribute, set_ColumnUpdateable, set_CustomColumn, set_CustomColumnReturningBoolean, set_TrxName, set_TrxName, set_Value, set_Value, set_Value, set_Value, set_ValueE, set_ValueNoCheck, set_ValueNoCheckE, set_ValueOfColumn, set_ValueOfColumn, set_ValueOfColumnReturningBoolean, set_ValueOfColumnReturningBoolean, setAD_Client_ID, setAD_Org_ID, setClientOrg, setDoc, setDocWorkflowMgr, setIsActive, setProcessedOn, setReplication, setStandardDefaults, setUpdateable, setUpdatedBy, unlock, update_Tree
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
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, saveEx, setDocStatus
-
Methods inherited from interface org.compiere.model.I_C_Order
getAD_Client_ID, getAD_Org_ID, getCreated, getCreatedBy, getUpdated, getUpdatedBy, isActive, setAD_Org_ID, setIsActive
-
Methods inherited from interface org.compiere.model.I_Persistent
save
-
-
-
-
Constructor Detail
-
PosOrderModel
public PosOrderModel(Properties ctx, int C_Order_ID, String trxName, MPOS pos)
-
-
Method Detail
-
createOrder
public static PosOrderModel createOrder(MPOS pos, MBPartner partner, String trxName)
Get/create Order- Returns:
- order or null
-
setBPartner
public void setBPartner(MBPartner partner)
Description copied from class:MOrder
Set Business Partner Defaults & Details. SOTrx should be set.- Overrides:
setBPartner
in classMOrder
- Parameters:
partner
- business partner
-
createLine
public MOrderLine createLine(MProduct product, BigDecimal QtyOrdered, BigDecimal PriceActual)
Create new Line- Returns:
- line or null
-
deleteOrder
public boolean deleteOrder()
Delete order from database
-
deleteLine
public void deleteLine(int C_OrderLine_ID)
to erase the lines from order
-
processOrder
public boolean processOrder()
Process Order
-
getTaxAmt
public BigDecimal getTaxAmt()
-
getSubtotal
public BigDecimal getSubtotal()
-
getPaidAmt
public BigDecimal getPaidAmt()
-
payCash
public boolean payCash(BigDecimal amt)
-
payCheck
public boolean payCheck(BigDecimal amt, String accountNo, String routingNo, String checkNo)
-
payCreditCard
public boolean payCreditCard(BigDecimal amt, String accountName, int month, int year, String cardNo, String cvc, String cardtype)
-
reload
public void reload()
-
getCreditCards
public ValueNamePair[] getCreditCards(BigDecimal amt)
Duplicated from MPayment Get Accepted Credit Cards for amount- Parameters:
amt
- trx amount- Returns:
- credit cards
-
-