mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
añadido fijo de lomo interior en las funciones getcostelinea y getcostelinearotativa
This commit is contained in:
@ -412,6 +412,7 @@ class Presupuestocliente extends \App\Controllers\BaseResourceController
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$lomo = round($lomo, 2);
|
||||
$errors = [
|
||||
'status' => 0,
|
||||
|
||||
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
namespace App\Database\Migrations;
|
||||
|
||||
use CodeIgniter\Database\Migration;
|
||||
|
||||
class AumentoLomoFijo extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
$this->db->table('config_variables_app')->insert([
|
||||
'name' => 'aumento_fijo_lomo_interior',
|
||||
'value' => '1.3',
|
||||
'description' => 'Aumento fijo del lomo interior por cola (se añade en el interior)',
|
||||
'created_at' => date('Y-m-d H:i:s')
|
||||
]);
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
// Borrar los nuevos campos
|
||||
$this->db->table('config_variables_app')->whereIn('name', [
|
||||
'aumento_fijo_lomo_interior'
|
||||
])->delete();
|
||||
}
|
||||
}
|
||||
@ -386,6 +386,7 @@ class PresupuestoService extends BaseService
|
||||
$precio_pedido = $precio_libro * ($datosPedido->tirada + $datosPedido->merma);
|
||||
|
||||
$mano = PresupuestoService::computeLomoInterior($datosPedido->paginas, $papel_impresion->espesor);
|
||||
$mano += floatval(model('App\Models\Configuracion\ConfigVariableModel')->getVariable('aumento_fijo_lomo_interior')->value);
|
||||
|
||||
// peso
|
||||
$peso = PresupuestoService::computePeso(
|
||||
@ -515,6 +516,7 @@ class PresupuestoService extends BaseService
|
||||
$data['total_corte'] = round(($data['tiempo_corte'] / 60.0) * $maquina->precio_hora_corte, 2);
|
||||
|
||||
$data['mano'] = PresupuestoService::computeLomoInterior($datosPedido->paginas, $papel_impresion->espesor);
|
||||
$data['mano'] += floatval(model('App\Models\Configuracion\ConfigVariableModel')->getVariable('aumento_fijo_lomo_interior')->value);
|
||||
// ($paginas / 2.0) * (($gramaje / 1000.0) * $papel_compra->mano);
|
||||
|
||||
// peso
|
||||
|
||||
Reference in New Issue
Block a user