OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Compare Revisions

Regard whitespace Rev 25 → Rev 21

/trunk/OpenConcerto/src/org/openconcerto/erp/core/sales/invoice/report/ListeFactureXmlSheet.java
23,7 → 23,6
import org.openconcerto.sql.model.SQLRow;
import org.openconcerto.utils.Tuple2;
 
import java.io.File;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
34,26 → 33,25
import java.util.Map;
 
public class ListeFactureXmlSheet extends AbstractListeSheetXml {
public static final String TEMPLATE_ID = "ListeFacture";
public static final String TEMPLATE_PROPERTY_NAME = DEFAULT_PROPERTY_NAME;
 
private List<Map<String, Object>> listValues;
private static final DateFormat dateFormat = new SimpleDateFormat("dd/MM/yy");
 
private List<Integer> listeIds;
 
public static Tuple2<String, String> getTuple2Location() {
return tupleDefault;
}
 
public ListeFactureXmlSheet(List<Integer> listeIds) {
this.printer = PrinterNXProps.getInstance().getStringProperty("BonPrinter");
this.listeIds = listeIds;
this.locationOO = SheetXml.getLocationForTuple(tupleDefault, false);
this.locationPDF = SheetXml.getLocationForTuple(tupleDefault, true);
}
 
@Override
public String getDefaultTemplateId() {
return TEMPLATE_ID;
}
 
@Override
public String getName() {
public String getDefaultModele() {
// TODO Raccord de méthode auto-généré
return "ListeFacture";
}
 
102,4 → 100,7
this.listAllSheetValues.put(0, this.listValues);
}
 
public String getFileName() {
return getValidFileName("ListeFacture");
}
}
/trunk/OpenConcerto/src/org/openconcerto/erp/core/sales/invoice/report/VenteFactureXmlSheet.java
14,7 → 14,8
package org.openconcerto.erp.core.sales.invoice.report;
 
import org.openconcerto.erp.config.ComptaPropsConfiguration;
import org.openconcerto.erp.generationDoc.AbstractSheetXMLWithDate;
import org.openconcerto.erp.generationDoc.AbstractSheetXml;
import org.openconcerto.erp.generationDoc.SheetXml;
import org.openconcerto.erp.preferences.PrinterNXProps;
import org.openconcerto.sql.Configuration;
import org.openconcerto.sql.model.SQLRow;
22,13 → 23,20
import org.openconcerto.utils.Tuple2;
 
import java.io.File;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
 
