$langs->load("categories"); $langs->load("withdrawals"); // Security check if ($user->societe_id > 0) { accessforbidden(); } // Get supervariables $prev_id = GETPOST('id', 'int'); $page = GETPOST('page', 'int'); /* * View */ llxHeader('', $langs->trans("WithdrawalsReceipts")); if ($prev_id) { $bon = new BonPrelevement($db, ""); if ($bon->fetch($prev_id) == 0) { $head = prelevement_prepare_head($bon); dol_fiche_head($head, 'statistics', $langs->trans("WithdrawalsReceipts"), '', 'payment'); print '<table class="border" width="100%">'; print '<tr><td width="20%">' . $langs->trans("Ref") . '</td><td>' . $bon->getNomUrl(1) . '</td></tr>'; print '<tr><td width="20%">' . $langs->trans("Date") . '</td><td>' . dol_print_date($bon->datec, 'day') . '</td></tr>'; print '<tr><td width="20%">' . $langs->trans("Amount") . '</td><td>' . price($bon->amount) . '</td></tr>'; // Status print '<tr><td width="20%">' . $langs->trans('Status') . '</td>'; print '<td>' . $bon->getLibStatut(1) . '</td>'; print '</tr>'; if ($bon->date_trans != 0) { $muser = new User($db); $muser->fetch($bon->user_trans); print '<tr><td width="20%">' . $langs->trans("TransData") . '</td><td>'; print dol_print_date($bon->date_trans, 'day');
require_once DOL_DOCUMENT_ROOT . "/compta/prelevement/class/bon-prelevement.class.php"; $langs->load("bills"); $langs->load("categories"); // Security check $socid = 0; $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); if ($user->societe_id) { $socid = $user->societe_id; } $result = restrictedArea($user, 'prelevement', $id); llxHeader('', 'Bon de prelevement'); $form = new Form($db); if ($id > 0 || !empty($ref)) { $object = new BonPrelevement($db, ""); if ($object->fetch($id) == 0) { $head = prelevement_prepare_head($object); dol_fiche_head($head, 'preview', 'Prelevement : ' . $object->ref); print '<table class="border" width="100%">'; print '<tr><td width="20%">' . $langs->trans("Ref") . '</td><td>' . $object->ref . '</td></tr>'; print '<tr><td width="20%">' . $langs->trans("Amount") . '</td><td>' . price($object->amount) . '</td></tr>'; print '<tr><td width="20%">' . $langs->trans("File") . '</td><td>'; $relativepath = 'bon/' . $object->ref; print '<a href="' . DOL_URL_ROOT . '/document.php?type=text/plain&modulepart=prelevement&file=' . urlencode($relativepath) . '">' . $object->ref . '</a>'; print '</td></tr>'; print '</table><br>'; $fileimage = $conf->prelevement->dir_output . '/receipts/' . $object->ref . '.ps.png.0'; $fileps = $conf->prelevement->dir_output . '/receipts/' . $object->ref . '.ps'; // Conversion du PDF en image png si fichier png non existant if (!file_exists($fileimage)) { if (class_exists("Imagick")) {
} } /* * View */ llxHeader('', $langs->trans("StandingOrder")); $h = 0; $head[$h][0] = DOL_URL_ROOT . '/compta/prelevement/ligne.php?id=' . $id; $head[$h][1] = $langs->trans("Card"); $hselected = $h; $h++; if ($id) { $lipre = new LignePrelevement($db, $user); if ($lipre->fetch($id) == 0) { $bon = new BonPrelevement($db); $bon->fetch($lipre->bon_rowid); dol_fiche_head($head, $hselected, $langs->trans("StandingOrder")); print '<table class="border" width="100%">'; print '<tr><td width="20%">' . $langs->trans("WithdrawalReceipt") . '</td><td>'; print '<a href="fiche.php?id=' . $lipre->bon_rowid . '">' . $lipre->bon_ref . '</a></td></tr>'; print '<tr><td width="20%">' . $langs->trans("Date") . '</td><td>' . dol_print_date($bon->datec, 'day') . '</td></tr>'; print '<tr><td width="20%">' . $langs->trans("Amount") . '</td><td>' . price($lipre->amount) . '</td></tr>'; print '<tr><td width="20%">' . $langs->trans("Status") . '</td><td>'; print $lipre->LibStatut($lipre->statut, 1) . '</td></tr>'; if ($lipre->statut == 3) { $rej = new RejetPrelevement($db, $user); $resf = $rej->fetch($lipre->id); if ($resf == 0) { print '<tr><td width="20%">' . $langs->trans("RefusedReason") . '</td><td>' . $rej->motif . '</td></tr>'; print '<tr><td width="20%">' . $langs->trans("RefusedData") . '</td><td>'; if ($rej->date_rejet == 0) {
} /* * View */ llxHeader('',$langs->trans("WithdrawalReceipt")); $html = new Form($db); if ($id) { $bon = new BonPrelevement($db,""); if ($bon->fetch($id) == 0) { $head = prelevement_prepare_head($bon); dol_fiche_head($head, 'prelevement', $langs->trans("WithdrawalReceipt"), '', 'payment'); if (GETPOST("error")!='') { print '<div class="error">'.$bon->ReadError(GETPOST("error")).'</div>'; } if ($action == 'credite') { $ret=$html->form_confirm("fiche.php?id=".$bon->id,$langs->trans("ClassCredited"),$langs->trans("ClassCreditedConfirm"),"confirm_credite",'',1,1); if ($ret == 'html') print '<br>'; }
$bon->fetch($id); $dt = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); $error = $bon->set_infocredit($user, $dt); if ($error) { header("Location: card.php?id=" . $id . "&error={$error}"); exit; } } /* * View */ $bon = new BonPrelevement($db, ""); $form = new Form($db); llxHeader('', $langs->trans("WithdrawalsReceipts")); if ($id > 0) { $bon->fetch($id); $head = prelevement_prepare_head($bon); dol_fiche_head($head, 'prelevement', $langs->trans("WithdrawalsReceipts"), '', 'payment'); if (GETPOST('error', 'alpha') != '') { print '<div class="error">' . $bon->ReadError(GETPOST('error', 'alpha')) . '</div>'; } /*if ($action == 'credite') { print $form->formconfirm("card.php?id=".$bon->id,$langs->trans("ClassCredited"),$langs->trans("ClassCreditedConfirm"),"confirm_credite",'',1,1); }*/ print '<table class="border" width="100%">'; print '<tr><td width="20%">' . $langs->trans("Ref") . '</td><td>' . $bon->getNomUrl(1) . '</td></tr>'; print '<tr><td width="20%">' . $langs->trans("Date") . '</td><td>' . dol_print_date($bon->datec, 'day') . '</td></tr>'; print '<tr><td width="20%">' . $langs->trans("Amount") . '</td><td>' . price($bon->amount) . '</td></tr>'; // Status