mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-03-01 14:19:14 +00:00
trabajando2
This commit is contained in:
@ -271,7 +271,7 @@ public class PedidoService {
|
||||
Integer counter = 1;
|
||||
for (PedidoLinea linea : lineas) {
|
||||
if (linea.getEstado() == Estado.pendiente_pago
|
||||
|| linea.getEstado() == Estado.denegado_pago) {
|
||||
|| linea.getEstado() == Estado.denegado_pago || linea.getEstado() == Estado.procesando_pago) {
|
||||
|
||||
Presupuesto presupuesto = linea.getPresupuesto();
|
||||
linea.setEstado(getEstadoInicial(presupuesto));
|
||||
@ -311,6 +311,7 @@ public class PedidoService {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Transactional
|
||||
public Map<String, Object> actualizarEstado(Long pedidoLineaId, Locale locale) {
|
||||
|
||||
PedidoLinea pedidoLinea = pedidoLineaRepository.findById(pedidoLineaId).orElse(null);
|
||||
@ -327,8 +328,8 @@ public class PedidoService {
|
||||
"message", messageSource.getMessage("pedido.errors.cannot-update", null, locale));
|
||||
}
|
||||
|
||||
// Rango: >= haciendo_ferro y < enviado
|
||||
if (estadoOld.getPriority() < PedidoLinea.Estado.haciendo_ferro.getPriority()
|
||||
// Rango: >= procesando_pedido y < enviado
|
||||
if (estadoOld.getPriority() < PedidoLinea.Estado.procesando_pedido.getPriority()
|
||||
|| estadoOld.getPriority() >= PedidoLinea.Estado.enviado.getPriority()) {
|
||||
return Map.of(
|
||||
"success", false,
|
||||
@ -788,7 +789,7 @@ public class PedidoService {
|
||||
if (presupuestoService.hasMaquetacion(p)) {
|
||||
return Estado.maquetacion;
|
||||
} else {
|
||||
return Estado.haciendo_ferro;
|
||||
return Estado.procesando_pedido;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user