From 95e153adbb1b54f0d826818328d640fb3afd1678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Jim=C3=A9nez?= Date: Fri, 30 May 2025 17:41:55 +0200 Subject: [PATCH] =?UTF-8?q?a=C3=B1adido=20mensaje=20cuando=20es=20un=20dup?= =?UTF-8?q?licado?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ci4/app/Services/PresupuestoService.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/ci4/app/Services/PresupuestoService.php b/ci4/app/Services/PresupuestoService.php index 38ad683e..a4294cf4 100755 --- a/ci4/app/Services/PresupuestoService.php +++ b/ci4/app/Services/PresupuestoService.php @@ -2131,7 +2131,17 @@ class PresupuestoService extends BaseService if($pedido_linea){ $text = "REIMPRESION [" . date('Y-m-d H:i:s') . "] - PEDIDO: " . $pedido_linea->pedido_id . "\n================================================\n"; - $presupuesto->comentarios_safekat = $presupuesto->comentarios_safekat . $text; + $presupuesto->comentarios_safekat = $text . $presupuesto->comentarios_safekat ; + } + } + else if($is_reimpresion){ + $presupuesto->inc_rei = null; + $modelPedidoLinea = model('App\Models\Pedidos\PedidoLineaModel'); + $pedido_linea = $modelPedidoLinea->where('presupuesto_id', $id)->first(); + if($pedido_linea){ + $text = "DUPLICADO [" . date('Y-m-d H:i:s') . "] - PEDIDO: " . $pedido_linea->pedido_id . + "\n================================================\n"; + $presupuesto->comentarios_safekat = $text . $presupuesto->comentarios_safekat; } } else{