# M18 ERP XML Config & Usage

Version: 1.1 | Release Date: 7/12/2018

# aitype

# Usage

Define the debtor/creditor type in finance modules.


# Attributes

Name Description Example Required Default Value
module Define the module of debtor/creditor. cus Y
mess Define the messCode used for debtor/creditor. ce01_core.cus Y
lookupType Define the lookup type for header. approvedSalesCus Y
footerLookupType Define the lookup type for footer. approvedSalesCus N
isCreditorType Indicate if this is creditor type. false N true
isDebtorType Indicate if this is debtor type. false N true
typeHandler Define the handler for the current debtor/creditor type. The handler should implement IAITypeHandler. N
extend Indicate if the current element is the extension of any existing element. true N false
disableFields Define the fields/tab that need to be disabled when the current debtor/creditor type is selected. Value should be in the format like position:name. position: m represent main header while t means tab. name means column name or tab name. ; separated. m:manId;m:position N

# asavechk

# Usage

Used in com.multiable.erp.core.ejb.checker.MySaveChecker for the pupose of defining logical rules in related modules.


# Attributes

Name Description Example Required Default Value
module Define the module that need to be saved. oldso Y
extend Indicate if the current element is the extension of any existing element. false N false
chkCond Compare operator of chkField and refField. !=, &gt; means > , &lt; means <. Y
chkTable Define the table in the current module used to join the related module. mainso Y
chkKeyCol Define the column name in chkTable used to join the refKeyCol in refTable. id Y
chkCodeCol Define the code column in the current module. code N code
chkField Define the column that need to check in the current module. curId Y
chkAlias Define the table alias used for chkField. M means mian table. F means footer table. N M
refType Define the related module. dn Y
refTable Define the related table. dnt Y
refKeyCol Define the column in refTable used to join the chkKeyCol in chkTable. hId Y
refCodeCol Define the code's column name in related module. code N code
refField Define the column that need to check in related module. curId Y
refAlias Define the table alias used for refField. M means mian table. F means footer table. N F
chkOrder Define the check order. 1 Y
expired Indicate if this logical rule is expired. false N false
errorMess Define messCode to describe the error when chkField and refField satisfied chkCond. ce01_core.asavechk_not_same Y
refMess Define the messCode to describe the refField. ce01_core.cur N
chkMess Define the messCode to describe the chkField. ce01_core.cur N
addCond Define the additional condition need to join chkTable and refTable together. a means current module's main table. b means current module's footer table. c means related module footer table. d means related module's main table. c.sourceType='oldso' N

# Example

<item chkCond="!=" chkTable="mainso" chkKeyCol="id" chkField="curId" refType="dn" refTable="dnt" refKeyCol="sourceId" refField="curId" refAlias="M" addCond="c.sourceType='oldso'" chkOrder="1" errorMess="ce01_core.asavechk_not_same"/>

The above snippet used to check if the currencies used in sales order and delivery note are the same.


# barcodeSetting

# Usage

Default setting of [Product Label Printing]. Used to define the data source of product label.


# Attributes

Name Description Example Required Default Value
module Define the module that supports printing product label. pro Y
ejbClass Define the EJB class used to load data. BarcodeSettingEJB Y
ejbMethod Define the method in ejbClass to load data. loadData Y
filterSearch Define the default filter criteria for the current module in [Product Label Printing]. proBarcodeFilter N
extend Indicate if the current element is the extension of any existing element. false N false

# batchGenSetting

# Usage

Default setting of [Turbo Document Generation].


# Attributes

Element Name Description Example Required Default Value
module name Define the module's name. po Y
module viewListener Define the class used to handle the data and function related to the UI of current module. It has to implement the interface BatchGenModuleListener. Y
module extend Indicate if the current element is the extension of any existing element. true N false
optionField fieldName Define the field name of functional field displayed in UI. upOrigin Y
optionField fieldMess Define the messcode of this functional field ce01_trdg.upOrigin Y
optionField editType Define the input type of this functional field. The input type contains : inputCheck, inputCombo, inputNum, inputText, lookupField, commandButton inputCombo Y
optionField pattern Define the Pattern of this functional field. N
optionField showCond Define the condition of showing this functional field. false|var.xxxxx N true
optionField requiredCond Define the condition to judge if this field is compulsory. true|var.xxxxx N false
optionField expired Indicate if this field is expired. true N false
optionField extend Indicate if the current element is the extension of any existing element. true N false
showField fieldName Define the field name in the footer table in this editor of this module. Y
showField fieldMess Define the Messcode of current field Y
showField editType Define the input type of this field. The input type contains :cawDate, cawLookup, cawNum, cawCheckbox, cawText, cawButton Y
showField pattern Define the Pattern of this field. Y
showField fieldClass Define the SqlTable data type of this field. The type contains : LONG, DATE, DOUBLE, BOOLEAN and STRING N
showField showAfter Define the name of field which current field displayed behind. N
showField showCond Define the condition of showing this field. false|var.xxxxx N true
showField readonlyCond Define the condition to judge if this field is read-only. true|var.xxxxx N false
showField requiredCond Define the condition to judge if this field is compulsory. true|var.xxxxx N false
showField expired Indicate if this field is expired. true N false
showField footerField Indicate if this field is from footer table of this module. N false
showField batchUpdate Indicate if this field supports "batch update"(the Copy Column function of EditTable). N false
showField extend Indicate if the current element is the extension of any existing element. true N false
source moduleName Define the module name of data source. pro Y
source viewListener Define the class used to handle the data and function related to the UI of source module. It has to implement the interface BatchGenSourceListener. Y
source expired Indicate if this source is expired. true N false
source extend Indicate if the current element is the extension of any existing element. true N false

