Package org.openbravo.erpCommon.utility
Class DimensionDisplayUtility
- java.lang.Object
-
- org.openbravo.erpCommon.utility.DimensionDisplayUtility
-
public class DimensionDisplayUtility extends Object
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description DimensionDisplayUtility()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
computeAccountingDimensionDisplayLogic(Process process, Parameter parameter)
Compute the JavaScript code to embed in the process definition for computing the display logic.static String
computeAccountingDimensionDisplayLogic(Tab tab, Field field)
Compute the JavaScript code to embed in the tab definition for computing the display logic.static ADClientAcctDimension
createNewDimensionMapping(Client client, Organization org, String dimension, String documentBaseType, boolean showInHeader, boolean showInLines, boolean showInBreakDown)
static Map<String,String>
getAccountingDimensionConfiguration(Client client)
Compute the accounting dimensions visibility session variables.static List<DimensionMapping>
getDimensionMappingList(String dimension, String documentBaseType, String level)
static List<Object[]>
getGroupDimensionMapping(List<String> dimensionList)
static Map<String,String>
getReadOnlyLogicSessionVariables()
Calculates the session variables for computing the read only logic in accounting dimension configuration in client window.static List<String>
getRequiredSessionVariablesForTab(Process process, Parameter parameter)
Calculates the list of session variables that will be used for computing the display logic of the parameter.static List<String>
getRequiredSessionVariablesForTab(Tab tab, Field field)
Calculates the list of session variables that will be used for computing the display logic of the field.
-
-
-
Field Detail
-
DIM_Header
public static final String DIM_Header
Accounting Dimensions- See Also:
- Constant Field Values
-
DIM_Lines
public static final String DIM_Lines
- See Also:
- Constant Field Values
-
DIM_BreakDown
public static final String DIM_BreakDown
- See Also:
- Constant Field Values
-
DIM_Organization
public static final String DIM_Organization
- See Also:
- Constant Field Values
-
DIM_Project
public static final String DIM_Project
- See Also:
- Constant Field Values
-
DIM_BPartner
public static final String DIM_BPartner
- See Also:
- Constant Field Values
-
DIM_BPartnerD
public static final String DIM_BPartnerD
- See Also:
- Constant Field Values
-
DIM_Product
public static final String DIM_Product
- See Also:
- Constant Field Values
-
DIM_CostCenter
public static final String DIM_CostCenter
- See Also:
- Constant Field Values
-
DIM_User1
public static final String DIM_User1
- See Also:
- Constant Field Values
-
DIM_User2
public static final String DIM_User2
- See Also:
- Constant Field Values
-
DIM_Campaign
public static final String DIM_Campaign
- See Also:
- Constant Field Values
-
DIM_Activity
public static final String DIM_Activity
- See Also:
- Constant Field Values
-
DIM_Asset
public static final String DIM_Asset
- See Also:
- Constant Field Values
-
ARProFormaInvoice
public static final String ARProFormaInvoice
Document Base Types with accounting dimensions- See Also:
- Constant Field Values
-
ARReturnMaterialInvoice
public static final String ARReturnMaterialInvoice
- See Also:
- Constant Field Values
-
APPayment
public static final String APPayment
- See Also:
- Constant Field Values
-
ARInvoice
public static final String ARInvoice
- See Also:
- Constant Field Values
-
MaterialDelivery
public static final String MaterialDelivery
- See Also:
- Constant Field Values
-
APCreditMemo
public static final String APCreditMemo
- See Also:
- Constant Field Values
-
FinancialAccountTransaction
public static final String FinancialAccountTransaction
- See Also:
- Constant Field Values
-
MaterialMovement
public static final String MaterialMovement
- See Also:
- Constant Field Values
-
Amortization
public static final String Amortization
- See Also:
- Constant Field Values
-
SalesOrder
public static final String SalesOrder
- See Also:
- Constant Field Values
-
APInvoice
public static final String APInvoice
- See Also:
- Constant Field Values
-
GLJournal
public static final String GLJournal
- See Also:
- Constant Field Values
-
MaterialPhysicalInventory
public static final String MaterialPhysicalInventory
- See Also:
- Constant Field Values
-
MaterialReceipt
public static final String MaterialReceipt
- See Also:
- Constant Field Values
-
PurchaseOrder
public static final String PurchaseOrder
- See Also:
- Constant Field Values
-
ARCreditMemo
public static final String ARCreditMemo
- See Also:
- Constant Field Values
-
Reconciliation
public static final String Reconciliation
- See Also:
- Constant Field Values
-
ARReceipt
public static final String ARReceipt
- See Also:
- Constant Field Values
-
MatInternalConsumption
public static final String MatInternalConsumption
- See Also:
- Constant Field Values
-
IsAcctDimCentrally
public static final String IsAcctDimCentrally
Session variable- See Also:
- Constant Field Values
-
DIM_DISPLAYLOGIC
public static final String DIM_DISPLAYLOGIC
Display logic for accounting dimensions- See Also:
- Constant Field Values
-
DIM_AUXILIAR_INPUT
public static final String DIM_AUXILIAR_INPUT
Document Base Type auxiliary input- See Also:
- Constant Field Values
-
DOCBASETYPES_REFERENCE
public static final String DOCBASETYPES_REFERENCE
- See Also:
- Constant Field Values
-
DIMENSIONS_REFERENCE
public static final String DIMENSIONS_REFERENCE
- See Also:
- Constant Field Values
-
LEVELS_REFERENCE
public static final String LEVELS_REFERENCE
- See Also:
- Constant Field Values
-
ELEMENT
public static final String ELEMENT
- See Also:
- Constant Field Values
-
ADD_TRANSACTION_PROCESS_ID
public static final String ADD_TRANSACTION_PROCESS_ID
- See Also:
- Constant Field Values
-
FIN_FINACC_TRANSACTION_TABLE_ID
public static final String FIN_FINACC_TRANSACTION_TABLE_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
computeAccountingDimensionDisplayLogic
public static String computeAccountingDimensionDisplayLogic(Tab tab, Field field)
Compute the JavaScript code to embed in the tab definition for computing the display logic.- Parameters:
tab
- Tab.field
- Field.- Returns:
- Display logic (JavaScript) for the given field.
-
getAccountingDimensionConfiguration
public static Map<String,String> getAccountingDimensionConfiguration(Client client)
Compute the accounting dimensions visibility session variables.- Parameters:
client
- Client.- Returns:
- Map containing all the accounting dimension visibility session variables and the corresponding value ('Y', 'N')
-
getRequiredSessionVariablesForTab
public static List<String> getRequiredSessionVariablesForTab(Tab tab, Field field)
Calculates the list of session variables that will be used for computing the display logic of the field.- Parameters:
tab
- Tab.field
- Field.- Returns:
- List of session variables required for computing the display logic of the field.
-
getReadOnlyLogicSessionVariables
public static Map<String,String> getReadOnlyLogicSessionVariables()
Calculates the session variables for computing the read only logic in accounting dimension configuration in client window. Any mandatory combination (defined in ad_dimension_mapping table) is read only.- Returns:
- Map containing all the read only session variables for accounting dimension that are configurable in client window and with corresponding value ('Y', 'N').
-
getGroupDimensionMapping
public static List<Object[]> getGroupDimensionMapping(List<String> dimensionList)
-
getDimensionMappingList
public static List<DimensionMapping> getDimensionMappingList(String dimension, String documentBaseType, String level)
-
createNewDimensionMapping
public static ADClientAcctDimension createNewDimensionMapping(Client client, Organization org, String dimension, String documentBaseType, boolean showInHeader, boolean showInLines, boolean showInBreakDown)
-
getRequiredSessionVariablesForTab
public static List<String> getRequiredSessionVariablesForTab(Process process, Parameter parameter)
Calculates the list of session variables that will be used for computing the display logic of the parameter.- Parameters:
process
- Process Definitionparameter
- Parameter of Process Definition
-
computeAccountingDimensionDisplayLogic
public static String computeAccountingDimensionDisplayLogic(Process process, Parameter parameter)
Compute the JavaScript code to embed in the process definition for computing the display logic.- Parameters:
process
- Process Definitionparameter
- Parameter of Process Definition
-
-