Line 1... |
Line 1... |
1 |
/*
|
1 |
/*
|
2 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
2 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
3 |
*
|
3 |
*
|
4 |
* Copyright 2011 OpenConcerto, by ILM Informatique. All rights reserved.
|
4 |
* Copyright 2011-2019 OpenConcerto, by ILM Informatique. All rights reserved.
|
5 |
*
|
5 |
*
|
6 |
* The contents of this file are subject to the terms of the GNU General Public License Version 3
|
6 |
* The contents of this file are subject to the terms of the GNU General Public License Version 3
|
7 |
* only ("GPL"). You may not use this file except in compliance with the License. You can obtain a
|
7 |
* only ("GPL"). You may not use this file except in compliance with the License. You can obtain a
|
8 |
* copy of the License at http://www.gnu.org/licenses/gpl-3.0.html See the License for the specific
|
8 |
* copy of the License at http://www.gnu.org/licenses/gpl-3.0.html See the License for the specific
|
9 |
* language governing permissions and limitations under the License.
|
9 |
* language governing permissions and limitations under the License.
|
Line 168... |
Line 168... |
168 |
if (row.getObject("ID_CATEGORIE_COMPTABLE") != null && !row.isForeignEmpty("ID_CATEGORIE_COMPTABLE")) {
|
168 |
if (row.getObject("ID_CATEGORIE_COMPTABLE") != null && !row.isForeignEmpty("ID_CATEGORIE_COMPTABLE")) {
|
169 |
table.setRowCatComptable(row.getForeign("ID_CATEGORIE_COMPTABLE"));
|
169 |
table.setRowCatComptable(row.getForeign("ID_CATEGORIE_COMPTABLE"));
|
170 |
} else {
|
170 |
} else {
|
171 |
table.setRowCatComptable(null);
|
171 |
table.setRowCatComptable(null);
|
172 |
}
|
172 |
}
|
173 |
|
- |
|
- |
|
173 |
String alerte = row.getString("ALERTE");
|
- |
|
174 |
if (!isFilling() && alerte != null && alerte.trim().length() > 0) {
|
- |
|
175 |
JOptionPane.showMessageDialog(comboClient, alerte);
|
- |
|
176 |
}
|
174 |
if (!isFilling() && comboClient.getElement().getTable().getFieldsName().contains("ID_TARIF")) {
|
177 |
if (!isFilling() && comboClient.getElement().getTable().getFieldsName().contains("ID_TARIF")) {
|
175 |
|
178 |
|
176 |
// SQLRowAccessor foreignRow = row.getForeignRow("ID_TARIF");
|
179 |
// SQLRowAccessor foreignRow = row.getForeignRow("ID_TARIF");
|
177 |
// if (foreignRow.isUndefined() &&
|
180 |
// if (foreignRow.isUndefined() &&
|
178 |
// !row.getForeignRow("ID_DEVISE").isUndefined()) {
|
181 |
// !row.getForeignRow("ID_DEVISE").isUndefined()) {
|
Line 877... |
Line 880... |
877 |
protected void createAvoirClient(final SQLRow row) {
|
880 |
protected void createAvoirClient(final SQLRow row) {
|
878 |
|
881 |
|
879 |
final AvoirClientXmlSheet bSheet = new AvoirClientXmlSheet(row);
|
882 |
final AvoirClientXmlSheet bSheet = new AvoirClientXmlSheet(row);
|
880 |
try {
|
883 |
try {
|
881 |
bSheet.createDocumentAsynchronous();
|
884 |
bSheet.createDocumentAsynchronous();
|
882 |
bSheet.showPrintAndExportAsynchronous(panelGestDoc.isVisualisationSelected(), panelGestDoc.isImpressionSelected(), true);
|
885 |
bSheet.showPrintAndExportAsynchronous(panelGestDoc.isVisualisationSelected(), panelGestDoc.isImpressionSelected(), true, getElement(), row);
|
883 |
} catch (Exception e) {
|
886 |
} catch (Exception e) {
|
884 |
ExceptionHandler.handle("Impossible de créer l'avoir", e);
|
887 |
ExceptionHandler.handle("Impossible de créer l'avoir", e);
|
885 |
}
|
888 |
}
|
886 |
|
889 |
|
887 |
}
|
890 |
}
|
Line 975... |
Line 978... |
975 |
List<SQLRow> rowEch = rowFacture.getReferentRows(rowFacture.getTable().getTable("ECHEANCE_CLIENT"));
|
978 |
List<SQLRow> rowEch = rowFacture.getReferentRows(rowFacture.getTable().getTable("ECHEANCE_CLIENT"));
|
976 |
for (SQLRow sqlRow : rowEch) {
|
979 |
for (SQLRow sqlRow : rowEch) {
|
977 |
if (!sqlRow.getBoolean("REG_COMPTA") && !sqlRow.getBoolean("REGLE")) {
|
980 |
if (!sqlRow.getBoolean("REG_COMPTA") && !sqlRow.getBoolean("REGLE")) {
|
978 |
// update echeance
|
981 |
// update echeance
|
979 |
SQLRowValues createEmptyUpdateRow2 = sqlRow.createEmptyUpdateRow();
|
982 |
SQLRowValues createEmptyUpdateRow2 = sqlRow.createEmptyUpdateRow();
|
980 |
createEmptyUpdateRow2.put("MONTANT", Math.max(0, sqlRow.getLong("MONTANT") - totalAvoir));
|
983 |
final long max = Math.max(0, sqlRow.getLong("MONTANT") - totalAvoir);
|
- |
|
984 |
createEmptyUpdateRow2.put("MONTANT", max);
|
- |
|
985 |
createEmptyUpdateRow2.put("REGLE", max == 0);
|
981 |
createEmptyUpdateRow2.commit();
|
986 |
createEmptyUpdateRow2.commit();
|
982 |
break;
|
987 |
break;
|
983 |
}
|
988 |
}
|
984 |
}
|
989 |
}
|
985 |
} catch (SQLException e1) {
|
990 |
} catch (SQLException e1) {
|