añadidos presupuestos en cliente

This commit is contained in:
2025-03-31 20:42:14 +02:00
parent fb2d12e318
commit 3cb512d93a
14 changed files with 497 additions and 84 deletions

View File

@ -10,7 +10,6 @@ use App\Services\PedidoXMLService;
use App\Services\ProductionService;
use Hermawan\DataTables\DataTable;
use CodeIgniter\I18n\Time;
use Error;
class Pedido extends \App\Controllers\BaseResourceController
{
@ -382,13 +381,13 @@ class Pedido extends \App\Controllers\BaseResourceController
$q = $this->model->getPedidosClienteForm($clienteId);
/*$searchValue = $this->request->getGet('fecha') ?? '';
$searchValue = $this->request->getGet('fecha') ?? '';
if (!empty($searchValue)) {
// Extraer las fechas del formato "YYYY-MM-DD|YYYY-MM-DD"
$dates = explode('|', $searchValue);
if (count($dates) == 2) {
$q->where('created_at >=', $dates[0] . ' 00:00:00')
->where('created_at <=', $dates[1] . ' 23:59:59');
$q->where('p.created_at >=', $dates[0] . ' 00:00:00')
->where('p.created_at <=', $dates[1] . ' 23:59:59');
}
}
$searchValue = $this->request->getGet('fecha_entrega') ?? '';
@ -396,10 +395,10 @@ class Pedido extends \App\Controllers\BaseResourceController
// Extraer las fechas del formato "YYYY-MM-DD|YYYY-MM-DD"
$dates = explode('|', $searchValue);
if (count($dates) == 2) {
$q->where('fecha_entrega_real >=', $dates[0] . ' 00:00:00')
->where('fecha_entrega_real <=', $dates[1] . ' 23:59:59');
$q->where('p.fecha_entrega_real >=', $dates[0] . ' 00:00:00')
->where('p.fecha_entrega_real <=', $dates[1] . ' 23:59:59');
}
}*/
}
$result = DataTable::of($q)