<?php
 $filters=$S['balanceInvoices']['client']; $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']['clientInvoicesList']['warnings']['noInvoicesInterval']; } if ($filters['invoiceStartDateMysql'] and $filters['invoiceEndDateMysql']) { if ($filters['invoiceStartDateMysql']>$filters['invoiceEndDateMysql']) { $filtersOK=0; $showMessage['warning']=$_LANG['invoices']['balanceInvoices']['clientInvoicesList']['warnings']['invoiceStartDateAfterEndDate']; } } if ($filters['clientType']!='corp' and $filters['clientType']!='cust') { $filters['clientType']=''; } $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']['clientInvoicesList']['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']['clientInvoicesList']['warnings']['servicesStartDateAfterEndDate']; } } $resp=explode('|', $filters['invoiceIdOfficeUser']); $filters['invoiceIdOffice']=$resp[0]; $filters['invoiceIdUser']=$resp[1]; $resList=explodeClean(",", $filters['idReservation']); foreach($resList as $thisRes) { $thisRes=trim($thisRes); if ($thisRes) $filters['idReservationsNormal'][]=\App\Utils\Db\TablesUtils::getInstance()->switchIdReservationConversion($thisRes, 'normal'); } if (!$filtersOK) { $OK=0; } ?>