forked from Wavyzz/dolibarr
Work on 6.0 look and feel
This commit is contained in:
@@ -1243,9 +1243,10 @@ class Account extends CommonObject
|
|||||||
*
|
*
|
||||||
* @param int $withpicto Include picto into link
|
* @param int $withpicto Include picto into link
|
||||||
* @param string $mode ''=Link to card, 'transactions'=Link to transactions card
|
* @param string $mode ''=Link to card, 'transactions'=Link to transactions card
|
||||||
|
* @param string $option ''=Show ref, 'reflabel'=Show ref+label
|
||||||
* @return string Chaine avec URL
|
* @return string Chaine avec URL
|
||||||
*/
|
*/
|
||||||
function getNomUrl($withpicto=0, $mode='')
|
function getNomUrl($withpicto=0, $mode='', $option='')
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
@@ -1279,7 +1280,7 @@ class Account extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($withpicto) $result.=($link.img_object($label, 'account', 'class="classfortooltip"').$linkend.' ');
|
if ($withpicto) $result.=($link.img_object($label, 'account', 'class="classfortooltip"').$linkend.' ');
|
||||||
$result.=$link.$this->ref.$linkend;
|
$result.=$link.$this->ref.($option == 'reflabel' && $this->label ? ' - '.$this->label : '').$linkend;
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -293,7 +293,7 @@ if ($result)
|
|||||||
// Bank account
|
// Bank account
|
||||||
print '<tr><td class="titlefield">'.$langs->trans("Account").'</td>';
|
print '<tr><td class="titlefield">'.$langs->trans("Account").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $acct->getNomUrl(1,'transactions');
|
print $acct->getNomUrl(1,'transactions','reflabel');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ $action=GETPOST('action', 'alpha');
|
|||||||
$id=GETPOST('account');
|
$id=GETPOST('account');
|
||||||
$ref=GETPOST('ref');
|
$ref=GETPOST('ref');
|
||||||
$dvid=GETPOST('dvid');
|
$dvid=GETPOST('dvid');
|
||||||
$num=GETPOST('num');
|
$numref=GETPOST('num');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$fieldid = (! empty($ref)?$ref:$id);
|
$fieldid = (! empty($ref)?$ref:$id);
|
||||||
@@ -116,7 +116,7 @@ if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
|
|||||||
if ($id > 0) $param.='&id='.urlencode($id);
|
if ($id > 0) $param.='&id='.urlencode($id);
|
||||||
|
|
||||||
|
|
||||||
if (empty($num))
|
if (empty($numref))
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Vue liste tous releves confondus
|
* Vue liste tous releves confondus
|
||||||
@@ -176,14 +176,14 @@ if (empty($num))
|
|||||||
while ($i < min($numrows,$conf->liste_limit))
|
while ($i < min($numrows,$conf->liste_limit))
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object($result);
|
$objp = $db->fetch_object($result);
|
||||||
$var=!$var;
|
|
||||||
if (! isset($objp->numr))
|
if (! isset($objp->numr))
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<tr '.$bc[$var].'><td><a href="releve.php?num='.$objp->numr.'&account='.$object->id.'">'.$objp->numr.'</a></td>';
|
print '<tr class="oddeven"><td><a href="releve.php?num='.$objp->numr.'&account='.$object->id.'">'.$objp->numr.'</a></td>';
|
||||||
|
|
||||||
// Calculate start amount
|
// Calculate start amount
|
||||||
$sql = "SELECT sum(b.amount) as amount";
|
$sql = "SELECT sum(b.amount) as amount";
|
||||||
@@ -240,7 +240,7 @@ else
|
|||||||
// Recherche valeur pour num = numero releve precedent
|
// Recherche valeur pour num = numero releve precedent
|
||||||
$sql = "SELECT DISTINCT(b.num_releve) as num";
|
$sql = "SELECT DISTINCT(b.num_releve) as num";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b";
|
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b";
|
||||||
$sql.= " WHERE b.num_releve < '".$db->escape($num)."'";
|
$sql.= " WHERE b.num_releve < '".$db->escape($numref)."'";
|
||||||
$sql.= " AND b.fk_account = ".$object->id;
|
$sql.= " AND b.fk_account = ".$object->id;
|
||||||
$sql.= " ORDER BY b.num_releve DESC";
|
$sql.= " ORDER BY b.num_releve DESC";
|
||||||
|
|
||||||
@@ -252,7 +252,7 @@ else
|
|||||||
if ($numrows > 0)
|
if ($numrows > 0)
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
$num = $obj->num;
|
$numref = $obj->num;
|
||||||
$found=true;
|
$found=true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -262,7 +262,7 @@ else
|
|||||||
// Recherche valeur pour num = numero releve precedent
|
// Recherche valeur pour num = numero releve precedent
|
||||||
$sql = "SELECT DISTINCT(b.num_releve) as num";
|
$sql = "SELECT DISTINCT(b.num_releve) as num";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b";
|
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b";
|
||||||
$sql.= " WHERE b.num_releve > '".$db->escape($num)."'";
|
$sql.= " WHERE b.num_releve > '".$db->escape($numref)."'";
|
||||||
$sql.= " AND b.fk_account = ".$object->id;
|
$sql.= " AND b.fk_account = ".$object->id;
|
||||||
$sql.= " ORDER BY b.num_releve ASC";
|
$sql.= " ORDER BY b.num_releve ASC";
|
||||||
|
|
||||||
@@ -274,7 +274,7 @@ else
|
|||||||
if ($numrows > 0)
|
if ($numrows > 0)
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
$num = $obj->num;
|
$numref = $obj->num;
|
||||||
$found=true;
|
$found=true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -286,13 +286,16 @@ else
|
|||||||
|
|
||||||
$mesprevnext='';
|
$mesprevnext='';
|
||||||
$mesprevnext.='<div class="pagination"><ul>';
|
$mesprevnext.='<div class="pagination"><ul>';
|
||||||
$mesprevnext.='<li class="pagination"><a data-role="button" data-icon="arrow-l" data-iconpos="left" href="'.$_SERVER["PHP_SELF"].'?rel=prev&num='.$num.'&ve='.$ve.'&account='.$object->id.'"><</a></li>';
|
$mesprevnext.='<li class="pagination"><a class="paginationnext" href="'.$_SERVER["PHP_SELF"].'?rel=prev&num='.$numref.'&ve='.$ve.'&account='.$object->id.'"><i class="fa fa-chevron-left" title="'.dol_escape_htmltag($langs->trans("Previous")).'"></i></a></li>';
|
||||||
//$mesprevnext.=' ';
|
//$mesprevnext.=' ';
|
||||||
$mesprevnext.='<li class="pagination"><span class="active">'.$langs->trans("AccountStatement")." ".$num.'</span></li>';
|
$mesprevnext.='<li class="pagination"><span class="active">'.$langs->trans("AccountStatement")." ".$numref.'</span></li>';
|
||||||
//$mesprevnext.=' ';
|
//$mesprevnext.=' ';
|
||||||
$mesprevnext.='<li class="pagination"><a data-role="button" data-icon="arrow-r" data-iconpos="right" href="'.$_SERVER["PHP_SELF"].'?rel=next&num='.$num.'&ve='.$ve.'&account='.$object->id.'">></a></li>';
|
$mesprevnext.='<li class="pagination"><a class="paginationnext" href="'.$_SERVER["PHP_SELF"].'?rel=next&num='.$numref.'&ve='.$ve.'&account='.$object->id.'"><i class="fa fa-chevron-right" title="'.dol_escape_htmltag($langs->trans("Next")).'"></i></a></li>';
|
||||||
$mesprevnext.='</ul></div>';
|
$mesprevnext.='</ul></div>';
|
||||||
print load_fiche_titre($langs->trans("AccountStatement").' '.$num.', '.$langs->trans("BankAccount").' : '.$object->getNomUrl(0, 'receipts'), $mesprevnext, 'title_bank.png');
|
|
||||||
|
$title=$langs->trans("AccountStatement").' '.$numref.', '.$langs->trans("BankAccount").' : '.$object->getNomUrl(0, 'receipts');
|
||||||
|
print load_fiche_titre($title, $mesprevnext, 'title_bank.png');
|
||||||
|
//print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, 0, $nbtotalofrecords, 'title_bank.png', 0, '', '', 0, 1);
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print "<form method=\"post\" action=\"releve.php\">";
|
print "<form method=\"post\" action=\"releve.php\">";
|
||||||
@@ -315,7 +318,7 @@ else
|
|||||||
// Calcul du solde de depart du releve
|
// Calcul du solde de depart du releve
|
||||||
$sql = "SELECT sum(b.amount) as amount";
|
$sql = "SELECT sum(b.amount) as amount";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b";
|
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b";
|
||||||
$sql.= " WHERE b.num_releve < '".$db->escape($num)."'";
|
$sql.= " WHERE b.num_releve < '".$db->escape($numref)."'";
|
||||||
$sql.= " AND b.fk_account = ".$object->id;
|
$sql.= " AND b.fk_account = ".$object->id;
|
||||||
|
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
@@ -335,8 +338,8 @@ else
|
|||||||
$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";
|
||||||
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'bordereau_cheque as bc ON bc.rowid=b.fk_bordereau';
|
$sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'bordereau_cheque as bc ON bc.rowid=b.fk_bordereau';
|
||||||
$sql.= " WHERE b.num_releve='".$db->escape($num)."'";
|
$sql.= " WHERE b.num_releve='".$db->escape($numref)."'";
|
||||||
if (!isset($num)) $sql.= " OR b.num_releve is null";
|
if (!isset($numref)) $sql.= " OR b.num_releve is null";
|
||||||
$sql.= " AND b.fk_account = ".$object->id;
|
$sql.= " AND b.fk_account = ".$object->id;
|
||||||
$sql.= " AND b.fk_account = ba.rowid";
|
$sql.= " AND b.fk_account = ba.rowid";
|
||||||
$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
|
||||||
@@ -368,9 +371,9 @@ else
|
|||||||
// Date de valeur
|
// Date de valeur
|
||||||
print '<td align="center" valign="center" class="nowrap">';
|
print '<td align="center" valign="center" class="nowrap">';
|
||||||
print dol_print_date($db->jdate($objp->dv),"day") .' ';
|
print dol_print_date($db->jdate($objp->dv),"day") .' ';
|
||||||
print '<a href="releve.php?action=dvprev&num='.$num.'&account='.$object->id.'&dvid='.$objp->rowid.'">';
|
print '<a href="releve.php?action=dvprev&num='.$numref.'&account='.$object->id.'&dvid='.$objp->rowid.'">';
|
||||||
print img_edit_remove() . "</a> ";
|
print img_edit_remove() . "</a> ";
|
||||||
print '<a href="releve.php?action=dvnext&num='.$num.'&account='.$object->id.'&dvid='.$objp->rowid.'">';
|
print '<a href="releve.php?action=dvnext&num='.$numref.'&account='.$object->id.'&dvid='.$objp->rowid.'">';
|
||||||
print img_edit_add() ."</a>";
|
print img_edit_add() ."</a>";
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
print '<a class="ajax" href="'.$_SERVER['PHP_SELF'].'?action=dvnext&account='.$objp->bankid.'&rowid='.$objp->rowid.'">';
|
print '<a class="ajax" href="'.$_SERVER['PHP_SELF'].'?action=dvnext&account='.$objp->bankid.'&rowid='.$objp->rowid.'">';
|
||||||
|
|||||||
@@ -3347,20 +3347,20 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so
|
|||||||
|
|
||||||
if ($cpt>=1)
|
if ($cpt>=1)
|
||||||
{
|
{
|
||||||
$pagelist.= '<li'.(($conf->dol_use_jmobile != 4)?' class="pagination"':'').'><a '.(($conf->dol_use_jmobile != 4)?'':'data-role="button" ').'href="'.$file.'?page=0'.$options.'">1</a></li>';
|
$pagelist.= '<li'.(($conf->dol_use_jmobile != 4)?' class="pagination"':'').'><a href="'.$file.'?page=0'.$options.'">1</a></li>';
|
||||||
if ($cpt > 2) $pagelist.='<li'.(($conf->dol_use_jmobile != 4)?' class="pagination"':'').'><span '.(($conf->dol_use_jmobile != 4)?'class="inactive"':'data-role="button"').'>...</span></li>';
|
if ($cpt > 2) $pagelist.='<li'.(($conf->dol_use_jmobile != 4)?' class="pagination"':'').'><span '.(($conf->dol_use_jmobile != 4)?'class="inactive"':'').'>...</span></li>';
|
||||||
else if ($cpt == 2) $pagelist.='<li'.(($conf->dol_use_jmobile != 4)?' class="pagination"':'').'><a '.(($conf->dol_use_jmobile != 4)?'':'data-role="button" ').'href="'.$file.'?page=1'.$options.'">2</a></li>';
|
else if ($cpt == 2) $pagelist.='<li'.(($conf->dol_use_jmobile != 4)?' class="pagination"':'').'><a href="'.$file.'?page=1'.$options.'">2</a></li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if ($cpt==$page)
|
if ($cpt==$page)
|
||||||
{
|
{
|
||||||
$pagelist.= '<li'.(($conf->dol_use_jmobile != 4)?' class="pagination"':'').'><span '.(($conf->dol_use_jmobile != 4)?'class="active"':'data-role="button"').'>'.($page+1).'</span></li>';
|
$pagelist.= '<li'.(($conf->dol_use_jmobile != 4)?' class="pagination"':'').'><span '.(($conf->dol_use_jmobile != 4)?'class="active"':'').'>'.($page+1).'</span></li>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$pagelist.= '<li'.(($conf->dol_use_jmobile != 4)?' class="pagination"':'').'><a '.(($conf->dol_use_jmobile != 4)?'':'data-role="button" ').'href="'.$file.'?page='.$cpt.$options.'">'.($cpt+1).'</a></li>';
|
$pagelist.= '<li'.(($conf->dol_use_jmobile != 4)?' class="pagination"':'').'><a href="'.$file.'?page='.$cpt.$options.'">'.($cpt+1).'</a></li>';
|
||||||
}
|
}
|
||||||
$cpt++;
|
$cpt++;
|
||||||
}
|
}
|
||||||
@@ -3368,14 +3368,14 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so
|
|||||||
|
|
||||||
if ($cpt<$nbpages)
|
if ($cpt<$nbpages)
|
||||||
{
|
{
|
||||||
if ($cpt<$nbpages-2) $pagelist.= '<li'.(($conf->dol_use_jmobile != 4)?' class="pagination"':'').'><span '.(($conf->dol_use_jmobile != 4)?'class="inactive"':'data-role="button"').'>...</span></li>';
|
if ($cpt<$nbpages-2) $pagelist.= '<li'.(($conf->dol_use_jmobile != 4)?' class="pagination"':'').'><span '.(($conf->dol_use_jmobile != 4)?'class="inactive"':'').'>...</span></li>';
|
||||||
else if ($cpt == $nbpages-2) $pagelist.= '<li'.(($conf->dol_use_jmobile != 4)?' class="pagination"':'').'><a '.(($conf->dol_use_jmobile != 4)?'':'data-role="button" ').'href="'.$file.'?page='.($nbpages-2).$options.'">'.($nbpages - 1).'</a></li>';
|
else if ($cpt == $nbpages-2) $pagelist.= '<li'.(($conf->dol_use_jmobile != 4)?' class="pagination"':'').'><a href="'.$file.'?page='.($nbpages-2).$options.'">'.($nbpages - 1).'</a></li>';
|
||||||
$pagelist.= '<li'.(($conf->dol_use_jmobile != 4)?' class="pagination"':'').'><a '.(($conf->dol_use_jmobile != 4)?'':'data-role="button" ').'href="'.$file.'?page='.($nbpages-1).$options.'">'.$nbpages.'</a></li>';
|
$pagelist.= '<li'.(($conf->dol_use_jmobile != 4)?' class="pagination"':'').'><a href="'.$file.'?page='.($nbpages-1).$options.'">'.$nbpages.'</a></li>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$pagelist.= '<li'.(($conf->dol_use_jmobile != 4)?' class="pagination"':'').'><span '.(($conf->dol_use_jmobile != 4)?'class="active"':'data-role="button"').'>'.($page+1)."</li>";
|
$pagelist.= '<li'.(($conf->dol_use_jmobile != 4)?' class="pagination"':'').'><span '.(($conf->dol_use_jmobile != 4)?'class="active"':'').'>'.($page+1)."</li>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print_fleche_navigation($page, $file, $options, $nextpage, $pagelist, $morehtml, $savlimit, $totalnboflines, $hideselectlimit); // output the div and ul for previous/last completed with page numbers into $pagelist
|
print_fleche_navigation($page, $file, $options, $nextpage, $pagelist, $morehtml, $savlimit, $totalnboflines, $hideselectlimit); // output the div and ul for previous/last completed with page numbers into $pagelist
|
||||||
|
|||||||
@@ -2469,6 +2469,7 @@ div.pagination .disabled a:focus {
|
|||||||
}
|
}
|
||||||
div.pagination li.pagination .active {
|
div.pagination li.pagination .active {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
div.pagination li.paginationafterarrows {
|
div.pagination li.paginationafterarrows {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
|
|||||||
@@ -2533,6 +2533,7 @@ div.pagination .disabled a:focus {
|
|||||||
}
|
}
|
||||||
div.pagination li.pagination .active {
|
div.pagination li.pagination .active {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
div.pagination li.paginationafterarrows {
|
div.pagination li.paginationafterarrows {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
|
|||||||
Reference in New Issue
Block a user