<?xml version="1.0" encoding="UTF-8"?>
<csv-inputs xmlns="http://axelor.com/xml/ns/data-import"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://axelor.com/xml/ns/data-import http://axelor.com/xml/ns/data-import/data-import_5.2.xsd">
  	
  	<input file="base_appSale.csv" separator=";" type="com.axelor.apps.base.db.AppSale" search="self.code = :code" update="true" />
  	
	<input file="base_sequence.csv" separator=";" type="com.axelor.apps.base.db.Sequence" search="self.importId = :importId" call="com.axelor.csv.script.SequenceScript:computeFullname">
    	<bind to="yearlyResetOk" column="yearlyResetOk" eval="yearlyResetOk == '1' ? true : false"/>
    	<bind to="nextNum" column="nextNum" eval="nextNum?.empty ? '1' : nextNum"/>
    	<bind to="padding" column="padding" eval="padding?.empty ? '1' : padding"/>
    	<bind to="toBeAdded" column="toBeAdded" eval="toBeAdded?.empty ? '1' : toBeAdded"/>
    	<bind to="resetDate" eval="call:com.axelor.apps.base.service.app.AppBaseService:getTodayDate()" />
    </input>

	<input file="sale_cancelReason.csv" separator=";" type="com.axelor.apps.base.db.CancelReason">
		<bind to="freeText" eval="freeText == 'true' ? true : false" />
		<bind to="applicationType" eval="'com.axelor.apps.sale.db.SaleOrder'"/>
	</input>
	
	<input file="sale_saleBatch.csv" separator=";" type="com.axelor.apps.sale.db.SaleBatch" />
	
	<input file="sale_saleConfig.csv" separator=";" type="com.axelor.apps.sale.db.SaleConfig"  search="self.importId = :importId"/>
	
	<input file="sale_saleOrder.csv" separator=";" search="self.importId = :importId" type="com.axelor.apps.sale.db.SaleOrder">
		<bind to="creationDate" eval="call:com.axelor.csv.script.ImportDateTime:importDate(creationDate)" column="creationDate"/>
		<bind to="confirmationDateTime" eval="call:com.axelor.csv.script.ImportDateTime:importDateTime(confirmationDateTime)" column="confirmationDateTime"/>
		<bind to="shipmentDate" eval="call:com.axelor.csv.script.ImportDateTime:importDate(shipmentDate)" column="shipmentDate"/>
	</input>
	
	<input file="sale_saleOrderLine.csv" separator=";"  type="com.axelor.apps.sale.db.SaleOrderLine" search="self.importId = :importId" call="com.axelor.csv.script.ImportSaleOrderLine:importSaleOrderLine">
		<bind to="priceDiscounted" eval="price" />
	</input>
	
	<input file="sale_saleOrder.csv" separator=";" search="self.importId = :importId" type="com.axelor.apps.sale.db.SaleOrder" call="com.axelor.csv.script.ImportSaleOrder:importSaleOrder">
        <bind to="creationDate" eval="call:com.axelor.csv.script.ImportDateTime:importDate(creationDate)" column="creationDate"/>
        <bind to="confirmationDateTime" eval="call:com.axelor.csv.script.ImportDateTime:importDateTime(confirmationDateTime)" column="confirmationDateTime"/>
        <bind to="shipmentDate" eval="call:com.axelor.csv.script.ImportDateTime:importDate(shipmentDate)" column="shipmentDate"/>
	</input>
	
	<input file="base_template.csv" separator=";" type="com.axelor.apps.message.db.Template" search="self.name = :name" >
		<bind to="language" search="self.code = :languageCode"/>
	</input>
	
</csv-inputs>