'.$langs->trans("ToClearAllRecipientsClickHere").': '.'
';
print_barre_liste($langs->trans("MailSelectedRecipients").$cleartext,$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,"",$num,$object->nbemail,'');
+ print '';
+
+ print "\n\n";
+ print '
';
+
$db->free($resql);
}
else
@@ -517,7 +530,6 @@ if ($object->fetch($id) >= 0)
dol_print_error($db);
}
- print '';
print "\n\n";
}
diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php
index 1651407d746..565e63fd749 100644
--- a/htdocs/compta/facture/class/facture-rec.class.php
+++ b/htdocs/compta/facture/class/facture-rec.class.php
@@ -125,8 +125,8 @@ class FactureRec extends Facture
$sql.= ", '".$facsrc->socid."'";
$sql.= ", ".$conf->entity;
$sql.= ", ".$this->db->idate($now);
- $sql.= ", '".$facsrc->amount."'";
- $sql.= ", '".$facsrc->remise."'";
+ $sql.= ", ".(!empty($facsrc->amount)?$facsrc->amount:'0');
+ $sql.= ", ".(!empty($facsrc->remise)?$this->remise:'0');
$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."'";
diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php
index 146237122ca..206856c3530 100755
--- a/htdocs/core/class/extrafields.class.php
+++ b/htdocs/core/class/extrafields.class.php
@@ -559,7 +559,7 @@ class ExtraFields
$this->attribute_pos[$tab->name]=$tab->pos;
}
}
-
+
return $array_name_label;
}
else
@@ -626,11 +626,11 @@ class ExtraFields
{
$tmp=explode(',',$size);
$newsize=$tmp[0];
- $out='
';
+ $out='
';
}
elseif ($type == 'varchar')
{
- $out='
';
+ $out='
';
}
elseif ($type == 'text')
{
@@ -646,27 +646,27 @@ class ExtraFields
} else {
$checked=' value="1" ';
}
- $out='
';
+ $out='
';
}
elseif ($type == 'mail')
{
- $out='
';
+ $out='
';
}
elseif ($type == 'phone')
{
- $out='
';
+ $out='
';
}
elseif ($type == 'price')
{
- $out='
'.$langs->getCurrencySymbol($conf->currency);
+ $out='
'.$langs->getCurrencySymbol($conf->currency);
}
elseif ($type == 'double')
{
- $out='
';
+ $out='
';
}
elseif ($type == 'select')
{
- $out='
\n"; $blockvmenuopened=false; }
}
}
}
diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php
index bf03e27dfaa..9f3637477bc 100644
--- a/htdocs/core/menus/standard/eldy.lib.php
+++ b/htdocs/core/menus/standard/eldy.lib.php
@@ -1228,7 +1228,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
// Show menu
if (empty($noout))
{
- $alt=0;
+ $alt=0; $blockvmenuopened=false;
$num=count($menu_array);
for ($i = 0; $i < $num; $i++)
{
@@ -1238,6 +1238,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
$alt++;
if (empty($menu_array[$i]['level']) && $showmenu)
{
+ $blockvmenuopened=true;
if (($alt%2==0))
{
print '\n";
+ if ($blockvmenuopened) { print "\n"; $blockvmenuopened=false; }
}
}
}
diff --git a/htdocs/core/modules/modAdherent.class.php b/htdocs/core/modules/modAdherent.class.php
index 74fd21da47f..8cd63fb37c7 100644
--- a/htdocs/core/modules/modAdherent.class.php
+++ b/htdocs/core/modules/modAdherent.class.php
@@ -43,7 +43,7 @@ class modAdherent extends DolibarrModules
function __construct($db)
{
global $conf;
-
+
$this->db = $db;
$this->numero = 310;
@@ -179,7 +179,7 @@ class modAdherent extends DolibarrModules
$this->export_TypeFields_array[$r]=array('a.civilite'=>"Text",'a.lastname'=>"Text",'a.firstname'=>"Text",'a.login'=>"Text",'a.morphy'=>'Text','a.societe'=>'Text','a.address'=>"Text",'a.zip'=>"Text",'a.town'=>"Text",'a.country'=>"Text",'a.phone'=>"Text",'a.phone_perso'=>"Text",'a.phone_mobile'=>"Text",'a.email'=>"Text",'a.birth'=>"Date",'a.statut'=>"Status",'a.note'=>"Text",'a.datec'=>'Date','a.datevalid'=>'Date','a.tms'=>'Date','a.datefin'=>'Date','ta.rowid'=>'List:fk_adherent_type:libelle','ta.libelle'=>'Text','c.dateadh'=>'Date','c.cotisation'=>'Number');
$this->export_entities_array[$r]=array('a.rowid'=>'member','a.civilite'=>"member",'a.lastname'=>"member",'a.firstname'=>"member",'a.login'=>"member",'a.morphy'=>'member','a.societe'=>'member','a.address'=>"member",'a.zip'=>"member",'a.town'=>"member",'a.country'=>"member",'a.phone'=>"member",'a.phone_perso'=>"member",'a.phone_mobile'=>"member",'a.email'=>"member",'a.birth'=>"member",'a.statut'=>"member",'a.photo'=>"member",'a.note'=>"member",'a.datec'=>'member','a.datevalid'=>'member','a.tms'=>'member','a.datefin'=>'member','ta.rowid'=>'member_type','ta.libelle'=>'member_type','c.rowid'=>'subscription','c.dateadh'=>'subscription','c.cotisation'=>'subscription');
// Add extra fields
- $sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'member' AND entity = ".$conf->entity;
+ $sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'adherent' AND entity = ".$conf->entity;
$resql=$this->db->query($sql);
while ($obj=$this->db->fetch_object($resql))
{
@@ -212,7 +212,7 @@ class modAdherent extends DolibarrModules
$this->import_tables_creator_array[$r]=array('a'=>'fk_user_author'); // Fields to store import user id
$this->import_fields_array[$r]=array('a.civilite'=>"UserTitle",'a.lastname'=>"Lastname*",'a.firstname'=>"Firstname",'a.login'=>"Login*","a.pass"=>"Password","a.fk_adherent_type"=>"MemberType*",'a.morphy'=>'Nature*','a.societe'=>'Company','a.address'=>"Address",'a.zip'=>"Zip",'a.town'=>"Town",'a.country'=>"Country",'a.phone'=>"PhonePro",'a.phone_perso'=>"PhonePerso",'a.phone_mobile'=>"PhoneMobile",'a.email'=>"Email",'a.birth'=>"Birthday",'a.statut'=>"Status*",'a.photo'=>"Photo",'a.note'=>"Note",'a.datec'=>'DateCreation','a.datefin'=>'DateEndSubscription');
// Add extra fields
- $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'member' AND entity = ".$conf->entity;
+ $sql="SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'adherent' AND entity = ".$conf->entity;
$resql=$this->db->query($sql);
if ($resql) // This can fail when class is used on old database (during migration for example)
{
diff --git a/htdocs/core/modules/modSociete.class.php b/htdocs/core/modules/modSociete.class.php
index 93700ec55b2..0f2e7ed5bb6 100644
--- a/htdocs/core/modules/modSociete.class.php
+++ b/htdocs/core/modules/modSociete.class.php
@@ -258,33 +258,33 @@ class modSociete extends DolibarrModules
$resql=$this->db->query($sql);
if ($resql) // This can fail when class is used on old database (during migration for example)
{
- while ($obj=$this->db->fetch_object($resql))
- {
- $fieldname='extra.'.$obj->name;
- $fieldlabel=ucfirst($obj->label);
- $typeFilter="Text";
- switch($obj->type)
- {
- case 'int':
- case 'double':
- case 'price':
- $typeFilter="Numeric";
- break;
- case 'date':
- case 'datetime':
- $typeFilter="Date";
- break;
- case 'boolean':
- $typeFilter="Boolean";
- break;
- case 'sellist':
- $typeFilter="List:".$obj->param;
- break;
- }
- $this->export_fields_array[$r][$fieldname]=$fieldlabel;
- $this->export_TypeFields_array[$r][$fieldname]=$typeFilter;
- $this->export_entities_array[$r][$fieldname]='company';
- }
+ while ($obj=$this->db->fetch_object($resql))
+ {
+ $fieldname='extra.'.$obj->name;
+ $fieldlabel=ucfirst($obj->label);
+ $typeFilter="Text";
+ switch($obj->type)
+ {
+ case 'int':
+ case 'double':
+ case 'price':
+ $typeFilter="Numeric";
+ break;
+ case 'date':
+ case 'datetime':
+ $typeFilter="Date";
+ break;
+ case 'boolean':
+ $typeFilter="Boolean";
+ break;
+ case 'sellist':
+ $typeFilter="List:".$obj->param;
+ break;
+ }
+ $this->export_fields_array[$r][$fieldname]=$fieldlabel;
+ $this->export_TypeFields_array[$r][$fieldname]=$typeFilter;
+ $this->export_entities_array[$r][$fieldname]='company';
+ }
}
// End add axtra fields
$this->export_sql_start[$r]='SELECT DISTINCT ';
diff --git a/htdocs/core/tpl/admin_extrafields_edit.tpl.php b/htdocs/core/tpl/admin_extrafields_edit.tpl.php
index 25c8ede2227..3d1bdc4a9be 100644
--- a/htdocs/core/tpl/admin_extrafields_edit.tpl.php
+++ b/htdocs/core/tpl/admin_extrafields_edit.tpl.php
@@ -61,12 +61,14 @@ if((($type == 'select') || ($type == 'checkbox') ||(($type == 'radio'))) && is_a
$param_chain = '';
foreach ($param['options'] as $key => $value)
{
- if(strlen($key))
+ if(strlen($key))
{
- $param_chain .= $key.', '.$value."\n";
+ $param_chain .= $key.','.$value."\n";
}
}
-}elseif ($type== 'sellist') {
+}
+elseif ($type== 'sellist')
+{
$paramlist=array_keys($param['options']);
$param_chain = $paramlist[0];
}
@@ -83,8 +85,8 @@ if((($type == 'select') || ($type == 'checkbox') ||(($type == 'radio'))) && is_a