<?php
 $filters=$S['balanceInvoices']['supplier']; $filtersOK=1; $filters['invoiceStartDateMysql']=standard2mysqlDateConversion($filters['invoiceStartDate']); $filters['invoiceEndDateMysql']=standard2mysqlDateConversion($filters['invoiceEndDate']); if (!$filters['invoiceStartDateMysql'] or !$filters['invoiceEndDateMysql']) { $filtersOK=0; $showMessage['warning']=$_LANG['invoices']['balanceInvoices']['supplierInvoiceList']['warnings']['mandatoryInterval']; } if ($filters['invoiceStartDateMysql'] and $filters['invoiceEndDateMysql']) { if ($filters['invoiceStartDateMysql']>$filters['invoiceEndDateMysql']) { $filtersOK=0; $showMessage['warning']=$_LANG['invoices']['balanceInvoices']['supplierInvoiceList']['warnings']['invoiceStartDateAfterEndDate']; } } $filters['dueStartDateMysql']=standard2mysqlDateConversion($filters['dueStartDate']); $filters['dueEndDateMysql']=standard2mysqlDateConversion($filters['dueEndDate']); if ($filters['dueStartDateMysql'] and $filters['dueEndDateMysql']) { if ($filters['dueStartDateMysql']>$filters['dueEndDateMysql']) { $filtersOK=0; $showMessage['warning']=$_LANG['invoices']['balanceInvoices']['supplierInvoiceList']['warnings']['dueStartDateAfterEndDate']; } } $filters['serviceStartDateMysql']=standard2mysqlDateConversion($filters['serviceStartDate']); $filters['serviceEndDateMysql']=standard2mysqlDateConversion($filters['serviceEndDate']); if ($filters['serviceStartDateMysql'] and $filters['serviceEndDateMysql']) { if ($filters['serviceStartDateMysql']>$filters['serviceEndDateMysql']) { $filtersOK=0; $showMessage['warning']=$_LANG['invoices']['balanceInvoices']['supplierInvoiceList']['warnings']['serviceStartDateAfterEndDate']; } } $resp=explode('|', $filters['invoiceIdOfficeUser']); $filters['invoiceIdOffice']=$resp[0]; $filters['invoiceIdUser']=$resp[1]; $supp=explode('|', $filters['idSupplierAndService']); $filters['idSupplier']=$supp[0]; $filters['idSupplierService']=$supp[1]; $filters['extResDateMysql']=standard2mysqlDateConversion($filters['extResDate']); $sts=explode('|', $filters['status']); $filters['statusOp']=$sts[0]; $filters['statusFin']=$sts[1]; $dest=explode('|', $filters['idDestination']); $filters['destinationCountryCode']=$dest[0]; $filters['destinationCityId']=$dest[1]; if (!$filtersOK) { $OK=0; } ?>