# Example

<module name="po" viewListener="com.multiable.erp.trdg.bean.batchgen.GenPoListener">
		<optionField fieldName="upOrigin" fieldMess="ce01_trdg.upOrigin" editType="inputCombo" pattern=""/>
		<optionField fieldName="descOrigin" fieldMess="ce01_trdg.descOrigin" editType="inputCombo" pattern=""/>
		<optionField fieldName="venScore" fieldMess="ce01_trdg.venSelctionBy" editType="inputCombo" pattern=""/>
		<optionField fieldName="sumProQty" fieldMess="ce01_trdg.summaryProQty" editType="inputCombo" pattern="trdg_summaryPro"/>
		<optionField fieldName="considerMpqMoq" fieldMess="ce01_trdg.considerMpqMoq" editType="inputCheck" pattern=""/>
		<optionField fieldName="refreshScore" fieldMess="ce01_trdg.refreshScore" editType="commandButton" pattern=""/>
		
		<showField fieldName="virDeptId" fieldMess="ce01_core.virDept" editType="cawLookup" pattern="core_virDept" showCond="var.enableVirDept" requiredCond="var.enableVirDept" readonlyCond="false" batchUpdate="true"/>
		<showField fieldName="cnDeptId" fieldMess="ce01_core.cnDept" editType="cawLookup" pattern="cnDept" readonlyCond="false" batchUpdate="true"/>
		<showField fieldName="doctypeId" fieldMess="ce01_core.doctype" editType="cawLookup" pattern="approvedDoctype" readonlyCond="false" batchUpdate="true"/>	
		
		<showField fieldName="sourceType" fieldMess="ce01_trdg.proDataSource" editType="cawCombo" pattern="trdg_poSourceType" />
		<showField fieldName="sourceId" fieldMess="ce01_core.sourceTransaction" editType="cawLookup" pattern="erp_import_id" />
		<showField fieldName="sourceDate" fieldMess="ce01_core.sourceTransactionDate" editType="cawDate" pattern="date" />
		<showField fieldName="proId" fieldMess="ce01_trdg.product" editType="cawLookup" pattern="trdgpro" requiredCond="true"/>
		<showField fieldName="sourceLot" fieldMess="ce01_trdg.proDataSourceLot" editType="cawText" pattern="ce01_lot" />
		<showField fieldName="bDesc" fieldMess="ce01_core.bDesc" editType="cawText" pattern="charDesc" />
		
		<showField fieldName="ref_inventoryItem" fieldMess="ce01_core.inventoryItem" editType="cawCheckbox" pattern="check" />
		<showField fieldName="ref_attrib" fieldMess="ce01_core.attrib" editType="cawCombo" pattern="attrib" />
		
		<showField fieldName="ref_qty" fieldMess="ce01_trdg.refQty" editType="cawNum" pattern="n_number15_8"/>
		<showField fieldName="qty" fieldMess="ce01_core.qty" editType="cawNum" pattern="n_number15_8" readonlyCond="false" requiredCond="true"/>
		<showField fieldName="unitId" fieldMess="ce01_core.unit" editType="cawLookup" pattern="proUnit" readonlyCond="false" requiredCond="true"/>
		
		<showField fieldName="ref_dDate" fieldMess="ce01_trdg.refETD" editType="cawDate" pattern="date" />
		<showField fieldName="dDate" fieldMess="ce01_trdg.ETA" editType="cawDate" pattern="date" footerField="true" readonlyCond="false" batchUpdate="true"/>
		
		<source moduleName="pro" viewListener="com.multiable.erp.trdg.bean.batchgen.PoSourceProListener"/>
		<source moduleName="oldso" viewListener="com.multiable.erp.trdg.bean.batchgen.PoSourceSoListener"/>
	</module>	

# bsflow

# Usage

Used to define the source transaction in different modules. Module defined in this XML will be shown in [Business Process Configuration].


# Attributes

