diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php
index b41fa735e7c..4e168d0645f 100644
--- a/htdocs/compta/facture/class/facture-rec.class.php
+++ b/htdocs/compta/facture/class/facture-rec.class.php
@@ -336,7 +336,6 @@ class FactureRec extends Facture
$line->total_ht = $objp->total_ht;
$line->total_tva = $objp->total_tva;
$line->total_ttc = $objp->total_ttc;
- $line->export_compta = $objp->fk_export_compta;
$line->code_ventilation = $objp->fk_code_ventilation;
$line->rang = $objp->rang;
$line->special_code = $objp->special_code;
diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php
index ace5e15312c..f3427ee5d4b 100644
--- a/htdocs/compta/facture/class/facture.class.php
+++ b/htdocs/compta/facture/class/facture.class.php
@@ -455,7 +455,7 @@ class Facture extends CommonInvoice
}
}
else if ($reshook < 0) $error++;
-
+
// Appel des triggers
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($this->db);
@@ -866,7 +866,7 @@ class Facture extends CommonInvoice
$this->extraparams = (array) json_decode($obj->extraparams, true);
if ($this->statut == 0) $this->brouillon = 1;
-
+
// Retreive all extrafield for invoice
// fetch optionals attributes and labels
if(!class_exists('Extrafields'))
@@ -925,7 +925,7 @@ class Facture extends CommonInvoice
$sql.= ' l.localtax1_tx, l.localtax2_tx, l.remise, l.remise_percent, l.fk_remise_except, l.subprice,';
$sql.= ' l.rang, l.special_code,';
$sql.= ' l.date_start as date_start, l.date_end as date_end,';
- $sql.= ' l.info_bits, l.total_ht, l.total_tva, l.total_localtax1, l.total_localtax2, l.total_ttc, l.fk_code_ventilation, l.fk_export_compta, l.fk_product_fournisseur_price as fk_fournprice, l.buy_price_ht as pa_ht,';
+ $sql.= ' l.info_bits, l.total_ht, l.total_tva, l.total_localtax1, l.total_localtax2, l.total_ttc, l.fk_code_ventilation, l.fk_product_fournisseur_price as fk_fournprice, l.buy_price_ht as pa_ht,';
$sql.= ' p.ref as product_ref, p.fk_product_type as fk_product_type, p.label as product_label, p.description as product_desc';
$sql.= ' FROM '.MAIN_DB_PREFIX.'facturedet as l';
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON l.fk_product = p.rowid';
@@ -970,7 +970,6 @@ class Facture extends CommonInvoice
$line->total_localtax1 = $objp->total_localtax1;
$line->total_localtax2 = $objp->total_localtax2;
$line->total_ttc = $objp->total_ttc;
- $line->export_compta = $objp->fk_export_compta;
$line->code_ventilation = $objp->fk_code_ventilation;
$line->fk_fournprice = $objp->fk_fournprice;
$marginInfos = getMarginInfos($objp->subprice, $objp->remise_percent, $objp->tva_tx, $objp->localtax1_tx, $objp->localtax2_tx, $line->fk_fournprice, $objp->pa_ht);
@@ -1860,7 +1859,7 @@ class Facture extends CommonInvoice
}
}
}
-
+
if ($error == 0)
{
$old_statut=$this->statut;
@@ -1870,8 +1869,8 @@ class Facture extends CommonInvoice
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
$interface=new Interfaces($this->db);
$result=$interface->run_triggers('BILL_UNVALIDATE',$this,$user,$langs,$conf);
- if ($result < 0) {
- $error++;
+ if ($result < 0) {
+ $error++;
$this->errors=$interface->errors;
$this->statut=$old_statut;
$this->brouillon=0;
@@ -1881,7 +1880,7 @@ class Facture extends CommonInvoice
$this->db->rollback();
return -1;
}
-
+
if ($error == 0)
{
$this->db->commit();
@@ -3196,7 +3195,6 @@ class FactureLigne
var $total_ttc;
var $fk_code_ventilation = 0;
- var $fk_export_compta = 0;
var $date_start;
var $date_end;
@@ -3237,7 +3235,7 @@ class FactureLigne
$sql.= ' fd.localtax1_tx, fd. localtax2_tx, fd.remise, fd.remise_percent, fd.fk_remise_except, fd.subprice,';
$sql.= ' fd.date_start as date_start, fd.date_end as date_end, fd.fk_product_fournisseur_price as fk_fournprice, fd.buy_price_ht as pa_ht,';
$sql.= ' fd.info_bits, fd.total_ht, fd.total_tva, fd.total_ttc, fd.total_localtax1, fd.total_localtax2, fd.rang,';
- $sql.= ' fd.fk_code_ventilation, fd.fk_export_compta,';
+ $sql.= ' fd.fk_code_ventilation,';
$sql.= ' p.ref as product_ref, p.label as product_libelle, p.description as product_desc';
$sql.= ' FROM '.MAIN_DB_PREFIX.'facturedet as fd';
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON fd.fk_product = p.rowid';
@@ -3271,7 +3269,6 @@ class FactureLigne
$this->total_localtax2 = $objp->total_localtax2;
$this->total_ttc = $objp->total_ttc;
$this->fk_code_ventilation = $objp->fk_code_ventilation;
- $this->fk_export_compta = $objp->fk_export_compta;
$this->rang = $objp->rang;
$this->fk_fournprice = $objp->fk_fournprice;
$marginInfos = getMarginInfos($objp->subprice, $objp->remise_percent, $objp->tva_tx, $objp->localtax1_tx, $objp->localtax2_tx, $this->fk_fournprice, $objp->pa_ht);
@@ -3338,7 +3335,7 @@ class FactureLigne
$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'facturedet';
$sql.= ' (fk_facture, fk_parent_line, label, description, qty, tva_tx, localtax1_tx, localtax2_tx,';
$sql.= ' fk_product, product_type, remise_percent, subprice, fk_remise_except,';
- $sql.= ' date_start, date_end, fk_code_ventilation, fk_export_compta, ';
+ $sql.= ' date_start, date_end, fk_code_ventilation, ';
$sql.= ' rang, special_code, fk_product_fournisseur_price, buy_price_ht,';
$sql.= ' info_bits, total_ht, total_tva, total_ttc, total_localtax1, total_localtax2)';
$sql.= " VALUES (".$this->fk_facture.",";
@@ -3357,7 +3354,6 @@ class FactureLigne
$sql.= " ".(! empty($this->date_start)?"'".$this->db->idate($this->date_start)."'":"null").",";
$sql.= " ".(! empty($this->date_end)?"'".$this->db->idate($this->date_end)."'":"null").",";
$sql.= ' '.$this->fk_code_ventilation.',';
- $sql.= ' '.$this->fk_export_compta.',';
$sql.= ' '.$this->rang.',';
$sql.= ' '.$this->special_code.',';
$sql.= ' '.(! empty($this->fk_fournprice)?$this->fk_fournprice:"null").',';
diff --git a/htdocs/compta/ventilation/fournisseur/index.php b/htdocs/compta/ventilation/fournisseur/index.php
index c10bb23a056..636891e7c18 100644
--- a/htdocs/compta/ventilation/fournisseur/index.php
+++ b/htdocs/compta/ventilation/fournisseur/index.php
@@ -39,7 +39,7 @@ print '
| ';
$sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."facturedet";
-$sql .= " WHERE fk_export_compta = 0";
+$sql .= " WHERE fk_code_ventilation = 0";
$result = $db->query($sql);
if ($result)
{
@@ -50,7 +50,7 @@ if ($result)
}
$sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."paiement";
-$sql .= " WHERE fk_export_compta = 0";
+$sql .= " WHERE fk_code_ventilation = 0";
$result = $db->query($sql);
if ($result)
@@ -62,7 +62,7 @@ if ($result)
}
$sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."facture_fourn_det";
-$sql .= " WHERE fk_export_compta = 0";
+$sql .= " WHERE fk_code_ventilation = 0";
$result = $db->query($sql);
if ($result)
{
@@ -73,7 +73,7 @@ if ($result)
}
/*$sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."paiementfourn";
-$sql .= " WHERE fk_export_compta = 0";
+$sql .= " WHERE fk_code_ventilation = 0";
$result = $db->query($sql);
if ($result)
diff --git a/htdocs/compta/ventilation/lignes.php b/htdocs/compta/ventilation/lignes.php
index e5cf6bc8edd..c938e9774c4 100644
--- a/htdocs/compta/ventilation/lignes.php
+++ b/htdocs/compta/ventilation/lignes.php
@@ -48,7 +48,7 @@ if ($page < 0) $page = 0;
$limit = $conf->liste_limit;
$offset = $limit * $page ;
-$sql = "SELECT f.facnumber, f.rowid as facid, l.fk_product, l.description, l.price, l.qty, l.rowid, l.tva_tx, l.fk_code_ventilation, c.intitule, c.numero,";
+$sql = "SELECT f.facnumber, f.rowid as facid, l.fk_product, l.description, f.total_ttc as price, l.qty, l.rowid, l.tva_tx, l.fk_code_ventilation, c.intitule, c.numero,";
$sql.= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type";
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f";
$sql.= " , ".MAIN_DB_PREFIX."compta_compte_generaux as c";
@@ -72,7 +72,7 @@ if ($result)
$num_lignes = $db->num_rows($result);
$i = 0;
- print_barre_liste("Lignes de facture ventil�es",$page,"lignes.php","",$sortfield,$sortorder,'',$num_lignes);
+ print_barre_liste($langs->trans("InvoiceDispatched"),$page,"lignes.php","",$sortfield,$sortorder,'',$num_lignes);
print '";
-$db->close();
llxFooter();
+$db->close();
?>
diff --git a/htdocs/compta/ventilation/liste.php b/htdocs/compta/ventilation/liste.php
index 70679d3a381..81613640541 100644
--- a/htdocs/compta/ventilation/liste.php
+++ b/htdocs/compta/ventilation/liste.php
@@ -54,7 +54,7 @@ $pageprev = $page - 1;
$pagenext = $page + 1;
$limit = $conf->liste_limit;
-$sql = "SELECT f.facnumber, f.rowid as facid, l.fk_product, l.description, l.price, l.rowid, l.fk_code_ventilation,";
+$sql = "SELECT f.facnumber, f.rowid as facid, l.fk_product, l.description, f.total as price, l.rowid, l.fk_code_ventilation,";
$sql.= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.fk_product_type as type";
$sql.= " FROM ".MAIN_DB_PREFIX."facture as f";
$sql.= " , ".MAIN_DB_PREFIX."facturedet as l";
diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php
index 7e459f07f20..9dee5c7bee6 100644
--- a/htdocs/core/menus/standard/eldy.lib.php
+++ b/htdocs/core/menus/standard/eldy.lib.php
@@ -799,17 +799,11 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
}
// Compta simple
- if (! empty($conf->comptabilite->enabled) && ! empty($conf->global->FACTURE_VENTILATION))
+ if (! empty($conf->comptabilite->enabled) && ($conf->global->MAIN_FEATURES_LEVEL >= 2))
{
$newmenu->add("/compta/ventilation/index.php?leftmenu=ventil",$langs->trans("Dispatch"),0,$user->rights->compta->ventilation->lire, '', $mainmenu, 'ventil');
if ($leftmenu=="ventil") $newmenu->add("/compta/ventilation/liste.php",$langs->trans("ToDispatch"),1,$user->rights->compta->ventilation->lire);
if ($leftmenu=="ventil") $newmenu->add("/compta/ventilation/lignes.php",$langs->trans("Dispatched"),1,$user->rights->compta->ventilation->lire);
- if ($leftmenu=="ventil") $newmenu->add("/compta/param/",$langs->trans("Setup"),1,$user->rights->compta->ventilation->parametrer);
- if ($leftmenu=="ventil") $newmenu->add("/compta/param/comptes/fiche.php?action=create",$langs->trans("New"),2,$user->rights->compta->ventilation->parametrer);
- if ($leftmenu=="ventil") $newmenu->add("/compta/param/comptes/liste.php",$langs->trans("List"),2,$user->rights->compta->ventilation->parametrer);
- if ($leftmenu=="ventil") $newmenu->add("/compta/export/",$langs->trans("Export"),1,$user->rights->compta->ventilation->lire);
- if ($leftmenu=="ventil") $newmenu->add("/compta/export/index.php?action=export",$langs->trans("New"),2,$user->rights->compta->ventilation->lire);
- if ($leftmenu=="ventil") $newmenu->add("/compta/export/liste.php",$langs->trans("List"),2,$user->rights->compta->ventilation->lire);
}
// Compta expert
diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql
index e446a50a33a..b83741231f2 100755
--- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql
+++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql
@@ -158,4 +158,4 @@ ALTER TABLE llx_c_action_trigger ADD INDEX idx_action_trigger_rang (rang)
ALTER TABLE llx_facture_fourn_det ADD COLUMN fk_code_ventilation integer DEFAULT 0 NOT NULL;
-ALTER TABLE llx_facture_fourn_det ADD COLUMN fk_export_compta integer DEFAULT 0 NOT NULL;
+ALTER TABLE llx_facturedet DROP COLUMN fk_export_compta;
diff --git a/htdocs/install/mysql/tables/llx_facture_fourn_det.sql b/htdocs/install/mysql/tables/llx_facture_fourn_det.sql
index 25432793ef0..325950a4e46 100644
--- a/htdocs/install/mysql/tables/llx_facture_fourn_det.sql
+++ b/htdocs/install/mysql/tables/llx_facture_fourn_det.sql
@@ -44,6 +44,5 @@ create table llx_facture_fourn_det
date_start datetime DEFAULT NULL, -- date debut si service
date_end datetime DEFAULT NULL, -- date fin si service
fk_code_ventilation integer DEFAULT 0 NOT NULL,
- fk_export_compta integer DEFAULT 0 NOT NULL,
import_key varchar(14)
)ENGINE=innodb;
diff --git a/htdocs/install/mysql/tables/llx_facturedet.sql b/htdocs/install/mysql/tables/llx_facturedet.sql
index 847178d8330..949dee1933c 100644
--- a/htdocs/install/mysql/tables/llx_facturedet.sql
+++ b/htdocs/install/mysql/tables/llx_facturedet.sql
@@ -51,7 +51,6 @@ create table llx_facturedet
buy_price_ht double(24,8) DEFAULT 0, -- prix d'achat HT
fk_product_fournisseur_price integer DEFAULT NULL, -- reference prix fournisseur
fk_code_ventilation integer DEFAULT 0 NOT NULL,
- fk_export_compta integer DEFAULT 0 NOT NULL,
special_code integer UNSIGNED DEFAULT 0, -- code pour les lignes speciales
rang integer DEFAULT 0, -- ordre d'affichage
import_key varchar(14)
diff --git a/htdocs/install/mysql/tables/llx_paiement.sql b/htdocs/install/mysql/tables/llx_paiement.sql
index 6787aee87fd..00680f29d69 100644
--- a/htdocs/install/mysql/tables/llx_paiement.sql
+++ b/htdocs/install/mysql/tables/llx_paiement.sql
@@ -18,10 +18,6 @@
--
-- ===================================================================
-
--- Satut, 0 ou 1, 1 n'est plus supprimable
--- fk_export_compta 0 pas exporte
-
create table llx_paiement
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
@@ -36,7 +32,6 @@ create table llx_paiement
fk_bank integer NOT NULL DEFAULT 0,
fk_user_creat integer, -- utilisateur qui a cree l'info
fk_user_modif integer, -- utilisateur qui a modifie l'info
- statut smallint DEFAULT 0 NOT NULL,
- fk_export_compta integer DEFAULT 0 NOT NULL
-
+ statut smallint DEFAULT 0 NOT NULL, -- Satut, 0 ou 1, 1 n'est plus supprimable
+ fk_export_compta integer DEFAULT 0 NOT NULL -- fk_export_compta 0 pas exporte
)ENGINE=innodb;
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 5e632efbe1e..671a00ddf16 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -369,7 +369,7 @@ Module1Desc=Companies and contact management (customers, prospects...)
Module2Name=Commercial
Module2Desc=Commercial management
Module10Name=Accounting
-Module10Desc=Simple accounting management (invoice and payment dispatching)
+Module10Desc=Simple accounting reports (journals, turnover) based onto database content. No dispatching.
Module20Name=Proposals
Module20Desc=Commercial proposal management
Module22Name=Mass E-mailings
diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang
index c38ccd07d68..538b4f1784a 100644
--- a/htdocs/langs/en_US/compta.lang
+++ b/htdocs/langs/en_US/compta.lang
@@ -149,4 +149,6 @@ WarningDepositsNotIncluded=Deposits invoices are not included in this version wi
DatePaymentTermCantBeLowerThanObjectDate=Payment term date can't be lower than object date.
Pcg_version=Pcg version
Pcg_type=Pcg type
-Pcg_subtype=Pcg subtype
\ No newline at end of file
+Pcg_subtype=Pcg subtype
+InvoiceLinesToDispatch=Invoice lines to dispatch
+InvoiceDispatched=Dispatched invoices
\ No newline at end of file
diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang
index 3834defebc8..095e1a63dc6 100644
--- a/htdocs/langs/fr_FR/admin.lang
+++ b/htdocs/langs/fr_FR/admin.lang
@@ -368,7 +368,7 @@ Module1Desc= Gestion des tiers (sociétés, particuliers) et contacts
Module2Name= Commercial
Module2Desc= Gestion commerciale
Module10Name= Comptabilité
-Module10Desc= Gestion simpliste de comptabilité (ventilation de factures et paiements uniquement)
+Module10Desc= Activation de rapports simplistes de comptabilité (ca, journaux) basé sur la base. Pas de ventilation.
Module20Name= Propositions commerciales
Module20Desc= Gestion des devis/propositions commerciales
Module22Name= EMailings
diff --git a/htdocs/langs/fr_FR/compta.lang b/htdocs/langs/fr_FR/compta.lang
index 01ba085620b..12ea0024f63 100644
--- a/htdocs/langs/fr_FR/compta.lang
+++ b/htdocs/langs/fr_FR/compta.lang
@@ -161,3 +161,5 @@ DatePaymentTermCantBeLowerThanObjectDate=La date limite de règlement ne peut ê
Pcg_version=Version du plan
Pcg_type=Classe de compte
Pcg_subtype=Sous classe de compte
+InvoiceLinesToDispatch=Lignes de factures à ventiler
+InvoiceDispatched=Factures ventilées
\ No newline at end of file
|