git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@26412 d1611594-4594-4d17-8e1d-87c2c4800839
parent
000d585f3d
commit
1e05719f2b
|
@ -35,7 +35,6 @@ import org.zkoss.zul.Image;
|
||||||
import org.zkoss.zul.Intbox;
|
import org.zkoss.zul.Intbox;
|
||||||
import org.zkoss.zul.Messagebox;
|
import org.zkoss.zul.Messagebox;
|
||||||
import org.zkoss.zul.Radio;
|
import org.zkoss.zul.Radio;
|
||||||
import org.zkoss.zul.Tabbox;
|
|
||||||
import org.zkoss.zul.Textbox;
|
import org.zkoss.zul.Textbox;
|
||||||
import org.zkoss.zul.api.Timebox;
|
import org.zkoss.zul.api.Timebox;
|
||||||
|
|
||||||
|
@ -60,7 +59,6 @@ import com.rjconsultores.ventaboletos.entidad.PtovtaTitular;
|
||||||
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||||
import com.rjconsultores.ventaboletos.entidad.TipoPuntoVenta;
|
import com.rjconsultores.ventaboletos.entidad.TipoPuntoVenta;
|
||||||
import com.rjconsultores.ventaboletos.entidad.UsuarioBancario;
|
import com.rjconsultores.ventaboletos.entidad.UsuarioBancario;
|
||||||
import com.rjconsultores.ventaboletos.service.CiudadService;
|
|
||||||
import com.rjconsultores.ventaboletos.service.ColoniaService;
|
import com.rjconsultores.ventaboletos.service.ColoniaService;
|
||||||
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
||||||
import com.rjconsultores.ventaboletos.service.FormaPagoService;
|
import com.rjconsultores.ventaboletos.service.FormaPagoService;
|
||||||
|
@ -109,8 +107,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
@Autowired
|
@Autowired
|
||||||
private FormaPagoService formaPagoService;
|
private FormaPagoService formaPagoService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private CiudadService ciudadService;
|
|
||||||
@Autowired
|
|
||||||
private ColoniaService coloniaService;
|
private ColoniaService coloniaService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private PtovtaEmpresaService ptovtaEmpresaService;
|
private PtovtaEmpresaService ptovtaEmpresaService;
|
||||||
|
@ -145,7 +141,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
private List<PtovtaHorario> lsHorario;
|
private List<PtovtaHorario> lsHorario;
|
||||||
private List<PtovtaEstoque> lsEstoque;
|
private List<PtovtaEstoque> lsEstoque;
|
||||||
private List<PuntoVenta> lsDestino;
|
private List<PuntoVenta> lsDestino;
|
||||||
private Tabbox tabboxTitle;
|
|
||||||
private Radio radDatosTarjetaSi;
|
private Radio radDatosTarjetaSi;
|
||||||
private Radio radDatosTarjetaNo;
|
private Radio radDatosTarjetaNo;
|
||||||
private Radio radAprobacionAutorizado;
|
private Radio radAprobacionAutorizado;
|
||||||
|
@ -169,7 +164,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
private Combobox cmbUsuarioBancario;
|
private Combobox cmbUsuarioBancario;
|
||||||
private Combobox cmbUsuarioBancarioPtoVtaUsuarioBancario;
|
private Combobox cmbUsuarioBancarioPtoVtaUsuarioBancario;
|
||||||
private Combobox cmbPosicao;
|
private Combobox cmbPosicao;
|
||||||
private Combobox cmbDestino;
|
|
||||||
private Combobox cmbReceita;
|
private Combobox cmbReceita;
|
||||||
private Button btnSalvarFormaPago;
|
private Button btnSalvarFormaPago;
|
||||||
private Button btnApagar;
|
private Button btnApagar;
|
||||||
|
@ -210,6 +204,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
private Timebox timeboxFim;
|
private Timebox timeboxFim;
|
||||||
private Intbox txtQuant;
|
private Intbox txtQuant;
|
||||||
private Intbox txtcodAg;
|
private Intbox txtcodAg;
|
||||||
|
private Intbox txtMaxCancelacion;
|
||||||
private Textbox txtNumPtoVta;
|
private Textbox txtNumPtoVta;
|
||||||
private Textbox txtNomeBanco;
|
private Textbox txtNomeBanco;
|
||||||
private Textbox numtelefonodos;
|
private Textbox numtelefonodos;
|
||||||
|
@ -241,9 +236,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
this.btnApagar = btnApagar;
|
this.btnApagar = btnApagar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void aplicarMascara() {
|
||||||
public void aplicarMascara(){
|
|
||||||
|
|
||||||
|
|
||||||
Clients.evalJavaScript("jQuery('#" + txtNumFax.getUuid()
|
Clients.evalJavaScript("jQuery('#" + txtNumFax.getUuid()
|
||||||
+ "').mask('(999)9999-9999?9');jQuery('#" + numtelefonodos.getUuid()
|
+ "').mask('(999)9999-9999?9');jQuery('#" + numtelefonodos.getUuid()
|
||||||
|
@ -252,13 +245,12 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAfterCompose(Component comp) throws Exception {
|
public void doAfterCompose(Component comp) throws Exception {
|
||||||
|
|
||||||
super.doAfterCompose(comp);
|
super.doAfterCompose(comp);
|
||||||
aplicarMascara();
|
aplicarMascara();
|
||||||
popularCombobox(cmbTipoConta,cmbPessoa,cmbForm,cmbLote,cmbPosicao, cmbReceita);
|
popularCombobox(cmbTipoConta, cmbPessoa, cmbForm, cmbLote, cmbPosicao, cmbReceita);
|
||||||
|
|
||||||
lsEmpresas = UsuarioLogado.getUsuarioLogado().getEmpresa();
|
lsEmpresas = UsuarioLogado.getUsuarioLogado().getEmpresa();
|
||||||
lsDestino = puntoVentaService.obtenerTodos();
|
lsDestino = puntoVentaService.obtenerTodos();
|
||||||
|
@ -270,9 +262,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
lsTipoPuntoVenta = tipoPuntoVentaService.obtenerTodos();
|
lsTipoPuntoVenta = tipoPuntoVentaService.obtenerTodos();
|
||||||
lsUsuarioBancario = usuarioBancarioService.obtenerTodos();
|
lsUsuarioBancario = usuarioBancarioService.obtenerTodos();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
txtCP.setDisabled(true);
|
txtCP.setDisabled(true);
|
||||||
puntoVenta = (PuntoVenta) Executions.getCurrent().getArg().get("puntoVenta");
|
puntoVenta = (PuntoVenta) Executions.getCurrent().getArg().get("puntoVenta");
|
||||||
|
@ -283,20 +272,20 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
cmbCiudad.setText(puntoVenta.getColonia().getCiudad().getNombciudad());
|
cmbCiudad.setText(puntoVenta.getColonia().getCiudad().getNombciudad());
|
||||||
cmbColonia.setText(puntoVenta.getColonia().getDesccolonia());
|
cmbColonia.setText(puntoVenta.getColonia().getDesccolonia());
|
||||||
}
|
}
|
||||||
if(puntoVenta.getIndValidaStock() != null){
|
if (puntoVenta.getIndValidaStock() != null) {
|
||||||
if (puntoVenta.getIndValidaStock()){
|
if (puntoVenta.getIndValidaStock()) {
|
||||||
checkStock.setChecked(true);
|
checkStock.setChecked(true);
|
||||||
}else{
|
} else {
|
||||||
checkStock.setChecked(false);
|
checkStock.setChecked(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(puntoVenta.getNumfax() != null){
|
if (puntoVenta.getNumfax() != null) {
|
||||||
txtNumFax.setValue(puntoVenta.getNumfax());
|
txtNumFax.setValue(puntoVenta.getNumfax());
|
||||||
}
|
}
|
||||||
if(puntoVenta.getNumtelefonouno() != null){
|
if (puntoVenta.getNumtelefonouno() != null) {
|
||||||
numtelefonouno.setValue(puntoVenta.getNumtelefonouno() );
|
numtelefonouno.setValue(puntoVenta.getNumtelefonouno());
|
||||||
}
|
}
|
||||||
if(puntoVenta.getNumtelefonodos() != null){
|
if (puntoVenta.getNumtelefonodos() != null) {
|
||||||
numtelefonodos.setValue(puntoVenta.getNumtelefonodos());
|
numtelefonodos.setValue(puntoVenta.getNumtelefonodos());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -313,254 +302,244 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (puntoVenta.getPuntoventaId() != null) {
|
if (puntoVenta.getPuntoventaId() != null) {
|
||||||
if (puntoVenta.getComissaoId()!= null) {
|
if (puntoVenta.getComissaoId() != null) {
|
||||||
|
|
||||||
|
if (puntoVenta.getComissaoId().getExcessoAlta() != null) {
|
||||||
if(puntoVenta.getComissaoId().getExcessoAlta() != null){
|
|
||||||
txtExcessoAlta.setText(puntoVenta.getComissaoId().getExcessoAlta().toString());
|
txtExcessoAlta.setText(puntoVenta.getComissaoId().getExcessoAlta().toString());
|
||||||
|
|
||||||
}
|
}
|
||||||
if(puntoVenta.getComissaoId().getExcessoBaixa() != null){
|
if (puntoVenta.getComissaoId().getExcessoBaixa() != null) {
|
||||||
txtExcessoBaixa.setText(puntoVenta.getComissaoId().getExcessoBaixa().toString());
|
txtExcessoBaixa.setText(puntoVenta.getComissaoId().getExcessoBaixa().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(puntoVenta.getComissaoId().getPassagemBaixa() != null){
|
if (puntoVenta.getComissaoId().getPassagemBaixa() != null) {
|
||||||
txtPassagemBaixa.setText(puntoVenta.getComissaoId().getPassagemBaixa().toString());
|
txtPassagemBaixa.setText(puntoVenta.getComissaoId().getPassagemBaixa().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(puntoVenta.getComissaoId().getPassagemAlta()!= null){
|
if (puntoVenta.getComissaoId().getPassagemAlta() != null) {
|
||||||
txtPassagemAlta.setText(puntoVenta.getComissaoId().getPassagemAlta().toString());
|
txtPassagemAlta.setText(puntoVenta.getComissaoId().getPassagemAlta().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(puntoVenta.getComissaoId().getSeguroBaixa()!= null){
|
if (puntoVenta.getComissaoId().getSeguroBaixa() != null) {
|
||||||
txtSeguroBaixa.setText(puntoVenta.getComissaoId().getSeguroBaixa().toString());
|
txtSeguroBaixa.setText(puntoVenta.getComissaoId().getSeguroBaixa().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(puntoVenta.getComissaoId().getSeguroAlta()!= null){
|
if (puntoVenta.getComissaoId().getSeguroAlta() != null) {
|
||||||
txtSeguroAlta.setText(puntoVenta.getComissaoId().getSeguroAlta().toString());
|
txtSeguroAlta.setText(puntoVenta.getComissaoId().getSeguroAlta().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(puntoVenta.getComissaoId().getOutrosBaixa()!= null){
|
if (puntoVenta.getComissaoId().getOutrosBaixa() != null) {
|
||||||
txtOutrosBaixa.setText(puntoVenta.getComissaoId().getOutrosBaixa().toString());
|
txtOutrosBaixa.setText(puntoVenta.getComissaoId().getOutrosBaixa().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(puntoVenta.getComissaoId().getOutrosAlta()!= null){
|
if (puntoVenta.getComissaoId().getOutrosAlta() != null) {
|
||||||
txtOutrosAlta.setText(puntoVenta.getComissaoId().getOutrosAlta().toString());
|
txtOutrosAlta.setText(puntoVenta.getComissaoId().getOutrosAlta().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(puntoVenta.getComissaoId().getIssretido()!= null){
|
if (puntoVenta.getComissaoId().getIssretido() != null) {
|
||||||
txtIss.setText(puntoVenta.getComissaoId().getIssretido().toString());
|
txtIss.setText(puntoVenta.getComissaoId().getIssretido().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(puntoVenta.getComissaoId().getRoyalties()!= null){
|
if (puntoVenta.getComissaoId().getRoyalties() != null) {
|
||||||
txtRoyaties.setText(puntoVenta.getComissaoId().getRoyalties().toString());
|
txtRoyaties.setText(puntoVenta.getComissaoId().getRoyalties().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (puntoVenta.getComissaoId().getTarifaDev() != null) {
|
||||||
if(puntoVenta.getComissaoId().getTarifaDev()!= null){
|
if (puntoVenta.getComissaoId().getTarifaDev()) {
|
||||||
if(puntoVenta.getComissaoId().getTarifaDev()){
|
|
||||||
checkTarifaDev.setChecked(true);
|
checkTarifaDev.setChecked(true);
|
||||||
}else{
|
} else {
|
||||||
checkTarifaDev.setChecked(false);
|
checkTarifaDev.setChecked(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(puntoVenta.getComissaoId().getTaxaDev() != null){
|
if (puntoVenta.getComissaoId().getTaxaDev() != null) {
|
||||||
if(puntoVenta.getComissaoId().getTaxaDev()){
|
if (puntoVenta.getComissaoId().getTaxaDev()) {
|
||||||
checkTaxaDev.setChecked(true);
|
checkTaxaDev.setChecked(true);
|
||||||
}else{
|
} else {
|
||||||
checkTaxaDev.setChecked(false);
|
checkTaxaDev.setChecked(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(puntoVenta.getComissaoId().getPegagioDev() != null){
|
if (puntoVenta.getComissaoId().getPegagioDev() != null) {
|
||||||
if(puntoVenta.getComissaoId().getPegagioDev()){
|
if (puntoVenta.getComissaoId().getPegagioDev()) {
|
||||||
checkPedagioDev.setChecked(true);
|
checkPedagioDev.setChecked(true);
|
||||||
}else{
|
} else {
|
||||||
checkPedagioDev.setChecked(false);
|
checkPedagioDev.setChecked(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(puntoVenta.getComissaoId().getSeguroDev()!= null){
|
if (puntoVenta.getComissaoId().getSeguroDev() != null) {
|
||||||
if(puntoVenta.getComissaoId().getSeguroDev()){
|
if (puntoVenta.getComissaoId().getSeguroDev()) {
|
||||||
checkSeguroDev.setChecked(true);
|
checkSeguroDev.setChecked(true);
|
||||||
}else{
|
} else {
|
||||||
checkSeguroDev.setChecked(false);
|
checkSeguroDev.setChecked(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(puntoVenta.getComissaoId().getTarifaReceita()!= null){
|
if (puntoVenta.getComissaoId().getTarifaReceita() != null) {
|
||||||
if(puntoVenta.getComissaoId().getTarifaReceita()){
|
if (puntoVenta.getComissaoId().getTarifaReceita()) {
|
||||||
checkTarifaReceita.setChecked(true);
|
checkTarifaReceita.setChecked(true);
|
||||||
}else{
|
} else {
|
||||||
checkTarifaReceita.setChecked(false);
|
checkTarifaReceita.setChecked(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(puntoVenta.getComissaoId().getTaxaReceita() != null){
|
if (puntoVenta.getComissaoId().getTaxaReceita() != null) {
|
||||||
if(puntoVenta.getComissaoId().getTaxaReceita()){
|
if (puntoVenta.getComissaoId().getTaxaReceita()) {
|
||||||
checkTaxaReceita.setChecked(true);
|
checkTaxaReceita.setChecked(true);
|
||||||
}else{
|
} else {
|
||||||
checkTaxaReceita.setChecked(false);
|
checkTaxaReceita.setChecked(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(puntoVenta.getComissaoId().getReceita() != null){
|
if (puntoVenta.getComissaoId().getReceita() != null) {
|
||||||
if(puntoVenta.getComissaoId().getReceita().equals("RB")){
|
if (puntoVenta.getComissaoId().getReceita().equals("RB")) {
|
||||||
cmbReceita.setSelectedIndex(0);
|
cmbReceita.setSelectedIndex(0);
|
||||||
}else if(puntoVenta.getComissaoId().getReceita().equals("RL")){
|
} else if (puntoVenta.getComissaoId().getReceita().equals("RL")) {
|
||||||
cmbReceita.setSelectedIndex(1);
|
cmbReceita.setSelectedIndex(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (puntoVenta.getComissaoId().getPedagioReceita() != null) {
|
||||||
if(puntoVenta.getComissaoId().getPedagioReceita() != null){
|
if (puntoVenta.getComissaoId().getPedagioReceita()) {
|
||||||
if(puntoVenta.getComissaoId().getPedagioReceita()){
|
|
||||||
checkPedagioReceita.setChecked(true);
|
checkPedagioReceita.setChecked(true);
|
||||||
}else{
|
} else {
|
||||||
checkPedagioReceita.setChecked(false);
|
checkPedagioReceita.setChecked(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(puntoVenta.getComissaoId().getSeguroReceita()!= null){
|
if (puntoVenta.getComissaoId().getSeguroReceita() != null) {
|
||||||
if(puntoVenta.getComissaoId().getSeguroReceita()){
|
if (puntoVenta.getComissaoId().getSeguroReceita()) {
|
||||||
checkSeguroReceita.setChecked(true);
|
checkSeguroReceita.setChecked(true);
|
||||||
}else{
|
} else {
|
||||||
checkSeguroReceita.setChecked(false);
|
checkSeguroReceita.setChecked(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
puntoVenta.setComissaoId(new PtovtaComissao());
|
puntoVenta.setComissaoId(new PtovtaComissao());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (puntoVenta.getPuntoventaId() != null) {
|
if (puntoVenta.getPuntoventaId() != null) {
|
||||||
if (puntoVenta.getAgenciaId()!= null) {
|
if (puntoVenta.getAgenciaId() != null) {
|
||||||
|
|
||||||
if(puntoVenta.getAgenciaId().getInstiFinanceiraId()!= null){
|
if (puntoVenta.getAgenciaId().getInstiFinanceiraId() != null) {
|
||||||
cmbBanco.setText(puntoVenta.getAgenciaId().getInstiFinanceiraId().getCodigo());
|
cmbBanco.setText(puntoVenta.getAgenciaId().getInstiFinanceiraId().getCodigo());
|
||||||
txtNomeBanco.setText(puntoVenta.getAgenciaId().getInstiFinanceiraId().getNome());
|
txtNomeBanco.setText(puntoVenta.getAgenciaId().getInstiFinanceiraId().getNome());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(puntoVenta.getAgenciaId().getPessoa() != null){
|
if (puntoVenta.getAgenciaId().getPessoa() != null) {
|
||||||
if(puntoVenta.getAgenciaId().getPessoa().equals("F")){
|
if (puntoVenta.getAgenciaId().getPessoa().equals("F")) {
|
||||||
cmbPessoa.setSelectedIndex(0);
|
cmbPessoa.setSelectedIndex(0);
|
||||||
}else if(puntoVenta.getAgenciaId().getPessoa().equals("J")){
|
} else if (puntoVenta.getAgenciaId().getPessoa().equals("J")) {
|
||||||
cmbPessoa.setSelectedIndex(1);
|
cmbPessoa.setSelectedIndex(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(puntoVenta.getAgenciaId().getTipo() != null){
|
if (puntoVenta.getAgenciaId().getTipo() != null) {
|
||||||
if(puntoVenta.getAgenciaId().getTipo().equals("CC")){
|
if (puntoVenta.getAgenciaId().getTipo().equals("CC")) {
|
||||||
cmbTipoConta.setSelectedIndex(0);
|
cmbTipoConta.setSelectedIndex(0);
|
||||||
}else if(puntoVenta.getAgenciaId().getTipo().equals("P")){
|
} else if (puntoVenta.getAgenciaId().getTipo().equals("P")) {
|
||||||
cmbTipoConta.setSelectedIndex(1);
|
cmbTipoConta.setSelectedIndex(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
} else {
|
||||||
puntoVenta.setAgenciaId(new PtovtaAgencia());
|
puntoVenta.setAgenciaId(new PtovtaAgencia());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (puntoVenta.getPuntoventaId() != null) {
|
if (puntoVenta.getPuntoventaId() != null) {
|
||||||
if (puntoVenta.getDiversosId()!= null) {
|
if (puntoVenta.getDiversosId() != null) {
|
||||||
if(puntoVenta.getDiversosId().getInformatizada()!= null){
|
if (puntoVenta.getDiversosId().getInformatizada() != null) {
|
||||||
if(puntoVenta.getDiversosId().getInformatizada()){
|
if (puntoVenta.getDiversosId().getInformatizada()) {
|
||||||
checkInformatizada.setChecked(true);
|
checkInformatizada.setChecked(true);
|
||||||
}else{
|
} else {
|
||||||
checkInformatizada.setChecked(false);
|
checkInformatizada.setChecked(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(puntoVenta.getDiversosId().getBilheteInfo()!= null){
|
if (puntoVenta.getDiversosId().getBilheteInfo() != null) {
|
||||||
if(puntoVenta.getDiversosId().getBilheteInfo()){
|
if (puntoVenta.getDiversosId().getBilheteInfo()) {
|
||||||
checkBilheteInfo.setChecked(true);
|
checkBilheteInfo.setChecked(true);
|
||||||
}else{
|
} else {
|
||||||
checkBilheteInfo.setChecked(false);
|
checkBilheteInfo.setChecked(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(puntoVenta.getDiversosId().getPosicao() != null){
|
if (puntoVenta.getDiversosId().getPosicao() != null) {
|
||||||
if(puntoVenta.getDiversosId().getPosicao() .equals("FEL")){
|
if (puntoVenta.getDiversosId().getPosicao().equals("FEL")) {
|
||||||
cmbPosicao.setSelectedIndex(0);
|
cmbPosicao.setSelectedIndex(0);
|
||||||
}else if(puntoVenta.getDiversosId().getPosicao() .equals("EL")){
|
} else if (puntoVenta.getDiversosId().getPosicao().equals("EL")) {
|
||||||
cmbPosicao.setSelectedIndex(1);
|
cmbPosicao.setSelectedIndex(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (puntoVenta.getDiversosId().getVendaInternet() != null) {
|
||||||
|
if (puntoVenta.getDiversosId().getVendaInternet()) {
|
||||||
if(puntoVenta.getDiversosId().getVendaInternet()!= null){
|
|
||||||
if(puntoVenta.getDiversosId().getVendaInternet()){
|
|
||||||
checkVendaInternet.setChecked(true);
|
checkVendaInternet.setChecked(true);
|
||||||
}else{
|
} else {
|
||||||
checkVendaInternet.setChecked(false);
|
checkVendaInternet.setChecked(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(puntoVenta.getDiversosId().getTeleEntrega()!= null){
|
if (puntoVenta.getDiversosId().getTeleEntrega() != null) {
|
||||||
if(puntoVenta.getDiversosId().getTeleEntrega()){
|
if (puntoVenta.getDiversosId().getTeleEntrega()) {
|
||||||
checkTeleEntrega.setChecked(true);
|
checkTeleEntrega.setChecked(true);
|
||||||
}else{
|
} else {
|
||||||
checkTeleEntrega.setChecked(false);
|
checkTeleEntrega.setChecked(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(puntoVenta.getDiversosId().getDigitacaoSeq()!= null){
|
if (puntoVenta.getDiversosId().getDigitacaoSeq() != null) {
|
||||||
if(puntoVenta.getDiversosId().getDigitacaoSeq()){
|
if (puntoVenta.getDiversosId().getDigitacaoSeq()) {
|
||||||
checkDigitacao.setChecked(true);
|
checkDigitacao.setChecked(true);
|
||||||
}else{
|
} else {
|
||||||
checkDigitacao.setChecked(false);
|
checkDigitacao.setChecked(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(puntoVenta.getDiversosId().getTrabalhaBilhete()!= null){
|
if (puntoVenta.getDiversosId().getTrabalhaBilhete() != null) {
|
||||||
if(puntoVenta.getDiversosId().getTrabalhaBilhete()){
|
if (puntoVenta.getDiversosId().getTrabalhaBilhete()) {
|
||||||
checkBilhete.setChecked(true);
|
checkBilhete.setChecked(true);
|
||||||
}else{
|
} else {
|
||||||
checkBilhete.setChecked(false);
|
checkBilhete.setChecked(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(puntoVenta.getDiversosId().getOfpsPropria()!= null){
|
if (puntoVenta.getDiversosId().getOfpsPropria() != null) {
|
||||||
if(puntoVenta.getDiversosId().getOfpsPropria()){
|
if (puntoVenta.getDiversosId().getOfpsPropria()) {
|
||||||
checkOfpsPropria.setChecked(true);
|
checkOfpsPropria.setChecked(true);
|
||||||
}else{
|
} else {
|
||||||
checkOfpsPropria.setChecked(false);
|
checkOfpsPropria.setChecked(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(puntoVenta.getDiversosId().getOfpsTerceiros()!= null){
|
if (puntoVenta.getDiversosId().getOfpsTerceiros() != null) {
|
||||||
if(puntoVenta.getDiversosId().getOfpsTerceiros()){
|
if (puntoVenta.getDiversosId().getOfpsTerceiros()) {
|
||||||
checkOfpsTerceiros.setChecked(true);
|
checkOfpsTerceiros.setChecked(true);
|
||||||
}else{
|
} else {
|
||||||
checkOfpsTerceiros.setChecked(false);
|
checkOfpsTerceiros.setChecked(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
} else {
|
||||||
puntoVenta.setDiversosId(new PtovtaDiversos());
|
puntoVenta.setDiversosId(new PtovtaDiversos());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (puntoVenta.getPuntoventaId() != null) {
|
if (puntoVenta.getPuntoventaId() != null) {
|
||||||
if(puntoVenta.getTitularId() != null){
|
if (puntoVenta.getTitularId() != null) {
|
||||||
if (puntoVenta.getTitularId().getImagem() != null) {
|
if (puntoVenta.getTitularId().getImagem() != null) {
|
||||||
img.setContent(new org.zkoss.image.AImage("imagem",
|
img.setContent(new org.zkoss.image.AImage("imagem",
|
||||||
puntoVenta.getTitularId().getImagem() ));
|
puntoVenta.getTitularId().getImagem()));
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
puntoVenta.setTitularId(new PtovtaTitular());
|
puntoVenta.setTitularId(new PtovtaTitular());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
formaPagoList.setItemRenderer(new FormaPagoDetRender());
|
formaPagoList.setItemRenderer(new FormaPagoDetRender());
|
||||||
if (puntoVenta.getLsFormaPagoDet() == null) {
|
if (puntoVenta.getLsFormaPagoDet() == null) {
|
||||||
puntoVenta.setLsFormaPagoDet(new ArrayList<FormaPagoDet>());
|
puntoVenta.setLsFormaPagoDet(new ArrayList<FormaPagoDet>());
|
||||||
|
@ -578,7 +557,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
ptovtaEmpresaList.setItemRenderer(new PtovtaEmpresaRender());
|
ptovtaEmpresaList.setItemRenderer(new PtovtaEmpresaRender());
|
||||||
|
|
||||||
|
|
||||||
if (puntoVenta.getLsPtovtaEmpresa() == null) {
|
if (puntoVenta.getLsPtovtaEmpresa() == null) {
|
||||||
puntoVenta.setLsPtovtaEmpresa(new ArrayList<PtovtaEmpresa>());
|
puntoVenta.setLsPtovtaEmpresa(new ArrayList<PtovtaEmpresa>());
|
||||||
}
|
}
|
||||||
|
@ -586,9 +564,8 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
lsPtovtaEmpresa = puntoVenta.getLsPtovtaEmpresa();
|
lsPtovtaEmpresa = puntoVenta.getLsPtovtaEmpresa();
|
||||||
ptovtaEmpresaList.setData(lsPtovtaEmpresa);
|
ptovtaEmpresaList.setData(lsPtovtaEmpresa);
|
||||||
|
|
||||||
|
|
||||||
ptovtaAntecipaList.setItemRenderer(new PtovtaAntecipacomissaoRender());
|
ptovtaAntecipaList.setItemRenderer(new PtovtaAntecipacomissaoRender());
|
||||||
if(puntoVenta.getPtovtaAntecipacomissaoList() == null){
|
if (puntoVenta.getPtovtaAntecipacomissaoList() == null) {
|
||||||
puntoVenta.setPtovtaAntecipacomissaoList(new ArrayList<PtovtaAntecipacomissao>());
|
puntoVenta.setPtovtaAntecipacomissaoList(new ArrayList<PtovtaAntecipacomissao>());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -596,7 +573,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
ptovtaAntecipaList.setData(lsAntecipacomissao);
|
ptovtaAntecipaList.setData(lsAntecipacomissao);
|
||||||
|
|
||||||
ptovtaHorarioList.setItemRenderer(new PtovtaHorarioRender());
|
ptovtaHorarioList.setItemRenderer(new PtovtaHorarioRender());
|
||||||
if(puntoVenta.getPtovtaHorarioList() == null){
|
if (puntoVenta.getPtovtaHorarioList() == null) {
|
||||||
puntoVenta.setPtovtaHorarioList(new ArrayList<PtovtaHorario>());
|
puntoVenta.setPtovtaHorarioList(new ArrayList<PtovtaHorario>());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -604,11 +581,10 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
ptovtaHorarioList.setData(lsHorario);
|
ptovtaHorarioList.setData(lsHorario);
|
||||||
|
|
||||||
ptovtaEstoqueList.setItemRenderer(new PtovtaEstoqueRender());
|
ptovtaEstoqueList.setItemRenderer(new PtovtaEstoqueRender());
|
||||||
if(puntoVenta.getPtovtaEstoqueList() == null){
|
if (puntoVenta.getPtovtaEstoqueList() == null) {
|
||||||
puntoVenta.setPtovtaEstoqueList(new ArrayList<PtovtaEstoque>());
|
puntoVenta.setPtovtaEstoqueList(new ArrayList<PtovtaEstoque>());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
lsEstoque = puntoVenta.getPtovtaEstoqueList();
|
lsEstoque = puntoVenta.getPtovtaEstoqueList();
|
||||||
ptovtaEstoqueList.setData(lsEstoque);
|
ptovtaEstoqueList.setData(lsEstoque);
|
||||||
|
|
||||||
|
@ -637,17 +613,16 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
txtNome.focus();
|
txtNome.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void clearCombobox(Combobox combobox) {
|
public void clearCombobox(Combobox combobox) {
|
||||||
|
|
||||||
int size = combobox.getItemCount();
|
int size = combobox.getItemCount();
|
||||||
|
|
||||||
for (int i = size - 1; i >= 0; i--){
|
for (int i = size - 1; i >= 0; i--) {
|
||||||
combobox.removeItemAt(i);
|
combobox.removeItemAt(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void popularCombobox(Combobox cmbConta, Combobox cmbPessoa, Combobox cmbForm, Combobox cmbLote, Combobox cmbPosicao, Combobox cmbReceita) throws Exception{
|
public void popularCombobox(Combobox cmbConta, Combobox cmbPessoa, Combobox cmbForm, Combobox cmbLote, Combobox cmbPosicao, Combobox cmbReceita) throws Exception {
|
||||||
|
|
||||||
clearCombobox(cmbConta);
|
clearCombobox(cmbConta);
|
||||||
clearCombobox(cmbPessoa);
|
clearCombobox(cmbPessoa);
|
||||||
|
@ -655,37 +630,37 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
clearCombobox(cmbLote);
|
clearCombobox(cmbLote);
|
||||||
clearCombobox(cmbPosicao);
|
clearCombobox(cmbPosicao);
|
||||||
|
|
||||||
for(PtovtaAgencia.enumTipoConta p : PtovtaAgencia.enumTipoConta.values() ){
|
for (PtovtaAgencia.enumTipoConta p : PtovtaAgencia.enumTipoConta.values()) {
|
||||||
Comboitem comboItem = new Comboitem(p.descricao());
|
Comboitem comboItem = new Comboitem(p.descricao());
|
||||||
comboItem.setValue(p.valor());
|
comboItem.setValue(p.valor());
|
||||||
comboItem.setParent(cmbConta);
|
comboItem.setParent(cmbConta);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(PtovtaAgencia.enumTipoPessoa p : PtovtaAgencia.enumTipoPessoa.values() ){
|
for (PtovtaAgencia.enumTipoPessoa p : PtovtaAgencia.enumTipoPessoa.values()) {
|
||||||
Comboitem comboItem = new Comboitem(p.descricao());
|
Comboitem comboItem = new Comboitem(p.descricao());
|
||||||
comboItem.setValue(p.valor());
|
comboItem.setValue(p.valor());
|
||||||
comboItem.setParent(cmbPessoa);
|
comboItem.setParent(cmbPessoa);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(PtovtaEstoque.gerarEnum p : PtovtaEstoque.gerarEnum.values() ){
|
for (PtovtaEstoque.gerarEnum p : PtovtaEstoque.gerarEnum.values()) {
|
||||||
Comboitem comboItem = new Comboitem(p.descricao());
|
Comboitem comboItem = new Comboitem(p.descricao());
|
||||||
comboItem.setValue(p.valor());
|
comboItem.setValue(p.valor());
|
||||||
comboItem.setParent(cmbLote);
|
comboItem.setParent(cmbLote);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(PtovtaEstoque.gerarEnum p : PtovtaEstoque.gerarEnum.values() ){
|
for (PtovtaEstoque.gerarEnum p : PtovtaEstoque.gerarEnum.values()) {
|
||||||
Comboitem comboItem = new Comboitem(p.descricao());
|
Comboitem comboItem = new Comboitem(p.descricao());
|
||||||
comboItem.setValue(p.valor());
|
comboItem.setValue(p.valor());
|
||||||
comboItem.setParent(cmbForm);
|
comboItem.setParent(cmbForm);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(PtovtaDiversos.gerarEnum p : PtovtaDiversos.gerarEnum.values() ){
|
for (PtovtaDiversos.gerarEnum p : PtovtaDiversos.gerarEnum.values()) {
|
||||||
Comboitem comboItem = new Comboitem(p.descricao());
|
Comboitem comboItem = new Comboitem(p.descricao());
|
||||||
comboItem.setValue(p.valor());
|
comboItem.setValue(p.valor());
|
||||||
comboItem.setParent(cmbPosicao);
|
comboItem.setParent(cmbPosicao);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(PtovtaComissao.enumReceita p : PtovtaComissao.enumReceita.values() ){
|
for (PtovtaComissao.enumReceita p : PtovtaComissao.enumReceita.values()) {
|
||||||
Comboitem comboItem = new Comboitem(p.descricao());
|
Comboitem comboItem = new Comboitem(p.descricao());
|
||||||
comboItem.setValue(p.valor());
|
comboItem.setValue(p.valor());
|
||||||
comboItem.setParent(cmbReceita);
|
comboItem.setParent(cmbReceita);
|
||||||
|
@ -693,11 +668,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onSelect$cmbBanco() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void onSelect$cmbBanco(){
|
|
||||||
InstiFinanceira banco = (InstiFinanceira) cmbBanco.getSelectedItem().getValue();
|
InstiFinanceira banco = (InstiFinanceira) cmbBanco.getSelectedItem().getValue();
|
||||||
txtNomeBanco.setValue(banco.getNome());
|
txtNomeBanco.setValue(banco.getNome());
|
||||||
|
|
||||||
|
@ -724,7 +695,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String replaceTextbox(Textbox textbox){
|
public String replaceTextbox(Textbox textbox) {
|
||||||
String getString = textbox.getValue();
|
String getString = textbox.getValue();
|
||||||
getString = getString.replace("(", "");
|
getString = getString.replace("(", "");
|
||||||
getString = getString.replaceAll("_", "");
|
getString = getString.replaceAll("_", "");
|
||||||
|
@ -736,6 +707,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
public void onClick$btnSalvar(Event ev) throws InterruptedException {
|
public void onClick$btnSalvar(Event ev) throws InterruptedException {
|
||||||
|
|
||||||
|
txtMaxCancelacion.getValue();
|
||||||
txtNome.getValue();
|
txtNome.getValue();
|
||||||
txtNumPtoVta.getValue();
|
txtNumPtoVta.getValue();
|
||||||
txtNumFax.getValue();
|
txtNumFax.getValue();
|
||||||
|
@ -779,7 +751,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
cmbTipoConta.getValue();
|
cmbTipoConta.getValue();
|
||||||
cmbPosicao.getValue();
|
cmbPosicao.getValue();
|
||||||
|
|
||||||
|
|
||||||
List<PuntoVenta> lsPuntoVenta = puntoVentaService.buscaPuntoVenta(txtNumPtoVta.getValue());
|
List<PuntoVenta> lsPuntoVenta = puntoVentaService.buscaPuntoVenta(txtNumPtoVta.getValue());
|
||||||
|
|
||||||
if (!lsPuntoVenta.isEmpty()) {
|
if (!lsPuntoVenta.isEmpty()) {
|
||||||
|
@ -787,11 +758,11 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean evaluate(Object object) {
|
public boolean evaluate(Object object) {
|
||||||
return ((PuntoVenta)object).getPuntoventaId().equals(puntoVenta.getPuntoventaId());
|
return ((PuntoVenta) object).getPuntoventaId().equals(puntoVenta.getPuntoventaId());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!exists){
|
if (!exists) {
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
Labels.getLabel("editarPuntoVentaController.registroNumPtoVtaExiste"),
|
Labels.getLabel("editarPuntoVentaController.registroNumPtoVtaExiste"),
|
||||||
Labels.getLabel("editarPuntoVentaController.window.title"),
|
Labels.getLabel("editarPuntoVentaController.window.title"),
|
||||||
|
@ -853,35 +824,35 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
puntoVenta.setPtovtaHorarioList(lsHorario);
|
puntoVenta.setPtovtaHorarioList(lsHorario);
|
||||||
puntoVenta.setPtovtaEstoqueList(lsEstoque);
|
puntoVenta.setPtovtaEstoqueList(lsEstoque);
|
||||||
String getString = null;
|
String getString = null;
|
||||||
if(!txtNumFax.getValue().equals("")){
|
if (!txtNumFax.getValue().equals("")) {
|
||||||
getString = this.replaceTextbox(txtNumFax);
|
getString = this.replaceTextbox(txtNumFax);
|
||||||
if(getString.length()>= 11){
|
if (getString.length() >= 11) {
|
||||||
puntoVenta.setNumfax(txtNumFax.getValue().replace("_", ""));
|
puntoVenta.setNumfax(txtNumFax.getValue().replace("_", ""));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!numtelefonouno.getValue().equals("")){
|
if (!numtelefonouno.getValue().equals("")) {
|
||||||
getString = this.replaceTextbox(numtelefonouno);
|
getString = this.replaceTextbox(numtelefonouno);
|
||||||
if(getString.length()>= 11){
|
if (getString.length() >= 11) {
|
||||||
puntoVenta.setNumtelefonouno(numtelefonouno.getValue().replace("_", ""));
|
puntoVenta.setNumtelefonouno(numtelefonouno.getValue().replace("_", ""));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(!numtelefonodos.getValue().equals("")){
|
if (!numtelefonodos.getValue().equals("")) {
|
||||||
getString = this.replaceTextbox(numtelefonodos);
|
getString = this.replaceTextbox(numtelefonodos);
|
||||||
if(getString.length()>= 11){
|
if (getString.length() >= 11) {
|
||||||
puntoVenta.setNumtelefonodos(numtelefonodos.getValue().replace("_", ""));
|
puntoVenta.setNumtelefonodos(numtelefonodos.getValue().replace("_", ""));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
puntoVenta.setIndValidaStock(checkStock.isChecked());
|
puntoVenta.setIndValidaStock(checkStock.isChecked());
|
||||||
|
|
||||||
if(cmbBanco.getSelectedItem()== null){
|
if (cmbBanco.getSelectedItem() == null) {
|
||||||
puntoVenta.setAgenciaId(null);
|
puntoVenta.setAgenciaId(null);
|
||||||
}else{
|
} else {
|
||||||
puntoVenta.getAgenciaId().setInstiFinanceiraId((InstiFinanceira) cmbBanco.getSelectedItem().getValue());
|
puntoVenta.getAgenciaId().setInstiFinanceiraId((InstiFinanceira) cmbBanco.getSelectedItem().getValue());
|
||||||
if (cmbPessoa.getSelectedItem() != null){
|
if (cmbPessoa.getSelectedItem() != null) {
|
||||||
puntoVenta.getAgenciaId().setPessoa((String) cmbPessoa.getSelectedItem().getValue());
|
puntoVenta.getAgenciaId().setPessoa((String) cmbPessoa.getSelectedItem().getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cmbTipoConta.getSelectedItem() != null){
|
if (cmbTipoConta.getSelectedItem() != null) {
|
||||||
puntoVenta.getAgenciaId().setTipo((String) cmbTipoConta.getSelectedItem().getValue());
|
puntoVenta.getAgenciaId().setTipo((String) cmbTipoConta.getSelectedItem().getValue());
|
||||||
}
|
}
|
||||||
puntoVenta.getAgenciaId().setActivo(Boolean.TRUE);
|
puntoVenta.getAgenciaId().setActivo(Boolean.TRUE);
|
||||||
|
@ -889,20 +860,20 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
puntoVenta.getAgenciaId().setFecmodif(Calendar.getInstance().getTime());
|
puntoVenta.getAgenciaId().setFecmodif(Calendar.getInstance().getTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(txtTitularCpf.getValue().equals("")){
|
if (txtTitularCpf.getValue().equals("")) {
|
||||||
puntoVenta.setTitularId(null);
|
puntoVenta.setTitularId(null);
|
||||||
}else{
|
} else {
|
||||||
puntoVenta.getTitularId().setActivo(Boolean.TRUE);
|
puntoVenta.getTitularId().setActivo(Boolean.TRUE);
|
||||||
puntoVenta.getTitularId().setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
puntoVenta.getTitularId().setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
puntoVenta.getTitularId().setFecmodif(Calendar.getInstance().getTime());
|
puntoVenta.getTitularId().setFecmodif(Calendar.getInstance().getTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
if((txtIss.getValue().equals(""))&&(txtRoyaties.getValue().equals("")) && (txtExcessoAlta.getValue().equals(""))
|
if ((txtIss.getValue().equals("")) && (txtRoyaties.getValue().equals("")) && (txtExcessoAlta.getValue().equals(""))
|
||||||
&&(txtExcessoBaixa.getValue().equals(""))&&(txtPassagemBaixa.getValue().equals(""))
|
&& (txtExcessoBaixa.getValue().equals("")) && (txtPassagemBaixa.getValue().equals(""))
|
||||||
&&(txtPassagemAlta.getValue().equals(""))&&(txtSeguroBaixa.getValue().equals("")) ){
|
&& (txtPassagemAlta.getValue().equals("")) && (txtSeguroBaixa.getValue().equals(""))) {
|
||||||
puntoVenta.setComissaoId(null);
|
puntoVenta.setComissaoId(null);
|
||||||
}else{
|
} else {
|
||||||
if (cmbReceita.getSelectedItem() != null){
|
if (cmbReceita.getSelectedItem() != null) {
|
||||||
puntoVenta.getComissaoId().setReceita((String) cmbReceita.getSelectedItem().getValue());
|
puntoVenta.getComissaoId().setReceita((String) cmbReceita.getSelectedItem().getValue());
|
||||||
}
|
}
|
||||||
puntoVenta.getComissaoId().setEnviarrecibo(checkRecibo.isChecked());
|
puntoVenta.getComissaoId().setEnviarrecibo(checkRecibo.isChecked());
|
||||||
|
@ -929,9 +900,9 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
puntoVenta.getComissaoId().setFecmodif(Calendar.getInstance().getTime());
|
puntoVenta.getComissaoId().setFecmodif(Calendar.getInstance().getTime());
|
||||||
}
|
}
|
||||||
|
|
||||||
if((txtResponAluguel.getValue().equals("")&&(txtResponTel.getValue().equals("")))){
|
if ((txtResponAluguel.getValue().equals("") && (txtResponTel.getValue().equals("")))) {
|
||||||
puntoVenta.setDiversosId(null);
|
puntoVenta.setDiversosId(null);
|
||||||
}else{
|
} else {
|
||||||
puntoVenta.getDiversosId().setBilheteInfo(checkBilheteInfo.isChecked());
|
puntoVenta.getDiversosId().setBilheteInfo(checkBilheteInfo.isChecked());
|
||||||
puntoVenta.getDiversosId().setInformatizada(checkInformatizada.isChecked());
|
puntoVenta.getDiversosId().setInformatizada(checkInformatizada.isChecked());
|
||||||
puntoVenta.getDiversosId().setVendaInternet(checkVendaInternet.isChecked());
|
puntoVenta.getDiversosId().setVendaInternet(checkVendaInternet.isChecked());
|
||||||
|
@ -943,15 +914,12 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
puntoVenta.getDiversosId().setActivo(Boolean.TRUE);
|
puntoVenta.getDiversosId().setActivo(Boolean.TRUE);
|
||||||
puntoVenta.getDiversosId().setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
puntoVenta.getDiversosId().setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
puntoVenta.getDiversosId().setFecmodif(Calendar.getInstance().getTime());
|
puntoVenta.getDiversosId().setFecmodif(Calendar.getInstance().getTime());
|
||||||
if(cmbPosicao.getSelectedItem() != null){
|
if (cmbPosicao.getSelectedItem() != null) {
|
||||||
puntoVenta.getDiversosId().setPosicao((String) cmbPosicao.getSelectedItem().getValue());
|
puntoVenta.getDiversosId().setPosicao((String) cmbPosicao.getSelectedItem().getValue());
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
List<PtovtaEmpresa> lsPto = new ArrayList<PtovtaEmpresa>();
|
List<PtovtaEmpresa> lsPto = new ArrayList<PtovtaEmpresa>();
|
||||||
for (PtovtaEmpresa pto : lsPtovtaEmpresa) {
|
for (PtovtaEmpresa pto : lsPtovtaEmpresa) {
|
||||||
if (!pto.getActivo()) {
|
if (!pto.getActivo()) {
|
||||||
|
@ -982,7 +950,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
if (puntoVenta.getPuntoventaId() == null) {
|
if (puntoVenta.getPuntoventaId() == null) {
|
||||||
puntoVentaService.suscribir(puntoVenta);
|
puntoVentaService.suscribir(puntoVenta);
|
||||||
puntoVentaList.addItem(puntoVenta);
|
puntoVentaList.addItemNovo(puntoVenta);
|
||||||
} else {
|
} else {
|
||||||
puntoVentaService.actualizacion(puntoVenta);
|
puntoVentaService.actualizacion(puntoVenta);
|
||||||
puntoVentaList.updateItem(puntoVenta);
|
puntoVentaList.updateItem(puntoVenta);
|
||||||
|
@ -1030,7 +998,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void uploadPhoto(UploadEvent event) {
|
public void uploadPhoto(UploadEvent event) {
|
||||||
org.zkoss.util.media.Media media = event.getMedia();
|
org.zkoss.util.media.Media media = event.getMedia();
|
||||||
|
|
||||||
|
@ -1053,15 +1020,13 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onClick$btnSalvarAntecipa() throws InterruptedException {
|
||||||
public void onClick$btnSalvarAntecipa()throws InterruptedException{
|
|
||||||
dateAntecipData.getValue();
|
dateAntecipData.getValue();
|
||||||
txtAntecipRetem.getValue();
|
txtAntecipRetem.getValue();
|
||||||
txtAntecipPercentual.getValue();
|
txtAntecipPercentual.getValue();
|
||||||
try {
|
try {
|
||||||
PtovtaAntecipacomissao antecipa = new PtovtaAntecipacomissao();
|
PtovtaAntecipacomissao antecipa = new PtovtaAntecipacomissao();
|
||||||
|
|
||||||
|
|
||||||
antecipa.setData(dateAntecipData.getValue());
|
antecipa.setData(dateAntecipData.getValue());
|
||||||
antecipa.setPercentual(txtAntecipPercentual.getValueDecimal());
|
antecipa.setPercentual(txtAntecipPercentual.getValueDecimal());
|
||||||
antecipa.setRetem(txtAntecipRetem.getValueDecimal());
|
antecipa.setRetem(txtAntecipRetem.getValueDecimal());
|
||||||
|
@ -1074,8 +1039,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
lsAntecipacomissao.add(antecipa);
|
lsAntecipacomissao.add(antecipa);
|
||||||
ptovtaAntecipaList.setData(lsAntecipacomissao);
|
ptovtaAntecipaList.setData(lsAntecipacomissao);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error(ex);
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
|
@ -1085,7 +1048,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void onClick$btnApagarAntecipa() {
|
public void onClick$btnApagarAntecipa() {
|
||||||
try {
|
try {
|
||||||
PtovtaAntecipacomissao antecipa = (PtovtaAntecipacomissao) ptovtaAntecipaList.getSelected();
|
PtovtaAntecipacomissao antecipa = (PtovtaAntecipacomissao) ptovtaAntecipaList.getSelected();
|
||||||
|
@ -1102,15 +1064,12 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onClick$btnSalvarHorario() throws InterruptedException {
|
||||||
public void onClick$btnSalvarHorario()throws InterruptedException{
|
|
||||||
timeboxInicio.getValue();
|
timeboxInicio.getValue();
|
||||||
timeboxFim.getValue();
|
timeboxFim.getValue();
|
||||||
try {
|
try {
|
||||||
PtovtaHorario horario = new PtovtaHorario();
|
PtovtaHorario horario = new PtovtaHorario();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
horario.setInicio(timeboxInicio.getValue());
|
horario.setInicio(timeboxInicio.getValue());
|
||||||
horario.setFim(timeboxFim.getValue());
|
horario.setFim(timeboxFim.getValue());
|
||||||
horario.setPuntoventaId(puntoVenta);
|
horario.setPuntoventaId(puntoVenta);
|
||||||
|
@ -1121,8 +1080,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
lsHorario.add(horario);
|
lsHorario.add(horario);
|
||||||
ptovtaHorarioList.setData(lsHorario);
|
ptovtaHorarioList.setData(lsHorario);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error(ex);
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
|
@ -1148,8 +1105,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void onClick$btnSalvarEstoque() throws InterruptedException {
|
||||||
public void onClick$btnSalvarEstoque()throws InterruptedException{
|
|
||||||
txtEspecie.getValue();
|
txtEspecie.getValue();
|
||||||
cmbForm.getValue();
|
cmbForm.getValue();
|
||||||
txtQuant.getValue();
|
txtQuant.getValue();
|
||||||
|
@ -1157,12 +1113,11 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
try {
|
try {
|
||||||
PtovtaEstoque estoque = new PtovtaEstoque();
|
PtovtaEstoque estoque = new PtovtaEstoque();
|
||||||
|
|
||||||
|
|
||||||
estoque.setEspecie(txtEspecie.getValue());
|
estoque.setEspecie(txtEspecie.getValue());
|
||||||
if(cmbForm.getSelectedItem() != null){
|
if (cmbForm.getSelectedItem() != null) {
|
||||||
estoque.setFormCont( Integer.valueOf((String) cmbForm.getSelectedItem().getValue()));
|
estoque.setFormCont(Integer.valueOf((String) cmbForm.getSelectedItem().getValue()));
|
||||||
}
|
}
|
||||||
if(cmbLote.getSelectedItem() != null){
|
if (cmbLote.getSelectedItem() != null) {
|
||||||
estoque.setLoteform(Integer.valueOf((String) cmbLote.getSelectedItem().getValue()));
|
estoque.setLoteform(Integer.valueOf((String) cmbLote.getSelectedItem().getValue()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1176,8 +1131,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
lsEstoque.add(estoque);
|
lsEstoque.add(estoque);
|
||||||
ptovtaEstoqueList.setData(lsEstoque);
|
ptovtaEstoqueList.setData(lsEstoque);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
log.error(ex);
|
log.error(ex);
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
|
@ -1475,11 +1428,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public PuntoVenta getPuntoVenta() {
|
public PuntoVenta getPuntoVenta() {
|
||||||
return puntoVenta;
|
return puntoVenta;
|
||||||
}
|
}
|
||||||
|
@ -1492,7 +1440,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
return puntoVentaList;
|
return puntoVentaList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public MyListbox getAntecipaList() {
|
public MyListbox getAntecipaList() {
|
||||||
return ptovtaAntecipaList;
|
return ptovtaAntecipaList;
|
||||||
}
|
}
|
||||||
|
@ -1537,7 +1484,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
this.lsEmpresas = lsEmpresas;
|
this.lsEmpresas = lsEmpresas;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public List<PuntoVenta> getLsDestino() {
|
public List<PuntoVenta> getLsDestino() {
|
||||||
return lsDestino;
|
return lsDestino;
|
||||||
}
|
}
|
||||||
|
@ -1554,7 +1500,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
this.lsAntecipacomissao = lsAntecipacomissao;
|
this.lsAntecipacomissao = lsAntecipacomissao;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public List<PtovtaHorario> getLsHorario() {
|
public List<PtovtaHorario> getLsHorario() {
|
||||||
return lsHorario;
|
return lsHorario;
|
||||||
}
|
}
|
||||||
|
@ -1619,7 +1564,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
this.cmbPessoa = cmbPessoa;
|
this.cmbPessoa = cmbPessoa;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Image getImg() {
|
public Image getImg() {
|
||||||
return img;
|
return img;
|
||||||
}
|
}
|
||||||
|
@ -1865,8 +1809,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
this.txtNumAg = txtNumAg;
|
this.txtNumAg = txtNumAg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public List<UsuarioBancario> getLsUsuarioBancario() {
|
public List<UsuarioBancario> getLsUsuarioBancario() {
|
||||||
return lsUsuarioBancario;
|
return lsUsuarioBancario;
|
||||||
}
|
}
|
||||||
|
@ -1883,8 +1825,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
this.lsParamRecoleccion = lsParamRecoleccion;
|
this.lsParamRecoleccion = lsParamRecoleccion;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public MyTextboxDecimal getTxtPassagemBaixa() {
|
public MyTextboxDecimal getTxtPassagemBaixa() {
|
||||||
return txtPassagemBaixa;
|
return txtPassagemBaixa;
|
||||||
}
|
}
|
||||||
|
@ -1965,8 +1905,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
this.txtRoyaties = txtRoyaties;
|
this.txtRoyaties = txtRoyaties;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public Intbox getTxtQuant() {
|
public Intbox getTxtQuant() {
|
||||||
return txtQuant;
|
return txtQuant;
|
||||||
}
|
}
|
||||||
|
@ -1983,9 +1921,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
this.txtcodAg = txtcodAg;
|
this.txtcodAg = txtcodAg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public MyTextbox getTxtNumFax() {
|
public MyTextbox getTxtNumFax() {
|
||||||
return txtNumFax;
|
return txtNumFax;
|
||||||
}
|
}
|
||||||
|
@ -2050,8 +1985,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
this.txtCarga = txtCarga;
|
this.txtCarga = txtCarga;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public Datebox getDateAntecipData() {
|
public Datebox getDateAntecipData() {
|
||||||
return dateAntecipData;
|
return dateAntecipData;
|
||||||
}
|
}
|
||||||
|
@ -2076,7 +2009,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
this.txtAntecipPercentual = txtAntecipPercentual;
|
this.txtAntecipPercentual = txtAntecipPercentual;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public Timebox getTimeboxInicio() {
|
public Timebox getTimeboxInicio() {
|
||||||
return timeboxInicio;
|
return timeboxInicio;
|
||||||
}
|
}
|
||||||
|
@ -2101,7 +2033,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
this.paramRecoleccionList = paramRecoleccionList;
|
this.paramRecoleccionList = paramRecoleccionList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public List<PtovtaEmpresa> getLsPtovtaEmpresa() {
|
public List<PtovtaEmpresa> getLsPtovtaEmpresa() {
|
||||||
return lsPtovtaEmpresa;
|
return lsPtovtaEmpresa;
|
||||||
}
|
}
|
||||||
|
@ -2110,7 +2041,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
this.lsPtovtaEmpresa = lsPtovtaEmpresa;
|
this.lsPtovtaEmpresa = lsPtovtaEmpresa;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public MyListbox getPtovtaEmpresaList() {
|
public MyListbox getPtovtaEmpresaList() {
|
||||||
return ptovtaEmpresaList;
|
return ptovtaEmpresaList;
|
||||||
}
|
}
|
||||||
|
@ -2135,5 +2065,4 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
this.ptovtaUsuarioBancarioList = ptovtaUsuarioBancarioList;
|
this.ptovtaUsuarioBancarioList = ptovtaUsuarioBancarioList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarPuntoVenta"?>
|
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarPuntoVenta"?>
|
||||||
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||||
|
|
||||||
|
|
||||||
<zk xmlns="http://www.zkoss.org/2005/zul">
|
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||||
<window id="winEditarPuntoVenta" border="normal"
|
<window id="winEditarPuntoVenta" border="normal"
|
||||||
apply="${editarPuntoVentaController}" height="575px" width="640px"
|
apply="${editarPuntoVentaController}" height="575px" width="640px"
|
||||||
|
|
Loading…
Reference in New Issue