Merge branch 'develop' of https://github.com/Dolibarr/dolibarr into search
This commit is contained in:
commit
c69f254be0
13 changed files with 561 additions and 288 deletions
|
|
@ -63,6 +63,7 @@ $constantes = array(
|
|||
'ADHERENT_EMAIL_TEMPLATE_CANCELATION' =>array('type'=>'emailtemplate:member'),
|
||||
'ADHERENT_EMAIL_TEMPLATE_EXCLUSION' =>array('type'=>'emailtemplate:member'),
|
||||
'ADHERENT_MAIL_FROM' =>array('type'=>'string'),
|
||||
'ADHERENT_CC_MAIL_FROM' =>array('type'=>'string'),
|
||||
'ADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT' =>array('type'=>'string'),
|
||||
'ADHERENT_AUTOREGISTER_NOTIF_MAIL' =>array('type'=>'html', 'tooltip'=>$helptext)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -3146,12 +3146,13 @@ class Adherent extends CommonObject
|
|||
$msg = make_substitutions($arraydefaultmessage->content, $substitutionarray, $outputlangs);
|
||||
$from = getDolGlobalString('ADHERENT_MAIL_FROM');
|
||||
$to = $adherent->email;
|
||||
$cc = getDolGlobalString('ADHERENT_CC_MAIL_FROM');
|
||||
|
||||
$trackid = 'mem'.$adherent->id;
|
||||
$moreinheader = 'X-Dolibarr-Info: sendReminderForExpiredSubscription'."\r\n";
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
|
||||
$cmail = new CMailFile($subject, $to, $from, $msg, array(), array(), array(), '', '', 0, 1, '', '', $trackid, $moreinheader);
|
||||
$cmail = new CMailFile($subject, $to, $from, $msg, array(), array(), array(), $cc, '', 0, 1, '', '', $trackid, $moreinheader);
|
||||
$result = $cmail->sendfile();
|
||||
if (!$result) {
|
||||
$error++;
|
||||
|
|
|
|||
|
|
@ -50,6 +50,9 @@ $action = GETPOST('action', 'aZ09');
|
|||
*/
|
||||
|
||||
if ($action == 'update') {
|
||||
if (GETPOSTISSET('MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING')) {
|
||||
dolibarr_set_const($db, "MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING", GETPOST("MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING"), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
if (GETPOSTISSET('PROPOSAL_PDF_HIDE_PAYMENTTERM')) {
|
||||
dolibarr_set_const($db, "PROPOSAL_PDF_HIDE_PAYMENTTERM", GETPOST("PROPOSAL_PDF_HIDE_PAYMENTTERM"), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5211,7 +5211,7 @@ if ($action == 'create') {
|
|||
print '</td>';
|
||||
print '<td class="right"><span class="amount">'.price($obj->amount_ttc).'</span></td>';
|
||||
print '<td class="right">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&action=unlinkdiscount&token='.newToken().'&discountid='.$obj->rowid.'">'.img_delete().'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&action=unlinkdiscount&token='.newToken().'&discountid='.$obj->rowid.'">'.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink').'</a>';
|
||||
print '</td></tr>';
|
||||
$i++;
|
||||
if ($invoice->type == Facture::TYPE_CREDIT_NOTE) {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
/**
|
||||
* \file htdocs/compta/prelevement/list.php
|
||||
* \ingroup prelevement
|
||||
* \brief Page list of direct debit orders or credit transfers orders
|
||||
* \brief Page to list direct debit orders or credit transfers orders
|
||||
*/
|
||||
|
||||
// Load Dolibarr environment
|
||||
|
|
@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
|||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('banks', 'withdrawals', 'companies', 'categories'));
|
||||
|
||||
$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
|
||||
$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
|
||||
$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
|
||||
$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ?
|
||||
$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation
|
||||
|
|
@ -43,17 +43,19 @@ $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected
|
|||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'directdebitcredittransferlinelist'; // To manage different context of search
|
||||
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
|
||||
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||
$mode = GETPOST('mode', 'alpha');
|
||||
$mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...)
|
||||
|
||||
$type = GETPOST('type', 'aZ09');
|
||||
|
||||
// Load variable for pagination
|
||||
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
||||
$sortorder = GETPOST('sortorder', 'aZ09comma');
|
||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||
if (empty($page) || $page == -1) {
|
||||
if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) {
|
||||
// If $page is not defined, or '' or -1 or if we click on clear filters
|
||||
$page = 0;
|
||||
} // If $page is not defined, or '' or -1
|
||||
}
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
|
|
@ -107,7 +109,11 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
|
|||
|
||||
$form = new Form($db);
|
||||
|
||||
llxHeader('', $langs->trans("WithdrawalsLines"));
|
||||
$title = $langs->trans("WithdrawalsLines");
|
||||
if ($type == 'bank-transfer') {
|
||||
$title = $langs->trans("CreditTransferLines");
|
||||
}
|
||||
$help_url = '';
|
||||
|
||||
$sql = "SELECT p.rowid, p.ref, p.statut as status, p.datec";
|
||||
$sql .= " , f.rowid as facid, f.ref as invoiceref, f.total_ttc";
|
||||
|
|
@ -170,193 +176,315 @@ if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
|
|||
dol_print_error($db);
|
||||
}
|
||||
|
||||
if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
|
||||
if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller than the paging size (filtering), goto and load page 0
|
||||
$page = 0;
|
||||
$offset = 0;
|
||||
}
|
||||
$db->free($resql);
|
||||
}
|
||||
|
||||
// Complete request and execute it with limit
|
||||
$sql .= $db->order($sortfield, $sortorder);
|
||||
if ($limit) {
|
||||
$sql .= $db->plimit($limit + 1, $offset);
|
||||
}
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
$resql = $db->query($sql);
|
||||
if (!$resql) {
|
||||
dol_print_error($db);
|
||||
exit;
|
||||
}
|
||||
|
||||
$param = "&statut=".urlencode($statut);
|
||||
$param .= "&search_bon=".urlencode($search_bon);
|
||||
if (!empty($mode)) {
|
||||
$param .= '&mode='.urlencode($mode);
|
||||
}
|
||||
if ($type == 'bank-transfer') {
|
||||
$param .= '&type=bank-transfer';
|
||||
}
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) {
|
||||
$param .= '&limit='.((int) $limit);
|
||||
}
|
||||
$newcardbutton = '';
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
print"\n<!-- debut table -->\n";
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
if ($optioncss != '') {
|
||||
print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
}
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||
// Output page
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
if ($type != '') {
|
||||
print '<input type="hidden" name="type" value="'.$type.'">';
|
||||
}
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
$title = $langs->trans("WithdrawalsLines");
|
||||
if ($type == 'bank-transfer') {
|
||||
$title = $langs->trans("CreditTransferLines");
|
||||
}
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
$arrayofselected = is_array($toselect) ? $toselect : array();
|
||||
|
||||
$moreforfilter = '';
|
||||
$param = '';
|
||||
$param .= "&statut=".urlencode($statut);
|
||||
$param .= "&search_bon=".urlencode($search_bon);
|
||||
if ($type == 'bank-transfer') {
|
||||
$param .= '&type=bank-transfer';
|
||||
}
|
||||
if (!empty($mode)) {
|
||||
$param .= '&mode='.urlencode($mode);
|
||||
}
|
||||
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
|
||||
$param .= '&contextpage='.urlencode($contextpage);
|
||||
}
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) {
|
||||
$param .= '&limit='.((int) $limit);
|
||||
}
|
||||
if ($optioncss != '') {
|
||||
$param .= '&optioncss='.urlencode($optioncss);
|
||||
}
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
if ($optioncss != '') {
|
||||
print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
}
|
||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
print '<input type="hidden" name="page_y" value="">';
|
||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_line" value="'.dol_escape_htmltag($search_line).'" size="6"></td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_bon" value="'.dol_escape_htmltag($search_bon).'" size="6"></td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_company" value="'.dol_escape_htmltag($search_company).'" size="6"></td>';
|
||||
print '<td class="liste_titre center"><input type="text" class="flat" name="search_code" value="'.dol_escape_htmltag($search_code).'" size="6"></td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre maxwidthsearch">';
|
||||
if ($type != '') {
|
||||
print '<input type="hidden" name="type" value="'.$type.'">';
|
||||
}
|
||||
|
||||
$newcardbutton = '';
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
$moreforfilter = '';
|
||||
/*$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.= $langs->trans('MyFilter') . ': <input type="text" name="search_myfield" value="'.dol_escape_htmltag($search_myfield).'">';
|
||||
$moreforfilter.= '</div>';*/
|
||||
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook)) {
|
||||
$moreforfilter .= $hookmanager->resPrint;
|
||||
} else {
|
||||
$moreforfilter = $hookmanager->resPrint;
|
||||
}
|
||||
|
||||
if (!empty($moreforfilter)) {
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
||||
$selectedfields = ($mode != 'kanban' ? $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')) : ''); // This also change content of $arrayfields
|
||||
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
|
||||
|
||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
|
||||
// Fields title search
|
||||
// --------------------------------------------------------------------
|
||||
print '<tr class="liste_titre_filter">';
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="liste_titre center maxwidthsearch">';
|
||||
$searchpicto = $form->showFilterButtons('left');
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
}
|
||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_line" value="'.dol_escape_htmltag($search_line).'" size="6"></td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_bon" value="'.dol_escape_htmltag($search_bon).'" size="6"></td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre"><input type="text" class="flat" name="search_company" value="'.dol_escape_htmltag($search_company).'" size="6"></td>';
|
||||
print '<td class="liste_titre center"><input type="text" class="flat" name="search_code" value="'.dol_escape_htmltag($search_code).'" size="6"></td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
// Action column
|
||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="liste_titre center maxwidthsearch">';
|
||||
$searchpicto = $form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
print '</tr>'."\n";
|
||||
|
||||
$columntitle = "WithdrawalsReceipts";
|
||||
$columntitlethirdparty = "CustomerCode";
|
||||
$columncodethirdparty = "s.code_client";
|
||||
if ($type == 'bank-transfer') {
|
||||
$columntitle = "BankTransferReceipts";
|
||||
$columntitlethirdparty = "SupplierCode";
|
||||
$columncodethirdparty = "s.code_fournisseur";
|
||||
}
|
||||
$totalarray = array();
|
||||
$totalarray['nbfield'] = 0;
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($columntitle, $_SERVER["PHP_SELF"], "p.ref", '', $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Line", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Bill", $_SERVER["PHP_SELF"], "f.ref", '', $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom", '', $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre($columntitlethirdparty, $_SERVER["PHP_SELF"], $columncodethirdparty, '', $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "pl.amount", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre('');
|
||||
print "</tr>\n";
|
||||
$columntitle = "WithdrawalsReceipts";
|
||||
$columntitlethirdparty = "CustomerCode";
|
||||
$columncodethirdparty = "s.code_client";
|
||||
if ($type == 'bank-transfer') {
|
||||
$columntitle = "BankTransferReceipts";
|
||||
$columntitlethirdparty = "SupplierCode";
|
||||
$columncodethirdparty = "s.code_fournisseur";
|
||||
}
|
||||
|
||||
if ($num) {
|
||||
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
||||
while ($i < $imaxinloop) {
|
||||
$obj = $db->fetch_object($result);
|
||||
// Fields title label
|
||||
// --------------------------------------------------------------------
|
||||
print '<tr class="liste_titre">';
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
print_liste_field_titre($columntitle, $_SERVER["PHP_SELF"], "p.ref", '', $param, '', $sortfield, $sortorder);
|
||||
$totalarray['nbfield']++;
|
||||
print_liste_field_titre("Line", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
|
||||
$totalarray['nbfield']++;
|
||||
print_liste_field_titre("Bill", $_SERVER["PHP_SELF"], "f.ref", '', $param, '', $sortfield, $sortorder);
|
||||
$totalarray['nbfield']++;
|
||||
print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom", '', $param, '', $sortfield, $sortorder);
|
||||
$totalarray['nbfield']++;
|
||||
print_liste_field_titre($columntitlethirdparty, $_SERVER["PHP_SELF"], $columncodethirdparty, '', $param, '', $sortfield, $sortorder, 'center ');
|
||||
$totalarray['nbfield']++;
|
||||
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
$totalarray['nbfield']++;
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "pl.amount", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
$totalarray['nbfield']++;
|
||||
// Action column
|
||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
print '</tr>'."\n";
|
||||
|
||||
$bon->id = $obj->rowid;
|
||||
$bon->ref = $obj->ref;
|
||||
$bon->statut = $obj->status;
|
||||
$bon->date_echeance = $obj->datec;
|
||||
$bon->total = $obj->amount;
|
||||
// Loop on record
|
||||
// --------------------------------------------------------------------
|
||||
$i = 0;
|
||||
$savnbfield = $totalarray['nbfield'];
|
||||
$totalarray = array();
|
||||
$totalarray['nbfield'] = 0;
|
||||
|
||||
$company->id = $obj->socid;
|
||||
$company->name = $obj->name;
|
||||
$company->email = $obj->email;
|
||||
$company->code_client = $obj->code_client;
|
||||
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
||||
while ($i < $imaxinloop) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
if ($mode == 'kanban') {
|
||||
if ($i == 0) {
|
||||
print '<tr><td colspan="12">';
|
||||
print '<div class="box-flex-container kanban">';
|
||||
}
|
||||
// Output Kanban
|
||||
print $bon->getKanbanView('', array('selected' => in_array($bon->id, $arrayofselected)));
|
||||
if ($i == ($imaxinloop - 1)) {
|
||||
print '</div>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
} else {
|
||||
print '<tr class="oddeven">';
|
||||
$bon->id = $obj->rowid;
|
||||
$bon->ref = $obj->ref;
|
||||
$bon->statut = $obj->status;
|
||||
$bon->date_echeance = $obj->datec;
|
||||
$bon->total = $obj->amount;
|
||||
|
||||
print '<td>';
|
||||
print $bon->getNomUrl(1);
|
||||
print "</td>\n";
|
||||
$object = $bon;
|
||||
|
||||
print '<td>';
|
||||
print $line->LibStatut($obj->statut_ligne, 2);
|
||||
print " ";
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/prelevement/line.php?id='.$obj->rowid_ligne.'">';
|
||||
print substr('000000'.$obj->rowid_ligne, -6);
|
||||
print '</a></td>';
|
||||
$company->id = $obj->socid;
|
||||
$company->name = $obj->name;
|
||||
$company->email = $obj->email;
|
||||
$company->code_client = $obj->code_client;
|
||||
|
||||
print '<td>';
|
||||
$link_to_bill = '/compta/facture/card.php?facid=';
|
||||
$link_title = 'Invoice';
|
||||
$link_picto = 'bill';
|
||||
if ($type == 'bank-transfer') {
|
||||
$link_to_bill = '/fourn/facture/card.php?facid=';
|
||||
$link_title = 'SupplierInvoice';
|
||||
$link_picto = 'supplier_invoice';
|
||||
}
|
||||
print '<a href="'.DOL_URL_ROOT.$link_to_bill.$obj->facid.'">';
|
||||
print img_object($langs->trans($link_title), $link_picto);
|
||||
print ' '.$obj->invoiceref."</td>\n";
|
||||
print '</a>';
|
||||
print '</td>';
|
||||
|
||||
print '<td>';
|
||||
print $company->getNomUrl(1);
|
||||
print "</td>\n";
|
||||
|
||||
|
||||
print '<td class="center">';
|
||||
$link_to_tab = '/comm/card.php?socid=';
|
||||
$link_code = $obj->code_client;
|
||||
if ($type == 'bank-transfer') {
|
||||
$link_to_tab = '/fourn/card.php?socid=';
|
||||
$link_code = $obj->code_fournisseur;
|
||||
}
|
||||
print '<a href="'.DOL_URL_ROOT.$link_to_tab.$company->id.'">'.$link_code."</a></td>\n";
|
||||
|
||||
print '<td class="center">'.dol_print_date($db->jdate($obj->datec), 'day')."</td>\n";
|
||||
|
||||
print '<td class="right"><span class="amount">'.price($obj->amount)."</span></td>\n";
|
||||
|
||||
print '<td> </td>';
|
||||
|
||||
print "</tr>\n";
|
||||
if ($mode == 'kanban') {
|
||||
if ($i == 0) {
|
||||
print '<tr><td colspan="'.$savnbfield.'">';
|
||||
print '<div class="box-flex-container kanban">';
|
||||
}
|
||||
// Output Kanban
|
||||
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
$selected = 0;
|
||||
if (in_array($object->id, $arrayofselected)) {
|
||||
$selected = 1;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
print $object->getKanbanView('', array('selected' => in_array($bon->id, $arrayofselected)));
|
||||
if ($i == ($imaxinloop - 1)) {
|
||||
print '</div>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
} else {
|
||||
print '<tr><td colspan="8"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
|
||||
// Show line of result
|
||||
$j = 0;
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
||||
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="nowrap center">';
|
||||
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
$selected = 0;
|
||||
if (in_array($object->id, $arrayofselected)) {
|
||||
$selected = 1;
|
||||
}
|
||||
print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||
}
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
}
|
||||
print '<td>';
|
||||
print $bon->getNomUrl(1);
|
||||
print "</td>\n";
|
||||
|
||||
print '<td>';
|
||||
print $line->LibStatut($obj->statut_ligne, 2);
|
||||
print " ";
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/prelevement/line.php?id='.$obj->rowid_ligne.'">';
|
||||
print substr('000000'.$obj->rowid_ligne, -6);
|
||||
print '</a></td>';
|
||||
|
||||
print '<td>';
|
||||
$link_to_bill = '/compta/facture/card.php?facid=';
|
||||
$link_title = 'Invoice';
|
||||
$link_picto = 'bill';
|
||||
if ($type == 'bank-transfer') {
|
||||
$link_to_bill = '/fourn/facture/card.php?facid=';
|
||||
$link_title = 'SupplierInvoice';
|
||||
$link_picto = 'supplier_invoice';
|
||||
}
|
||||
print '<a href="'.DOL_URL_ROOT.$link_to_bill.$obj->facid.'">';
|
||||
print img_object($langs->trans($link_title), $link_picto);
|
||||
print ' '.$obj->invoiceref."</td>\n";
|
||||
print '</a>';
|
||||
print '</td>';
|
||||
|
||||
print '<td>';
|
||||
print $company->getNomUrl(1);
|
||||
print "</td>\n";
|
||||
|
||||
|
||||
print '<td class="center">';
|
||||
$link_to_tab = '/comm/card.php?socid=';
|
||||
$link_code = $obj->code_client;
|
||||
if ($type == 'bank-transfer') {
|
||||
$link_to_tab = '/fourn/card.php?socid=';
|
||||
$link_code = $obj->code_fournisseur;
|
||||
}
|
||||
print '<a href="'.DOL_URL_ROOT.$link_to_tab.$company->id.'">'.$link_code."</a></td>\n";
|
||||
|
||||
print '<td class="center">'.dol_print_date($db->jdate($obj->datec), 'day')."</td>\n";
|
||||
|
||||
print '<td class="right"><span class="amount">'.price($obj->amount)."</span></td>\n";
|
||||
|
||||
// Action column
|
||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="nowrap center">';
|
||||
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
$selected = 0;
|
||||
if (in_array($object->id, $arrayofselected)) {
|
||||
$selected = 1;
|
||||
}
|
||||
print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||
}
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
}
|
||||
|
||||
print '</tr>'."\n";
|
||||
}
|
||||
print "</table>";
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
$db->free($result);
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($num == 0) {
|
||||
print '<tr><td colspan="8"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
|
||||
}
|
||||
|
||||
$db->free($result);
|
||||
|
||||
$parameters = array('arrayfields' => $arrayfields, 'sql' => $sql);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
print '</table>'."\n";
|
||||
print '</div>'."\n";
|
||||
|
||||
print '</form>'."\n";
|
||||
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
|
|
|||
|
|
@ -32,17 +32,27 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
|||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('banks', 'categories', 'withdrawals'));
|
||||
|
||||
$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
|
||||
$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
|
||||
$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation
|
||||
$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button
|
||||
$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'directdebitcredittransferlist'; // To manage different context of search
|
||||
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
|
||||
$optioncss = GETPOST('optioncss', 'alpha');
|
||||
$mode = GETPOST('mode', 'alpha');
|
||||
|
||||
$type = GETPOST('type', 'aZ09');
|
||||
|
||||
// Load variable for pagination
|
||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
||||
$sortorder = GETPOST('sortorder', 'aZ09comma');
|
||||
$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int');
|
||||
if (empty($page) || $page == -1) {
|
||||
if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) {
|
||||
// If $page is not defined, or '' or -1 or if we click on clear filters
|
||||
$page = 0;
|
||||
} // If $page is not defined, or '' or -1
|
||||
}
|
||||
$offset = $limit * $page;
|
||||
$pageprev = $page - 1;
|
||||
$pagenext = $page + 1;
|
||||
|
|
@ -53,10 +63,6 @@ if (!$sortfield) {
|
|||
$sortfield = "p.datec";
|
||||
}
|
||||
|
||||
$optioncss = GETPOST('optioncss', 'alpha');
|
||||
$mode = GETPOST('mode', 'alpha');
|
||||
|
||||
|
||||
// Get supervariables
|
||||
$statut = GETPOST('statut', 'int');
|
||||
$search_ref = GETPOST('search_ref', 'alpha');
|
||||
|
|
@ -96,7 +102,16 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
|
|||
* View
|
||||
*/
|
||||
|
||||
llxHeader('', $langs->trans("WithdrawalsReceipts"));
|
||||
$directdebitorder = new BonPrelevement($db);
|
||||
|
||||
$titlekey = "WithdrawalsReceipts";
|
||||
$title = $langs->trans("WithdrawalsReceipts");
|
||||
if ($type == 'bank-transfer') {
|
||||
$titlekey = "BankTransferReceipts";
|
||||
$title = $langs->trans("BankTransferReceipts");
|
||||
}
|
||||
$help_url = '';
|
||||
|
||||
|
||||
$sql = "SELECT p.rowid, p.ref, p.amount, p.statut, p.datec";
|
||||
|
||||
|
|
@ -130,7 +145,7 @@ if (!getDolGlobalInt('MAIN_DISABLE_FULL_SCANLIST')) {
|
|||
dol_print_error($db);
|
||||
}
|
||||
|
||||
if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0
|
||||
if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller than the paging size (filtering), goto and load page 0
|
||||
$page = 0;
|
||||
$offset = 0;
|
||||
}
|
||||
|
|
@ -143,142 +158,252 @@ if ($limit) {
|
|||
$sql .= $db->plimit($limit + 1, $offset);
|
||||
}
|
||||
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
$num = $db->num_rows($result);
|
||||
$i = 0;
|
||||
$resql = $db->query($sql);
|
||||
if (!$resql) {
|
||||
dol_print_error($db);
|
||||
exit;
|
||||
}
|
||||
|
||||
$param = '';
|
||||
if (!empty($mode)) {
|
||||
$param .= '&mode='.urlencode($mode);
|
||||
}
|
||||
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
|
||||
$param .= '&contextpage='.urlencode($contextpage);
|
||||
}
|
||||
if ($type == 'bank-transfer') {
|
||||
$param .= '&type=bank-transfer';
|
||||
}
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) {
|
||||
$param .= '&limit='.((int) $limit);
|
||||
}
|
||||
$param .= "&statut=".urlencode($statut);
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
$selectedfields = '';
|
||||
// Output page
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
$newcardbutton = '';
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
|
||||
if ($usercancreate) {
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewStandingOrder'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/prelevement/create.php?type='.urlencode($type));
|
||||
}
|
||||
llxHeader('', $title, $help_url);
|
||||
|
||||
// Lines of title fields
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
if ($optioncss != '') {
|
||||
print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
}
|
||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||
$arrayofselected = is_array($toselect) ? $toselect : array();
|
||||
|
||||
if ($type != '') {
|
||||
print '<input type="hidden" name="type" value="'.$type.'">';
|
||||
}
|
||||
$titlekey = "WithdrawalsReceipts";
|
||||
$title = $langs->trans("WithdrawalsReceipts");
|
||||
if ($type == 'bank-transfer') {
|
||||
$titlekey = "BankTransferReceipts";
|
||||
$title = $langs->trans("BankTransferReceipts");
|
||||
}
|
||||
$param = '';
|
||||
$param .= "&statut=".urlencode($statut);
|
||||
if ($type == 'bank-transfer') {
|
||||
$param .= '&type=bank-transfer';
|
||||
}
|
||||
if (!empty($mode)) {
|
||||
$param .= '&mode='.urlencode($mode);
|
||||
}
|
||||
if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) {
|
||||
$param .= '&contextpage='.urlencode($contextpage);
|
||||
}
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) {
|
||||
$param .= '&limit='.((int) $limit);
|
||||
}
|
||||
if ($optioncss != '') {
|
||||
$param .= '&optioncss='.urlencode($optioncss);
|
||||
}
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
$moreforfilter = '';
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
if ($optioncss != '') {
|
||||
print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
}
|
||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
print '<input type="hidden" name="page_y" value="">';
|
||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
if ($type != '') {
|
||||
print '<input type="hidden" name="type" value="'.$type.'">';
|
||||
}
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="search_ref" value="'.dol_escape_htmltag($search_ref).'"></td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre right"><input type="text" class="flat maxwidth100" name="search_amount" value="'.dol_escape_htmltag($search_amount).'"></td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre maxwidthsearch">';
|
||||
$newcardbutton = '';
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
|
||||
if ($usercancreate) {
|
||||
$newcardbutton .= dolGetButtonTitle($langs->trans('NewStandingOrder'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/prelevement/create.php?type='.urlencode($type));
|
||||
}
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
$moreforfilter = '';
|
||||
/*$moreforfilter.='<div class="divsearchfield">';
|
||||
$moreforfilter.= $langs->trans('MyFilter') . ': <input type="text" name="search_myfield" value="'.dol_escape_htmltag($search_myfield).'">';
|
||||
$moreforfilter.= '</div>';*/
|
||||
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
if (empty($reshook)) {
|
||||
$moreforfilter .= $hookmanager->resPrint;
|
||||
} else {
|
||||
$moreforfilter = $hookmanager->resPrint;
|
||||
}
|
||||
|
||||
if (!empty($moreforfilter)) {
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
print $moreforfilter;
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
|
||||
$selectedfields = ($mode != 'kanban' ? $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')) : ''); // This also change content of $arrayfields
|
||||
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
|
||||
|
||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
|
||||
print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
|
||||
// Fields title search
|
||||
// --------------------------------------------------------------------
|
||||
print '<tr class="liste_titre_filter">';
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="liste_titre center maxwidthsearch">';
|
||||
$searchpicto = $form->showFilterButtons('left');
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
}
|
||||
print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="search_ref" value="'.dol_escape_htmltag($search_ref).'"></td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre right"><input type="text" class="flat maxwidth100" name="search_amount" value="'.dol_escape_htmltag($search_amount).'"></td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
// Action column
|
||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="liste_titre center maxwidthsearch">';
|
||||
$searchpicto = $form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
print '</tr>'."\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($titlekey, $_SERVER["PHP_SELF"], "p.ref", '', $param, '', $sortfield, $sortorder);
|
||||
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "p.amount", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'maxwidthsearch center ')."\n";
|
||||
print "</tr>\n";
|
||||
$totalarray = array();
|
||||
$totalarray['nbfield'] = 0;
|
||||
|
||||
$directdebitorder = new BonPrelevement($db);
|
||||
// Fields title label
|
||||
// --------------------------------------------------------------------
|
||||
print '<tr class="liste_titre">';
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
print_liste_field_titre($titlekey, $_SERVER["PHP_SELF"], "p.ref", '', $param, '', $sortfield, $sortorder);
|
||||
$totalarray['nbfield']++;
|
||||
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center ');
|
||||
$totalarray['nbfield']++;
|
||||
print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "p.amount", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
$totalarray['nbfield']++;
|
||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right ');
|
||||
$totalarray['nbfield']++;
|
||||
// Action column
|
||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
print '</tr>'."\n";
|
||||
|
||||
if ($num) {
|
||||
while ($i < min($num, $limit)) {
|
||||
$obj = $db->fetch_object($result);
|
||||
// Loop on record
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
$directdebitorder->id = $obj->rowid;
|
||||
$directdebitorder->ref = $obj->ref;
|
||||
$directdebitorder->date_echeance = $obj->datec;
|
||||
$directdebitorder->total = $obj->amount;
|
||||
$directdebitorder->statut = $obj->statut;
|
||||
$i = 0;
|
||||
$savnbfield = $totalarray['nbfield'];
|
||||
$totalarray = array();
|
||||
$totalarray['nbfield'] = 0;
|
||||
|
||||
if ($mode == 'kanban') {
|
||||
if ($i == 0) {
|
||||
print '<tr><td colspan="12">';
|
||||
print '<div class="box-flex-container kanban">';
|
||||
}
|
||||
// Output Kanban
|
||||
print $directdebitorder->getKanbanView('', array('selected' => in_array($obj->id, $arrayofselected)));
|
||||
if ($i == (min($num, $limit) - 1)) {
|
||||
print '</div>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
} else {
|
||||
print '<tr class="oddeven">';
|
||||
$imaxinloop = ($limit ? min($num, $limit) : $num);
|
||||
while ($i < $imaxinloop) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
print '<td>';
|
||||
print $directdebitorder->getNomUrl(1);
|
||||
print "</td>\n";
|
||||
$directdebitorder->id = $obj->rowid;
|
||||
$directdebitorder->ref = $obj->ref;
|
||||
$directdebitorder->date_echeance = $obj->datec;
|
||||
$directdebitorder->total = $obj->amount;
|
||||
$directdebitorder->statut = $obj->statut;
|
||||
|
||||
print '<td class="center">'.dol_print_date($db->jdate($obj->datec), 'day')."</td>\n";
|
||||
$object = $directdebitorder;
|
||||
|
||||
print '<td class="right"><span class="amount">'.price($obj->amount)."</span></td>\n";
|
||||
|
||||
print '<td class="right">';
|
||||
print $bon->LibStatut($obj->statut, 5);
|
||||
print '</td>';
|
||||
|
||||
print '<td class="right"></td>'."\n";
|
||||
|
||||
print "</tr>\n";
|
||||
if ($mode == 'kanban') {
|
||||
if ($i == 0) {
|
||||
print '<tr><td colspan="'.$savnbfield.'">';
|
||||
print '<div class="box-flex-container kanban">';
|
||||
}
|
||||
// Output Kanban
|
||||
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
$selected = 0;
|
||||
if (in_array($object->id, $arrayofselected)) {
|
||||
$selected = 1;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
print $directdebitorder->getKanbanView('', array('selected' => in_array($obj->id, $arrayofselected)));
|
||||
if ($i == ($imaxinloop - 1)) {
|
||||
print '</div>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
} else {
|
||||
print '<tr><td colspan="5"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
|
||||
// Show line of result
|
||||
$j = 0;
|
||||
print '<tr data-rowid="'.$object->id.'" class="oddeven">';
|
||||
|
||||
// Action column
|
||||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="nowrap center">';
|
||||
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
$selected = 0;
|
||||
if (in_array($object->id, $arrayofselected)) {
|
||||
$selected = 1;
|
||||
}
|
||||
print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||
}
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
}
|
||||
|
||||
print '<td>';
|
||||
print $directdebitorder->getNomUrl(1);
|
||||
print "</td>\n";
|
||||
|
||||
print '<td class="center">'.dol_print_date($db->jdate($obj->datec), 'day')."</td>\n";
|
||||
|
||||
print '<td class="right"><span class="amount">'.price($obj->amount)."</span></td>\n";
|
||||
|
||||
print '<td class="right">';
|
||||
print $bon->LibStatut($obj->statut, 5);
|
||||
print '</td>';
|
||||
|
||||
// Action column
|
||||
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
print '<td class="nowrap center">';
|
||||
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
|
||||
$selected = 0;
|
||||
if (in_array($object->id, $arrayofselected)) {
|
||||
$selected = 1;
|
||||
}
|
||||
print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||
}
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
}
|
||||
|
||||
print '</tr>'."\n";
|
||||
}
|
||||
|
||||
print "</table>";
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
$db->free($result);
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($num == 0) {
|
||||
print '<tr><td colspan="5"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
|
||||
}
|
||||
|
||||
$db->free($result);
|
||||
|
||||
$parameters = array('arrayfields' => $arrayfields, 'sql' => $sql);
|
||||
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
print '</table>'."\n";
|
||||
print '</div>'."\n";
|
||||
|
||||
print '</form>'."\n";
|
||||
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
|
|
|
|||
|
|
@ -118,23 +118,30 @@ if ($resql) {
|
|||
while ($i < $num) {
|
||||
$row = $db->fetch_row($resql);
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
print '<td>';
|
||||
print $ligne->LibStatut($row[2], 1);
|
||||
//print $st[$row[2]];
|
||||
print '</td><td align="center">';
|
||||
print '</td>';
|
||||
|
||||
print '<td align="center">';
|
||||
print $row[1];
|
||||
print '</td>';
|
||||
|
||||
print '</td><td class="right">';
|
||||
print '<td class="right">';
|
||||
print round($row[1] / $nbtotal * 100, 2)." %";
|
||||
print '</td>';
|
||||
|
||||
print '</td><td class="right">';
|
||||
|
||||
print '<td class="right amount">';
|
||||
print price($row[0]);
|
||||
print '</td>';
|
||||
|
||||
print '</td><td class="right">';
|
||||
print '<td class="right">';
|
||||
print round($row[0] / $total * 100, 2)." %";
|
||||
print '</td></tr>';
|
||||
print '</td>';
|
||||
|
||||
print '</tr>';
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ class box_members_by_tags extends ModeleBoxes
|
|||
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'class="tdoverflowmax150 maxwidth150onsmartphone"',
|
||||
'text' => '<a href="'.$DOL_MAIN_URL_ROOT.'/adherents/list.php?search_categ='.$adhtag->id.'&sortfield=d.datefin,t.subscription&sortorder=desc,desc&backtopage='.urlencode($_SERVER['PHP_SELF']).'">'.dol_trunc(($adhtag->ref ? $adhtag->ref : $adhtag->label), dol_size(32)).'</a>',
|
||||
'text' => '<a href="'.DOL_MAIN_URL_ROOT.'/adherents/list.php?search_categ='.$adhtag->id.'&sortfield=d.datefin,t.subscription&sortorder=desc,desc&backtopage='.urlencode($_SERVER['PHP_SELF']).'">'.dol_trunc(($adhtag->ref ? $adhtag->ref : $adhtag->label), dol_size(32)).'</a>',
|
||||
'asis' => 1,
|
||||
);
|
||||
$this->info_box_contents[$line][] = array(
|
||||
|
|
|
|||
|
|
@ -1766,7 +1766,7 @@ function form_constantes($tableau, $strictw3c = 0, $helptext = '', $text = 'Valu
|
|||
}
|
||||
print '</div>';
|
||||
//print 'http://lists.example.com/cgi-bin/mailman/admin/%LISTE%/members/remove?adminpw=%MAILMAN_ADMINPW%&unsubscribees=%EMAIL%';
|
||||
} elseif ($const == 'ADHERENT_MAIL_FROM') {
|
||||
} elseif (in_array($const, ['ADHERENT_MAIL_FROM', 'ADHERENT_CC_MAIL_FROM'])) {
|
||||
print ' '.img_help(1, $langs->trans("EMailHelpMsgSPFDKIM"));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3621,7 +3621,7 @@ if ($action == 'create') {
|
|||
print ' :</td>';
|
||||
print '<td class="right">'.price($obj->amount_ttc).'</td>';
|
||||
print '<td class="right">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&action=unlinkdiscount&discountid='.$obj->rowid.'">'.img_delete().'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?facid='.$object->id.'&action=unlinkdiscount&discountid='.$obj->rowid.'">'.img_picto($langs->transnoentitiesnoconv("RemoveLink"), 'unlink').'</a>';
|
||||
print '</td></tr>';
|
||||
$i++;
|
||||
if ($invoice->type == FactureFournisseur::TYPE_CREDIT_NOTE) {
|
||||
|
|
|
|||
|
|
@ -162,6 +162,7 @@ DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=Email template to use to send emai
|
|||
DescADHERENT_EMAIL_TEMPLATE_CANCELATION=Email template to use to send email to a member on member cancelation
|
||||
DescADHERENT_EMAIL_TEMPLATE_EXCLUSION=Email template to use to send email to a member on member exclusion
|
||||
DescADHERENT_MAIL_FROM=Sender Email for automatic emails
|
||||
DescADHERENT_CC_MAIL_FROM=Send automatic email copy to
|
||||
DescADHERENT_ETIQUETTE_TYPE=Format of labels page
|
||||
DescADHERENT_ETIQUETTE_TEXT=Text printed on member address sheets
|
||||
DescADHERENT_CARD_TYPE=Format of cards page
|
||||
|
|
|
|||
|
|
@ -158,6 +158,7 @@ DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=Modèle d'email électronique à u
|
|||
DescADHERENT_EMAIL_TEMPLATE_CANCELATION=Modèle d'email utilisé pour envoyer un email à un adhérent lors de l'annulation d'adhésion
|
||||
DescADHERENT_EMAIL_TEMPLATE_EXCLUSION=Modèle de courriel à utiliser pour envoyer un courriel à un adhérent lors de son exclusion
|
||||
DescADHERENT_MAIL_FROM=Email émetteur pour les mails automatiques
|
||||
DescADHERENT_CC_MAIL_FROM=Email en copie des mails automatiques
|
||||
DescADHERENT_ETIQUETTE_TYPE=Format pages étiquettes
|
||||
DescADHERENT_ETIQUETTE_TEXT=Texte imprimé sur les planches d'adresses adhérent
|
||||
DescADHERENT_CARD_TYPE=Format pages cartes d'adhérent
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* Copyright (C) 2016 Francis Appels <francis.appels@yahoo.com>
|
||||
* Copyright (C) 2021 Noé Cendrier <noe.cendrier@altairis.fr>
|
||||
* Copyright (C) 2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2022 Charlene Benke <charlene@patas-monkey.com>
|
||||
* Copyright (C) 2022-2023 Charlene Benke <charlene@patas-monkey.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -56,6 +56,8 @@ $id = GETPOST('id', 'int');
|
|||
$socid = GETPOST('socid', 'int');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
|
||||
// Load variable for pagination
|
||||
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
$sortfield = GETPOST('sortfield', 'aZ09comma');
|
||||
$sortorder = GETPOST('sortorder', 'aZ09comma');
|
||||
if (!$sortfield) {
|
||||
|
|
@ -632,6 +634,8 @@ if ($action == 'create') {
|
|||
print_liste_field_titre("EstimatedStockValueShort", "", "", "&id=".$id, "", '', $sortfield, $sortorder, 'right ');
|
||||
$totalarray['nbfield']++;
|
||||
$totalarray['pos'][$totalarray['nbfield']] = 'totalvalue';
|
||||
$totalarray['type'][$totalarray['nbfield']] = '';
|
||||
|
||||
|
||||
if (empty($conf->global->PRODUIT_MULTIPRICES)) {
|
||||
print_liste_field_titre("SellPriceMin", "", "p.price", "&id=".$id, "", '', $sortfield, $sortorder, 'right ');
|
||||
|
|
@ -641,6 +645,8 @@ if ($action == 'create') {
|
|||
print_liste_field_titre("EstimatedStockValueSellShort", "", "", "&id=".$id, "", '', $sortfield, $sortorder, 'right ');
|
||||
$totalarray['nbfield']++;
|
||||
$totalarray['pos'][$totalarray['nbfield']] = 'totalvaluesell';
|
||||
$totalarray['type'][$totalarray['nbfield']] = '';
|
||||
|
||||
}
|
||||
if ($user->rights->stock->mouvement->creer) {
|
||||
print_liste_field_titre('');
|
||||
|
|
|
|||
Loading…
Reference in a new issue