Merge pull request 'fixes bug#AL-4905' (!761) from AL-4905 into master

Reviewed-on: adm/VentaBoletosAdm#761
Reviewed-by: Lucas Taiã <lucas@rjconsultores.com.br>
Reviewed-by: fabio <fabio.faria@rjconsultores.com.br>
master 1.152.3
Lucas Taiã 2024-10-07 21:32:18 +00:00
commit 224fa5c85c
2 changed files with 10 additions and 3 deletions

View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>br.com.rjconsultores</groupId>
<artifactId>ventaboletosadm</artifactId>
<version>1.152.2</version>
<version>1.152.3</version>
<packaging>war</packaging>
<properties>

View File

@ -605,7 +605,9 @@ public class EditarPricingController extends PricingController {
if (pricing.getIndreservable() == Boolean.FALSE) {
rdReserNo.setChecked(true);
}
if (pricing.getDescuentoporcentaje() != null) {
boolean isDescPorcentagem = isDescPorcentagem();
if (isDescPorcentagem) {
radioPor.setChecked(true);
}
@ -618,7 +620,7 @@ public class EditarPricingController extends PricingController {
chkIndSafer.setChecked(pricing.getIndSafer());
}
if (lsPricingImporte.size() > 0) {
if (!isDescPorcentagem) {
radioImp.setChecked(true);
onClick$radioImp(null);
} else {
@ -736,6 +738,11 @@ public class EditarPricingController extends PricingController {
}
}
private boolean isDescPorcentagem() {
return (pricing.getDescuentoporcentaje() != null || pricing.getDescuentoporcredondo() != null)
&& (lsPricingImporte == null || lsPricingImporte.isEmpty() || lsPricingImporte.size() < 0);
}
private void incluirCategoria(Categoria categoria) {
if (categoria != null && verificarCategoriaNaoAdicionada(categoria)) {
PricingCategoria pc = new PricingCategoria();