Skip to content

Commit

Permalink
Merge pull request #12085 from aspangaro/11.0_accounting
Browse files Browse the repository at this point in the history
NEW : Accountancy - List by account - Modify sortfield, nowrap on amo…
  • Loading branch information
eldy committed Oct 11, 2019
2 parents 5d6b4c5 + fbc4e3b commit b41f727
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions htdocs/accountancy/bookkeeping/listbyaccount.php
Expand Up @@ -71,7 +71,7 @@
$pageprev = $page - 1;
$pagenext = $page + 1;
if ($sortorder == "") $sortorder = "ASC";
if ($sortfield == "") $sortfield = "t.rowid";
if ($sortfield == "") $sortfield = "t.doc_date";

if (empty($search_date_start) && empty($search_date_end)) {
$sql = "SELECT date_start, date_end from ".MAIN_DB_PREFIX."accounting_fiscalyear ";
Expand Down Expand Up @@ -376,8 +376,8 @@
print strlen(length_accounta($line->subledger_account)) == 0 ? '<td>' . $line->label_operation . '</td>' : '<td>' . $line->label_operation . '<br><span style="font-size:0.8em">(' . length_accounta($line->subledger_account) . ')</span></td>';


print '<td class="right">' . ($line->debit ? price($line->debit) :''). '</td>';
print '<td class="right">' . ($line->credit ? price($line->credit) : '') . '</td>';
print '<td class="nowrap right">' . ($line->debit ? price($line->debit) :''). '</td>';
print '<td class="nowrap right">' . ($line->credit ? price($line->credit) : '') . '</td>';

$accountingjournal = new AccountingJournal($db);
$result = $accountingjournal->fetch('', $line->code_journal);
Expand All @@ -397,24 +397,27 @@
$i++;
}

// Affiche un Sous-Total du dernier compte comptable affiché
// Show sub-total of last shown account
print '<tr class="liste_total">';
print '<td class="right" colspan="5">'.$langs->trans("SubTotal").':</td><td class="nowrap right">'.price($sous_total_debit).'</td><td class="nowrap right">'.price($sous_total_credit).'</td>';
print "<td>&nbsp;</td>\n";
print "<td>&nbsp;</td>\n";
print '<td class="nowraponall right">';
print price($sous_total_debit - $sous_total_credit);
print '</td>';
print '<td></td>';
print '</tr>';


// Affiche le Total
// Show total
print '<tr class="liste_total">';
print '<td class="right" colspan="5">'.$langs->trans("Total").':</td>';
print '<td class="right">';
print '<td class="nowraponall right">';
print price($total_debit);
print '</td>';
print '<td class="right">';
print '<td class="nowraponall right">';
print price($total_credit);
print '</td>';
print '<td colspan="2"></td>';
print '<td></td>';
print '<td></td>';
print '</tr>';

print "</table>";
Expand Down

0 comments on commit b41f727

Please sign in to comment.