Pricing dia - Erro ao aplicar pricing na venda
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@32000 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
bedca98898
commit
ae47e3f3ce
|
@ -55,6 +55,7 @@ import com.trg.search.Filter;
|
||||||
@Scope("prototype")
|
@Scope("prototype")
|
||||||
public class RelatorioReceitaDiariaAgenciaController extends MyGenericForwardComposer {
|
public class RelatorioReceitaDiariaAgenciaController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
@Autowired
|
@Autowired
|
||||||
private EstadoService estadoService;
|
private EstadoService estadoService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -74,7 +75,7 @@ public class RelatorioReceitaDiariaAgenciaController extends MyGenericForwardCom
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private transient PagedListWrapper<PuntoVenta> plwPuntoVenta;
|
private transient PagedListWrapper<PuntoVenta> plwPuntoVenta;
|
||||||
|
|
||||||
private MyListbox puntoVentaList;
|
private MyListbox puntoVentaList;
|
||||||
private MyListbox estadoList;
|
private MyListbox estadoList;
|
||||||
private MyListbox puntoVentaSelList;
|
private MyListbox puntoVentaSelList;
|
||||||
|
@ -93,7 +94,6 @@ public class RelatorioReceitaDiariaAgenciaController extends MyGenericForwardCom
|
||||||
private Checkbox chkExcessoBagagem;
|
private Checkbox chkExcessoBagagem;
|
||||||
private Checkbox chkContemplarGap;
|
private Checkbox chkContemplarGap;
|
||||||
private Radio rd1;
|
private Radio rd1;
|
||||||
|
|
||||||
|
|
||||||
public Datebox getDatInicial() {
|
public Datebox getDatInicial() {
|
||||||
return datInicial;
|
return datInicial;
|
||||||
|
@ -199,17 +199,15 @@ public class RelatorioReceitaDiariaAgenciaController extends MyGenericForwardCom
|
||||||
this.lsTipoPuntoVenta = lsTipoPuntoVenta;
|
this.lsTipoPuntoVenta = lsTipoPuntoVenta;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void onClick$btnExecutarRelatorio(Event ev) throws Exception {
|
public void onClick$btnExecutarRelatorio(Event ev) throws Exception {
|
||||||
executarRelatorio();
|
executarRelatorio();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onDoubleClick$puntoVentaList(Event ev) {
|
public void onDoubleClick$puntoVentaList(Event ev) {
|
||||||
|
|
||||||
PuntoVenta puntoVentaSel = (PuntoVenta) puntoVentaList.getSelected();
|
PuntoVenta puntoVentaSel = (PuntoVenta) puntoVentaList.getSelected();
|
||||||
puntoVentaSelList.addItemNovo(puntoVentaSel);
|
puntoVentaSelList.addItemNovo(puntoVentaSel);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onDoubleClick$puntoVentaSelList(Event ev) {
|
public void onDoubleClick$puntoVentaSelList(Event ev) {
|
||||||
|
@ -217,7 +215,6 @@ public class RelatorioReceitaDiariaAgenciaController extends MyGenericForwardCom
|
||||||
PuntoVenta puntoVentaSel = (PuntoVenta) puntoVentaSelList.getSelected();
|
PuntoVenta puntoVentaSel = (PuntoVenta) puntoVentaSelList.getSelected();
|
||||||
puntoVentaSelList.removeItem(puntoVentaSel);
|
puntoVentaSelList.removeItem(puntoVentaSel);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onSelect$puntoVentaList(Event ev) {
|
public void onSelect$puntoVentaList(Event ev) {
|
||||||
|
@ -282,37 +279,31 @@ public class RelatorioReceitaDiariaAgenciaController extends MyGenericForwardCom
|
||||||
parametros.put("NOME_RELATORIO", Labels.getLabel("relatorioReceitaDiariaAgenciaController.window.title"));
|
parametros.put("NOME_RELATORIO", Labels.getLabel("relatorioReceitaDiariaAgenciaController.window.title"));
|
||||||
parametros.put("ISDEVOLUCAODESTINO", rd1.isChecked() ? 0 : 1);
|
parametros.put("ISDEVOLUCAODESTINO", rd1.isChecked() ? 0 : 1);
|
||||||
parametros.put("USUARIO", UsuarioLogado.getUsuarioLogado().getUsuarioId().toString());
|
parametros.put("USUARIO", UsuarioLogado.getUsuarioLogado().getUsuarioId().toString());
|
||||||
|
|
||||||
parametros.put("BASE_CALCULO_IMPOSTO", Integer.valueOf(cmbReceitaImposto.getSelectedItem().getValue().toString()));
|
parametros.put("BASE_CALCULO_IMPOSTO", Integer.valueOf(cmbReceitaImposto.getSelectedItem().getValue().toString()));
|
||||||
|
|
||||||
|
|
||||||
lsNumPuntoVenta = new ArrayList(Arrays.asList(puntoVentaSelList.getData()));
|
lsNumPuntoVenta = new ArrayList(Arrays.asList(puntoVentaSelList.getData()));
|
||||||
|
|
||||||
filtro.append("Agência(s): ");
|
filtro.append("Agência(s): ");
|
||||||
if (lsNumPuntoVenta.size() > 0) {
|
if (lsNumPuntoVenta.size() > 0) {
|
||||||
parametros.put("NUMPUNTOVENTA", lsNumPuntoVenta);
|
parametros.put("NUMPUNTOVENTA", lsNumPuntoVenta);
|
||||||
parametros.put("ISNUMPUNTOVENTATODOS", "N");
|
parametros.put("ISNUMPUNTOVENTATODOS", "N");
|
||||||
filtro.append(lsNumPuntoVenta.size()+" selecionada(s);");
|
filtro.append(lsNumPuntoVenta.size() + " selecionada(s);");
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
parametros.put("ISNUMPUNTOVENTATODOS", "S");
|
parametros.put("ISNUMPUNTOVENTATODOS", "S");
|
||||||
filtro.append("Todas ;");
|
filtro.append("Todas ;");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
filtro.append("Estados(s): ");
|
filtro.append("Estados(s): ");
|
||||||
if (estadoList.getSelectedsItens().size() > 0) {
|
if (estadoList.getSelectedsItens().size() > 0) {
|
||||||
parametros.put("ESTADO_ID", estadoList.getSelectedsItens());
|
parametros.put("ESTADO_ID", estadoList.getSelectedsItens());
|
||||||
filtro.append(estadoList.getSelectedsItens().size()+" selecionado(s);");
|
filtro.append(estadoList.getSelectedsItens().size() + " selecionado(s);");
|
||||||
}
|
}
|
||||||
else{
|
else {
|
||||||
filtro.append("Todos ;");
|
filtro.append("Todos ;");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Comboitem itemEmpresa = cmbEmpresa.getSelectedItem();
|
Comboitem itemEmpresa = cmbEmpresa.getSelectedItem();
|
||||||
if (itemEmpresa != null) {
|
if (itemEmpresa != null) {
|
||||||
Empresa empresa = (Empresa) itemEmpresa.getValue();
|
Empresa empresa = (Empresa) itemEmpresa.getValue();
|
||||||
|
@ -322,35 +313,32 @@ public class RelatorioReceitaDiariaAgenciaController extends MyGenericForwardCom
|
||||||
|
|
||||||
filtro.append(" Tipo Agência: ");
|
filtro.append(" Tipo Agência: ");
|
||||||
Comboitem itemTipoPunto = cmbTipoPuntoVenta.getSelectedItem();
|
Comboitem itemTipoPunto = cmbTipoPuntoVenta.getSelectedItem();
|
||||||
if (itemTipoPunto != null && ((TipoPuntoVenta)cmbTipoPuntoVenta.getSelectedItem().getValue()).getTipoptovtaId() != -1) {
|
if (itemTipoPunto != null && ((TipoPuntoVenta) cmbTipoPuntoVenta.getSelectedItem().getValue()).getTipoptovtaId() != -1) {
|
||||||
TipoPuntoVenta tipoPuntoVenta = (TipoPuntoVenta) itemTipoPunto.getValue();
|
TipoPuntoVenta tipoPuntoVenta = (TipoPuntoVenta) itemTipoPunto.getValue();
|
||||||
parametros.put("TIPOPTOVTA_ID", tipoPuntoVenta.getTipoptovtaId().intValue());
|
parametros.put("TIPOPTOVTA_ID", tipoPuntoVenta.getTipoptovtaId().intValue());
|
||||||
filtro.append(tipoPuntoVenta.getDesctipo()+";");
|
filtro.append(tipoPuntoVenta.getDesctipo() + ";");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
filtro.append("Todos;");
|
filtro.append("Todos;");
|
||||||
|
|
||||||
|
if (chkContemplarGap.isChecked())
|
||||||
if(chkContemplarGap.isChecked())
|
|
||||||
filtro.append(" Contemplar GAP;");
|
filtro.append(" Contemplar GAP;");
|
||||||
else
|
else
|
||||||
filtro.append(" Desconsiderar GAP;");
|
filtro.append(" Desconsiderar GAP;");
|
||||||
|
|
||||||
if( chkExcessoBagagem.isChecked())
|
if (chkExcessoBagagem.isChecked())
|
||||||
filtro.append(" Exclui Excesso de Bagagem;");
|
filtro.append(" Exclui Excesso de Bagagem;");
|
||||||
else
|
else
|
||||||
filtro.append(" Inclui Excesso de Bagagem;");
|
filtro.append(" Inclui Excesso de Bagagem;");
|
||||||
|
|
||||||
filtro.append(" Devolução na agência: ");
|
filtro.append(" Devolução na agência: ");
|
||||||
|
|
||||||
if(rd1.isChecked())
|
if (rd1.isChecked())
|
||||||
filtro.append("Origem;");
|
filtro.append("Origem;");
|
||||||
else
|
else
|
||||||
filtro.append("Destino;");
|
filtro.append("Destino;");
|
||||||
|
|
||||||
|
|
||||||
parametros.put("FILTROS", filtro.toString());
|
parametros.put("FILTROS", filtro.toString());
|
||||||
|
|
||||||
|
|
||||||
Relatorio relatorio = new RelatorioReceitaDiariaAgencia(parametros, dataSource.getConnection());
|
Relatorio relatorio = new RelatorioReceitaDiariaAgencia(parametros, dataSource.getConnection());
|
||||||
|
|
||||||
|
@ -372,19 +360,8 @@ public class RelatorioReceitaDiariaAgenciaController extends MyGenericForwardCom
|
||||||
estadoList.setItemRenderer(new RenderEstadoSimple());
|
estadoList.setItemRenderer(new RenderEstadoSimple());
|
||||||
puntoVentaList.setItemRenderer(new RenderPuntoVentaSimple());
|
puntoVentaList.setItemRenderer(new RenderPuntoVentaSimple());
|
||||||
puntoVentaSelList.setItemRenderer(new RenderPuntoVentaSimple());
|
puntoVentaSelList.setItemRenderer(new RenderPuntoVentaSimple());
|
||||||
|
|
||||||
estadoList.setData(lsEstado);
|
estadoList.setData(lsEstado);
|
||||||
|
|
||||||
/*HibernateSearchObject<Estado> estadoBusca =
|
|
||||||
new HibernateSearchObject<Estado>(Estado.class,
|
|
||||||
pagingEstado.getPageSize());
|
|
||||||
|
|
||||||
|
|
||||||
plwEstado.init(estadoBusca, estadoList);*/
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue