$sortfield = "b.dateo,b.rowid"; } if ($page < 0) { $page = 0; } $limit = $conf->liste_limit; $offset = $limit * $page; $dir = $conf->banque->dir_output . '/bordereau/'; $filterdate = dol_mktime(0, 0, 0, GETPOST('fdmonth'), GETPOST('fdday'), GETPOST('fdyear')); $filteraccountid = GETPOST('accountid'); $object = new RemiseCheque($db); /* * Actions */ if ($action == 'setdate' && $user->rights->banque->cheque) { $result = $object->fetch(GETPOST('id', 'int')); if ($result > 0) { //print "x ".$_POST['liv_month'].", ".$_POST['liv_day'].", ".$_POST['liv_year']; $date = dol_mktime(0, 0, 0, $_POST['datecreate_month'], $_POST['datecreate_day'], $_POST['datecreate_year']); $result = $object->set_date($user, $date); if ($result < 0) { setEventMessage($object->error, 'errors'); } } else { setEventMessage($object->error, 'errors'); } } /* * Actions */ if ($action == 'setrefext' && $user->rights->banque->cheque) {
print '</td></tr>'; } $rowspan = 0; //$user->rights->banque->modifier=false; //$user->rights->banque->consolidate=true; // Type of payment / Number print "<tr><td>" . $langs->trans("Type") . " / " . $langs->trans("Numero"); print "</td>"; if ($user->rights->banque->modifier || $user->rights->banque->consolidate) { print '<td colspan="3">'; $form->select_types_paiements($objp->fk_type, "value", '', 2); print '<input type="text" class="flat" name="num_chq" value="' . (empty($objp->num_chq) ? '' : $objp->num_chq) . '">'; if ($objp->receiptid) { include_once DOL_DOCUMENT_ROOT . '/compta/paiement/cheque/class/remisecheque.class.php'; $receipt = new RemiseCheque($db); $receipt->fetch($objp->receiptid); print ' ' . $langs->trans("CheckReceipt") . ': ' . $receipt->getNomUrl(2); } print '</td>'; $rowspan = 7; print '<td align="center" rowspan="' . $rowspan . '" width="20%"><input type="submit" class="button" value="' . $langs->trans("Update") . '">'; print '</td>'; } else { print '<td colspan="4">' . $objp->fk_type . ' ' . $objp->num_chq . '</td>'; } print "</tr>"; // Bank of cheque print "<tr><td>" . $langs->trans("Bank") . "</td>"; if ($user->rights->banque->modifier || $user->rights->banque->consolidate) { print '<td colspan="3">'; print '<input type="text" class="flat" size="40" name="banque" value="' . (empty($objp->banque) ? '' : $objp->banque) . '">';
print $bankline->getNomUrl(1, 0, 'showconciliated'); print '</td>'; print '</tr>'; print '<tr>'; print '<td>' . $langs->trans('BankAccount') . '</td>'; print '<td colspan="3">'; $accountstatic = new Account($db); $accountstatic->id = $bankline->fk_account; $accountstatic->label = $bankline->bank_account_ref . ' - ' . $bankline->bank_account_label; print $accountstatic->getNomUrl(0); print '</td>'; print '</tr>'; if ($object->type_code == 'CHQ' && $bankline->fk_bordereau > 0) { dol_include_once('/compta/paiement/cheque/class/remisecheque.class.php'); $bordereau = new RemiseCheque($db); $bordereau->fetch($bankline->fk_bordereau); print '<tr>'; print '<td>' . $langs->trans('CheckReceipt') . '</td>'; print '<td colspan="3">'; print $bordereau->getNomUrl(1); print '</td>'; print '</tr>'; } } } print '</table>'; /* * List of invoices */ $disable_delete = 0; $sql = 'SELECT f.rowid as facid, f.facnumber, f.type, f.total_ttc, f.paye, f.fk_statut, pf.amount, s.nom as name, s.rowid as socid';
$filterdate = ''; $filteraccountid = 0; } llxHeader(); $html = new Form($db); $formfile = new FormFile($db); if ($action == 'new') { $h = 0; $head[$h][0] = $_SERVER["PHP_SELF"] . '?action=new'; $head[$h][1] = $langs->trans("MenuChequeDeposits"); $hselected = $h; $h++; print_fiche_titre($langs->trans("Cheques")); } else { $remisecheque = new RemiseCheque($db); $result = $remisecheque->fetch($_REQUEST["id"], $_REQUEST["ref"]); if ($result < 0) { dol_print_error($db, $remisecheque->error); exit; } $h = 0; $head[$h][0] = $_SERVER["PHP_SELF"] . '?id=' . $remisecheque->id; $head[$h][1] = $langs->trans("CheckReceipt"); $hselected = $h; $h++; // $head[$h][0] = DOL_URL_ROOT.'/compta/paiement/cheque/info.php?id='.$remisecheque->id; // $head[$h][1] = $langs->trans("Info"); // $h++; dol_fiche_head($head, $hselected, $langs->trans("Cheques"), 0, 'payment'); /* * Confirmation de la suppression du bordereau