OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 73 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 73 Rev 80
Line 17... Line 17...
17
import org.openconcerto.erp.core.finance.accounting.report.BalanceAgeeListeSheetXML;
17
import org.openconcerto.erp.core.finance.accounting.report.BalanceAgeeListeSheetXML;
18
import org.openconcerto.sql.Configuration;
18
import org.openconcerto.sql.Configuration;
19
import org.openconcerto.sql.model.SQLRow;
19
import org.openconcerto.sql.model.SQLRow;
20
import org.openconcerto.ui.DefaultGridBagConstraints;
20
import org.openconcerto.ui.DefaultGridBagConstraints;
21
import org.openconcerto.ui.JDate;
21
import org.openconcerto.ui.JDate;
-
 
22
import org.openconcerto.utils.ExceptionHandler;
22
 
23
 
23
import java.awt.GridBagConstraints;
24
import java.awt.GridBagConstraints;
24
import java.awt.GridBagLayout;
25
import java.awt.GridBagLayout;
25
import java.awt.event.ActionEvent;
26
import java.awt.event.ActionEvent;
26
import java.awt.event.ActionListener;
27
import java.awt.event.ActionListener;
Line 34... Line 35...
34
public class BalanceAgeePanel extends JPanel {
35
public class BalanceAgeePanel extends JPanel {
35
 
36
 
36
    public BalanceAgeePanel() {
37
    public BalanceAgeePanel() {
37
        super(new GridBagLayout());
38
        super(new GridBagLayout());
38
 
39
 
39
        JLabel label = new JLabel("Créer la balance agée client pour la période du ");
40
        JLabel label = new JLabel("Balance âgée client pour la période du ");
40
 
41
 
41
        SQLRow rowExercice = ((ComptaPropsConfiguration) Configuration.getInstance()).getRowSociete().getForeignRow("ID_EXERCICE_COMMON");
42
        SQLRow rowExercice = ((ComptaPropsConfiguration) Configuration.getInstance()).getRowSociete().getForeignRow("ID_EXERCICE_COMMON");
42
        Calendar dDebut = rowExercice.getDate("DATE_DEB");
43
        Calendar dDebut = rowExercice.getDate("DATE_DEB");
43
        final JDate dateDeb = new JDate();
44
        final JDate dateDeb = new JDate();
44
        dateDeb.setDate(dDebut.getTime());
45
        dateDeb.setDate(dDebut.getTime());
Line 73... Line 74...
73
                BalanceAgeeListeSheetXML l = new BalanceAgeeListeSheetXML(dateDeb.getDate(), dateFin.getDate(), boxExcludeEcr.isSelected());
74
                BalanceAgeeListeSheetXML l = new BalanceAgeeListeSheetXML(dateDeb.getDate(), dateFin.getDate(), boxExcludeEcr.isSelected());
74
 
75
 
75
                try {
76
                try {
76
                    l.createDocument();
77
                    l.createDocument();
77
                    l.openDocument(false);
78
                    l.openDocument(false);
78
                } catch (Exception e1) {
79
                } catch (Exception originalExn) {
79
                    e1.printStackTrace();
80
                    ExceptionHandler.handle("Impossible de créer la balance âgée", originalExn);
80
                }
81
                }
81
            }
82
            }
82
        });
83
        });
83
    }
84
    }
84
}
85
}