OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Compare Revisions

Regard whitespace Rev 18 → Rev 19

/trunk/OpenConcerto/src/org/openconcerto/erp/core/sales/invoice/report/ListeFactureXmlSheet.java
52,8 → 52,6
 
protected void createListeValues() {
SQLElement eltFacture = Configuration.getInstance().getDirectory().getElement("SAISIE_VENTE_FACTURE");
 
SQLElement eltAffaire = Configuration.getInstance().getDirectory().getElement("AFFAIRE");
SQLElement eltModeRegl = Configuration.getInstance().getDirectory().getElement("MODE_REGLEMENT");
SQLElement eltTypeRegl = Configuration.getInstance().getDirectory().getElement("TYPE_REGLEMENT");
 
76,13 → 74,6
String libClient = rowCli.getString("FORME_JURIDIQUE") + " " + rowCli.getString("NOM");
mValues.put("CLIENT", libClient.trim());
 
// Affaire
int idAffaire = rowFacture.getInt("ID_AFFAIRE");
if (idAffaire > 1) {
SQLRow rowAffaire = eltAffaire.getTable().getRow(idAffaire);
mValues.put("NUMERO_AFFAIRE", rowAffaire.getString("NUMERO"));
mValues.put("NOM_AFFAIRE", rowAffaire.getString("OBJET"));
}
 
// Mode de reglement
int idModeRegl = rowFacture.getInt("ID_MODE_REGLEMENT");
/trunk/OpenConcerto/src/org/openconcerto/erp/core/sales/invoice/report/VenteFactureXmlSheet.java
37,6 → 37,21
return tuple;
}
 
@Override
public String getReference() {
return this.row.getString("NOM");
}
 
@Override
public SQLRow getRowLanguage() {
SQLRow rowClient = this.row.getForeignRow("ID_CLIENT");
if (rowClient.getTable().contains("ID_LANGUE")) {
return rowClient.getForeignRow("ID_LANGUE");
} else {
return super.getRowLanguage();
}
}
 
public VenteFactureXmlSheet(SQLRow row) {
super(row);
this.printer = PrinterNXProps.getInstance().getStringProperty("FacturePrinter");
/trunk/OpenConcerto/src/org/openconcerto/erp/core/sales/invoice/report/VenteComptoirSheet.java
13,12 → 13,6
package org.openconcerto.erp.core.sales.invoice.report;
 
import java.text.DateFormat;
import java.util.Date;
import java.util.HashMap;
 
 
 
import org.openconcerto.erp.config.ComptaPropsConfiguration;
import org.openconcerto.erp.generationDoc.SheetInterface;
import org.openconcerto.erp.model.PrixTTC;
26,6 → 20,10
import org.openconcerto.sql.model.SQLRow;
import org.openconcerto.sql.model.SQLTable;
 
import java.text.DateFormat;
import java.util.Date;
import java.util.HashMap;
 
public class VenteComptoirSheet extends SheetInterface {
 
private static final SQLTable tableComptoir = base.getTable("SAISIE_VENTE_COMPTOIR");
/trunk/OpenConcerto/src/org/openconcerto/erp/core/sales/invoice/report/ListeVenteXmlSheet.java
35,6 → 35,9
import java.util.List;
import java.util.Map;
 
import javax.swing.JProgressBar;
import javax.swing.SwingUtilities;
 
public class ListeVenteXmlSheet extends AbstractListeSheetXml {
 
private static final DateFormat dateFormat = new SimpleDateFormat("dd/MM/yy");
41,12 → 44,13
 
private Date du, au;
private List<SQLRow> listeIds;
JProgressBar bar;
 
public static Tuple2<String, String> getTuple2Location() {
return tupleDefault;
}
 
public ListeVenteXmlSheet(List<SQLRow> listeIds, Date du, Date au) {
public ListeVenteXmlSheet(List<SQLRow> listeIds, Date du, Date au, JProgressBar bar) {
this.printer = PrinterNXProps.getInstance().getStringProperty("BonPrinter");
this.listeIds = listeIds;
this.locationOO = SheetXml.getLocationForTuple(tupleDefault, false);
54,6 → 58,7
this.du = du;
this.au = au;
this.modele = "ListeVentes";
this.bar = bar;
}
 
SQLElement eltAvoir = Configuration.getInstance().getDirectory().getElement("AVOIR_CLIENT");
65,7 → 70,14
if (this.listeIds == null) {
return;
}
 
SwingUtilities.invokeLater(new Runnable() {
public void run() {
ListeVenteXmlSheet.this.bar.setMaximum(ListeVenteXmlSheet.this.listeIds.size());
}
});
List<Map<String, Object>> listValues = new ArrayList<Map<String, Object>>(this.listeIds.size());
int i = 1;
for (SQLRow rowFacture : this.listeIds) {
Map<String, Object> mValues = new HashMap<String, Object>();
final String dateFacture = dateFormat.format((Date) rowFacture.getObject("DATE"));
143,7 → 155,13
}
 
listValues.add(mValues);
final int value = i++;
SwingUtilities.invokeLater(new Runnable() {
public void run() {
ListeVenteXmlSheet.this.bar.setValue(value);
}
});
}
final Map<String, Object> values = new HashMap<String, Object>();
values.put("DATE", "Du " + dateFormat.format(this.du) + " au " + dateFormat.format(this.au));