<?php

///////////////////////////////////////////////////////////////////////////////////////////////////
// Define each field of the current Entity - for each field you can set the following keys: ///////
// 'mandatory', 'invisible' and 'validation'. Use the '_special' field key code to allow adding ///
// extra validations that are not checked automatically. //////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////


// idSupplier
$CFG['globalEntity']['::SupplierContract']['idSupplier']['mandatory']=true;
$CFG['globalEntity']['::SupplierContract']['idSupplier']['invisible']=false;
$CFG['globalEntity']['::SupplierContract']['idSupplier']['validation']= ['minValue'=>1, 'type'=>'int'];

// serviceCode
$CFG['globalEntity']['::SupplierContract']['serviceCode']['mandatory']=false;
$CFG['globalEntity']['::SupplierContract']['serviceCode']['invisible']=false;
$CFG['globalEntity']['::SupplierContract']['serviceCode']['validation']= ['maxLength'=>2];

// contractNumber
$CFG['globalEntity']['::SupplierContract']['contractNumber']['mandatory']=true;
$CFG['globalEntity']['::SupplierContract']['contractNumber']['invisible']=false;
$CFG['globalEntity']['::SupplierContract']['contractNumber']['validation']= ['maxLength'=>50];

// contractDate
$CFG['globalEntity']['::SupplierContract']['contractDate']['mandatory']=true;
$CFG['globalEntity']['::SupplierContract']['contractDate']['invisible']=false;
$CFG['globalEntity']['::SupplierContract']['contractDate']['validation']= ['type'=>'date','maxValue'=>TODAY_ISO];

// contract type
$CFG['globalEntity']['::SupplierContract']['type']['mandatory']=false;
$CFG['globalEntity']['::SupplierContract']['type']['invisible']=false;
$CFG['globalEntity']['::SupplierContract']['type']['validation']= ['maxLength'=>20, 'list'=>$CFG['generalData']['contractTypes']];

// expireDate
$CFG['globalEntity']['::SupplierContract']['expireDate']['mandatory']=false;
$CFG['globalEntity']['::SupplierContract']['expireDate']['invisible']=false;
$CFG['globalEntity']['::SupplierContract']['expireDate']['validation']= ['type'=>'date'];

// responsible
$CFG['globalEntity']['::SupplierContract']['responsible']['mandatory']=false;
$CFG['globalEntity']['::SupplierContract']['responsible']['invisible']=false;
$CFG['globalEntity']['::SupplierContract']['responsible']['validation']= ['minValue'=>0,'type'=>'int'];

// content
$CFG['globalEntity']['::SupplierContract']['content']['mandatory']=false;
$CFG['globalEntity']['::SupplierContract']['content']['invisible']=false;
$CFG['globalEntity']['::SupplierContract']['content']['validation']=[];

// file name
$CFG['globalEntity']['::SupplierContract']['fileName']['mandatory']=false;
$CFG['globalEntity']['::SupplierContract']['fileName']['invisible']=false;
$CFG['globalEntity']['::SupplierContract']['fileName']['validation']= ['maxLength'=>250];

// file content
$CFG['globalEntity']['::SupplierContract']['fileContent']['mandatory']=false;
$CFG['globalEntity']['::SupplierContract']['fileContent']['invisible']=false;
$CFG['globalEntity']['::SupplierContract']['fileContent']['validation']=[];

