Line 22... |
Line 22... |
22 |
import org.openconcerto.sql.model.SQLBase;
|
22 |
import org.openconcerto.sql.model.SQLBase;
|
23 |
import org.openconcerto.sql.model.SQLRow;
|
23 |
import org.openconcerto.sql.model.SQLRow;
|
24 |
import org.openconcerto.sql.model.SQLRowAccessor;
|
24 |
import org.openconcerto.sql.model.SQLRowAccessor;
|
25 |
import org.openconcerto.sql.model.SQLRowValues;
|
25 |
import org.openconcerto.sql.model.SQLRowValues;
|
26 |
import org.openconcerto.sql.model.SQLTable;
|
26 |
import org.openconcerto.sql.model.SQLTable;
|
- |
|
27 |
import org.openconcerto.sql.request.SQLFieldTranslator;
|
27 |
import org.openconcerto.sql.sqlobject.ElementComboBox;
|
28 |
import org.openconcerto.sql.sqlobject.ElementComboBox;
|
28 |
import org.openconcerto.ui.DefaultGridBagConstraints;
|
29 |
import org.openconcerto.ui.DefaultGridBagConstraints;
|
29 |
import org.openconcerto.ui.TitledSeparator;
|
30 |
import org.openconcerto.ui.TitledSeparator;
|
30 |
import org.openconcerto.ui.preferences.DefaultPreferencePanel;
|
31 |
import org.openconcerto.ui.preferences.DefaultPreferencePanel;
|
31 |
|
32 |
|
Line 34... |
Line 35... |
34 |
import java.awt.Insets;
|
35 |
import java.awt.Insets;
|
35 |
import java.sql.SQLException;
|
36 |
import java.sql.SQLException;
|
36 |
|
37 |
|
37 |
import javax.swing.JCheckBox;
|
38 |
import javax.swing.JCheckBox;
|
38 |
import javax.swing.JLabel;
|
39 |
import javax.swing.JLabel;
|
- |
|
40 |
import javax.swing.JOptionPane;
|
39 |
import javax.swing.JPanel;
|
41 |
import javax.swing.JPanel;
|
- |
|
42 |
import javax.swing.SwingUtilities;
|
40 |
|
43 |
|
41 |
public class CompteGestCommPreferencePanel extends DefaultPreferencePanel {
|
44 |
public class CompteGestCommPreferencePanel extends DefaultPreferencePanel {
|
42 |
|
45 |
|
43 |
private ISQLCompteSelector selCompteTVAIntraComm, selCompteFourn, selCompteAchat, selCompteValeurEncaissement, selCompteAvanceClient, selCompteClient, selCompteVenteProduits,
|
46 |
private ISQLCompteSelector selCompteTVAIntraComm, selCompteFourn, selCompteAchat, selCompteValeurEncaissement, selCompteAvanceClient, selCompteClient, selCompteVenteProduits,
|
44 |
selCompteVenteService, selCompteTVACol, selCompteTVADed, selCompteTVAImmo, selCompteAchatIntra, selCompteFactor, selComptePortSoumis, selComptePortNonSoumis;
|
47 |
selCompteVenteService, selCompteTVACol, selCompteTVADed, selCompteTVAImmo, selCompteAchatIntra, selCompteFactor, selComptePortSoumis, selComptePortNonSoumis;
|
Line 336... |
Line 339... |
336 |
DefaultNXProps.getInstance().setProperty("HideCompteClient", String.valueOf(this.checkHideCompteClient.isSelected()));
|
339 |
DefaultNXProps.getInstance().setProperty("HideCompteClient", String.valueOf(this.checkHideCompteClient.isSelected()));
|
337 |
DefaultNXProps.getInstance().setProperty("HideCompteFacture", String.valueOf(this.checkHideCompteFacture.isSelected()));
|
340 |
DefaultNXProps.getInstance().setProperty("HideCompteFacture", String.valueOf(this.checkHideCompteFacture.isSelected()));
|
338 |
DefaultNXProps.getInstance().setProperty("HideAnalytique", String.valueOf(this.checkHideAnalytique.isSelected()));
|
341 |
DefaultNXProps.getInstance().setProperty("HideAnalytique", String.valueOf(this.checkHideAnalytique.isSelected()));
|
339 |
DefaultNXProps.getInstance().store();
|
342 |
DefaultNXProps.getInstance().store();
|
340 |
try {
|
343 |
try {
|
- |
|
344 |
final Object[] pb = this.rowPrefCompteVals.getInvalid();
|
- |
|
345 |
if (pb != null) {
|
- |
|
346 |
final SQLFieldTranslator trans = Configuration.getInstance().getTranslator();
|
- |
|
347 |
JOptionPane.showMessageDialog(SwingUtilities.getRoot(this), "Impossible de valider les modifications! Le champ <"
|
- |
|
348 |
+ trans.getLabelFor(this.rowPrefCompteVals.getTable().getField(pb[0].toString())) + "> pointe sur un compte invalide!(" + pb[1] + ")");
|
- |
|
349 |
} else {
|
341 |
this.rowPrefCompteVals.update();
|
350 |
this.rowPrefCompteVals.update();
|
- |
|
351 |
}
|
342 |
} catch (SQLException e) {
|
352 |
} catch (SQLException e) {
|
343 |
e.printStackTrace();
|
353 |
e.printStackTrace();
|
344 |
}
|
354 |
}
|
345 |
}
|
355 |
}
|
346 |
|
356 |
|