Element Name Description Example Required Default Value
flow module Define the current module. oldso Y
flow compId Define the component's id used to store the lookup data. If the lookup field is inside an edittable, please use the id of the edittable. mainFooter N mainFooter
flow skipModule Define the module that must included in data source. pro N
flow extend Indicate if the current element is the extension of any existing element. false N false
flow disablePro If true and target module set to current module in [Business Process Configuration], <Allow Product/Material in Data Destination without Data Source> will be false and disabled. false N false
item sourceType Define the source transaction type. oldqu Y
item mess Define the messCode to describe the source transaction type. ce01_trdg.salesQu N message code of the module.
item moduleLookupType Define the lookup type used for the source transaction. multiqu Y
item keyLookupType Define the lookup type used for the product. qufooter Y
item skipCheckLoad If false, when open the source transaction, if it has been loaded to the module in flow, the transaction is prohibited from changing the customer/vendor/business flow/currency/rate. true N false
item singleFlowType Indicate if same source type can only assigned to one module in the same business flow setting. true N false
item loadOutstanding Indicate if outstanding quantity should be loaded. true N false
item loadDataHelper Define the handler used when retrieving data from source transaction. TradeOSHelper N
item loadDisc Indicate if discount or charge should be loaded. true N false
item loadRemarks Indicate if remarks should be loaded. true N false
item useOrigin Indicate if price origin and description origin should be used. true N false
item checkFK Indicate if source transaction can be deleted if used in the the current module. true N true
item checkSFFlag Define the SF that determines if this transaction type is available p (represents QC function is bought) N

# bsFlowAcc

# Usage

Default setting of [Business Process Setup (Finance)].


# Attributes

Element Name Description Example Required Default Value
flow module Define the module's name. recReg Y
flow invoiceTable Define the table for invoice. N
flow depositTable Define the table for deposit received. N
flow depUtilisedTable Define the table for deposit used. recregdepo N
flow hasPosting Indicate if voucher should be generated. true N false
flow extend Indicate if the current element is the extension of any existing element. true N false
invoice module Define the invoice's module name. arTran Y
invoice mess Define the messCode to describe the invoice type. ce01_ac.arTran N
invoice AIType Define the invoice's debtor/creditor type. cus N
invoice lookupType Define the invoice's lookup type. invArTran N
invoice ledger Define the nature of the invoice/deposit in [AR-AP Offset]. Options:arInvoice, apInvoice, arDepo, apDepo arInvoice N
deposit module Define the deposit's module name. oldso Y
deposit mess Define the messCode to describe the deposit type. ce01_trdg.so N
deposit AIType Define the deposit's debtor/creditor type. cus N
deposit lookupType Define the deposit's lookup type. oldso N
deposit ledger Define the nature of the invoice/deposit in [AR-AP Offset]. Options:arInvoice, apInvoice, arDepo, apDepo arDepo N
depUtilised module Define the deposit used's module name. recReg Y
depUtilised mess Define the deposit used type's messCode. ce01_ac.recReg N
depUtilised AIType Define the deposit used's debtor/creditor type. cus N
depUtilised lookupType Define the deposit used's lookup type. recRegInfo N
depUtilised ledger Define the nature of the invoice/deposit in [AR-AP Offset]. Options:arInvoice, apInvoice, arDepo, apDepo arDepo N

# bsrule

# Usage

Check if the data is valid based on the defined business rules when transactions is saved or deleted. Default setting of [Business Rule Configuration].


# Attributes

Element Name Description Example Required Default Value
rule module Define the current module. oldso Y
rule extend Indicate if the current element is the extension of any existing element. false N false
item name Define the business rule's name. overShip Y
item mess Define the business rule's messCode displayed in user interface. ce01_core.bsrule_overship(so) Y
item formula Define the business rule's formula. If this formula return positive value, the transaction cannot be saved or deleted. [minUp] > (1+[tolerance]/100) * [netup] Y
item chkOrder Define the business rule's checking order when saving the transaction. 1 Y
item retype Define the return type. numeric Y
item retFormula Define the return formula. [minUp] > (1+[tolerance]/100) * [netup] Y
item ejbClass Define the EJB class for this checking. xxx.OverShipChecker Y
item ejbMethod Define the mehtod in ejbClass to run this checking. overShip Y
item retValue Define the return value. max N
item chkTable Define the table needed to be checked in this module. sot N
item errorKey Define the error code. Reference to the key of < message-case> in app.xml. ce01_core_103000 N
item mapping Indicate if data mapping is avaliable in [Business Rule Setting]. true N false
item extend Indicate if the current element is the extension of any existing element. true N false
formulaParam name Define the variable name used in formula minUp Y
formulaParam mess Define the variable's messCode displayed in the user interface. ce01_core.minUp Y
formulaParam ejbClass Define the EJB class used to handle the parameter. N
formulaParam ejbMethod Define the method in ejbClass to handle the parameter. N
formulaParam type Define the type of parameter. numeric N
condParam name Define the name of the condition. The business rule will be processed only when the condition is passed. sot_proId_code Y
condParam mess Define the condition's messCode. ce01_core.proCode Y
condParam tableName Define the table used in the condition. sot Y
condParam columnName Define the column name used in the condition. proId Y
condParam type Define the type of condition. Options: sql, boolean. sql Y
condParam ejbClass Define the EJB class name to handle the condition. xxx. OverShipChecker N
condParam ejbMethod Define the method in ejbClass to handle the condition. oldsoValidProCode N

# closedSetting

# Usage

Default setting of [Close Transaction] and used to handle the process of loadData() and updateData() in ClosedSetting EJB.


# Attributes

