Package org.openbravo.erpCommon.ad_forms
Class DocCostAdjustment
- java.lang.Object
-
- org.openbravo.erpCommon.ad_forms.AcctServer
-
- org.openbravo.erpCommon.ad_forms.DocCostAdjustment
-
public class DocCostAdjustment extends AcctServer
-
-
Field Summary
-
Fields inherited from class org.openbravo.erpCommon.ad_forms.AcctServer
ACCTTYPE_BankAsset, ACCTTYPE_BankInTransit, ACCTTYPE_BankInTransitDefault, ACCTTYPE_C_Receivable, ACCTTYPE_CashAsset, ACCTTYPE_CashDifference, ACCTTYPE_CashExpense, ACCTTYPE_CashReceipt, ACCTTYPE_CashTransfer, ACCTTYPE_Charge, ACCTTYPE_ConvertChargeDefaultAmt, ACCTTYPE_ConvertChargeGainAmt, ACCTTYPE_ConvertChargeLossAmt, ACCTTYPE_ConvertGainDefaultAmt, ACCTTYPE_DiscountExp, ACCTTYPE_DiscountRev, ACCTTYPE_InterestExp, ACCTTYPE_InterestRev, ACCTTYPE_InvDifferences, ACCTTYPE_NotInvoicedReceipts, ACCTTYPE_PaymentSelect, ACCTTYPE_PPVOffset, ACCTTYPE_ProjectAsset, ACCTTYPE_ProjectWIP, ACCTTYPE_UnallocatedCash, ACCTTYPE_V_Liability, ACCTTYPE_V_Liability_Services, ACCTTYPE_WriteOff, ACCTTYPE_WriteOff_Revenue, ACCTTYPE_WriteOffDefault, ACCTTYPE_WriteOffDefault_Revenue, AD_Client_ID, AD_Org_ID, AD_OrgTrx_ID, AD_Table_ID, Amounts, AMTTYPE_Allocation, AMTTYPE_Charge, AMTTYPE_Discount, AMTTYPE_Gross, AMTTYPE_Invoice, AMTTYPE_Net, AMTTYPE_WriteOff, batchSize, BP_C_SalesRegion_ID, C_Activity_ID, C_BankAccount_ID, C_BPartner_ID, C_BPartner_Location_ID, C_Campaign_ID, C_CashBook_ID, C_Charge_ID, C_Costcenter_ID, C_Currency_ID, C_DocType_ID, C_LocFrom_ID, C_LocTo_ID, C_Period_ID, C_Project_ID, C_SalesRegion_ID, ChargeAmt, connectionProvider, dateAcct, DateAcct, DateDoc, DOCTYPE_Allocation, DOCTYPE_Amortization, DOCTYPE_APCredit, DOCTYPE_APInvoice, DOCTYPE_APPayment, DOCTYPE_ARCredit, DOCTYPE_ARInvoice, DOCTYPE_ARProForma, DOCTYPE_ARReceipt, DOCTYPE_BankStatement, DOCTYPE_CashJournal, DOCTYPE_CostAdjustment, DOCTYPE_DPManagement, DOCTYPE_FinAccTransaction, DOCTYPE_FinBankStatement, DOCTYPE_GLJournal, DOCTYPE_LandedCost, DOCTYPE_LandedCostCost, DOCTYPE_MatInternalConsumption, DOCTYPE_MatInventory, DOCTYPE_MatMatchInv, DOCTYPE_MatMatchPO, DOCTYPE_MatMovement, DOCTYPE_MatProduction, DOCTYPE_MatReceipt, DOCTYPE_MatShipment, DOCTYPE_POrder, DOCTYPE_Reconciliation, DOCTYPE_RMSalesInvoice, DOCTYPE_SOrder, DocumentNo, DocumentType, errors, EXCHANGE_DOCTYPE_Invoice, EXCHANGE_DOCTYPE_Payment, EXCHANGE_DOCTYPE_Transaction, FIN_Financial_Account_ID, GL_Category_ID, groupLines, IsReturn, IsReversal, m_as, m_debt_payments, m_fact, m_IsOpening, M_Product_ID, m_Record_Id2, M_Warehouse_ID, MultiCurrency, Name, NO_CURRENCY, p_lines, Posted, Qty, Record_ID, Status, STATUS_BackgroundDisabled, STATUS_DocumentDisabled, STATUS_DocumentLocked, STATUS_Error, STATUS_InvalidAccount, STATUS_InvalidCost, STATUS_NoAccountingDate, STATUS_NoRelatedPO, STATUS_NotBalanced, STATUS_NotCalculatedCost, STATUS_NotConvertible, STATUS_NotPosted, STATUS_PeriodClosed, STATUS_Posted, STATUS_PostPrepared, STATUS_TableDisabled, strDateColumn, TABLEID_GLJournal, TABLEID_Invoice, TABLEID_Payment, TABLEID_Reconciliation, TABLEID_Transaction, tableName, TaxIncluded, User1_ID, User2_ID, ZERO
-
-
Constructor Summary
Constructors Constructor Description DocCostAdjustment()
DocCostAdjustment(String AD_Client_ID, String AD_Org_ID, ConnectionProvider connectionProvider)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Fact
createFact(AcctSchema as, ConnectionProvider conn, Connection con, VariablesSecureApp vars)
Create Facts (the accounting logic) for MMS, MMR.Account
getAccountByWarehouse(String AcctType, AcctSchema as, String WarehouseId, ConnectionProvider conn)
Get the account for Accounting SchemaAccount
getAcctByBusinessPartner(String AcctType, String bpId, AcctSchema as, ConnectionProvider conn)
BigDecimal
getBalance()
Get Balanceboolean
getDocumentConfirmation(ConnectionProvider conn, String strRecordId)
Get Document Confirmation not usedString
getSeqNo()
static long
getSerialVersionUID()
String
getServletInfo()
boolean
loadDocumentDetails(FieldProvider[] data, ConnectionProvider conn)
Load Document Detailsvoid
loadObjectFieldProvider(ConnectionProvider conn, String AD_Client_ID, String Id)
String
nextSeqNo(String oldSeqNo)
void
setC_Period_ID()
Set the period for the Cost Adjustment considering if all the periods matching accounting dates in Cost Adjustment Lines are openedvoid
setSeqNo(String seqNo)
-
Methods inherited from class org.openbravo.erpCommon.ad_forms.AcctServer
applyRate, checkDocuments, checkDocuments, convertAmount, convertAmount, filterDatesCheckDocuments, get, getAccount, getAccount, getAccountBPartner, getAccountBPartner, getAccountBPartnerAllowanceForDoubtfulDebt, getAccountBPartnerBadDebt, getAccountFee, getAccountGLItem, getAmount, getAmount, getConnectionProvider, getConversionDate, getConversionRateDoc, getConversionRatePrecision, getConvertedAmt, getConvertedAmt, getConvertedAmt, getConvertionRate, getInfo, getInfo, getInvalidAccountParameters, getInvalidCostParameters, getMessageResult, getNotCalculatedCostParameters, getObjectFieldProvider, getPaymentDetailAmount, getPaymentDetailIdWriteOffAndAmount, getPaymentDetailWriteOffAndAmount, getPaymentDetailWriteOffAndAmount, getPaymentDetailWriteOffAndAmount, getStatus, insertNote, isBackground, isBalanced, isConvertible, isPeriodOpen, loadDocument, loadDocument, loadDocumentType, loadDocumentType, match, post, reloadAcctSchemaArray, run, run, set, setBackground, setBatchSize, setMessageResult, setMessageResult, setMessageResult, setMessageResult, setObjectFieldProvider, setStatus
-
-
-
-
Constructor Detail
-
DocCostAdjustment
public DocCostAdjustment()
-
DocCostAdjustment
public DocCostAdjustment(String AD_Client_ID, String AD_Org_ID, ConnectionProvider connectionProvider)
Constructor- Parameters:
AD_Client_ID
- AD_Client_ID
-
-
Method Detail
-
loadObjectFieldProvider
public void loadObjectFieldProvider(ConnectionProvider conn, String AD_Client_ID, String Id) throws javax.servlet.ServletException
- Specified by:
loadObjectFieldProvider
in classAcctServer
- Throws:
javax.servlet.ServletException
-
loadDocumentDetails
public boolean loadDocumentDetails(FieldProvider[] data, ConnectionProvider conn)
Load Document Details- Specified by:
loadDocumentDetails
in classAcctServer
- Returns:
- true if loadDocumentType was set
-
getBalance
public BigDecimal getBalance()
Get Balance- Specified by:
getBalance
in classAcctServer
- Returns:
- Zero (always balanced)
-
createFact
public Fact createFact(AcctSchema as, ConnectionProvider conn, Connection con, VariablesSecureApp vars) throws javax.servlet.ServletException
Create Facts (the accounting logic) for MMS, MMR.Shipment CoGS DR Inventory CR Shipment of Project Issue CoGS DR Project CR Receipt Inventory DR NotInvoicedReceipt CR
- Specified by:
createFact
in classAcctServer
- Parameters:
as
- accounting schema- Returns:
- Fact
- Throws:
javax.servlet.ServletException
-
getSeqNo
public String getSeqNo()
- Returns:
- the seqNo
-
setSeqNo
public void setSeqNo(String seqNo)
- Parameters:
seqNo
- the seqNo to set
-
getSerialVersionUID
public static long getSerialVersionUID()
- Returns:
- the serialVersionUID
-
getAccountByWarehouse
public final Account getAccountByWarehouse(String AcctType, AcctSchema as, String WarehouseId, ConnectionProvider conn)
Get the account for Accounting Schema- Parameters:
AcctType
- see ACCTTYPE_*as
- accounting schema- Returns:
- Account
-
getDocumentConfirmation
public boolean getDocumentConfirmation(ConnectionProvider conn, String strRecordId)
Get Document Confirmation not used- Specified by:
getDocumentConfirmation
in classAcctServer
-
getAcctByBusinessPartner
public Account getAcctByBusinessPartner(String AcctType, String bpId, AcctSchema as, ConnectionProvider conn)
-
setC_Period_ID
public void setC_Period_ID()
Set the period for the Cost Adjustment considering if all the periods matching accounting dates in Cost Adjustment Lines are opened- Overrides:
setC_Period_ID
in classAcctServer
-
getServletInfo
public String getServletInfo()
- Overrides:
getServletInfo
in classAcctServer
-
-