recuperados cambios de rama antigua

This commit is contained in:
jaimejimenezortega
2024-04-14 20:55:38 +02:00
parent 5c298bfc78
commit f5262ac77e
12 changed files with 102 additions and 112 deletions

View File

@ -1469,15 +1469,18 @@ class PresupuestoService extends BaseService
// Si el presupuesto no es duplicado, se comprueba que
// no ha cambiado el precio unidad
if(round($nueva_tarifa[0]->precio_unidad, 2) != $servicio->precio_unidad ||
$nueva_tarifa[0]->margen != $servicio->margen){
$nueva_tarifa[0]->margen != $servicio->margen ||
$nueva_tarifa[0]->tiempo != $servicio->tiempo){
$servicio->precio_unidad = round($nueva_tarifa[0]->precio_unidad, 2);
$servicio->tiempo = round($nueva_tarifa[0]->tiempo, 2);
$servicio->precio_total = round($nueva_tarifa[0]->total, 2);
$servicio->margen = round($nueva_tarifa[0]->margen);
$cambio = true;
}
else if($input_data['is_duplicado'] && $nueva_tarifa[0]->proveedor_id != $servicio->proveedor_id){
$servicio->precio_unidad = round($nueva_tarifa[0]->precio_unidad, 2);
$servicio->tiempo = round($nueva_tarifa[0]->tiempo, 2);
$servicio->precio_total = round($nueva_tarifa[0]->total, 2);
$servicio->margen = round($nueva_tarifa[0]->margen);
$servicio->proveedor = $nueva_tarifa[0]->proveedor;