Name Description Example Required Default Value
module Define the module's name. oldso Y
extend Indicate if the current element is the extension of any existing element. false N false
ejbClass Define the EJB's handler class name to process the request. xxx.ClosedSettingData N
ejbMethod1 Define the method used in ejbClass for loading data. loadData N
ejbMethod2 Define the method used in ejbClass for updating data. updateData N
filterSearch Define the default filter criteria for the current module in [Close Transaction]. soClosedFilter N
jsfClass Define the backing bean of the footer table. xxx.TrdgClosedSettingBean N
jsfXhtml Define the view file of the footer table such that when users choose the current module, the footer table will be changed as defined in this view file. /xxx/TrdgClosedSetting.xhtml N
auto Indicate if this transaction will be closed automatically. (AP should check this flag and do the closing in checker) true (e.g. [AR Transaction] will be closed when it is fully settled) N false

# jlConf

# Usage

Define the default setting of voucher configuration.


# Attributes

Element Name Description Example Required Default Value
config module Define the module's name. arTran Y
config extend Indicate if the current element is the extension of any existing element. true N false
item type Define the type of the current item. arTran_arAcc_debit Y
item mess Define messCode used to show the description in user interface. ac.arTranVoucherMess1 N
item order Define the order shown in the user interface. 1 Y
item sourceTable Define the table of source transaction. mainartran Y
item curField Define the column name of currency. mainartran.curId N
item rateField Define the column name of rate. mainartran.rate N
item dateField Define the column name of date. mainartran.tDate Y
item accFormula Define the formula for the account used in current item when generating the voucher. artrant.accId N
item amtFormula Define the formula for the amount used in current item when generating the voucher. @D_mainartran_amt Y
item domAmtFormula Define the formula for amount(entity currency) in current item when generating the voucher. @D_mainartran_amt N
item direction Define if the item is in debit/credit side. Option: 1 means credit, -1 means debit. 1 Y
item accDescFormula Define the formula to describe the account in this item when generating the voucher. @D_mainartran_accDesc N
item particularFormula Define the formula to describe the transaction in this item when generating the voucher. @D_remartran_particular N
item aiRefModuleField Define the column name of source transaction type. sTranType N
item aiRefIdField Define the column name of source transaction. sTranId N
item aiRefLotField Define the column name of source transaction's lot. N
item useSourceAcc Indicate if account should be retrieved from source transaction. true N false
item sourceAccMapping Define the mapping fields in sourceTable to map with tranType, tranId, and lot fields in table accdfsource. ; separated. Order of these 3 fields cannot be changed. ce01Module;hId;lot。 N
item isAdj Indicate if the amount is adjustable. true N false
item isStock Indicate if the current module related to stock. true N false
item app Define the app that must exists. If not exists, the current item will not appear in user interface. ce01_trdg N ce01_ac
item enable Indicate if this item is enabled. false N true
item autoMapping Indicate if the fields in [Journal Voucher] and sourceTable or the main table in module should be auto mapped. true N false
item extend Indicate if the current element is the extension of any existing element. true N false
item chkVarCond Define the variable used to determine if this item will appear in user interface. If getVariable(xxx) in Java Bean is set to true, this item will appear in user interface. ; separated. disabledVatPerItem, N
cond field Define the field used in the condition. art.qty Y
cond operator Define the condition operator. &gt; Y
cond value Define the value for comparsion. 0 Y
mapping fieldName Define the field name in voucher. debtorType Y
mapping fieldType Define the field type. Options: source means field in sourceTable, field means field in other table, value means a pre-defined value. source N
mapping mappingField Define the field mapped to the voucher. maintar.cusId N
mapping defValue Define the default value if the value is not exists. cus N
mappingFieldHandler className Define the class to handle the mapping. FinanceMappingHandler Y

# lockDate

# Usage

Default setting of [Frozen Period Configuration].


# Attributes

Element Name Description Example Required Default Value
chkDate name Define the name of the frozen period type. 02 Y
chkDate mess Define the messCode to show the description. ce01_core.lockDateSc Y
chkDate updateType Define the update type upStkCost Y
chkDate updateMess Define the update type's messCode. ce01_trdg.upStkCost Y
module name Define the module name in [Frozen Period Setting] dn Y
module chkDate Define the frozen period type used for this module. 02 Y
module skipChk Indicate if this module should skip the checking of frozen period. true N false
chkField tableName Define the table name of the date field for frozen period checking. maindn Y
chkField columnName Define the column name of the date field in tableName. tDate Y

# Example

<chkDate name="02" mess="ce01_core.lockDateSc" updateType="upStkCost" updateMess="ce01_trdg.upStkCost"/>
<module name ="dn" chkDate="02">
		<chkField tableName="maindn" columnName="tDate"/>
</module>

Above snippet defined a frozen period type with name = 02. Delivery note(dn) cannot be saved or deleted if tDate is within the frozen period type = 02.


# multiflow

# Usage

Default setting of [Flow Thru Setup].


# Attributes

