kanban mode for list of banks
This commit is contained in:
parent
aea48e87de
commit
a68df8e9f5
@ -1748,6 +1748,39 @@ class Account extends CommonObject
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return clicable link of object (with eventually picto)
|
||||||
|
*
|
||||||
|
* @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
|
||||||
|
* @return string HTML Code for Kanban thumb.
|
||||||
|
*/
|
||||||
|
public function getKanbanView($option = '')
|
||||||
|
{
|
||||||
|
global $langs;
|
||||||
|
$return = '<div class="box-flex-item box-flex-grow-zero">';
|
||||||
|
$return .= '<div class="info-box info-box-sm">';
|
||||||
|
$return .= '<span class="info-box-icon bg-infobox-action">';
|
||||||
|
$return .= img_picto('', $this->picto);
|
||||||
|
$return .= '</span>';
|
||||||
|
$return .= '<div class="info-box-content">';
|
||||||
|
$return .= '<span class="info-box-ref">'.(method_exists($this, 'getNomUrl') ? $this->getNomUrl() : $this->ref).'</span>';
|
||||||
|
|
||||||
|
if (property_exists($this, 'type_lib')) {
|
||||||
|
$return .= '<br><span class="info-box-label opacitymedium" title="'.$this->type_lib[$this->type].'">'.substr($this->type_lib[$this->type], 0, 24).'...</span>';
|
||||||
|
}
|
||||||
|
if (method_exists($this, 'solde')) {
|
||||||
|
$return .= '<br><a href="'.DOL_URL_ROOT.'/compta/bank/bankentries_list.php?id='.$this->id.'">';
|
||||||
|
$return .= '<span class="opacitymedium">'.$langs->trans("Balance").'</span> : <span class="amount">'.price($this->solde(1), 0, $langs, 1, -1, -1, $this->currency_code).'</span>';
|
||||||
|
}
|
||||||
|
if (method_exists($this, 'getLibStatut')) {
|
||||||
|
$return .= '<br><div class="info-box-status margintoponly">'.$this->getLibStatut(5).'</div>';
|
||||||
|
}
|
||||||
|
$return .= '</div>';
|
||||||
|
$return .= '</div>';
|
||||||
|
$return .= '</div>';
|
||||||
|
return $return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -52,6 +52,7 @@ $show_files = GETPOST('show_files', 'int');
|
|||||||
$confirm = GETPOST('confirm', 'alpha');
|
$confirm = GETPOST('confirm', 'alpha');
|
||||||
$toselect = GETPOST('toselect', 'array');
|
$toselect = GETPOST('toselect', 'array');
|
||||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'bankaccountlist'; // To manage different context of search
|
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'bankaccountlist'; // To manage different context of search
|
||||||
|
$mode = GETPOST('mode', 'alpha');
|
||||||
|
|
||||||
$search_ref = GETPOST('search_ref', 'alpha');
|
$search_ref = GETPOST('search_ref', 'alpha');
|
||||||
$search_label = GETPOST('search_label', 'alpha');
|
$search_label = GETPOST('search_label', 'alpha');
|
||||||
@ -305,6 +306,9 @@ llxHeader('', $title, $help_url);
|
|||||||
$arrayofselected = is_array($toselect) ? $toselect : array();
|
$arrayofselected = is_array($toselect) ? $toselect : array();
|
||||||
|
|
||||||
$param = '';
|
$param = '';
|
||||||
|
if (!empty($mode)) {
|
||||||
|
$param .= '&mode='.urlencode($mode);
|
||||||
|
}
|
||||||
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
|
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
|
||||||
$param .= '&contextpage='.urlencode($contextpage);
|
$param .= '&contextpage='.urlencode($contextpage);
|
||||||
}
|
}
|
||||||
@ -365,8 +369,13 @@ print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
|||||||
|
|
||||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||||
print '<input type="hidden" name="search_status" value="'.$search_status.'">';
|
print '<input type="hidden" name="search_status" value="'.$search_status.'">';
|
||||||
|
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||||
|
|
||||||
$newcardbutton = dolGetButtonTitle($langs->trans('NewFinancialAccount'), '', 'fa fa-plus-circle', 'card.php?action=create', '', $user->rights->banque->configurer);
|
|
||||||
|
$newcardbutton = '';
|
||||||
|
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
|
||||||
|
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
|
||||||
|
$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);
|
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'bank_account', 0, $newcardbutton, '', $limit, 1);
|
||||||
|
|
||||||
@ -584,224 +593,236 @@ foreach ($accounts as $key => $type) {
|
|||||||
$lastcurrencycode = $objecttmp->currency_code;
|
$lastcurrencycode = $objecttmp->currency_code;
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr class="oddeven">';
|
if ($mode == 'kanban') {
|
||||||
// Action column
|
if ($i == 0) {
|
||||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
print '<tr><td colspan="12">';
|
||||||
print '<td class="nowrap center">';
|
print '<div class="box-flex-container">';
|
||||||
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
}
|
||||||
$selected = 0;
|
// Output Kanban
|
||||||
if (in_array($objecttmp->id, $arrayofselected)) {
|
print $objecttmp->getKanbanView('');
|
||||||
$selected = 1;
|
if ($i == (min($num, $limit) - 1)) {
|
||||||
|
print '</div>';
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
print '<tr class="oddeven">';
|
||||||
|
// Action column
|
||||||
|
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
|
print '<td class="nowrap center">';
|
||||||
|
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||||
|
$selected = 0;
|
||||||
|
if (in_array($objecttmp->id, $arrayofselected)) {
|
||||||
|
$selected = 1;
|
||||||
|
}
|
||||||
|
print '<input id="cb'.$objecttmp->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$objecttmp->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||||
}
|
}
|
||||||
print '<input id="cb'.$objecttmp->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$objecttmp->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
// Ref
|
||||||
}
|
if (!empty($arrayfields['b.ref']['checked'])) {
|
||||||
// Ref
|
print '<td class="nowraponall">'.$objecttmp->getNomUrl(1).'</td>';
|
||||||
if (!empty($arrayfields['b.ref']['checked'])) {
|
if (!$i) {
|
||||||
print '<td class="nowraponall">'.$objecttmp->getNomUrl(1).'</td>';
|
$totalarray['nbfield']++;
|
||||||
if (!$i) {
|
|
||||||
$totalarray['nbfield']++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Label
|
|
||||||
if (!empty($arrayfields['b.label']['checked'])) {
|
|
||||||
print '<td class="tdoverflowmax200" title="'.dol_escape_htmltag($objecttmp->label).'">'.dol_escape_htmltag($objecttmp->label).'</td>';
|
|
||||||
if (!$i) {
|
|
||||||
$totalarray['nbfield']++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Account type
|
|
||||||
if (!empty($arrayfields['accountype']['checked'])) {
|
|
||||||
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($objecttmp->type_lib[$objecttmp->type]).'">';
|
|
||||||
print $objecttmp->type_lib[$objecttmp->type];
|
|
||||||
print '</td>';
|
|
||||||
if (!$i) {
|
|
||||||
$totalarray['nbfield']++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Number
|
|
||||||
if (!empty($arrayfields['b.number']['checked'])) {
|
|
||||||
print '<td>'.dol_escape_htmltag($objecttmp->number).'</td>';
|
|
||||||
if (!$i) {
|
|
||||||
$totalarray['nbfield']++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Account number
|
|
||||||
if (!empty($arrayfields['b.account_number']['checked'])) {
|
|
||||||
print '<td class="tdoverflowmax250">';
|
|
||||||
if (isModEnabled('accounting') && !empty($objecttmp->account_number)) {
|
|
||||||
$accountingaccount = new AccountingAccount($db);
|
|
||||||
$accountingaccount->fetch('', $objecttmp->account_number, 1);
|
|
||||||
print '<span title="'.dol_escape_htmltag($accountingaccount->account_number.' - '.$accountingaccount->label).'">';
|
|
||||||
print $accountingaccount->getNomUrl(0, 1, 1, '', 0);
|
|
||||||
print '</span>';
|
|
||||||
} else {
|
|
||||||
print '<span title="'.dol_escape_htmltag($objecttmp->account_number).'">'.$objecttmp->account_number.'</span>';
|
|
||||||
}
|
|
||||||
print '</td>';
|
|
||||||
if (!$i) {
|
|
||||||
$totalarray['nbfield']++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Accountancy journal
|
|
||||||
if (!empty($arrayfields['b.fk_accountancy_journal']['checked'])) {
|
|
||||||
print '<td class="tdoverflowmax125">';
|
|
||||||
if (isModEnabled('accounting')) {
|
|
||||||
if (empty($objecttmp->fk_accountancy_journal)) {
|
|
||||||
print img_warning($langs->trans("Mandatory"));
|
|
||||||
} else {
|
|
||||||
$accountingjournal = new AccountingJournal($db);
|
|
||||||
$accountingjournal->fetch($objecttmp->fk_accountancy_journal);
|
|
||||||
print $accountingjournal->getNomUrl(0, 1, 1, '', 1);
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
print '';
|
|
||||||
}
|
|
||||||
print '</td>';
|
|
||||||
if (!$i) {
|
|
||||||
$totalarray['nbfield']++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Currency
|
|
||||||
if (!empty($arrayfields['b.currency_code']['checked'])) {
|
|
||||||
print '<td class="center nowraponall">';
|
|
||||||
print $objecttmp->currency_code;
|
|
||||||
print '</td>';
|
|
||||||
if (!$i) {
|
|
||||||
$totalarray['nbfield']++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Transactions to reconcile
|
|
||||||
if (!empty($arrayfields['toreconcile']['checked'])) {
|
|
||||||
$conciliate = $objecttmp->canBeConciliated();
|
|
||||||
|
|
||||||
$labeltoshow = '';
|
|
||||||
if ($conciliate == -2) {
|
|
||||||
$labeltoshow = $langs->trans("CashAccount");
|
|
||||||
} elseif ($conciliate == -3) {
|
|
||||||
$labeltoshow = $langs->trans("Closed");
|
|
||||||
} elseif (empty($objecttmp->rappro)) {
|
|
||||||
$labeltoshow = $langs->trans("ConciliationDisabled");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<td class="center tdoverflowmax125"'.($labeltoshow ? ' title="'.dol_escape_htmltag($labeltoshow).'"' : '').'>';
|
// Label
|
||||||
if ($conciliate == -2) {
|
if (!empty($arrayfields['b.label']['checked'])) {
|
||||||
print '<span class="opacitymedium">'.$langs->trans("CashAccount").'</span>';
|
print '<td class="tdoverflowmax200" title="'.dol_escape_htmltag($objecttmp->label).'">'.dol_escape_htmltag($objecttmp->label).'</td>';
|
||||||
} elseif ($conciliate == -3) {
|
if (!$i) {
|
||||||
print '<span class="opacitymedium">'.$langs->trans("Closed").'</span>';
|
$totalarray['nbfield']++;
|
||||||
} elseif (empty($objecttmp->rappro)) {
|
}
|
||||||
print '<span class="opacitymedium">'.$langs->trans("ConciliationDisabled").'</span>';
|
}
|
||||||
} else {
|
|
||||||
$result = $objecttmp->load_board($user, $objecttmp->id);
|
// Account type
|
||||||
if (is_numeric($result) && $result < 0) {
|
if (!empty($arrayfields['accountype']['checked'])) {
|
||||||
setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
|
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($objecttmp->type_lib[$objecttmp->type]).'">';
|
||||||
} else {
|
print $objecttmp->type_lib[$objecttmp->type];
|
||||||
print '<a href="'.DOL_URL_ROOT.'/compta/bank/bankentries_list.php?action=reconcile&sortfield=b.datev,b.dateo,b.rowid&sortorder=asc,asc,asc&id='.$objecttmp->id.'&search_account='.$objecttmp->id.'&search_conciliated=0&contextpage=banktransactionlist">';
|
print '</td>';
|
||||||
print '<span class="badge badge-info classfortooltip" title="'.dol_htmlentities($langs->trans("TransactionsToConciliate")).'">';
|
if (!$i) {
|
||||||
print $result->nbtodo;
|
$totalarray['nbfield']++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Number
|
||||||
|
if (!empty($arrayfields['b.number']['checked'])) {
|
||||||
|
print '<td>'.dol_escape_htmltag($objecttmp->number).'</td>';
|
||||||
|
if (!$i) {
|
||||||
|
$totalarray['nbfield']++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Account number
|
||||||
|
if (!empty($arrayfields['b.account_number']['checked'])) {
|
||||||
|
print '<td class="tdoverflowmax250">';
|
||||||
|
if (isModEnabled('accounting') && !empty($objecttmp->account_number)) {
|
||||||
|
$accountingaccount = new AccountingAccount($db);
|
||||||
|
$accountingaccount->fetch('', $objecttmp->account_number, 1);
|
||||||
|
print '<span title="'.dol_escape_htmltag($accountingaccount->account_number.' - '.$accountingaccount->label).'">';
|
||||||
|
print $accountingaccount->getNomUrl(0, 1, 1, '', 0);
|
||||||
print '</span>';
|
print '</span>';
|
||||||
print '</a>';
|
} else {
|
||||||
if ($result->nbtodolate) {
|
print '<span title="'.dol_escape_htmltag($objecttmp->account_number).'">'.$objecttmp->account_number.'</span>';
|
||||||
print '<span title="'.dol_htmlentities($langs->trans("Late")).'" class="classfortooltip badge badge-danger marginleftonlyshort">';
|
}
|
||||||
print '<i class="fa fa-exclamation-triangle"></i> '.$result->nbtodolate;
|
print '</td>';
|
||||||
|
if (!$i) {
|
||||||
|
$totalarray['nbfield']++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Accountancy journal
|
||||||
|
if (!empty($arrayfields['b.fk_accountancy_journal']['checked'])) {
|
||||||
|
print '<td class="tdoverflowmax125">';
|
||||||
|
if (isModEnabled('accounting')) {
|
||||||
|
if (empty($objecttmp->fk_accountancy_journal)) {
|
||||||
|
print img_warning($langs->trans("Mandatory"));
|
||||||
|
} else {
|
||||||
|
$accountingjournal = new AccountingJournal($db);
|
||||||
|
$accountingjournal->fetch($objecttmp->fk_accountancy_journal);
|
||||||
|
print $accountingjournal->getNomUrl(0, 1, 1, '', 1);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
print '';
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
if (!$i) {
|
||||||
|
$totalarray['nbfield']++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Currency
|
||||||
|
if (!empty($arrayfields['b.currency_code']['checked'])) {
|
||||||
|
print '<td class="center nowraponall">';
|
||||||
|
print $objecttmp->currency_code;
|
||||||
|
print '</td>';
|
||||||
|
if (!$i) {
|
||||||
|
$totalarray['nbfield']++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Transactions to reconcile
|
||||||
|
if (!empty($arrayfields['toreconcile']['checked'])) {
|
||||||
|
$conciliate = $objecttmp->canBeConciliated();
|
||||||
|
|
||||||
|
$labeltoshow = '';
|
||||||
|
if ($conciliate == -2) {
|
||||||
|
$labeltoshow = $langs->trans("CashAccount");
|
||||||
|
} elseif ($conciliate == -3) {
|
||||||
|
$labeltoshow = $langs->trans("Closed");
|
||||||
|
} elseif (empty($objecttmp->rappro)) {
|
||||||
|
$labeltoshow = $langs->trans("ConciliationDisabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
print '<td class="center tdoverflowmax125"'.($labeltoshow ? ' title="'.dol_escape_htmltag($labeltoshow).'"' : '').'>';
|
||||||
|
if ($conciliate == -2) {
|
||||||
|
print '<span class="opacitymedium">'.$langs->trans("CashAccount").'</span>';
|
||||||
|
} elseif ($conciliate == -3) {
|
||||||
|
print '<span class="opacitymedium">'.$langs->trans("Closed").'</span>';
|
||||||
|
} elseif (empty($objecttmp->rappro)) {
|
||||||
|
print '<span class="opacitymedium">'.$langs->trans("ConciliationDisabled").'</span>';
|
||||||
|
} else {
|
||||||
|
$result = $objecttmp->load_board($user, $objecttmp->id);
|
||||||
|
if (is_numeric($result) && $result < 0) {
|
||||||
|
setEventMessages($objecttmp->error, $objecttmp->errors, 'errors');
|
||||||
|
} else {
|
||||||
|
print '<a href="'.DOL_URL_ROOT.'/compta/bank/bankentries_list.php?action=reconcile&sortfield=b.datev,b.dateo,b.rowid&sortorder=asc,asc,asc&id='.$objecttmp->id.'&search_account='.$objecttmp->id.'&search_conciliated=0&contextpage=banktransactionlist">';
|
||||||
|
print '<span class="badge badge-info classfortooltip" title="'.dol_htmlentities($langs->trans("TransactionsToConciliate")).'">';
|
||||||
|
print $result->nbtodo;
|
||||||
print '</span>';
|
print '</span>';
|
||||||
|
print '</a>';
|
||||||
|
if ($result->nbtodolate) {
|
||||||
|
print '<span title="'.dol_htmlentities($langs->trans("Late")).'" class="classfortooltip badge badge-danger marginleftonlyshort">';
|
||||||
|
print '<i class="fa fa-exclamation-triangle"></i> '.$result->nbtodolate;
|
||||||
|
print '</span>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Extra fields
|
|
||||||
if (is_array($objecttmp->array_options)) {
|
|
||||||
$obj = new stdClass();
|
|
||||||
foreach ($objecttmp->array_options as $k => $v) {
|
|
||||||
$obj->$k = $v;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
|
||||||
// Fields from hook
|
|
||||||
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $objecttmp, $action); // Note that $action and $objecttmpect may have been modified by hook
|
|
||||||
print $hookmanager->resPrint;
|
|
||||||
// Date creation
|
|
||||||
if (!empty($arrayfields['b.datec']['checked'])) {
|
|
||||||
print '<td class="center nowraponall">';
|
|
||||||
print dol_print_date($objecttmp->date_creation, 'dayhour');
|
|
||||||
print '</td>';
|
|
||||||
if (!$i) {
|
|
||||||
$totalarray['nbfield']++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Date modification
|
|
||||||
if (!empty($arrayfields['b.tms']['checked'])) {
|
|
||||||
print '<td class="center nowraponall">';
|
|
||||||
print dol_print_date($objecttmp->date_update, 'dayhour');
|
|
||||||
print '</td>';
|
|
||||||
if (!$i) {
|
|
||||||
$totalarray['nbfield']++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Status
|
|
||||||
if (!empty($arrayfields['b.clos']['checked'])) {
|
|
||||||
print '<td class="center">'.$objecttmp->getLibStatut(5).'</td>';
|
|
||||||
if (!$i) {
|
|
||||||
$totalarray['nbfield']++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 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.'">';
|
|
||||||
print '<span class="amount">'.price($solde, 0, $langs, 1, -1, -1, $objecttmp->currency_code).'</span>';
|
|
||||||
print '</a>';
|
|
||||||
print '</td>';
|
|
||||||
if (!$i) {
|
|
||||||
$totalarray['nbfield']++;
|
|
||||||
}
|
|
||||||
if (!$i) {
|
|
||||||
$totalarray['pos'][$totalarray['nbfield']] = 'balance';
|
|
||||||
}
|
|
||||||
$totalarray['val']['balance'] += $solde;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Action column
|
|
||||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
|
||||||
print '<td class="nowrap center">';
|
|
||||||
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
|
||||||
$selected = 0;
|
|
||||||
if (in_array($objecttmp->id, $arrayofselected)) {
|
|
||||||
$selected = 1;
|
|
||||||
}
|
}
|
||||||
print '<input id="cb'.$objecttmp->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$objecttmp->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
|
||||||
}
|
}
|
||||||
print '</td>';
|
|
||||||
}
|
|
||||||
if (!$i) {
|
|
||||||
$totalarray['nbfield']++;
|
|
||||||
}
|
|
||||||
|
|
||||||
print '</tr>';
|
// Extra fields
|
||||||
|
if (is_array($objecttmp->array_options)) {
|
||||||
|
$obj = new stdClass();
|
||||||
|
foreach ($objecttmp->array_options as $k => $v) {
|
||||||
|
$obj->$k = $v;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||||
|
// Fields from hook
|
||||||
|
$parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||||
|
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $objecttmp, $action); // Note that $action and $objecttmpect may have been modified by hook
|
||||||
|
print $hookmanager->resPrint;
|
||||||
|
// Date creation
|
||||||
|
if (!empty($arrayfields['b.datec']['checked'])) {
|
||||||
|
print '<td class="center nowraponall">';
|
||||||
|
print dol_print_date($objecttmp->date_creation, 'dayhour');
|
||||||
|
print '</td>';
|
||||||
|
if (!$i) {
|
||||||
|
$totalarray['nbfield']++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Date modification
|
||||||
|
if (!empty($arrayfields['b.tms']['checked'])) {
|
||||||
|
print '<td class="center nowraponall">';
|
||||||
|
print dol_print_date($objecttmp->date_update, 'dayhour');
|
||||||
|
print '</td>';
|
||||||
|
if (!$i) {
|
||||||
|
$totalarray['nbfield']++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (empty($total[$objecttmp->currency_code])) {
|
// Status
|
||||||
$total[$objecttmp->currency_code] = $solde;
|
if (!empty($arrayfields['b.clos']['checked'])) {
|
||||||
} else {
|
print '<td class="center">'.$objecttmp->getLibStatut(5).'</td>';
|
||||||
$total[$objecttmp->currency_code] += $solde;
|
if (!$i) {
|
||||||
|
$totalarray['nbfield']++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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.'">';
|
||||||
|
print '<span class="amount">'.price($solde, 0, $langs, 1, -1, -1, $objecttmp->currency_code).'</span>';
|
||||||
|
print '</a>';
|
||||||
|
print '</td>';
|
||||||
|
if (!$i) {
|
||||||
|
$totalarray['nbfield']++;
|
||||||
|
}
|
||||||
|
if (!$i) {
|
||||||
|
$totalarray['pos'][$totalarray['nbfield']] = 'balance';
|
||||||
|
}
|
||||||
|
$totalarray['val']['balance'] += $solde;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Action column
|
||||||
|
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
|
print '<td class="nowrap center">';
|
||||||
|
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||||
|
$selected = 0;
|
||||||
|
if (in_array($objecttmp->id, $arrayofselected)) {
|
||||||
|
$selected = 1;
|
||||||
|
}
|
||||||
|
print '<input id="cb'.$objecttmp->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$objecttmp->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||||
|
}
|
||||||
|
print '</td>';
|
||||||
|
}
|
||||||
|
if (!$i) {
|
||||||
|
$totalarray['nbfield']++;
|
||||||
|
}
|
||||||
|
|
||||||
|
print '</tr>';
|
||||||
|
|
||||||
|
if (empty($total[$objecttmp->currency_code])) {
|
||||||
|
$total[$objecttmp->currency_code] = $solde;
|
||||||
|
} else {
|
||||||
|
$total[$objecttmp->currency_code] += $solde;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user