OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Compare Revisions

Regard whitespace Rev 21 → Rev 25

/trunk/OpenConcerto/src/org/openconcerto/erp/core/sales/invoice/report/ListeFactureXmlSheet.java
23,6 → 23,7
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;
33,25 → 34,26
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 getDefaultModele() {
// TODO Raccord de méthode auto-généré
public String getDefaultTemplateId() {
return TEMPLATE_ID;
}
 
@Override
public String getName() {
return "ListeFacture";
}
 
100,7 → 102,4
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,8 → 14,7
package org.openconcerto.erp.core.sales.invoice.report;
 
import org.openconcerto.erp.config.ComptaPropsConfiguration;
import org.openconcerto.erp.generationDoc.AbstractSheetXml;
import org.openconcerto.erp.generationDoc.SheetXml;
import org.openconcerto.erp.generationDoc.AbstractSheetXMLWithDate;
import org.openconcerto.erp.preferences.PrinterNXProps;
import org.openconcerto.sql.Configuration;
import org.openconcerto.sql.model.SQLRow;
23,20 → 22,13
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 AbstractSheetXml {
public class VenteFactureXmlSheet extends AbstractSheetXMLWithDate {
 
private String startName;
public static final String TEMPLATE_ID = "VenteFacture";
public static final String TEMPLATE_PROPERTY_NAME = "LocationFacture";
 
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");
43,6 → 35,19
}
 
@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")) {
56,35 → 61,27
super(row);
this.printer = PrinterNXProps.getInstance().getStringProperty("FacturePrinter");
this.elt = Configuration.getInstance().getDirectory().getElement("SAISIE_VENTE_FACTURE");
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();
getDefaultTemplateId();
}
 
@Override
public String getDefaultModele() {
String modele;
public String getType() {
String type;
if (row.getBoolean("COMPLEMENT")) {
this.startName = "FactureComplement_";
modele = "VenteFactureComplement";
type = "Complement";
} else if (row.getBoolean("ACOMPTE")) {
type = "Acompte";
} else {
if (row.getBoolean("ACOMPTE")) {
this.startName = "FactureAcompte_";
modele = "VenteFactureAcompte";
} else {
this.startName = "Facture_";
modele = "VenteFacture";
type = "null";
 
}
 
return type;
}
 
return modele;
 
@Override
public String getDefaultTemplateId() {
return TEMPLATE_ID;
}
 
public String getFileName() {
 
return getValidFileName(this.startName + this.row.getString("NUMERO"));
}
}
/trunk/OpenConcerto/src/org/openconcerto/erp/core/sales/invoice/report/VenteComptoirSheet.java
29,11 → 29,12
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);
43,6 → 44,16
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();
89,4 → 100,5
 
this.mCell.put("A35", this.row.getObject("INFOS"));
}
 
}
/trunk/OpenConcerto/src/org/openconcerto/erp/core/sales/invoice/report/ListeVenteXmlSheet.java
26,6 → 26,7
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;
42,31 → 43,33
 
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;
JProgressBar bar;
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");
 
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;
}
 
public String getDefaultModele() {
return "ListeVentes";
@Override
public String getDefaultTemplateId() {
return TEMPLATE_ID;
};
 
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");
@Override
public String getName() {
return "JournalVentes";
}
 
protected void createListeValues() {
 
172,7 → 175,4
this.mapAllSheetValues.put(0, values);
}
 
public String getFileName() {
return getValidFileName("JournalVentes");
}
}
/trunk/OpenConcerto/src/org/openconcerto/erp/core/sales/invoice/report/ListeDebiteursXmlSheet.java
15,7 → 15,6
 
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;
24,7 → 23,6
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;
37,20 → 35,19
 
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 getDefaultModele() {
public String getDefaultTemplateId() {
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");
124,22 → 121,9
 
}
 
// 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");
}
}