diff --git a/dev/initdata/generate-commande.php b/dev/initdata/generate-commande.php
index 967143ab4a5..785c0544876 100755
--- a/dev/initdata/generate-commande.php
+++ b/dev/initdata/generate-commande.php
@@ -20,7 +20,7 @@
*/
/**
- * \file htdocs/dev/generate-commande.php
+ * \file dev/initdata/generate-commande.php
* \brief Script de generation de donnees aleatoires pour les commandes
*/
diff --git a/dev/initdata/generate-facture.php b/dev/initdata/generate-facture.php
index 5c630454ba7..97f00f7d6d6 100755
--- a/dev/initdata/generate-facture.php
+++ b/dev/initdata/generate-facture.php
@@ -19,7 +19,7 @@
*/
/**
- * \file htdocs/dev/generate-facture.php
+ * \file dev/intdata/generate-facture.php
* \brief Script de generation de donnees aleatoires pour les factures
*/
diff --git a/dev/initdata/generate-produit.php b/dev/initdata/generate-produit.php
index d712c36e1e9..38ea93f131b 100755
--- a/dev/initdata/generate-produit.php
+++ b/dev/initdata/generate-produit.php
@@ -20,7 +20,7 @@
*/
/**
- * \file htdocs/dev/generate-produit.php
+ * \file dev/initdata/generate-produit.php
* \brief Script de generation de donnees aleatoires pour les produits
*/
diff --git a/dev/initdata/generate-propale.php b/dev/initdata/generate-propale.php
index a887b86b1a8..b7b76ec2c02 100755
--- a/dev/initdata/generate-propale.php
+++ b/dev/initdata/generate-propale.php
@@ -20,7 +20,7 @@
*/
/**
- * \file htdocs/dev/generate-propale.php
+ * \file dev/initdata/generate-propale.php
* \brief Script de generation de donnees aleatoires pour les propales
*/
diff --git a/dev/initdata/generate-societe.php b/dev/initdata/generate-societe.php
index c0c512db636..72e4d9b1e84 100755
--- a/dev/initdata/generate-societe.php
+++ b/dev/initdata/generate-societe.php
@@ -20,8 +20,8 @@
*/
/**
- * \file htdocs/dev/generate-societe.php
- * \brief Script de generation de donnees aleatoires pour les societes
+ * \file dev/initdata/generate-societe.php
+ * \brief Script de generation de donnees aleatoires pour les societes
*/
// Test si mode batch
@@ -89,7 +89,7 @@ for ($s = 0 ; $s < GEN_NUMBER_SOCIETE ; $s++)
{
print "Company $s\n";
$soc = new Societe($db);
- $soc->nom = "Company num ".time()."$s";
+ $soc->name = "Company num ".time()."$s";
$soc->town = $listoftown[rand(0, count($listoftown)-1)];
$soc->client = rand(1,2); // Une societe sur 2 est prospect, l'autre client
$soc->fournisseur = rand(0,1); // Une societe sur 2 est fournisseur
@@ -101,7 +101,7 @@ for ($s = 0 ; $s < GEN_NUMBER_SOCIETE ; $s++)
// Un client sur 3 a une remise de 5%
$user_remise=rand(1,3); if ($user_remise==3) $soc->remise_percent=5;
print "> client=".$soc->client.", fournisseur=".$soc->fournisseur.", remise=".$soc->remise_percent."\n";
- $soc->note='Company created by the script generate-societe.php';
+ $soc->note_private = 'Company created by the script generate-societe.php';
$socid = $soc->create();
if ($socid >= 0)
@@ -120,7 +120,7 @@ for ($s = 0 ; $s < GEN_NUMBER_SOCIETE ; $s++)
}
}
- print "Company ".$s." created nom=".$soc->nom."\n";
+ print "Company ".$s." created nom=".$soc->name."\n";
}
else
{
diff --git a/dev/initdata/mysqldump_dolibarr_3.7.0.sql b/dev/initdata/mysqldump_dolibarr_3.7.0.sql
index 9e920813519..3dda5017828 100644
--- a/dev/initdata/mysqldump_dolibarr_3.7.0.sql
+++ b/dev/initdata/mysqldump_dolibarr_3.7.0.sql
@@ -7427,7 +7427,7 @@ CREATE TABLE `llx_user` (
LOCK TABLES `llx_user` WRITE;
/*!40000 ALTER TABLE `llx_user` DISABLE KEYS */;
-INSERT INTO `llx_user` VALUES (1,'2010-07-08 13:20:11','2012-12-12 16:54:10',NULL,NULL,'admin',0,NULL,NULL,NULL,'admin','21232f297a57a5a743894a0e4a801fc3',NULL,'SuperAdminName','Firstname','',NULL,'','','','bidon@destailleur.fr','',1,'','','',1,1,NULL,NULL,NULL,'','2014-12-21 20:52:09','2014-12-21 13:51:38',NULL,'',1,'01.jpg',NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL),(2,'2010-07-08 13:54:48','2010-07-08 09:54:48',NULL,NULL,'demo',1,NULL,NULL,NULL,'demo','fe01ce2a7fbac8fafaed7c982a04e229',NULL,'John','Doe',NULL,NULL,'09123123','','','johndoe@mycompany.com',NULL,0,'','','',1,1,NULL,NULL,NULL,'','2013-03-24 16:30:29','2010-07-08 14:12:02',NULL,'',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL),(3,'2010-07-11 16:18:59','2013-02-20 18:07:21',NULL,NULL,'adupont',1,NULL,NULL,NULL,'adupont','00856ab2bbb748aa29aa335a6e3a2407',NULL,'Dupont','Alain','',NULL,'','','','toto@aa.com','',0,'','','',1,1,NULL,NULL,2,'','2012-12-21 17:38:55',NULL,NULL,'',1,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL),(4,'2013-01-23 17:52:27','2013-02-20 18:48:01',NULL,NULL,'aaa',1,NULL,NULL,NULL,'aaa','47bce5c74f589f4867dbd57e9ca9f808',NULL,'aaa','','',NULL,'','','','','',0,'','','',1,1,17,6,NULL,'','2013-02-25 10:18:41','2013-01-23 17:53:20',NULL,'',1,NULL,NULL,NULL,5,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL),(5,'2013-01-23 17:52:37','2013-01-23 15:52:37',NULL,NULL,'bbb',0,NULL,NULL,NULL,'bbb','08f8e0260c64418510cefb2b06eee5cd',NULL,'bbb','','',NULL,'','','','','',1,'','','',1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL),(6,'2013-02-16 20:22:40','2013-02-16 18:22:40',NULL,NULL,'aaab',2,NULL,NULL,NULL,'aaab','4c189b020ceb022e0ecc42482802e2b8',NULL,'aaab','','',NULL,'','','','','',0,'','','',1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL),(7,'2013-02-16 20:48:15','2013-02-16 18:48:15',NULL,NULL,'zzz',2,NULL,NULL,NULL,'zzz','f3abb86bd34cf4d52698f14c0da1dc60',NULL,'zzz','','',NULL,'','','','','',0,'','','',1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL),(9,'2013-02-16 20:50:07','2013-03-24 15:10:14',NULL,NULL,'zzzg',2,NULL,NULL,NULL,'jc28fg4h','93d789524fd223cf05eecea3f59cbe86',NULL,'zzzg','','',NULL,'','','','','fsdkkfsdf \r\nfsdfsd \r\nfsdfs',0,'','','',1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,NULL,NULL,NULL,5,NULL,'','','',NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL);
+INSERT INTO `llx_user` VALUES (1,'2010-07-08 13:20:11','2012-12-12 16:54:10',NULL,NULL,'admin',0,NULL,NULL,NULL,'admin','21232f297a57a5a743894a0e4a801fc3',NULL,'SuperAdminName','Firstname','',NULL,'','','','bidon@destailleur.fr','',1,'','','',1,1,NULL,NULL,NULL,'','2014-12-21 20:52:09','2014-12-21 13:51:38',NULL,'',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL),(2,'2010-07-08 13:54:48','2010-07-08 09:54:48',NULL,NULL,'demo',1,NULL,NULL,NULL,'demo','fe01ce2a7fbac8fafaed7c982a04e229',NULL,'John','Doe',NULL,NULL,'09123123','','','johndoe@mycompany.com',NULL,0,'','','',1,1,NULL,NULL,NULL,'','2013-03-24 16:30:29','2010-07-08 14:12:02',NULL,'',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL),(3,'2010-07-11 16:18:59','2013-02-20 18:07:21',NULL,NULL,'adupont',1,NULL,NULL,NULL,'adupont','00856ab2bbb748aa29aa335a6e3a2407',NULL,'Dupont','Alain','',NULL,'','','','toto@aa.com','',0,'','','',1,1,NULL,NULL,2,'','2012-12-21 17:38:55',NULL,NULL,'',1,NULL,NULL,NULL,2,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL),(4,'2013-01-23 17:52:27','2013-02-20 18:48:01',NULL,NULL,'aaa',1,NULL,NULL,NULL,'aaa','47bce5c74f589f4867dbd57e9ca9f808',NULL,'aaa','','',NULL,'','','','','',0,'','','',1,1,17,6,NULL,'','2013-02-25 10:18:41','2013-01-23 17:53:20',NULL,'',1,NULL,NULL,NULL,5,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL),(5,'2013-01-23 17:52:37','2013-01-23 15:52:37',NULL,NULL,'bbb',0,NULL,NULL,NULL,'bbb','08f8e0260c64418510cefb2b06eee5cd',NULL,'bbb','','',NULL,'','','','','',1,'','','',1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL),(6,'2013-02-16 20:22:40','2013-02-16 18:22:40',NULL,NULL,'aaab',2,NULL,NULL,NULL,'aaab','4c189b020ceb022e0ecc42482802e2b8',NULL,'aaab','','',NULL,'','','','','',0,'','','',1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL),(7,'2013-02-16 20:48:15','2013-02-16 18:48:15',NULL,NULL,'zzz',2,NULL,NULL,NULL,'zzz','f3abb86bd34cf4d52698f14c0da1dc60',NULL,'zzz','','',NULL,'','','','','',0,'','','',1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL),(9,'2013-02-16 20:50:07','2013-03-24 15:10:14',NULL,NULL,'zzzg',2,NULL,NULL,NULL,'jc28fg4h','93d789524fd223cf05eecea3f59cbe86',NULL,'zzzg','','',NULL,'','','','','fsdkkfsdf \r\nfsdfsd \r\nfsdfs',0,'','','',1,1,NULL,NULL,NULL,'',NULL,NULL,NULL,'',1,NULL,NULL,NULL,5,NULL,'','','',NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL);
/*!40000 ALTER TABLE `llx_user` ENABLE KEYS */;
UNLOCK TABLES;
diff --git a/htdocs/compta/bank/account.php b/htdocs/compta/bank/account.php
index 20ef8bcc3cc..6ba80304188 100644
--- a/htdocs/compta/bank/account.php
+++ b/htdocs/compta/bank/account.php
@@ -78,6 +78,16 @@ if ($negpage)
$object = new Account($db);
+if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) // Both test are required to be compatible with all browsers
+{
+ $paiementtype="";
+ $req_nb="";
+ $thirdparty="";
+ $req_desc="";
+ $req_debit="";
+ $req_credit="";
+}
+
/*
* Action
*/
@@ -446,7 +456,10 @@ if ($id > 0 || ! empty($ref))
print '
';
print '
';
print '
';
- print '
';
+ print '
';
+ print '';
+ print '';
+ print '
';
print "\n";
diff --git a/htdocs/compta/bank/index.php b/htdocs/compta/bank/index.php
index 9c9f0574c31..96a44ecd354 100644
--- a/htdocs/compta/bank/index.php
+++ b/htdocs/compta/bank/index.php
@@ -111,8 +111,12 @@ foreach ($accounts as $key=>$type)
if ($acc->rappro)
{
$result=$acc->load_board($user,$acc->id);
- print $acc->nbtodo;
- if ($acc->nbtodolate) print ' ('.$acc->nbtodolate.img_warning($langs->trans("Late")).')';
+ if ($result<0) {
+ setEventMessage($acc->error, 'errors');
+ } else {
+ print $result->nbtodo;
+ if ($result->nbtodolate) print ' ('.$result->nbtodolate.img_warning($langs->trans("Late")).')';
+ }
}
else print $langs->trans("FeatureDisabled");
print '';
@@ -223,8 +227,12 @@ foreach ($accounts as $key=>$type)
if ($acc->rappro)
{
$result=$acc->load_board($user,$acc->id);
- print $acc->nbtodo;
- if ($acc->nbtodolate) print ' ('.$acc->nbtodolate.img_warning($langs->trans("Late")).')';
+ if ($result<0) {
+ setEventMessage($acc->error, 'errors');
+ } else {
+ print $result->nbtodo;
+ if ($result->nbtodolate) print ' ('.$result->nbtodolate.img_warning($langs->trans("Late")).')';
+ }
}
else print $langs->trans("FeatureDisabled");
print '';
diff --git a/htdocs/conf/phpinfo.php b/htdocs/conf/phpinfo.php
deleted file mode 100644
index 179bd651458..00000000000
--- a/htdocs/conf/phpinfo.php
+++ /dev/null
@@ -1,5 +0,0 @@
-Go back to index
-| ">Refresh
-
-
-
\ No newline at end of file
diff --git a/htdocs/contact/document.php b/htdocs/contact/document.php
new file mode 100644
index 00000000000..970f3543c45
--- /dev/null
+++ b/htdocs/contact/document.php
@@ -0,0 +1,123 @@
+
+ * Copyright (C) 2015 Frederic France
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+/**
+ * \file htdocs/contact/document.php
+ * \ingroup contact
+ * \brief Page with attached files on contact
+ */
+
+require '../main.inc.php';
+require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/core/lib/contact.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
+
+$langs->load("other");
+$langs->load("companies");
+$langs->load("contact");
+
+$id = GETPOST('id','int');
+$action = GETPOST("action");
+$confirm = GETPOST('confirm', 'alpha');
+
+// Security check
+if ($user->societe_id) $socid=$user->societe_id;
+$result = restrictedArea($user, 'contact', $id, '','');
+
+// Get parameters
+$sortfield = GETPOST("sortfield",'alpha');
+$sortorder = GETPOST("sortorder",'alpha');
+$page = GETPOST("page",'int');
+if ($page == -1) {
+ $page = 0;
+}
+$offset = $conf->liste_limit * $page;
+$pageprev = $page - 1;
+$pagenext = $page + 1;
+if (! $sortorder) $sortorder="ASC";
+if (! $sortfield) $sortfield="name";
+
+$object = new Contact($db);
+if ($id > 0) $object->fetch($id);
+
+$upload_dir = $conf->societe->dir_output.'/contact/'.dol_sanitizeFileName($object->ref);
+$modulepart='contact';
+
+
+/*
+ * Actions
+ */
+
+include DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_pre_headers.tpl.php';
+
+
+/*
+ * View
+ */
+
+$form = new Form($db);
+
+$help_url='EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
+llxHeader("",$langs->trans("Contact"), $helpurl);
+
+if ($object->id)
+{
+ $head = contact_prepare_head($object, $user);
+
+ dol_fiche_head($head, 'documents', $langs->trans("Contact"), 0, 'contact');
+
+
+ // Construit liste des fichiers
+ $filearray=dol_dir_list($upload_dir,"files",0,'','(\.meta|_preview\.png)$',$sortfield,(strtolower($sortorder)=='desc'?SORT_DESC:SORT_ASC),1);
+ $totalsize=0;
+ foreach($filearray as $key => $file)
+ {
+ $totalsize+=$file['size'];
+ }
+
+ print '
';
}
diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php
index 5e36037738f..080d0adb806 100644
--- a/htdocs/don/class/don.class.php
+++ b/htdocs/don/class/don.class.php
@@ -54,7 +54,7 @@ class Don extends CommonObject
var $country;
var $email;
var $public;
- var $fk_project;
+ var $fk_projet;
var $modepaiement;
var $modepaiementid;
var $note_private;
@@ -337,7 +337,7 @@ class Don extends CommonObject
// $sql.= ", country"; -- Deprecated
$sql.= ", fk_country";
$sql.= ", public";
- $sql.= ", fk_project";
+ $sql.= ", fk_projet";
$sql.= ", note_private";
$sql.= ", note_public";
$sql.= ", fk_user_author";
@@ -359,7 +359,7 @@ class Don extends CommonObject
$sql.= ", '".$this->db->escape($this->town)."'";
$sql.= ", ".$this->country_id;
$sql.= ", ".$this->public;
- $sql.= ", ".($this->fk_project > 0?$this->fk_project:"null");
+ $sql.= ", ".($this->fk_projet > 0?$this->fk_projet:"null");
$sql.= ", ".(!empty($this->note_private)?("'".$this->db->escape($this->note_private)."'"):"NULL");
$sql.= ", ".(!empty($this->note_public)?("'".$this->db->escape($this->note_public)."'"):"NULL");
$sql.= ", ".$user->id;
@@ -455,7 +455,7 @@ class Don extends CommonObject
$sql .= ",town='".$this->db->escape($this->town)."'";
$sql .= ",fk_country = ".$this->country_id;
$sql .= ",public=".$this->public;
- $sql .= ",fk_project=".($this->fk_project>0?$this->fk_project:'null');
+ $sql .= ",fk_projet=".($this->fk_projet>0?$this->fk_projet:'null');
$sql .= ",note_private=".(!empty($this->note_private)?("'".$this->db->escape($this->note_private)."'"):"NULL");
$sql .= ",note_public=".(!empty($this->note_public)?("'".$this->db->escape($this->note_public)."'"):"NULL");
$sql .= ",datedon='".$this->db->idate($this->date)."'";
@@ -601,11 +601,11 @@ class Don extends CommonObject
$sql = "SELECT d.rowid, d.datec, d.tms as datem, d.datedon,";
$sql.= " d.firstname, d.lastname, d.societe, d.amount, d.fk_statut, d.address, d.zip, d.town, ";
$sql.= " d.fk_country, d.country as country_olddata, d.public, d.amount, d.fk_payment, d.paid, d.note_private, d.note_public, cp.libelle, d.email, d.phone, ";
- $sql.= " d.phone_mobile, d.fk_project,";
+ $sql.= " d.phone_mobile, d.fk_projet,";
$sql.= " p.title as project_label,";
$sql.= " c.code as country_code, c.label as country";
$sql.= " FROM ".MAIN_DB_PREFIX."don as d";
- $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = d.fk_project";
+ $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = d.fk_projet";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as cp ON cp.id = d.fk_payment";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON d.fk_country = c.rowid";
if (! empty($id))
@@ -647,7 +647,7 @@ class Don extends CommonObject
$this->phone = $obj->phone;
$this->phone_mobile = $obj->phone_mobile;
$this->project = $obj->project_label;
- $this->fk_project = $obj->fk_project;
+ $this->fk_projet = $obj->fk_projet;
$this->public = $obj->public;
$this->modepaymentid = $obj->fk_payment;
$this->modepayment = $obj->libelle;
@@ -677,8 +677,8 @@ class Don extends CommonObject
/**
* Validate a promise of donation
*
- * @param int $id id of donation
- * @param int $userid User who validate the promise
+ * @param int $id id of donation
+ * @param int $userid User who validate the donation/promise
* @return int <0 if KO, >0 if OK
*/
function valid_promesse($id, $userid)
@@ -706,10 +706,10 @@ class Don extends CommonObject
}
/**
- * Classe le don comme paye, le don a ete recu
+ * Classify the donation as paid, the donation was received
*
- * @param int $id id du don a modifier
- * @param int $modepaiement mode de paiement
+ * @param int $id id of donation
+ * @param int $modepayment mode de payment
* @return int <0 if KO, >0 if OK
*/
function set_paid($id, $modepaiement='')
@@ -741,7 +741,7 @@ class Don extends CommonObject
}
/**
- * Set donation to status canceled
+ * Set donation to status cancelled
*
* @param int $id id of donation
* @return int <0 if KO, >0 if OK
diff --git a/htdocs/don/list.php b/htdocs/don/list.php
index ee7a6f5e6f9..2fb2e066b5b 100644
--- a/htdocs/don/list.php
+++ b/htdocs/don/list.php
@@ -73,7 +73,7 @@ $sql = "SELECT d.rowid, d.datedon, d.firstname, d.lastname, d.societe,";
$sql.= " d.amount, d.fk_statut as statut, ";
$sql.= " p.rowid as pid, p.ref, p.title, p.public";
$sql.= " FROM ".MAIN_DB_PREFIX."don as d LEFT JOIN ".MAIN_DB_PREFIX."projet AS p";
-$sql.= " ON p.rowid = d.fk_project WHERE 1 = 1";
+$sql.= " ON p.rowid = d.fk_projet WHERE 1 = 1";
if ($statut >= 0)
{
$sql .= " AND d.fk_statut = ".$statut;
@@ -125,7 +125,7 @@ if ($resql)
if (! empty($conf->projet->enabled))
{
$langs->load("projects");
- print_liste_field_titre($langs->trans("Project"),$_SERVER["PHP_SELF"],"fk_project","&page=$page&statut=$statut","","",$sortfield,$sortorder);
+ print_liste_field_titre($langs->trans("Project"),$_SERVER["PHP_SELF"],"fk_projet","&page=$page&statut=$statut","","",$sortfield,$sortorder);
}
print_liste_field_titre($langs->trans("Amount"),$_SERVER["PHP_SELF"],"d.amount","&page=$page&statut=$statut","",'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"d.fk_statut","&page=$page&statut=$statut","",'align="right"',$sortfield,$sortorder);
diff --git a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql
index b1b4eccbf56..57cb8745502 100644
--- a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql
+++ b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql
@@ -425,7 +425,7 @@ ALTER TABLE llx_societe_extrafields ADD UNIQUE INDEX uk_societe_extrafields (fk_
ALTER TABLE llx_don ADD COLUMN fk_country integer NOT NULL after country;
ALTER TABLE llx_don CHANGE COLUMN fk_paiement fk_payment integer;
ALTER TABLE llx_don ADD COLUMN paid smallint default 0 NOT NULL after fk_payment;
-ALTER TABLE llx_don CHANGE COLUMN fk_don_projet fk_project integer NULL;
+ALTER TABLE llx_don CHANGE COLUMN fk_don_projet fk_projet integer NULL;
create table llx_don_extrafields
(
diff --git a/htdocs/install/mysql/tables/llx_don.sql b/htdocs/install/mysql/tables/llx_don.sql
index d33467f9a7b..f2aa52f073d 100644
--- a/htdocs/install/mysql/tables/llx_don.sql
+++ b/htdocs/install/mysql/tables/llx_don.sql
@@ -27,8 +27,8 @@ create table llx_don
entity integer DEFAULT 1 NOT NULL, -- multi company id
tms timestamp,
fk_statut smallint NOT NULL DEFAULT 0, -- Status of donation promise or validate
- datec datetime, -- date de creation de l'enregistrement
- datedon datetime, -- date du don/promesse
+ datec datetime, -- Create date
+ datedon datetime, -- Date of the donation/promise
amount real DEFAULT 0,
fk_payment integer,
paid smallint default 0 NOT NULL,
@@ -44,7 +44,7 @@ create table llx_don
phone varchar(24),
phone_mobile varchar(24),
public smallint DEFAULT 1 NOT NULL, -- Donation is public ? (0,1)
- fk_project integer NULL, -- Donation is given for a project ?
+ fk_projet integer NULL, -- Donation is given for a project ?
fk_user_author integer NOT NULL,
fk_user_valid integer NULL,
note_private text,
diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php
index 7e3f9d671b1..ea61f70221c 100644
--- a/htdocs/projet/element.php
+++ b/htdocs/projet/element.php
@@ -254,9 +254,10 @@ $listofreferent=array(
'name'=>"Donation",
'title'=>"ListDonationsAssociatedProject",
'class'=>'Don',
+ 'margin'=>'add',
'table'=>'don',
'datefieldname'=>'date',
- 'disableamount'=>1,
+ 'disableamount'=>0,
'test'=>$conf->don->enabled && $user->rights->don->lire),
);
@@ -344,7 +345,7 @@ foreach ($listofreferent as $key => $value)
print '