Fix look and feel v7

This commit is contained in:
Laurent Destailleur 2018-02-08 16:41:50 +01:00
parent cc20a9d1d5
commit a200a7f149

View File

@ -383,12 +383,14 @@ if (dol_strlen($search_dv_start) > 0) $param .= '&search_start_dvmonth=' . GETPO
if (dol_strlen($search_dv_end) > 0) $param .= '&search_end_dvmonth=' . GETPOST('search_end_dvmonth', 'int') . '&search_end_dvday=' . GETPOST('search_end_dvday', 'int') . '&search_end_dvyear=' . GETPOST('search_end_dvyear', 'int');
if ($search_req_nb) $param.='&req_nb='.urlencode($search_req_nb);
if (GETPOST("thirdparty")) $param.='&thirdparty='.urlencode(GETPOST("thirdparty"));
if ($optioncss != '') $param.='&optioncss='.$optioncss;
if ($optioncss != '') $param.='&optioncss='.$optioncss;
// Add $param from extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
$options = array();
$buttonreconcile = '';
if ($id > 0 || ! empty($ref))
{
$title = $langs->trans("FinancialAccount").' - '.$langs->trans("Transactions");
@ -420,18 +422,19 @@ if ($id > 0 || ! empty($ref))
if ($action != 'reconcile')
{
print '<div class="tabsAction">';
//print '<div class="tabsAction">';
if ($object->canBeConciliated() > 0) {
if ($object->canBeConciliated() > 0)
{
// If not cash account and can be reconciliate
if ($user->rights->banque->consolidate) {
print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/bank/bankentries_list.php?action=reconcile&search_conciliated=0'.$param.'">'.$langs->trans("Conciliate").'</a>';
$buttonreconcile = '<a class="butAction" style="margin-bottom: 5px !important; margin-top: 5px !important" href="'.DOL_URL_ROOT.'/compta/bank/bankentries_list.php?action=reconcile&search_conciliated=0'.$param.'">'.$langs->trans("Conciliate").'</a>';
} else {
print '<a class="butActionRefused" title="'.$langs->trans("NotEnoughPermissions").'" href="#">'.$langs->trans("Conciliate").'</a>';
$buttonreconcile = '<a class="butActionRefused" style="margin-bottom: 5px !important; margin-top: 5px !important" title="'.$langs->trans("NotEnoughPermissions").'" href="#">'.$langs->trans("Conciliate").'</a>';
}
}
print '</div>';
//print '</div>';
}
}
else
@ -585,7 +588,7 @@ if ($resql)
$nbmax=15; // We accept to show last 15 receipts (so we can have more than one year)
$liste="";
$sql = "SELECT DISTINCT num_releve FROM ".MAIN_DB_PREFIX."bank";
$sql.= " WHERE fk_account=".$id." AND num_releve IS NOT NULL";
$sql.= " WHERE fk_account=".$object->id." AND num_releve IS NOT NULL";
$sql.= $db->order("num_releve","DESC");
$sql.= $db->plimit($nbmax+1);
print '<br><br>';
@ -614,17 +617,17 @@ if ($resql)
{
dol_print_error($db);
}
/**
* Using BANK_REPORT_LAST_NUM_RELEVE to automatically report last num (or not)
*/
if ($conf->global->BANK_REPORT_LAST_NUM_RELEVE == 1) {
print '
<script type="text/javascript">
$("#num_releve").val("' . $last_releve . '");
</script>
';
}
print '<br><br>';
// Using BANK_REPORT_LAST_NUM_RELEVE to automatically report last num (or not)
if ($conf->global->BANK_REPORT_LAST_NUM_RELEVE == 1)
{
print '
<script type="text/javascript">
$("#num_releve").val("' . $last_releve . '");
</script>
';
}
print '<br><br>';
}
// Form to add a transaction with no invoice
@ -721,11 +724,6 @@ if ($resql)
// Title
$bankcateg=new BankCateg($db);
$morehtml='<div class="inline-block">';
$morehtml.= '<label for="pageplusone">'.$langs->trans("Page")."</label> "; // ' Page ';
$morehtml.='<input type="text" name="pageplusone" id="pageplusone" class="flat right width25" value="'.($page+1).'">';
$morehtml.='/'.$nbtotalofpages.' ';
$morehtml.='</div>';
$addbutton = '';
if ($action != 'addline' && $action != 'reconcile')
@ -754,6 +752,18 @@ if ($resql)
$addbutton = '<a class="butActionRefused" title="'.$langs->trans("FeatureDisabled").'" href="#">'.$langs->trans("AddBankRecord").'</a>';
}
}
$morehtml='<div class="inline-block '.(($buttonreconcile || $addbutton)?'marginrightonly':'').'">';
$morehtml.= '<label for="pageplusone">'.$langs->trans("Page")."</label> "; // ' Page ';
$morehtml.='<input type="text" name="pageplusone" id="pageplusone" class="flat right width25" value="'.($page+1).'">';
$morehtml.='/'.$nbtotalofpages.' ';
$morehtml.='</div>';
if ($action != 'addline' && $action != 'reconcile')
{
$morehtml.=$buttonreconcile;
}
$morehtml.=$addbutton;
$picto='title_bank';