Debug v18
This commit is contained in:
parent
81da38eb7f
commit
54bb784138
@ -1014,7 +1014,8 @@ print "</tr>\n";
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
$totalarray = array();
|
$totalarray = array();
|
||||||
$totalarray['nbfield'] = 0;
|
$totalarray['nbfield'] = 0;
|
||||||
while ($i < min($num, $limit)) {
|
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
||||||
|
while ($i < $maxinloop) {
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
|
|
||||||
$datefin = $db->jdate($obj->datefin);
|
$datefin = $db->jdate($obj->datefin);
|
||||||
|
|||||||
@ -502,7 +502,8 @@ print "</tr>\n";
|
|||||||
|
|
||||||
$totalarray = array();
|
$totalarray = array();
|
||||||
$totalarray['nbfield'] = 0;
|
$totalarray['nbfield'] = 0;
|
||||||
while ($i < min($num, $limit)) {
|
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
||||||
|
while ($i < $imaxinloop) {
|
||||||
$obj = $db->fetch_object($result);
|
$obj = $db->fetch_object($result);
|
||||||
|
|
||||||
$subscription->ref = $obj->crowid;
|
$subscription->ref = $obj->crowid;
|
||||||
@ -546,7 +547,7 @@ while ($i < min($num, $limit)) {
|
|||||||
}
|
}
|
||||||
// Output Kanban
|
// Output Kanban
|
||||||
print $subscription->getKanbanView('');
|
print $subscription->getKanbanView('');
|
||||||
if ($i == (min($num, $limit) - 1)) {
|
if ($i == ($imaxinloop - 1)) {
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1723,7 +1723,7 @@ if ($resql) {
|
|||||||
$objectstatic->author = $userstatic->getNomUrl(1);
|
$objectstatic->author = $userstatic->getNomUrl(1);
|
||||||
$objectstatic->fk_project = $projectstatic->getNomUrl(1);
|
$objectstatic->fk_project = $projectstatic->getNomUrl(1);
|
||||||
print $objectstatic->getKanbanView('');
|
print $objectstatic->getKanbanView('');
|
||||||
if ($i == (min($num, $limit) - 1)) {
|
if ($i == ($imaxinloop - 1)) {
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -574,6 +574,7 @@ $total = array();
|
|||||||
$found = 0;
|
$found = 0;
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$lastcurrencycode = '';
|
$lastcurrencycode = '';
|
||||||
|
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
||||||
|
|
||||||
foreach ($accounts as $key => $type) {
|
foreach ($accounts as $key => $type) {
|
||||||
if ($i >= $limit) {
|
if ($i >= $limit) {
|
||||||
@ -600,7 +601,7 @@ foreach ($accounts as $key => $type) {
|
|||||||
}
|
}
|
||||||
// Output Kanban
|
// Output Kanban
|
||||||
print $objecttmp->getKanbanView('');
|
print $objecttmp->getKanbanView('');
|
||||||
if ($i == (min($num, $limit) - 1)) {
|
if ($i == ($imaxinloop - 1)) {
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -85,9 +85,10 @@ $search_type_id = GETPOST('search_type_id', 'int');
|
|||||||
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
||||||
$sortorder = GETPOST('sortorder', 'aZ09comma');
|
$sortorder = GETPOST('sortorder', 'aZ09comma');
|
||||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||||
if (empty($page) || $page == -1) {
|
if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) {
|
||||||
|
// If $page is not defined, or '' or -1 or if we click on clear filters
|
||||||
$page = 0;
|
$page = 0;
|
||||||
} // If $page is not defined, or '' or -1
|
}
|
||||||
$offset = $limit * $page;
|
$offset = $limit * $page;
|
||||||
$pageprev = $page - 1;
|
$pageprev = $page - 1;
|
||||||
$pagenext = $page + 1;
|
$pagenext = $page + 1;
|
||||||
@ -174,6 +175,14 @@ $result = restrictedArea($user, 'banque', '', '', '');
|
|||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
if (GETPOST('cancel', 'alpha')) {
|
||||||
|
$action = 'list';
|
||||||
|
$massaction = '';
|
||||||
|
}
|
||||||
|
if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') {
|
||||||
|
$massaction = '';
|
||||||
|
}
|
||||||
|
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
if ($reshook < 0) {
|
if ($reshook < 0) {
|
||||||
@ -183,6 +192,23 @@ if ($reshook < 0) {
|
|||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
// Selection of new fields
|
// Selection of new fields
|
||||||
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
|
include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php';
|
||||||
|
|
||||||
|
// Purge search criteria
|
||||||
|
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers
|
||||||
|
foreach ($object->fields as $key => $val) {
|
||||||
|
$search[$key] = '';
|
||||||
|
if (preg_match('/^(date|timestamp|datetime)/', $val['type'])) {
|
||||||
|
$search[$key.'_dtstart'] = '';
|
||||||
|
$search[$key.'_dtend'] = '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$toselect = array();
|
||||||
|
$search_array_options = array();
|
||||||
|
}
|
||||||
|
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')
|
||||||
|
|| GETPOST('button_search_x', 'alpha') || GETPOST('button_search.x', 'alpha') || GETPOST('button_search', 'alpha')) {
|
||||||
|
$massaction = ''; // Protection to avoid mass action if we force a new search during a mass action confirmation
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -282,7 +308,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
|
if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller than paging size (filtering), goto and load page 0
|
||||||
$page = 0;
|
$page = 0;
|
||||||
$offset = 0;
|
$offset = 0;
|
||||||
}
|
}
|
||||||
@ -296,142 +322,146 @@ if ($limit) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql) {
|
if (!$resql) {
|
||||||
$num = $db->num_rows($resql);
|
dol_print_error($db);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
// Direct jump if only one record found
|
$num = $db->num_rows($resql);
|
||||||
if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all) {
|
|
||||||
|
// Direct jump if only one record found
|
||||||
|
if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all && !$page) {
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
$id = $obj->rowid;
|
$id = $obj->rowid;
|
||||||
header("Location: ".DOL_URL_ROOT.'/compta/bank/various_payment/card.php?id='.$id);
|
header("Location: ".DOL_URL_ROOT.'/compta/bank/various_payment/card.php?id='.$id);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
// must be place behind the last "header(...)" call
|
// must be place behind the last "header(...)" call
|
||||||
llxHeader('', $langs->trans("VariousPayments"));
|
llxHeader('', $langs->trans("VariousPayments"));
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$total = 0;
|
$total = 0;
|
||||||
|
|
||||||
$param = '';
|
$param = '';
|
||||||
if (!empty($mode)) {
|
if (!empty($mode)) {
|
||||||
$param .= '&mode='.urlencode($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);
|
||||||
}
|
}
|
||||||
if ($limit > 0 && $limit != $conf->liste_limit) {
|
if ($limit > 0 && $limit != $conf->liste_limit) {
|
||||||
$param .= '&limit='.urlencode($limit);
|
$param .= '&limit='.urlencode($limit);
|
||||||
}
|
}
|
||||||
if ($search_ref) {
|
if ($search_ref) {
|
||||||
$param .= '&search_ref='.urlencode($search_ref);
|
$param .= '&search_ref='.urlencode($search_ref);
|
||||||
}
|
}
|
||||||
if ($search_label) {
|
if ($search_label) {
|
||||||
$param .= '&search_label='.urlencode($search_label);
|
$param .= '&search_label='.urlencode($search_label);
|
||||||
}
|
}
|
||||||
if ($search_datep_start) {
|
if ($search_datep_start) {
|
||||||
$param .= '&search_datep_start='.urlencode($search_datep_start);
|
$param .= '&search_datep_start='.urlencode($search_datep_start);
|
||||||
}
|
}
|
||||||
if ($search_datep_end) {
|
if ($search_datep_end) {
|
||||||
$param .= '&search_datep_end='.urlencode($search_datep_end);
|
$param .= '&search_datep_end='.urlencode($search_datep_end);
|
||||||
}
|
}
|
||||||
if ($search_datev_start) {
|
if ($search_datev_start) {
|
||||||
$param .= '&search_datev_start='.urlencode($search_datev_start);
|
$param .= '&search_datev_start='.urlencode($search_datev_start);
|
||||||
}
|
}
|
||||||
if ($search_datev_end) {
|
if ($search_datev_end) {
|
||||||
$param .= '&search_datev_end='.urlencode($search_datev_end);
|
$param .= '&search_datev_end='.urlencode($search_datev_end);
|
||||||
}
|
}
|
||||||
if ($search_type_id > 0) {
|
if ($search_type_id > 0) {
|
||||||
$param .= '&search_type_id='.urlencode($search_type_id);
|
$param .= '&search_type_id='.urlencode($search_type_id);
|
||||||
}
|
}
|
||||||
if ($search_amount_deb) {
|
if ($search_amount_deb) {
|
||||||
$param .= '&search_amount_deb='.urlencode($search_amount_deb);
|
$param .= '&search_amount_deb='.urlencode($search_amount_deb);
|
||||||
}
|
}
|
||||||
if ($search_amount_cred) {
|
if ($search_amount_cred) {
|
||||||
$param .= '&search_amount_cred='.urlencode($search_amount_cred);
|
$param .= '&search_amount_cred='.urlencode($search_amount_cred);
|
||||||
}
|
}
|
||||||
if ($search_bank_account > 0) {
|
if ($search_bank_account > 0) {
|
||||||
$param .= '&search_account='.urlencode($search_bank_account);
|
$param .= '&search_account='.urlencode($search_bank_account);
|
||||||
}
|
}
|
||||||
if ($search_accountancy_account > 0) {
|
if ($search_accountancy_account > 0) {
|
||||||
$param .= '&search_accountancy_account='.urlencode($search_accountancy_account);
|
$param .= '&search_accountancy_account='.urlencode($search_accountancy_account);
|
||||||
}
|
}
|
||||||
if ($search_accountancy_subledger > 0) {
|
if ($search_accountancy_subledger > 0) {
|
||||||
$param .= '&search_accountancy_subledger='.urlencode($search_accountancy_subledger);
|
$param .= '&search_accountancy_subledger='.urlencode($search_accountancy_subledger);
|
||||||
}
|
}
|
||||||
if ($optioncss != '') {
|
if ($optioncss != '') {
|
||||||
$param .= '&optioncss='.urlencode($optioncss);
|
$param .= '&optioncss='.urlencode($optioncss);
|
||||||
}
|
}
|
||||||
|
|
||||||
$url = DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create';
|
$url = DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create';
|
||||||
if (!empty($socid)) {
|
if (!empty($socid)) {
|
||||||
$url .= '&socid='.urlencode($socid);
|
$url .= '&socid='.urlencode($socid);
|
||||||
}
|
}
|
||||||
$newcardbutton = '';
|
$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('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('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('MenuNewVariousPayment'), '', 'fa fa-plus-circle', $url, '', $user->rights->banque->modifier);
|
$newcardbutton .= dolGetButtonTitle($langs->trans('MenuNewVariousPayment'), '', 'fa fa-plus-circle', $url, '', $user->rights->banque->modifier);
|
||||||
|
|
||||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
|
|
||||||
if ($optioncss != '') {
|
if ($optioncss != '') {
|
||||||
print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||||
}
|
}
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||||
print '<input type="hidden" name="action" value="list">';
|
print '<input type="hidden" name="action" value="list">';
|
||||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||||
|
|
||||||
|
|
||||||
print_barre_liste($langs->trans("MenuVariousPayment"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'object_payment', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
print_barre_liste($langs->trans("MenuVariousPayment"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'object_payment', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||||
|
|
||||||
if ($search_all) {
|
if ($search_all) {
|
||||||
foreach ($fieldstosearchall as $key => $val) {
|
foreach ($fieldstosearchall as $key => $val) {
|
||||||
$fieldstosearchall[$key] = $langs->trans($val);
|
$fieldstosearchall[$key] = $langs->trans($val);
|
||||||
}
|
}
|
||||||
print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>';
|
print '<div class="divsearchfieldfilter">'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
||||||
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields
|
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields
|
||||||
$moreforfilter= '';
|
$moreforfilter= '';
|
||||||
|
|
||||||
print '<div class="div-table-responsive">';
|
print '<div class="div-table-responsive">';
|
||||||
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">';
|
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">';
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
|
|
||||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print '<td class="liste_titre maxwidthsearch">';
|
print '<td class="liste_titre maxwidthsearch">';
|
||||||
$searchpicto = $form->showFilterAndCheckAddButtons(0);
|
$searchpicto = $form->showFilterAndCheckAddButtons(0);
|
||||||
print $searchpicto;
|
print $searchpicto;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) {
|
if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) {
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
if ($arrayfields['ref']['checked']) {
|
if ($arrayfields['ref']['checked']) {
|
||||||
print '<td class="liste_titre left">';
|
print '<td class="liste_titre left">';
|
||||||
print '<input class="flat" type="text" size="3" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
|
print '<input class="flat" type="text" size="3" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Label
|
// Label
|
||||||
if ($arrayfields['label']['checked']) {
|
if ($arrayfields['label']['checked']) {
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<input type="text" class="flat" size="10" name="search_label" value="'.dol_escape_htmltag($search_label).'">';
|
print '<input type="text" class="flat" size="10" name="search_label" value="'.dol_escape_htmltag($search_label).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Payment date
|
// Payment date
|
||||||
if ($arrayfields['datep']['checked']) {
|
if ($arrayfields['datep']['checked']) {
|
||||||
print '<td class="liste_titre center">';
|
print '<td class="liste_titre center">';
|
||||||
print '<div class="nowrap">';
|
print '<div class="nowrap">';
|
||||||
print $form->selectDate($search_datep_start ? $search_datep_start : -1, 'search_date_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
|
print $form->selectDate($search_datep_start ? $search_datep_start : -1, 'search_date_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
|
||||||
@ -440,10 +470,10 @@ if ($resql) {
|
|||||||
print $form->selectDate($search_datep_end ? $search_datep_end : -1, 'search_date_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
|
print $form->selectDate($search_datep_end ? $search_datep_end : -1, 'search_date_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Value date
|
// Value date
|
||||||
if ($arrayfields['datev']['checked']) {
|
if ($arrayfields['datev']['checked']) {
|
||||||
print '<td class="liste_titre center">';
|
print '<td class="liste_titre center">';
|
||||||
print '<div class="nowrap">';
|
print '<div class="nowrap">';
|
||||||
print $form->selectDate($search_datev_start ? $search_datev_start : -1, 'search_date_value_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
|
print $form->selectDate($search_datev_start ? $search_datev_start : -1, 'search_date_value_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From'));
|
||||||
@ -452,142 +482,143 @@ if ($resql) {
|
|||||||
print $form->selectDate($search_datev_end ? $search_datev_end : -1, 'search_date_value_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
|
print $form->selectDate($search_datev_end ? $search_datev_end : -1, 'search_date_value_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to'));
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Payment type
|
// Payment type
|
||||||
if ($arrayfields['type']['checked']) {
|
if ($arrayfields['type']['checked']) {
|
||||||
print '<td class="liste_titre center">';
|
print '<td class="liste_titre center">';
|
||||||
print $form->select_types_paiements($search_type_id, 'search_type_id', '', 0, 1, 1, 16, 1, 'maxwidth100', 1);
|
print $form->select_types_paiements($search_type_id, 'search_type_id', '', 0, 1, 1, 16, 1, 'maxwidth100', 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Project
|
// Project
|
||||||
if ($arrayfields['project']['checked']) {
|
if ($arrayfields['project']['checked']) {
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
// TODO
|
// TODO
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bank account
|
// Bank account
|
||||||
if ($arrayfields['bank']['checked']) {
|
if ($arrayfields['bank']['checked']) {
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
$form->select_comptes($search_bank_account, 'search_account', 0, '', 1, '', 0, 'maxwidth100');
|
$form->select_comptes($search_bank_account, 'search_account', 0, '', 1, '', 0, 'maxwidth100');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bank entry
|
// Bank entry
|
||||||
if ($arrayfields['entry']['checked']) {
|
if ($arrayfields['entry']['checked']) {
|
||||||
print '<td class="liste_titre left">';
|
print '<td class="liste_titre left">';
|
||||||
print '<input name="search_bank_entry" class="flat maxwidth50" type="text" value="'.dol_escape_htmltag($search_bank_entry).'">';
|
print '<input name="search_bank_entry" class="flat maxwidth50" type="text" value="'.dol_escape_htmltag($search_bank_entry).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Accounting account
|
// Accounting account
|
||||||
if (!empty($arrayfields['account']['checked'])) {
|
if (!empty($arrayfields['account']['checked'])) {
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<div class="nowrap">';
|
print '<div class="nowrap">';
|
||||||
print $formaccounting->select_account($search_accountancy_account, 'search_accountancy_account', 1, array(), 1, 1, 'maxwidth200');
|
print $formaccounting->select_account($search_accountancy_account, 'search_accountancy_account', 1, array(), 1, 1, 'maxwidth200');
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Subledger account
|
// Subledger account
|
||||||
if (!empty($arrayfields['subledger']['checked'])) {
|
if (!empty($arrayfields['subledger']['checked'])) {
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
print '<div class="nowrap">';
|
print '<div class="nowrap">';
|
||||||
print $formaccounting->select_auxaccount($search_accountancy_subledger, 'search_accountancy_subledger', 1, 'maxwidth200');
|
print $formaccounting->select_auxaccount($search_accountancy_subledger, 'search_accountancy_subledger', 1, 'maxwidth200');
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Debit
|
// Debit
|
||||||
if (!empty($arrayfields['debit']['checked'])) {
|
if (!empty($arrayfields['debit']['checked'])) {
|
||||||
print '<td class="liste_titre right">';
|
print '<td class="liste_titre right">';
|
||||||
print '<input name="search_amount_deb" class="flat maxwidth50" type="text" value="'.dol_escape_htmltag($search_amount_deb).'">';
|
print '<input name="search_amount_deb" class="flat maxwidth50" type="text" value="'.dol_escape_htmltag($search_amount_deb).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Credit
|
// Credit
|
||||||
if ($arrayfields['credit']['checked']) {
|
if ($arrayfields['credit']['checked']) {
|
||||||
print '<td class="liste_titre right">';
|
print '<td class="liste_titre right">';
|
||||||
print '<input name="search_amount_cred" class="flat maxwidth50" type="text" size="8" value="'.dol_escape_htmltag($search_amount_cred).'">';
|
print '<input name="search_amount_cred" class="flat maxwidth50" type="text" size="8" value="'.dol_escape_htmltag($search_amount_cred).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print '<td class="liste_titre maxwidthsearch">';
|
print '<td class="liste_titre maxwidthsearch">';
|
||||||
$searchpicto = $form->showFilterAndCheckAddButtons(0);
|
$searchpicto = $form->showFilterAndCheckAddButtons(0);
|
||||||
print $searchpicto;
|
print $searchpicto;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
|
|
||||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'maxwidthsearch center ');
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'maxwidthsearch center ');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) {
|
if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) {
|
||||||
print_liste_field_titre('#', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder);
|
print_liste_field_titre('#', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($arrayfields['ref']['checked']) {
|
if ($arrayfields['ref']['checked']) {
|
||||||
print_liste_field_titre($arrayfields['ref']['label'], $_SERVER["PHP_SELF"], 'v.rowid', '', $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['ref']['label'], $_SERVER["PHP_SELF"], 'v.rowid', '', $param, '', $sortfield, $sortorder);
|
||||||
}
|
}
|
||||||
if ($arrayfields['label']['checked']) {
|
if ($arrayfields['label']['checked']) {
|
||||||
print_liste_field_titre($arrayfields['label']['label'], $_SERVER["PHP_SELF"], 'v.label', '', $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['label']['label'], $_SERVER["PHP_SELF"], 'v.label', '', $param, '', $sortfield, $sortorder);
|
||||||
}
|
}
|
||||||
if ($arrayfields['datep']['checked']) {
|
if ($arrayfields['datep']['checked']) {
|
||||||
print_liste_field_titre($arrayfields['datep']['label'], $_SERVER["PHP_SELF"], 'v.datep,v.rowid', '', $param, '', $sortfield, $sortorder, 'center ');
|
print_liste_field_titre($arrayfields['datep']['label'], $_SERVER["PHP_SELF"], 'v.datep,v.rowid', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||||
}
|
}
|
||||||
if ($arrayfields['datev']['checked']) {
|
if ($arrayfields['datev']['checked']) {
|
||||||
print_liste_field_titre($arrayfields['datev']['label'], $_SERVER["PHP_SELF"], 'v.datev,v.rowid', '', $param, '', $sortfield, $sortorder, 'center ');
|
print_liste_field_titre($arrayfields['datev']['label'], $_SERVER["PHP_SELF"], 'v.datev,v.rowid', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||||
}
|
}
|
||||||
if ($arrayfields['type']['checked']) {
|
if ($arrayfields['type']['checked']) {
|
||||||
print_liste_field_titre($arrayfields['type']['label'], $_SERVER["PHP_SELF"], 'type', '', $param, '', $sortfield, $sortorder, 'center ');
|
print_liste_field_titre($arrayfields['type']['label'], $_SERVER["PHP_SELF"], 'type', '', $param, '', $sortfield, $sortorder, 'center ');
|
||||||
}
|
}
|
||||||
if ($arrayfields['project']['checked']) {
|
if ($arrayfields['project']['checked']) {
|
||||||
print_liste_field_titre($arrayfields['project']['label'], $_SERVER["PHP_SELF"], 'fk_project', '', $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['project']['label'], $_SERVER["PHP_SELF"], 'fk_project', '', $param, '', $sortfield, $sortorder);
|
||||||
}
|
}
|
||||||
if ($arrayfields['bank']['checked']) {
|
if ($arrayfields['bank']['checked']) {
|
||||||
print_liste_field_titre($arrayfields['bank']['label'], $_SERVER["PHP_SELF"], 'ba.label', '', $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['bank']['label'], $_SERVER["PHP_SELF"], 'ba.label', '', $param, '', $sortfield, $sortorder);
|
||||||
}
|
}
|
||||||
if ($arrayfields['entry']['checked']) {
|
if ($arrayfields['entry']['checked']) {
|
||||||
print_liste_field_titre($arrayfields['entry']['label'], $_SERVER["PHP_SELF"], 'ba.label', '', $param, '', $sortfield, $sortorder);
|
print_liste_field_titre($arrayfields['entry']['label'], $_SERVER["PHP_SELF"], 'ba.label', '', $param, '', $sortfield, $sortorder);
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['account']['checked'])) {
|
if (!empty($arrayfields['account']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['account']['label'], $_SERVER["PHP_SELF"], 'v.accountancy_code', '', $param, '', $sortfield, $sortorder, 'left ');
|
print_liste_field_titre($arrayfields['account']['label'], $_SERVER["PHP_SELF"], 'v.accountancy_code', '', $param, '', $sortfield, $sortorder, 'left ');
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['subledger']['checked'])) {
|
if (!empty($arrayfields['subledger']['checked'])) {
|
||||||
print_liste_field_titre($arrayfields['subledger']['label'], $_SERVER["PHP_SELF"], 'v.subledger_account', '', $param, '', $sortfield, $sortorder, 'left ');
|
print_liste_field_titre($arrayfields['subledger']['label'], $_SERVER["PHP_SELF"], 'v.subledger_account', '', $param, '', $sortfield, $sortorder, 'left ');
|
||||||
}
|
}
|
||||||
if ($arrayfields['debit']['checked']) {
|
if ($arrayfields['debit']['checked']) {
|
||||||
print_liste_field_titre($arrayfields['debit']['label'], $_SERVER["PHP_SELF"], 'v.amount', '', $param, '', $sortfield, $sortorder, 'right ');
|
print_liste_field_titre($arrayfields['debit']['label'], $_SERVER["PHP_SELF"], 'v.amount', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||||
}
|
}
|
||||||
if ($arrayfields['credit']['checked']) {
|
if ($arrayfields['credit']['checked']) {
|
||||||
print_liste_field_titre($arrayfields['credit']['label'], $_SERVER["PHP_SELF"], 'v.amount', '', $param, '', $sortfield, $sortorder, 'right ');
|
print_liste_field_titre($arrayfields['credit']['label'], $_SERVER["PHP_SELF"], 'v.amount', '', $param, '', $sortfield, $sortorder, 'right ');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fields from hook
|
// Fields from hook
|
||||||
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);
|
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
|
|
||||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'maxwidthsearch center ');
|
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'maxwidthsearch center ');
|
||||||
}
|
}
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
|
|
||||||
$totalarray = array();
|
$totalarray = array();
|
||||||
$totalarray['nbfield'] = 0;
|
$totalarray['nbfield'] = 0;
|
||||||
$totalarray['val']['total_cred'] = 0;
|
$totalarray['val']['total_cred'] = 0;
|
||||||
$totalarray['val']['total_deb'] = 0;
|
$totalarray['val']['total_deb'] = 0;
|
||||||
|
|
||||||
while ($i < min($num, $limit)) {
|
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
||||||
|
while ($i < $imaxinloop) {
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
|
|
||||||
$variousstatic->id = $obj->rowid;
|
$variousstatic->id = $obj->rowid;
|
||||||
@ -608,17 +639,21 @@ if ($resql) {
|
|||||||
print '<div class="box-flex-container kanban">';
|
print '<div class="box-flex-container kanban">';
|
||||||
}
|
}
|
||||||
// Output Kanban
|
// Output Kanban
|
||||||
|
|
||||||
print $variousstatic->getKanbanView('');
|
print $variousstatic->getKanbanView('');
|
||||||
if ($i == (min($num, $limit) - 1)) {
|
if ($i == ($imaxinloop) - 1) {
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
print '<tr class="oddeven">';
|
// Show here line of result
|
||||||
|
$j = 0;
|
||||||
|
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
||||||
|
// Action column
|
||||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
|
if (!$i) {
|
||||||
|
$totalarray['nbfield']++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// No
|
// No
|
||||||
@ -772,21 +807,21 @@ if ($resql) {
|
|||||||
|
|
||||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print '<td></td>';
|
print '<td></td>';
|
||||||
}
|
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show total line
|
// Show total line
|
||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
|
||||||
|
|
||||||
// If no record found
|
// If no record found
|
||||||
if ($num == 0) {
|
if ($num == 0) {
|
||||||
$colspan = 1;
|
$colspan = 1;
|
||||||
foreach ($arrayfields as $key => $val) {
|
foreach ($arrayfields as $key => $val) {
|
||||||
if (!empty($val['checked'])) {
|
if (!empty($val['checked'])) {
|
||||||
@ -794,22 +829,19 @@ if ($resql) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>';
|
print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("NoRecordFound").'</span></td></tr>';
|
||||||
}
|
|
||||||
|
|
||||||
$db->free($resql);
|
|
||||||
|
|
||||||
$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
|
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object); // Note that $action and $object may have been modified by hook
|
|
||||||
print $hookmanager->resPrint;
|
|
||||||
|
|
||||||
print '</table>'."\n";
|
|
||||||
print '</div>'."\n";
|
|
||||||
|
|
||||||
print '</form>'."\n";
|
|
||||||
} else {
|
|
||||||
dol_print_error($db);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$db->free($resql);
|
||||||
|
|
||||||
|
$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql);
|
||||||
|
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||||
|
print $hookmanager->resPrint;
|
||||||
|
|
||||||
|
print '</table>'."\n";
|
||||||
|
print '</div>'."\n";
|
||||||
|
|
||||||
|
print '</form>'."\n";
|
||||||
|
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|||||||
@ -1928,7 +1928,7 @@ if ($resql) {
|
|||||||
$userstatic->fetch($obj->fk_user_author);
|
$userstatic->fetch($obj->fk_user_author);
|
||||||
$facturestatic->fk_user_author = $userstatic->getNomUrl(1);
|
$facturestatic->fk_user_author = $userstatic->getNomUrl(1);
|
||||||
print $facturestatic->getKanbanView('');
|
print $facturestatic->getKanbanView('');
|
||||||
if ($i == (min($num, $limit) - 1)) {
|
if ($i == ($imaxinloop - 1)) {
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,15 +28,19 @@ require_once DOL_DOCUMENT_ROOT.'/compta/localtax/class/localtax.class.php';
|
|||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->load("compta");
|
$langs->load("compta");
|
||||||
|
|
||||||
|
$limit = GETPOST('limit', 'int');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$socid = GETPOST('socid', 'int');
|
$socid = GETPOST('socid', 'int');
|
||||||
if ($user->socid) {
|
if ($user->socid) {
|
||||||
$socid = $user->socid;
|
$socid = $user->socid;
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = restrictedArea($user, 'tax', '', '', 'charges');
|
$result = restrictedArea($user, 'tax', '', '', 'charges');
|
||||||
$ltt = GETPOST("localTaxType", 'int');
|
$ltt = GETPOST("localTaxType", 'int');
|
||||||
$mode = GETPOST('mode', 'alpha');
|
$mode = GETPOST('mode', 'alpha');
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
@ -80,8 +84,9 @@ if ($result) {
|
|||||||
print '<td class="nowrap" align="left">'.$langs->trans("DatePayment").'</td>';
|
print '<td class="nowrap" align="left">'.$langs->trans("DatePayment").'</td>';
|
||||||
print "<td align=\"right\">".$langs->trans("PayedByThisPayment")."</td>";
|
print "<td align=\"right\">".$langs->trans("PayedByThisPayment")."</td>";
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$var = 1;
|
|
||||||
while ($i < $num) {
|
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
||||||
|
while ($i < $imaxinloop) {
|
||||||
$obj = $db->fetch_object($result);
|
$obj = $db->fetch_object($result);
|
||||||
|
|
||||||
$localtax_static->label = $obj->label;
|
$localtax_static->label = $obj->label;
|
||||||
@ -100,7 +105,7 @@ if ($result) {
|
|||||||
}
|
}
|
||||||
// Output Kanban
|
// Output Kanban
|
||||||
print $localtax_static->getKanbanView('');
|
print $localtax_static->getKanbanView('');
|
||||||
if ($i == ($num - 1)) {
|
if ($i == ($imaxinloop - 1)) {
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -226,7 +226,8 @@ if ($resql) {
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
if ($num > 0) {
|
if ($num > 0) {
|
||||||
while ($i < min($num, $limit)) {
|
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
||||||
|
while ($i < $imaxinloop) {
|
||||||
$objp = $db->fetch_object($resql);
|
$objp = $db->fetch_object($resql);
|
||||||
|
|
||||||
$checkdepositstatic->id = $objp->rowid;
|
$checkdepositstatic->id = $objp->rowid;
|
||||||
@ -247,7 +248,7 @@ if ($resql) {
|
|||||||
}
|
}
|
||||||
// Output Kanban
|
// Output Kanban
|
||||||
print $checkdepositstatic->getKanbanView('');
|
print $checkdepositstatic->getKanbanView('');
|
||||||
if ($i == (min($num, $limit) - 1)) {
|
if ($i == ($imaxinloop - 1)) {
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -265,7 +265,8 @@ if ($result) {
|
|||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
if ($num) {
|
if ($num) {
|
||||||
while ($i < min($num, $limit)) {
|
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
||||||
|
while ($i < $imaxinloop) {
|
||||||
$obj = $db->fetch_object($result);
|
$obj = $db->fetch_object($result);
|
||||||
|
|
||||||
$bon->id = $obj->rowid;
|
$bon->id = $obj->rowid;
|
||||||
@ -285,9 +286,8 @@ if ($result) {
|
|||||||
print '<div class="box-flex-container kanban">';
|
print '<div class="box-flex-container kanban">';
|
||||||
}
|
}
|
||||||
// Output Kanban
|
// Output Kanban
|
||||||
|
|
||||||
print $bon->getKanbanView('');
|
print $bon->getKanbanView('');
|
||||||
if ($i == (min($num, $limit) - 1)) {
|
if ($i == ($imaxinloop - 1)) {
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -239,7 +239,6 @@ if ($result) {
|
|||||||
print '<div class="box-flex-container kanban">';
|
print '<div class="box-flex-container kanban">';
|
||||||
}
|
}
|
||||||
// Output Kanban
|
// Output Kanban
|
||||||
|
|
||||||
print $directdebitorder->getKanbanView('');
|
print $directdebitorder->getKanbanView('');
|
||||||
if ($i == (min($num, $limit) - 1)) {
|
if ($i == (min($num, $limit) - 1)) {
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|||||||
@ -594,7 +594,8 @@ $i = 0;
|
|||||||
$totalarray = $TLoadedUsers = array();
|
$totalarray = $TLoadedUsers = array();
|
||||||
$totalarray['nbfield'] = 0;
|
$totalarray['nbfield'] = 0;
|
||||||
$totalarray['val']['totalttcfield'] = 0;
|
$totalarray['val']['totalttcfield'] = 0;
|
||||||
while ($i < min($num, $limit)) {
|
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
||||||
|
while ($i < $imaxinloop) {
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
|
|
||||||
$chargesociale_static->id = $obj->rowid;
|
$chargesociale_static->id = $obj->rowid;
|
||||||
@ -617,10 +618,9 @@ while ($i < min($num, $limit)) {
|
|||||||
print '<div class="box-flex-container kanban">';
|
print '<div class="box-flex-container kanban">';
|
||||||
}
|
}
|
||||||
// Output Kanban
|
// Output Kanban
|
||||||
|
|
||||||
$chargesociale_static->fk_project = $projectstatic->getNomUrl();
|
$chargesociale_static->fk_project = $projectstatic->getNomUrl();
|
||||||
print $chargesociale_static->getKanbanView('');
|
print $chargesociale_static->getKanbanView('');
|
||||||
if ($i == (min($num, $limit) - 1)) {
|
if ($i == ($imaxinloop - 1)) {
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -475,7 +475,8 @@ $totalarray = array();
|
|||||||
$totalarray['nbfield'] = 0;
|
$totalarray['nbfield'] = 0;
|
||||||
$total = 0;
|
$total = 0;
|
||||||
|
|
||||||
while ($i < min($num, $limit)) {
|
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
||||||
|
while ($i < $imaxinloop) {
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
|
|
||||||
$tva_static->id = $obj->rowid;
|
$tva_static->id = $obj->rowid;
|
||||||
@ -492,9 +493,8 @@ while ($i < min($num, $limit)) {
|
|||||||
print '<div class="box-flex-container kanban">';
|
print '<div class="box-flex-container kanban">';
|
||||||
}
|
}
|
||||||
// Output Kanban
|
// Output Kanban
|
||||||
|
|
||||||
print $tva_static->getKanbanView('');
|
print $tva_static->getKanbanView('');
|
||||||
if ($i == (min($num, $limit) - 1)) {
|
if ($i == ($imaxinloop - 1)) {
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -990,7 +990,6 @@ while ($i < $imaxinloop) {
|
|||||||
print '<tr><td colspan="'.$savnbfield.'">';
|
print '<tr><td colspan="'.$savnbfield.'">';
|
||||||
print '<div class="box-flex-container kanban">';
|
print '<div class="box-flex-container kanban">';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Output Kanban
|
// Output Kanban
|
||||||
$contracttmp->societe = $socstatic->getNomUrl();
|
$contracttmp->societe = $socstatic->getNomUrl();
|
||||||
$contracttmp->date_contrat = $obj->date_contrat;
|
$contracttmp->date_contrat = $obj->date_contrat;
|
||||||
|
|||||||
@ -289,7 +289,8 @@ if ($resql) {
|
|||||||
}
|
}
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
while ($i < min($num, $limit)) {
|
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
||||||
|
while ($i < $imaxinloop) {
|
||||||
$objp = $db->fetch_object($resql);
|
$objp = $db->fetch_object($resql);
|
||||||
$donationstatic->setVarsFromFetchObj($objp);
|
$donationstatic->setVarsFromFetchObj($objp);
|
||||||
$company = new Societe($db);
|
$company = new Societe($db);
|
||||||
@ -314,7 +315,7 @@ if ($resql) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
print $donationstatic->getKanbanView('');
|
print $donationstatic->getKanbanView('');
|
||||||
if ($i == (min($num, $limit) - 1)) {
|
if ($i == ($imaxinloop - 1)) {
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -732,6 +732,8 @@ if ($resql) {
|
|||||||
$totalarray['val']['d.total_tva'] = 0;
|
$totalarray['val']['d.total_tva'] = 0;
|
||||||
$totalarray['val']['d.total_ttc'] = 0;
|
$totalarray['val']['d.total_ttc'] = 0;
|
||||||
$totalarray['totalizable'] = array();
|
$totalarray['totalizable'] = array();
|
||||||
|
|
||||||
|
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
||||||
while ($i < min($num, $limit)) {
|
while ($i < min($num, $limit)) {
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
|
|
||||||
@ -756,14 +758,12 @@ if ($resql) {
|
|||||||
$expensereportstatic->fk_user_author = $usertmp->getNomUrl(1);
|
$expensereportstatic->fk_user_author = $usertmp->getNomUrl(1);
|
||||||
|
|
||||||
// Output Kanban
|
// Output Kanban
|
||||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
|
||||||
if ($massactionbutton || $massaction) {
|
if ($massactionbutton || $massaction) {
|
||||||
$selected = 0;
|
$selected = 0;
|
||||||
|
|
||||||
print $expensereportstatic->getKanbanView('');
|
print $expensereportstatic->getKanbanView('');
|
||||||
}
|
}
|
||||||
}
|
if ($i == ($imaxinloop - 1)) {
|
||||||
if ($i == (min($num, $limit) - 1)) {
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -477,7 +477,8 @@ $i = 0;
|
|||||||
$savnbfield = $totalarray['nbfield'];
|
$savnbfield = $totalarray['nbfield'];
|
||||||
$totalarray = array();
|
$totalarray = array();
|
||||||
$totalarray['nbfield'] = 0;
|
$totalarray['nbfield'] = 0;
|
||||||
while ($i < min($num, $limit)) {
|
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
||||||
|
while ($i < $imaxinloop) {
|
||||||
$objp = $db->fetch_object($resql);
|
$objp = $db->fetch_object($resql);
|
||||||
|
|
||||||
$paymentexpensereportstatic->id = $objp->rowid;
|
$paymentexpensereportstatic->id = $objp->rowid;
|
||||||
@ -504,7 +505,7 @@ while ($i < min($num, $limit)) {
|
|||||||
}
|
}
|
||||||
// Output Kanban
|
// Output Kanban
|
||||||
print $paymentexpensereportstatic->getKanbanView('');
|
print $paymentexpensereportstatic->getKanbanView('');
|
||||||
if ($i == (min($num, $limit) - 1)) {
|
if ($i == ($imaxinloop - 1)) {
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -714,9 +714,8 @@ while ($i < $imaxinloop) {
|
|||||||
$objectstatic->duration = $obj->duree;
|
$objectstatic->duration = $obj->duree;
|
||||||
$objectstatic->socid = $companystatic->getNomUrl(1, '', 44);
|
$objectstatic->socid = $companystatic->getNomUrl(1, '', 44);
|
||||||
|
|
||||||
|
|
||||||
print $objectstatic->getKanbanView('');
|
print $objectstatic->getKanbanView('');
|
||||||
if ($i == (min($num, $limit) - 1)) {
|
if ($i == ($imaxinloop - 1)) {
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1686,7 +1686,7 @@ if ($resql) {
|
|||||||
$objectstatic->socid = $thirdpartytmp->getNomUrl('supplier', 0, 0, -1);
|
$objectstatic->socid = $thirdpartytmp->getNomUrl('supplier', 0, 0, -1);
|
||||||
// Output Kanban
|
// Output Kanban
|
||||||
print $objectstatic->getKanbanView('');
|
print $objectstatic->getKanbanView('');
|
||||||
if ($i == (min($num, $limit) - 1)) {
|
if ($i == ($imaxinloop - 1)) {
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1359,7 +1359,8 @@ if ($num > 0) {
|
|||||||
$totalarray['val']['f.total_localtax1']=0;
|
$totalarray['val']['f.total_localtax1']=0;
|
||||||
$totalarray['val']['f.total_ttc']=0;
|
$totalarray['val']['f.total_ttc']=0;
|
||||||
|
|
||||||
while ($i < min($num, $limit)) {
|
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
||||||
|
while ($i < $imaxinloop) {
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
|
|
||||||
$datelimit = $db->jdate($obj->datelimite);
|
$datelimit = $db->jdate($obj->datelimite);
|
||||||
@ -1423,7 +1424,7 @@ if ($num > 0) {
|
|||||||
$facturestatic->total_ht = $obj->total_ht;
|
$facturestatic->total_ht = $obj->total_ht;
|
||||||
$facturestatic->date = $obj->datef;
|
$facturestatic->date = $obj->datef;
|
||||||
print $facturestatic->getKanbanView('');
|
print $facturestatic->getKanbanView('');
|
||||||
if ($i == (min($num, $limit) - 1)) {
|
if ($i == ($imaxinloop - 1)) {
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -790,7 +790,8 @@ if ($resql) {
|
|||||||
$totalarray = array();
|
$totalarray = array();
|
||||||
$totalarray['nbfield'] = 0;
|
$totalarray['nbfield'] = 0;
|
||||||
$totalduration = 0;
|
$totalduration = 0;
|
||||||
while ($i < min($num, $limit)) {
|
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
||||||
|
while ($i < $imaxinloop) {
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
|
|
||||||
// Leave request
|
// Leave request
|
||||||
@ -852,7 +853,7 @@ if ($resql) {
|
|||||||
$arraydata = array('user'=>$userstatic, 'labeltype'=>$labeltypeleavetoshow);
|
$arraydata = array('user'=>$userstatic, 'labeltype'=>$labeltypeleavetoshow);
|
||||||
print $holidaystatic->getKanbanView('', $arraydata);
|
print $holidaystatic->getKanbanView('', $arraydata);
|
||||||
}
|
}
|
||||||
if ($i == (min($num, $limit) - 1)) {
|
if ($i == ($imaxinloop - 1)) {
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -567,7 +567,8 @@ if (isset($extrafields->attributes[$object->table_element]['computed']) && is_ar
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
$totalarray = array();
|
$totalarray = array();
|
||||||
$totalarray['nbfield'] = 0;
|
$totalarray['nbfield'] = 0;
|
||||||
while ($i < ($limit ? min($num, $limit) : $num)) {
|
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
||||||
|
while ($i < $imaxinloop) {
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
if (empty($obj)) {
|
if (empty($obj)) {
|
||||||
break; // Should not happen
|
break; // Should not happen
|
||||||
|
|||||||
@ -544,7 +544,8 @@ if (isset($extrafields->attributes[$object->table_element]['computed']) && is_ar
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
$totalarray = array();
|
$totalarray = array();
|
||||||
$totalarray['nbfield'] = 0;
|
$totalarray['nbfield'] = 0;
|
||||||
while ($i < ($limit ? min($num, $limit) : $num)) {
|
$imaxiloop = ($limit ? min($num, $limit) : $num);
|
||||||
|
while ($i < $imaxloop) {
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
if (empty($obj)) {
|
if (empty($obj)) {
|
||||||
break; // Should not happen
|
break; // Should not happen
|
||||||
@ -570,7 +571,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
|||||||
}
|
}
|
||||||
print $object->getKanbanView('');
|
print $object->getKanbanView('');
|
||||||
}
|
}
|
||||||
if ($i == (min($num, $limit) - 1)) {
|
if ($i == ($imaxinloop - 1)) {
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -270,7 +270,8 @@ if ($resql) {
|
|||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$totalarray = array();
|
$totalarray = array();
|
||||||
while ($i < ($limit ? min($num, $limit) : $num)) {
|
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
||||||
|
while ($i < $imaxinloop) {
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
if (empty($obj)) {
|
if (empty($obj)) {
|
||||||
break; // Should not happen
|
break; // Should not happen
|
||||||
@ -294,7 +295,7 @@ if ($resql) {
|
|||||||
$loan_static->totalpaid = $obj->paid;
|
$loan_static->totalpaid = $obj->paid;
|
||||||
|
|
||||||
print $loan_static->getKanbanView('');
|
print $loan_static->getKanbanView('');
|
||||||
if ($i == (min($num, $limit) - 1)) {
|
if ($i == ($imaxinloop - 1)) {
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -596,7 +596,8 @@ $bom = new Bom($db);
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
$totalarray = array();
|
$totalarray = array();
|
||||||
$totalarray['nbfield'] = 0;
|
$totalarray['nbfield'] = 0;
|
||||||
while ($i < ($limit ? min($num, $limit) : $num)) {
|
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
||||||
|
while ($i < $imaxinloop) {
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
if (empty($obj)) {
|
if (empty($obj)) {
|
||||||
break; // Should not happen
|
break; // Should not happen
|
||||||
@ -619,7 +620,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
|||||||
|
|
||||||
// Output Kanban
|
// Output Kanban
|
||||||
print $object->getKanbanView('');
|
print $object->getKanbanView('');
|
||||||
if ($i == (min($num, $limit) - 1)) {
|
if ($i == ($imaxinloop - 1)) {
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -619,7 +619,8 @@ $i = 0;
|
|||||||
|
|
||||||
$warehouse = new Entrepot($db);
|
$warehouse = new Entrepot($db);
|
||||||
|
|
||||||
while ($i < min($num, $limit)) {
|
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
||||||
|
while ($i < $imaxinloop) {
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
if (empty($obj)) {
|
if (empty($obj)) {
|
||||||
break; // Should not happen
|
break; // Should not happen
|
||||||
|
|||||||
@ -66,7 +66,7 @@ $pagenext = $page + 1;
|
|||||||
$object = new RecruitmentCandidature($db);
|
$object = new RecruitmentCandidature($db);
|
||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
$diroutputmassaction = $conf->recruitment->dir_output.'/temp/massgeneration/'.$user->id;
|
$diroutputmassaction = $conf->recruitment->dir_output.'/temp/massgeneration/'.$user->id;
|
||||||
$hookmanager->initHooks(array('recruitmentcandidaturelist')); // Note that conf->hooks_modules contains array
|
$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes
|
||||||
|
|
||||||
// Fetch optionals attributes and labels
|
// Fetch optionals attributes and labels
|
||||||
$extrafields->fetch_name_optionals_label($object->table_element);
|
$extrafields->fetch_name_optionals_label($object->table_element);
|
||||||
@ -102,6 +102,13 @@ foreach ($object->fields as $key => $val) {
|
|||||||
$fieldstosearchall['t.'.$key] = $val['label'];
|
$fieldstosearchall['t.'.$key] = $val['label'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*$parameters = array('fieldstosearchall'=>$fieldstosearchall);
|
||||||
|
$reshook = $hookmanager->executeHooks('completeFieldsToSearchAll', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
if ($reshook > 0) {
|
||||||
|
$fieldstosearchall = $hookmanager->resArray['fieldstosearchall'];
|
||||||
|
} elseif ($reshook == 0) {
|
||||||
|
$fieldstosearchall = array_merge($fieldstosearchall, $hookmanager->resArray['fieldstosearchall']);
|
||||||
|
}*/
|
||||||
|
|
||||||
// Definition of array of fields for columns
|
// Definition of array of fields for columns
|
||||||
$arrayfields = array();
|
$arrayfields = array();
|
||||||
@ -226,6 +233,9 @@ $parameters = array();
|
|||||||
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||||
$sql .= preg_replace('/^,/', '', $hookmanager->resPrint);
|
$sql .= preg_replace('/^,/', '', $hookmanager->resPrint);
|
||||||
$sql = preg_replace('/,\s*$/', '', $sql);
|
$sql = preg_replace('/,\s*$/', '', $sql);
|
||||||
|
|
||||||
|
$sqlfields = $sql; // $sql fields to remove for count total
|
||||||
|
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t";
|
$sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t";
|
||||||
if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
|
if (isset($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) {
|
||||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (t.rowid = ef.fk_object)";
|
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (t.rowid = ef.fk_object)";
|
||||||
@ -279,7 +289,7 @@ if (!empty($id)) {
|
|||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php';
|
||||||
// Add where from hooks
|
// Add where from hooks
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
$sql .= $hookmanager->resPrint;
|
$sql .= $hookmanager->resPrint;
|
||||||
|
|
||||||
/* If a group by is required
|
/* If a group by is required
|
||||||
@ -304,7 +314,8 @@ $sql = preg_replace('/,\s*$/', '', $sql);
|
|||||||
$nbtotalofrecords = '';
|
$nbtotalofrecords = '';
|
||||||
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
||||||
/* The fast and low memory method to get and count full list converts the sql into a sql count */
|
/* The fast and low memory method to get and count full list converts the sql into a sql count */
|
||||||
$sqlforcount = preg_replace('/^SELECT[a-zA-Z0-9\._\s\(\),=<>\:\-\']+\sFROM/Ui', 'SELECT COUNT(*) as nbtotalofrecords FROM', $sql);
|
$sqlforcount = preg_replace('/^'.preg_quote($sqlfields, '/').'/', 'SELECT COUNT(*) as nbtotalofrecords', $sql);
|
||||||
|
$sqlforcount = preg_replace('/GROUP BY .*$/', '', $sqlforcount);
|
||||||
$resql = $db->query($sqlforcount);
|
$resql = $db->query($sqlforcount);
|
||||||
if ($resql) {
|
if ($resql) {
|
||||||
$objforcount = $db->fetch_object($resql);
|
$objforcount = $db->fetch_object($resql);
|
||||||
@ -313,7 +324,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($page * $limit) > $nbtotalofrecords) { // if total of record found is smaller than page * limit, goto and load page 0
|
if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller than the paging size (filtering), goto and load page 0
|
||||||
$page = 0;
|
$page = 0;
|
||||||
$offset = 0;
|
$offset = 0;
|
||||||
}
|
}
|
||||||
@ -500,7 +511,7 @@ if ($limit > 0 && $limit != $conf->liste_limit) {
|
|||||||
$param .= '&limit='.urlencode($limit);
|
$param .= '&limit='.urlencode($limit);
|
||||||
}
|
}
|
||||||
foreach ($search as $key => $val) {
|
foreach ($search as $key => $val) {
|
||||||
if (is_array($search[$key]) && count($search[$key])) {
|
if (is_array($search[$key])) {
|
||||||
foreach ($search[$key] as $skey) {
|
foreach ($search[$key] as $skey) {
|
||||||
if ($skey != '') {
|
if ($skey != '') {
|
||||||
$param .= '&search_'.$key.'[]='.urlencode($skey);
|
$param .= '&search_'.$key.'[]='.urlencode($skey);
|
||||||
@ -581,7 +592,7 @@ $moreforfilter.= $langs->trans('MyFilter') . ': <input type="text" name="search_
|
|||||||
$moreforfilter.= '</div>';*/
|
$moreforfilter.= '</div>';*/
|
||||||
|
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
$moreforfilter .= $hookmanager->resPrint;
|
$moreforfilter .= $hookmanager->resPrint;
|
||||||
} else {
|
} else {
|
||||||
@ -604,10 +615,10 @@ print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwit
|
|||||||
|
|
||||||
// Fields title search
|
// Fields title search
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre_filter">';
|
||||||
// Action column
|
// Action column
|
||||||
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print '<td class="liste_titre maxwidthsearch">';
|
print '<td class="liste_titre maxwidthsearch center">';
|
||||||
$searchpicto = $form->showFilterButtons('left');
|
$searchpicto = $form->showFilterButtons('left');
|
||||||
print $searchpicto;
|
print $searchpicto;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -621,13 +632,13 @@ foreach ($object->fields as $key => $val) {
|
|||||||
$cssforfield .= ($cssforfield ? ' ' : '').'center';
|
$cssforfield .= ($cssforfield ? ' ' : '').'center';
|
||||||
} elseif (in_array($val['type'], array('timestamp'))) {
|
} elseif (in_array($val['type'], array('timestamp'))) {
|
||||||
$cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
|
$cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
|
||||||
} elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) {
|
} elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $key != 'rowid' && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) {
|
||||||
$cssforfield .= ($cssforfield ? ' ' : '').'right';
|
$cssforfield .= ($cssforfield ? ' ' : '').'right';
|
||||||
}
|
}
|
||||||
if (!empty($arrayfields['t.'.$key]['checked'])) {
|
if (!empty($arrayfields['t.'.$key]['checked'])) {
|
||||||
print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">';
|
print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').($key == 'status' ? ' parentonrightofpage' : '').'">';
|
||||||
if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) {
|
if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) {
|
||||||
print $form->selectarray('search_'.$key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100', 1);
|
print $form->selectarray('search_'.$key, $val['arrayofkeyval'], (isset($search[$key]) ? $search[$key] : ''), $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth100'.($key == 'status' ? ' search_status width100 onrightofpage' : ''), 1);
|
||||||
} elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:') === 0)) {
|
} elseif ((strpos($val['type'], 'integer:') === 0) || (strpos($val['type'], 'sellist:') === 0)) {
|
||||||
print $object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] : ''), '', '', 'search_', $cssforfield.' maxwidth250', 1);
|
print $object->showInputField($val, $key, (isset($search[$key]) ? $search[$key] : ''), '', '', 'search_', $cssforfield.' maxwidth250', 1);
|
||||||
} elseif (preg_match('/^(date|timestamp|datetime)/', $val['type'])) {
|
} elseif (preg_match('/^(date|timestamp|datetime)/', $val['type'])) {
|
||||||
@ -652,11 +663,11 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
|
|||||||
|
|
||||||
// Fields from hook
|
// Fields from hook
|
||||||
$parameters = array('arrayfields'=>$arrayfields);
|
$parameters = array('arrayfields'=>$arrayfields);
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
// Action column
|
// Action column
|
||||||
if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print '<td class="liste_titre maxwidthsearch">';
|
print '<td class="liste_titre center maxwidthsearch">';
|
||||||
$searchpicto = $form->showFilterButtons();
|
$searchpicto = $form->showFilterButtons();
|
||||||
print $searchpicto;
|
print $searchpicto;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
@ -669,8 +680,9 @@ $totalarray['nbfield'] = 0;
|
|||||||
// Fields title label
|
// Fields title label
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
|
print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
foreach ($object->fields as $key => $val) {
|
foreach ($object->fields as $key => $val) {
|
||||||
$cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']);
|
$cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']);
|
||||||
@ -680,12 +692,12 @@ foreach ($object->fields as $key => $val) {
|
|||||||
$cssforfield .= ($cssforfield ? ' ' : '').'center';
|
$cssforfield .= ($cssforfield ? ' ' : '').'center';
|
||||||
} elseif (in_array($val['type'], array('timestamp'))) {
|
} elseif (in_array($val['type'], array('timestamp'))) {
|
||||||
$cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
|
$cssforfield .= ($cssforfield ? ' ' : '').'nowrap';
|
||||||
} elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) {
|
} elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $key != 'rowid' && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) {
|
||||||
$cssforfield .= ($cssforfield ? ' ' : '').'right';
|
$cssforfield .= ($cssforfield ? ' ' : '').'right';
|
||||||
}
|
}
|
||||||
$cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label
|
$cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label
|
||||||
if (!empty($arrayfields['t.'.$key]['checked'])) {
|
if (!empty($arrayfields['t.'.$key]['checked'])) {
|
||||||
print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''))."\n";
|
print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist']))."\n";
|
||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -693,13 +705,13 @@ foreach ($object->fields as $key => $val) {
|
|||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
|
||||||
// Hook fields
|
// Hook fields
|
||||||
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, 'totalarray'=>&$totalarray);
|
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder, 'totalarray'=>&$totalarray);
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
// Action column
|
// Action column
|
||||||
if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
|
print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
|
||||||
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
$totalarray['nbfield']++;
|
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
|
|
||||||
|
|
||||||
@ -707,7 +719,7 @@ print '</tr>'."\n";
|
|||||||
$needToFetchEachLine = 0;
|
$needToFetchEachLine = 0;
|
||||||
if (isset($extrafields->attributes[$object->table_element]['computed']) && is_array($extrafields->attributes[$object->table_element]['computed']) && count($extrafields->attributes[$object->table_element]['computed']) > 0) {
|
if (isset($extrafields->attributes[$object->table_element]['computed']) && is_array($extrafields->attributes[$object->table_element]['computed']) && count($extrafields->attributes[$object->table_element]['computed']) > 0) {
|
||||||
foreach ($extrafields->attributes[$object->table_element]['computed'] as $key => $val) {
|
foreach ($extrafields->attributes[$object->table_element]['computed'] as $key => $val) {
|
||||||
if (preg_match('/\$object/', $val)) {
|
if ($val && preg_match('/\$object/', $val)) {
|
||||||
$needToFetchEachLine++; // There is at least one compute field that use $object
|
$needToFetchEachLine++; // There is at least one compute field that use $object
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -739,14 +751,11 @@ while ($i < $imaxinloop) {
|
|||||||
$recuitment->fetch($obj->fk_recruitmentjobposition);
|
$recuitment->fetch($obj->fk_recruitmentjobposition);
|
||||||
$object->fk_recruitmentjobposition = $recuitment->getNomUrl();
|
$object->fk_recruitmentjobposition = $recuitment->getNomUrl();
|
||||||
$object->phone = $obj->phone;
|
$object->phone = $obj->phone;
|
||||||
// Output Kanban
|
|
||||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
|
||||||
if ($massactionbutton || $massaction) {
|
if ($massactionbutton || $massaction) {
|
||||||
$selected = 0;
|
$selected = 0;
|
||||||
}
|
}
|
||||||
// Output Kanban
|
// Output Kanban
|
||||||
print $object->getKanbanView('');
|
print $object->getKanbanView('');
|
||||||
}
|
|
||||||
if ($i == ($imaxinloop - 1)) {
|
if ($i == ($imaxinloop - 1)) {
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -756,7 +765,7 @@ while ($i < $imaxinloop) {
|
|||||||
$j = 0;
|
$j = 0;
|
||||||
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
||||||
// Action column
|
// Action column
|
||||||
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print '<td class="nowrap center">';
|
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
|
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;
|
$selected = 0;
|
||||||
@ -766,6 +775,9 @@ while ($i < $imaxinloop) {
|
|||||||
print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
if (!$i) {
|
||||||
|
$totalarray['nbfield']++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
foreach ($object->fields as $key => $val) {
|
foreach ($object->fields as $key => $val) {
|
||||||
$cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']);
|
$cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']);
|
||||||
@ -787,7 +799,7 @@ while ($i < $imaxinloop) {
|
|||||||
//if (in_array($key, array('fk_soc', 'fk_user', 'fk_warehouse'))) $cssforfield = 'tdoverflowmax100';
|
//if (in_array($key, array('fk_soc', 'fk_user', 'fk_warehouse'))) $cssforfield = 'tdoverflowmax100';
|
||||||
|
|
||||||
if (!empty($arrayfields['t.'.$key]['checked'])) {
|
if (!empty($arrayfields['t.'.$key]['checked'])) {
|
||||||
print '<td'.($cssforfield ? ' class="'.$cssforfield.'"' : '');
|
print '<td'.($cssforfield ? ' class="'.$cssforfield.(preg_match('/tdoverflow/', $cssforfield) ? ' classfortooltip' : '').'"' : '');
|
||||||
if (preg_match('/tdoverflow/', $cssforfield)) {
|
if (preg_match('/tdoverflow/', $cssforfield)) {
|
||||||
print ' title="'.dol_escape_htmltag($object->$key).'"';
|
print ' title="'.dol_escape_htmltag($object->$key).'"';
|
||||||
}
|
}
|
||||||
@ -821,10 +833,10 @@ while ($i < $imaxinloop) {
|
|||||||
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
|
||||||
// Fields from hook
|
// Fields from hook
|
||||||
$parameters = array('arrayfields'=>$arrayfields, 'object'=>$object, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
$parameters = array('arrayfields'=>$arrayfields, 'object'=>$object, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray);
|
||||||
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
print $hookmanager->resPrint;
|
print $hookmanager->resPrint;
|
||||||
// Action column
|
// Action column
|
||||||
if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
|
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||||
print '<td class="nowrap center">';
|
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
|
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;
|
$selected = 0;
|
||||||
@ -834,10 +846,10 @@ while ($i < $imaxinloop) {
|
|||||||
print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -593,13 +593,11 @@ while ($i < $imaxinloop) {
|
|||||||
print '<tr><td colspan="'.$savnbfield.'">';
|
print '<tr><td colspan="'.$savnbfield.'">';
|
||||||
print '<div class="box-flex-container kanban">';
|
print '<div class="box-flex-container kanban">';
|
||||||
}
|
}
|
||||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
|
||||||
if ($massactionbutton || $massaction) {
|
if ($massactionbutton || $massaction) {
|
||||||
$selected = 0;
|
$selected = 0;
|
||||||
}
|
}
|
||||||
// Output Kanban
|
// Output Kanban
|
||||||
print $object->getKanbanView('');
|
print $object->getKanbanView('');
|
||||||
}
|
|
||||||
if ($i == ($imaxinloop - 1)) {
|
if ($i == ($imaxinloop - 1)) {
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|||||||
@ -537,7 +537,8 @@ $totalarray = array();
|
|||||||
$totalarray['nbfield'] = 0;
|
$totalarray['nbfield'] = 0;
|
||||||
$totalarray['val'] = array();
|
$totalarray['val'] = array();
|
||||||
$totalarray['val']['totalttcfield'] = 0;
|
$totalarray['val']['totalttcfield'] = 0;
|
||||||
while ($i < ($limit ? min($num, $limit) : $num)) {
|
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
||||||
|
while ($i < $imaxinloop) {
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
if (empty($obj)) {
|
if (empty($obj)) {
|
||||||
break; // Should not happen
|
break; // Should not happen
|
||||||
@ -574,7 +575,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
|||||||
}
|
}
|
||||||
// Output Kanban
|
// Output Kanban
|
||||||
print $salstatic->getKanbanView('');
|
print $salstatic->getKanbanView('');
|
||||||
if ($i == (min($num, $limit) - 1)) {
|
if ($i == ($imaxinloop - 1)) {
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -534,7 +534,7 @@ $i = 0;
|
|||||||
$total = 0;
|
$total = 0;
|
||||||
$totalarray = array();
|
$totalarray = array();
|
||||||
$totalarray['nbfield'] = 0;
|
$totalarray['nbfield'] = 0;
|
||||||
while ($i < ($limit ? min($num, $limit) : $num)) {
|
while ($i < $imaxinloop) {
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
if (empty($obj)) {
|
if (empty($obj)) {
|
||||||
break;
|
break;
|
||||||
@ -544,8 +544,6 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
|||||||
// Store properties in $object
|
// Store properties in $object
|
||||||
$object->setVarsFromFetchObj($obj);
|
$object->setVarsFromFetchObj($obj);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$userstatic->id = $obj->uid;
|
$userstatic->id = $obj->uid;
|
||||||
$userstatic->lastname = $obj->lastname;
|
$userstatic->lastname = $obj->lastname;
|
||||||
$userstatic->firstname = $obj->firstname;
|
$userstatic->firstname = $obj->firstname;
|
||||||
@ -570,18 +568,14 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
|||||||
$paymentsalstatic->fk_bank = $accountlinestatic->getNomUrl(1);
|
$paymentsalstatic->fk_bank = $accountlinestatic->getNomUrl(1);
|
||||||
$paymentsalstatic->fk_user_author = $userstatic->getNomUrl(1);
|
$paymentsalstatic->fk_user_author = $userstatic->getNomUrl(1);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if ($mode == 'kanban') {
|
if ($mode == 'kanban') {
|
||||||
if ($i == 0) {
|
if ($i == 0) {
|
||||||
print '<tr><td colspan="12">';
|
print '<tr><td colspan="12">';
|
||||||
print '<div class="box-flex-container kanban">';
|
print '<div class="box-flex-container kanban">';
|
||||||
}
|
}
|
||||||
// Output Kanban
|
// Output Kanban
|
||||||
|
|
||||||
|
|
||||||
print $paymentsalstatic->getKanbanView('');
|
print $paymentsalstatic->getKanbanView('');
|
||||||
if ($i == (min($num, $limit) - 1)) {
|
if ($i == ($imaxinloop - 1)) {
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -965,7 +965,9 @@ if ($resql) {
|
|||||||
$totalarray['val']['sp.total_ht'] = 0;
|
$totalarray['val']['sp.total_ht'] = 0;
|
||||||
$totalarray['val']['sp.total_tva'] = 0;
|
$totalarray['val']['sp.total_tva'] = 0;
|
||||||
$totalarray['val']['sp.total_ttc'] = 0;
|
$totalarray['val']['sp.total_ttc'] = 0;
|
||||||
while ($i < min($num, $limit)) {
|
|
||||||
|
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
||||||
|
while ($i < $imaxinloop) {
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
|
|
||||||
$objectstatic->id = $obj->rowid;
|
$objectstatic->id = $obj->rowid;
|
||||||
@ -992,7 +994,7 @@ if ($resql) {
|
|||||||
$objectstatic->user_author_id = $userstatic->getNomUrl(1);
|
$objectstatic->user_author_id = $userstatic->getNomUrl(1);
|
||||||
$objectstatic->delivery_date = $obj->dp;
|
$objectstatic->delivery_date = $obj->dp;
|
||||||
print $objectstatic->getKanbanView('');
|
print $objectstatic->getKanbanView('');
|
||||||
if ($i == (min($num, $limit) - 1)) {
|
if ($i == ($imaxinloop - 1)) {
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user