OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 132 | Rev 151 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 132 Rev 142
Line 40... Line 40...
40
import org.openconcerto.sql.view.list.BaseSQLTableModelColumn;
40
import org.openconcerto.sql.view.list.BaseSQLTableModelColumn;
41
import org.openconcerto.sql.view.list.IListe;
41
import org.openconcerto.sql.view.list.IListe;
42
import org.openconcerto.sql.view.list.IListeAction.IListeEvent;
42
import org.openconcerto.sql.view.list.IListeAction.IListeEvent;
43
import org.openconcerto.sql.view.list.RowAction;
43
import org.openconcerto.sql.view.list.RowAction;
44
import org.openconcerto.sql.view.list.RowAction.PredicateRowAction;
44
import org.openconcerto.sql.view.list.RowAction.PredicateRowAction;
45
import org.openconcerto.sql.view.list.SQLTableModelSourceOnline;
45
import org.openconcerto.sql.view.list.SQLTableModelSource;
46
import org.openconcerto.ui.DefaultGridBagConstraints;
46
import org.openconcerto.ui.DefaultGridBagConstraints;
47
import org.openconcerto.ui.EmailComposer;
47
import org.openconcerto.ui.EmailComposer;
48
import org.openconcerto.ui.JDate;
48
import org.openconcerto.ui.JDate;
49
import org.openconcerto.utils.CollectionUtils;
49
import org.openconcerto.utils.CollectionUtils;
50
import org.openconcerto.utils.ExceptionHandler;
50
import org.openconcerto.utils.ExceptionHandler;
Line 194... Line 194...
194
                return;
194
                return;
195
            }
195
            }
196
            int idFact = rowMvtSource.getInt("IDSOURCE");
196
            int idFact = rowMvtSource.getInt("IDSOURCE");
197
            SQLRow rowFacture = base.getTable("SAISIE_VENTE_FACTURE").getRow(idFact);
197
            SQLRow rowFacture = base.getTable("SAISIE_VENTE_FACTURE").getRow(idFact);
198
 
198
 
-
 
199
            final VenteFactureXmlSheet sheet = new VenteFactureXmlSheet(rowFacture);
199
 
200
 
200
            Set<SQLField> setContact = null;
201
            Set<SQLField> setContact = null;
201
            SQLTable tableContact = Configuration.getInstance().getRoot().findTable("CONTACT");
202
            SQLTable tableContact = Configuration.getInstance().getRoot().findTable("CONTACT");
202
            setContact = row.getTable().getForeignKeys(tableContact);
203
            setContact = row.getTable().getForeignKeys(tableContact);
203
 
204
 
Line 227... Line 228...
227
 
228
 
228
            final Thread t = new Thread() {
229
            final Thread t = new Thread() {
229
                @Override
230
                @Override
230
                public void run() {
231
                public void run() {
231
 
232
 
-
 
233
                    final File f;
232
                    try {
234
                    try {
-
 
235
                        f = sheet.getOrCreatePDFDocumentFile(true);
-
 
236
 
233
                        EmailComposer.getInstance().compose(adresseMail, references, text);
237
                        EmailComposer.getInstance().compose(adresseMail, references, text, f.getAbsoluteFile());
234
 
238
 
235
                        // Création d'une relance
239
                        // Création d'une relance
236
                        String numero = NumerotationAutoSQLElement.getNextNumero(RelanceSQLElement.class);
240
                        String numero = NumerotationAutoSQLElement.getNextNumero(RelanceSQLElement.class);
237
                        SQLRowValues rowValsR = new SQLRowValues(row.getTable().getTable("RELANCE"));
241
                        SQLRowValues rowValsR = new SQLRowValues(row.getTable().getTable("RELANCE"));
238
                        rowValsR.put("DATE", new Date());
242
                        rowValsR.put("DATE", new Date());
Line 269... Line 273...
269
                        }
273
                        }
270
                    } catch (IOException exn) {
274
                    } catch (IOException exn) {
271
                        exn.printStackTrace();
275
                        exn.printStackTrace();
272
                    } catch (InterruptedException exn) {
276
                    } catch (InterruptedException exn) {
273
                        exn.printStackTrace();
277
                        exn.printStackTrace();
-
 
278
                    } catch (Exception e1) {
-
 
279
                        // TODO Auto-generated catch block
-
 
280
                        e1.printStackTrace();
274
                    }
281
                    }
275
 
282
 
276
                }
283
                }
277
            };
284
            };
278
 
285