fixes bug #9105
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@71612 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
bc9fc3c3f7
commit
cabb03d65e
|
@ -37,7 +37,6 @@ import com.rjconsultores.ventaboletos.service.CuponSecretariaService;
|
||||||
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
||||||
import com.rjconsultores.ventaboletos.service.SecretariaEmpresaService;
|
import com.rjconsultores.ventaboletos.service.SecretariaEmpresaService;
|
||||||
import com.rjconsultores.ventaboletos.service.SecretariaService;
|
import com.rjconsultores.ventaboletos.service.SecretariaService;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.ApplicationProperties;
|
|
||||||
import com.rjconsultores.ventaboletos.utilerias.TraslaparUtil;
|
import com.rjconsultores.ventaboletos.utilerias.TraslaparUtil;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar;
|
||||||
|
@ -228,7 +227,7 @@ public class EditarSecretariaController extends MyGenericForwardComposer {
|
||||||
public void doAfterCompose(Component comp) throws Exception {
|
public void doAfterCompose(Component comp) throws Exception {
|
||||||
secretaria = (Secretaria) Executions.getCurrent().getArg().get("secretaria");
|
secretaria = (Secretaria) Executions.getCurrent().getArg().get("secretaria");
|
||||||
secretariaList = (MyListbox) Executions.getCurrent().getArg().get("secretariaList");
|
secretariaList = (MyListbox) Executions.getCurrent().getArg().get("secretariaList");
|
||||||
Boolean isMostraSerieSubserie = ApplicationProperties.getInstance().isSerieSubserieSecretaria();
|
// Boolean isMostraSerieSubserie = ApplicationProperties.getInstance().isSerieSubserieSecretaria();
|
||||||
if (secretaria.getSecretariaId() != null) {
|
if (secretaria.getSecretariaId() != null) {
|
||||||
lsSecretariaEmpresa = secretariaEmpresaService.buscarPorSecretaria(secretaria);
|
lsSecretariaEmpresa = secretariaEmpresaService.buscarPorSecretaria(secretaria);
|
||||||
} else {
|
} else {
|
||||||
|
@ -238,24 +237,13 @@ public class EditarSecretariaController extends MyGenericForwardComposer {
|
||||||
super.doAfterCompose(comp);
|
super.doAfterCompose(comp);
|
||||||
empresasList.setItemRenderer(new RenderSecretariaEmpresa());
|
empresasList.setItemRenderer(new RenderSecretariaEmpresa());
|
||||||
empresasList.setData(lsSecretariaEmpresa);
|
empresasList.setData(lsSecretariaEmpresa);
|
||||||
cuponSecretariaList.setItemRenderer(new RenderCuponSecretaria(isMostraSerieSubserie));
|
cuponSecretariaList.setItemRenderer(new RenderCuponSecretaria());
|
||||||
lsCuponSecretaria = new ArrayList<CuponSecretaria>();
|
lsCuponSecretaria = new ArrayList<CuponSecretaria>();
|
||||||
cuponSecretariaList.setData(lsCuponSecretaria);
|
cuponSecretariaList.setData(lsCuponSecretaria);
|
||||||
if (!isMostraSerieSubserie) {
|
|
||||||
rowSerieSubserie.setVisible(Boolean.FALSE);
|
|
||||||
rowValidaSerieSubserie.setVisible(Boolean.FALSE);
|
|
||||||
columnSerie.setVisible(Boolean.FALSE);
|
|
||||||
columnSubserieSerie.setVisible(Boolean.FALSE);
|
|
||||||
chkValidaSerieSubserie.setChecked(Boolean.FALSE);
|
|
||||||
txtSerie.getValue();
|
|
||||||
txtSubserie.getValue();
|
|
||||||
}
|
|
||||||
if (secretaria.getSecretariaId() == null) {
|
if (secretaria.getSecretariaId() == null) {
|
||||||
btnApagar.setVisible(Boolean.FALSE);
|
btnApagar.setVisible(Boolean.FALSE);
|
||||||
if (!isMostraSerieSubserie) {
|
|
||||||
chkValidaSerieSubserie.setChecked(secretaria.getValidaSerieSubSerie());
|
chkValidaSerieSubserie.setChecked(secretaria.getValidaSerieSubSerie());
|
||||||
onClick$chkValidaSerieSubserie(null);
|
onClick$chkValidaSerieSubserie(null);
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
secretaria = secretariaService.obtenerID(secretaria.getSecretariaId());
|
secretaria = secretariaService.obtenerID(secretaria.getSecretariaId());
|
||||||
if (secretaria.getImprimeprecio().equals(Secretaria.DESCUENTO_COBRAR)) {
|
if (secretaria.getImprimeprecio().equals(Secretaria.DESCUENTO_COBRAR)) {
|
||||||
|
|
|
@ -4,28 +4,26 @@
|
||||||
*/
|
*/
|
||||||
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.CuponSecretaria;
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
import org.zkoss.zul.Listcell;
|
import org.zkoss.zul.Listcell;
|
||||||
import org.zkoss.zul.Listitem;
|
import org.zkoss.zul.Listitem;
|
||||||
import org.zkoss.zul.ListitemRenderer;
|
import org.zkoss.zul.ListitemRenderer;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.CuponSecretaria;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Administrador
|
* @author Administrador
|
||||||
*/
|
*/
|
||||||
public class RenderCuponSecretaria implements ListitemRenderer {
|
public class RenderCuponSecretaria implements ListitemRenderer {
|
||||||
private Boolean isMostraSerieSubserie;
|
|
||||||
|
|
||||||
public RenderCuponSecretaria(){
|
public RenderCuponSecretaria(){
|
||||||
super();
|
super();
|
||||||
}
|
}
|
||||||
|
|
||||||
public RenderCuponSecretaria(Boolean isMostraSerieSubserie ){
|
|
||||||
super();
|
|
||||||
this.isMostraSerieSubserie = isMostraSerieSubserie;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@Override
|
||||||
public void render(Listitem lstm, Object o) throws Exception {
|
public void render(Listitem lstm, Object o) throws Exception {
|
||||||
CuponSecretaria cuponSecretaria = (CuponSecretaria) o;
|
CuponSecretaria cuponSecretaria = (CuponSecretaria) o;
|
||||||
|
|
||||||
|
@ -55,7 +53,6 @@ public class RenderCuponSecretaria implements ListitemRenderer {
|
||||||
}
|
}
|
||||||
lc.setParent(lstm);
|
lc.setParent(lstm);
|
||||||
//Séie
|
//Séie
|
||||||
if(isMostraSerieSubserie){
|
|
||||||
String serie = cuponSecretaria.getSerie();
|
String serie = cuponSecretaria.getSerie();
|
||||||
if (serie != null) {
|
if (serie != null) {
|
||||||
lc = new Listcell(serie.toString());
|
lc = new Listcell(serie.toString());
|
||||||
|
@ -71,7 +68,7 @@ public class RenderCuponSecretaria implements ListitemRenderer {
|
||||||
lc = new Listcell("");
|
lc = new Listcell("");
|
||||||
}
|
}
|
||||||
lc.setParent(lstm);
|
lc.setParent(lstm);
|
||||||
}
|
|
||||||
BigDecimal porcentagemOutros = cuponSecretaria.getPorcdescuentooutros();
|
BigDecimal porcentagemOutros = cuponSecretaria.getPorcdescuentooutros();
|
||||||
if (porcentagemOutros != null) {
|
if (porcentagemOutros != null) {
|
||||||
lc = new Listcell(porcentagemOutros.setScale(2).toString());
|
lc = new Listcell(porcentagemOutros.setScale(2).toString());
|
||||||
|
|
Loading…
Reference in New Issue