mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Debug v14
This commit is contained in:
parent
37fa8f4c19
commit
754b0e9853
|
|
@ -385,7 +385,7 @@ if ($action == 'create') {
|
|||
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("BankAccountCountry").'</td>';
|
||||
print '<td>';
|
||||
print $form->select_country($selectedcode, 'account_country_id');
|
||||
print img_picto('', 'country', 'class="pictofixedwidth"').$form->select_country($selectedcode, 'account_country_id');
|
||||
if ($user->admin) {
|
||||
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||
}
|
||||
|
|
@ -883,7 +883,7 @@ if ($action == 'create') {
|
|||
|
||||
print '<tr><td class="fieldrequired">'.$langs->trans("Country").'</td>';
|
||||
print '<td class="maxwidth200onsmartphone">';
|
||||
print $form->select_country($selectedcode, 'account_country_id');
|
||||
print img_picto('', 'country', 'class="pictofixedwidth"').$form->select_country($selectedcode, 'account_country_id');
|
||||
if ($user->admin) {
|
||||
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,8 +95,8 @@ if (!$sortorder) {
|
|||
|
||||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
|
||||
$object = new Account($db);
|
||||
$hookmanager->initHooks(array('bankaccountlist'));
|
||||
$extrafields = new ExtraFields($db);
|
||||
$hookmanager->initHooks(array('bankaccountlist'));
|
||||
|
||||
// fetch optionals attributes and labels
|
||||
$extrafields->fetch_name_optionals_label($object->table_element);
|
||||
|
|
@ -129,6 +129,8 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php';
|
|||
$object->fields = dol_sort_array($object->fields, 'position');
|
||||
$arrayfields = dol_sort_array($arrayfields, 'position');
|
||||
|
||||
$permissiontoadd = $user->rights->banque->modifier;
|
||||
$permissiontodelete = $user->rights->banque->supprimer;
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
|
@ -162,7 +164,6 @@ if (empty($reshook)) {
|
|||
// Mass actions
|
||||
$objectclass = 'Account';
|
||||
$objectlabel = 'FinancialAccount';
|
||||
$permissiontoadd = $user->rights->banque->modifier;
|
||||
$uploaddir = $conf->banque->dir_output;
|
||||
include DOL_DOCUMENT_ROOT . '/core/actions_massactions.inc.php';
|
||||
}
|
||||
|
|
@ -287,13 +288,17 @@ if ($optioncss != '') {
|
|||
}
|
||||
// Add $param from extra fields
|
||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
|
||||
// Add $param from hooks
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
$param .= $hookmanager->resPrint;
|
||||
|
||||
// List of mass actions available
|
||||
$arrayofmassactions = array(
|
||||
// 'presend'=>img_picto('', 'email').$langs->trans("SendByMail"),
|
||||
// 'builddoc'=>img_picto('', 'pdf').$langs->trans("PDFMerge"),
|
||||
);
|
||||
if ($user->rights->banque->supprimer) {
|
||||
if ($permissiontodelete) {
|
||||
$arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"').$langs->trans("Delete");
|
||||
}
|
||||
if ($user->rights->banque->modifier) {
|
||||
|
|
@ -304,10 +309,7 @@ if (in_array($massaction, array('presend', 'predelete','preaffecttag'))) {
|
|||
}
|
||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewFinancialAccount'), '', 'fa fa-plus-circle', 'card.php?action=create', '', $user->rights->banque->configurer);
|
||||
|
||||
// Lines of title fields
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
if ($optioncss != '') {
|
||||
print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
}
|
||||
|
|
@ -316,9 +318,13 @@ print '<input type="hidden" name="formfilteraction" id="formfilteraction" value=
|
|||
print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="search_status" value="'.$search_status.'">';
|
||||
|
||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewFinancialAccount'), '', 'fa fa-plus-circle', 'card.php?action=create', '', $user->rights->banque->configurer);
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'bank_account', 0, $newcardbutton, '', $limit, 1);
|
||||
|
||||
$topicmail = "Information";
|
||||
|
|
@ -342,7 +348,7 @@ if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) {
|
|||
|
||||
// Bank accounts
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook)) {
|
||||
$moreforfilter .= $hookmanager->resPrint;
|
||||
} else {
|
||||
|
|
@ -357,11 +363,14 @@ if (!empty($moreforfilter)) {
|
|||
|
||||
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
||||
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
|
||||
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
|
||||
print '<tr class="liste_titre_filter">';
|
||||
// Fields title search
|
||||
// --------------------------------------------------------------------
|
||||
print '<tr class="liste_titre">';
|
||||
|
||||
// Ref
|
||||
if (!empty($arrayfields['b.ref']['checked'])) {
|
||||
|
|
@ -411,7 +420,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
|
|||
|
||||
// Fields from hook
|
||||
$parameters = array('arrayfields'=>$arrayfields);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook
|
||||
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Date creation
|
||||
if (!empty($arrayfields['b.datec']['checked'])) {
|
||||
|
|
@ -438,13 +447,14 @@ if (!empty($arrayfields['balance']['checked'])) {
|
|||
print '<td class="liste_titre"></td>';
|
||||
}
|
||||
// Action column
|
||||
print '<td class="liste_titre valignmiddle">';
|
||||
$searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1);
|
||||
print '<td class="liste_titre maxwidthsearch">';
|
||||
$searchpicto = $form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
// Fields title
|
||||
// Fields title label
|
||||
// --------------------------------------------------------------------
|
||||
print '<tr class="liste_titre">';
|
||||
if (!empty($arrayfields['b.ref']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['b.ref']['label'], $_SERVER["PHP_SELF"], 'b.ref', '', $param, '', $sortfield, $sortorder);
|
||||
|
|
@ -672,7 +682,9 @@ foreach ($accounts as $key => $type) {
|
|||
// Balance
|
||||
if (!empty($arrayfields['balance']['checked'])) {
|
||||
print '<td class="nowraponall right">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/bank/bankentries_list.php?id='.$objecttmp->id.'">'.price($solde, 0, $langs, 1, -1, -1, $objecttmp->currency_code).'</a>';
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/bank/bankentries_list.php?id='.$objecttmp->id.'">';
|
||||
print '<span class="amount">'.price($solde, 0, $langs, 1, -1, -1, $objecttmp->currency_code).'</span>';
|
||||
print '</a>';
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
|
|
|
|||
|
|
@ -269,10 +269,12 @@ print '<td style="display:none" class="multicurrency">'.$langs->trans("AmountToO
|
|||
print '</tr>';
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print img_picto('', 'bank_account', 'class="paddingright"');
|
||||
$form->select_comptes($account_from, 'account_from', 0, '', 1, '', empty($conf->multicurrency->enabled) ? 0 : 1);
|
||||
print "</td>";
|
||||
|
||||
print "<td>\n";
|
||||
print img_picto('', 'bank_account', 'class="paddingright"');
|
||||
$form->select_comptes($account_to, 'account_to', 0, '', 1, '', empty($conf->multicurrency->enabled) ? 0 : 1);
|
||||
print "</td>\n";
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user