[ bug #512 ] Filter system not working in banks > account > transactions

This commit is contained in:
Laurent Destailleur 2012-08-26 19:23:08 +02:00
parent 85bec2230e
commit a18187620e

View File

@ -49,6 +49,7 @@ $fieldtype = (! empty($ref) ? 'ref' :'rowid');
if ($user->societe_id) $socid=$user->societe_id; if ($user->societe_id) $socid=$user->societe_id;
$result=restrictedArea($user,'banque',$fieldvalue,'bank_account','','',$fieldtype); $result=restrictedArea($user,'banque',$fieldvalue,'bank_account','','',$fieldtype);
$paiementtype=GETPOST('paiementtype','alpha',3);
$req_nb=GETPOST("req_nb",'',3); $req_nb=GETPOST("req_nb",'',3);
$thirdparty=GETPOST("thirdparty",'',3); $thirdparty=GETPOST("thirdparty",'',3);
$vline=GETPOST("vline"); $vline=GETPOST("vline");
@ -79,17 +80,17 @@ if ($action == 'add' && $id && ! isset($_POST["cancel"]) && $user->rights->banqu
{ {
$amount = - price2num($_POST["debit"]); $amount = - price2num($_POST["debit"]);
} }
$dateop = dol_mktime(12,0,0,$_POST["opmonth"],$_POST["opday"],$_POST["opyear"]); $dateop = dol_mktime(12,0,0,$_POST["opmonth"],$_POST["opday"],$_POST["opyear"]);
$operation=$_POST["operation"]; $operation=$_POST["operation"];
$num_chq=$_POST["num_chq"]; $num_chq=$_POST["num_chq"];
$label=$_POST["label"]; $label=$_POST["label"];
$cat1=$_POST["cat1"]; $cat1=$_POST["cat1"];
if (! $dateop) $mesg=$langs->trans("ErrorFieldRequired",$langs->trans("Date")); if (! $dateop) $mesg=$langs->trans("ErrorFieldRequired",$langs->trans("Date"));
if (! $operation) $mesg=$langs->trans("ErrorFieldRequired",$langs->trans("Type")); if (! $operation) $mesg=$langs->trans("ErrorFieldRequired",$langs->trans("Type"));
if (! $amount) $mesg=$langs->trans("ErrorFieldRequired",$langs->trans("Amount")); if (! $amount) $mesg=$langs->trans("ErrorFieldRequired",$langs->trans("Amount"));
if (! $mesg) if (! $mesg)
{ {
$object->fetch($id); $object->fetch($id);
@ -144,15 +145,15 @@ if ($id > 0 || ! empty($ref))
} }
$result=$object->fetch($id, $ref); $result=$object->fetch($id, $ref);
// Chargement des categories bancaires dans $options // Chargement des categories bancaires dans $options
$nbcategories=0; $nbcategories=0;
$sql = "SELECT rowid, label"; $sql = "SELECT rowid, label";
$sql.= " FROM ".MAIN_DB_PREFIX."bank_categ"; $sql.= " FROM ".MAIN_DB_PREFIX."bank_categ";
$sql.= " WHERE entity = ".$conf->entity; $sql.= " WHERE entity = ".$conf->entity;
$sql.= " ORDER BY label"; $sql.= " ORDER BY label";
$result = $db->query($sql); $result = $db->query($sql);
if ($result) if ($result)
{ {
@ -169,7 +170,7 @@ if ($id > 0 || ! empty($ref))
} }
$db->free($result); $db->free($result);
} }
// Definition de sql_rech et param // Definition de sql_rech et param
$param=''; $param='';
$sql_rech=''; $sql_rech='';
@ -204,13 +205,13 @@ if ($id > 0 || ! empty($ref))
$param.='&thirdparty='.urlencode($thirdparty); $param.='&thirdparty='.urlencode($thirdparty);
$mode_search = 1; $mode_search = 1;
} }
if (GETPOST("paiementtype")) if ($paiementtype)
{ {
$sql_rech.=" AND b.fk_type = '".$db->escape(GETPOST("paiementtype"))."'"; $sql_rech.=" AND b.fk_type = '".$db->escape($paiementtype)."'";
$param.='&paiementtype='.urlencode(GETPOST("paiementtype")); $param.='&paiementtype='.urlencode($paiementtype);
$mode_search = 1; $mode_search = 1;
} }
$sql = "SELECT count(*) as total"; $sql = "SELECT count(*) as total";
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account as ba"; $sql.= " FROM ".MAIN_DB_PREFIX."bank_account as ba";
$sql.= ", ".MAIN_DB_PREFIX."bank as b"; $sql.= ", ".MAIN_DB_PREFIX."bank as b";
@ -223,7 +224,7 @@ if ($id > 0 || ! empty($ref))
$sql.= " AND b.fk_account = ba.rowid"; $sql.= " AND b.fk_account = ba.rowid";
$sql.= " AND ba.entity = ".$conf->entity; $sql.= " AND ba.entity = ".$conf->entity;
$sql.= $sql_rech; $sql.= $sql_rech;
dol_syslog("account.php count transactions - sql=".$sql, LOG_DEBUG); dol_syslog("account.php count transactions - sql=".$sql, LOG_DEBUG);
$result=$db->query($sql); $result=$db->query($sql);
if ($result) if ($result)
@ -231,7 +232,7 @@ if ($id > 0 || ! empty($ref))
$obj = $db->fetch_object($result); $obj = $db->fetch_object($result);
$nbline = $obj->total; $nbline = $obj->total;
$total_lines = $nbline; $total_lines = $nbline;
$db->free($result); $db->free($result);
} }
else else
@ -241,7 +242,7 @@ if ($id > 0 || ! empty($ref))
//Total pages //Total pages
$totalPages = ceil($total_lines/$viewline); $totalPages = ceil($total_lines/$viewline);
if ($page > 0) if ($page > 0)
{ {
$limitsql = ($totalPages - $page) * $viewline; $limitsql = ($totalPages - $page) * $viewline;
@ -254,42 +255,43 @@ if ($id > 0 || ! empty($ref))
$limitsql = $nbline; $limitsql = $nbline;
} }
//print $limitsql.'-'.$page.'-'.$viewline; //print $limitsql.'-'.$page.'-'.$viewline;
// Onglets // Onglets
$head=bank_prepare_head($object); $head=bank_prepare_head($object);
dol_fiche_head($head,'journal',$langs->trans("FinancialAccount"),0,'account'); dol_fiche_head($head,'journal',$langs->trans("FinancialAccount"),0,'account');
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/index.php">'.$langs->trans("BackToList").'</a>'; $linkback = '<a href="'.DOL_URL_ROOT.'/compta/bank/index.php">'.$langs->trans("BackToList").'</a>';
// Ref // Ref
print '<tr><td valign="top" width="25%">'.$langs->trans("Ref").'</td>'; print '<tr><td valign="top" width="25%">'.$langs->trans("Ref").'</td>';
print '<td colspan="3">'; print '<td colspan="3">';
print $form->showrefnav($object, 'ref', $linkback, 1, 'ref'); print $form->showrefnav($object, 'ref', $linkback, 1, 'ref');
print '</td></tr>'; print '</td></tr>';
// Label // Label
print '<tr><td valign="top">'.$langs->trans("Label").'</td>'; print '<tr><td valign="top">'.$langs->trans("Label").'</td>';
print '<td colspan="3">'.$object->label.'</td></tr>'; print '<td colspan="3">'.$object->label.'</td></tr>';
print '</table>'; print '</table>';
print '<br>'; print '<br>';
dol_htmloutput_errors($mesg); dol_htmloutput_errors($mesg);
/** /**
* Search form * Search form
*/ */
$param.='&amp;account='.$object->id; $param.='&amp;account='.$object->id;
// Define transaction list navigation string // Define transaction list navigation string
$navig = '<form action="'.$_SERVER["PHP_SELF"].'" name="newpage" method="GET">'; $navig = '<form action="'.$_SERVER["PHP_SELF"].'" name="newpage" method="GET">';
//print 'nbpage='.$totalPages.' viewline='.$viewline.' limitsql='.$limitsql; //print 'nbpage='.$totalPages.' viewline='.$viewline.' limitsql='.$limitsql;
if ($limitsql > $viewline) $navig.='<a href="account.php?'.$param.'&amp;page='.($page+1).'">'.img_previous().'</a>'; if ($limitsql > $viewline) $navig.='<a href="account.php?'.$param.'&amp;page='.($page+1).'">'.img_previous().'</a>';
$navig.= $langs->trans("Page")." "; // ' Page '; $navig.= $langs->trans("Page")." "; // ' Page ';
$navig.='<input type="text" name="negpage" size="1" class="flat" value="'.($totalPages-$page).'">'; $navig.='<input type="text" name="negpage" size="1" class="flat" value="'.($totalPages-$page).'">';
$navig.='<input type="hidden" name="paiementtype" value="'.$paiementtype.'">';
$navig.='<input type="hidden" name="req_nb" value="'.$req_nb.'">'; $navig.='<input type="hidden" name="req_nb" value="'.$req_nb.'">';
$navig.='<input type="hidden" name="req_desc" value="'.GETPOST("req_desc").'">'; $navig.='<input type="hidden" name="req_desc" value="'.GETPOST("req_desc").'">';
$navig.='<input type="hidden" name="req_debit" value="'.GETPOST("req_debit").'">'; $navig.='<input type="hidden" name="req_debit" value="'.GETPOST("req_debit").'">';
@ -304,7 +306,7 @@ if ($id > 0 || ! empty($ref))
} }
$navig.='</form>'; $navig.='</form>';
//var_dump($navig); //var_dump($navig);
// Confirmation delete // Confirmation delete
if ($action == 'delete') if ($action == 'delete')
{ {
@ -312,15 +314,15 @@ if ($id > 0 || ! empty($ref))
$ret=$form->form_confirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;rowid='.$_GET["rowid"],$langs->trans('DeleteTransaction'),$text,'confirm_delete'); $ret=$form->form_confirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;rowid='.$_GET["rowid"],$langs->trans('DeleteTransaction'),$text,'confirm_delete');
if ($ret == 'html') print '<br>'; if ($ret == 'html') print '<br>';
} }
print '<table class="notopnoleftnoright" width="100%">'; print '<table class="notopnoleftnoright" width="100%">';
// Show title // Show title
if ($action != 'addline' && $action != 'delete') if ($action != 'addline' && $action != 'delete')
{ {
print '<tr><td colspan="9" align="right">'.$navig.'</td></tr>'; print '<tr><td colspan="9" align="right">'.$navig.'</td></tr>';
} }
// Form to add a transaction with no invoice // Form to add a transaction with no invoice
if ($user->rights->banque->modifier && $action == 'addline') if ($user->rights->banque->modifier && $action == 'addline')
{ {
@ -329,11 +331,11 @@ if ($id > 0 || ! empty($ref))
print '<input type="hidden" name="action" value="add">'; print '<input type="hidden" name="action" value="add">';
print '<input type="hidden" name="vline" value="'.$vline.'">'; print '<input type="hidden" name="vline" value="'.$vline.'">';
print '<input type="hidden" name="id" value="'.$object->id.'">'; print '<input type="hidden" name="id" value="'.$object->id.'">';
print '<tr>'; print '<tr>';
print '<td align="left" colspan="10"><b>'.$langs->trans("AddBankRecordLong").'</b></td>'; print '<td align="left" colspan="10"><b>'.$langs->trans("AddBankRecordLong").'</b></td>';
print '</tr>'; print '</tr>';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Date").'</td>'; print '<td>'.$langs->trans("Date").'</td>';
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
@ -344,7 +346,7 @@ if ($id > 0 || ! empty($ref))
print '<td align=right>'.$langs->trans("Credit").'</td>'; print '<td align=right>'.$langs->trans("Credit").'</td>';
print '<td colspan="2" align="center">&nbsp;</td>'; print '<td colspan="2" align="center">&nbsp;</td>';
print '</tr>'; print '</tr>';
print '<tr '.$bc[false].'>'; print '<tr '.$bc[false].'>';
print '<td nowrap="nowrap" colspan="2">'; print '<td nowrap="nowrap" colspan="2">';
$form->select_date($dateop,'op',0,0,0,'transaction'); $form->select_date($dateop,'op',0,0,0,'transaction');
@ -367,14 +369,14 @@ if ($id > 0 || ! empty($ref))
print '<input type="submit" name="cancel" class="button" value="'.$langs->trans("Cancel").'">'; print '<input type="submit" name="cancel" class="button" value="'.$langs->trans("Cancel").'">';
print '</td></tr>'; print '</td></tr>';
print "</form>"; print "</form>";
print '<tr class="noborder"><td colspan="8">&nbsp;</td></tr>'."\n"; print '<tr class="noborder"><td colspan="8">&nbsp;</td></tr>'."\n";
} }
/* /*
* Affiche tableau des transactions bancaires * Affiche tableau des transactions bancaires
*/ */
// Ligne de titre tableau des ecritures // Ligne de titre tableau des ecritures
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Date").'</td>'; print '<td>'.$langs->trans("Date").'</td>';
@ -390,19 +392,19 @@ if ($id > 0 || ! empty($ref))
if ($object->type != 2 && $object->rappro) print $langs->trans("AccountStatementShort"); if ($object->type != 2 && $object->rappro) print $langs->trans("AccountStatementShort");
else print '&nbsp;'; else print '&nbsp;';
print '</td></tr>'; print '</td></tr>';
print '<form action="'.$_SERVER["PHP_SELF"].'?'.$param.'" name="search" method="POST">'; print '<form action="'.$_SERVER["PHP_SELF"].'?'.$param.'" name="search" method="POST">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="search">'; print '<input type="hidden" name="action" value="search">';
print '<input type="hidden" name="id" value="'.$object->id.'">'; print '<input type="hidden" name="id" value="'.$object->id.'">';
print '<tr class="liste_titre">'; print '<tr class="liste_titre">';
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
print '<td>&nbsp;</td>'; print '<td>&nbsp;</td>';
print '<td>'; print '<td>';
//$filtertype=array('TIP'=>'TIP','PRE'=>'PRE',...) //$filtertype=array('TIP'=>'TIP','PRE'=>'PRE',...)
$filtertype=''; $filtertype='';
print $form->select_types_paiements($_REQUEST['paiementtype'],'paiementtype',$filtertype,2,1,1,8); print $form->select_types_paiements($paiementtype,'paiementtype',$filtertype,2,1,1,8);
print '</td>'; print '</td>';
print '<td><input type="text" class="flat" name="req_nb" value="'.$req_nb.'" size="2"></td>'; print '<td><input type="text" class="flat" name="req_nb" value="'.$req_nb.'" size="2"></td>';
print '<td><input type="text" class="flat" name="req_desc" value="'.GETPOST("req_desc").'" size="24"></td>'; print '<td><input type="text" class="flat" name="req_desc" value="'.GETPOST("req_desc").'" size="24"></td>';
@ -413,13 +415,13 @@ if ($id > 0 || ! empty($ref))
print '<td align="center" width="40"><input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'"></td>'; print '<td align="center" width="40"><input type="image" class="liste_titre" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'"></td>';
print "</tr>\n"; print "</tr>\n";
print "</form>\n"; print "</form>\n";
/* /*
* Another solution * Another solution
* create temporary table solde type=heap select amount from llx_bank limit 100 ; * create temporary table solde type=heap select amount from llx_bank limit 100 ;
* select sum(amount) from solde ; * select sum(amount) from solde ;
*/ */
$sql = "SELECT b.rowid, b.dateo as do, b.datev as dv,"; $sql = "SELECT b.rowid, b.dateo as do, b.datev as dv,";
$sql.= " b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_type"; $sql.= " b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_type";
if ($mode_search) if ($mode_search)
@ -429,11 +431,11 @@ if ($id > 0 || ! empty($ref))
/* /*
if ($mode_search && $conf->adherent->enabled) if ($mode_search && $conf->adherent->enabled)
{ {
} }
if ($mode_search && $conf->tax->enabled) if ($mode_search && $conf->tax->enabled)
{ {
} }
*/ */
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account as ba"; $sql.= " FROM ".MAIN_DB_PREFIX."bank_account as ba";
@ -460,22 +462,22 @@ if ($id > 0 || ! empty($ref))
$sql.= $sql_rech; $sql.= $sql_rech;
$sql.= $db->order("b.datev, b.datec", "ASC"); // We add date of creation to have correct order when everything is done the same day $sql.= $db->order("b.datev, b.datec", "ASC"); // We add date of creation to have correct order when everything is done the same day
$sql.= $db->plimit($limitsql, 0); $sql.= $db->plimit($limitsql, 0);
dol_syslog("account.php get transactions - sql=".$sql, LOG_DEBUG); dol_syslog("account.php get transactions - sql=".$sql, LOG_DEBUG);
$result = $db->query($sql); $result = $db->query($sql);
if ($result) if ($result)
{ {
$now=dol_now(); $now=dol_now();
$nows=dol_print_date($now,'%Y%m%d'); $nows=dol_print_date($now,'%Y%m%d');
//$form->load_cache_types_paiements(); //$form->load_cache_types_paiements();
//$form->cache_types_paiements //$form->cache_types_paiements
$var=true; $var=true;
$num = $db->num_rows($result); $num = $db->num_rows($result);
$i = 0; $total = 0; $sep = 0; $i = 0; $total = 0; $sep = 0;
while ($i < $num) while ($i < $num)
{ {
$objp = $db->fetch_object($result); $objp = $db->fetch_object($result);
@ -483,7 +485,7 @@ if ($id > 0 || ! empty($ref))
if ($i >= ($viewline * (($totalPages-$page)-1))) if ($i >= ($viewline * (($totalPages-$page)-1)))
{ {
$var=!$var; $var=!$var;
// Is it a transaction in future ? // Is it a transaction in future ?
$dos=dol_print_date($db->jdate($objp->do),'%Y%m%d'); $dos=dol_print_date($db->jdate($objp->do),'%Y%m%d');
//print "dos=".$dos." nows=".$nows; //print "dos=".$dos." nows=".$nows;
@ -497,26 +499,26 @@ if ($id > 0 || ! empty($ref))
print "<td>&nbsp;</td>"; print "<td>&nbsp;</td>";
print '</tr>'; print '</tr>';
} }
print '<tr '.$bc[$var].'>'; print '<tr '.$bc[$var].'>';
print '<td nowrap="nowrap">'.dol_print_date($db->jdate($objp->do),"day")."</td>\n"; print '<td nowrap="nowrap">'.dol_print_date($db->jdate($objp->do),"day")."</td>\n";
print '<td nowrap="nowrap">'.dol_print_date($db->jdate($objp->dv),"day"); print '<td nowrap="nowrap">'.dol_print_date($db->jdate($objp->dv),"day");
print "</td>\n"; print "</td>\n";
// Payment type // Payment type
print "<td nowrap>"; print "<td nowrap>";
$label=($langs->trans("PaymentTypeShort".$objp->fk_type)!="PaymentTypeShort".$objp->fk_type)?$langs->trans("PaymentTypeShort".$objp->fk_type):$objp->fk_type; $label=($langs->trans("PaymentTypeShort".$objp->fk_type)!="PaymentTypeShort".$objp->fk_type)?$langs->trans("PaymentTypeShort".$objp->fk_type):$objp->fk_type;
// $label=$langs->getTradFromKey("PaymentTypeShort".$objp->fk_type); // $label=$langs->getTradFromKey("PaymentTypeShort".$objp->fk_type);
if ($objp->fk_type == 'SOLD') $label='&nbsp;'; if ($objp->fk_type == 'SOLD') $label='&nbsp;';
print $label; print $label;
print "</td>\n"; print "</td>\n";
// Num // Num
print '<td nowrap>'.($objp->num_chq?$objp->num_chq:"")."</td>\n"; print '<td nowrap>'.($objp->num_chq?$objp->num_chq:"")."</td>\n";
// Description // Description
print '<td>'; print '<td>';
// Show generic description // Show generic description
@ -546,7 +548,7 @@ if ($id > 0 || ! empty($ref))
} }
else if ($links[$key]['type']=='company') else if ($links[$key]['type']=='company')
{ {
} }
else if ($links[$key]['type']=='payment_sc') else if ($links[$key]['type']=='payment_sc')
{ {
@ -568,11 +570,11 @@ if ($id > 0 || ! empty($ref))
} }
else if ($links[$key]['type']=='member') else if ($links[$key]['type']=='member')
{ {
} }
else if ($links[$key]['type']=='sc') else if ($links[$key]['type']=='sc')
{ {
} }
else else
{ {
@ -593,7 +595,7 @@ if ($id > 0 || ! empty($ref))
} }
} }
print '</td>'; print '</td>';
// Add third party column // Add third party column
print '<td>'; print '<td>';
foreach($links as $key=>$val) foreach($links as $key=>$val)
@ -628,7 +630,7 @@ if ($id > 0 || ! empty($ref))
} }
} }
print '</td>'; print '</td>';
// Amount // Amount
if ($objp->amount < 0) if ($objp->amount < 0)
{ {
@ -638,7 +640,7 @@ if ($id > 0 || ! empty($ref))
{ {
print '<td>&nbsp;</td><td align="right" nowrap="nowrap">&nbsp;'.price($objp->amount).'</td>'."\n"; print '<td>&nbsp;</td><td align="right" nowrap="nowrap">&nbsp;'.price($objp->amount).'</td>'."\n";
} }
// Balance // Balance
if ($action != 'search') if ($action != 'search')
{ {
@ -655,7 +657,7 @@ if ($id > 0 || ! empty($ref))
{ {
print '<td align="right">-</td>'; print '<td align="right">-</td>';
} }
// Transaction reconciliated or edit link // Transaction reconciliated or edit link
if ($objp->rappro && $object->canBeConciliated() > 0) // If line not conciliated and account can be conciliated if ($objp->rappro && $object->canBeConciliated() > 0) // If line not conciliated and account can be conciliated
{ {
@ -698,13 +700,13 @@ if ($id > 0 || ! empty($ref))
} }
print '</td>'; print '</td>';
} }
print "</tr>"; print "</tr>";
} }
$i++; $i++;
} }
// Show total // Show total
if ($page == 0 && ! $mode_search) if ($page == 0 && ! $mode_search)
{ {
@ -722,19 +724,19 @@ if ($id > 0 || ! empty($ref))
{ {
dol_print_error($db); dol_print_error($db);
} }
print "</table>"; print "</table>";
print "\n</div>\n"; print "\n</div>\n";
/* /*
* Boutons actions * Boutons actions
*/ */
if ($action != 'delete') if ($action != 'delete')
{ {
print '<div class="tabsAction">'; print '<div class="tabsAction">';
if ($object->type != 2 && $object->rappro) // If not cash account and can be reconciliate if ($object->type != 2 && $object->rappro) // If not cash account and can be reconciliate
{ {
if ($user->rights->banque->consolidate) if ($user->rights->banque->consolidate)
@ -746,7 +748,7 @@ if ($id > 0 || ! empty($ref))
print '<a class="butActionRefused" title="'.$langs->trans("NotEnoughPermissions").'" href="#">'.$langs->trans("Conciliate").'</a>'; print '<a class="butActionRefused" title="'.$langs->trans("NotEnoughPermissions").'" href="#">'.$langs->trans("Conciliate").'</a>';
} }
} }
if ($action != 'addline') if ($action != 'addline')
{ {
if ($user->rights->banque->modifier) if ($user->rights->banque->modifier)
@ -758,10 +760,10 @@ if ($id > 0 || ! empty($ref))
print '<a class="butActionRefused" title="'.$langs->trans("NotEnoughPermissions").'" href="#">'.$langs->trans("AddBankRecord").'</a>'; print '<a class="butActionRefused" title="'.$langs->trans("NotEnoughPermissions").'" href="#">'.$langs->trans("AddBankRecord").'</a>';
} }
} }
print '</div>'; print '</div>';
} }
print '<br>'; print '<br>';
} }
else else