mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 09:38:23 +01:00
Uniformize table fields
This commit is contained in:
@@ -21,7 +21,7 @@
|
|||||||
/**
|
/**
|
||||||
* \file htdocs/compta/stats/comp.php
|
* \file htdocs/compta/stats/comp.php
|
||||||
* \ingroup commercial
|
* \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
|
* TODO Remove or add page in menus
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -40,19 +40,16 @@ function propals ($db, $year, $month)
|
|||||||
{
|
{
|
||||||
global $bc,$langs,$conf;
|
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.= " FROM ".MAIN_DB_PREFIX."societe as s";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."propal as p";
|
$sql.= ", ".MAIN_DB_PREFIX."propal as p";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."c_propalst as c";
|
$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.entity = ".$conf->entity;
|
||||||
$sql.= " AND p.fk_statut = c.id";
|
$sql.= " AND p.fk_statut in (1,2,4)";
|
||||||
$sql.= " AND c.id in (1,2,4)";
|
|
||||||
$sql.= " AND date_format(p.datep, '%Y') = ".$year;
|
$sql.= " AND date_format(p.datep, '%Y') = ".$year;
|
||||||
$sql.= " AND round(date_format(p.datep, '%m')) = ".$month;
|
$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);
|
$result = $db->query($sql);
|
||||||
$num = $db->num_rows($result);
|
$num = $db->num_rows($result);
|
||||||
@@ -77,7 +74,7 @@ function propals ($db, $year, $month)
|
|||||||
print "<tr class=\"liste_titre\">";
|
print "<tr class=\"liste_titre\">";
|
||||||
print "<td>Societe</td>";
|
print "<td>Societe</td>";
|
||||||
print "<td>".$langs->trans("Ref")."</td>";
|
print "<td>".$langs->trans("Ref")."</td>";
|
||||||
print "<td align=\"right\">Date</td>";
|
print "<td align=\"right\">".$langs->trans("Date")."</td>";
|
||||||
print "<td align=\"right\">".$langs->trans("Price")."</td>";
|
print "<td align=\"right\">".$langs->trans("Price")."</td>";
|
||||||
print "<td align=\"center\">".$langs->trans("Status")."</td>";
|
print "<td align=\"center\">".$langs->trans("Status")."</td>";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
@@ -353,5 +350,5 @@ if ($details == 1)
|
|||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
|
|
||||||
llxFooter('$Date$ - $Revision$');
|
llxFooter('$Date: 2011/06/29 11:22:36 $ - $Revision: 1.43 $');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
* \file htdocs/core/class/html.form.class.php
|
* \file htdocs/core/class/html.form.class.php
|
||||||
* \ingroup core
|
* \ingroup core
|
||||||
* \brief File of class with all html predefined components
|
* \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 '<option value="'.$obj->id.'">';
|
print '<option value="'.$obj->id.'">';
|
||||||
}
|
}
|
||||||
print $obj->label;
|
print ($langs->trans("PropalStatus".$obj->code)!="PropalStatus".$obj->code)?$langs->trans("PropalStatus".$obj->code):$obj->label;
|
||||||
print '</option>';
|
print '</option>';
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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.
|
-- Be carefull to requests order.
|
||||||
-- This file must be loaded by calling /install/index.php page
|
-- 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;
|
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.
|
-- 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_chargesociales ADD COLUMN module varchar(32) NULL;
|
||||||
ALTER TABLE llx_c_typent 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_effectif ADD COLUMN module varchar(32) NULL;
|
||||||
ALTER TABLE llx_c_forme_juridique 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;
|
ALTER TABLE llx_user ADD signature text DEFAULT NULL AFTER email;
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
-- along with this program; if not, write to the Free Software
|
-- along with this program; if not, write to the Free Software
|
||||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
-- 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
|
create table llx_c_chargesociales
|
||||||
@@ -26,7 +26,8 @@ create table llx_c_chargesociales
|
|||||||
deductible smallint DEFAULT 0 NOT NULL,
|
deductible smallint DEFAULT 0 NOT NULL,
|
||||||
active tinyint DEFAULT 1 NOT NULL,
|
active tinyint DEFAULT 1 NOT NULL,
|
||||||
code varchar(12) 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;
|
)ENGINE=innodb;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
-- along with this program; if not, write to the Free Software
|
-- along with this program; if not, write to the Free Software
|
||||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
-- 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
|
create table llx_c_civilite
|
||||||
@@ -24,6 +24,7 @@ create table llx_c_civilite
|
|||||||
rowid integer PRIMARY KEY,
|
rowid integer PRIMARY KEY,
|
||||||
code varchar(6) UNIQUE NOT NULL,
|
code varchar(6) UNIQUE NOT NULL,
|
||||||
civilite varchar(50),
|
civilite varchar(50),
|
||||||
active tinyint DEFAULT 1 NOT NULL
|
active tinyint DEFAULT 1 NOT NULL,
|
||||||
|
module varchar(32) NULL
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
-- along with this program; if not, write to the Free Software
|
-- along with this program; if not, write to the Free Software
|
||||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
-- 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
|
create table llx_c_input_method
|
||||||
@@ -24,6 +24,7 @@ create table llx_c_input_method
|
|||||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
code varchar(30),
|
code varchar(30),
|
||||||
libelle varchar(60),
|
libelle varchar(60),
|
||||||
active tinyint default 1 NOT NULL
|
active tinyint default 1 NOT NULL,
|
||||||
|
module varchar(32) NULL
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
-- along with this program; if not, write to the Free Software
|
-- along with this program; if not, write to the Free Software
|
||||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
-- 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
|
create table llx_c_input_reason
|
||||||
@@ -24,7 +24,7 @@ create table llx_c_input_reason
|
|||||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
code varchar(30),
|
code varchar(30),
|
||||||
label varchar(60),
|
label varchar(60),
|
||||||
active tinyint default 1 NOT NULL
|
active tinyint default 1 NOT NULL,
|
||||||
|
module varchar(32) NULL
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
-- along with this program; if not, write to the Free Software
|
-- along with this program; if not, write to the Free Software
|
||||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
-- 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,
|
code varchar(6) UNIQUE NOT NULL,
|
||||||
libelle varchar(30),
|
libelle varchar(30),
|
||||||
type smallint,
|
type smallint,
|
||||||
active tinyint DEFAULT 1 NOT NULL
|
active tinyint DEFAULT 1 NOT NULL,
|
||||||
|
module varchar(32) NULL
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
-- along with this program; if not, write to the Free Software
|
-- along with this program; if not, write to the Free Software
|
||||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
-- 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
|
create table llx_c_paper_format
|
||||||
@@ -25,8 +25,9 @@ create table llx_c_paper_format
|
|||||||
label varchar(50) NOT NULL,
|
label varchar(50) NOT NULL,
|
||||||
width float(6,2) DEFAULT 0, -- Largeur du papier
|
width float(6,2) DEFAULT 0, -- Largeur du papier
|
||||||
height float(6,2) DEFAULT 0, -- Hauteur du papier
|
height float(6,2) DEFAULT 0, -- Hauteur du papier
|
||||||
unit varchar(5) NOT NULL, -- Unit<EFBFBD> de mesure
|
unit varchar(5) NOT NULL, -- Mesure unit
|
||||||
active tinyint DEFAULT 1 NOT NULL
|
active tinyint DEFAULT 1 NOT NULL,
|
||||||
|
module varchar(32) NULL
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|
||||||
--
|
--
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
-- along with this program; if not, write to the Free Software
|
-- along with this program; if not, write to the Free Software
|
||||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
-- 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
|
create table llx_c_payment_term
|
||||||
@@ -28,5 +28,6 @@ create table llx_c_payment_term
|
|||||||
libelle_facture text,
|
libelle_facture text,
|
||||||
fdm tinyint, -- reglement fin de mois
|
fdm tinyint, -- reglement fin de mois
|
||||||
nbjour smallint,
|
nbjour smallint,
|
||||||
decalage smallint
|
decalage smallint,
|
||||||
|
module varchar(32) NULL
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
-- along with this program; if not, write to the Free Software
|
-- along with this program; if not, write to the Free Software
|
||||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
-- 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
|
create table llx_c_prospectlevel
|
||||||
@@ -23,6 +23,7 @@ create table llx_c_prospectlevel
|
|||||||
code varchar(12) PRIMARY KEY,
|
code varchar(12) PRIMARY KEY,
|
||||||
label varchar(30),
|
label varchar(30),
|
||||||
sortorder smallint,
|
sortorder smallint,
|
||||||
active smallint DEFAULT 1 NOT NULL
|
active smallint DEFAULT 1 NOT NULL,
|
||||||
|
module varchar(32) NULL
|
||||||
) ENGINE=innodb;
|
) ENGINE=innodb;
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
-- along with this program; if not, write to the Free Software
|
-- along with this program; if not, write to the Free Software
|
||||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
-- 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
|
create table llx_c_shipment_mode
|
||||||
@@ -25,5 +25,6 @@ create table llx_c_shipment_mode
|
|||||||
code varchar(30) NOT NULL,
|
code varchar(30) NOT NULL,
|
||||||
libelle varchar(50) NOT NULL,
|
libelle varchar(50) NOT NULL,
|
||||||
description text,
|
description text,
|
||||||
active tinyint DEFAULT 0
|
active tinyint DEFAULT 0,
|
||||||
|
module varchar(32) NULL
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
-- along with this program; if not, write to the Free Software
|
-- along with this program; if not, write to the Free Software
|
||||||
-- Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
-- 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
|
create table llx_c_type_fees
|
||||||
@@ -24,5 +24,6 @@ create table llx_c_type_fees
|
|||||||
id integer AUTO_INCREMENT PRIMARY KEY,
|
id integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
code varchar(12) UNIQUE NOT NULL,
|
code varchar(12) UNIQUE NOT NULL,
|
||||||
libelle varchar(30),
|
libelle varchar(30),
|
||||||
active tinyint DEFAULT 1 NOT NULL
|
active tinyint DEFAULT 1 NOT NULL,
|
||||||
|
module varchar(32) NULL
|
||||||
)ENGINE=innodb;
|
)ENGINE=innodb;
|
||||||
|
|||||||
Reference in New Issue
Block a user