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,11 +322,15 @@ if ($limit) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql) {
|
if (!$resql) {
|
||||||
|
dol_print_error($db);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
$num = $db->num_rows($resql);
|
$num = $db->num_rows($resql);
|
||||||
|
|
||||||
// Direct jump if only one record found
|
// Direct jump if only one record found
|
||||||
if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all) {
|
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);
|
||||||
@ -587,7 +617,8 @@ if ($resql) {
|
|||||||
$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,10 +807,10 @@ 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";
|
||||||
}
|
}
|
||||||
@ -806,9 +841,6 @@ if ($resql) {
|
|||||||
print '</div>'."\n";
|
print '</div>'."\n";
|
||||||
|
|
||||||
print '</form>'."\n";
|
print '</form>'."\n";
|
||||||
} else {
|
|
||||||
dol_print_error($db);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
|
|||||||
@ -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