Merge remote-tracking branch 'origin/3.3' into develop
Conflicts: ChangeLog htdocs/compta/prelevement/bons.php htdocs/compta/prelevement/fiche-stat.php htdocs/contact/class/contact.class.php htdocs/contrat/class/contrat.class.php htdocs/core/menus/standard/eldy.lib.php htdocs/core/modules/modSociete.class.php htdocs/projet/fiche.php test/phpunit/FilesLibTest.php
This commit is contained in:
commit
fc0d5abd14
@ -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 *****
|
||||
|
||||
@ -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 '<form method="GET" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -60,17 +60,17 @@ if ($prev_id)
|
||||
print '<tr><td width="20%">'.$langs->trans("Ref").'</td><td>'.$bon->getNomUrl(1).'</td></tr>';
|
||||
print '<tr><td width="20%">'.$langs->trans("Date").'</td><td>'.dol_print_date($bon->datec,'day').'</td></tr>';
|
||||
print '<tr><td width="20%">'.$langs->trans("Amount").'</td><td>'.price($bon->amount).'</td></tr>';
|
||||
|
||||
|
||||
// Status
|
||||
print '<tr><td width="20%">'.$langs->trans('Status').'</td>';
|
||||
print '<td>'.$bon->getLibStatut(1).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
||||
if($bon->date_trans <> 0)
|
||||
{
|
||||
$muser = new User($db);
|
||||
$muser->fetch($bon->user_trans);
|
||||
|
||||
|
||||
print '<tr><td width="20%">'.$langs->trans("TransData").'</td><td>';
|
||||
print dol_print_date($bon->date_trans,'day');
|
||||
print ' '.$langs->trans("By").' '.$muser->getFullName($langs).'</td></tr>';
|
||||
@ -84,19 +84,19 @@ if ($prev_id)
|
||||
print dol_print_date($bon->date_credit,'day');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
print '</table>';
|
||||
|
||||
|
||||
print '<br>';
|
||||
|
||||
|
||||
print '<table class="border" width="100%"><tr><td width="20%">';
|
||||
print $langs->trans("WithdrawalFile").'</td><td>';
|
||||
$relativepath = 'receipts/'.$bon->ref;
|
||||
print '<a data-ajax="false" href="'.DOL_URL_ROOT.'/document.php?type=text/plain&modulepart=prelevement&file='.urlencode($relativepath).'">'.$relativepath.'</a>';
|
||||
print '</td></tr></table>';
|
||||
|
||||
|
||||
dol_fiche_end();
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -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');
|
||||
|
||||
@ -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<!-- debut table -->\n";
|
||||
print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">';
|
||||
print '<tr class="liste_titre">';
|
||||
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 '</tr>';
|
||||
@ -100,7 +102,7 @@ if ($result)
|
||||
$obj = $db->fetch_object($result);
|
||||
|
||||
print "<tr $bc[$var]><td>";
|
||||
print '<img border="0" src="./img/statut'.$obj->statut.'.png"></a> ';
|
||||
print $ligne->LibStatut($obj->statut,2).' ';
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/prelevement/ligne.php?id='.$obj->rowid.'">';
|
||||
|
||||
print substr('000000'.$obj->rowid, -6)."</a></td>";
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerker@telenet.be>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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 '<!-- Add menu entry with mainmenu='.$menu_array[$i]['mainmenu'].', leftmenu='.$menu_array[$i]['leftmenu'].', level='.$menu_array[$i]['level'].' -->'."\n";
|
||||
|
||||
@ -1346,4 +1346,4 @@ function dol_eldy_showmenu($type_user, &$menuentry, &$listofmodulesforexternal)
|
||||
return 1;
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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)
|
||||
{
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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 '<td align="center">'.dol_print_date($date,'day').'</td>';
|
||||
|
||||
// Third party
|
||||
|
||||
@ -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));
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user