public class VenteFactureXmlSheet extends AbstractSheetXMLWithDate {
public class VenteFactureXmlSheet extends AbstractSheetXml {
 
public static final String TEMPLATE_ID = "VenteFacture";
public static final String TEMPLATE_PROPERTY_NAME = "LocationFacture";
private String startName;
 
private static final Tuple2<String, String> tuple = Tuple2.create("LocationFacture", "Factures");
 
public static Tuple2<String, String> getTuple2Location() {
return tuple;
}
 
@Override
public String getReference() {
return this.row.getString("NOM");
35,19 → 43,6
}
 
@Override
public String getName() {
final String startName;
if (row.getBoolean("COMPLEMENT")) {
startName = "FactureComplement_";
} else if (row.getBoolean("ACOMPTE")) {
startName = "FactureAcompte_";
} else {
startName = "Facture_";
}
return startName + this.row.getString("NUMERO");
}
 
@Override
public SQLRow getRowLanguage() {
SQLRow rowClient = this.row.getForeignRow("ID_CLIENT");
if (rowClient.getTable().contains("ID_LANGUE")) {
61,27 → 56,35
super(row);
this.printer = PrinterNXProps.getInstance().getStringProperty("FacturePrinter");
this.elt = Configuration.getInstance().getDirectory().getElement("SAISIE_VENTE_FACTURE");
getDefaultTemplateId();
Calendar cal = Calendar.getInstance();
cal.setTime((Date) row.getObject("DATE"));
this.locationOO = SheetXml.getLocationForTuple(tuple, false) + File.separator + cal.get(Calendar.YEAR);
this.locationPDF = SheetXml.getLocationForTuple(tuple, true) + File.separator + cal.get(Calendar.YEAR);
getDefaultModele();
}
 
@Override
public String getType() {
String type;
public String getDefaultModele() {
String modele;
if (row.getBoolean("COMPLEMENT")) {
type = "Complement";
} else if (row.getBoolean("ACOMPTE")) {
type = "Acompte";
this.startName = "FactureComplement_";
modele = "VenteFactureComplement";
} else {
type = "null";
 
if (row.getBoolean("ACOMPTE")) {
this.startName = "FactureAcompte_";
modele = "VenteFactureAcompte";
} else {
this.startName = "Facture_";
modele = "VenteFacture";
}
 
return type;
}
 
@Override
public String getDefaultTemplateId() {
return TEMPLATE_ID;
return modele;
 
}
 
public String getFileName() {
 
return getValidFileName(this.startName + this.row.getString("NUMERO"));
}
}
/trunk/OpenConcerto/src/org/openconcerto/erp/core/sales/invoice/report/VenteComptoirSheet.java
29,12 → 29,11
private static final SQLTable tableComptoir = base.getTable("SAISIE_VENTE_COMPTOIR");
private static final SQLTable tableClient = base.getTable("CLIENT");
private static final SQLTable tableAdresse = base.getTable("ADRESSE");
private final static SQLTable tableAdresseCommon = Configuration.getInstance().getBase().getTable("ADRESSE_COMMON");
private static final SQLTable tableArticle = base.getTable("ARTICLE");
private static final SQLTable tableTaxe = base.getTable("TAXE");
private static final SQLTable tableModeRegl = base.getTable("MODE_REGLEMENT");
private static final SQLTable tableTypeRegl = base.getTable("TYPE_REGLEMENT");
public static final String TEMPLATE_ID = "VenteComptoir";
public static final String TEMPLATE_PROPERTY_NAME = "LocationVenteComptoir";
 
public VenteComptoirSheet(int idFact) {
super(idFact, tableComptoir);
44,16 → 43,6
super(rowSaisie);
}
 
@Override
protected String getYear() {
return "";
}
 
@Override
public String getTemplateId() {
return TEMPLATE_ID;
}
 
protected void createMap() {
// TODO Auto-generated method stub
this.mCell = new HashMap();
100,5 → 89,4
 
this.mCell.put("A35", this.row.getObject("INFOS"));
}
 
}
/trunk/OpenConcerto/src/org/openconcerto/erp/core/sales/invoice/report/ListeVenteXmlSheet.java
26,7 → 26,6
import org.openconcerto.sql.model.Where;
import org.openconcerto.utils.Tuple2;
 
import java.io.File;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
43,33 → 42,31
 
private static final DateFormat dateFormat = new SimpleDateFormat("dd/MM/yy");
 
public static final String TEMPLATE_ID = "ListeVentes";
public static final String TEMPLATE_PROPERTY_NAME = DEFAULT_PROPERTY_NAME;
 
private Date du, au;
private List<SQLRow> listeIds;
private JProgressBar bar;
private SQLElement eltAvoir = Configuration.getInstance().getDirectory().getElement("AVOIR_CLIENT");
private SQLElement eltEnc = Configuration.getInstance().getDirectory().getElement("ENCAISSER_MONTANT");
private SQLElement eltEncElt = Configuration.getInstance().getDirectory().getElement("ENCAISSER_MONTANT_ELEMENT");
JProgressBar bar;
 
public static Tuple2<String, String> getTuple2Location() {
return tupleDefault;
}
 
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);
this.locationPDF = SheetXml.getLocationForTuple(tupleDefault, true);
this.du = du;
this.au = au;
this.bar = bar;
}
 
@Override
public String getDefaultTemplateId() {
return TEMPLATE_ID;
public String getDefaultModele() {
return "ListeVentes";
};
 
@Override
public String getName() {
return "JournalVentes";
}
SQLElement eltAvoir = Configuration.getInstance().getDirectory().getElement("AVOIR_CLIENT");
SQLElement eltEnc = Configuration.getInstance().getDirectory().getElement("ENCAISSER_MONTANT");
SQLElement eltEncElt = Configuration.getInstance().getDirectory().getElement("ENCAISSER_MONTANT_ELEMENT");
 
protected void createListeValues() {
 
175,4 → 172,7
this.mapAllSheetValues.put(0, values);
}
 
public String getFileName() {
return getValidFileName("JournalVentes");
}
}
/trunk/OpenConcerto/src/org/openconcerto/erp/core/sales/invoice/report/ListeDebiteursXmlSheet.java
15,6 → 15,7
 
import org.openconcerto.erp.core.finance.accounting.element.MouvementSQLElement;
import org.openconcerto.erp.generationDoc.AbstractListeSheetXml;
import org.openconcerto.erp.generationDoc.SheetXml;
import org.openconcerto.erp.preferences.PrinterNXProps;
import org.openconcerto.sql.Configuration;
import org.openconcerto.sql.element.SQLElement;
23,6 → 24,7
import org.openconcerto.sql.model.SQLSelect;
import org.openconcerto.sql.model.Where;
import org.openconcerto.utils.GestionDevise;
import org.openconcerto.utils.Tuple2;
 
import java.text.DateFormat;
import java.text.SimpleDateFormat;
35,19 → 37,20
 
private static final DateFormat dateFormat = new SimpleDateFormat("dd/MM/yy");
 
public static Tuple2<String, String> getTuple2Location() {
return tupleDefault;
}
 
public ListeDebiteursXmlSheet() {
this.printer = PrinterNXProps.getInstance().getStringProperty("BonPrinter");
this.locationOO = SheetXml.getLocationForTuple(tupleDefault, false);
this.locationPDF = SheetXml.getLocationForTuple(tupleDefault, true);
}
 
public String getDefaultTemplateId() {
public String getDefaultModele() {
return "ListeDebiteur";
}
 
@Override
public String getName() {
return "ListeDebiteurs";
}
 
SQLElement eltEch = Configuration.getInstance().getDirectory().getElement("ECHEANCE_CLIENT");
SQLElement eltVf = Configuration.getInstance().getDirectory().getElement("SAISIE_VENTE_FACTURE");
SQLElement eltMvt = Configuration.getInstance().getDirectory().getElement("MOUVEMENT");
121,9 → 124,22
 
}
 
// SwingUtilities.invokeLater(new Runnable() {
// public void run() {
// ListeDebiteursXmlSheet.this.bar.setMaximum(ListeDebiteursXmlSheet.this.listeIds.size());
// }
// });
 
// final Map<String, Object> values = new HashMap<String, Object>();
// values.put("DATE", "Du " + dateFormat.format(this.du) + " au " +
// dateFormat.format(this.au));
 
this.listAllSheetValues.put(0, listValues);
this.styleAllSheetValues.put(0, styleValues);
 
// this.mapAllSheetValues.put(0, values);
}
 
public String getFileName() {
return getValidFileName("ListeDebiteurs");
}
}