print "<td> </td>"; print '</tr>'; } print '<tr ' . $bc[$var] . '>'; print '<td class="nowrap">' . dol_print_date($db->jdate($objp->do), "day") . "</td>\n"; print '<td class="nowrap">' . dol_print_date($db->jdate($objp->dv), "day"); print "</td>\n"; // Payment type print '<td class="nowrap">'; $label = $langs->trans("PaymentTypeShort" . $objp->fk_type) != "PaymentTypeShort" . $objp->fk_type ? $langs->trans("PaymentTypeShort" . $objp->fk_type) : $objp->fk_type; if ($objp->fk_type == 'SOLD') { $label = ' '; } if ($objp->fk_type == 'CHQ' && $objp->fk_bordereau > 0) { dol_include_once('/compta/paiement/cheque/class/remisecheque.class.php'); $bordereaustatic = new RemiseCheque($db); $bordereaustatic->id = $objp->fk_bordereau; $label .= ' ' . $bordereaustatic->getNomUrl(2); } print $label; print "</td>\n"; // Num print '<td class="nowrap">' . ($objp->num_chq ? $objp->num_chq : "") . "</td>\n"; // Description print '<td>'; // Show generic description if (preg_match('/^\\((.*)\\)$/i', $objp->label, $reg)) { // Generic description because between (). We show it after translating. print $langs->trans($reg[1]); } else { print dol_trunc($objp->label, 60);
/** * \file htdocs/compta/paiement/cheque/index.php * \ingroup compta * \brief Home page for cheque receipts * \version $Id: index.php,v 1.21 2011/08/03 00:46:28 eldy Exp $ */ require "./pre.inc.php"; require_once DOL_DOCUMENT_ROOT . '/compta/paiement/cheque/class/remisecheque.class.php'; require_once DOL_DOCUMENT_ROOT . '/compta/bank/class/account.class.php'; $langs->load("banks"); // Security check if ($user->societe_id) { $socid = $user->societe_id; } $result = restrictedArea($user, 'banque', '', ''); $checkdepositstatic = new RemiseCheque($db); $accountstatic = new Account($db); /* * View */ llxHeader('', $langs->trans("ChequesArea")); print_fiche_titre($langs->trans("ChequesArea")); print '<table border="0" width="100%" class="notopnoleftnoright">'; print '<tr><td valign="top" width="30%" class="notopnoleft">'; $sql = "SELECT count(b.rowid)"; $sql .= " FROM " . MAIN_DB_PREFIX . "bank as b"; $sql .= ", " . MAIN_DB_PREFIX . "bank_account as ba"; $sql .= " WHERE ba.rowid = b.fk_account"; $sql .= " AND ba.entity = " . $conf->entity; //feito para o kurt, um sql diferente se o usuário for o CBA (id 7), ele só pode ver a conta mineirao (id 3) if ($user->id == 7) {
} $offset = $conf->liste_limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; $limit = $conf->liste_limit; if (!$sortorder) { $sortorder = "DESC"; } if (!$sortfield) { $sortfield = "dp"; } $year = GETPOST("year"); $month = GETPOST("month"); $form = new Form($db); $formother = new FormOther($db); $checkdepositstatic = new RemiseCheque($db); $accountstatic = new Account($db); // If click on purge search criteria ? if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter")) { $search_ref = ''; $search_amount = ''; $search_account = ''; $year = ''; $month = ''; } /* * View */ llxHeader('', $langs->trans("ChequesReceipts")); $sql = "SELECT bc.rowid, bc.number as ref, bc.date_bordereau as dp,"; $sql .= " bc.nbcheque, bc.amount, bc.statut,";
print '<td colspan="3">'; 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;
$page = GETPOST('page', 'int'); if (!$sortorder) { $sortorder = "ASC"; } if (!$sortfield) { $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'); }
} 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">';
if (GETPOST('removefilter')) { $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'); /*
// Number of supplier invoices (has paid) if (!empty($conf->fournisseur->enabled) && !empty($conf->facture->enabled) && $user->rights->facture->lire) { include_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php'; $board = new FactureFournisseur($db); $dashboardlines[] = $board->load_board($user); } // Number of transactions to conciliate if (!empty($conf->banque->enabled) && $user->rights->banque->lire && !$user->societe_id) { include_once DOL_DOCUMENT_ROOT . '/compta/bank/class/account.class.php'; $board = new Account($db); $dashboardlines[] = $board->load_board($user); } // Number of cheque to send if (!empty($conf->banque->enabled) && $user->rights->banque->lire && !$user->societe_id) { include_once DOL_DOCUMENT_ROOT . '/compta/paiement/cheque/class/remisecheque.class.php'; $board = new RemiseCheque($db); $dashboardlines[] = $board->load_board($user); } // Number of foundation members if (!empty($conf->adherent->enabled) && $user->rights->adherent->lire && !$user->societe_id) { include_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php'; $board = new Adherent($db); $dashboardlines[] = $board->load_board($user); } // Number of expense reports to pay if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->lire) { include_once DOL_DOCUMENT_ROOT . '/expensereport/class/expensereport.class.php'; $board = new ExpenseReport($db); $dashboardlines[] = $board->load_board($user); } // Calculate total nb of late
$board = new Account($db); $found = $board->load_board($user); if ($found > 0) { $board->warning_delay = $conf->bank->rappro->warning_delay / 60 / 60 / 24; $board->label = $langs->trans("TransactionsToConciliate"); $board->url = DOL_URL_ROOT . '/compta/bank/index.php?leftmenu=bank&mainmenu=bank'; $board->img = img_object($langs->trans("TransactionsToConciliate"), "payment"); $rowspan++; $dashboardlines[] = $board; } } // Number of cheque to send if (!empty($conf->banque->enabled) && $user->rights->banque->lire && !$user->societe_id) { $langs->load("banks"); include_once DOL_DOCUMENT_ROOT . '/compta/paiement/cheque/class/remisecheque.class.php'; $board = new RemiseCheque($db); $board->load_board($user); $board->warning_delay = $conf->bank->cheque->warning_delay / 60 / 60 / 24; $board->label = $langs->trans("BankChecksToReceipt"); $board->url = DOL_URL_ROOT . '/compta/paiement/cheque/index.php?leftmenu=checks&mainmenu=accountancy'; $board->img = img_object($langs->trans("BankChecksToReceipt"), "payment"); $rowspan++; $dashboardlines[] = $board; } // Number of foundation members if (!empty($conf->adherent->enabled) && $user->rights->adherent->lire && !$user->societe_id) { $langs->load("members"); include_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php'; $board = new Adherent($db); $board->load_board($user); $board->warning_delay = $conf->adherent->cotisation->warning_delay / 60 / 60 / 24;
$page = GETPOST('page', 'int'); if (!$sortorder) { $sortorder = "ASC"; } if (!$sortfield) { $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) { setEventMessages($object->error, $object->errors, 'errors'); } } else { setEventMessages($object->error, $object->errors, 'errors'); }