Line 42... |
Line 42... |
42 |
import javax.swing.JPanel;
|
42 |
import javax.swing.JPanel;
|
43 |
import javax.swing.SwingUtilities;
|
43 |
import javax.swing.SwingUtilities;
|
44 |
|
44 |
|
45 |
public class CompteGestCommPreferencePanel extends DefaultPreferencePanel {
|
45 |
public class CompteGestCommPreferencePanel extends DefaultPreferencePanel {
|
46 |
|
46 |
|
47 |
private ISQLCompteSelector selCompteTVAIntraComm, selCompteFourn, selCompteAchat, selCompteValeurEncaissement, selCompteAvanceClient, selCompteClient, selCompteVenteProduits,
|
47 |
private ISQLCompteSelector selCompteCBAttente, selCompteTVAIntraComm, selCompteFourn, selCompteAchat, selCompteValeurEncaissement, selCompteAvanceClient, selCompteClient, selCompteVenteProduits,
|
48 |
selCompteVenteService, selCompteTVACol, selCompteTVADed, selCompteTVAImmo, selCompteAchatIntra, selCompteFactor, selComptePortSoumis, selComptePortNonSoumis;
|
48 |
selCompteVenteService, selCompteTVACol, selCompteTVADed, selCompteTVAImmo, selCompteAchatIntra, selCompteFactor, selComptePortSoumis, selComptePortNonSoumis;
|
49 |
private ElementComboBox selJrnlFactor, selJrnlValEnc;
|
49 |
private ElementComboBox selJrnlFactor, selJrnlValEnc, selJrnlCB;
|
50 |
private final static SQLBase base = ((ComptaPropsConfiguration) Configuration.getInstance()).getSQLBaseSociete();
|
50 |
private final static SQLBase base = ((ComptaPropsConfiguration) Configuration.getInstance()).getSQLBaseSociete();
|
51 |
private static final SQLTable tablePrefCompte = base.getTable("PREFS_COMPTE");
|
51 |
private static final SQLTable tablePrefCompte = base.getTable("PREFS_COMPTE");
|
52 |
private SQLRowValues rowPrefCompteVals = new SQLRowValues(tablePrefCompte);
|
52 |
private SQLRowValues rowPrefCompteVals = new SQLRowValues(tablePrefCompte);
|
53 |
private JCheckBox checkLettrageAuto = new JCheckBox("Activer le lettrage automatique.");
|
53 |
private JCheckBox checkLettrageAuto = new JCheckBox("Activer le lettrage automatique.");
|
54 |
private JCheckBox checkHideCompteFacture = new JCheckBox("Ne pas afficher les comptes dans les factures.");
|
54 |
private JCheckBox checkHideCompteFacture = new JCheckBox("Ne pas afficher les comptes dans les factures.");
|
Line 184... |
Line 184... |
184 |
c.gridx++;
|
184 |
c.gridx++;
|
185 |
this.selJrnlValEnc = new ElementComboBox();
|
185 |
this.selJrnlValEnc = new ElementComboBox();
|
186 |
this.selJrnlValEnc.init(Configuration.getInstance().getDirectory().getElement("JOURNAL"));
|
186 |
this.selJrnlValEnc.init(Configuration.getInstance().getDirectory().getElement("JOURNAL"));
|
187 |
this.add(this.selJrnlValEnc, c);
|
187 |
this.add(this.selJrnlValEnc, c);
|
188 |
|
188 |
|
- |
|
189 |
// Journal
|
- |
|
190 |
c.gridy++;
|
- |
|
191 |
c.weightx = 0;
|
- |
|
192 |
c.gridx = 0;
|
- |
|
193 |
this.add(new JLabel("Journal CB Attente"), c);
|
- |
|
194 |
c.weightx = 1;
|
- |
|
195 |
c.gridx++;
|
- |
|
196 |
this.selJrnlCB = new ElementComboBox();
|
- |
|
197 |
this.selJrnlCB.init(Configuration.getInstance().getDirectory().getElement("JOURNAL"));
|
- |
|
198 |
this.add(this.selJrnlCB, c);
|
- |
|
199 |
|
- |
|
200 |
c.gridy++;
|
- |
|
201 |
c.weightx = 0;
|
- |
|
202 |
c.gridx = 0;
|
- |
|
203 |
this.add(new JLabel("Compte CB Attente"), c);
|
- |
|
204 |
c.weightx = 1;
|
- |
|
205 |
c.gridx++;
|
- |
|
206 |
this.selCompteCBAttente = new ISQLCompteSelector();
|
- |
|
207 |
this.selCompteCBAttente.init();
|
- |
|
208 |
this.add(this.selCompteCBAttente, c);
|
- |
|
209 |
|
189 |
// Compte vente produits
|
210 |
// Compte vente produits
|
190 |
c.gridy++;
|
211 |
c.gridy++;
|
191 |
c.weightx = 0;
|
212 |
c.weightx = 0;
|
192 |
c.gridx = 0;
|
213 |
c.gridx = 0;
|
193 |
this.add(new JLabel("Compte Vente de produits"), c);
|
214 |
this.add(new JLabel("Compte Vente de produits"), c);
|
Line 339... |
Line 360... |
339 |
this.rowPrefCompteVals.put("ID_JOURNAL_FACTOR", (selectedId > 1) ? selectedId : 1);
|
360 |
this.rowPrefCompteVals.put("ID_JOURNAL_FACTOR", (selectedId > 1) ? selectedId : 1);
|
340 |
|
361 |
|
341 |
final int selectedIdEnc = this.selJrnlValEnc.getSelectedId();
|
362 |
final int selectedIdEnc = this.selJrnlValEnc.getSelectedId();
|
342 |
this.rowPrefCompteVals.put("ID_JOURNAL_VALEUR_ENCAISSEMENT", (selectedIdEnc > 1) ? selectedIdEnc : 1);
|
363 |
this.rowPrefCompteVals.put("ID_JOURNAL_VALEUR_ENCAISSEMENT", (selectedIdEnc > 1) ? selectedIdEnc : 1);
|
343 |
|
364 |
|
- |
|
365 |
final int selectedIdCB = this.selJrnlCB.getSelectedId();
|
- |
|
366 |
this.rowPrefCompteVals.put("ID_JOURNAL_CB_ATTENTE", (selectedIdCB > 1) ? selectedIdCB : 1);
|
- |
|
367 |
this.rowPrefCompteVals.put("ID_COMPTE_PCE_CB_ATTENTE", this.selCompteCBAttente.getSelectedId() > 1 ? this.selCompteCBAttente.getSelectedId() : 1);
|
344 |
this.rowPrefCompteVals.put("ID_COMPTE_PCE_FOURNISSEUR", this.selCompteFourn.getValue());
|
368 |
this.rowPrefCompteVals.put("ID_COMPTE_PCE_FOURNISSEUR", this.selCompteFourn.getValue());
|
345 |
this.rowPrefCompteVals.put("ID_COMPTE_PCE_CLIENT", this.selCompteClient.getValue());
|
369 |
this.rowPrefCompteVals.put("ID_COMPTE_PCE_CLIENT", this.selCompteClient.getValue());
|
346 |
this.rowPrefCompteVals.put("ID_COMPTE_PCE_AVANCE_CLIENT", this.selCompteAvanceClient.getValue());
|
370 |
this.rowPrefCompteVals.put("ID_COMPTE_PCE_AVANCE_CLIENT", this.selCompteAvanceClient.getValue());
|
347 |
this.rowPrefCompteVals.put("ID_COMPTE_PCE_VALEUR_ENCAISSEMENT", this.selCompteValeurEncaissement.getValue());
|
371 |
this.rowPrefCompteVals.put("ID_COMPTE_PCE_VALEUR_ENCAISSEMENT", this.selCompteValeurEncaissement.getValue());
|
348 |
this.rowPrefCompteVals.put("ID_COMPTE_PCE_TVA_ACHAT", this.selCompteTVADed.getValue());
|
372 |
this.rowPrefCompteVals.put("ID_COMPTE_PCE_TVA_ACHAT", this.selCompteTVADed.getValue());
|
Line 478... |
Line 502... |
478 |
if (value <= 1) {
|
502 |
if (value <= 1) {
|
479 |
value = GenerationMvtSaisieVenteFacture.journal;
|
503 |
value = GenerationMvtSaisieVenteFacture.journal;
|
480 |
}
|
504 |
}
|
481 |
this.selJrnlFactor.setValue(value);
|
505 |
this.selJrnlFactor.setValue(value);
|
482 |
}
|
506 |
}
|
- |
|
507 |
|
- |
|
508 |
{
|
- |
|
509 |
// Journal CB
|
- |
|
510 |
int value = (this.rowPrefCompteVals.getObject("ID_JOURNAL_CB_ATTENTE") == null ? 1 : this.rowPrefCompteVals.getInt("ID_JOURNAL_CB_ATTENTE"));
|
- |
|
511 |
if (value > 1) {
|
- |
|
512 |
this.selJrnlCB.setValue(value);
|
- |
|
513 |
}
|
- |
|
514 |
|
- |
|
515 |
int valueCpt = (this.rowPrefCompteVals.getObject("ID_COMPTE_PCE_CB_ATTENTE") == null ? 1 : this.rowPrefCompteVals.getInt("ID_COMPTE_PCE_CB_ATTENTE"));
|
- |
|
516 |
if (valueCpt > 1) {
|
- |
|
517 |
this.selCompteCBAttente.setValue(valueCpt);
|
- |
|
518 |
}
|
- |
|
519 |
}
|
483 |
{
|
520 |
{
|
484 |
// Journal Val enc
|
521 |
// Journal Val enc
|
485 |
int value = (this.rowPrefCompteVals.getObject("ID_JOURNAL_VALEUR_ENCAISSEMENT") == null ? 1 : this.rowPrefCompteVals.getInt("ID_JOURNAL_VALEUR_ENCAISSEMENT"));
|
522 |
int value = (this.rowPrefCompteVals.getObject("ID_JOURNAL_VALEUR_ENCAISSEMENT") == null ? 1 : this.rowPrefCompteVals.getInt("ID_JOURNAL_VALEUR_ENCAISSEMENT"));
|
486 |
if (value <= 1) {
|
523 |
if (value <= 1) {
|
487 |
value = JournalSQLElement.BANQUES;
|
524 |
value = JournalSQLElement.BANQUES;
|