Merge branch 'master' of local repository into AL-5060

master
Lucas 2024-10-07 18:34:47 -03:00
commit c6adc23be6
2 changed files with 10 additions and 3 deletions

View File

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

View File

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