<?xml version="1.0" encoding="UTF-8"?>
<domain-models xmlns="http://axelor.com/xml/ns/domain-models"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://axelor.com/xml/ns/domain-models http://axelor.com/xml/ns/domain-models/domain-models_5.2.xsd">

  <module name="bank-payment" package="com.axelor.apps.bankpayment.db"/>

  <entity name="BankOrderFileFormat" lang="java" sequential="true">
  
  	<integer name="orderTypeSelect" title="Order Type" selection="bankpayment.bank.order.type.select"/>
  	<string name="orderFileFormatSelect" title="File format" selection="bankpayment.order.file.format.select"/>
	<string name="name" title="Name"/>
	<string name="description" title="Description" large="true" multiline="true"/>
	<boolean name="fileGenerationSupported" title="File generation supported"/>
	  
	<string name="bankDetailsTypeSelect" title="Accepted Bank Details Identifiers" selection="base.bank.bank.details.type.select"/>
	
	<boolean name="ibanOnly" title="Use iban only"/>
	
	<many-to-one name="currency" ref="com.axelor.apps.base.db.Currency" title="Default Currency"/>

	<boolean name="allowOrderCurrDiffFromBankDetails" title="Allow orders with a transfer currency different from bank details currency" default="false"/>

    <!-- 	 AFB320 -->
	<string name="qualifyingOfDate" title="Qualifying of date"/>
      <string name="qualifyingOfAmountSelect" title="Qualifying of amount" selection="bankpayment.bank.order.ff.qualifying.amount.select" default="T"/>
	<boolean name="isMultiDate" title="Multidate"/>
	<boolean name="isMultiCurrency" title="Multicurrency"/>
    <integer name="orderDebitTypeSelect" title="Order debit type" selection="bankpayment.order.debit.type.select" nullable="true" />

  	<boolean name="displayAdditionnalInformations" title="Display additional information"/>
	
  	<boolean name="displayBankOrderEconomicReason" title="Display economic reason"/>
	<many-to-one name="bankOrderEconomicReason" ref="com.axelor.apps.bankpayment.db.BankOrderEconomicReason" title="Default economic reason" index="idx_bankpayment_bank_order_file_format_economic_reason"/>
	
	<boolean name="displayReceiverCountry" title="Display receiver country"/>
  	<many-to-one name="receiverCountry" ref="com.axelor.apps.base.db.Country" title="Default receiver country"/>
	
  	<boolean name="displayPaymentModeSelect" title="Display payment mode"/>
  	<integer name="paymentModeSelect" title="Default payment Mode" selection="bankpayment.bank.order.line.payment.mode.select"/>
  	
  	<boolean name="displayFeesImputationModeSelect" title="Display fees imputation"/>
  	<integer name="feesImputationModeSelect" title="Default fees imputation" selection="bankpayment.bank.order.line.fees.imputation.mode.select"/>
  	
	<boolean name="displayFurtherInformations" title="Display further information"/>
	
	<boolean name="displayReceiverAddress" title="Display receiver address"/>
	<one-to-many name="bankOrderFileFormatCountryList" ref="com.axelor.apps.bankpayment.db.BankOrderFileFormatCountry" title="Config. per country" mappedBy="bankOrderFileFormat"/>
  	
	 
 	<extra-code><![CDATA[
	
	   	// BANK ORDER FILE FORMAT SELECT
		public static final String FILE_FORMAT_PAIN_001_001_02_ICT = "pain.001.001.02.ict";
		public static final String FILE_FORMAT_PAIN_001_001_02_MCT = "pain.001.001.02.mct";
		public static final String FILE_FORMAT_PAIN_001_001_02_RFT = "pain.001.001.02.rft";
		public static final String FILE_FORMAT_PAIN_001_001_02_SCT = "pain.001.001.02.sct";
		public static final String FILE_FORMAT_PAIN_001_001_02_XCT = "pain.001.001.02.xct";
		public static final String FILE_FORMAT_PAIN_001_001_03_SCT = "pain.001.001.03.sct";
		public static final String FILE_FORMAT_PAIN_008_001_01_SBB = "pain.008.001.01.sbb";
		public static final String FILE_FORMAT_PAIN_008_001_01_SDD = "pain.008.001.01.sdd";
		public static final String FILE_FORMAT_PAIN_008_001_02_SBB = "pain.008.001.02.sbb";
		public static final String FILE_FORMAT_PAIN_008_001_02_SDD = "pain.008.001.02.sdd";
		public static final String FILE_FORMAT_PAIN_FIN_MT101_DCT = "pain.fin.mt101.dct";
		public static final String FILE_FORMAT_PAIN_FIN_MT101_MCT = "pain.fin.mt101.mct";
		public static final String FILE_FORMAT_PAIN_XXX_CFONB160_DCO = "pain.xxx.cfonb160.dco";
		public static final String FILE_FORMAT_PAIN_XXX_CFONB160_DCT = "pain.xxx.cfonb160.dct";
		public static final String FILE_FORMAT_PAIN_XXX_CFONB160_DDA = "pain.xxx.cfonb160.dda";
		public static final String FILE_FORMAT_PAIN_XXX_CFONB160_DDD = "pain.xxx.cfonb160.ddd";
		public static final String FILE_FORMAT_PAIN_XXX_CFONB160_DTG = "pain.xxx.cfonb160.dtg";
		public static final String FILE_FORMAT_PAIN_XXX_CFONB160_DVD = "pain.xxx.cfonb160.dvd";
		public static final String FILE_FORMAT_PAIN_XXX_CFONB160_ICT = "pain.xxx.cfonb160.ict";
		public static final String FILE_FORMAT_PAIN_XXX_CFONB240_BCO = "pain.xxx.cfonb240.bco";
		public static final String FILE_FORMAT_PAIN_XXX_CFONB240_TCH = "pain.xxx.cfonb240.tch";
		public static final String FILE_FORMAT_PAIN_XXX_CFONB320_RFT = "pain.xxx.cfonb320.rft";
		public static final String FILE_FORMAT_PAIN_XXX_CFONB320_XCT = "pain.xxx.cfonb320.xct";
		public static final String FILE_FORMAT_PAIN_XXX_FFF_LCH = "pain.xxx.fff.lch";
		public static final String FILE_FORMAT_PAIN_XXX_FFF_ECH = "pain.xxx.fff.ech";
		public static final String FILE_FORMAT_PAIN_XXX_PAYEXT912_VCT = "pain.xxx.payext912.vct";
		public static final String FILE_FORMAT_PAIN_XXX_PAYEXT96A_VCT = "pain.xxx.payext96a.vct";
		public static final String FILE_FORMAT_PAIN_XXX_PAYORD912_ICT = "pain.xxx.payord912.ict";
		public static final String FILE_FORMAT_PAIN_XXX_VCOM400_VCT = "pain.xxx.vcom400.vct";

        // ORDER DEBIT TYPE SELECT
        public static final int ORDER_DEBIT_TYPE_ORDER_OVERALL_DEBIT = 1;
        public static final int ORDER_DEBIT_TYPE_UNIT_DEBIT_BY_OPERATION = 2;
        public static final int ORDER_DEBIT_TYPE_OVERALL_DEBIT_BY_TRANSFER_CURRENCY = 3;

        // QUALIFYING AMOUNT SELECT
        public static final String QUALIFYING_AMOUNT_TRANSFER_CURRENCY = "T";
        public static final String QUALIFYING_AMOUNT_SENDER_BANK_DETAILS_CURRENCY = "D";
	]]></extra-code>

  </entity>

</domain-models>
