diff --git a/htdocs/compta/stats/comp.php b/htdocs/compta/stats/comp.php index 2af1fe37067..5bee40758d8 100644 --- a/htdocs/compta/stats/comp.php +++ b/htdocs/compta/stats/comp.php @@ -21,7 +21,7 @@ /** * \file htdocs/compta/stats/comp.php * \ingroup commercial - * \version $Id$ + * \version $Id: comp.php,v 1.43 2011/06/29 11:22:36 eldy Exp $ * TODO Remove or add page in menus */ @@ -40,19 +40,16 @@ function propals ($db, $year, $month) { global $bc,$langs,$conf; - $sql = "SELECT s.nom, s.rowid as socid, p.rowid as propalid, p.price, p.ref, p.datep as dp, c.label as statut, c.id as statutid"; + $sql = "SELECT s.nom, s.rowid as socid, p.rowid as propalid, p.price, p.ref, p.datep as dp, p.fk_statut as statutid, c.label as statut"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= ", ".MAIN_DB_PREFIX."propal as p"; $sql.= ", ".MAIN_DB_PREFIX."c_propalst as c"; - $sql.= " WHERE p.fk_soc = s.rowid"; + $sql.= " WHERE p.fk_soc = s.rowid AND p.fk_statut = c.id"; $sql.= " AND p.entity = ".$conf->entity; - $sql.= " AND p.fk_statut = c.id"; - $sql.= " AND c.id in (1,2,4)"; + $sql.= " AND p.fk_statut in (1,2,4)"; $sql.= " AND date_format(p.datep, '%Y') = ".$year; $sql.= " AND round(date_format(p.datep, '%m')) = ".$month; - - - $sql .= " ORDER BY p.fk_statut"; + $sql.= " ORDER BY p.fk_statut"; $result = $db->query($sql); $num = $db->num_rows($result); @@ -77,7 +74,7 @@ function propals ($db, $year, $month) print ""; print "Societe"; print "".$langs->trans("Ref").""; - print "Date"; + print "".$langs->trans("Date").""; print "".$langs->trans("Price").""; print "".$langs->trans("Status").""; print "\n"; @@ -353,5 +350,5 @@ if ($details == 1) $db->close(); -llxFooter('$Date$ - $Revision$'); +llxFooter('$Date: 2011/06/29 11:22:36 $ - $Revision: 1.43 $'); ?> diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index c1a23a045f1..771c5b471bc 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -31,7 +31,7 @@ * \file htdocs/core/class/html.form.class.php * \ingroup core * \brief File of class with all html predefined components - * \version $Id$ + * \version $Id: html.form.class.php,v 1.183 2011/06/29 11:22:36 eldy Exp $ */ @@ -1814,7 +1814,7 @@ class Form { print ''; $i++; } diff --git a/htdocs/install/mysql/migration/3.0.0-3.1.0.sql b/htdocs/install/mysql/migration/3.0.0-3.1.0.sql index 78e1c62b6ff..5940883abdf 100755 --- a/htdocs/install/mysql/migration/3.0.0-3.1.0.sql +++ b/htdocs/install/mysql/migration/3.0.0-3.1.0.sql @@ -1,5 +1,5 @@ -- --- $Id: 3.0.0-3.1.0.sql,v 1.76 2011/06/29 10:23:33 eldy Exp $ +-- $Id: 3.0.0-3.1.0.sql,v 1.77 2011/06/29 11:22:35 eldy Exp $ -- -- Be carefull to requests order. -- This file must be loaded by calling /install/index.php page @@ -421,10 +421,20 @@ ALTER TABLE llx_propal MODIFY ref_client varchar(50); ALTER TABLE llx_propal ADD COLUMN ref_int varchar(50) AFTER ref_ext; -- Add module field to allow external modules to set their name when they add a new record during init/remove. -ALTER TABLE llx_c_type_contact ADD COLUMN module varchar(32) NULL; -ALTER TABLE llx_c_typent ADD COLUMN module varchar(32) NULL; +ALTER TABLE llx_c_chargesociales ADD COLUMN module varchar(32) NULL; +ALTER TABLE llx_c_civilite ADD COLUMN module varchar(32) NULL; ALTER TABLE llx_c_effectif ADD COLUMN module varchar(32) NULL; ALTER TABLE llx_c_forme_juridique ADD COLUMN module varchar(32) NULL; +ALTER TABLE llx_c_input_method ADD COLUMN module varchar(32) NULL; +ALTER TABLE llx_c_input_reason ADD COLUMN module varchar(32) NULL; +ALTER TABLE llx_c_paiement ADD COLUMN module varchar(32) NULL; +ALTER TABLE llx_c_paper_format ADD COLUMN module varchar(32) NULL; +ALTER TABLE llx_c_payment_term ADD COLUMN module varchar(32) NULL; +ALTER TABLE llx_c_prospectlevel ADD COLUMN module varchar(32) NULL; +ALTER TABLE llx_c_shipment_mode ADD COLUMN module varchar(32) NULL; +ALTER TABLE llx_c_type_contact ADD COLUMN module varchar(32) NULL; +ALTER TABLE llx_c_type_fees ADD COLUMN module varchar(32) NULL; +ALTER TABLE llx_c_typent ADD COLUMN module varchar(32) NULL; ALTER TABLE llx_user ADD signature text DEFAULT NULL AFTER email; diff --git a/htdocs/install/mysql/tables/llx_c_chargesociales.sql b/htdocs/install/mysql/tables/llx_c_chargesociales.sql index 5f6f4d590ae..ebca12ab5da 100644 --- a/htdocs/install/mysql/tables/llx_c_chargesociales.sql +++ b/htdocs/install/mysql/tables/llx_c_chargesociales.sql @@ -16,7 +16,7 @@ -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- --- $Id$ +-- $Id: llx_c_chargesociales.sql,v 1.4 2011/06/29 11:22:36 eldy Exp $ -- ======================================================================== create table llx_c_chargesociales @@ -26,7 +26,8 @@ create table llx_c_chargesociales deductible smallint DEFAULT 0 NOT NULL, active tinyint DEFAULT 1 NOT NULL, code varchar(12) NOT NULL, - fk_pays integer DEFAULT 1 NOT NULL + fk_pays integer DEFAULT 1 NOT NULL, + module varchar(32) NULL )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_c_civilite.sql b/htdocs/install/mysql/tables/llx_c_civilite.sql index 07285ddee22..3872bedd39d 100644 --- a/htdocs/install/mysql/tables/llx_c_civilite.sql +++ b/htdocs/install/mysql/tables/llx_c_civilite.sql @@ -16,7 +16,7 @@ -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- --- $Id$ +-- $Id: llx_c_civilite.sql,v 1.3 2011/06/29 11:22:35 eldy Exp $ -- ======================================================================== create table llx_c_civilite @@ -24,6 +24,7 @@ create table llx_c_civilite rowid integer PRIMARY KEY, code varchar(6) UNIQUE NOT NULL, civilite varchar(50), - active tinyint DEFAULT 1 NOT NULL + active tinyint DEFAULT 1 NOT NULL, + module varchar(32) NULL )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_c_input_method.sql b/htdocs/install/mysql/tables/llx_c_input_method.sql index 69681d61b61..7fcd57e31eb 100755 --- a/htdocs/install/mysql/tables/llx_c_input_method.sql +++ b/htdocs/install/mysql/tables/llx_c_input_method.sql @@ -16,7 +16,7 @@ -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- --- $Id$ +-- $Id: llx_c_input_method.sql,v 1.2 2011/06/29 11:22:35 eldy Exp $ -- ======================================================================== create table llx_c_input_method @@ -24,6 +24,7 @@ create table llx_c_input_method rowid integer AUTO_INCREMENT PRIMARY KEY, code varchar(30), libelle varchar(60), - active tinyint default 1 NOT NULL + active tinyint default 1 NOT NULL, + module varchar(32) NULL )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_c_input_reason.sql b/htdocs/install/mysql/tables/llx_c_input_reason.sql index 88327949106..f97e458be6b 100755 --- a/htdocs/install/mysql/tables/llx_c_input_reason.sql +++ b/htdocs/install/mysql/tables/llx_c_input_reason.sql @@ -16,7 +16,7 @@ -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- --- $Id$ +-- $Id: llx_c_input_reason.sql,v 1.2 2011/06/29 11:22:36 eldy Exp $ -- ======================================================================== create table llx_c_input_reason @@ -24,7 +24,7 @@ create table llx_c_input_reason rowid integer AUTO_INCREMENT PRIMARY KEY, code varchar(30), label varchar(60), - active tinyint default 1 NOT NULL - + active tinyint default 1 NOT NULL, + module varchar(32) NULL )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_c_paiement.sql b/htdocs/install/mysql/tables/llx_c_paiement.sql index 1fa04bb978a..165a8550331 100644 --- a/htdocs/install/mysql/tables/llx_c_paiement.sql +++ b/htdocs/install/mysql/tables/llx_c_paiement.sql @@ -16,7 +16,7 @@ -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- --- $Id$ +-- $Id: llx_c_paiement.sql,v 1.4 2011/06/29 11:22:36 eldy Exp $ -- ======================================================================== @@ -32,7 +32,8 @@ create table llx_c_paiement code varchar(6) UNIQUE NOT NULL, libelle varchar(30), type smallint, - active tinyint DEFAULT 1 NOT NULL + active tinyint DEFAULT 1 NOT NULL, + module varchar(32) NULL )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_c_paper_format.sql b/htdocs/install/mysql/tables/llx_c_paper_format.sql index 99c7ad3cee3..6efa388ef81 100644 --- a/htdocs/install/mysql/tables/llx_c_paper_format.sql +++ b/htdocs/install/mysql/tables/llx_c_paper_format.sql @@ -15,7 +15,7 @@ -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- --- $Id$ +-- $Id: llx_c_paper_format.sql,v 1.3 2011/06/29 11:22:35 eldy Exp $ -- ======================================================================== create table llx_c_paper_format @@ -25,8 +25,9 @@ create table llx_c_paper_format label varchar(50) NOT NULL, width float(6,2) DEFAULT 0, -- Largeur du papier height float(6,2) DEFAULT 0, -- Hauteur du papier - unit varchar(5) NOT NULL, -- Unit� de mesure - active tinyint DEFAULT 1 NOT NULL + unit varchar(5) NOT NULL, -- Mesure unit + active tinyint DEFAULT 1 NOT NULL, + module varchar(32) NULL )ENGINE=innodb; -- diff --git a/htdocs/install/mysql/tables/llx_c_payment_term.sql b/htdocs/install/mysql/tables/llx_c_payment_term.sql index cb7a9156583..c8824b2d04e 100644 --- a/htdocs/install/mysql/tables/llx_c_payment_term.sql +++ b/htdocs/install/mysql/tables/llx_c_payment_term.sql @@ -15,7 +15,7 @@ -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- --- $Id$ +-- $Id: llx_c_payment_term.sql,v 1.4 2011/06/29 11:22:35 eldy Exp $ -- ============================================================================ create table llx_c_payment_term @@ -28,5 +28,6 @@ create table llx_c_payment_term libelle_facture text, fdm tinyint, -- reglement fin de mois nbjour smallint, - decalage smallint + decalage smallint, + module varchar(32) NULL )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_c_prospectlevel.sql b/htdocs/install/mysql/tables/llx_c_prospectlevel.sql index 5a9cdc4edde..0f608cbc171 100644 --- a/htdocs/install/mysql/tables/llx_c_prospectlevel.sql +++ b/htdocs/install/mysql/tables/llx_c_prospectlevel.sql @@ -15,7 +15,7 @@ -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- --- $Id$ +-- $Id: llx_c_prospectlevel.sql,v 1.3 2011/06/29 11:22:36 eldy Exp $ -- =================================================================== create table llx_c_prospectlevel @@ -23,6 +23,7 @@ create table llx_c_prospectlevel code varchar(12) PRIMARY KEY, label varchar(30), sortorder smallint, - active smallint DEFAULT 1 NOT NULL + active smallint DEFAULT 1 NOT NULL, + module varchar(32) NULL ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_c_shipment_mode.sql b/htdocs/install/mysql/tables/llx_c_shipment_mode.sql index 5cfd891f889..76caf44356d 100644 --- a/htdocs/install/mysql/tables/llx_c_shipment_mode.sql +++ b/htdocs/install/mysql/tables/llx_c_shipment_mode.sql @@ -15,7 +15,7 @@ -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- --- $Id$ +-- $Id: llx_c_shipment_mode.sql,v 1.3 2011/06/29 11:22:35 eldy Exp $ -- =================================================================== create table llx_c_shipment_mode @@ -25,5 +25,6 @@ create table llx_c_shipment_mode code varchar(30) NOT NULL, libelle varchar(50) NOT NULL, description text, - active tinyint DEFAULT 0 + active tinyint DEFAULT 0, + module varchar(32) NULL )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_c_type_fees.sql b/htdocs/install/mysql/tables/llx_c_type_fees.sql index 54f740d82b8..85ea592d950 100644 --- a/htdocs/install/mysql/tables/llx_c_type_fees.sql +++ b/htdocs/install/mysql/tables/llx_c_type_fees.sql @@ -16,7 +16,7 @@ -- along with this program; if not, write to the Free Software -- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -- --- $Id$ +-- $Id: llx_c_type_fees.sql,v 1.3 2011/06/29 11:22:35 eldy Exp $ -- ======================================================================== create table llx_c_type_fees @@ -24,5 +24,6 @@ create table llx_c_type_fees id integer AUTO_INCREMENT PRIMARY KEY, code varchar(12) UNIQUE NOT NULL, libelle varchar(30), - active tinyint DEFAULT 1 NOT NULL + active tinyint DEFAULT 1 NOT NULL, + module varchar(32) NULL )ENGINE=innodb;