Element Name Description Example Required Default Value
flow srcModule Define the source module. oldso Y
flow tarModule Define the target module. po Y
flow ejbClass Define the EJB class to handle the process. xxx.OrderMultiFactory Y
flow extend Indicate if the current element is the extension of any existing element. ture N false
functionField tableName Define the table processed by functionHandler. pot Y
functionField fieldName Define the column processed by functionHandler. refCode Y
functionHandler handlerMethod Define the method used in handlerClass to handle functionField. handlerHardcodeField Y
functionHandler handlerClass Define the EJB class to handle functionField. N =ejbClass
fieldOption tableName Define the table name used in Step4. pomat Y
fieldOption fieldName Define the field name. sourceType Y
fieldOption optionItem Define the value of the current option. pro Y
fieldOption optionMess Define the messcode of the current option. ce01_core.pro Y
fieldOption optionClass Define the class to handle the option. Y
fieldOption optionMethod Define the method in optionClass to handle the option. Y
mapping tarTableName Define the target table name that the field in the table will be mapped. pot Y
mapping srcTableName Define the table name used to mapped with the column in tarTableName. sot Y
mapping autoMapping Indicate if auto mapping should be enabled. true N false
mapping extend Indicate if the current element is the extension of any existing element. true N false
field tarFieldName Define the target column name to be mapped. sourceType Y
field srcFieldName Define the column name used to mapped with tarGieldName. sourceType N
field defValue Define the default value of the target column. N
field defFormula Define the default formula to calculate the value of target column. N
field defOption Define the default fieldOption of the target column. N
field skipAutoMapping Indicate if auto mapping should be skipped. true N false
percentHander handlerMethod Define the method name in handlerClass to handle the split percentage. handlerFooterPercent Y
percentHander handlerClass Define the class to handle the split percentage. N =ejbClass
dataOption name Define the time when the business flow is created. save Y
dataOption mess Define the messcode of the time. core.save Y

# origin

# Usage

Define the options of <Price Origin> and <Description Origin> in transaction modules.


# Attributes

Element Name Description Example Required Default Value
origin name Define the origin's name. PRO Y
origin mess Define the messCode to describe the origin. ce01_trdg.proMaster Y
origin behavior Define the operation when no data can be retrieved from origin. Options: loadZero means return 0, loadSec means load the data from the second origin. loadZero N
origin extend Indicate if the current element is the extension of any existing element. ture N false
last module Define the source module when origin was set to retrieved from last transaction. siso Y
last selected Indicate if current item is selected. true N true
last priority Define the priority. 1 N
last extend Indicate if the current element is the extension of any existing element. true N false

# originSetting

# Usage

Default setting of Price Origin & Description Origin in [Preference Setup (Trade)].


# Attributes

Element Name Description Example Required Default Value
price module Define the module name. oldso Y
price defValue Define the default value for the price origin. SOLAST N
price display Indicate if price origin should be shown. false N true
price extend Indicate if the current element is the extension of any existing element. ture N false
desc module Define the module name. oldso Y
desc defValue Define the default value for the description origin. SOLAST N
desc display Indicate if description origin should be shown. false N true
desc extend Indicate if the current element is the extension of any existing element. true N false
option origin Define the name of rht price/description origin. UPLIST Y
option ejbClass Define the EJB class to handle the origin setting. N
option ejbMethod Define the method in ejbClass to handle the origin setting. N
option label Define messCode displayed for the option. N
option priority Define the priority of the options. 1 N 0
option nonApproved Indicate if non-approved record should be considered. true N false

# refcode

# Usage

Define how the customer/vendor reference code is retrieved from the transaction.


# Attributes

Element Name Description Example Required Default Value
module name Define the module's name. oldso Y
module ejbClass Define the EJB's class name used for retrieving data of Customer/Vendor Part No. xxx.RefCodeData N
module ejbMethod Define the method name in ejbClass for retrieving data of Customer/Vendor Part No. getLastRefCode N
module extend Indicate if the current element is the extension of any existing element. ture N false

# stkChk

# Usage

Define checking logic before stock closed.


# Attributes

Element Name Description Example Required Default Value
chkItem name Define the item's name. chkApv Y
chkItem mess Define the messCode to describe the item. ce01_trdg.stkChkApv Y
chkItem ejbClass Define the EJB class to handle the checking. xxx.StockCheckUtil Y
chkItem ejbMethod Define the method in ejbClass to handle the checking. chkApv Y

# stkMth

# Usage

Define inventory's costing method in [Product/Material].


# Attributes

Name Description Example Required Default Value
name Define the item's name. avg Y
mess Define messCode for the description. ce01_core.cost_avg Y
rendered Indicate if this item's should be shown in user interface. true Y
ejbClass Define the EJB class for the calculation. xxx. ERPCostCalc Y
ejbMethod Define the mehod in ejbClass for the calculation. calc_avg Y

# Example

<?xml version="1.0"?>
<stkMth xmlns="http://www.multiable.com/erp/stkMth">
	<stkItem name="avg" mess="ce01_core.cost_avg" rendered="true" ejbClass="com.multiable.erp.trdg.ejb.util.cost.ERPCostCalc" ejbMethod="calc_avg"/>
	<stkItem name="mavg" mess="ce01_core.cost_mavg" rendered="true" ejbClass="com.multiable.erp.trdg.ejb.util.cost.ERPCostCalc" ejbMethod="calc_moving_avg"/>
	<stkItem name="fifo" mess="ce01_core.cost_fifo" rendered="true" ejbClass="com.multiable.erp.trdg.ejb.util.cost.ERPCostCalc" ejbMethod="calc_fifo"/>
	<stkItem name="exact" mess="ce01_core.cost_exact" rendered="#{corePro.getExactUsed()}" ejbClass="com.multiable.erp.trdg.ejb.util.cost.ERPCostCalc" ejbMethod="calc_lotno"/>
