Line 15... |
Line 15... |
15 |
|
15 |
|
16 |
import org.openconcerto.erp.core.common.element.BanqueSQLElement;
|
16 |
import org.openconcerto.erp.core.common.element.BanqueSQLElement;
|
17 |
import org.openconcerto.erp.core.finance.accounting.element.ComptePCESQLElement;
|
17 |
import org.openconcerto.erp.core.finance.accounting.element.ComptePCESQLElement;
|
18 |
import org.openconcerto.erp.core.finance.accounting.element.JournalSQLElement;
|
18 |
import org.openconcerto.erp.core.finance.accounting.element.JournalSQLElement;
|
19 |
import org.openconcerto.erp.core.finance.payment.element.ModeDeReglementSQLElement;
|
19 |
import org.openconcerto.erp.core.finance.payment.element.ModeDeReglementSQLElement;
|
- |
|
20 |
import org.openconcerto.erp.generationEcritures.provider.AccountingRecordsProvider;
|
- |
|
21 |
import org.openconcerto.erp.generationEcritures.provider.AccountingRecordsProviderManager;
|
20 |
import org.openconcerto.erp.model.PrixTTC;
|
22 |
import org.openconcerto.erp.model.PrixTTC;
|
21 |
import org.openconcerto.sql.model.SQLRow;
|
23 |
import org.openconcerto.sql.model.SQLRow;
|
22 |
import org.openconcerto.sql.model.SQLRowValues;
|
24 |
import org.openconcerto.sql.model.SQLRowValues;
|
23 |
import org.openconcerto.sql.model.SQLTable;
|
25 |
import org.openconcerto.sql.model.SQLTable;
|
24 |
import org.openconcerto.sql.model.Where;
|
26 |
import org.openconcerto.sql.model.Where;
|
Line 33... |
Line 35... |
33 |
import java.util.List;
|
35 |
import java.util.List;
|
34 |
import java.util.Map;
|
36 |
import java.util.Map;
|
35 |
|
37 |
|
36 |
public class GenerationReglementAchat extends GenerationEcritures {
|
38 |
public class GenerationReglementAchat extends GenerationEcritures {
|
37 |
|
39 |
|
- |
|
40 |
|
- |
|
41 |
public static final String ID = "accounting.records.order.supplychain.payment";
|
- |
|
42 |
|
- |
|
43 |
|
38 |
// Journal Caisse
|
44 |
// Journal Caisse
|
39 |
private static final Integer journalCaisse = new Integer(JournalSQLElement.CAISSES);
|
45 |
private static final Integer journalCaisse = new Integer(JournalSQLElement.CAISSES);
|
40 |
private static final SQLTable tablePrefCompte = base.getTable("PREFS_COMPTE");
|
46 |
private static final SQLTable tablePrefCompte = base.getTable("PREFS_COMPTE");
|
41 |
private static final SQLTable tableMouvement = base.getTable("MOUVEMENT");
|
47 |
private static final SQLTable tableMouvement = base.getTable("MOUVEMENT");
|
42 |
private static final SQLRow rowPrefsCompte = tablePrefCompte.getRow(2);
|
48 |
private static final SQLRow rowPrefsCompte = tablePrefCompte.getRow(2);
|
Line 59... |
Line 65... |
59 |
// iniatilisation des valeurs de la map
|
65 |
// iniatilisation des valeurs de la map
|
60 |
this.date = (Date) regMontantRow.getObject("DATE");
|
66 |
this.date = (Date) regMontantRow.getObject("DATE");
|
61 |
|
67 |
|
62 |
// "Règlement achat" + SOURCE.getNom() ??
|
68 |
// "Règlement achat" + SOURCE.getNom() ??
|
63 |
this.nom = "Règlement achat " + rowFournisseur.getString("NOM") + " (" + typeRegRow.getString("NOM") + ")";
|
69 |
this.nom = "Règlement achat " + rowFournisseur.getString("NOM") + " (" + typeRegRow.getString("NOM") + ")";
|
- |
|
70 |
AccountingRecordsProvider provider = AccountingRecordsProviderManager.get(ID);
|
- |
|
71 |
if (provider != null) {
|
- |
|
72 |
provider.putLabel(regMontantRow, this.mEcritures);
|
- |
|
73 |
}
|
64 |
|
74 |
|
65 |
List<SQLRow> l = regMontantRow.getReferentRows(regMontantRow.getTable().getTable("REGLER_MONTANT_ELEMENT"));
|
75 |
List<SQLRow> l = regMontantRow.getReferentRows(regMontantRow.getTable().getTable("REGLER_MONTANT_ELEMENT"));
|
66 |
int mvtSource = -1;
|
76 |
int mvtSource = -1;
|
67 |
List<Integer> factureFids = new ArrayList<Integer>();
|
77 |
List<Integer> factureFids = new ArrayList<Integer>();
|
68 |
|
78 |
|