Package org.brerp.base.process
Class ProcCOFCommissionCalc
java.lang.Object
org.compiere.process.SvrProcess
org.compiere.process.CommissionCalc
org.brerp.base.process.ProcCOFCommissionCalc
- All Implemented Interfaces:
ProcessCall
-
Field Summary
Modifier and TypeFieldDescriptionprotected final String
protected final String
protected boolean
protected boolean
protected BigDecimal
protected final String
protected final String
protected BigDecimal
protected BigDecimal
protected BigDecimal
protected String
protected BigDecimal
protected final String
Fields inherited from class org.compiere.process.CommissionCalc
m_com, m_EndDate, p_StartDate
Fields inherited from class org.compiere.process.SvrProcess
log, MSG_InvalidArguments, MSG_SaveErrorRowNotFound, PROCESS_INFO_CTX_KEY, PROCESS_UI_CTX_KEY, processUI
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected MCOFConfiguracaoMeta
buscarMetaAtingida
(BigDecimal resultadoMeta, BigDecimal resultadoPrecoMedio, MCommissionLine commissionLine) protected MCommissionRun
Creates the Commission run with the parameter start date and sets the descriptionprotected void
createDetail
(String sql, MCommissionAmt comAmt) Create Commission Detailprotected String
doIt
(int row_ID) Perform process.protected MCommissionRun
protected String
getCommissionLineWhereClause
(MCommissionLine commissionLine) Creates the SQL WHERE clause based on the field values defined in the Commission Lien recordprotected String
Creates the SQL statement for invoices (C_Invoice)protected String
Creates the SQL statement for orders (C_Order)Methods inherited from class org.compiere.process.CommissionCalc
checkParameters, doIt, getCommissionCalculationSQL, getCommissionRunDescription, getPaymentCommissionSQL, prepare, setStartEndDate
Methods inherited from class org.compiere.process.SvrProcess
addBufferLog, addLog, addLog, addLog, commit, commitEx, doIt, get_TrxName, getAD_Client_ID, getAD_PInstance_ID, getAD_User_ID, getCtx, getName, getParameter, getProcessInfo, getRecord_ID, getRecord_IDs, getRecord_UU, getRecord_UUs, getTable_ID, isLocked, lockObject, postProcess, rollback, saveProgress, saveStatus, setProcessUI, startProcess, statusUpdate, unlockObject, updateProgress
-
Field Details
-
metaAlcancada
-
valorTotal
-
pesoTotal
-
qtdTotal
-
META_POR_PESO
- See Also:
-
META_POR_VALOR
- See Also:
-
isIncluirMeta
protected boolean isIncluirMeta -
isConsiderarPrecoMedio
protected boolean isConsiderarPrecoMedio -
DIGITADOR
- See Also:
-
VENDEDOR
- See Also:
-
tipoDeMeta
-
meta
-
COF_ISCALCAVALIACAO
- See Also:
-
-
Constructor Details
-
ProcCOFCommissionCalc
public ProcCOFCommissionCalc()
-
-
Method Details
-
doIt
Description copied from class:CommissionCalc
Perform process.- Overrides:
doIt
in classCommissionCalc
- Returns:
- Message (text with variables)
- Throws:
Exception
- if not successful
-
geraComissao
- Throws:
Exception
-
getOrderCommissionSQL
Description copied from class:CommissionCalc
Creates the SQL statement for orders (C_Order)- Overrides:
getOrderCommissionSQL
in classCommissionCalc
- Returns:
- SQL statement
-
getInvoiceCommissionSQL
Creates the SQL statement for invoices (C_Invoice)- Overrides:
getInvoiceCommissionSQL
in classCommissionCalc
- Returns:
- SQL statement
-
createDetail
Description copied from class:CommissionCalc
Create Commission Detail- Overrides:
createDetail
in classCommissionCalc
- Parameters:
sql
- sql statementcomAmt
- parent- Throws:
Exception
-
buscarMetaAtingida
protected MCOFConfiguracaoMeta buscarMetaAtingida(BigDecimal resultadoMeta, BigDecimal resultadoPrecoMedio, MCommissionLine commissionLine) -
getCommissionLineWhereClause
Creates the SQL WHERE clause based on the field values defined in the Commission Lien record- Overrides:
getCommissionLineWhereClause
in classCommissionCalc
- Returns:
- SQL statement
-
createCommissionRun
Description copied from class:CommissionCalc
Creates the Commission run with the parameter start date and sets the description- Overrides:
createCommissionRun
in classCommissionCalc
- Returns:
- MCommissionRun
-