</stkMth>

The above code defined 4 commons calculations.


# tradeUcOption

# Usage

Options of <Exceptions> in [Physical Stock Configuration]. Define the calculation of Inventory Cost when Inventory Cost = 0.


# Attributes

Name Description Example Required Default Value
name Define the item's name. an Y
mess Define the messCode to describe the item. ce01_trdg.latestGrn Y
ejbClass Define the EJB class to calculate the unit cost. xxx. TradeUcUtil Y
ejbMethod Define the method in ejbClass to calculate the unit cost. getBaseUc Y

# vatConfig

# Usage

Define the formula of fields related to taxation. Default setting of [Tax Recalculation Settings].


# Attributes

Element Name Description Example Required Default Value
app name Define the app name. ce01_core Y
app order Define the app's order such that the smaller the number of the order, the earlier the formula in the app will be used. 1 Y
fType code Define the footer type of the table. pro Y
fType mess Define messCode to describe the footer type. ce01_trdg.product N
var code Define the variable's code. qty Y
var mess Define messCode to describe the variable. ce01_core.qty Y
var value Define the variable's value. qty N
var fType Define the footer type that this variable can be used. ; separated. pro N
defFormula fType Define the footer type that this formula can be used. pro Y
defFormula sField Define the var that trigger this formula. qty Y
defFormula eField Define the var that the output of this formula will be assigned to. preTaxUp Y
defFormula enabled Indicate if this formula is enabled by default. true N false
defFormula formula Define the formula. @D_preTaxUp * @D_qty N
defFormula priority Define the priority of this formula. The lower the number, the earlier it will be triggered. 100 N 0
info table Define the table name. if template is true, define the template name. sot Y
info fType Define which fType will be used. pro Y
info extend Indicate if the current element is the extension of any existing element. true N false
info template Indicate if this info is a template. N false
inherit name Define the template used. trdg_template Y
varmap code Define the code in var. Used in field mapping. afterTaxUp Y
varmap field Define the field name in the table table in info. up Y
varmap alsoTriggeredBy Define the field that also triggere the same calculation. unitId N

# Example

<vatConfig xmlns="http://www.multiable.com/vat/vatConfig">

	<fType code="pro" mess="ce01_trdg.product"/>
	
	<var code="preTaxUp" value="preTaxUp" mess="ce01_ztrdgvat.preTaxUp" fType="pro"/>
	<var code="afterTaxUp" value="afterTaxUp" mess="ce01_ztrdgvat.afterTaxUp" fType="pro"/>
	<var code="vatPer" value="vatPer" mess="ce01_vat.vatPer" fType="pro"/>

	<defFormula fType="pro" sField="afterTaxUp" eField="preTaxUp" enabled="true" formula="@D_afterTaxUp/ (1+@D_vatPer/100)" priority="100"/>
	<defFormula fType="pro" sField="afterTaxUp" eField="preTaxAmt" enabled="true" formula="@D_preTaxUp*@D_qty*(1-@D_disc/100)" priority="200"/>
	<defFormula fType="pro" sField="afterTaxUp" eField="afterTaxAmt" enabled="true" formula="@D_afterTaxUp*@D_qty*(1-@D_disc/100)" priority="300"/>
	<defFormula fType="pro" sField="afterTaxUp" eField="taxAmt" enabled="true" formula="@D_afterTaxAmt-@D_preTaxAmt" priority="400"/>

	<info table="trdg_template" template="true" fType="pro">
		<varmap code="qty" field="qty"/>
		<varmap code="preTaxUp" field="preTaxUp"/>
		<varmap code="afterTaxUp" field="up" alsoTriggeredBy="unitId"/>
		<varmap code="disc" field="disc"/>
		<varmap code="vatPer" field="vatPer"/>
		<varmap code="preTaxAmt" field="preTaxAmt"/>
		<varmap code="afterTaxAmt" field="amt"/>
		<varmap code="taxAmt" field="taxAmt"/>	
	</info>
	
	<info table="sot" template="false" fType="pro">
		<inherit name="trdg_template"/>
	</info>
</vatConfig>	

The above XML definded 1 footer type with code = pro, 3 variables, 4 formulas, 1 template and 1 table. The template trdg_template mapped the variables to the real table's field name while the table sot used the template. When variable afterTaxUp or field unitId changed in user interface, it will triggered the formulas and the output will assigned to preTaxUp, preTaxAmt, afterTaxAmt and taxAmt accordingly.


# venScore

# Usage

Used to generate the options of combo box Vendor in [Turbo Document Generation] and [MRP Generation].


# Attributes

