<?php
 $filters=$S['balanceInvoices']['client']; $filtersOK=1; $filters['resStartDateMysql']=standard2mysqlDateConversion($filters['resStartDate']); $filters['resEndDateMysql']=standard2mysqlDateConversion($filters['resEndDate']); if (!$filters['resStartDateMysql'] or !$filters['resEndDateMysql']) { $filtersOK=0; $showMessage['warning']=$_LANG['invoices']['balanceInvoices']['clientServicesList']['filters']['noStartEndDate']; } if ($filters['resStartDateMysql'] and $filters['resEndDateMysql']) { if ($filters['resStartDateMysql']>$filters['resEndDateMysql']) { $filtersOK=0; $showMessage['warning']=$_LANG['invoices']['balanceInvoices']['clientServicesList']['filters']['resStartDateAfterEnd']; } } if (!$filters['idReservationType']) { $filters['idReservationType']=$CFG['balanceInvoices']['filters']['client']['idReservationType']; } if (!isset($filters['balanceStatus'])) { $filters['balanceStatus']=$CFG['balanceInvoices']['filters']['client']['balanceStatus']; } $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']['clientServicesList']['filters']['servStartDateAfterEnd']; } } $filters['ticketStartDateMysql']=standard2mysqlDateConversion($filters['ticketStartDate']); $filters['ticketEndDateMysql']=standard2mysqlDateConversion($filters['ticketEndDate']); if ($filters['ticketStartDateMysql'] and $filters['ticketEndDateMysql']) { if ($filters['ticketStartDateMysql']>$filters['ticketEndDateMysql']) { $filtersOK=0; $showMessage['warning']=$_LANG['invoices']['balanceInvoices']['clientServicesList']['filters']['ticketStartDateAfterEnd']; } } $resp=explode('|', $filters['resIdOfficeUser']); $filters['resIdOffice']=$resp[0]; $filters['resIdUser']=$resp[1]; $resp=explode('|', $filters['servIdOfficeUser']); $filters['servIdOffice']=$resp[0]; $filters['servIdUser']=$resp[1]; $filters['extResDateMysql']=standard2mysqlDateConversion($filters['extResDate']); list($filters['servIdSupplier'], $filters['servIdSupplierProduct'])=explode('|', $filters['servIdSupplierAndProduct']); $dest=explode('|', $filters['idDestination']); $filters['destinationCountryCode']=$dest[0]; $filters['destinationCityId']=$dest[1]; if (!$filtersOK) { $OK=0; } ?>