Line 16... |
Line 16... |
16 |
import org.openconcerto.erp.config.ComptaPropsConfiguration;
|
16 |
import org.openconcerto.erp.config.ComptaPropsConfiguration;
|
17 |
import org.openconcerto.erp.core.finance.payment.element.ModeDeReglementSQLElement;
|
17 |
import org.openconcerto.erp.core.finance.payment.element.ModeDeReglementSQLElement;
|
18 |
import org.openconcerto.erp.generationDoc.AbstractJOOReportsSheet;
|
18 |
import org.openconcerto.erp.generationDoc.AbstractJOOReportsSheet;
|
19 |
import org.openconcerto.sql.Configuration;
|
19 |
import org.openconcerto.sql.Configuration;
|
20 |
import org.openconcerto.sql.model.SQLRow;
|
20 |
import org.openconcerto.sql.model.SQLRow;
|
- |
|
21 |
import org.openconcerto.sql.model.SQLRowListRSH;
|
21 |
import org.openconcerto.sql.model.SQLSelect;
|
22 |
import org.openconcerto.sql.model.SQLSelect;
|
22 |
import org.openconcerto.sql.model.Where;
|
23 |
import org.openconcerto.sql.model.Where;
|
23 |
import org.openconcerto.sql.users.UserManager;
|
24 |
import org.openconcerto.sql.users.UserManager;
|
24 |
import org.openconcerto.utils.GestionDevise;
|
25 |
import org.openconcerto.utils.GestionDevise;
|
25 |
|
26 |
|
Line 63... |
Line 64... |
63 |
if (rowUser.getTable().contains("TEL")) {
|
64 |
if (rowUser.getTable().contains("TEL")) {
|
64 |
map.put("UserTel", rowUser.getString("TEL"));
|
65 |
map.put("UserTel", rowUser.getString("TEL"));
|
65 |
}
|
66 |
}
|
66 |
// Infos societe
|
67 |
// Infos societe
|
67 |
map.put("SocieteType", rowSoc.getString("TYPE"));
|
68 |
map.put("SocieteType", rowSoc.getString("TYPE"));
|
- |
|
69 |
map.put("SocieteTel", rowSoc.getString("NUM_TEL"));
|
- |
|
70 |
map.put("SocieteFax", rowSoc.getString("NUM_FAX"));
|
- |
|
71 |
map.put("SocieteRCS", rowSoc.getString("RCS"));
|
- |
|
72 |
map.put("SocieteSiret", rowSoc.getString("NUM_SIRET"));
|
- |
|
73 |
map.put("SocieteAPE", rowSoc.getString("NUM_APE"));
|
- |
|
74 |
map.put("SocieteCapital", GestionDevise.currencyToString(rowSoc.getBigDecimal("CAPITAL")));
|
68 |
map.put("SocieteNom", rowSoc.getString("NOM"));
|
75 |
map.put("SocieteNom", rowSoc.getString("NOM"));
|
69 |
map.put("SocieteAdresse", rowSocAdresse.getString("RUE"));
|
76 |
map.put("SocieteAdresse", rowSocAdresse.getString("RUE"));
|
70 |
map.put("SocieteCodePostal", rowSocAdresse.getString("CODE_POSTAL"));
|
77 |
map.put("SocieteCodePostal", rowSocAdresse.getString("CODE_POSTAL"));
|
71 |
|
78 |
|
72 |
String ville = rowSocAdresse.getString("VILLE");
|
79 |
String ville = rowSocAdresse.getString("VILLE");
|
Line 135... |
Line 142... |
135 |
Date dateEch = ModeDeReglementSQLElement.calculDate(modeRegRow.getInt("AJOURS"), modeRegRow.getInt("LENJOUR"), dFacture);
|
142 |
Date dateEch = ModeDeReglementSQLElement.calculDate(modeRegRow.getInt("AJOURS"), modeRegRow.getInt("LENJOUR"), dFacture);
|
136 |
map.put("FactureDateEcheance", dateFormat2.format(dateEch));
|
143 |
map.put("FactureDateEcheance", dateFormat2.format(dateEch));
|
137 |
|
144 |
|
138 |
SQLSelect sel = new SQLSelect();
|
145 |
SQLSelect sel = new SQLSelect();
|
139 |
sel.addSelect(this.rowRelance.getTable().getKey());
|
146 |
sel.addSelect(this.rowRelance.getTable().getKey());
|
- |
|
147 |
sel.addSelect(this.rowRelance.getTable().getField("DATE"));
|
140 |
sel.setWhere(new Where(this.rowRelance.getTable().getField("ID_SAISIE_VENTE_FACTURE"), "=", this.rowRelance.getInt("ID_SAISIE_VENTE_FACTURE")));
|
148 |
sel.setWhere(new Where(this.rowRelance.getTable().getField("ID_SAISIE_VENTE_FACTURE"), "=", this.rowRelance.getInt("ID_SAISIE_VENTE_FACTURE")));
|
141 |
sel.addFieldOrder(this.rowRelance.getTable().getField("DATE"));
|
149 |
sel.addFieldOrder(this.rowRelance.getTable().getField("DATE"));
|
142 |
@SuppressWarnings("unchecked")
|
150 |
@SuppressWarnings("unchecked")
|
143 |
List<Map<String, Number>> listResult = Configuration.getInstance().getBase().getDataSource().execute(sel.asString());
|
151 |
List<SQLRow> listResult = SQLRowListRSH.execute(sel);
|
- |
|
152 |
|
- |
|
153 |
String oldDateRelance = "";
|
- |
|
154 |
|
144 |
if (listResult != null && listResult.size() > 0) {
|
155 |
if (listResult != null && listResult.size() > 0) {
|
145 |
Map<String, Number> o = listResult.get(0);
|
156 |
SQLRow rowOldRelance = listResult.get(0);
|
146 |
Number n = o.get(this.rowRelance.getTable().getKey().getName());
|
- |
|
147 |
SQLRow rowOldRelance = this.rowRelance.getTable().getRow(n.intValue());
|
- |
|
148 |
Date dOldRelance = (Date) rowOldRelance.getObject("DATE");
|
157 |
Date dOldRelance = (Date) rowOldRelance.getObject("DATE");
|
149 |
map.put("DatePremiereRelance", dateFormat2.format(dOldRelance));
|
158 |
map.put("DatePremiereRelance", dateFormat2.format(dOldRelance));
|
- |
|
159 |
|
- |
|
160 |
for (SQLRow rowOldR : listResult) {
|
- |
|
161 |
oldDateRelance += dateFormat2.format((Date) rowOldR.getObject("DATE")) + ", ";
|
- |
|
162 |
}
|
- |
|
163 |
|
150 |
} else {
|
164 |
} else {
|
151 |
map.put("DatePremiereRelance", "");
|
165 |
map.put("DatePremiereRelance", "");
|
152 |
}
|
166 |
}
|
- |
|
167 |
map.put("DateAncienneRelance", oldDateRelance);
|
153 |
|
168 |
|
154 |
return map;
|
169 |
return map;
|
155 |
}
|
170 |
}
|
156 |
|
171 |
|
157 |
public RelanceSheet(SQLRow row) {
|
172 |
public RelanceSheet(SQLRow row) {
|