Element name Description Example Required Default Value
score name Define the name of option. lowestVQuPrice Y
score mess Define the messcode of option. ce01_trdg.lowestVQuPrice Y
score ejbClass Define the name of the ejbClass to search data of this option Y
score ejbMethod Define the name of the ejbMethod to search data of this option Y
module name Define the module's name po Y
module defValue Define the default value of combo box lowestVQuPrice Y
module-score name Define the name of option that corresponds to score's name. lowestVQuPrice Y

# voucherOption

# Usage

Define the options to be grouped when Multiple Transaction is enabled in [Voucher Configuration].


# Attributes

Element Name Description Example Required Default Value
option optionValue Define the option's value. AIId Y
option optionMess Define messCode to describe the options. ce01_ac.isSameAIId Y
option disabled Indicate if the option should be disabled. true N false
option optionCond Define the variable that determine if the current option should be shown. If getVariable(xxx) in Java Bean return true, it will be shown. var.enableVirDept N
config module Define the module name. siso Y
optionMapping optionValue Define the optionValue in option used for mapping. AIId Y
optionMapping optionField Define the field mapped to optionValue in optionMapping. cusId Y

# Example

<voucherOption xmlns="http://www.multiable.com/ac/voucherOption">

	<option optionValue="AIId" optionMess="ce01_ac.isSameAIId"/>
	<option optionValue="doctypeId" optionMess="ce01_ac.isSameDocType"/>
	<option optionValue="staffId" optionMess="ce01_ac.isSameStaff" />
	<option optionValue="virDeptId" optionMess="ce01_ac.isSameVirDept" optionCond="var.enableVirDept"/>
	
	<config module="siso">
		<optionMapping optionValue="AIId" optionField="cusId"/>
	</config>
	
	<config module="pi">
		<optionMapping optionValue="AIId" optionField="venId"/>
	</config>
	
</voucherOption>

The above code defined 4 options. cusId in sales invoice is used to map with AIId while venId in purchase invoice is used to map with AIId when generating the vouchers.

# acMultiFlow

# Usage

Default setting of [Flow Thru Setup (AR&AP)].


# Attributes

Element Name Description Example Required Default Value
flow srcModule Define the source module. arTran Y
flow tarModule Define the target module. apTran Y
flow ejbClass Define the EJB class to handle the process. AcMultiFactory Y
flow extend Indicate if the current element is the extension of any existing element. true N false
mapping srcTableName Define the source table. For formula data items. mainartran Y
mapping tarTableName Define the target table. For destination fields. mainaptran Y
mapping skipSrcFields Define skip source fields. Not displayed in formula data items. AIId,AIType N
mapping skipTarFields Define skip target fields. Not displayed in destination fields. AIId,AIType N
field fieldName Define default field. mainaptran.code Y
field defFormula Define default formula. @D_mainartran_code N

# chequeSetting

# Usage

Default setting of [Cheque Payment Management]. Used to define the data source of cheque.


# Attributes

Element Name Description Example Required Default Value
setting module Define the cheque module. jl Y
setting mainTable Define the main table. maint Y
setting payeeTable Define the cheque table. t Y
setting filterSearch Define the default filter criteria for the cheque module. jlChequeFilter N
setting ejbClass Define the EJB class to load data. ChequeSettingEJB N
setting ejbMethod Define the mehtod in ejbClass to load data. loadData N
setting extend Indicate if the current element is the extension of any existing element. true N false
filterField tableName Define the table used in the filter. maint Y
filterField fieldName Define the field used in the filter. id Y
filterField mess Define the messcode of field. ce01_ac.journalVoucher N
filterField pattern Define the pattern of field. jl N

# bsflowProd

# Usage

Used to define the source transaction in different modules. Module defined in this XML will be shown in [Business Process Setup (Production)].

# Attributes

element attribute Description Example Required Default Value
flow module Define the current module. prodMjob Y
flow compId Define the component's id used to store the lookup data. If the lookup field is inside an edittable, please use the id of the edittable. mainFooter_proId N mainfooter
flow skipModule Define the module that must included in data source. pro N
flow extend Indicate if the current element is the extension of any existing element. false N false
flow disablePro If true and target module set to current module in [Business Process Setup (Production)], <Allow Product/Material in Data Destination without Data Source> will be false and disabled. false N false
flow proCompId Define the component's id used to store the lookup data. If the product field is not on the same table as the source document field, you need to set it. mainFooter_proId N mainfooter
item sourceType Define the source transaction type. oldqu Y
item mess Define the messCode to describe the source transaction type. ce01_trdg.salesQu N =sourceType的mess
item moduleLookupType Define the lookup type used for the source transaction. multiqu Y
item moduleField Define the lookup field used for the source transaction. jobId N sourceId
item midLookupType Define the lookup type used for the midField. prodJobMulti N
item midField Define the lookup field used for the middle transaction.For example, [Shop Floor Material Pickingt] reads [Work Process Dispatch Note], and the middle layer lookup is [Job Order], so it is set to jobId. jobId N
item keyLookupType key field的lookup type sofooter Y
item singleFlowType Indicate if same source type can only assigned to one module in the same business flow setting. true N false
item loadDataHelper Define the handler used when retrieving data from source transaction. TradeOSHelper N
item checkFlowType Need to check the business process false N true
item loadOutstanding Indicate if outstanding quantity should be loaded. true N false
item loadDisc Indicate if discount or charge should be loaded. true N false
item loadRemarks Indicate if remarks should be loaded. true N false
item useOrigin Indicate if price origin and description origin should be used. true N false
item skipCheckLoad If false, when open the source transaction, if it has been loaded to the module in flow, the transaction is prohibited from changing the customer/vendor/business flow/currency/rate. true N false
item checkSFFlag Indicate if source transaction can be deleted if used in the the current module. p:Representative purchased QC function N
item checkFK Define the SF that determines if this transaction type is available true N true

