} if ($sortfield == 'amount_ttc' && $sortorder == 'desc') { arsort($amount); $arrayforsort = $amount; } foreach ($arrayforsort as $key => $value) { $var = !$var; print "<tr " . $bc[$var] . ">"; // Place //$fullname=$name[$key]; $place = new Place($db); $place->fetch($key); /*if ($key > 0) { $linkname='<a href="'.DOL_URL_ROOT.'/societe/soc.php?socid='.$key.'">'.img_object($langs->trans("ShowCompany"),'company').' '.$fullname.'</a>'; }*/ print "<td>" . $place->getNomUrl(1) . "</td>\n"; // Amount print '<td align="right">'; $url = dol_buildpath('/pos/backend/listefac.php?placeid=' . $key, 1); if ($key > 0) { print '<a href="' . $url . '">'; } else { print '<a href="#">'; } print price($amount[$key]); print '</a>'; print '</td>'; // Percent; print '<td align="right">' . ($catotal > 0 ? round(100 * $amount[$key] / $catotal, 2) . '%' : ' ') . '</td>'; // Other stats print '<td align="center">';
$cash = new Cash($db); $cash->fetch($object->fk_cash); print $cash->getNomUrl(1); print '</td>'; print '</tr>'; //Place if ($conf->global->POS_PLACES) { print '<tr><td>'; print '<table class="nobordernopadding" width="100%">'; print '<tr><td>' . $langs->trans('Place') . '</td>'; print '</td><td colspan="5">'; print '</tr></table>'; print '</td><td colspan="5">'; $place = new Place($db); $place->fetch($object->fk_place); print $place->getNomUrl(1); print '</td>'; print '</tr>'; } // Date ticket print '<tr><td>'; print '<table class="nobordernopadding" width="100%"><tr><td>'; print $langs->trans('Date'); print '</td>'; print '</tr></table>'; print '</td><td colspan="3">'; if (!empty($object->date_closed)) { print dol_print_date($object->date_closed, 'dayhourtext'); } else { print dol_print_date($object->date_creation, 'dayhourtext'); }