diff --git a/ChangeLog b/ChangeLog index 3f6221ac9c8..6711c0ce1ff 100644 --- a/ChangeLog +++ b/ChangeLog @@ -111,6 +111,10 @@ WARNING: If you used external modules, some of them may need to be upgraded due - Fix: [ bug #855 ] Holiday approval email in French - Fix: [ bug #856 ] (Holidays module) Mail error if destination user doesn't have an email - Fix: [ bug #857 ] Invoice created from shipment does not have the order discount +- Fix: [ bug #861 ] Impossible to create a new event in agenda +- Fix: [ bug #827 ] AJAX search does not respect multiprice level +- Fix: [ bug #865 ] Dolibarr navigation array in project/task do not work +- Fix: [ bug #788 ] Date of linked interventions are not shown ***** ChangeLog for 3.3.1 compared to 3.3 ***** diff --git a/htdocs/compta/clients.php b/htdocs/compta/clients.php index e1a6f02d49f..96fd0231efb 100644 --- a/htdocs/compta/clients.php +++ b/htdocs/compta/clients.php @@ -140,6 +140,8 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; + $langs->load('commercial'); + print_barre_liste($langs->trans("ListOfCustomers"), $page, $_SERVER["PHP_SELF"],"",$sortfield,$sortorder,'',$num); print '
'; diff --git a/htdocs/compta/prelevement/factures.php b/htdocs/compta/prelevement/factures.php index ee5558b8ba2..94f96b04f9d 100644 --- a/htdocs/compta/prelevement/factures.php +++ b/htdocs/compta/prelevement/factures.php @@ -35,6 +35,7 @@ $langs->load("banks"); $langs->load("categories"); $langs->load("companies"); $langs->load('withdrawals'); +$langs->load('bills'); // Securite acces client if ($user->societe_id > 0) accessforbidden(); diff --git a/htdocs/compta/prelevement/fiche-rejet.php b/htdocs/compta/prelevement/fiche-rejet.php index 335bfbc26c6..e89a5fa2fcd 100644 --- a/htdocs/compta/prelevement/fiche-rejet.php +++ b/htdocs/compta/prelevement/fiche-rejet.php @@ -34,6 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $langs->load("banks"); $langs->load("categories"); $langs->load('withdrawals'); +$langs->load('bills'); // Securite acces client if ($user->societe_id > 0) accessforbidden(); diff --git a/htdocs/compta/prelevement/fiche-stat.php b/htdocs/compta/prelevement/fiche-stat.php index ee03e0d18b2..9cb29ad8d26 100644 --- a/htdocs/compta/prelevement/fiche-stat.php +++ b/htdocs/compta/prelevement/fiche-stat.php @@ -60,17 +60,17 @@ if ($prev_id) print ''.$langs->trans("Ref").''.$bon->getNomUrl(1).''; print ''.$langs->trans("Date").''.dol_print_date($bon->datec,'day').''; print ''.$langs->trans("Amount").''.price($bon->amount).''; - + // Status print ''.$langs->trans('Status').''; print ''.$bon->getLibStatut(1).''; print ''; - + if($bon->date_trans <> 0) { $muser = new User($db); $muser->fetch($bon->user_trans); - + print ''.$langs->trans("TransData").''; print dol_print_date($bon->date_trans,'day'); print ' '.$langs->trans("By").' '.$muser->getFullName($langs).''; @@ -84,19 +84,19 @@ if ($prev_id) print dol_print_date($bon->date_credit,'day'); print ''; } - + print ''; - + print '
'; - + print '
'; print $langs->trans("WithdrawalFile").''; $relativepath = 'receipts/'.$bon->ref; print ''.$relativepath.''; print '
'; - + dol_fiche_end(); - + } else { diff --git a/htdocs/compta/prelevement/lignes.php b/htdocs/compta/prelevement/lignes.php index 5e186774abe..055574a2c06 100644 --- a/htdocs/compta/prelevement/lignes.php +++ b/htdocs/compta/prelevement/lignes.php @@ -39,6 +39,7 @@ $langs->load("categories"); if ($user->societe_id > 0) accessforbidden(); $langs->load('withdrawals'); +$langs->load('bills'); // Get supervariables $prev_id = GETPOST('id','int'); diff --git a/htdocs/compta/prelevement/rejets.php b/htdocs/compta/prelevement/rejets.php index 012c2364635..274e55084f4 100644 --- a/htdocs/compta/prelevement/rejets.php +++ b/htdocs/compta/prelevement/rejets.php @@ -26,6 +26,7 @@ require('../../../main.inc.php'); require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; @@ -58,6 +59,7 @@ if ($sortorder == "") $sortorder="DESC"; if ($sortfield == "") $sortfield="p.datec"; $rej = new RejetPrelevement($db, $user); +$ligne = new LignePrelevement($db); /* * Liste des factures @@ -86,7 +88,7 @@ if ($result) print"\n\n"; print ''; print ''; - print_liste_field_titre($langs->trans("Nb"),"rejets.php","p.ref",'',$urladd); + print_liste_field_titre($langs->trans("Line"),"rejets.php","p.ref",'',$urladd); print_liste_field_titre($langs->trans("ThirdParty"),"rejets.php","s.nom",'',$urladd); print_liste_field_titre($langs->trans("Reason"),"rejets.php","pr.motif","",$urladd); print ''; @@ -100,7 +102,7 @@ if ($result) $obj = $db->fetch_object($result); print ""; diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index db8b408e6ed..64d80dbdbf2 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2004-2010 Laurent Destailleur + * Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2007 Franky Van Liedekerke * Copyright (C) 2008 Raphael Bertrand (Resultic) @@ -219,9 +219,10 @@ class Contact extends CommonObject $this->phone_pro=trim($this->phone_pro); $this->phone_perso=trim($this->phone_perso); $this->phone_mobile=trim($this->phone_mobile); + $this->jabberid=trim($this->jabberid); $this->fax=trim($this->fax); - $this->zip=($this->zip?$this->zip:$this->zip); - $this->town=($this->town?$this->town:$this->town); + $this->zip=(empty($this->zip)?'':$this->zip); + $this->town=(empty($this->town)?'':$this->town); $this->country_id=($this->country_id > 0?$this->country_id:$this->country_id); $this->state_id=($this->state_id > 0?$this->state_id:$this->fk_departement); @@ -248,8 +249,8 @@ class Contact extends CommonObject $sql .= ", phone_mobile = '".$this->db->escape($this->phone_mobile)."'"; $sql .= ", jabberid = '".$this->db->escape($this->jabberid)."'"; $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 .= ", 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."'":"0"); $sql .= " WHERE rowid=".$id; diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 39d4d7aac60..f5bdfb0d0db 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -547,7 +547,7 @@ class Contrat extends CommonObject $objp = $this->db->fetch_object($result); $line = new ContratLigne($this->db); - $line->id = $objp->rowid; + $line->id = $objp->rowid; $line->fk_contrat = $objp->fk_contrat; $line->libelle = $objp->description; $line->desc = $objp->description; @@ -560,7 +560,7 @@ class Contrat extends CommonObject $line->subprice = $objp->subprice; $line->remise_percent = $objp->remise_percent; $line->price_ht = $objp->price_ht; - $line->price = $objp->price; // For backward compatibility + $line->price = (isset($objp->price)?$objp->price:null); // For backward compatibility $line->total_ht = $objp->total_ht; $line->total_tva = $objp->total_tva; $line->total_localtax1= $objp->total_localtax1; diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 5c72ae6f1d7..6c423d7d2f7 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -280,8 +280,8 @@ function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0) } $url=preg_replace('/__LOGIN__/',$user->login,$url); $shorturl=preg_replace('/__LOGIN__/',$user->login,$shorturl); - $url=preg_replace('/__USERID__/',$user->id,$url); - $shorturl=preg_replace('/__USERID__/',$user->id,$shorturl); + $url=preg_replace('/__USERID__/',$user->id,$url); + $shorturl=preg_replace('/__USERID__/',$user->id,$shorturl); // Define the class (top menu selected or not) if (! empty($_SESSION['idmenu']) && $newTabMenu[$i]['rowid'] == $_SESSION['idmenu']) $classname='class="tmenusel"'; @@ -1165,52 +1165,52 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu $newmenu = $menuArbo->menuLeftCharger($newmenu,$mainmenu,$leftmenu,(empty($user->societe_id)?0:1),'eldy',$tabMenu); // We update newmenu for special dynamic menus - if ($user->rights->banque->lire && $mainmenu == 'bank') // Entry for each bank account - { - $sql = "SELECT rowid, label, courant, rappro, courant"; - $sql.= " FROM ".MAIN_DB_PREFIX."bank_account"; - $sql.= " WHERE entity = ".$conf->entity; - $sql.= " AND clos = 0"; - $sql.= " ORDER BY label"; - - $resql = $db->query($sql); - if ($resql) - { - $numr = $db->num_rows($resql); - $i = 0; - - if ($numr > 0) $newmenu->add('/compta/bank/index.php',$langs->trans("BankAccounts"),0,$user->rights->banque->lire); - - while ($i < $numr) - { - $objp = $db->fetch_object($resql); - $newmenu->add('/compta/bank/fiche.php?id='.$objp->rowid,$objp->label,1,$user->rights->banque->lire); - if ($objp->rappro && $objp->courant != 2 && empty($objp->clos)) // If not cash account and not closed and can be reconciliate - { - $newmenu->add('/compta/bank/rappro.php?account='.$objp->rowid,$langs->trans("Conciliate"),2,$user->rights->banque->consolidate); - } - $i++; - } - } - else dol_print_error($db); - $db->free($resql); + if ($user->rights->banque->lire && $mainmenu == 'bank') // Entry for each bank account + { + $sql = "SELECT rowid, label, courant, rappro, courant"; + $sql.= " FROM ".MAIN_DB_PREFIX."bank_account"; + $sql.= " WHERE entity = ".$conf->entity; + $sql.= " AND clos = 0"; + $sql.= " ORDER BY label"; + + $resql = $db->query($sql); + if ($resql) + { + $numr = $db->num_rows($resql); + $i = 0; + + if ($numr > 0) $newmenu->add('/compta/bank/index.php',$langs->trans("BankAccounts"),0,$user->rights->banque->lire); + + while ($i < $numr) + { + $objp = $db->fetch_object($resql); + $newmenu->add('/compta/bank/fiche.php?id='.$objp->rowid,$objp->label,1,$user->rights->banque->lire); + if ($objp->rappro && $objp->courant != 2 && empty($objp->clos)) // If not cash account and not closed and can be reconciliate + { + $newmenu->add('/compta/bank/rappro.php?account='.$objp->rowid,$langs->trans("Conciliate"),2,$user->rights->banque->consolidate); + } + $i++; + } + } + else dol_print_error($db); + $db->free($resql); } - if ($conf->ftp->enabled && $mainmenu == 'ftp') // Entry for FTP - { - $MAXFTP=20; - $i=1; - while ($i <= $MAXFTP) - { - $paramkey='FTP_NAME_'.$i; - //print $paramkey; - if (! empty($conf->global->$paramkey)) - { - $link="/ftp/index.php?idmenu=".$_SESSION["idmenu"]."&numero_ftp=".$i; - - $newmenu->add($link, dol_trunc($conf->global->$paramkey,24)); - } - $i++; - } + if ($conf->ftp->enabled && $mainmenu == 'ftp') // Entry for FTP + { + $MAXFTP=20; + $i=1; + while ($i <= $MAXFTP) + { + $paramkey='FTP_NAME_'.$i; + //print $paramkey; + if (! empty($conf->global->$paramkey)) + { + $link="/ftp/index.php?idmenu=".$_SESSION["idmenu"]."&numero_ftp=".$i; + + $newmenu->add($link, dol_trunc($conf->global->$paramkey,24)); + } + $i++; + } } } @@ -1261,8 +1261,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu // For external modules $url = dol_buildpath($menu_array[$i]['url'], 1); - $url=preg_replace('/__LOGIN__/',$user->login,$url); - $url=preg_replace('/__USERID__/',$user->id,$url); + $url=preg_replace('/__LOGIN__/',$user->login,$url); + $url=preg_replace('/__USERID__/',$user->id,$url); print ''."\n"; @@ -1346,4 +1346,4 @@ function dol_eldy_showmenu($type_user, &$menuentry, &$listofmodulesforexternal) return 1; } -?> +?> \ No newline at end of file diff --git a/htdocs/core/modules/societe/mod_codeclient_monkey.php b/htdocs/core/modules/societe/mod_codeclient_monkey.php index 2fa4c667b9d..1e55a6256f3 100644 --- a/htdocs/core/modules/societe/mod_codeclient_monkey.php +++ b/htdocs/core/modules/societe/mod_codeclient_monkey.php @@ -43,6 +43,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode var $prefixcustomer='CU'; var $prefixsupplier='SU'; + var $prefixIsRequired; // Le champ prefix du tiers doit etre renseigne quand on utilise {pre} /** @@ -57,6 +58,7 @@ class mod_codeclient_monkey extends ModeleThirdPartyCode $this->code_modifiable_invalide = 1; $this->code_modifiable_null = 1; $this->code_auto = 1; + $this->prefixIsRequired = 0; } diff --git a/htdocs/includes/nusoap/lib/Mail/PEAR.php b/htdocs/includes/nusoap/lib/Mail/PEAR.php index 3e0c465b00e..406ef9c23ba 100755 --- a/htdocs/includes/nusoap/lib/Mail/PEAR.php +++ b/htdocs/includes/nusoap/lib/Mail/PEAR.php @@ -559,10 +559,10 @@ class PEAR $ec = 'PEAR_Error'; } if ($skipmsg) { - $a = &new $ec($code, $mode, $options, $userinfo); + $a = new $ec($code, $mode, $options, $userinfo); return $a; } else { - $a = &new $ec($message, $code, $mode, $options, $userinfo); + $a = new $ec($message, $code, $mode, $options, $userinfo); return $a; } } diff --git a/htdocs/includes/nusoap/lib/Mail/mimeDecode.php b/htdocs/includes/nusoap/lib/Mail/mimeDecode.php index 4a09f567c89..7ac931c2fb4 100755 --- a/htdocs/includes/nusoap/lib/Mail/mimeDecode.php +++ b/htdocs/includes/nusoap/lib/Mail/mimeDecode.php @@ -307,7 +307,7 @@ class Mail_mimeDecode extends PEAR break; case 'message/rfc822': - $obj = &new Mail_mimeDecode($body); + $obj = new Mail_mimeDecode($body); $return->parts[] = $obj->decode(array('include_bodies' => $this->_include_bodies, 'decode_bodies' => $this->_decode_bodies, 'decode_headers' => $this->_decode_headers)); diff --git a/htdocs/langs/es_ES/admin.lang b/htdocs/langs/es_ES/admin.lang index 455fade1476..15a055de27a 100644 --- a/htdocs/langs/es_ES/admin.lang +++ b/htdocs/langs/es_ES/admin.lang @@ -666,8 +666,8 @@ Permission1002=Crear/modificar stocks Permission1003=Eliminar stocks Permission1004=Consultar movimientos de stock Permission1005=Crear/modificar movimientos de stock -Permission1101=Consultar ordenes de envío -Permission1102=Crear/modificar ordenes de envío +Permission1101=Consultar órdenes de envío +Permission1102=Crear/modificar órdenes de envío Permission1104=Validar orden de envío Permission1109=Eliminar orden de envío Permission1181=Consultar proveedores diff --git a/htdocs/langs/es_ES/withdrawals.lang b/htdocs/langs/es_ES/withdrawals.lang index 75156b22660..736577af6d3 100644 --- a/htdocs/langs/es_ES/withdrawals.lang +++ b/htdocs/langs/es_ES/withdrawals.lang @@ -9,7 +9,7 @@ StandingOrderToProcess=A procesar StandingOrderProcessed=Procesados Withdrawals=Reintegros Withdrawal=Reintegro -WithdrawalsReceipts=Ordenes domiciliadas +WithdrawalsReceipts=Órdenes domiciliadas WithdrawalReceipt=Orden domiciliación WithdrawalReceiptShort=Orden LastWithdrawalReceipts=Las %s últimas órdenes de domiciliación diff --git a/htdocs/product/ajax/products.php b/htdocs/product/ajax/products.php index 8fd68e2b954..3fed5d5152c 100644 --- a/htdocs/product/ajax/products.php +++ b/htdocs/product/ajax/products.php @@ -157,7 +157,7 @@ else $form = new Form($db); if (empty($mode) || $mode == 1) { - $arrayresult=$form->select_produits_do("",$htmlname,$type,"",$pricelevel,$searchkey,$status,2,$outjson); + $arrayresult=$form->select_produits_do("",$htmlname,$type,"",$price_level,$searchkey,$status,2,$outjson); } elseif ($mode == 2) { diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 88360e6ec1d..4f11e4872e2 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -431,7 +431,7 @@ class Product extends CommonObject $this->ref = dol_string_nospecial(trim($this->ref)); $this->libelle = trim($this->libelle); $this->description = trim($this->description); - $this->note = trim($this->note); + $this->note = (isset($this->note)? trim($this->note):"null"); $this->weight = price2num($this->weight); $this->weight_units = trim($this->weight_units); $this->length = price2num($this->length); diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index ce9189ce1c6..e47c36fa191 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -254,6 +254,7 @@ foreach ($listofreferent as $key => $value) $date=$element->date; if (empty($date)) $date=$element->datep; if (empty($date)) $date=$element->date_contrat; + if (empty($date)) $date=$element->datev; //Fiche inter print ''; // Third party diff --git a/test/phpunit/FilesLibTest.php b/test/phpunit/FilesLibTest.php index 54ed69216ac..c625b1f3e51 100644 --- a/test/phpunit/FilesLibTest.php +++ b/test/phpunit/FilesLibTest.php @@ -346,7 +346,7 @@ class FilesLibTest extends PHPUnit_Framework_TestCase $result=dol_copy($file, $conf->admin->dir_temp.'/file with [x] and é.csv',0,1); print __METHOD__." result=".$result."\n"; $this->assertGreaterThanOrEqual(1,$result,'copy file with special chars, overwrite'); // Should be 1 - + // Try to delete using a glob criteria $result=dol_delete_file($conf->admin->dir_temp.'/file with [x]*é.csv'); print __METHOD__." result=".$result."\n"; @@ -387,4 +387,4 @@ class FilesLibTest extends PHPUnit_Framework_TestCase $this->assertEquals(0,count($result)); } } -?> \ No newline at end of file +?>
"; - print ' '; + print $ligne->LibStatut($obj->statut,2).' '; print ''; print substr('000000'.$obj->rowid, -6)."'.dol_print_date($date,'day').'