# fkCheck

# Usage

Define a foreign key check for a source document and a target document.

# Attributes

element attribute Description Example Required Default Value
checker module Define the current module. prodPdn Y
checker extend Indicate if the current element is the extension of any existing element. false N false
item checkId Check project name prodPdn_prodPw_proId Y
item srcTable Source table name prodpdnt Y
item refTable Target table name prodpwt Y
item chkKeyCol Source field name hId;proId;lot Y
item refKeyCol Target field name sourceId;proId;sourceLot Y
item keyField Source document field name of the target document sourceId Y
item chkField The source document corresponds to the field name of the header table. hId Y
item refField The target document corresponds to the field name of the header table. hId Y
item chkCond Conditions of the source document footer table. N
item refCond Conditions of the target document footer table. b.sourceType in ('prodPdn') N
item refMainTable The header table name of the target document prodmainpw Y
item refMainKeyCol The code field name of the target document code Y
item refMainField The id field name of the target document id Y
item refMainCond Conditions of the target document header table. N

# prodOriginSetting

# Usage

The default configuration of the process price setting in [Preference Setup (Trade)].

# Attributes

element attribute Description Example Required Default Value
processPrice module Define the module name. pdcoreSjob Y
processPrice defValue Define the default value for the price origin. PROCESSLAST N
processPrice display Indicate if price origin should be shown. false N true
processPrice extend Indicate if the current element is the extension of any existing element. ture N false
option origin Define the name of rht price origin. SQUPROCESS Y
option ejbClass Define the EJB class to handle the origin setting. N
option ejbMethod Define the method in ejbClass to handle the origin setting. N
option label Define messCode displayed for the option. N
option priority Define the priority of the options. 1 N 0
option nonApproved Indicate if non-approved record should be considered. true N false

# moduleStatus

# Usage

The option of [User Defined Status Setup] defines the state that a module can be configured.

# Attributes

element attribute Description Example Required Default Value
module name Define the module name. oldso Y
module extend Indicate if the current element is the extension of any existing element. ture N false
optionField fieldName 'Display in Field' field name shipedStatus Y
optionField fieldMess 'Display in Field' field label ce01_trdg.shipedStatus Y
optionField defaultUpdateMethod Default status update method autoUpdate N
optionField extend Indicate if the current element is the extension of any existing element. ture N false
optionStatus statusName Status Code notYetDelivered Y
optionStatus statusMess Status Name ce01_trdg.notYetDelivered Y
optionStatus infoMess Status Condition ce01_trdg.notYetDeliveredInfo N
optionStatus moduleStatusHelper State processing interface SOShipmentStatus Y
optionStatus refModules Relevant Modules oldso,dn,siso Y
optionStatus udfComboPattern The pattern name of 'Extended Option'. trdg_soShipmentOption Y
optionStatus defaultOrder Priority for sorting the status 30 Y
optionStatus defaultModuleFilter Module filter condition N
optionStatus extend Indicate if the current element is the extension of any existing element. ture N false

# prqGenSetting

# Usage

Target module configuration of [MRP Generation].

# Attributes

element attribute Description Example Required Default Value
module name Define the module name. oldso Y
module menuParam The module parameter is used to filter the parameters displayed by the target module. prod N pur
module genFooterName The footer table name of target module. pot N The footer table name of the target module
module extend Indicate if the current element is the extension of any existing element. ture N false
optionField fieldName Module Option Setting: field name virDeptId Y
optionField fieldMess Module Option Setting: field label ce01_core.virDept Y
optionField editType Module Option Setting: field type lookupField Y
optionField pattern Module Option Setting: field pattern core_virDept Y
optionField showCond Module Option Setting: visible var.enableVirDept N
optionField requiredCond Module Option Setting: required var.enableVirDept N
optionField expired Module Option Setting: expired true N false
optionField extend Indicate if the current element is the extension of any existing element. ture N false
showField fieldName Footer table: field name virDeptId Y
showField fieldMess Footer table: field label ce01_core.virDept Y
showField editType Footer table: field type cawLookup Y
showField pattern Footer table: field pattern core_virDept Y
showField fieldClass Footer table: java type Long N
showField showAfter Footer table: the current field is placed after the set field virDeptId N
showField showCond Footer table: visible var.enableVirDept N
showField readonlyCond Footer table: read only false N
showField requiredCond Footer table: required var.enableVirDept N
showField expired expired true N
showField footerField Whether it is the footer table field (when the same name as the header table) true N false
showField batchUpdate Whether the field supports batch update true N false
showField extend Indicate if the current element is the extension of any existing element. ture N false