diff --git a/ChangeLog b/ChangeLog index 55975d60898..14688a7a335 100644 --- a/ChangeLog +++ b/ChangeLog @@ -20,6 +20,7 @@ For users: - New: Can define of we want to use VAT or not for subscriptions (foundation module). - New: Can define a default choice for choice "More action when recording a subscription" (foundation module). +- New: Add link to check professional id for india. For developers: - System of menu managers has been rewritten to reduce code to do same things. @@ -35,6 +36,7 @@ For developers: into conf->liste_limit). - New: Add option dol_hide_topmenu and dol_hide_leftmenu onto login page. - New: dol_syslog method accept a suffix to use different log files for log. +- New: Type of fields are received by export format handlers For translators: - Update language files. diff --git a/htdocs/adherents/cartes/carte.php b/htdocs/adherents/cartes/carte.php index c45f1aed993..7c1d95502ca 100755 --- a/htdocs/adherents/cartes/carte.php +++ b/htdocs/adherents/cartes/carte.php @@ -107,13 +107,8 @@ if ((! empty($foruserid) || ! empty($foruserlogin) || ! empty($mode)) && ! $mesg '%MONTH%'=>$month, '%DAY%'=>$day, '%DOL_MAIN_URL_ROOT%'=>DOL_MAIN_URL_ROOT, - '%SERVER%'=>"http://".$_SERVER["SERVER_NAME"]."/", // deprecated - // For backward compatibility - '%SOCIETE%'=>$objp->company, - '%ZIP%'=>$objp->zip, - '%COUNTRY%'=>$objp->country, - '%ANNEE%'=>$year, - '%SERVEUR%'=>"http://".$_SERVER["SERVER_NAME"]."/" // deprecated + '%SERVER%'=>"http://".$_SERVER["SERVER_NAME"]."/", + '%SOCIETE%'=>$objp->company ); complete_substitutions_array($substitutionarray, $langs); diff --git a/htdocs/compta/bank/pre.inc.php b/htdocs/compta/bank/pre.inc.php index f995c226c4d..a507c4c0a71 100644 --- a/htdocs/compta/bank/pre.inc.php +++ b/htdocs/compta/bank/pre.inc.php @@ -51,6 +51,7 @@ function llxHeader($head = '', $title='', $help_url='', $target='', $disablejs=0 top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers top_menu($head, $title, $target, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers + require_once DOL_DOCUMENT_ROOT.'/core/class/menu.class.php'; $menu = new Menu(); // Entry for each bank account diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 7766cfeb862..7585b71cf68 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -372,7 +372,8 @@ else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->factu { $idprof_mandatory ='SOCIETE_IDPROF'.($i).'_INVOICE_MANDATORY'; - if (! $object->thirdparty->idprof.$i && ! empty($conf->global->$idprof_mandatory)) + $idprof='idprof'.$i; + if (! $object->thirdparty->$idprof && ! empty($conf->global->$idprof_mandatory)) { if (! $error) $langs->load("errors"); $error++; diff --git a/htdocs/compta/paiement/cheque/pre.inc.php b/htdocs/compta/paiement/cheque/pre.inc.php index ad915f21299..bc730c9740d 100644 --- a/htdocs/compta/paiement/cheque/pre.inc.php +++ b/htdocs/compta/paiement/cheque/pre.inc.php @@ -50,6 +50,7 @@ function llxHeader($head = '', $title='', $help_url='', $target='', $disablejs=0 top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers top_menu($head, $title, $target, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers + require_once DOL_DOCUMENT_ROOT.'/core/class/menu.class.php'; $menu = new Menu(); // Entry for each bank account diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 58183a3df25..734978f853f 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -37,10 +37,8 @@ class Contact extends CommonObject public $table_element='socpeople'; var $id; - var $civilite_id; // In fact we stor civility_code + var $civilite_id; // In fact we store civility_code var $lastname; - var $name; // TODO deprecated - var $nom; // TODO deprecated var $firstname; var $address; var $zip; @@ -247,7 +245,7 @@ class Contact extends CommonObject $sql .= ", priv = '".$this->priv."'"; $sql .= ", fk_user_modif=".($user->id > 0 ? "'".$user->id."'":"null"); $sql .= ", default_lang=".($this->default_lang?"'".$this->default_lang."'":"null"); - $sql .= ", no_email=".($this->no_email?"'".$this->no_email."'":"null"); + $sql .= ", no_email=".($this->no_email?"'".$this->no_email."'":"0"); $sql .= " WHERE rowid=".$id; dol_syslog(get_class($this)."::update sql=".$sql,LOG_DEBUG); diff --git a/htdocs/contrat/fiche.php b/htdocs/contrat/fiche.php index 27dfec3aed5..ac56afab3ca 100644 --- a/htdocs/contrat/fiche.php +++ b/htdocs/contrat/fiche.php @@ -306,7 +306,7 @@ else if ($action == 'addline' && $user->rights->contrat->creer) { $pu_ht=GETPOST('price_ht'); $price_base_type = 'HT'; - $tva_tx=str_replace('*','',GETPOST('tva_tx')); + $tva_tx=GETPOST('tva_tx')?str_replace('*','',GETPOST('tva_tx')):0; // tva_tx field may be disabled, so we use vat rate 0 $tva_npr=preg_match('/\*/',GETPOST('tva_tx'))?1:0; $desc=GETPOST('dp_desc'); } @@ -424,7 +424,7 @@ else if ($action == 'updateligne' && $user->rights->contrat->creer && ! GETPOST( $objectline->subprice=GETPOST('elprice'); $objectline->qty=GETPOST('elqty'); $objectline->remise_percent=GETPOST('elremise_percent'); - $objectline->tva_tx=GETPOST('eltva_tx'); + $objectline->tva_tx=GETPOST('eltva_tx')?GETPOST('eltva_tx'):0; // Field may be disabled, so we use vat rate 0 $objectline->localtax1_tx=$localtax1_tx; $objectline->localtax2_tx=$localtax2_tx; $objectline->date_ouverture_prevue=$date_start_update; diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 0aa88aeeafa..cf817ae494d 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -1147,19 +1147,21 @@ function showModulesExludedForExternal($modules) $text=$langs->trans("OnlyFollowingModulesAreOpenedToExternalUsers"); $listofmodules=explode(',',$conf->global->MAIN_MODULES_FOR_EXTERNAL); $i=0; - foreach($modules as $module) - { - $moduleconst=$module->const_name; - $modulename=strtolower($module->name); - //print 'modulename='.$modulename; - - //if (empty($conf->global->$moduleconst)) continue; - if (! in_array($modulename,$listofmodules)) continue; - - if ($i > 0) $text.=', '; - else $text.=' '; - $i++; - $text .= $langs->trans('Module'.$module->numero.'Name'); + if (!empty($modules)) { + foreach($modules as $module) + { + $moduleconst=$module->const_name; + $modulename=strtolower($module->name); + //print 'modulename='.$modulename; + + //if (empty($conf->global->$moduleconst)) continue; + if (! in_array($modulename,$listofmodules)) continue; + + if ($i > 0) $text.=', '; + else $text.=' '; + $i++; + $text .= $langs->trans('Module'.$module->numero.'Name'); + } } return img_picto($langs->trans('InfoAdmin'), 'star').' '.$text; } diff --git a/htdocs/core/menus/smartphone/index.php b/htdocs/core/menus/smartphone/index.php deleted file mode 100644 index 7db0dd9ebf9..00000000000 --- a/htdocs/core/menus/smartphone/index.php +++ /dev/null @@ -1 +0,0 @@ -Url not available \ No newline at end of file diff --git a/htdocs/core/menus/smartphone/smartphone.lib.php b/htdocs/core/menus/smartphone/smartphone.lib.php deleted file mode 100755 index ad71482fe10..00000000000 --- a/htdocs/core/menus/smartphone/smartphone.lib.php +++ /dev/null @@ -1,215 +0,0 @@ - - * Copyright (C) 2010 Regis Houssin - * - * 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 . - * or see http://www.gnu.org/ - */ - -/** - * \file htdocs/core/menus/smartphone/smartphone.lib.php - * \brief Library for file smartphone menus - */ - - -/** - * Core function to output top menu smartphone - * - * @param DoliDB $db Database handler - * @param string $atarget Target - * @param int $type_user 0=Internal,1=External,2=All - * @param string $limitmenuto To limit menu to a top or left menu value - * @param array &$tabMenu If array with menu entries already loaded, we put this array here (in most cases, it's empty) - * @return void - */ -function print_smartphone_menu($db,$atarget,$type_user,$limitmenuto,&$tabMenu,&$menu) -{ - require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php'; - - global $user,$conf,$langs,$dolibarr_main_db_name; - - $mainmenu=$_SESSION["mainmenu"]; - $leftmenu=$_SESSION["leftmenu"]; - - $submenus=''; - - //$tabMenu=array(); - - $menutop = new Menubase($db,'smartphone'); - $menuleft = new Menubase($db,'smartphone'); - $newTabMenu = $menutop->menuTopCharger('', '', $type_user, 'smartphone',$tabMenu); - $numTabMenu = count($newTabMenu); - - print_start_menu_array(); - for($i=0; $i<$numTabMenu; $i++) - { - if ($newTabMenu[$i]['enabled'] == true) - { - if ($newTabMenu[$i]['perms'] == true) // Is allowed - { - // Define url - if (preg_match("/^(http:\/\/|https:\/\/)/i",$newTabMenu[$i]['url'])) - { - $url = dol_buildpath($newTabMenu[$i]['url'],1); - $url=preg_replace('/&.*/i','',$url); - } - else - { - $menus=''; - - if ($limitmenuto > 0) - { - $newmenu = new Menu(); - $leftmenu = $menuleft->menuLeftCharger($newmenu,$newTabMenu[$i]['mainmenu'],'',($user->societe_id?1:0),'smartphone',$tabMenu); - $menus = $leftmenu->liste; - //var_dump($menus); - } - - print_start_menu_entry(); - - if (is_array($menus) && !empty($menus) && $limitmenuto > 0) - { - $title=$newTabMenu[$i]['titre']; - // To remove & and special chars: $title=dol_string_unaccent(dol_string_nospecial(dol_html_entity_decode($newTabMenu[$i]['titre'],ENT_QUOTES,'UTF-8'),'',array('&'))); - print_text_menu_entry($title); - - $num = count($menus); - //var_dump($menus); - - if ($num > 0) print_start_submenu_array(); - - for($j=0; $j<$num; $j++) - { - $url=dol_buildpath($menus[$j]['url'],1); - $url=preg_replace('/&.*/i','',$url); - - if ($menus[$j]['level'] == 0) - { - print_start_menu_entry(); - if (empty($menus[$j+1]['level'])) print ''; - $title=$menus[$j]['titre']; - // To remove & and special chars: $title=dol_string_unaccent(dol_string_nospecial(dol_html_entity_decode($menus[$j]['titre'],ENT_QUOTES,'UTF-8'),'',array('&'))); - print_text_menu_entry($title); - if (empty($menus[$j+1]['level'])) print ''; - } - - if ($menus[$j]['level'] > 0) - { - if ($menus[$j-1]['level'] == 0) print_start_submenu_array(); - - print_start_menu_entry(); - print ''; - $title=$menus[$j]['titre']; - // To remove & and special chars: $title=dol_string_unaccent(dol_string_nospecial(dol_html_entity_decode($menus[$j]['titre'],ENT_QUOTES,'UTF-8'),'',array('&'))); - print_text_menu_entry($title); - print ''; - print_end_menu_entry(); - - if (empty($menus[$j+1]['level'])) print_end_menu(); - } - - if (empty($menus[$j+1]['level'])) print_end_menu_entry(); - } - - if ($num > 0) print_end_menu(); - } - else - { - $url=dol_buildpath($newTabMenu[$i]['url'],1); - $url=preg_replace('/&.*/i','',$url); - - print ''; - $title=$newTabMenu[$i]['titre']; - // To remove & and special chars: $title=dol_string_unaccent(dol_string_nospecial(dol_html_entity_decode($newTabMenu[$i]['titre'],ENT_QUOTES,'UTF-8'),'',array('&'))); - print_text_menu_entry($title); - print ''; - } - - print_end_menu_entry(); - } - } - } - } - - print_end_menu(); - print "\n"; -} - -/** - * Output menu entry - * - * @param string $theme Theme - * @return void - */ -function print_start_menu_array($theme='c') -{ - print '