Merge pull request #23535 from lamrani002/kanbanForPrelevement
NEW kanban view for ligne prelevement
This commit is contained in:
commit
44e7158739
@ -43,6 +43,7 @@ $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');
|
||||
|
||||
$type = GETPOST('type', 'aZ09');
|
||||
|
||||
@ -188,12 +189,18 @@ if ($result) {
|
||||
|
||||
$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='.urlencode($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'));
|
||||
|
||||
print"\n<!-- debut table -->\n";
|
||||
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'">'."\n";
|
||||
@ -206,6 +213,8 @@ if ($result) {
|
||||
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.'">';
|
||||
|
||||
if ($type != '') {
|
||||
print '<input type="hidden" name="type" value="'.$type.'">';
|
||||
}
|
||||
@ -214,7 +223,7 @@ if ($result) {
|
||||
if ($type == 'bank-transfer') {
|
||||
$title = $langs->trans("CreditTransferLines");
|
||||
}
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, '', '', $limit, 0, 0, 1);
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||
|
||||
$moreforfilter = '';
|
||||
|
||||
@ -262,61 +271,77 @@ if ($result) {
|
||||
$bon->id = $obj->rowid;
|
||||
$bon->ref = $obj->ref;
|
||||
$bon->statut = $obj->status;
|
||||
$bon->date_echeance = $obj->datec;
|
||||
$bon->total = $obj->amount;
|
||||
|
||||
$company->id = $obj->socid;
|
||||
$company->name = $obj->name;
|
||||
$company->email = $obj->email;
|
||||
$company->code_client = $obj->code_client;
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
if ($mode == 'kanban') {
|
||||
if ($i == 0) {
|
||||
print '<tr><td colspan="12">';
|
||||
print '<div class="box-flex-container">';
|
||||
}
|
||||
// Output Kanban
|
||||
|
||||
print '<td>';
|
||||
print $bon->getNomUrl(1);
|
||||
print "</td>\n";
|
||||
print $bon->getKanbanView('');
|
||||
if ($i == (min($num, $limit) - 1)) {
|
||||
print '</div>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
} else {
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
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>';
|
||||
print $bon->getNomUrl(1);
|
||||
print "</td>\n";
|
||||
|
||||
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 '<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";
|
||||
|
||||
print '<td> </td>';
|
||||
|
||||
print "</tr>\n";
|
||||
}
|
||||
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";
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user