mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
Merge branch 'main' into 'mod/tarifas_clientes'
Main See merge request jjimenez/safekat!422
This commit is contained in:
@ -298,13 +298,24 @@ class Papelesgenericos extends \App\Controllers\BaseResourceController
|
||||
{
|
||||
if ($this->request->isAJAX()) {
|
||||
|
||||
$tirada = goSanitize($this->request->getGet('tirada'))[0] ?? null;
|
||||
$POD = null;
|
||||
if($tirada != null){
|
||||
$POD_value = model('App\Models\Configuracion\ConfiguracionSistemaModel')->getPOD();
|
||||
if(intval($tirada) <= intval($POD_value)){
|
||||
$POD = true;
|
||||
}
|
||||
else{
|
||||
$POD = false;
|
||||
}
|
||||
}
|
||||
$tipo = goSanitize($this->request->getGet('tipo'))[0];
|
||||
$selected_papel = goSanitize($this->request->getGet('papel'))[0] ?? null;
|
||||
$cubierta = goSanitize($this->request->getGet('cubierta'))[0] ?? 0;
|
||||
$tapa_dura = goSanitize($this->request->getGet('tapa_dura'))[0] ?? null;
|
||||
|
||||
$menu = $this->model->getPapelCliente($tipo, $cubierta, $selected_papel, $tapa_dura, false);
|
||||
$menu2 = $this->model->getPapelCliente($tipo, $cubierta, $selected_papel, $tapa_dura, true);
|
||||
$menu = $this->model->getPapelCliente($tipo, $cubierta, $selected_papel, $tapa_dura, false, $POD);
|
||||
$menu2 = $this->model->getPapelCliente($tipo, $cubierta, $selected_papel, $tapa_dura, true, $POD);
|
||||
|
||||
$newTokenHash = csrf_hash();
|
||||
$csrfTokenName = csrf_token();
|
||||
@ -325,10 +336,21 @@ class Papelesgenericos extends \App\Controllers\BaseResourceController
|
||||
|
||||
if ($this->request->isAJAX()) {
|
||||
|
||||
$tirada = goSanitize($this->request->getGet('tirada'))[0] ?? null;
|
||||
$POD = null;
|
||||
if($tirada != null){
|
||||
$POD_value = model('App\Models\Configuracion\ConfiguracionSistemaModel')->getPOD();
|
||||
if(intval($tirada) <= intval($POD_value)){
|
||||
$POD = true;
|
||||
}
|
||||
else{
|
||||
$POD = false;
|
||||
}
|
||||
}
|
||||
$tipo = goSanitize($this->request->getGet('tipo'))[0];
|
||||
$cubierta = goSanitize($this->request->getGet('cubierta'))[0] ?? 0;
|
||||
|
||||
$items = $this->model->getPapelCliente($tipo, $cubierta, null, true);
|
||||
$items = $this->model->getPapelCliente($tipo, $cubierta, null, true, $POD);
|
||||
$items = array_map(function ($item) {
|
||||
return [
|
||||
'id' => $item->id,
|
||||
|
||||
@ -522,6 +522,11 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
||||
'a_favor_fibra' => 1,
|
||||
);
|
||||
|
||||
// Para POD siempre es HQ
|
||||
if ($tirada[0] <= $POD) {
|
||||
$isHq = true;
|
||||
}
|
||||
|
||||
$input_data = array(
|
||||
'uso' => 'interior',
|
||||
'tipo_impresion_id' => $tipo_impresion_id,
|
||||
@ -1509,6 +1514,11 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
||||
$info['merma'] = $datosPedido->merma;
|
||||
}
|
||||
|
||||
// Para POD siempre es HQ
|
||||
if ($tirada[$t] <= $POD) {
|
||||
$isHq = true;
|
||||
}
|
||||
|
||||
$input_data = array(
|
||||
'uso' => 'interior',
|
||||
'tipo_impresion_id' => $tipo_impresion_id,
|
||||
|
||||
Reference in New Issue
Block a user