Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX : Don't display column when it's out of date #28271

Merged
merged 1 commit into from
Feb 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions htdocs/compta/resultat/result.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@
print '<th class="liste_titre right">'.$langs->trans("PreviousPeriod").'</th>';
print '<th class="liste_titre right">'.$langs->trans("SelectedPeriod").'</th>';
foreach ($months as $k => $v) {
if (($k + 1) >= $date_startmonth) {
if (($k + 1) >= $date_startmonth && $k < $date_endmonth) {
print '<th class="liste_titre right width50">'.$langs->trans('MonthShort'.sprintf("%02s", ($k + 1))).'</th>';
}
}
Expand Down Expand Up @@ -389,7 +389,7 @@

// Detail by month
foreach ($months as $k => $v) {
if (($k + 1) >= $date_startmonth) {
if (($k + 1) >= $date_startmonth && $k < $date_endmonth) {
foreach ($sommes as $code => $det) {
$vars[$code] = empty($det['M'][$k]) ? 0 : $det['M'][$k];
}
Expand Down Expand Up @@ -588,7 +588,7 @@

// Each month
foreach ($totCat['M'] as $k => $v) {
if (($k + 1) >= $date_startmonth) {
if (($k + 1) >= $date_startmonth && $k < $date_endmonth) {
print '<td class="right nowraponall"><span class="amount">'.price($v).'</span></td>';
}
}
Expand Down Expand Up @@ -629,7 +629,7 @@

// Make one call for each month
foreach ($months as $k => $v) {
if (($k + 1) >= $date_startmonth) {
if (($k + 1) >= $date_startmonth && $k < $date_endmonth) {
if (isset($cpt['account_number'])) {
$resultM = $totPerAccount[$cpt['account_number']]['M'][$k];
} else {
Expand Down