From d19dbf7be36bd57173ad742f432fa8197c2fb544 Mon Sep 17 00:00:00 2001 From: francescods Date: Wed, 7 May 2025 10:16:27 +0200 Subject: [PATCH] completamento modifica MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit in azzera() i pulsanti del pannello categorie vengono disabilitati solo se il flagPrecaricaLista รจ falso --- src/puntocassa/PuntoCassa.java | 42 ++++++++++++++++------------------ 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/src/puntocassa/PuntoCassa.java b/src/puntocassa/PuntoCassa.java index 1c4340b..eef7015 100644 --- a/src/puntocassa/PuntoCassa.java +++ b/src/puntocassa/PuntoCassa.java @@ -3434,7 +3434,7 @@ public class PuntoCassa extends JFrame implements ActionListener { if ((saldo - calcolaTotale()) < 0) { JOptionPane.showMessageDialog(this, "Saldo insufficiente!", "Saldo", JOptionPane.OK_OPTION); logTessera(); - azzera(); + //azzera(); return true; } } @@ -3906,9 +3906,7 @@ public class PuntoCassa extends JFrame implements ActionListener { private void azzera() { try { MyTableModel model = (MyTableModel) tblLista.getModel(); - MyTableModel model1 = (MyTableModel) tblLista1.getModel(); - /*clearTable(model); - clearTable(model1);*/ + MyTableModel model1 = (MyTableModel) tblLista1.getModel(); model.clearTable(); model1.clearTable(); } catch (Exception e) { @@ -3924,6 +3922,7 @@ public class PuntoCassa extends JFrame implements ActionListener { pnlCategorie.setVisible(false); pnlProdotti.setVisible(false); + if (flagPrecaricaLista == false) { abilitaPulsanti(pnlCategorie, false, false); abilitaPulsanti(pnlProdotti, false, false); @@ -3974,23 +3973,23 @@ public class PuntoCassa extends JFrame implements ActionListener { gratuitaResidue = 0; //9-5-18<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - if (flagPrecaricaLista) { + if (flagPrecaricaLista && !isCassaAperta) { apriCassaDefault(); } } public void apriCassaDefault() { - lblCategoria.setText(""); - lblCognome.setText(""); - lblNome.setText(""); - lblNascita.setText(""); - lblScadTessera.setText(""); - lblAzienda.setText(""); - lblConvenzione.setText(""); - lblFascia.setText(""); + //lblCategoria.setText(""); + //lblCognome.setText(""); + //lblNome.setText(""); + //lblNascita.setText(""); + //lblScadTessera.setText(""); + //lblAzienda.setText(""); + //lblConvenzione.setText(""); + //lblFascia.setText(""); - if (isCassaAperta == false) { + //if (isCassaAperta == false) { turnoAttuale(); if ((idTurnoAttuale - idTurno) != 0) { @@ -4025,12 +4024,12 @@ public class PuntoCassa extends JFrame implements ActionListener { isCassaAperta = true; idProfiloTariffario = idProfiloTariffarioDefault;//0L - setModoPagamento(modoPagamentoDefault); + //setModoPagamento(modoPagamentoDefault); this.caricaPannello(); - abilitaPulsanti(pnlCategorie, true, true); + //abilitaPulsanti(pnlCategorie, true, true); jbtnChiudi.setEnabled(false); - } + //} } /** @@ -4061,8 +4060,7 @@ public class PuntoCassa extends JFrame implements ActionListener { String dati[] = res.split("\\|", -1); Date now = new Date(); - - Date scadenza = new Date(); + SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy"); idProfiloTariffario = Long.valueOf(dati[12]); @@ -4124,7 +4122,7 @@ public class PuntoCassa extends JFrame implements ActionListener { //aggiungo un giorno altrimenti in caso di scadenza nello stesso giorno //considera le ore - scadenza = formatter.parse(dati[9]); + Date scadenza = formatter.parse(dati[9]); Calendar c = Calendar.getInstance(); c.setTime(scadenza); c.add(Calendar.DATE, 1); @@ -4177,7 +4175,7 @@ public class PuntoCassa extends JFrame implements ActionListener { if (modoPagamento.equalsIgnoreCase("A scalare")) { //modifica 09-11-18 if (calcolaTotale() >= 0.00 && flagPrecaricaLista == false) { - verificaSaldo(numeroTessera); + //verificaSaldo(numeroTessera); } //fine modifica @@ -4218,7 +4216,7 @@ public class PuntoCassa extends JFrame implements ActionListener { //modifica 09-11-18 if (modoPagamento.equalsIgnoreCase("A scalare")) { if (calcolaTotale() >= 0.00 && flagPrecaricaLista) { - verificaSaldo(numeroTessera); + //verificaSaldo(numeroTessera); } } //fine modifica