This commit is contained in:
Lizandro Guarnizo
2026-01-18 13:14:59 -05:00
parent c358774862
commit e248b62a43
5 changed files with 160 additions and 5 deletions
+5
View File
@@ -125,6 +125,11 @@ class OrdenProduccion extends Model
$orden->numero_orden = 'OP-' . str_pad($ultimoId, 6, '0', STR_PAD_LEFT);
}
// Fecha de inicio por defecto hoy
if (! isset($orden->fecha_inicio) || ! $orden->fecha_inicio) {
$orden->fecha_inicio = now()->toDateString();
}
});
// Validar y reservar tela al cambiar de estado a 'en_corte'