while ($i < $num && $i < $max) { $objp = $db->fetch_object($result); $var = !$var; print '<tr ' . $bc[$var] . '>'; $donationstatic->id = $objp->rowid; $donationstatic->lastname = $objp->lastname; $donationstatic->firstname = $objp->firstname; $label = $donationstatic->getFullName($langs); if ($objp->societe) { $label .= ($label ? ' - ' : '') . $objp->societe; } $donationstatic->ref = $label; print '<td>' . $donationstatic->getNomUrl(1) . '</td>'; print '<td align="right">' . price($objp->amount) . '</td>'; print '<td align="right">' . dol_print_date($db->jdate($objp->dm), 'day') . '</td>'; print '<td>' . $donationstatic->LibStatut($objp->fk_statut, 3) . '</td>'; print '</tr>'; $i++; } } else { print '<tr ' . $bc[$var] . '><td colspan="4">' . $langs->trans("None") . '</td></tr>'; } print '</table><br>'; } else { dol_print_error($db); } } /** * Social contributions to pay */ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire) {
print '<table width="100%" class="notopnoleftnoright">'; // Left area print '<tr><td class="notopnoleft" width="30%" valign="top">'; print '<table class="noborder" width="100%">'; print '<tr class="liste_titre">'; print '<td colspan="4">'.$langs->trans("Statistics").'</td>'; print "</tr>\n"; $listofstatus=array(0,1,-1,2); foreach ($listofstatus as $status) { $dataseries[]=array('label'=>$donstatic->LibStatut($status,1),'values'=>array(0=>(isset($nb[$status])?$nb[$status]:0))); } if ($conf->use_javascript_ajax) { print '<tr><td align="center" colspan="4">'; $data=array('series'=>$dataseries); dol_print_graph('stats',300,180,$data,1,'pie',1); print '</td></tr>'; } print '<tr class="liste_titre">'; print '<td>'.$langs->trans("Status").'</td>'; print '<td align="right">'.$langs->trans("Number").'</td>'; print '<td align="right">'.$langs->trans("Total").'</td>'; print '<td align="right">'.$langs->trans("Average").'</td>';
print "<td>" . $donationstatic->getNomUrl(1) . "</td>\n"; print "<td>" . $objp->societe . "</td>\n"; print "<td>" . $donationstatic->getFullName($langs) . "</td>\n"; print '<td align="center">' . dol_print_date($db->jdate($objp->datedon), 'day') . '</td>'; if (!empty($conf->projet->enabled)) { print "<td>"; if ($objp->pid) { $projectstatic->id = $objp->pid; $projectstatic->ref = $objp->ref; $projectstatic->id = $objp->pid; $projectstatic->public = $objp->public; $projectstatic->title = $objp->title; print $projectstatic->getNomUrl(1); } else { print ' '; } print "</td>\n"; } print '<td align="right">' . price($objp->amount) . '</td>'; print '<td align="right">' . $donationstatic->LibStatut($objp->statut, 5) . '</td>'; print "</tr>"; $i++; } print "</table>"; print "</form>\n"; $db->free($resql); } else { dol_print_error($db); } $db->close(); llxFooter();
} $db->free($result); } else { dol_print_error($db); } print_fiche_titre($langs->trans("DonationsArea")); print '<table width="100%" class="notopnoleftnoright">'; // Left area print '<tr><td class="notopnoleft" width="30%" valign="top">'; print '<table class="noborder" width="100%">'; print '<tr class="liste_titre">'; print '<td colspan="4">' . $langs->trans("Statistics") . '</td>'; print "</tr>\n"; $listofstatus = array(0, 1, -1, 2); foreach ($listofstatus as $status) { $dataseries[] = array('label' => $donstatic->LibStatut($status, 1), 'data' => isset($nb[$status]) ? (int) $nb[$status] : 0); } if ($conf->use_javascript_ajax) { print '<tr><td align="center" colspan="4">'; $data = array('series' => $dataseries); dol_print_graph('stats', 300, 180, $data, 1, 'pie', 1); print '</td></tr>'; } print '<tr class="liste_titre">'; print '<td>' . $langs->trans("Status") . '</td>'; print '<td align="right">' . $langs->trans("Number") . '</td>'; print '<td align="right">' . $langs->trans("Total") . '</td>'; print '<td align="right">' . $langs->trans("Average") . '</td>'; print '</tr>'; $total = 0; $totalnb = 0;