$var = True; $total_ttc = $totalam = $total = 0; $var = true; 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); } } /**
print '</td>'; } print '<td class="liste_titre" align="right"><input name="search_amount" class="flat" type="text" size="8" value="' . $search_amount . '"></td>'; print '<td class="liste_titre" align="right"><input type="image" class="liste_titre" name="button_search" src="' . img_picto($langs->trans("Search"), 'search.png', '', '', 1) . '" value="' . dol_escape_htmltag($langs->trans("Search")) . '" title="' . dol_escape_htmltag($langs->trans("Search")) . '">'; print '<input type="image" class="liste_titre" name="button_removefilter" src="' . img_picto($langs->trans("Search"), 'searchclear.png', '', '', 1) . '" value="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '" title="' . dol_escape_htmltag($langs->trans("RemoveFilter")) . '">'; print "</td></tr>\n"; $var = True; while ($i < min($num, $limit)) { $objp = $db->fetch_object($result); $var = !$var; print "<tr " . $bc[$var] . ">"; $donationstatic->id = $objp->rowid; $donationstatic->ref = $objp->rowid; $donationstatic->lastname = $objp->lastname; $donationstatic->firstname = $objp->firstname; 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 '<tr class="liste_titre">'; print '<td>' . $langs->trans('Donation') . '</td>'; print '<td align="right">' . $langs->trans('ExpectedToPay') . '</td>'; print '<td align="center">' . $langs->trans('Status') . '</td>'; print '<td align="right">' . $langs->trans('PayedByThisPayment') . '</td>'; print "</tr>\n"; if ($num > 0) { $var = True; while ($i < $num) { $objp = $db->fetch_object($resql); $var = !$var; print '<tr ' . $bc[$var] . '>'; // Ref print '<td>'; $don->fetch($objp->did); print $don->getNomUrl(1); print "</td>\n"; // Expected to pay print '<td align="right">' . price($objp->d_amount) . '</td>'; // Status print '<td align="center">' . $don->getLibStatut(4, $objp->amount) . '</td>'; // Amount payed print '<td align="right">' . price($objp->amount) . '</td>'; print "</tr>\n"; if ($objp->paid == 1) { $disable_delete = 1; } $total = $total + $objp->amount; $i++; } }
if ($num) { $i = 0; $var = True; while ($i < $num) { $var=!$var; $obj = $db->fetch_object($resql); print "<tr ".$bc[$var].">"; $donation_static->id=$obj->rowid; $donation_static->ref=$obj->ref?$obj->ref:$obj->rowid; print '<td width="96" class="nobordernopadding" nowrap="nowrap">'; print $donation_static->getNomUrl(1); print '</td>'; print '<td class="nobordernopadding">'; print $obj->societe; print ($obj->societe && $obj->nom?' / ':''); print $obj->nom; print '</td>'; print '<td width="16" align="right" class="nobordernopadding">'; print price($obj->amount); print '</td>'; // Date print '<td align="center">'.dol_print_date($db->jdate($obj->datem),'day').'</td>';
if (!empty($id) && $action == 'edit') { $don->fetch($id); $h = 0; $head[$h][0] = $_SERVER['PHP_SELF'] . "?id=" . $don->id; $head[$h][1] = $langs->trans("Card"); $hselected = $h; $h++; dol_fiche_head($head, $hselected, $langs->trans("Donation"), 0, 'generic'); print '<form name="update" action="fiche.php" method="post">'; print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; print '<table class="border" width="100%">'; print '<input type="hidden" name="action" value="update">'; print '<input type="hidden" name="rowid" value="' . $don->id . '">'; // Ref print "<tr>" . '<td>' . $langs->trans("Ref") . '</td><td colspan="2">'; print $don->getNomUrl(); print '</td>'; print '</tr>'; $nbrows = 12; if ($conf->projet->enabled) { $nbrows++; } // Date print "<tr>" . '<td width="25%" class="fieldrequired">' . $langs->trans("Date") . '</td><td>'; $form->select_date($don->date, '', '', '', '', "update"); print '</td>'; print '<td rowspan="' . $nbrows . '" valign="top">' . $langs->trans("Comments") . ' :<br>'; print "<textarea name=\"comment\" wrap=\"soft\" cols=\"40\" rows=\"15\">" . $don->note . "</textarea></td>"; print "</tr>"; // Amount print "<tr>" . '<td class="fieldrequired">' . $langs->trans("Amount") . '</td><td><input type="text" name="amount" size="10" value="' . $don->amount . '"> ' . $langs->trans("Currency" . $conf->currency) . '</td></tr>';