Package org.brerp.sped.nfe.model
Class MCOFCbenefConfig
java.lang.Object
org.compiere.model.PO
org.brerp.sped.nfe.model.X_COF_Cbenef_Config
org.brerp.sped.nfe.model.MCOFCbenefConfig
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparator<Object>
,I_COF_Cbenef_Config
,I_Persistent
,Evaluatee
- See Also:
-
Field Summary
Fields inherited from class org.brerp.sped.nfe.model.X_COF_Cbenef_Config
IMPOSTO_ICMS_CST_00_TributadoIntegralmente, IMPOSTO_ICMS_CST_10_TributadoEComCobrançaDoICMSPorSubstTributária, IMPOSTO_ICMS_CST_20_ComReducaoDeBaseDeCalculo, IMPOSTO_ICMS_CST_30_IsentaNaoTribComCobrDeICMSPorSubstTrib, IMPOSTO_ICMS_CST_40_Isenta, IMPOSTO_ICMS_CST_41_NaoTributada, IMPOSTO_ICMS_CST_50_Suspensão, IMPOSTO_ICMS_CST_51_Diferimento, IMPOSTO_ICMS_CST_60_ICMSCobradoAnteriormentePorSubstituicaoTributaria, IMPOSTO_ICMS_CST_70_ReducaoDeBaseDeCalculoECobradoICMSSubstituicaoTributaria, IMPOSTO_ICMS_CST_90_Outros, LBR_TRANSACTIONTYPE_EndUser, LBR_TRANSACTIONTYPE_Export, LBR_TRANSACTIONTYPE_ExportaçãoIndireta, LBR_TRANSACTIONTYPE_Import, LBR_TRANSACTIONTYPE_InternalUse, LBR_TRANSACTIONTYPE_Manufacturing, LBR_TRANSACTIONTYPE_Others, LBR_TRANSACTIONTYPE_Remessa, LBR_TRANSACTIONTYPE_Resale, LBR_TRANSACTIONTYPE_Transfer
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, UUID_NEW_RECORD, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID
Fields inherited from interface org.brerp.sped.nfe.model.I_COF_Cbenef_Config
accessLevel, COLUMNNAME_AD_Client_ID, COLUMNNAME_AD_Org_ID, COLUMNNAME_C_BPartner_ID, COLUMNNAME_C_Region_ID, COLUMNNAME_COF_Cbenef_Config_ID, COLUMNNAME_COF_Cbenef_Config_UU, COLUMNNAME_COF_Exportacao, COLUMNNAME_Created, COLUMNNAME_CreatedBy, COLUMNNAME_det_prod_cBenef, COLUMNNAME_imposto_icms_CST, COLUMNNAME_IsActive, COLUMNNAME_LBR_CFOP_ID, COLUMNNAME_LBR_NCM_ID, COLUMNNAME_lbr_TransactionType, COLUMNNAME_M_Product_ID, COLUMNNAME_PriorityNo, COLUMNNAME_Updated, COLUMNNAME_UpdatedBy, Model, Table_ID, Table_Name
-
Constructor Summary
ConstructorDescriptionMCOFCbenefConfig
(Properties ctx, int COF_Cbenef_Config_ID, String trxName) MCOFCbenefConfig
(Properties ctx, int COF_Cbenef_Config_ID, String trxName, String... virtualColumns) MCOFCbenefConfig
(Properties ctx, String COF_Cbenef_Config_UU, String trxName) MCOFCbenefConfig
(Properties ctx, String COF_Cbenef_Config_UU, String trxName, String... virtualColumns) MCOFCbenefConfig
(Properties ctx, ResultSet rs, String trxName) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
beforeSave
(boolean newRecord) Realiza o calculo da prioridade através dos campos preenchidos, da seguinte forma: Produto : 60 Parceiro de Negocios : 50 NCM: 40 CFOP: 30 Tipo de Transacao: 20 Organizacao: 10 Se mais de um campo estiver preenchido, é realizada a somatória dos pesos Caso o campo PriorityNo seja alterado manualmente antes de salvar, o calculo não será executadostatic MCOFCbenefConfig
getCbenef
(MLBRDocFiscalLine dfLine) Retorna o código do beneficário especifico para a linha de documento fiscal informada a partir do Produto, NCM, Organização, CST do ICMS e Estado de Destino.Methods inherited from class org.brerp.sped.nfe.model.X_COF_Cbenef_Config
get_AccessLevel, getC_BPartner, getC_BPartner_ID, getC_Region, getC_Region_ID, getCOF_Cbenef_Config_ID, getCOF_Cbenef_Config_UU, getdet_prod_cBenef, getimposto_icms_CST, getLBR_CFOP_ID, getLBR_NCM_ID, getlbr_TransactionType, getM_Product, getM_Product_ID, getPriorityNo, initPO, isCOF_Exportacao, setC_BPartner_ID, setC_Region_ID, setCOF_Cbenef_Config_ID, setCOF_Cbenef_Config_UU, setCOF_Exportacao, setdet_prod_cBenef, setimposto_icms_CST, setLBR_CFOP_ID, setLBR_NCM_ID, setlbr_TransactionType, setM_Product_ID, setPriorityNo, toString
Methods inherited from class org.compiere.model.PO
afterDelete, afterSave, beforeDelete, buildInsertSQL, checkImmutable, clearCrossTenantSafe, clone, columnExists, columnExists, compare, copyPO, 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_OptimisticLockingColumns, get_Table_ID, get_TableName, get_Translation, get_Translation, get_Translation, get_Translation, get_Translation, get_TrxName, get_UUID, get_Value, get_Value, get_ValueAsBoolean, get_ValueAsInt, get_ValueAsInt, get_ValueAsString, get_ValueAsString, get_ValueDifference, get_ValueDifference, get_ValueE, get_ValueOfColumn, get_ValueOld, get_ValueOld, get_ValueOldAsInt, get_WhereClause, 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_Immutable, is_new, is_UseOptimisticLocking, is_ValueChanged, is_ValueChanged, isActive, isAttachment, isColumnMandatory, isColumnUpdateable, isMandatoryOK, isPdfAttachment, isReplication, load, load, load, load, loadByUU, loadComplete, loadDefaults, loadPO, loadSpecial, lock, makeImmutable, postDelete, retrieveIdOfParentValue, retrieveIdOfParentValue, save, save, saveCrossTenantSafe, saveCrossTenantSafeEx, saveCrossTenantSafeEx, saveEx, saveEx, saveNew_afterSetID, saveNew_getID, saveNewSpecial, saveReplica, saveUpdate, set_Attribute, set_ColumnUpdateable, set_CustomColumn, set_CustomColumnReturningBoolean, set_OptimisticLockingColumns, set_TrxName, set_TrxName, set_UseOptimisticLocking, 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, setClientOrg, setCrossTenantSafe, setDoc, setDocWorkflowMgr, setIsActive, setProcessedOn, setReplication, setStandardDefaults, setUpdateable, setUpdatedBy, toInsertSQL, unlock, update_Tree, validForeignKeys
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.brerp.sped.nfe.model.I_COF_Cbenef_Config
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 Details
-
MCOFCbenefConfig
-
MCOFCbenefConfig
-
MCOFCbenefConfig
public MCOFCbenefConfig(Properties ctx, int COF_Cbenef_Config_ID, String trxName, String... virtualColumns) -
MCOFCbenefConfig
public MCOFCbenefConfig(Properties ctx, String COF_Cbenef_Config_UU, String trxName, String... virtualColumns) -
MCOFCbenefConfig
-
-
Method Details
-
beforeSave
protected boolean beforeSave(boolean newRecord) Realiza o calculo da prioridade através dos campos preenchidos, da seguinte forma: Produto : 60 Parceiro de Negocios : 50 NCM: 40 CFOP: 30 Tipo de Transacao: 20 Organizacao: 10 Se mais de um campo estiver preenchido, é realizada a somatória dos pesos Caso o campo PriorityNo seja alterado manualmente antes de salvar, o calculo não será executado- Overrides:
beforeSave
in classPO
- Parameters:
newRecord
- new record- Returns:
- true if record can be saved
-
getCbenef
Retorna o código do beneficário especifico para a linha de documento fiscal informada a partir do Produto, NCM, Organização, CST do ICMS e Estado de Destino. Caso não identificado o estado de destino, utiliza o do emitente. O código retornado é sempre o que tiver mais prioridade no cadastro.- Parameters:
dfLine
- Linha do documento fiscal
-