<?xml version="1.0" ?>
<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="human-resource" package="com.axelor.apps.hr.db" />

	<entity name="LunchVoucherMgt" cacheable="true">

		<many-to-one name="company" ref="com.axelor.apps.base.db.Company" title="Company" />

		<many-to-one name="payPeriod" ref="com.axelor.apps.base.db.Period" title="Pay period" />
		<many-to-one name="leavePeriod" ref="com.axelor.apps.base.db.Period" title="Leave period" />

		<integer name="statusSelect" title="Status" selection="hrs.lunch.voucher.mgt.status.select" default="1" readonly="true" />
		<integer name="requestedLunchVouchers" title="Requested lunch vouchers on the period" readonly="true" />
		<integer name="totalLunchVouchers" title="Total lunch vouchers" readonly="true" />
		<integer name="givenLunchVouchers"
				 title="Given lunch vouchers on the period"
				 readonly="true"/>

		<decimal name="lunchVoucherWageShare" title="Lunch Voucher Wage Share" scale="2" precision="20" readonly="true" />
		<decimal name="lunchVoucherEmployersShare" title="Lunch Voucher Employer's Share" scale="2" precision="20" readonly="true" />

		<one-to-many name="lunchVoucherMgtLineList" ref="com.axelor.apps.hr.db.LunchVoucherMgtLine" title="Lunch Voucher Lines" mappedBy="lunchVoucherMgt" orphanRemoval="true" />

		<integer name="stockQuantityStatus" title="Stock quantity status" readonly="true" />
		<integer name="stockLineQuantity" title="Quantity" min="0"/>
		<string name="stockLineComment" title="Comment" large="true"/>

		<date name="exportDate" title="Export date" />
		<many-to-one name="csvFile" title="CSV" ref="com.axelor.meta.db.MetaFile" />

		<extra-code>
      	<![CDATA[
	  		public static final Integer STATUS_DRAFT = 1;
	  		public static final Integer STATUS_CALCULATED = 2;
	  		public static final Integer STATUS_VALIDATED = 3;
	  ]]>
      </extra-code>
      
	</entity>

</domain-models>
