diff --git a/ChangeLog b/ChangeLog index 3c057697bac..5c5ad383d7a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -39,13 +39,11 @@ For users: - New: [ task #165 ] Add import/export of multiprices. - New: Add Maghreb regions and departments. - New: A more responsive desgin for statistic box of home page. -- Qual: Implement same rule for return value of all command line scripts (0 when success, <>0 if error). - New: [ task #1005 ] Adapting to Spanish legislation bill numbering - New: [ task #1011 ] Now supplier order and invoice deal with payment terms and mode. - New: [ task #1014 ] Add option to recursivly add parent category. - New: [ task #1016 ] Can define a specific numbering for deposits. - New: [ task #918 ] Stock replenishment. -- Fix: [ bug #992 ] Proforma invoices don't have a separated numeric count. - New : Add pdf link into supplier invoice list and supplier order list. - New : Genrate auto the PDF for supplier invoice. - New : Add category into filter webservice thirdparty method getListOfThirdParties. @@ -60,11 +58,15 @@ For users: - New: Add hidden option MAIN_VAT_DEFAULT_IF_AUTODETECT_FAILS. - New: Can send an email from thirdparty card. - New: Can cancel holidays that were previously validated. -- Fix: [bug #1022] correct margin calculation for credit notes. - New: Can choose contact on event (action com) creation, and filtred by thirdparty. - New: Add hidden option MAIN_FORCE_DEFAULT_STATE_ID. - New: Add page to make mass stock movement. - New: Add field oustanding limit into thirdparty properties. +- New: Can enter a vat payment of zero. +- New: Add path to installed dir of external modules + Name and web of module provider. +- Qual: Implement same rule for return value of all command line scripts (0 when success, <>0 if error). +- Fix: [ bug #992 ] Proforma invoices don't have a separated numeric count. +- Fix: [ bug #1022 ] correct margin calculation for credit notes. For translators: - Qual: Normalized sort order of all languages files with english reference files. @@ -85,7 +87,6 @@ For developers: MAIN_MOTD_SETUPPAGE, MAIN_MOTD_SETUPPAGE, MAIN_HOME now accept "|langfile" into translation key to use a specific language file. - New: Make some changes to allow usage of several alternative $dolibarr_main_url_root variables. - Fix also several bugs with old code. - Qual: All nowrap properties are now using CSS class nowrap. - Qual: Move hardcoded code of module mailmanspip into trigger. - New: Into POST forms, if you can add a parameter DOL_AUTOSET_COOKIE with a vlue that is list name, @@ -96,6 +97,7 @@ For developers: - New: A trigger can return an array of error strings instead of one error string. - New: Add method to use a dictionnary as a combo box. - New: Add update method for web service product. +- Fix also several bugs with old code. WARNING: Following change may create regression for some external modules, but was necessary to make Dolibarr better: diff --git a/dev/iso-normes/locales.txt b/dev/iso-normes/locales.txt index 958f97c1cee..cb39e45ec0d 100644 --- a/dev/iso-normes/locales.txt +++ b/dev/iso-normes/locales.txt @@ -1,9 +1,9 @@ For languages: -See page http://demo.icu-project.org/icu-bin/locexp?d_=fr +http://demo.icu-project.org/icu-bin/locexp?d_=fr For format number: -For number format, you can also see page http://en.wikipedia.org/wiki/Decimal_mark +http://en.wikipedia.org/wiki/Decimal_mark For date format: http://en.wikipedia.org/wiki/Date_format_by_country \ No newline at end of file diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index cfaa0c72004..b4e6ff2f628 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -1,7 +1,7 @@ * Copyright (C) 2003 Jean-Louis Bergamo - * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2004 Eric Seigne * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2011 Juanjo Menent @@ -154,22 +154,21 @@ foreach ($modulesdir as $dir) $const_name = 'MAIN_MODULE_'.strtoupper(preg_replace('/^mod/i','',get_class($objMod))); if ($objMod->version == 'development' && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL < 2))) $modulequalified=0; if ($objMod->version == 'experimental' && (empty($conf->global->$const_name) && ($conf->global->MAIN_FEATURES_LEVEL < 1))) $modulequalified=0; - // We discard modules according to property disabled + // We discard modules according to property disabled if (isset($objMod->hidden) && $objMod->hidden) $modulequalified=false; - + // Define array $categ with categ with at least one qualified module if ($modulequalified) { $modules[$i] = $objMod; $filename[$i]= $modName; $orders[$i] = $objMod->family."_".$j; // Sort by family, then by module number - $special = isset($specialtostring[$objMod->special])?$specialtostring[$objMod->special]:'unknown'; + $dirmod[$i] = $dir; + // Set categ[$i] + $special = isset($specialtostring[$objMod->special])?$specialtostring[$objMod->special]:'unknown'; if ($objMod->version == 'development' || $objMod->version == 'experimental') $special='expdev'; - - //print "x".$modName." ".$orders[$i]." ".$special."\n
"; if (isset($categ[$special])) $categ[$special]++; // Array of all different modules categories else $categ[$special]=1; - $dirmod[$i] = $dir; $j++; $i++; } @@ -278,17 +277,16 @@ $var=true; if ($mode != 'marketplace') { print "\n"; - //print "\n"; + + /* print ''."\n"; - //print " \n"; print " \n"; print " \n"; print " \n"; - //print " \n"; - print " \n"; - print " \n"; + print ' '."\n"; + print ' '."\n"; print "\n"; - + */ // Show list of modules @@ -338,139 +336,151 @@ if ($mode != 'marketplace') // Print a separator if we change family //print ""; //if ($oldfamily && $family!=$oldfamily && $atleastoneforfamily) { - if ($family!=$oldfamily) { - print ''."\n '."\n"; + print '\n\n"; + print "\n"; + print ''."\n"; + print "\n"; $atleastoneforfamily=0; //print ""; } - $atleastoneforfamily++; + $atleastoneforfamily++; - if ($family!=$oldfamily) - { - $familytext=empty($familylib[$family])?$family:$familylib[$family]; - //print $familytext; - $oldfamily=$family; - } + if ($family!=$oldfamily) + { + $familytext=empty($familylib[$family])?$family:$familylib[$family]; + //print $familytext; + $oldfamily=$family; + } - $var=!$var; + $var=!$var; - //print "\n\n"; - print '\n"; + //print "\n\n"; + print '\n"; - // Picto - print ' '; + // Picto + print ' '; - // Name - print '\n"; + // Name + print '\n"; - // Desc - print "\n"; + // Desc + print '\n"; - // Version - print "\n"; + // Version + print '\n"; - // Activate/Disable and Setup (2 columns) - if (! empty($conf->global->$const_name)) - { - $disableSetup = 0; + // Activate/Disable and Setup (2 columns) + if (! empty($conf->global->$const_name)) + { + $disableSetup = 0; - print "'."\n"; - } - else - { - print ''; - print img_picto($langs->trans("Activated"),'switch_on'); - print ''."\n"; - } + if (! empty($objMod->always_enabled) || ((! empty($conf->multicompany->enabled) && $objMod->core_enabled) && ($user->entity || $conf->entity!=1))) + { + print $langs->trans("Required"); + if (! empty($conf->multicompany->enabled) && $user->entity) $disableSetup++; + print ''."\n"; + } + else + { + print ''; + print img_picto($langs->trans("Activated"),'switch_on'); + print ''."\n"; + } - if (! empty($objMod->config_page_url) && !$disableSetup) - { - if (is_array($objMod->config_page_url)) - { - print ' \n"; - } - else if (preg_match('/^([^@]+)@([^@]+)$/i',$objMod->config_page_url,$regs)) - { - print ''; - } - else - { - print ''; - } - } - else - { - print ""; - } + if (! empty($objMod->config_page_url) && !$disableSetup) + { + if (is_array($objMod->config_page_url)) + { + print ' \n"; + } + else if (preg_match('/^([^@]+)@([^@]+)$/i',$objMod->config_page_url,$regs)) + { + print ''; + } + else + { + print ''; + } + } + else + { + print ""; + } - } - else - { - print "\n \n"; - } + // Module non actif + print ''; + print img_picto($langs->trans("Disabled"),'switch_off'); + print "\n \n"; + } - print "\n"; + print "\n"; } print "
".$langs->trans("Family")."".$langs->trans("Module")."".$langs->trans("Description")."".$langs->trans("Version")."".$langs->trans("DbVersion")."".$langs->trans("Status")."".$langs->trans("SetupShort")."'.$langs->trans("Status").''.$langs->trans("SetupShort").'
xx".$oldfamily."-".$family."-".$atleastoneforfamily."
"; + if ($family!=$oldfamily) + { + print '
'; $familytext=empty($familylib[$family])?$family:$familylib[$family]; print $familytext; - print "
'.$langs->trans("SetupShort").'
yy".$oldfamily."-".$family."-".$atleastoneforfamily."
'; - $alttext=''; - //if (is_array($objMod->need_dolibarr_version)) $alttext.=($alttext?' - ':'').'Dolibarr >= '.join('.',$objMod->need_dolibarr_version); - //if (is_array($objMod->phpmin)) $alttext.=($alttext?' - ':'').'PHP >= '.join('.',$objMod->phpmin); - if (! empty($objMod->picto)) - { - if (preg_match('/^\//i',$objMod->picto)) print img_picto($alttext,$objMod->picto,' width="14px"',1); - else print img_object($alttext,$objMod->picto,' width="14px"'); - } - else - { - print img_object($alttext,'generic'); - } - print ''; + $alttext=''; + //if (is_array($objMod->need_dolibarr_version)) $alttext.=($alttext?' - ':'').'Dolibarr >= '.join('.',$objMod->need_dolibarr_version); + //if (is_array($objMod->phpmin)) $alttext.=($alttext?' - ':'').'PHP >= '.join('.',$objMod->phpmin); + if (! empty($objMod->picto)) + { + if (preg_match('/^\//i',$objMod->picto)) print img_picto($alttext,$objMod->picto,' width="14px"',1); + else print img_object($alttext,$objMod->picto,' width="14px"'); + } + else + { + print img_object($alttext,'generic'); + } + print ''.$objMod->getName(); - print "'.$objMod->getName(); + print ""; - print nl2br($objMod->getDesc()); - print "'; + print nl2br($objMod->getDesc()); + print ""; - print $objMod->getVersion(); - print "'; + $version=$objMod->getVersion(); + $dirofmodule=$dirmod[$key]; + if ($objMod->isCoreOrExternalModule() == 'external') + { + $text=$langs->trans("ExternalModule",$dirofmodule); + if (! empty($objMod->editor_name) && $objMod->editor_name != 'dolibarr') $text.=' - '.$objMod->editor_name; + if (! empty($objMod->editor_web) && $objMod->editor_web != 'www.dolibarr.org') $text.=' - '.$objMod->editor_web; + print $form->textwithpicto($version, $text, 1, 'help'); + } + else print $version; + print ""; + print ''; - // Module actif - if (! empty($objMod->always_enabled) || ((! empty($conf->multicompany->enabled) && $objMod->core_enabled) && ($user->entity || $conf->entity!=1))) - { - print $langs->trans("Required"); - if (! empty($conf->multicompany->enabled) && $user->entity) $disableSetup++; - print ''; - $i=0; - foreach ($objMod->config_page_url as $page) - { - $urlpage=$page; - if ($i++) - { - print ''.img_picto(ucfirst($page),"setup").' '; - // print ''.ucfirst($page).' '; - } - else - { - if (preg_match('/^([^@]+)@([^@]+)$/i',$urlpage,$regs)) - { - print ''.img_picto($langs->trans("Setup"),"setup").' '; - } - else - { - print ''.img_picto($langs->trans("Setup"),"setup").' '; - } - } - } - print "'.img_picto($langs->trans("Setup"),"setup").''.img_picto($langs->trans("Setup"),"setup").' '; + $i=0; + foreach ($objMod->config_page_url as $page) + { + $urlpage=$page; + if ($i++) + { + print ''.img_picto(ucfirst($page),"setup").' '; + // print ''.ucfirst($page).' '; + } + else + { + if (preg_match('/^([^@]+)@([^@]+)$/i',$urlpage,$regs)) + { + print ''.img_picto($langs->trans("Setup"),"setup").' '; + } + else + { + print ''.img_picto($langs->trans("Setup"),"setup").' '; + } + } + } + print "'.img_picto($langs->trans("Setup"),"setup").''.img_picto($langs->trans("Setup"),"setup").' "; + } + else + { + print ''; - if (! empty($objMod->always_enabled)) - { - // Ne devrait pas arriver. - } + if (! empty($objMod->always_enabled)) + { + // Ne devrait pas arriver. + } - // Module non actif - print ''; - print img_picto($langs->trans("Disabled"),'switch_off'); - print "  
\n"; @@ -502,7 +512,7 @@ dol_fiche_end(); // Show warning about external users -if ($mode != 'marketplace') print showModulesExludedForExternal($modules).'
'."\n"; +if ($mode != 'marketplace') print '
'.showModulesExludedForExternal($modules).'

'."\n"; llxFooter(); diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 45e69448f43..834c651c2be 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -141,7 +141,7 @@ if (! $sortorder) $sortorder='DESC'; $limit = $conf->liste_limit; -$sql = 'SELECT s.rowid, s.nom, s.town, s.client, '; +$sql = 'SELECT s.rowid, s.nom, s.town, s.client, s.code_client'; $sql.= 'p.rowid as propalid, p.note_private, p.total_ht, p.ref, p.ref_client, p.fk_statut, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,'; if (! $user->rights->societe->client->voir && ! $socid) $sql .= " sc.fk_soc, sc.fk_user,"; $sql.= ' u.login'; @@ -368,6 +368,7 @@ if ($result) $companystatic->id=$objp->rowid; $companystatic->nom=$objp->nom; $companystatic->client=$objp->client; + $companystatic->code_client=$objp->code_client; print ''; print $companystatic->getNomUrl(1,'customer'); print ''; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index ed174a380a4..ed7d06919ec 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1732,8 +1732,8 @@ class Facture extends CommonInvoice $sql.= " SET facnumber='".$num."', fk_statut = 1, fk_user_valid = ".$user->id.", date_valid = '".$this->db->idate($now)."'"; if (! empty($conf->global->FAC_FORCE_DATE_VALIDATION)) // If option enabled, we force invoice date { - $sql.= ', datef='.$this->db->idate($this->date); - $sql.= ', date_lim_reglement='.$this->db->idate($this->date_lim_reglement); + $sql.= ", datef='".$this->db->idate($this->date)."'"; + $sql.= ", date_lim_reglement='".$this->db->idate($this->date_lim_reglement)."'"; } $sql.= ' WHERE rowid = '.$this->id; diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 8fe94f6c3fd..83b9fd30945 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -143,7 +143,7 @@ else $sql = 'SELECT DISTINCT'; $sql.= ' f.rowid as facid, f.facnumber, f.ref_client, f.type, f.note_private, f.increment, f.total as total_ht, f.tva as total_tva, f.total_ttc,'; $sql.= ' f.datef as df, f.date_lim_reglement as datelimite,'; $sql.= ' f.paye as paye, f.fk_statut,'; -$sql.= ' s.nom, s.rowid as socid'; +$sql.= ' s.nom, s.rowid as socid, s.code_client, s.client '; if (! $sall) $sql.= ', SUM(pf.amount) as am'; // To be able to sort on status $sql.= ' FROM '.MAIN_DB_PREFIX.'societe as s'; $sql.= ', '.MAIN_DB_PREFIX.'facture as f'; @@ -390,6 +390,8 @@ if ($resql) $thirdparty=new Societe($db); $thirdparty->id=$objp->socid; $thirdparty->nom=$objp->nom; + $thirdparty->client=$objp->client; + $thirdparty->code_client=$objp->code_client; print $thirdparty->getNomUrl(1,'customer'); print ''; diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index 34dc0262c2e..8ddfad8c3f1 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -27,10 +27,8 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php'; /** - \class Tva - \brief Put here description of your class - \remarks Initialy built by build_class_from_table on 2008-04-03 21:01 -*/ + * Put here description of your class + */ class Tva extends CommonObject { //public $element='tva'; //!< Id that identify managed objects @@ -51,7 +49,6 @@ class Tva extends CommonObject - /** * Constructor * @@ -115,7 +112,7 @@ class Tva extends CommonObject $sql.= ")"; - dol_syslog("Tva::create sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -133,16 +130,17 @@ class Tva extends CommonObject else { $this->error="Error ".$this->db->lasterror(); - dol_syslog("Tva::create ".$this->error, LOG_ERR); + dol_syslog(get_class($this)."::create ".$this->error, LOG_ERR); return -1; } } - /* - * \brief Update database - * \param user User that modify - * \param notrigger 0=no, 1=yes (no update trigger) - * \return int <0 if KO, >0 if OK + /** + * Update database + * + * @param User $user User that modify + * @param int $notrigger 0=no, 1=yes (no update trigger) + * @return int <0 if KO, >0 if OK */ function update($user=0, $notrigger=0) { @@ -177,12 +175,12 @@ class Tva extends CommonObject $sql.= " WHERE rowid=".$this->id; - dol_syslog("Tva::update sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG); $resql = $this->db->query($sql); if (! $resql) { $this->error="Error ".$this->db->lasterror(); - dol_syslog("Tva::update ".$this->error, LOG_ERR); + dol_syslog(get_class($this)."::update ".$this->error, LOG_ERR); return -1; } @@ -200,11 +198,12 @@ class Tva extends CommonObject } - /* - * \brief Load object in memory from database - * \param id id object - * \param user User that load - * \return int <0 if KO, >0 if OK + /** + * Load object in memory from database + * + * @param int $id id object + * @param User $user User that load + * @return int <0 if KO, >0 if OK */ function fetch($id, $user=0) { @@ -229,7 +228,7 @@ class Tva extends CommonObject $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON t.fk_bank = b.rowid"; $sql.= " WHERE t.rowid = ".$id; - dol_syslog("Tva::fetch sql=".$sql, LOG_DEBUG); + dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) { @@ -259,17 +258,18 @@ class Tva extends CommonObject else { $this->error="Error ".$this->db->lasterror(); - dol_syslog("Tva::fetch ".$this->error, LOG_ERR); + dol_syslog(get_class($this)."::fetch ".$this->error, LOG_ERR); return -1; } } - /* - * \brief Delete object in database - * \param user User that delete - * \return int <0 if KO, >0 if OK - */ + /** + * Delete object in database + * + * @param User $user User that delete + * @return int <0 if KO, >0 if OK + */ function delete($user) { global $conf, $langs; @@ -279,12 +279,12 @@ class Tva extends CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."tva"; $sql.= " WHERE rowid=".$this->id; - dol_syslog("Tva::delete sql=".$sql); + dol_syslog(get_class($this)."::delete sql=".$sql); $resql = $this->db->query($sql); if (! $resql) { $this->error="Error ".$this->db->lasterror(); - dol_syslog("Tva::delete ".$this->error, LOG_ERR); + dol_syslog(get_class($this)."::delete ".$this->error, LOG_ERR); return -1; } @@ -322,9 +322,11 @@ class Tva extends CommonObject } - /* - * \brief Hum la fonction s'appelle 'Solde' elle doit a mon avis calcluer le solde de TVA, non ? - * + /** + * Hum la fonction s'appelle 'Solde' elle doit a mon avis calcluer le solde de TVA, non ? + * + * @param int $year Year + * @return double Amount */ function solde($year = 0) { @@ -339,11 +341,12 @@ class Tva extends CommonObject return $solde; } - /* - * \brief Total de la TVA des factures emises par la societe. - * + /** + * Total de la TVA des factures emises par la societe. + * + * @param int $year Year + * @return double Amount */ - function tva_sum_collectee($year = 0) { @@ -352,7 +355,7 @@ class Tva extends CommonObject if ($year) { - $sql .= " AND f.datef >= '$year-01-01' AND f.datef <= '$year-12-31' "; + $sql .= " AND f.datef >= '".$year."-01-01' AND f.datef <= '".$year."-12-31' "; } $result = $this->db->query($sql); @@ -379,11 +382,12 @@ class Tva extends CommonObject } } - /* - * \brief Tva pay�e + /** + * VAT payed * + * @param int $year Year + * @return double Amount */ - function tva_sum_payee($year = 0) { @@ -392,7 +396,7 @@ class Tva extends CommonObject if ($year) { - $sql .= " WHERE f.datef >= '$year-01-01' AND f.datef <= '$year-12-31' "; + $sql .= " WHERE f.datef >= '".$year."-01-01' AND f.datef <= '".$year."-12-31' "; } $result = $this->db->query($sql); @@ -419,12 +423,12 @@ class Tva extends CommonObject } - /* - * \brief Tva r�gl�e - * Total de la TVA r�glee aupres de qui de droit + /** + * Total de la TVA reglee aupres de qui de droit * + * @param int $year Year + * @return double Amount */ - function tva_sum_reglee($year = 0) { @@ -433,7 +437,7 @@ class Tva extends CommonObject if ($year) { - $sql .= " WHERE f.datev >= '$year-01-01' AND f.datev <= '$year-12-31' "; + $sql .= " WHERE f.datev >= '".$year."-01-01' AND f.datev <= '".$year."-12-31' "; } $result = $this->db->query($sql); @@ -473,14 +477,16 @@ class Tva extends CommonObject $this->db->begin(); + // Clean parameters + $this->amount=price2num(trim($this->amount)); + // Check parameters - $this->amount=price2num($this->amount); if (! $this->label) { $this->error=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Label")); return -3; } - if ($this->amount <= 0) + if ($this->amount < 0 || $this->amount == '') { $this->error=$langs->trans("ErrorFieldRequired",$langs->transnoentities("Amount")); return -4; @@ -509,7 +515,7 @@ class Tva extends CommonObject $sql.=", '".$user->id."', NULL, ".$conf->entity; $sql.= ")"; - dol_syslog("Tva::addPayment sql=".$sql); + dol_syslog(get_class($this)."::addPayment sql=".$sql); $result = $this->db->query($sql); if ($result) { @@ -525,7 +531,7 @@ class Tva extends CommonObject if ($this->id > 0) { $ok=1; - if (! empty($conf->banque->enabled)) + if (! empty($conf->banque->enabled) && ! empty($this->amount)) { // Insertion dans llx_bank require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; @@ -536,7 +542,7 @@ class Tva extends CommonObject $bank_line_id = $acc->addline($this->datep, $this->paymenttype, $this->label, -abs($this->amount), '', '', $user); - // Mise a jour fk_bank dans llx_tva. On connait ainsi la ligne de tva qui a g�n�r� l'�criture bancaire + // Update fk_bank into llx_tva. So we know vat line used to generate bank transaction if ($bank_line_id > 0) { $this->update_fk_bank($bank_line_id); @@ -547,7 +553,7 @@ class Tva extends CommonObject $ok=0; } - // Mise a jour liens + // Update links $result=$acc->add_url_line($bank_line_id, $this->id, DOL_URL_ROOT.'/compta/tva/fiche.php?id=', "(VATPayment)", "payment_vat"); if ($result < 0) { diff --git a/htdocs/compta/tva/fiche.php b/htdocs/compta/tva/fiche.php index f36fd0be5a5..cab62777291 100644 --- a/htdocs/compta/tva/fiche.php +++ b/htdocs/compta/tva/fiche.php @@ -34,8 +34,6 @@ $langs->load("bills"); $id=GETPOST("id"); $action=GETPOST('action'); -$mesg = ''; - // Security check $socid = isset($_GET["socid"])?$_GET["socid"]:''; if ($user->societe_id) $socid=$user->societe_id; @@ -82,7 +80,7 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) else { $db->rollback(); - $mesg='
'.$tva->error.'
'; + setEventMessage($tva->error, 'errors'); $action="create"; } } @@ -115,18 +113,18 @@ if ($action == 'delete') { $tva->error=$accountline->error; $db->rollback(); - $mesg='
'.$tva->error.'
'; + setEventMessage($tva->error,'errors'); } } else { $db->rollback(); - $mesg='
'.$tva->error.'
'; + setEventMessage($tva->error,'errors'); } } else { - $mesg='
Error try do delete a line linked to a conciliated bank transaction
'; + setEventMessage('Error try do delete a line linked to a conciliated bank transaction','errors'); } } @@ -159,8 +157,6 @@ if ($action == 'create') print_fiche_titre($langs->trans("NewVATPayment")); - if ($mesg) print $mesg; - print ''; print ""; @@ -213,8 +209,6 @@ if ($action == 'create') if ($id) { - if ($mesg) print $mesg; - $h = 0; $head[$h][0] = DOL_URL_ROOT.'/compta/tva/fiche.php?id='.$vatpayment->id; $head[$h][1] = $langs->trans('Card'); @@ -274,9 +268,20 @@ if ($id) */ print "
\n"; if ($vatpayment->rappro == 0) - print ''.$langs->trans("Delete").''; + { + if (! empty($user->rights->tax->charges->supprimer)) + { + print ''.$langs->trans("Delete").''; + } + else + { + print ''.$langs->trans("Delete").''; + } + } else + { print ''.$langs->trans("Delete").''; + } print "
"; } diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index feaa996ad0c..61f722a1773 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -62,6 +62,10 @@ class Contact extends CommonObject var $code; var $email; + var $phone_pro; + var $phone_perso; + var $phone_mobile; + var $birthday; var $default_lang; var $note_public; // Public note diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 9c24972e383..f4271d05070 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -875,7 +875,7 @@ class ExtraFields if (!empty($value)) { $checked=' checked="checked" '; } - $value=''; + $value=''; } elseif ($type == 'mail') { diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index b756f0313a5..f8949593e43 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -800,7 +800,7 @@ class Form while ($i < $num) { $obj = $this->db->fetch_object($resql); - + $label=''; if ($conf->global->SOCIETE_ADD_REF_IN_LIST) { if (($obj->client) && (!empty($obj->code_client))) { $label = $obj->code_client. ' - '; @@ -2499,7 +2499,7 @@ class Form * @param string $action Action * @param array $formquestion An array with complementary inputs to add into forms: array(array('label'=> ,'type'=> , )) * @param string $selectedchoice "" or "no" or "yes" - * @param int $useajax 0=No, 1 or 'xxx'=Yes, 2=Yes but submit page with &confirm=no if choice is No, 'xxx'=preoutput confirm box with div id=dialog-confirm-xxx + * @param int $useajax 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No, 'xxx'=Yes and preoutput confirm box with div id=dialog-confirm-xxx * @param int $height Force height of box * @param int $width Force width of bow * @return string HTML ajax code if a confirm ajax popup is required, Pure HTML code if it's an html form @@ -2588,10 +2588,12 @@ class Form } // JQUI method dialog is broken with jmobile, we use standard HTML. - // Note: When using dol_use_jmobile, you must also check code for button use a GET url with action=xxx and output the confirm code only when action=xxx + // Note: When using dol_use_jmobile or no js, you must also check code for button use a GET url with action=xxx and check that you also output the confirm code when action=xxx + // See page product/fiche.php for example if (! empty($conf->dol_use_jmobile)) $useajax=0; + if (empty($conf->use_javascript_ajax)) $useajax=0; - if ($useajax && $conf->use_javascript_ajax) + if ($useajax) { $autoOpen=true; $dialogconfirm='dialog-confirm'; @@ -3717,9 +3719,10 @@ class Form * @param int $translate Translate and encode value * @param int $maxlen Length maximum for labels * @param int $disabled Html select box is disabled + * @param int $sort 'ASC' or 'DESC' =Sort on label, '' or 'NONE'=Do not sort * @return string HTML select string */ - function selectarray($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $option='', $translate=0, $maxlen=0, $disabled=0) + function selectarray($htmlname, $array, $id='', $show_empty=0, $key_in_label=0, $value_as_key=0, $option='', $translate=0, $maxlen=0, $disabled=0, $sort='') { global $langs; @@ -3734,28 +3737,30 @@ class Form if (is_array($array)) { + // Translate + if ($translate) + { + foreach($array as $key => $value) $array[$key]=$langs->trans($value); + } + + // Sort + if ($sort == 'ASC') asort($array); + elseif ($sort == 'DESC') arsort($array); + foreach($array as $key => $value) { $out.='\n"; diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index cffa4ff6a6d..907b78eaac1 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -345,7 +345,7 @@ function pdf_build_address($outputlangs,$sourcecompany,$targetcompany='',$target if (! empty($conf->global->MAIN_PDF_ADDALSOTARGETDETAILS)) { // Tel - if ($targetcontact->phone) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($targetcontact->phone); + if ($targetcontact->phone_pro) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Phone").": ".$outputlangs->convToOutputCharset($targetcontact->phone_pro); // Fax if ($targetcontact->fax) $stringaddress .= ($stringaddress ? "\n" : '' ).$outputlangs->transnoentities("Fax").": ".$outputlangs->convToOutputCharset($targetcontact->fax); // EMail diff --git a/htdocs/core/modules/DolibarrModules.class.php b/htdocs/core/modules/DolibarrModules.class.php index 6e623d183d2..79e515b05e5 100644 --- a/htdocs/core/modules/DolibarrModules.class.php +++ b/htdocs/core/modules/DolibarrModules.class.php @@ -52,12 +52,13 @@ abstract class DolibarrModules var $dbversion = "-"; + /** - * Fonction d'activation. Insere en base les constantes et boites du module + * Method to enable a module. Insert into database all constants, boxes of module * - * @param array $array_sql Array of SQL requests to execute when enabling module - * @param string $options Options when enabling module ('', 'noboxes') - * @return int 1 if OK, 0 if KO + * @param array $array_sql Array of SQL requests to execute when enabling module + * @param string $options String with options when disabling module ('newboxdefonly|noboxes') + * @return int 1 if OK, 0 if KO */ function _init($array_sql, $options='') { @@ -78,8 +79,8 @@ abstract class DolibarrModules // Insert constant defined by modules, into llx_const if (! $err) $err+=$this->insert_const(); - // Insere les boites dans llx_boxes_def - if (! $err && $options != 'noboxes') $err+=$this->insert_boxes(); + // Insert boxes def into llx_boxes_def and boxes setup into llx_boxes + if (! $err && ! preg_match('/noboxes/',$options)) $err+=$this->insert_boxes($options); // Insert permission definitions of module into llx_rights_def. If user is admin, grant this permission to user. if (! $err) $err+=$this->insert_permissions(1); @@ -147,7 +148,7 @@ abstract class DolibarrModules * Fonction de desactivation. Supprime de la base les constantes et boites du module * * @param array $array_sql Array of SQL requests to execute when disable module - * @param string $options Options when disabling module ('', 'noboxes') + * @param string $options String with options when disabling module ('newboxdefonly|noboxes') * @return int 1 if OK, 0 if KO */ function _remove($array_sql, $options='') @@ -170,7 +171,7 @@ abstract class DolibarrModules if (! $err) $err+=$this->delete_const(); // Remove list of module's available boxes (entry in llx_boxes) - if (! $err && $options != 'noboxes') $err+=$this->delete_boxes(); + if (! $err && ! preg_match('/(newboxdefonly|noboxes)/',$options)) $err+=$this->delete_boxes(); // We don't have to delete if option ask to keep boxes safe or ask to add new box def only // Remove module's permissions from list of available permissions (entries in llx_rights_def) if (! $err) $err+=$this->delete_permissions(); @@ -261,7 +262,7 @@ abstract class DolibarrModules /** - * Retourne la version du module. + * Return module version. * Pour les modules a l'etat 'experimental', retourne la traduction de 'experimental' * Pour les modules 'dolibarr', retourne la version de Dolibarr * Pour les autres modules, retourne la version du module @@ -281,6 +282,20 @@ abstract class DolibarrModules } + /** + * Return if a module is a core or external module + * + * @return string 'core', 'external' or 'unknown' + */ + function isCoreOrExternalModule() + { + if ($this->version == 'dolibarr') return 'core'; + if (! empty($this->version) && ! in_array($this->version,array('experimental','development'))) return 'external'; + if (! empty($this->editor_name) || ! empty($this->editor_web)) return 'external'; + return 'unknown'; + } + + /** * Return list of lang files related to module * @@ -419,7 +434,7 @@ abstract class DolibarrModules if (empty($reldir)) return 1; include_once DOL_DOCUMENT_ROOT .'/core/lib/admin.lib.php'; - + $ok = 1; foreach($conf->file->dol_document_root as $dirroot) { @@ -497,9 +512,10 @@ abstract class DolibarrModules /** * Insert boxes into llx_boxes_def * - * @return int Nb of errors (0 if OK) + * @param string $option String with options when disabling module ('newboxdefonly'=insert only boxes definition) + * @return int Nb of errors (0 if OK) */ - function insert_boxes() + function insert_boxes($option='') { require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php'; @@ -518,11 +534,13 @@ abstract class DolibarrModules if (empty($file)) $file = isset($this->boxes[$key][1])?$this->boxes[$key][1]:''; // For backward compatibility if (empty($note)) $note = isset($this->boxes[$key][2])?$this->boxes[$key][2]:''; // For backward compatibility + // Search if boxes def already present $sql = "SELECT count(*) as nb FROM ".MAIN_DB_PREFIX."boxes_def"; $sql.= " WHERE file = '".$this->db->escape($file)."'"; $sql.= " AND entity = ".$conf->entity; if ($note) $sql.=" AND note ='".$this->db->escape($note)."'"; + dol_syslog(get_class($this)."::insert_boxes sql=".$sql); $result=$this->db->query($sql); if ($result) { @@ -533,9 +551,9 @@ abstract class DolibarrModules if (! $err) { - $sql = "INSERT INTO ".MAIN_DB_PREFIX."boxes_def (file,entity,note)"; - $sql.= " VALUES ('".$this->db->escape($file)."',"; - $sql.= $conf->entity.","; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."boxes_def (file, entity, note)"; + $sql.= " VALUES ('".$this->db->escape($file)."', "; + $sql.= $conf->entity.", "; $sql.= $note?"'".$this->db->escape($note)."'":"null"; $sql.= ")"; @@ -544,7 +562,7 @@ abstract class DolibarrModules if (! $resql) $err++; } - if (! $err) + if (! $err && ! preg_match('/newboxdefonly/',$options)) { $lastid=$this->db->last_insert_id(MAIN_DB_PREFIX."boxes_def","rowid"); @@ -568,7 +586,7 @@ abstract class DolibarrModules $this->db->commit(); } else - { + { $this->error=$this->db->lasterror(); dol_syslog(get_class($this)."::insert_boxes ".$this->error, LOG_ERR); $this->db->rollback(); @@ -609,7 +627,7 @@ abstract class DolibarrModules //$note = $this->boxes[$key][2]; if (empty($file)) $file = isset($this->boxes[$key][1])?$this->boxes[$key][1]:''; // For backward compatibility - + $sql = "DELETE FROM ".MAIN_DB_PREFIX."boxes"; $sql.= " USING ".MAIN_DB_PREFIX."boxes, ".MAIN_DB_PREFIX."boxes_def"; $sql.= " WHERE ".MAIN_DB_PREFIX."boxes.box_id = ".MAIN_DB_PREFIX."boxes_def.rowid"; @@ -898,7 +916,7 @@ abstract class DolibarrModules break; } else dol_syslog(get_class($this)."::insert_permissions record already exists", LOG_INFO); - + } $this->db->free($resqlinsert); diff --git a/htdocs/core/modules/modCommande.class.php b/htdocs/core/modules/modCommande.class.php index 779cf75ea64..f9d552c286b 100644 --- a/htdocs/core/modules/modCommande.class.php +++ b/htdocs/core/modules/modCommande.class.php @@ -194,7 +194,7 @@ class modCommande extends DolibarrModules * The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database. * It also creates data directories * - * @param string $options Options when enabling module ('', 'noboxes') + * @param string $options Options when enabling module ('', 'newboxdefonly', 'noboxes') * @return int 1 if OK, 0 if KO */ function init($options='') @@ -236,7 +236,7 @@ class modCommande extends DolibarrModules * Remove from database constants, boxes and permissions from Dolibarr database. * Data directories are not deleted * - * @param string $options Options when enabling module ('', 'noboxes') + * @param string $options Options when enabling module ('', 'newboxdefonly', 'noboxes') * @return int 1 if OK, 0 if KO */ function remove($options='') diff --git a/htdocs/core/modules/modFacture.class.php b/htdocs/core/modules/modFacture.class.php index bb56366182d..08bd0e008ac 100644 --- a/htdocs/core/modules/modFacture.class.php +++ b/htdocs/core/modules/modFacture.class.php @@ -221,7 +221,7 @@ class modFacture extends DolibarrModules * The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database. * It also creates data directories * - * @param string $options Options when enabling module ('', 'noboxes') + * @param string $options Options when enabling module ('', 'newboxdefonly', 'noboxes') * @return int 1 if OK, 0 if KO */ function init($options='') @@ -262,7 +262,7 @@ class modFacture extends DolibarrModules * Remove from database constants, boxes and permissions from Dolibarr database. * Data directories are not deleted * - * @param string $options Options when enabling module ('', 'noboxes') + * @param string $options Options when enabling module ('', 'newboxdefonly', 'noboxes') * @return int 1 if OK, 0 if KO */ function remove($options='') diff --git a/htdocs/core/modules/modProduct.class.php b/htdocs/core/modules/modProduct.class.php index ecca09e136e..088c688a4fd 100644 --- a/htdocs/core/modules/modProduct.class.php +++ b/htdocs/core/modules/modProduct.class.php @@ -89,11 +89,12 @@ class modProduct extends DolibarrModules $r++; // Boxes - $this->boxes = array(); - $this->boxes[0][1] = "box_produits.php"; - $this->boxes[1][1] = "box_produits_alerte_stock.php"; - $this->boxes[2][1] = "box_graph_product_distribution.php"; - + $this->boxes = array( + 0=>array('file'=>'box_produits.php','enabledbydefaulton'=>'Home'), + 1=>array('file'=>'box_produits_alerte_stock.php','enabledbydefaulton'=>''), + 2=>array('file'=>'box_graph_product_distribution.php','enabledbydefaulton'=>'Home') + ); + // Permissions $this->rights = array(); $this->rights_class = 'produit'; @@ -244,7 +245,7 @@ class modProduct extends DolibarrModules 'sp.remise_percent'=>'0' ); } - + if (! empty($conf->global->PRODUIT_MULTIPRICES)) { // Exports product multiprice //-------- @@ -268,12 +269,12 @@ class modProduct extends DolibarrModules $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'product as p'; $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product_price as pr ON p.rowid = pr.fk_product'; $this->export_sql_end[$r] .=' WHERE p.fk_product_type = 0 AND p.entity IN ('.getEntity("product", 1).')'; - - + + // Import product multiprice //-------- $r=0; - + $r++; $this->import_code[$r]=$this->rights_class.'_'.$r; $this->import_label[$r]="ProductsMultiPrice"; // Translation key @@ -304,7 +305,7 @@ class modProduct extends DolibarrModules * The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database. * It also creates data directories * - * @param string $options Options when enabling module ('', 'noboxes') + * @param string $options Options when enabling module ('', 'newboxdefonly', 'noboxes') * @return int 1 if OK, 0 if KO */ function init($options='') @@ -322,7 +323,7 @@ class modProduct extends DolibarrModules * Remove from database constants, boxes and permissions from Dolibarr database. * Data directories are not deleted * - * @param string $options Options when enabling module ('', 'noboxes') + * @param string $options Options when enabling module ('', 'newboxdefonly', 'noboxes') * @return int 1 if OK, 0 if KO */ function remove($options='') diff --git a/htdocs/core/modules/modService.class.php b/htdocs/core/modules/modService.class.php index 09e8116af41..eb472a25799 100644 --- a/htdocs/core/modules/modService.class.php +++ b/htdocs/core/modules/modService.class.php @@ -75,8 +75,10 @@ class modService extends DolibarrModules $this->const = array(); // Boxes - $this->boxes = array(); - $this->boxes[0][1] = "box_services_contracts.php"; + $this->boxes = array( + 0=>array('file'=>'box_services_contracts.php','enabledbydefaulton'=>'Home'), + 1=>array('file'=>'box_graph_product_distribution.php','enabledbydefaulton'=>'Home') + ); // Permissions $this->rights = array(); @@ -186,7 +188,7 @@ class modService extends DolibarrModules * The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database. * It also creates data directories * - * @param string $options Options when enabling module ('', 'noboxes') + * @param string $options Options when enabling module ('', 'newboxdefonly', 'noboxes') * @return int 1 if OK, 0 if KO */ function init($options='') @@ -204,7 +206,7 @@ class modService extends DolibarrModules * Remove from database constants, boxes and permissions from Dolibarr database. * Data directories are not deleted * - * @param string $options Options when enabling module ('', 'noboxes') + * @param string $options Options when enabling module ('', 'newboxdefonly', 'noboxes') * @return int 1 if OK, 0 if KO */ function remove($options='') diff --git a/htdocs/core/tpl/passwordforgotten.tpl.php b/htdocs/core/tpl/passwordforgotten.tpl.php index 102a2a8bcc1..638a6ac5969 100644 --- a/htdocs/core/tpl/passwordforgotten.tpl.php +++ b/htdocs/core/tpl/passwordforgotten.tpl.php @@ -29,7 +29,7 @@ print top_htmlhead('',$langs->trans('Login').' '.$title); ?> - + - + @@ -44,39 +44,62 @@ This page is a sample of page using tables. To make test with

+Example 0 : Table with div and table with table containg a select that should be overflowed and truncated
+
+ +
+
+
+ +
+ +
+ + +
Example 1 : Table using tags: div.tagtable+form+div or div.tagtable+div.tagtr+div.tagtd
-use_javascript_ajax) && $object->statut == 0) include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; ?> + + +
-
-
line1
-
-
-
-
-
-
line2
-
dfsdf
-
-
-
-
+
line3
dfsdf
-
-
+
ffdsfsd
+
aaaa
-
+
line4
dfsdf
-
+
bbbb
+
+
line5
+
dfsdf
+
+
bbbb
+
+ +
@@ -215,7 +238,7 @@ $('xxxth').replaceWith(
Example 3 : Standard table
-use_javascript_ajax) && $object->statut == 0) include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 11263a51dd0..fb273b79ab3 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -910,11 +910,11 @@ else // Type - Size print ''.$langs->trans("ThirdPartyType").''."\n"; - print $form->selectarray("typent_id",$formcompany->typent_array(0), $object->typent_id); + print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT)); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1); print ''; print ''.$langs->trans("Staff").''; - print $form->selectarray("effectif_id",$formcompany->effectif_array(0), $object->effectif_id); + print $form->selectarray("effectif_id", $formcompany->effectif_array(0), $object->effectif_id); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1); print ''; @@ -1360,7 +1360,7 @@ else // Type - Size print ''.$langs->trans("ThirdPartyType").''; - print $form->selectarray("typent_id",$formcompany->typent_array(0), $object->typent_id); + print $form->selectarray("typent_id",$formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT)?'ASC':$conf->global->SOCIETE_SORT_ON_TYPEENT)); if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1); print ''; print ''.$langs->trans("Staff").''; @@ -1785,11 +1785,13 @@ else if (! empty($object->email)) { + $langs->load("mails"); print ''; } else - { - print ''; + { + $langs->load("mails"); + print ''; } if ($user->rights->societe->creer) diff --git a/htdocs/societe/tpl/linesalesrepresentative.tpl.php b/htdocs/societe/tpl/linesalesrepresentative.tpl.php index 9b2867cacff..70c9ec283c0 100644 --- a/htdocs/societe/tpl/linesalesrepresentative.tpl.php +++ b/htdocs/societe/tpl/linesalesrepresentative.tpl.php @@ -4,7 +4,7 @@ print '
'; print $langs->trans('SalesRepresentatives'); print ''; - if ($user->rights->societe->creer) + if ($user->rights->societe->creer && $user->rights->societe->client->voir) print ''.img_edit().''; else print ' '; diff --git a/htdocs/theme/amarok/style.css.php b/htdocs/theme/amarok/style.css.php index 85deb2039f6..3fe179ad34f 100644 --- a/htdocs/theme/amarok/style.css.php +++ b/htdocs/theme/amarok/style.css.php @@ -1159,14 +1159,14 @@ table.notopnoleftnoright { margin:0px; } -table.border, table.dataTable, .table-border, .table-border-col, .table-key-border-col, .table-val-border-col { +table.border, table.dataTable, .table-border, .table-border-col, .table-key-border-col, .table-val-border-col, div.border { border:1px solid #dddddd; border-collapse:collapse; padding:1px 0px; padding-left:2px; } -table.border td { +table.border td, div.border div div.tagtd { padding:1px 0px; border:1px solid #dddddd; border-collapse:collapse; @@ -2226,6 +2226,9 @@ ul.ulmenu { .ui-mobile fieldset { border-bottom: none !important; } +.ui-body-c, .ui-btn-up-c, .ui-btn-hover-c { + border: none !important; +} /* Style for first level menu with jmobile */ .ui-bar-b { diff --git a/htdocs/theme/auguria/style.css.php b/htdocs/theme/auguria/style.css.php index f32449c5d0a..9dcae0fd305 100644 --- a/htdocs/theme/auguria/style.css.php +++ b/htdocs/theme/auguria/style.css.php @@ -1245,19 +1245,19 @@ margin: 0px 0px 0px 0px; } -table.border, table.dataTable, .table-border, .table-border-col, .table-key-border-col, .table-val-border-col { +table.border, table.dataTable, .table-border, .table-border-col, .table-key-border-col, .table-val-border-col, div.border { border: 1px solid #9CACBB; border-collapse: collapse; padding: 1px 2px 2px 1px; /* t r b l */ } -table.border td { +table.border td, div.border div div.tagtd { padding: 1px 2px; border: 1px solid #9CACBB; border-collapse: collapse; } -td.border { +td.border, div.tagtable div div.border { border-top: 1px solid #000000; border-right: 1px solid #000000; border-bottom: 1px solid #000000; @@ -2398,6 +2398,9 @@ ul.ulmenu { .ui-mobile fieldset { border-bottom: none !important; } +.ui-body-c, .ui-btn-up-c, .ui-btn-hover-c { + border: none !important; +} /* Style for first level menu with jmobile */ .ui-bar-b, .lilevel0 { diff --git a/htdocs/theme/bureau2crea/style.css.php b/htdocs/theme/bureau2crea/style.css.php index 3929686a2e1..24ad3f941e7 100644 --- a/htdocs/theme/bureau2crea/style.css.php +++ b/htdocs/theme/bureau2crea/style.css.php @@ -1369,7 +1369,7 @@ margin: 0px 0px 0px 0px; } -table.border, table.dataTable, .table-border, .table-border-col, .table-key-border-col, .table-val-border-col { +table.border, table.dataTable, .table-border, .table-border-col, .table-key-border-col, .table-val-border-col, div.border { border-collapse: collapse; padding: 10px; border-spacing: 2px; @@ -1391,7 +1391,7 @@ table.border.formdoc td { border: none; } -table.border td { +table.border td, div.border div div.tagtd { padding: 4px; border: 1px solid #EFEFEF; border-spacing: 0px; @@ -1403,7 +1403,7 @@ table.border table td { border: none; } -td.border { +td.border, div.tagtable div div.border { border-top: 1px solid #000000; border-right: 1px solid #000000; border-bottom: 1px solid #000000; @@ -2561,6 +2561,9 @@ ul.ulmenu { border-radius: 0; -webkit-border-radius: 0; } +.ui-body-c, .ui-btn-up-c, .ui-btn-hover-c { + border: none !important; +} /* Style for first level menu with jmobile */ .ui-bar-b, .lilevel0 { diff --git a/htdocs/theme/cameleo/style.css.php b/htdocs/theme/cameleo/style.css.php index 629730da160..23854bec688 100644 --- a/htdocs/theme/cameleo/style.css.php +++ b/htdocs/theme/cameleo/style.css.php @@ -1402,19 +1402,19 @@ margin: 0px 0px 0px 0px; } -table.border, table.dataTable, .table-border, .table-border-col, .table-key-border-col, .table-val-border-col { +table.border, table.dataTable, .table-border, .table-border-col, .table-key-border-col, .table-val-border-col, div.border { border: 1px solid #9CACBB; border-collapse: collapse; padding: 1px 2px; } -table.border td { +table.border td, div.border div div.tagtd { padding: 1px 2px; border: 1px solid #9CACBB; border-collapse: collapse; } -td.border { +td.border, div.tagtable div div.border { border-top: 1px solid #000000; border-right: 1px solid #000000; border-bottom: 1px solid #000000; @@ -2482,6 +2482,9 @@ ul.ulmenu { color: # !important; } +.ui-body-c, .ui-btn-up-c, .ui-btn-hover-c { + border: none !important; +} .alilevel0 { color: # !important; text-shadow: 1px 0px 1px #; diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index db7500f12ce..0adafcccc0a 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -614,7 +614,7 @@ li.tmenu, li.tmenusel { li.tmenusel, li.tmenu:hover { background-image: -o-linear-gradient(bottom, rgba(250,250,250,0.3) 0%, rgba(0,0,0,0.3) 100%) !important; background-image: -moz-linear-gradient(bottom, rgba(250,250,250,0.3) 0%, rgba(0,0,0,0.3) 100%) !important; - background-image: -webkit-linear-gradient(bottom, rgba(250,250,250,0.3) 0%, rgba(0,0,0,0.3) 100%) !important; + background-image: -webkit-linear-gradient(bottom, rgba(0,0,0,0.3) 0%, rgba(250,250,250,0) 100%) !important; background-image: -ms-linear-gradient(bottom, rgba(250,250,250,0.3) 0%, rgba(0,0,0,0.3) 100%) !important; background-image: linear-gradient(bottom, rgba(250,250,250,0.3) 0%, rgba(0,0,0,0.3) 100%) !important; background: rgb(); @@ -1605,19 +1605,19 @@ span.butAction, span.butActionDelete { } -table.border, table.dataTable, .table-border, .table-border-col, .table-key-border-col, .table-val-border-col { +table.border, table.dataTable, .table-border, .table-border-col, .table-key-border-col, .table-val-border-col, div.border { border: 1px solid #D0D0D0; border-collapse: collapse; padding: 1px 2px 1px 3px; /* t r b l */ } -table.border td { +table.border td, div.border div div.tagtd { padding: 1px 2px 1px 2px; border: 1px solid #D0D0D0; border-collapse: collapse; } -td.border { +td.border, div.tagtable div div.border { border-top: 1px solid #000000; border-right: 1px solid #000000; border-bottom: 1px solid #000000; @@ -2831,6 +2831,9 @@ ul.ulmenu { color: # !important; text-shadow: 1px 0px 1px #; } +.ui-body-c, .ui-btn-up-c, .ui-btn-hover-c { + border: none !important; +} .ui-btn-up-c .vsmenudisabled { color: # !important; text-shadow: none !important; @@ -2840,14 +2843,6 @@ ul.ulmenu { text-shadow: 1px 0px 1px #; } .lilevel1 { - background-image: -webkit-gradient(linear,left top,left bottom,from( #eee ),to( #e1e1e1 )) !important; - background-image: -webkit-linear-gradient( #eee,#e1e1e1 ) !important; - background-image: -moz-linear-gradient( #eee,#e1e1e1 ) !important; - background-image: -ms-linear-gradient( #eee,#e1e1e1 ) !important; - background-image: -o-linear-gradient( #eee,#e1e1e1 ) !important; - background-image: linear-gradient( #eee,#e1e1e1 ) !important; -} -.lilevel1:hover, .lilevel2:hover, .lilevel3:hover, .lilevel4:hover { background-image: -webkit-gradient(linear,left top,left bottom,from( #ddd ),to( #d1d1d1 )) !important; background-image: -webkit-linear-gradient( #ddd,#d1d1d1 ) !important; background-image: -moz-linear-gradient( #ddd,#d1d1d1 ) !important; @@ -2855,7 +2850,22 @@ ul.ulmenu { background-image: -o-linear-gradient( #ddd,#d1d1d1 ) !important; background-image: linear-gradient( #ddd,#d1d1d1 ) !important; } - +.lilevel1:hover, .lilevel2:hover, .lilevel3:hover, .lilevel4:hover { + background-image: -webkit-gradient(linear,left top,left bottom,from( #ccc ),to( #c1c1c1 )) !important; + background-image: -webkit-linear-gradient( #ccc,#c1c1c1 ) !important; + background-image: -moz-linear-gradient( #ccc,#c1c1c1 ) !important; + background-image: -ms-linear-gradient( #ccc,#c1c1c1 ) !important; + background-image: -o-linear-gradient( #ccc,#c1c1c1 ) !important; + background-image: linear-gradient( #ccc,#c1c1c1 ) !important; +} + +.overflowwithjm200 +{ + max-width: 200px; + overflow: hidden; + white-space: nowrap; +} + close(); diff --git a/htdocs/webservices/admin/webservices.php b/htdocs/webservices/admin/webservices.php index 2de3c12df2c..7b71e5a0228 100644 --- a/htdocs/webservices/admin/webservices.php +++ b/htdocs/webservices/admin/webservices.php @@ -102,6 +102,7 @@ print '

'; $webservices = array( 'user' => '', 'thirdparty' => '!empty($conf->societe->enabled)', + 'contact' => '!empty($conf->societe->enabled)', 'productorservice' => '(!empty($conf->product->enabled) || !empty($conf->service->enabled))', 'order' => '!empty($conf->commande->enabled)', 'invoice' => '!empty($conf->facture->enabled)', diff --git a/htdocs/webservices/server_contact.php b/htdocs/webservices/server_contact.php index 08d21d5cba2..cfe25afbe4c 100644 --- a/htdocs/webservices/server_contact.php +++ b/htdocs/webservices/server_contact.php @@ -300,7 +300,7 @@ function getContact($authentication,$id,$ref='',$ref_ext='') 'ref_propal' => $contact->ref_propal, 'user_id' => $contact->user_id, 'user_login' => $contact->user_login, - 'civility_id' => $contact->civility_id + 'civilite_id' => $contact->civility_id ); //Retreive all extrafield for thirdsparty @@ -379,7 +379,7 @@ function createContact($authentication,$contact) $newobject=new Contact($db); $newobject->id=$contact['id']; - $newobject->civility_id=$contact['civility_id']; + $newobject->civilite_id=$contact['civility_id']; $newobject->lastname=$contact['lastname']; $newobject->firstname=$contact['firstname']; $newobject->address=$contact['address']; @@ -522,7 +522,7 @@ function getContactsForThirdParty($authentication,$idthirdparty) $linescontact[]=array( 'id' => $contact->id, 'ref' => $contact->ref, - 'civility_id' => $contact->civility_id?$contact->civility_id:'', + 'civility_id' => $contact->civilite_id?$contact->civilite_id:'', 'lastname' => $contact->lastname?$contact->lastname:'', 'firstname' => $contact->firstname?$contact->firstname:'', 'address' => $contact->address?$contact->address:'', @@ -653,6 +653,8 @@ function updateContact($authentication,$contact) $object->fax=$contact['fax']; $object->email=$contact['email']; + $object->civilite_id=$contact['civility_id']; + //Retreive all extrafield for contact // fetch optionals attributes and labels