diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php
index dffba34d59b..78fb178ff27 100644
--- a/htdocs/compta/tva/class/tva.class.php
+++ b/htdocs/compta/tva/class/tva.class.php
@@ -906,4 +906,39 @@ class Tva extends CommonObject
return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode);
}
+
+ /**
+ * Return clicable link of object (with eventually picto)
+ *
+ * @param string $option Where point the link (0=> main card, 1,2 => shipment, 'nolink'=>No link)
+ * @return string HTML Code for Kanban thumb.
+ */
+ public function getKanbanView($option = '')
+ {
+ global $langs;
+ $return = '
| ';
+ print ' ';
}
- }
+ // Output Kanban
- // Ref
- if (!empty($arrayfields['t.rowid']['checked'])) {
- print ' | ';
- print $tva_static->getNomUrl(1);
- $filename = dol_sanitizeFileName($tva_static->ref);
- $filedir = $conf->tax->dir_output.'/vat/'.dol_sanitizeFileName($tva_static->ref);
- $urlsource = $_SERVER['PHP_SELF'].'?id='.$tva_static->id;
- print $formfile->getDocumentsLink($tva_static->element, $filename, $filedir, '', 'valignmiddle paddingleft2imp');
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
+ print $tva_static->getKanbanView('');
+ if ($i == (min($num, $limit) - 1)) {
+ print '';
+ print '
';
}
- }
+ } else {
+ print '';
- // Label
- if (!empty($arrayfields['t.label']['checked'])) {
- print '| '.dol_trunc($obj->label, 40).' | ';
- if (!$i) {
- $totalarray['nbfield']++;
+ // No
+ if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) {
+ print ''.(($offset * $limit) + $i).' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
- }
- // Date end period
- if (!empty($arrayfields['t.datev']['checked'])) {
- print ''.dol_print_date($db->jdate($obj->datev), 'day').' | ';
- if (!$i) {
- $totalarray['nbfield']++;
+ // Ref
+ if (!empty($arrayfields['t.rowid']['checked'])) {
+ print '';
+ print $tva_static->getNomUrl(1);
+ $filename = dol_sanitizeFileName($tva_static->ref);
+ $filedir = $conf->tax->dir_output.'/vat/'.dol_sanitizeFileName($tva_static->ref);
+ $urlsource = $_SERVER['PHP_SELF'].'?id='.$tva_static->id;
+ print $formfile->getDocumentsLink($tva_static->element, $filename, $filedir, '', 'valignmiddle paddingleft2imp');
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
- }
- // Date payment
- /*if (!empty($arrayfields['t.datep']['checked'])) {
- print ''.dol_print_date($db->jdate($obj->datep), 'day').' | ';
- if (!$i) $totalarray['nbfield']++;
- }*/
-
- // Type
- if (!empty($arrayfields['t.fk_typepayment']['checked'])) {
- print '';
- if (!empty($obj->payment_code)) print $langs->trans("PaymentTypeShort".$obj->payment_code);
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
+ // Label
+ if (!empty($arrayfields['t.label']['checked'])) {
+ print ''.dol_trunc($obj->label, 40).' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
- }
- // Account
- if (!empty($arrayfields['t.fk_account']['checked'])) {
- print '';
- if ($obj->fk_account > 0) {
- $bankstatic->id = $obj->fk_account;
- $bankstatic->ref = $obj->bref;
- $bankstatic->number = $obj->bnumber;
- $bankstatic->iban = $obj->iban;
- $bankstatic->bic = $obj->bic;
- $bankstatic->currency_code = $langs->trans("Currency".$obj->currency_code);
- $bankstatic->account_number = $obj->account_number;
- $bankstatic->clos = $obj->clos;
-
- //$accountingjournal->fetch($obj->fk_accountancy_journal);
- //$bankstatic->accountancy_journal = $accountingjournal->getNomUrl(0, 1, 1, '', 1);
-
- $bankstatic->label = $obj->blabel;
- print $bankstatic->getNomUrl(1);
+ // Date end period
+ if (!empty($arrayfields['t.datev']['checked'])) {
+ print ' | '.dol_print_date($db->jdate($obj->datev), 'day').' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
- print '';
- if (!$i) $totalarray['nbfield']++;
- }
- // Amount
- if (!empty($arrayfields['t.amount']['checked'])) {
- $total = $total + $obj->amount;
- print '' . price($obj->amount) . ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- $totalarray['pos'][$totalarray['nbfield']] = 'amount';
- if (empty($totalarray['val']['amount'])) {
- $totalarray['val']['amount'] = $obj->amount;
- } else {
- $totalarray['val']['amount'] += $obj->amount;
- }
- }
+ // Date payment
+ /*if (!empty($arrayfields['t.datep']['checked'])) {
+ print ''.dol_print_date($db->jdate($obj->datep), 'day').' | ';
+ if (!$i) $totalarray['nbfield']++;
+ }*/
- if (!empty($arrayfields['t.status']['checked'])) {
- print '' . $tva_static->LibStatut($obj->paye, 5, $obj->alreadypayed) . ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
+ // Type
+ if (!empty($arrayfields['t.fk_typepayment']['checked'])) {
+ print '';
+ if (!empty($obj->payment_code)) print $langs->trans("PaymentTypeShort".$obj->payment_code);
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
}
+
+ // Account
+ if (!empty($arrayfields['t.fk_account']['checked'])) {
+ print '';
+ if ($obj->fk_account > 0) {
+ $bankstatic->id = $obj->fk_account;
+ $bankstatic->ref = $obj->bref;
+ $bankstatic->number = $obj->bnumber;
+ $bankstatic->iban = $obj->iban;
+ $bankstatic->bic = $obj->bic;
+ $bankstatic->currency_code = $langs->trans("Currency".$obj->currency_code);
+ $bankstatic->account_number = $obj->account_number;
+ $bankstatic->clos = $obj->clos;
+
+ //$accountingjournal->fetch($obj->fk_accountancy_journal);
+ //$bankstatic->accountancy_journal = $accountingjournal->getNomUrl(0, 1, 1, '', 1);
+
+ $bankstatic->label = $obj->blabel;
+ print $bankstatic->getNomUrl(1);
+ }
+ print ' | ';
+ if (!$i) $totalarray['nbfield']++;
+ }
+
+ // Amount
if (!empty($arrayfields['t.amount']['checked'])) {
- $totalarray['pos'][$totalarray['nbfield']] = '';
+ $total = $total + $obj->amount;
+ print '' . price($obj->amount) . ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ $totalarray['pos'][$totalarray['nbfield']] = 'amount';
+ if (empty($totalarray['val']['amount'])) {
+ $totalarray['val']['amount'] = $obj->amount;
+ } else {
+ $totalarray['val']['amount'] += $obj->amount;
+ }
}
+
+ if (!empty($arrayfields['t.status']['checked'])) {
+ print '' . $tva_static->LibStatut($obj->paye, 5, $obj->alreadypayed) . ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ if (!empty($arrayfields['t.amount']['checked'])) {
+ $totalarray['pos'][$totalarray['nbfield']] = '';
+ }
+ }
+
+ // Buttons
+ print ' | ';
+
+ print '
';
}
- // Buttons
- print '