Criação do cadastro de comissão e diversos no ponto de venda (agencia)

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@22336 d1611594-4594-4d17-8e1d-87c2c4800839
master
carla 2012-10-31 19:16:10 +00:00
parent 5d238de32b
commit 4ce30d6dcb
3 changed files with 276 additions and 63 deletions

View File

@ -23,6 +23,7 @@ import org.zkoss.zk.ui.event.UploadEvent;
import org.zkoss.zkplus.databind.BindingListModel;
import org.zkoss.zkplus.databind.BindingListModelList;
import org.zkoss.zul.Button;
import org.zkoss.zul.Checkbox;
import org.zkoss.zul.Combobox;
import org.zkoss.zul.Comboitem;
import org.zkoss.zul.Datebox;
@ -46,6 +47,8 @@ import com.rjconsultores.ventaboletos.entidad.PtoVtaUsuarioBancario;
import com.rjconsultores.ventaboletos.entidad.PtovtaAgencia;
import com.rjconsultores.ventaboletos.entidad.PtovtaAntecipacomissao;
import com.rjconsultores.ventaboletos.entidad.InstiFinanceira;
import com.rjconsultores.ventaboletos.entidad.PtovtaComissao;
import com.rjconsultores.ventaboletos.entidad.PtovtaDiversos;
import com.rjconsultores.ventaboletos.entidad.PtovtaEmpresa;
import com.rjconsultores.ventaboletos.entidad.PtovtaEstoque;
import com.rjconsultores.ventaboletos.entidad.PtovtaHorario;
@ -163,6 +166,8 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
private Combobox cmbConexion;
private Combobox cmbUsuarioBancario;
private Combobox cmbUsuarioBancarioPtoVtaUsuarioBancario;
private Combobox cmbPosicao;
private Combobox cmbReceita;
private Button btnSalvarFormaPago;
private Button btnApagar;
private Doublebox txtCargosExtras;
@ -179,6 +184,9 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
private MyTextbox txtTitularCpf;
private MyTextbox txtTitularRg;
private MyTextbox txtTitularEmissor;
private MyTextbox txtResponAluguel;
private MyTextbox txtResponTel;
private MyTextbox txtResponEnergia;
private MyTextboxDecimal importeInicial;
private MyTextboxDecimal importeAdicional;
private Datebox dateAntecipData;
@ -200,6 +208,25 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
private Intbox txtQuant;
private Intbox txtcodAg;
private Textbox txtNomeBanco;
private Checkbox checkRecibo;
private Checkbox checkTarifaReceita;
private Checkbox checkTaxaReceita;
private Checkbox checkSeguroReceita;
private Checkbox checkPedagioReceita;
private Checkbox checkTarifaDev;
private Checkbox checkTaxaDev;
private Checkbox checkSeguroDev;
private Checkbox checkPedagioDev;
private Checkbox checkInformatizada;
private Checkbox checkBilheteInfo;
private Checkbox checkVendaInternet;
private Checkbox checkTeleEntrega;
private Checkbox checkDigitacao;
private Checkbox checkBilhete;
private Checkbox checkOfpsPropria;
private Checkbox checkOfpsTerceiros;
@ -225,6 +252,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
popularCombobox(cmbTipoConta, this.getTipoConta());
popularCombobox(cmbForm, this.getForm());
popularCombobox(cmbLote, this.getLote());
popularCombobox(cmbReceita, this.getTipoConta());
lsEmpresas = empresaService.obtenerIndTipo1();
lsMoneda = monedaService.obtenerTodos();
@ -262,26 +290,174 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
}
}
if (puntoVenta.getPuntoventaId() != null) {
if (puntoVenta.getAgenciaId()!= null) {
if (puntoVenta.getAgenciaId()!= null) {
if(puntoVenta.getAgenciaId().getInstiFinanceiraId()!= null){
cmbBanco.setText(puntoVenta.getAgenciaId().getInstiFinanceiraId().getCodigo());
if (puntoVenta.getComissaoId()!= null) {
if(puntoVenta.getComissaoId().getReceita() != null){
cmbReceita.setText(puntoVenta.getComissaoId().getReceita());
}
if(puntoVenta.getComissaoId().getTarifaDev()!= null){
if(puntoVenta.getComissaoId().getTarifaDev()){
checkTarifaDev.setChecked(true);
}else{
checkTarifaDev.setChecked(false);
}
}
if(puntoVenta.getComissaoId().getTaxaDev() != null){
if(puntoVenta.getComissaoId().getTaxaDev()){
checkTaxaDev.setChecked(true);
}else{
checkTaxaDev.setChecked(false);
}
}
if(puntoVenta.getComissaoId().getPegagioDev() != null){
if(puntoVenta.getComissaoId().getPegagioDev()){
checkPedagioDev.setChecked(true);
}else{
checkPedagioDev.setChecked(false);
}
if(puntoVenta.getAgenciaId().getPessoa() != null){
cmbPessoa.setText(puntoVenta.getAgenciaId().getPessoa());
}
if(puntoVenta.getAgenciaId().getTipo() != null){
cmbPessoa.setText(puntoVenta.getAgenciaId().getTipo());
}
if(puntoVenta.getComissaoId().getSeguroDev()!= null){
if(puntoVenta.getComissaoId().getSeguroDev()){
checkSeguroDev.setChecked(true);
}else{
checkSeguroDev.setChecked(false);
}
}
if(puntoVenta.getComissaoId().getTarifaReceita()!= null){
if(puntoVenta.getComissaoId().getTarifaReceita()){
checkTarifaReceita.setChecked(true);
}else{
checkTarifaReceita.setChecked(false);
}
}
if(puntoVenta.getComissaoId().getTaxaReceita() != null){
if(puntoVenta.getComissaoId().getTaxaReceita()){
checkTaxaReceita.setChecked(true);
}else{
checkTaxaReceita.setChecked(false);
}
}
if(puntoVenta.getComissaoId().getPedagioReceita() != null){
if(puntoVenta.getComissaoId().getPedagioReceita()){
checkPedagioReceita.setChecked(true);
}else{
checkPedagioReceita.setChecked(false);
}
}
if(puntoVenta.getComissaoId().getSeguroReceita()!= null){
if(puntoVenta.getComissaoId().getSeguroReceita()){
checkSeguroReceita.setChecked(true);
}else{
checkSeguroReceita.setChecked(false);
}
}
}else{
puntoVenta.setComissaoId(new PtovtaComissao());
}
}
if (puntoVenta.getPuntoventaId() != null) {
if (puntoVenta.getAgenciaId()!= null) {
if(puntoVenta.getAgenciaId().getInstiFinanceiraId()!= null){
cmbBanco.setText(puntoVenta.getAgenciaId().getInstiFinanceiraId().getCodigo());
}
if(puntoVenta.getAgenciaId().getPessoa() != null){
cmbPessoa.setText(puntoVenta.getAgenciaId().getPessoa());
}
if(puntoVenta.getAgenciaId().getTipo() != null){
cmbPessoa.setText(puntoVenta.getAgenciaId().getTipo());
}
}else{
puntoVenta.setAgenciaId(new PtovtaAgencia());
}
}
if (puntoVenta.getPuntoventaId() != null) {
if (puntoVenta.getDiversosId()!= null) {
if(puntoVenta.getDiversosId().getInformatizada()!= null){
if(puntoVenta.getDiversosId().getInformatizada()){
checkInformatizada.setChecked(true);
}else{
checkInformatizada.setChecked(false);
}
}
if(puntoVenta.getDiversosId().getBilheteInfo()!= null){
if(puntoVenta.getDiversosId().getBilheteInfo()){
checkBilheteInfo.setChecked(true);
}else{
checkBilheteInfo.setChecked(false);
}
}
if(puntoVenta.getDiversosId().getVendaInternet()!= null){
if(puntoVenta.getDiversosId().getVendaInternet()){
checkVendaInternet.setChecked(true);
}else{
checkVendaInternet.setChecked(false);
}
}
if(puntoVenta.getDiversosId().getTeleEntrega()!= null){
if(puntoVenta.getDiversosId().getTeleEntrega()){
checkTeleEntrega.setChecked(true);
}else{
checkTeleEntrega.setChecked(false);
}
}
if(puntoVenta.getDiversosId().getDigitacaoSeq()!= null){
if(puntoVenta.getDiversosId().getDigitacaoSeq()){
checkDigitacao.setChecked(true);
}else{
checkDigitacao.setChecked(false);
}
}
if(puntoVenta.getDiversosId().getTrabalhaBilhete()!= null){
if(puntoVenta.getDiversosId().getTrabalhaBilhete()){
checkBilhete.setChecked(true);
}else{
checkBilhete.setChecked(false);
}
}
if(puntoVenta.getDiversosId().getOfpsPropria()!= null){
if(puntoVenta.getDiversosId().getOfpsPropria()){
checkOfpsPropria.setChecked(true);
}else{
checkOfpsPropria.setChecked(false);
}
}
if(puntoVenta.getDiversosId().getOfpsTerceiros()!= null){
if(puntoVenta.getDiversosId().getOfpsTerceiros()){
checkOfpsTerceiros.setChecked(true);
}else{
checkOfpsTerceiros.setChecked(false);
}
}
}else{
puntoVenta.setDiversosId(new PtovtaDiversos());
}
}
if (puntoVenta.getPuntoventaId() != null) {
if(puntoVenta.getTitularId() != null){
@ -303,10 +479,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
lsFormaPagoDet = puntoVenta.getLsFormaPagoDet();
formaPagoList.setData(lsFormaPagoDet);
paramRecoleccionList.setItemRenderer(new ParamRecoleccionRender());
if (puntoVenta.getLsParamRecoleccion() == null) {
puntoVenta.setLsParamRecoleccion(new ArrayList<ParamRecoleccion>());
@ -433,6 +605,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
}
public void onClick$btnSalvar(Event ev) throws InterruptedException {
txtNome.getValue();
txtNumFax.getValue();
txtCompl.getValue();
@ -458,6 +631,10 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
txtIss.getValue();
txtRoyaties.getValue();
txtcodAg.getValue();
txtResponAluguel.getValue();
txtResponTel.getValue();
txtResponEnergia.getValue();
cmbEmpresa.getValue();
cmbParada.getValue();
cmbTipoPontoVenta.getValue();
@ -469,6 +646,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
cmbBanco.getValue();
cmbPessoa.getValue();
cmbTipoConta.getValue();
cmbPosicao.getValue();
try {
@ -536,16 +714,56 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
puntoVenta.setPtovtaHorarioList(lsHorario);
puntoVenta.setPtovtaEstoqueList(lsEstoque);
if(cmbBanco.getSelectedItem()== null){
puntoVenta.setAgenciaId(null);
}else{
puntoVenta.getAgenciaId().setActivo(Boolean.TRUE);
puntoVenta.getAgenciaId().setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
puntoVenta.getAgenciaId().setFecmodif(Calendar.getInstance().getTime());
}
if(txtTitularCpf.getValue().equals("")){
puntoVenta.setTitularId(null);
}else{
puntoVenta.getTitularId().setActivo(Boolean.TRUE);
puntoVenta.getTitularId().setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
puntoVenta.getTitularId().setFecmodif(Calendar.getInstance().getTime());
}
if((txtIss.getValue().equals(""))&&(txtRoyaties.getValue().equals(""))){
puntoVenta.setComissaoId(null);
}else{
puntoVenta.getComissaoId().setEnviarrecibo(checkRecibo.isChecked());
puntoVenta.getComissaoId().setTarifaReceita(checkTarifaReceita.isChecked());
puntoVenta.getComissaoId().setTaxaReceita(checkTaxaReceita.isChecked());
puntoVenta.getComissaoId().setSeguroReceita(checkSeguroReceita.isChecked());
puntoVenta.getComissaoId().setPedagioReceita(checkPedagioReceita.isChecked());
puntoVenta.getComissaoId().setTarifaDev(checkTarifaDev.isChecked());
puntoVenta.getComissaoId().setTaxaDev(checkTaxaDev.isChecked());
puntoVenta.getComissaoId().setSeguroDev(checkSeguroDev.isChecked());
puntoVenta.getComissaoId().setPegagioDev(checkPedagioDev.isChecked());
puntoVenta.getComissaoId().setActivo(Boolean.TRUE);
puntoVenta.getComissaoId().setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
puntoVenta.getComissaoId().setFecmodif(Calendar.getInstance().getTime());
}
if((txtResponAluguel.getValue().equals("")&&(txtResponTel.getValue().equals("")))){
puntoVenta.setDiversosId(null);
}else{
puntoVenta.getDiversosId().setBilheteInfo(checkBilheteInfo.isChecked());
puntoVenta.getDiversosId().setInformatizada(checkInformatizada.isChecked());
puntoVenta.getDiversosId().setVendaInternet(checkVendaInternet.isChecked());
puntoVenta.getDiversosId().setTeleEntrega(checkTeleEntrega.isChecked());
puntoVenta.getDiversosId().setDigitacaoSeq(checkDigitacao.isChecked());
puntoVenta.getDiversosId().setTrabalhaBilhete(checkBilhete.isChecked());
puntoVenta.getDiversosId().setOfpsPropria(checkOfpsPropria.isChecked());
puntoVenta.getDiversosId().setOfpsTerceiros(checkOfpsTerceiros.isChecked());
puntoVenta.getDiversosId().setActivo(Boolean.TRUE);
puntoVenta.getDiversosId().setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
puntoVenta.getDiversosId().setFecmodif(Calendar.getInstance().getTime());
}
@ -1131,6 +1349,10 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
}
}
public List<String> getReceita(){
return PtovtaComissao.getReceitaList();
}
public List<String> getPessoa() {
return PtovtaAgencia.getPessoaList();
}

View File

@ -3921,17 +3921,17 @@ editarConfiguracionComissaoController.lbRecibo.value = Não Enviar Recibo por Em
editarConfiguracionComissaoController.lbCodAG.value = Código no AG.
#Editar Diversos
editarConfiguracionDController.lbResponAluguel.value = Aluguel em Nome de
editarConfiguracionComissaoController.lbResponTel.value = Telefone em Nome de
editarConfiguracionComissaoController.lbResponEnergia.value = Energia em Nome de
editarConfiguracionComissaoController.lbPosicao.value = Posição
editarConfiguracionComissaoController.lbInformatizada.value = Informatizada
editarConfiguracionComissaoController.lbBilheteInfo.value = Emite Bilhete Informatizado
editarConfiguracionComissaoController.lbVendaInternet.value = Recebe Venda pela Internet
editarConfiguracionComissaoController.lbTeleEntrega.value = Faz Tele-Entrega
editarConfiguracionComissaoController.lbDigitacao.value = Digitação em Sequência
editarConfiguracionComissaoController.lbTrabalha.value = Trabalha com
editarConfiguracionCorridaController.lbBilhete.value = Bilhetes de Passagem
editarConfiguracionCorridaController.lbOfpsTerceiros.value = OFPs Própria
editarConfiguracionCorridaController.lbOfpsPropria.value = OFPs Terceiros
editarConfiguracionDiversosController.lbResponAluguel.value = Aluguel em Nome de
editarConfiguracionDiversosController.lbResponTel.value = Telefone em Nome de
editarConfiguracionDiversosController.lbResponEnergia.value = Energia em Nome de
editarConfiguracionDiversosController.lbPosicao.value = Posição
editarConfiguracionDiversosController.lbInformatizada.value = Informatizada
editarConfiguracionDiversosController.lbBilheteInfo.value = Emite Bilhete Informatizado
editarConfiguracionDiversosController.lbVendaInternet.value = Recebe Venda pela Internet
editarConfiguracionDiversosController.lbTeleEntrega.value = Faz Tele-Entrega
editarConfiguracionDiversosController.lbDigitacao.value = Digitação em Sequência
editarConfiguracionDiversosController.lbTrabalha.value = Trabalha com
editarConfiguracionDiversosController.lbBilhete.value = Bilhetes de Passagem
editarConfiguracionDiversosController.lbOfpsTerceiros.value = OFPs Própria
editarConfiguracionDiversosController.lbOfpsPropria.value = OFPs Terceiros

View File

@ -448,8 +448,7 @@
<row>
<label value="${c:l('editarConfiguracionComissaoController.lbRecibo.value')}" />
<checkbox id="checkRecibo"
checked="@{winEditarPuntoVenta$composer.puntoVenta.comissaoId.enviarRecibo"/>
<checkbox id="checkRecibo" />
</row>
<row>
@ -478,16 +477,16 @@
<hbox>
<checkbox id="checkTarifaReceita"
label="${c:l('editarConfiguracionCorridaController.lbTarifa.value')}"
checked="@{winEditarPuntoVenta$composer.puntoVenta.comissaoId.tarifaReceita" />
/>
<checkbox id="checkTaxaReceita"
label="${c:l('editarConfiguracionCorridaController.lbTaxa.value')}"
checked="@{winEditarPuntoVenta$composer.puntoVenta.comissaoId.taxaReceita"/>
/>
<checkbox id="checkSeguroReceita"
label="${c:l('editarConfiguracionCorridaController.lbSeguro.value')}"
checked="@{winEditarPuntoVenta$composer.puntoVenta.comissaoId.seguroReceita"/>
/>
<checkbox id="checkPedagioReceita"
label="${c:l('editarConfiguracionCorridaController.lbPedagio.value')}"
checked="@{winEditarPuntoVenta$composer.puntoVenta.comissaoId.pedagioReceita"/>
/>
</hbox>
</row>
@ -497,16 +496,16 @@
<hbox>
<checkbox id="checkTarifaDev"
label="${c:l('editarConfiguracionCorridaController.lbTarifa.value')}"
checked="@{winEditarPuntoVenta$composer.puntoVenta.comissaoId.tarifaDev"/>
/>
<checkbox id="checkTaxaDev"
label="${c:l('editarConfiguracionCorridaController.lbTaxa.value')}"
checked="@{winEditarPuntoVenta$composer.puntoVenta.comissaoId.taxaDev"/>
/>
<checkbox id="checkSeguroDev"
label="${c:l('editarConfiguracionCorridaController.lbSeguro.value')}"
checked="@{winEditarPuntoVenta$composer.puntoVenta.comissaoId.seguroDev"/>
/>
<checkbox id="checkPedagioDev"
label="${c:l('editarConfiguracionCorridaController.lbPedagio.value')}"
checked="@{winEditarPuntoVenta$composer.puntoVenta.comissaoId.pegagioDev" />
/>
</hbox>
</row>
@ -666,60 +665,52 @@
</row>
<row>
<label value="${c:l('editarConfiguracionComissaoController.lbResponTel.value')}" />
<label value="${c:l('editarConfiguracionDiversosController.lbResponTel.value')}" />
<textbox id="txtResponTel" width="70%" maxlength="80"
value="@{winEditarPuntoVenta$composer.puntoVenta.diversosId.responTelefone}"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
</row>
<row>
<label value="${c:l('editarConfiguracionComissaoController.lbResponEnergia.value')}" />
<label value="${c:l('editarConfiguracionDiversosController.lbResponEnergia.value')}" />
<textbox id="txtResponEnergia" width="70%" maxlength="80"
value="@{winEditarPuntoVenta$composer.puntoVenta.diversosId.responEnergia}"
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"/>
</row>
<row>
<label value="${c:l('editarConfiguracionComissaoController.lbPosicao.value')}" />
<label value="${c:l('editarConfiguracionDiversosController.lbPosicao.value')}" />
<combobox id="cmbPosicao" width="70%" mold="rounded" buttonVisible="true"
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" />
</row>
<row >
<label value="${c:l('editarConfiguracionComissaoController.lbInformatizada.value')}"/>
<checkbox id="checkInformatizada"
checked="@{winEditarPuntoVenta$composer.puntoVenta.diversosId.informatizada"/>
<label value="${c:l('editarConfiguracionDiversosController.lbInformatizada.value')}"/>
<checkbox id="checkInformatizada" />
</row>
<row >
<label value="${c:l('editarConfiguracionComissaoController.lbBilheteInfo.value')}"/>
<checkbox id="checkBilheteInfo"
checked="@{winEditarPuntoVenta$composer.puntoVenta.diversosId.bilheteInfo"/>
<label value="${c:l('editarConfiguracionDiversosController.lbBilheteInfo.value')}"/>
<checkbox id="checkBilheteInfo" />
</row>
<row >
<label value="${c:l('editarConfiguracionComissaoController.lbVendaInternet.value')}"/>
<checkbox id="checkVendaInternet"
checked="@{winEditarPuntoVenta$composer.puntoVenta.diversosId.vendaInternet"/>
<label value="${c:l('editarConfiguracionDiversosController.lbVendaInternet.value')}"/>
<checkbox id="checkVendaInternet" />
</row>
<row >
<label value="${c:l('editarConfiguracionComissaoController.lbTeleEntrega.value')}"/>
<checkbox id="checkTeleEntrega"
checked="@{winEditarPuntoVenta$composer.puntoVenta.diversosId.teleEntrega"/>
<label value="${c:l('editarConfiguracionDiversosController.lbTeleEntrega.value')}"/>
<checkbox id="checkTeleEntrega" />
</row>
<row >
<label value="${c:l('editarConfiguracionComissaoController.lbDigitacao.value')}"/>
<checkbox id="checkDigitacao"
checked="@{winEditarPuntoVenta$composer.puntoVenta.diversosId.digitacaoSeq"/>
<label value="${c:l('editarConfiguracionDiversosController.lbDigitacao.value')}"/>
<checkbox id="checkDigitacao" />
</row>
<row >
<label value="${c:l('editarConfiguracionComissaoController.lbTrabalha.value')}"/>
<label value="${c:l('editarConfiguracionDiversosController.lbTrabalha.value')}"/>
<hbox>
<checkbox id="checkBilhete" label="${c:l('editarConfiguracionCorridaController.lbBilhete.value')}"
checked="@{winEditarPuntoVenta$composer.puntoVenta.diversosId.trabalhaBilhete"/>
<checkbox id="checkOfpsPropria" label="${c:l('editarConfiguracionCorridaController.lbOfpsPropria.value')}"
checked="@{winEditarPuntoVenta$composer.puntoVenta.diversosId.ofpsPropria"/>
<checkbox id="checkOfpsTerceiros" label="${c:l('editarConfiguracionCorridaController.lbOfpsTerceiros.value')}"
checked="@{winEditarPuntoVenta$composer.puntoVenta.diversosId.ofpsTerceiros"/>
<checkbox id="checkBilhete" label="${c:l('editarConfiguracionDiversosController.lbBilhete.value')}" />
<checkbox id="checkOfpsPropria" label="${c:l('editarConfiguracionDiversosController.lbOfpsPropria.value')}" />
<checkbox id="checkOfpsTerceiros" label="${c:l('editarConfiguracionDiversosController.lbOfpsTerceiros.value')}"/>
</hbox>
</row>
</rows>