';
- // Date payment
- if ($arrayfields['datep']['checked']) {
- print '| '.dol_print_date($obj->datep, 'day')." | ";
- if (!$i) {
- $totalarray['nbfield']++;
+ // No
+ if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) {
+ print ''.(($offset * $limit) + $i).' | ';
}
- }
-
- // Date value
- if ($arrayfields['datev']['checked']) {
- print ''.dol_print_date($obj->datev, 'day')." | ";
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
-
- // Type
- if ($arrayfields['type']['checked']) {
- print '';
- if ($obj->payment_code) {
- print $langs->trans("PaymentTypeShort".$obj->payment_code);
- print ' ';
- }
- print $obj->num_payment;
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
-
- // Project
- if ($arrayfields['project']['checked']) {
- print '';
- if ($obj->fk_project > 0) {
- $proj->fetch($obj->fk_project);
- print $proj->getNomUrl(1);
- }
- print ' | ';
- if (!$i) {
- $totalarray['nbfield']++;
- }
- }
-
- // Bank account
- if ($arrayfields['bank']['checked']) {
- print '';
- if ($obj->bid > 0) {
- $accountstatic->id = $obj->bid;
- $accountstatic->ref = $obj->bref;
- $accountstatic->number = $obj->bnumber;
-
- if (isModEnabled('accounting')) {
- $accountstatic->account_number = $obj->bank_account_number;
- $accountingjournal->fetch($obj->accountancy_journal);
- $accountstatic->accountancy_journal = $accountingjournal->getNomUrl(0, 1, 1, '', 1);
+ // Ref
+ if ($arrayfields['ref']['checked']) {
+ print ' | '.$variousstatic->getNomUrl(1)." | ";
+ if (!$i) {
+ $totalarray['nbfield']++;
}
-
- $accountstatic->label = $obj->blabel;
- print $accountstatic->getNomUrl(1);
- } else {
- print ' ';
}
- print '';
+
+ // Label payment
+ if ($arrayfields['label']['checked']) {
+ print ''.$variousstatic->label." | ";
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+
+ // Date payment
+ if ($arrayfields['datep']['checked']) {
+ print ''.dol_print_date($obj->datep, 'day')." | ";
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+
+
+ // Date value
+ if ($arrayfields['datev']['checked']) {
+ print ''.dol_print_date($obj->datev, 'day')." | ";
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+
+ // Type
+ if ($arrayfields['type']['checked']) {
+ print '';
+ if ($obj->payment_code) {
+ print $langs->trans("PaymentTypeShort".$obj->payment_code);
+ print ' ';
+ }
+ print $obj->num_payment;
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+
+ // Project
+ if ($arrayfields['project']['checked']) {
+ print '';
+ if ($obj->fk_project > 0) {
+ $proj->fetch($obj->fk_project);
+ print $proj->getNomUrl(1);
+ }
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+
+ // Bank account
+ if ($arrayfields['bank']['checked']) {
+ print '';
+ if ($obj->bid > 0) {
+ $accountstatic->id = $obj->bid;
+ $accountstatic->ref = $obj->bref;
+ $accountstatic->number = $obj->bnumber;
+
+ if (isModEnabled('accounting')) {
+ $accountstatic->account_number = $obj->bank_account_number;
+ $accountingjournal->fetch($obj->accountancy_journal);
+ $accountstatic->accountancy_journal = $accountingjournal->getNomUrl(0, 1, 1, '', 1);
+ }
+
+ $accountstatic->label = $obj->blabel;
+ print $accountstatic->getNomUrl(1);
+ } else {
+ print ' ';
+ }
+ print ' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+
+ // Bank entry
+ if ($arrayfields['entry']['checked']) {
+ $bankline->fetch($obj->fk_bank);
+ print ''.$bankline->getNomUrl(1).' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+
+ // Accounting account
+ if (!empty($arrayfields['account']['checked'])) {
+ $accountingaccount->fetch('', $obj->accountancy_code, 1);
+
+ print ''.$accountingaccount->getNomUrl(0, 1, 1, '', 1).' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+
+ // Accounting subledger account
+ if (!empty($arrayfields['subledger']['checked'])) {
+ print ''.length_accounta($obj->subledger_account).' | ';
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ }
+
+ // Debit
+ if ($arrayfields['debit']['checked']) {
+ print '';
+ if ($obj->sens == 0) {
+ print ''.price($obj->amount).'';
+ $totalarray['val']['total_deb'] += $obj->amount;
+ }
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ if (!$i) {
+ $totalarray['pos'][$totalarray['nbfield']] = 'total_deb';
+ }
+ print ' | ';
+ }
+
+ // Credit
+ if ($arrayfields['credit']['checked']) {
+ print '';
+ if ($obj->sens == 1) {
+ print ''.price($obj->amount).'';
+ $totalarray['val']['total_cred'] += $obj->amount;
+ }
+ if (!$i) {
+ $totalarray['nbfield']++;
+ }
+ if (!$i) {
+ $totalarray['pos'][$totalarray['nbfield']] = 'total_cred';
+ }
+ print ' | ';
+ }
+
+ print ' | ';
+
if (!$i) {
$totalarray['nbfield']++;
}
+
+ print '
'."\n";
}
-
- // Bank entry
- if ($arrayfields['entry']['checked']) {
- $bankline->fetch($obj->fk_bank);
- print '