mirror of
https://github.com/salesagility/SuiteCRM.git
synced 2025-03-18 07:02:57 +00:00
Merge pull request #6188 from ChangezKhan/bugfix_5856a
Fixed #5856 - Multiple pages PDF from reports when Total of field is …
This commit is contained in:
commit
a403717d8b
2 changed files with 7 additions and 7 deletions
|
@ -843,11 +843,11 @@ class AOR_Report extends Basic
|
|||
|
||||
$row_class = $row_class == 'oddListRowS1' ? 'evenListRowS1' : 'oddListRowS1';
|
||||
}
|
||||
$html .= "</tbody>";
|
||||
$html .= "</tbody></table>";
|
||||
|
||||
$html .= $this->getTotalHTML($fields, $totals);
|
||||
|
||||
$html .= '</table></div>';
|
||||
$html .= '</div>';
|
||||
|
||||
$html .= " <script type=\"text/javascript\">
|
||||
groupedReportToggler = {
|
||||
|
@ -938,7 +938,7 @@ class AOR_Report extends Basic
|
|||
$currency->retrieve($GLOBALS['current_user']->getPreference('currency'));
|
||||
|
||||
$showTotal = false;
|
||||
$html = '';
|
||||
$html = '<table>';
|
||||
$html .= "<thead class='fc-head'>";
|
||||
$html .= "<tr>";
|
||||
foreach ($fields as $label => $field) {
|
||||
|
@ -964,7 +964,7 @@ class AOR_Report extends Basic
|
|||
if ($fieldTotal) {
|
||||
$showTotal = true;
|
||||
$totalLabel = $field['label'] . ' ' . $appListStringsAorTotalOptionsFieldTotal;
|
||||
$html .= "<th>{$totalLabel}</td>";
|
||||
$html .= "<th>{$totalLabel}</th>";
|
||||
} else {
|
||||
$html .= '<th></th>';
|
||||
}
|
||||
|
@ -975,7 +975,7 @@ class AOR_Report extends Basic
|
|||
return '';
|
||||
}
|
||||
|
||||
$html .= "</body><tr class='oddListRowS1'>";
|
||||
$html .= "<tbody><tr class='oddListRowS1'>";
|
||||
foreach ($fields as $label => $field) {
|
||||
if (!$field['display']) {
|
||||
continue;
|
||||
|
@ -1027,7 +1027,7 @@ class AOR_Report extends Basic
|
|||
}
|
||||
}
|
||||
$html .= '</tr>';
|
||||
$html .= '</body>';
|
||||
$html .= '</tbody></table>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
|
|
@ -264,7 +264,7 @@ class AOR_ReportTest extends SuiteCRM\StateCheckerPHPUnitTestCaseAbstract
|
|||
//execute the method with required data preset and verify it returns expected result
|
||||
$fields = array('label' => array('display' => 1, 'total' => 'SUM', 'label' => 'total'));
|
||||
$totals = array('label' => array(10, 20, 30));
|
||||
$expected = "<thead class='fc-head'><tr><th>total Sum</td></tr></thead></body><tr class='oddListRowS1'><td>60</td></tr></body>";
|
||||
$expected = "<table><thead class='fc-head'><tr><th>total Sum</th></tr></thead><tbody><tr class='oddListRowS1'><td>60</td></tr></tbody></table>";
|
||||
|
||||
$aor_Report = new AOR_Report();
|
||||
$actual = $aor_Report->getTotalHTML($fields, $totals);
|
||||
|
|
Loading…
Reference in a new issue