diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 5dc7c1c9755..2e014321b05 100755 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -627,11 +627,11 @@ class ExtraFields { $tmp=explode(',',$size); $newsize=$tmp[0]; - $out=''; + $out=''; } elseif ($type == 'varchar') { - $out=''; + $out=''; } elseif ($type == 'text') { @@ -647,30 +647,30 @@ 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') { if (!empty($value)) { $value=price($value); } - $out=' '; + $out=' '; } elseif ($type == 'select') { - $out=''; + $out=''; foreach ($param['options'] as $key=>$val ) { $out.=''; + $out=''; $param_list=array_keys($param['options']); $InfoFieldList = explode(":", $param_list[0]); @@ -698,7 +698,7 @@ class ExtraFields $sql.= ' FROM '.MAIN_DB_PREFIX .$InfoFieldList[0]; //$sql.= ' WHERE entity = '.$conf->entity; - dol_syslog(get_class($this).':showInputField:$type=sellist sql='.$sql); + dol_syslog(get_class($this).'::showInputField type=sellist sql='.$sql); $resql = $this->db->query($sql); if ($resql) @@ -741,7 +741,7 @@ class ExtraFields foreach ($param['options'] as $keyopt=>$val ) { - $out.='$val ) { - $out.=''.$val.''; @@ -842,7 +842,6 @@ class ExtraFields if (count($InfoFieldList)==3) $keyList=$InfoFieldList[2]; - $sql = 'SELECT '.$InfoFieldList[1]; $sql.= ' FROM '.MAIN_DB_PREFIX .$InfoFieldList[0]; $sql.= ' WHERE '.$keyList.'=\''.$this->db->escape($value).'\''; diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 3bd5c963c65..f961e03dbc5 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2040,15 +2040,16 @@ function img_up($alt = 'default', $selected = 0) * * @param string $alt Text to show on alt image * @param int $selected Selected + * @param string $options Add more attribute on img tag (For example 'style="float: right"') * @return string Return img tag */ -function img_left($alt = 'default', $selected = 0) +function img_left($alt = 'default', $selected = 0, $options='') { global $conf, $langs; if ($alt == 'default') $alt = $langs->trans('Left'); - return img_picto($alt, ($selected ? '1leftarrow_selected.png' : '1leftarrow.png')); + return img_picto($alt, ($selected ? '1leftarrow_selected.png' : '1leftarrow.png'), $options); } /** @@ -2056,15 +2057,16 @@ function img_left($alt = 'default', $selected = 0) * * @param string $alt Text to show on alt image * @param int $selected Selected + * @param string $options Add more attribute on img tag (For example 'style="float: right"') * @return string Return img tag */ -function img_right($alt = 'default', $selected = 0) +function img_right($alt = 'default', $selected = 0, $options='') { global $conf, $langs; if ($alt == 'default') $alt = $langs->trans('Right'); - return img_picto($alt, ($selected ? '1rightarrow_selected.png' : '1rightarrow.png')); + return img_picto($alt, ($selected ? '1rightarrow_selected.png' : '1rightarrow.png'), $options); } /** diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index 4d1bfad0ba3..b60aa21c632 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -301,7 +301,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM // Show menu if (empty($noout)) { - $alt=0; + $alt=0; $blockvmenuopened=false; $num=count($menu_array); for ($i = 0; $i < $num; $i++) { @@ -311,6 +311,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM $alt++; if (empty($menu_array[$i]['level']) && $showmenu) { + $blockvmenuopened=true; if (($alt%2==0)) { print ''."\n"; @@ -344,8 +345,8 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM $url.='mainmenu='.$mainmenu; } - print ''."\n"; - + print ''."\n"; + // Menu niveau 0 if ($menu_array[$i]['level'] == 0) { @@ -379,12 +380,12 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM } } - // If next is a new block or end + // If next is a new block or if there is nothing after if (empty($menu_array[$i+1]['level'])) { if ($showmenu) print ''."\n"; - 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 863a46c1b17..de316c289dd 100644 --- a/htdocs/core/modules/modSociete.class.php +++ b/htdocs/core/modules/modSociete.class.php @@ -267,33 +267,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 - @@ -99,7 +101,7 @@ if(($type == 'select') || ($type == 'sellist') || ($type == 'checkbox') ||(($typ - diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php index 721196bdb1e..3befa61e692 100644 --- a/htdocs/exports/export.php +++ b/htdocs/exports/export.php @@ -558,7 +558,7 @@ if ($step == 2 && $datatoexport) { // Selected fields print ' '; - print ''.img_left().''; + print ''.img_left('default', 0, 'style="max-width: 20px"').''; print ''; //print $text.'-'.$htmltext.""; print $form->textwithpicto($text,$htmltext); @@ -573,7 +573,7 @@ if ($step == 2 && $datatoexport) print $form->textwithpicto($text,$htmltext); //print ' ('.$code.')'; print ''; - print ''.img_right().''; + print ''.img_right('default', 0, 'style="max-width: 20px"').''; print ' '; } diff --git a/test/soapui/Dolibarr-soapui-project.xml b/test/soapui/Dolibarr-soapui-project.xml index 48349dcf250..5c00d85eb04 100755 --- a/test/soapui/Dolibarr-soapui-project.xml +++ b/test/soapui/Dolibarr-soapui-project.xml @@ -1,5 +1,5 @@ - -http://localhostdolibarr/dolibarrnew/webservices/server_other.php?wsdl + +http://localhostdolibarr/dolibarrnew/webservices/server_other.php?wsdl @@ -757,231 +757,286 @@ all -]]>http://localhostdolibarr/dolibarrnew/webservices/server_productorservice.php?wsdl - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - WS to get product or service - - - - - WS to create a product or service - - - - - WS to get list of all products or services id and ref - - - - - WS to get list of all products or services for a category - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -]]>http://schemas.xmlsoap.org/wsdl/http://localhost/dolibarrnew/webservices/server_productorservice.phphttp://localhostdolibarr/dolibarrnew/webservices/server_productorservice.php<xml-fragment/>UTF-8http://localhostdolibarr/dolibarrnew/webservices/server_productorservice.php - - - - - - dolibarrkey - aaa - admin - admin - - - - - ? - PPP - - 1 - PPP Label - Description of PPP - ? - ? - xxxxx - ? - ? - 123456 - ? - ? - FR - ? - ? - ? - ? - 10 - ? - ? - ? - ? - - - -]]><xml-fragment/>UTF-8http://localhostdolibarr/dolibarrnew/webservices/server_productorservice.php +]]>http://localhost/dolibarr/htdocs/webservices/server_productorservice.php?wsdl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + WS to get product or service + + + + + WS to create a product or service + + + + + WS to get list of all products or services id and ref + + + + + WS to get list of all products or services for a category + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]>http://schemas.xmlsoap.org/wsdl/http://localhost/dolibarrnew/webservices/server_productorservice.phphttp://localhostdolibarr/dolibarrnew/webservices/server_productorservice.phphttp://localhost/dolibarr/htdocs/webservices/server_productorservice.php<xml-fragment/>UTF-8http://localhost/dolibarr/htdocs/webservices/server_productorservice.php + + + + dolibarrkey + PRESTASHOP + admin + admin + + + + + aaa + aaa + 0 + Écouteurs à isolation sonore Shure SE210 + les couteurs isolation sonore ergonomiques et l gers offrent la reproduction audio la plus fid le en provenance de sources audio st r o portables ou de salon. + 2013-03-06 09:24:51 + 2013-03-06 09:24:51 + imported from Prestashop + 0 + 1 + + upc + + + + + 149 + + + 0 + + + + + + +]]>UTF-8http://localhost/dolibarrnew/webservices/server_productorservice.php + + + + + + ? + ? + ? + ? + ? + + + + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + ? + + + + + ? + ? + ? + ? + + + + + +]]><xml-fragment/>UTF-8http://localhost/dolibarr/htdocs/webservices/server_productorservice.php @@ -998,7 +1053,7 @@ -]]><xml-fragment/>UTF-8http://localhostdolibarr/dolibarrnew/webservices/server_productorservice.php +]]><xml-fragment/>UTF-8http://localhost/dolibarr/htdocs/webservices/server_productorservice.php @@ -1015,7 +1070,7 @@ ? -]]>UTF-8http://localhostdolibarr/dolibarrnew/webservices/server_productorservice.php +]]>UTF-8http://localhost/dolibarr/htdocs/webservices/server_productorservice.php @@ -1035,7 +1090,7 @@ -]]><xml-fragment/>UTF-8http://localhost/dolibarrnew/webservices/server_productorservice.php +]]><xml-fragment/>UTF-8http://localhost/dolibarr/htdocs/webservices/server_productorservice.php