terminado

This commit is contained in:
2025-04-30 20:23:45 +02:00
parent 0ec7dff479
commit 9181905233
6 changed files with 106 additions and 39 deletions

View File

@ -239,6 +239,8 @@ class ImportadorCatalogo extends BaseResourceController
'lomoRedondo' => 0
],
'ivaReducido' => 1,
'guardas' => [],
'sobrecubierta' => $sobrecubierta,
//'faja' => null,
@ -284,7 +286,9 @@ class ImportadorCatalogo extends BaseResourceController
$respuesta_ajuste = PresupuestoService::ajustarPresupuesto(
$response['data']['sk_id'],
$precio_compra,
$tirada
$tirada,
null,
true
);
if ($respuesta_ajuste['warning'] == true) {
$response['price_warning'] = [
@ -293,6 +297,10 @@ class ImportadorCatalogo extends BaseResourceController
];
}
// confirmar y crear pedido y ot
model('App\Models\Presupuestos\PresupuestoModel')->confirmarPresupuesto($response['data']['sk_id']);
PresupuestoService::crearPedido($response['data']['sk_id']);
return $this->respond($response);
} catch (\Exception $e) {