Line 92... |
Line 92... |
92 |
System.err.println("Fin regeneration");
|
92 |
System.err.println("Fin regeneration");
|
93 |
}
|
93 |
}
|
94 |
|
94 |
|
95 |
private boolean checkUniciteNumero(String num, int idFact) {
|
95 |
private boolean checkUniciteNumero(String num, int idFact) {
|
96 |
SQLTable tableFacture = Configuration.getInstance().getRoot().findTable("SAISIE_VENTE_FACTURE");
|
96 |
SQLTable tableFacture = Configuration.getInstance().getRoot().findTable("SAISIE_VENTE_FACTURE");
|
97 |
final SQLSelect selNum = new SQLSelect(tableFacture.getDBSystemRoot(), true);
|
97 |
final SQLSelect selNum = new SQLSelect();
|
98 |
selNum.addSelect(tableFacture.getKey(), "COUNT");
|
98 |
selNum.addSelect(tableFacture.getKey(), "COUNT");
|
99 |
final Where w = new Where(tableFacture.getField("NUMERO"), "=", num);
|
99 |
final Where w = new Where(tableFacture.getField("NUMERO"), "=", num);
|
100 |
selNum.setWhere(w);
|
100 |
selNum.setWhere(w);
|
101 |
selNum.andWhere(new Where(tableFacture.getKey(), "!=", idFact));
|
101 |
selNum.andWhere(new Where(tableFacture.getKey(), "!=", idFact));
|
102 |
|
102 |
|
Line 106... |
Line 106... |
106 |
|
106 |
|
107 |
}
|
107 |
}
|
108 |
|
108 |
|
109 |
@Override
|
109 |
@Override
|
110 |
protected void injectRow(SQLRow row, SQLRowValues rowVals, Date dateNew, SQLRow rowAbonnement) {
|
110 |
protected void injectRow(SQLRow row, SQLRowValues rowVals, Date dateNew, SQLRow rowAbonnement) {
|
111 |
// TODO Raccord de méthode auto-généré
|
- |
|
112 |
super.injectRow(row, rowVals, dateNew, rowAbonnement);
|
111 |
super.injectRow(row, rowVals, dateNew, rowAbonnement);
|
113 |
rowVals.put("NUMERO", "ABO--" + NumerotationAutoSQLElement.getNextNumero(SaisieVenteFactureSQLElement.class));
|
112 |
rowVals.put("NUMERO", "ABO--" + NumerotationAutoSQLElement.getNextNumero(SaisieVenteFactureSQLElement.class));
|
114 |
rowVals.put("ID_ADRESSE", row.getObject("ID_ADRESSE"));
|
113 |
rowVals.put("ID_ADRESSE", row.getObject("ID_ADRESSE"));
|
115 |
rowVals.put("ID_COMPTE_PCE_SERVICE", row.getObject("ID_COMPTE_PCE_SERVICE"));
|
114 |
rowVals.put("ID_COMPTE_PCE_SERVICE", row.getObject("ID_COMPTE_PCE_SERVICE"));
|
116 |
rowVals.put("PORT_HT", row.getObject("PORT_HT"));
|
115 |
rowVals.put("PORT_HT", row.getObject("PORT_HT"));
|
- |
|
116 |
rowVals.put("NET_A_PAYER", row.getObject("T_TTC"));
|
117 |
rowVals.put("REMISE_HT", row.getObject("REMISE_HT"));
|
117 |
rowVals.put("REMISE_HT", row.getObject("REMISE_HT"));
|
118 |
|
118 |
|
119 |
rowVals.put("NOM", row.getObject("NOM"));
|
119 |
rowVals.put("NOM", row.getObject("NOM"));
|
120 |
rowVals.put("ID_CONTACT", row.getObject("ID_CONTACT"));
|
120 |
rowVals.put("ID_CONTACT", row.getObject("ID_CONTACT"));
|
121 |
rowVals.put("ID_COMPTE_PCE_VENTE", row.getObject("ID_COMPTE_PCE_VENTE"));
|
121 |
rowVals.put("ID_COMPTE_PCE_VENTE", row.getObject("ID_COMPTE_PCE_VENTE"));
|