18 |
ilm |
1 |
/*
|
|
|
2 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
|
|
|
3 |
*
|
182 |
ilm |
4 |
* Copyright 2011-2019 OpenConcerto, by ILM Informatique. All rights reserved.
|
18 |
ilm |
5 |
*
|
|
|
6 |
* The contents of this file are subject to the terms of the GNU General Public License Version 3
|
|
|
7 |
* only ("GPL"). You may not use this file except in compliance with the License. You can obtain a
|
|
|
8 |
* copy of the License at http://www.gnu.org/licenses/gpl-3.0.html See the License for the specific
|
|
|
9 |
* language governing permissions and limitations under the License.
|
|
|
10 |
*
|
|
|
11 |
* When distributing the software, include this License Header Notice in each file.
|
|
|
12 |
*/
|
|
|
13 |
|
|
|
14 |
package org.openconcerto.erp.core.sales.shipment.report;
|
|
|
15 |
|
25 |
ilm |
16 |
import org.openconcerto.erp.generationDoc.AbstractSheetXMLWithDate;
|
182 |
ilm |
17 |
import org.openconcerto.erp.generationDoc.gestcomm.OptionDocProcessor;
|
18 |
ilm |
18 |
import org.openconcerto.erp.preferences.PrinterNXProps;
|
|
|
19 |
import org.openconcerto.sql.Configuration;
|
|
|
20 |
import org.openconcerto.sql.model.SQLRow;
|
|
|
21 |
|
25 |
ilm |
22 |
public class BonLivraisonXmlSheet extends AbstractSheetXMLWithDate {
|
18 |
ilm |
23 |
|
25 |
ilm |
24 |
public static final String TEMPLATE_ID = "BonLivraison";
|
|
|
25 |
public static final String TEMPLATE_PROPERTY_NAME = "LocationBon";
|
18 |
ilm |
26 |
|
19 |
ilm |
27 |
@Override
|
|
|
28 |
public String getReference() {
|
|
|
29 |
return this.row.getString("NOM");
|
|
|
30 |
}
|
|
|
31 |
|
|
|
32 |
@Override
|
|
|
33 |
public SQLRow getRowLanguage() {
|
|
|
34 |
SQLRow rowClient = this.row.getForeignRow("ID_CLIENT");
|
|
|
35 |
if (rowClient.getTable().contains("ID_LANGUE")) {
|
|
|
36 |
return rowClient.getForeignRow("ID_LANGUE");
|
|
|
37 |
} else {
|
|
|
38 |
return super.getRowLanguage();
|
|
|
39 |
}
|
|
|
40 |
}
|
|
|
41 |
|
18 |
ilm |
42 |
public BonLivraisonXmlSheet(SQLRow row) {
|
|
|
43 |
super(row);
|
|
|
44 |
this.printer = PrinterNXProps.getInstance().getStringProperty("BonPrinter");
|
|
|
45 |
this.elt = Configuration.getInstance().getDirectory().getElement("BON_DE_LIVRAISON");
|
182 |
ilm |
46 |
this.setPostProcess(new OptionDocProcessor());
|
18 |
ilm |
47 |
}
|
|
|
48 |
|
21 |
ilm |
49 |
@Override
|
25 |
ilm |
50 |
public String getName() {
|
|
|
51 |
return "BonLivraison_" + this.row.getString("NUMERO");
|
21 |
ilm |
52 |
}
|
|
|
53 |
|
25 |
ilm |
54 |
@Override
|
|
|
55 |
public String getDefaultTemplateId() {
|
|
|
56 |
return TEMPLATE_ID;
|
18 |
ilm |
57 |
}
|
25 |
ilm |
58 |
|
18 |
ilm |
59 |
}
|