mirror of
https://github.com/Karaka-Management/oms-Script.git
synced 2026-03-07 14:08:40 +00:00
autofixes
This commit is contained in:
parent
2a6fb2905e
commit
5650c455f9
|
|
@ -27,5 +27,6 @@ use phpOMS\Stdlib\Base\Enum;
|
|||
abstract class HelperStatus extends Enum
|
||||
{
|
||||
public const INACTIVE = 0;
|
||||
|
||||
public const ACTIVE = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ use phpOMS\Stdlib\Base\Enum;
|
|||
abstract class PermissionState extends Enum
|
||||
{
|
||||
public const TEMPLATE = 1;
|
||||
|
||||
public const REPORT = 2;
|
||||
|
||||
public const EXPORT = 3;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
<ul class="l-1">
|
||||
<li>
|
||||
<a tabindex="0" href="<?= \phpOMS\Uri\UriFactory::build('{/prefix}helper/single?{?}&id=' . $this->getData('name')); ?>"
|
||||
class="button"><?= $this->getHtml('Report') ?></a>
|
||||
class="button"><?= $this->getHtml('Report'); ?></a>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -28,14 +28,14 @@ echo $this->getData('nav')->render(); ?>
|
|||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-head"><?= $this->getHtml('Helpers') ?><i class="fa fa-download floatRight download btn"></i></div>
|
||||
<div class="portlet-head"><?= $this->getHtml('Helpers'); ?><i class="fa fa-download floatRight download btn"></i></div>
|
||||
<table class="default">
|
||||
<thead>
|
||||
<tr>
|
||||
<td class="wf-100"><?= $this->getHtml('Name') ?>
|
||||
<td class="wf-100"><?= $this->getHtml('Name'); ?>
|
||||
<td><?= $this->getHtml('Tag'); ?>
|
||||
<td><?= $this->getHtml('Creator') ?>
|
||||
<td><?= $this->getHtml('Updated') ?>
|
||||
<td><?= $this->getHtml('Creator'); ?>
|
||||
<td><?= $this->getHtml('Updated'); ?>
|
||||
<tbody>
|
||||
<?php if (\count($templates) == 0) : ?>
|
||||
<tr tabindex="0" class="empty">
|
||||
|
|
@ -44,13 +44,13 @@ echo $this->getData('nav')->render(); ?>
|
|||
<?php foreach ($templates as $key => $template) :
|
||||
$url = UriFactory::build('{/prefix}helper/report/view?{?}&id=' . $template->getId()); ?>
|
||||
<tr tabindex="0" data-href="<?= $url; ?>">
|
||||
<td data-label="<?= $this->getHtml('Name') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($template->getName()); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Tag') ?>">
|
||||
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($template->getName()); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Tag'); ?>">
|
||||
<?php $tags = $template->getTags(); foreach ($tags as $tag) : ?>
|
||||
<span class="tag" style="background: <?= $this->printHtml($tag->getColor()); ?>"><?= $this->printHtml($tag->getTitle()); ?></span>
|
||||
<?php endforeach; ?>
|
||||
<td data-label="<?= $this->getHtml('Creator') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($template->getCreatedBy()->getName1()); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Updated') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($template->getCreatedAt()->format('Y-m-d')); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Creator'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($template->getCreatedBy()->getName1()); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Updated'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($template->getCreatedAt()->format('Y-m-d')); ?></a>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
<div class="portlet-foot">
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
</div>
|
||||
<div class="col-xs-12 col-md-3">
|
||||
<div class="portlet">
|
||||
<div class="portlet-head"><?= $this->getHtml('Reports') ?></div>
|
||||
<div class="portlet-head"><?= $this->getHtml('Reports'); ?></div>
|
||||
<div class="portlet-body">
|
||||
<form action="<?= UriFactory::build('{/api}helper/template'); ?>" method="post">
|
||||
<table class="layout wf-100">
|
||||
|
|
@ -61,7 +61,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
</div>
|
||||
|
||||
<div class="portlet">
|
||||
<div class="portlet-head"><?= $this->getHtml('Export') ?></div>
|
||||
<div class="portlet-head"><?= $this->getHtml('Export'); ?></div>
|
||||
<div class="portlet-body">
|
||||
<form>
|
||||
<table class="layout wf-100">
|
||||
|
|
@ -90,7 +90,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
<?php if (!empty($settings)) : ?>
|
||||
<div class="portlet">
|
||||
<form id="iUiSettings">
|
||||
<div class="portlet-head"><?= $this->getHtml('Settings') ?></div>
|
||||
<div class="portlet-head"><?= $this->getHtml('Settings'); ?></div>
|
||||
<div class="portlet-body">
|
||||
<table class="layout wf-100">
|
||||
<tbody>
|
||||
|
|
@ -100,19 +100,19 @@ echo $this->getData('nav')->render(); ?>
|
|||
<?php endforeach; ?>
|
||||
</table>
|
||||
</div>
|
||||
<div class="portlet-foot"><a tabindex="0" class="button" href="<?= UriFactory::build('{%}');?>&type={!#iExport}&lang={!#iLang}{#iUiSettings}"><?= $this->getHtml('Load'); ?></a></div>
|
||||
<div class="portlet-foot"><a tabindex="0" class="button" href="<?= UriFactory::build('{%}'); ?>&type={!#iExport}&lang={!#iLang}{#iUiSettings}"><?= $this->getHtml('Load'); ?></a></div>
|
||||
</form>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="portlet">
|
||||
<div class="portlet-head"><?= $this->getHtml('Info') ?></div>
|
||||
<div class="portlet-head"><?= $this->getHtml('Info'); ?></div>
|
||||
<div class="portlet-body">
|
||||
<table class="list wf-100">
|
||||
<tbody>
|
||||
<?php if (!$template->isStandalone() && !($report instanceof \Modules\Helper\Models\NullReport)) : ?>
|
||||
<tr>
|
||||
<th colspan="2"><?= $this->getHtml('Report') ?>
|
||||
<th colspan="2"><?= $this->getHtml('Report'); ?>
|
||||
<tr>
|
||||
<td><?= $this->getHtml('Name'); ?>
|
||||
<td><?= $this->printHtml($report->getTitle()); ?>
|
||||
|
|
@ -124,7 +124,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
<td><?= $report->getCreatedAt()->format('Y-m-d'); ?>
|
||||
<?php endif; ?>
|
||||
<tr>
|
||||
<th colspan="2"><?= $this->getHtml('Template') ?>
|
||||
<th colspan="2"><?= $this->getHtml('Template'); ?>
|
||||
<tr>
|
||||
<td><?= $this->getHtml('Name'); ?>
|
||||
<td><?= $this->printHtml($template->getName()); ?>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ namespace Modules\Helper\tests\Admin;
|
|||
class AdminTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
protected const MODULE_NAME = 'Helper';
|
||||
|
||||
protected const URI_LOAD = 'http://127.0.0.1/en/backend/helper';
|
||||
|
||||
use \Modules\tests\ModuleTestTrait;
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ use phpOMS\Utils\TestUtils;
|
|||
class ControllerTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
protected $app = null;
|
||||
|
||||
protected $module = null;
|
||||
|
||||
protected function setUp() : void
|
||||
|
|
|
|||
|
|
@ -18,15 +18,15 @@ require 'Worker.php';
|
|||
<div class="tabview tab-2">
|
||||
<div class="box">
|
||||
<ul class="tab-links">
|
||||
<li><label for="c-tab-1"><?= $lang['Overview'] ?></label></li>
|
||||
<li><label for="c-tab-2"><?= $lang['Type'] ?></label></li>
|
||||
<li><label for="c-tab-3"><?= $lang['CostObject'] ?></label></li>
|
||||
<li><label for="c-tab-4"><?= $lang['CostCenter'] ?></label></li>
|
||||
<li><label for="c-tab-5"><?= $lang['Account'] ?></label></li>
|
||||
<li><label for="c-tab-1"><?= $lang['Overview']; ?></label></li>
|
||||
<li><label for="c-tab-2"><?= $lang['Type']; ?></label></li>
|
||||
<li><label for="c-tab-3"><?= $lang['CostObject']; ?></label></li>
|
||||
<li><label for="c-tab-4"><?= $lang['CostCenter']; ?></label></li>
|
||||
<li><label for="c-tab-5"><?= $lang['Account']; ?></label></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tab-content">
|
||||
<input type="radio" id="c-tab-1" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-1' ? ' checked' : '' ?>>
|
||||
<input type="radio" id="c-tab-1" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-1' ? ' checked' : ''; ?>>
|
||||
<div class="tab">
|
||||
<div class="box">
|
||||
<table class="default">
|
||||
|
|
@ -41,40 +41,40 @@ require 'Worker.php';
|
|||
<td><?= $lang['DiffBudget%']; ?>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?= 'EventCourseInt' ?>
|
||||
<td><?= '?' ?>
|
||||
<td><?= \number_format($type['A'][$fiscal_end->format('Y')]['value'] ?? 0, 2, ',', '.') ?>
|
||||
<td><?= \number_format(0.00 / $month * 12, 2) ?>
|
||||
<td><?= \number_format(0.00, 2) ?>
|
||||
<td><?= '100.00%' ?>
|
||||
<td><?= 'EventCourseInt'; ?>
|
||||
<td><?= '?'; ?>
|
||||
<td><?= \number_format($type['A'][$fiscal_end->format('Y')]['value'] ?? 0, 2, ',', '.'); ?>
|
||||
<td><?= \number_format(0.00 / $month * 12, 2); ?>
|
||||
<td><?= \number_format(0.00, 2); ?>
|
||||
<td><?= '100.00%'; ?>
|
||||
<tr>
|
||||
<td><?= 'EventCourse' ?>
|
||||
<td><?= '?' ?>
|
||||
<td><?= \number_format(($type['K'][$fiscal_end->format('Y')]['value'] ?? 0) + ($type['R'][$fiscal_end->format('Y')]['value'] ?? 0) + ($type['V'][$fiscal_end->format('Y')]['value'] ?? 0), 2, ',', '.') ?>
|
||||
<td><?= \number_format(0.00 / $month * 12, 2) ?>
|
||||
<td><?= \number_format(0.00, 2) ?>
|
||||
<td><?= '100.00%' ?>
|
||||
<td><?= 'EventCourse'; ?>
|
||||
<td><?= '?'; ?>
|
||||
<td><?= \number_format(($type['K'][$fiscal_end->format('Y')]['value'] ?? 0) + ($type['R'][$fiscal_end->format('Y')]['value'] ?? 0) + ($type['V'][$fiscal_end->format('Y')]['value'] ?? 0), 2, ',', '.'); ?>
|
||||
<td><?= \number_format(0.00 / $month * 12, 2); ?>
|
||||
<td><?= \number_format(0.00, 2); ?>
|
||||
<td><?= '100.00%'; ?>
|
||||
<tr>
|
||||
<td><?= 'Demo' ?>
|
||||
<td><?= '?' ?>
|
||||
<td><?= \number_format($type['D'][$fiscal_end->format('Y')]['value'] ?? 0, 2, ',', '.') ?>
|
||||
<td><?= \number_format(0.00 / $month * 12, 2) ?>
|
||||
<td><?= \number_format(0.00, 2) ?>
|
||||
<td><?= '100.00%' ?>
|
||||
<td><?= 'Demo'; ?>
|
||||
<td><?= '?'; ?>
|
||||
<td><?= \number_format($type['D'][$fiscal_end->format('Y')]['value'] ?? 0, 2, ',', '.'); ?>
|
||||
<td><?= \number_format(0.00 / $month * 12, 2); ?>
|
||||
<td><?= \number_format(0.00, 2); ?>
|
||||
<td><?= '100.00%'; ?>
|
||||
<tr>
|
||||
<td><?= 'Briefing' ?>
|
||||
<td><?= '?' ?>
|
||||
<td><?= \number_format($type['E'][$fiscal_end->format('Y')]['value'] ?? 0, 2, ',', '.') ?>
|
||||
<td><?= \number_format(0.00 / $month * 12, 2) ?>
|
||||
<td><?= \number_format(0.00, 2) ?>
|
||||
<td><?= '100.00%' ?>
|
||||
<td><?= 'Briefing'; ?>
|
||||
<td><?= '?'; ?>
|
||||
<td><?= \number_format($type['E'][$fiscal_end->format('Y')]['value'] ?? 0, 2, ',', '.'); ?>
|
||||
<td><?= \number_format(0.00 / $month * 12, 2); ?>
|
||||
<td><?= \number_format(0.00, 2); ?>
|
||||
<td><?= '100.00%'; ?>
|
||||
<tr>
|
||||
<td><?= 'Advice' ?>
|
||||
<td><?= '?' ?>
|
||||
<td><?= \number_format($type['B'][$fiscal_end->format('Y')]['value'] ?? 0, 2, ',', '.') ?>
|
||||
<td><?= \number_format(0.00 / $month * 12, 2) ?>
|
||||
<td><?= \number_format(0.00, 2) ?>
|
||||
<td><?= '100.00%' ?>
|
||||
<td><?= 'Advice'; ?>
|
||||
<td><?= '?'; ?>
|
||||
<td><?= \number_format($type['B'][$fiscal_end->format('Y')]['value'] ?? 0, 2, ',', '.'); ?>
|
||||
<td><?= \number_format(0.00 / $month * 12, 2); ?>
|
||||
<td><?= \number_format(0.00, 2); ?>
|
||||
<td><?= '100.00%'; ?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
|
@ -96,12 +96,12 @@ require 'Worker.php';
|
|||
$sum_forecast = 0.0;
|
||||
foreach ($types as $key => $stype) : ?>
|
||||
<tr>
|
||||
<td><?= $key ?>
|
||||
<td><?= $stype ?>
|
||||
<td><?= (\number_format($history = $type[$key][$fiscal_end_prev->format('Y')]['value'] ?? 0.0, 2, ',', '.')) ?>
|
||||
<td><?= (\number_format($current = $type[$key][$fiscal_end->format('Y')]['value'] ?? 0.0, 2, ',', '.')) ?>
|
||||
<td><?= (\number_format($forecast = ($type[$key][$fiscal_end->format('Y')]['value'] ?? 0.0) / \abs(((int) $fiscal_current->format('m') - ((int) $fiscal_end->format('m') + 1)) % 12 + 1) * 12, 2, ',', '.')) ?>
|
||||
<td><?= \number_format($history == 0 ? 0 : 100 * ($forecast - $history) / $history, 2, ',', '.') . '%' ?>
|
||||
<td><?= $key; ?>
|
||||
<td><?= $stype; ?>
|
||||
<td><?= (\number_format($history = $type[$key][$fiscal_end_prev->format('Y')]['value'] ?? 0.0, 2, ',', '.')); ?>
|
||||
<td><?= (\number_format($current = $type[$key][$fiscal_end->format('Y')]['value'] ?? 0.0, 2, ',', '.')); ?>
|
||||
<td><?= (\number_format($forecast = ($type[$key][$fiscal_end->format('Y')]['value'] ?? 0.0) / \abs(((int) $fiscal_current->format('m') - ((int) $fiscal_end->format('m') + 1)) % 12 + 1) * 12, 2, ',', '.')); ?>
|
||||
<td><?= \number_format($history == 0 ? 0 : 100 * ($forecast - $history) / $history, 2, ',', '.') . '%'; ?>
|
||||
<?php
|
||||
$sum_hist += $history;
|
||||
$sum_current += $current;
|
||||
|
|
@ -109,11 +109,11 @@ require 'Worker.php';
|
|||
endforeach; ?>
|
||||
<tr>
|
||||
<td>
|
||||
<td><?= 'Total' ?>
|
||||
<td><?= \number_format($sum_hist, 2, ',', '.') ?>
|
||||
<td><?= \number_format($sum_current, 2, ',', '.') ?>
|
||||
<td><?= \number_format($sum_forecast, 2, ',', '.') ?>
|
||||
<td><?= \number_format($sum_hist === 0.0 ? 0 : (100 * $sum_forecast - $sum_hist) / $sum_hist, 2, ',', '.') . '%' ?>
|
||||
<td><?= 'Total'; ?>
|
||||
<td><?= \number_format($sum_hist, 2, ',', '.'); ?>
|
||||
<td><?= \number_format($sum_current, 2, ',', '.'); ?>
|
||||
<td><?= \number_format($sum_forecast, 2, ',', '.'); ?>
|
||||
<td><?= \number_format($sum_hist === 0.0 ? 0 : (100 * $sum_forecast - $sum_hist) / $sum_hist, 2, ',', '.') . '%'; ?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
|
@ -135,12 +135,12 @@ require 'Worker.php';
|
|||
$sum_forecast = 0.0;
|
||||
foreach ($costcenter as $key => $stype) : ?>
|
||||
<tr>
|
||||
<td><?= $key ?>
|
||||
<td><?= $ccDef[$key] ?>
|
||||
<td><?= (\number_format($history = $costcenter[$key][$fiscal_end_prev->format('Y')]['value'] ?? 0.0, 2, ',', '.')) ?>
|
||||
<td><?= (\number_format($current = $costcenter[$key][$fiscal_end->format('Y')]['value'] ?? 0.0, 2, ',', '.')) ?>
|
||||
<td><?= (\number_format($forecast = ($costcenter[$key][$fiscal_end->format('Y')]['value'] ?? 0.0) / \abs(((int) $fiscal_current->format('m') - ((int) $fiscal_end->format('m') + 1)) % 12 + 1) * 12, 2, ',', '.')) ?>
|
||||
<td><?= \number_format($history == 0 ? 0 : 100 * ($forecast - $history) / $history, 2, ',', '.') . '%' ?>
|
||||
<td><?= $key; ?>
|
||||
<td><?= $ccDef[$key]; ?>
|
||||
<td><?= (\number_format($history = $costcenter[$key][$fiscal_end_prev->format('Y')]['value'] ?? 0.0, 2, ',', '.')); ?>
|
||||
<td><?= (\number_format($current = $costcenter[$key][$fiscal_end->format('Y')]['value'] ?? 0.0, 2, ',', '.')); ?>
|
||||
<td><?= (\number_format($forecast = ($costcenter[$key][$fiscal_end->format('Y')]['value'] ?? 0.0) / \abs(((int) $fiscal_current->format('m') - ((int) $fiscal_end->format('m') + 1)) % 12 + 1) * 12, 2, ',', '.')); ?>
|
||||
<td><?= \number_format($history == 0 ? 0 : 100 * ($forecast - $history) / $history, 2, ',', '.') . '%'; ?>
|
||||
<?php
|
||||
$sum_hist += $history;
|
||||
$sum_current += $current;
|
||||
|
|
@ -148,11 +148,11 @@ require 'Worker.php';
|
|||
endforeach; ?>
|
||||
<tr>
|
||||
<td>
|
||||
<td><?= 'Total' ?>
|
||||
<td><?= \number_format($sum_hist, 2, ',', '.') ?>
|
||||
<td><?= \number_format($sum_current, 2, ',', '.') ?>
|
||||
<td><?= \number_format($sum_forecast, 2, ',', '.') ?>
|
||||
<td><?= \number_format($sum_hist === 0.0 ? 0 : 100 * ($sum_forecast - $sum_hist) / $sum_hist, 2, ',', '.') . '%' ?>
|
||||
<td><?= 'Total'; ?>
|
||||
<td><?= \number_format($sum_hist, 2, ',', '.'); ?>
|
||||
<td><?= \number_format($sum_current, 2, ',', '.'); ?>
|
||||
<td><?= \number_format($sum_forecast, 2, ',', '.'); ?>
|
||||
<td><?= \number_format($sum_hist === 0.0 ? 0 : 100 * ($sum_forecast - $sum_hist) / $sum_hist, 2, ',', '.') . '%'; ?>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
|
@ -174,12 +174,12 @@ require 'Worker.php';
|
|||
$sum_forecast = 0.0;
|
||||
foreach ($account as $key => $stype) : ?>
|
||||
<tr>
|
||||
<td><?= $key ?>
|
||||
<td><?= $acDef[$key] ?>
|
||||
<td><?= (\number_format($history = $account[$key][$fiscal_end_prev->format('Y')]['value'] ?? 0.0, 2, ',', '.')) ?>
|
||||
<td><?= (\number_format($current = $account[$key][$fiscal_end->format('Y')]['value'] ?? 0.0, 2, ',', '.')) ?>
|
||||
<td><?= (\number_format($forecast = ($account[$key][$fiscal_end->format('Y')]['value'] ?? 0.0) / \abs(((int) $fiscal_current->format('m') - ((int) $fiscal_end->format('m') + 1)) % 12 + 1) * 12, 2, ',', '.')) ?>
|
||||
<td><?= \number_format($history == 0 ? 0 : 100 * ($forecast - $history) / $history, 2, ',', '.') . '%' ?>
|
||||
<td><?= $key; ?>
|
||||
<td><?= $acDef[$key]; ?>
|
||||
<td><?= (\number_format($history = $account[$key][$fiscal_end_prev->format('Y')]['value'] ?? 0.0, 2, ',', '.')); ?>
|
||||
<td><?= (\number_format($current = $account[$key][$fiscal_end->format('Y')]['value'] ?? 0.0, 2, ',', '.')); ?>
|
||||
<td><?= (\number_format($forecast = ($account[$key][$fiscal_end->format('Y')]['value'] ?? 0.0) / \abs(((int) $fiscal_current->format('m') - ((int) $fiscal_end->format('m') + 1)) % 12 + 1) * 12, 2, ',', '.')); ?>
|
||||
<td><?= \number_format($history == 0 ? 0 : 100 * ($forecast - $history) / $history, 2, ',', '.') . '%'; ?>
|
||||
<?php
|
||||
$sum_hist += $history;
|
||||
$sum_current += $current;
|
||||
|
|
@ -187,15 +187,15 @@ require 'Worker.php';
|
|||
endforeach; ?>
|
||||
<tr>
|
||||
<td>
|
||||
<td><?= 'Total' ?>
|
||||
<td><?= \number_format($sum_hist, 2, ',', '.') ?>
|
||||
<td><?= \number_format($sum_current, 2, ',', '.') ?>
|
||||
<td><?= \number_format($sum_forecast, 2, ',', '.') ?>
|
||||
<td><?= \number_format($sum_hist === 0.0 ? 0 : 100 * ($sum_forecast - $sum_hist) / $sum_hist, 2, ',', '.') . '%' ?>
|
||||
<td><?= 'Total'; ?>
|
||||
<td><?= \number_format($sum_hist, 2, ',', '.'); ?>
|
||||
<td><?= \number_format($sum_current, 2, ',', '.'); ?>
|
||||
<td><?= \number_format($sum_forecast, 2, ',', '.'); ?>
|
||||
<td><?= \number_format($sum_hist === 0.0 ? 0 : 100 * ($sum_forecast - $sum_hist) / $sum_hist, 2, ',', '.') . '%'; ?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<input type="radio" id="c-tab-2" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-2' ? ' checked' : '' ?>>
|
||||
<input type="radio" id="c-tab-2" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-2' ? ' checked' : ''; ?>>
|
||||
<div class="tab">
|
||||
<section class="box">
|
||||
<table class="default">
|
||||
|
|
@ -211,16 +211,16 @@ require 'Worker.php';
|
|||
foreach ($costobject as $key => $co) :
|
||||
if (\strrpos($key, 'K', -\strlen($key)) !== false && isset($co[$fiscal_end->format('Y')]['value'])) : ?>
|
||||
<tr>
|
||||
<td><?= $key ?>
|
||||
<td><?= $key; ?>
|
||||
<td>
|
||||
<td><?= $coDef[$key] ?? '' ?>
|
||||
<td><?= \number_format($co[$fiscal_end->format('Y')]['value'] ?? 0, 2, ',', '.') ?>
|
||||
<td><?= $coDef[$key] ?? ''; ?>
|
||||
<td><?= \number_format($co[$fiscal_end->format('Y')]['value'] ?? 0, 2, ',', '.'); ?>
|
||||
<?php endif; endforeach; ?>
|
||||
<tr>
|
||||
<td>
|
||||
<td>
|
||||
<td><?= 'Total' ?>
|
||||
<td><?= \number_format($type['K'][$fiscal_end->format('Y')]['value'] ?? 0, 2, ',', '.') ?>
|
||||
<td><?= 'Total'; ?>
|
||||
<td><?= \number_format($type['K'][$fiscal_end->format('Y')]['value'] ?? 0, 2, ',', '.'); ?>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
|
|
@ -236,14 +236,14 @@ require 'Worker.php';
|
|||
<?php $loop = $type['K'][$fiscal_end->format('Y')]['cc'] ?? [];
|
||||
foreach ($loop as $key => $stype) : ?>
|
||||
<tr>
|
||||
<td><?= $key ?>
|
||||
<td><?= $ccDef[$key] ?? '' ?>
|
||||
<td><?= \number_format($stype, 2, ',', '.') ?>
|
||||
<td><?= $key; ?>
|
||||
<td><?= $ccDef[$key] ?? ''; ?>
|
||||
<td><?= \number_format($stype, 2, ',', '.'); ?>
|
||||
<?php endforeach; ?>
|
||||
<tr>
|
||||
<td>
|
||||
<td><?= 'Total' ?>
|
||||
<td><?= \number_format($type['K'][$fiscal_end->format('Y')]['value'] ?? 0, 2, ',', '.') ?>
|
||||
<td><?= 'Total'; ?>
|
||||
<td><?= \number_format($type['K'][$fiscal_end->format('Y')]['value'] ?? 0, 2, ',', '.'); ?>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
|
|
@ -259,18 +259,18 @@ require 'Worker.php';
|
|||
<?php $loop = $type['K'][$fiscal_end->format('Y')]['ac'] ?? [];
|
||||
foreach ($loop as $key => $stype) : ?>
|
||||
<tr>
|
||||
<td><?= $key ?>
|
||||
<td><?= $acDef[$key] ?? '' ?>
|
||||
<td><?= \number_format($stype, 2, ',', '.') ?>
|
||||
<td><?= $key; ?>
|
||||
<td><?= $acDef[$key] ?? ''; ?>
|
||||
<td><?= \number_format($stype, 2, ',', '.'); ?>
|
||||
<?php endforeach; ?>
|
||||
<tr>
|
||||
<td>
|
||||
<td><?= 'Total' ?>
|
||||
<td><?= \number_format($type['K'][$fiscal_end->format('Y')]['value'] ?? 0, 2, ',', '.') ?>
|
||||
<td><?= 'Total'; ?>
|
||||
<td><?= \number_format($type['K'][$fiscal_end->format('Y')]['value'] ?? 0, 2, ',', '.'); ?>
|
||||
</table>
|
||||
</section>
|
||||
</div>
|
||||
<input type="radio" id="c-tab-3" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-3' ? ' checked' : '' ?>>
|
||||
<input type="radio" id="c-tab-3" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-3' ? ' checked' : ''; ?>>
|
||||
<div class="tab">
|
||||
<section class="box">
|
||||
<table class="default">
|
||||
|
|
@ -284,14 +284,14 @@ require 'Worker.php';
|
|||
<?php $loop = $costobject['K152333'][$fiscal_end->format('Y')]['ac'] ?? [];
|
||||
foreach ($loop as $key => $co) : ?>
|
||||
<tr>
|
||||
<td><?= $key ?>
|
||||
<td><?= $acDef[$key] ?? '' ?>
|
||||
<td><?= \number_format($co, 2, ',', '.') ?>
|
||||
<td><?= $key; ?>
|
||||
<td><?= $acDef[$key] ?? ''; ?>
|
||||
<td><?= \number_format($co, 2, ',', '.'); ?>
|
||||
<?php endforeach; ?>
|
||||
<tr>
|
||||
<td>
|
||||
<td><?= 'Total' ?>
|
||||
<td><?= \number_format($costobject['K152333'][$fiscal_end->format('Y')]['value'] ?? 0, 2, ',', '.') ?>
|
||||
<td><?= 'Total'; ?>
|
||||
<td><?= \number_format($costobject['K152333'][$fiscal_end->format('Y')]['value'] ?? 0, 2, ',', '.'); ?>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
|
|
@ -307,18 +307,18 @@ require 'Worker.php';
|
|||
<?php $loop = $costobject['K152333'][$fiscal_end->format('Y')]['cc'] ?? [];
|
||||
foreach ($loop as $key => $co) : ?>
|
||||
<tr>
|
||||
<td><?= $key ?>
|
||||
<td><?= $ccDef[$key] ?? '' ?>
|
||||
<td><?= \number_format($co, 2, ',', '.') ?>
|
||||
<td><?= $key; ?>
|
||||
<td><?= $ccDef[$key] ?? ''; ?>
|
||||
<td><?= \number_format($co, 2, ',', '.'); ?>
|
||||
<?php endforeach; ?>
|
||||
<tr>
|
||||
<td>
|
||||
<td><?= 'Total' ?>
|
||||
<td><?= \number_format($costobject['K152333'][$fiscal_end->format('Y')]['value'] ?? 0, 2, ',', '.') ?>
|
||||
<td><?= 'Total'; ?>
|
||||
<td><?= \number_format($costobject['K152333'][$fiscal_end->format('Y')]['value'] ?? 0, 2, ',', '.'); ?>
|
||||
</table>
|
||||
</section>
|
||||
</div>
|
||||
<input type="radio" id="c-tab-4" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-4' ? ' checked' : '' ?>>
|
||||
<input type="radio" id="c-tab-4" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-4' ? ' checked' : ''; ?>>
|
||||
<div class="tab">
|
||||
<section class="box">
|
||||
<table class="default">
|
||||
|
|
@ -332,14 +332,14 @@ require 'Worker.php';
|
|||
<?php $loop = $costcenter[241][$fiscal_end->format('Y')]['ac'] ?? [];
|
||||
foreach ($loop as $key => $ac) : ?>
|
||||
<tr>
|
||||
<td><?= $key ?>
|
||||
<td><?= $acDef[$key] ?? '' ?>
|
||||
<td><?= \number_format($ac, 2, ',', '.') ?>
|
||||
<td><?= $key; ?>
|
||||
<td><?= $acDef[$key] ?? ''; ?>
|
||||
<td><?= \number_format($ac, 2, ',', '.'); ?>
|
||||
<?php endforeach; ?>
|
||||
<tr>
|
||||
<td>
|
||||
<td><?= 'Total' ?>
|
||||
<td><?= \number_format($costcenter[241][$fiscal_end->format('Y')]['value'] ?? 0, 2, ',', '.') ?>
|
||||
<td><?= 'Total'; ?>
|
||||
<td><?= \number_format($costcenter[241][$fiscal_end->format('Y')]['value'] ?? 0, 2, ',', '.'); ?>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
|
|
@ -355,14 +355,14 @@ require 'Worker.php';
|
|||
<?php $loop = $costcenter[241][$fiscal_end->format('Y')]['type'] ?? [];
|
||||
foreach ($loop as $key => $co) : ?>
|
||||
<tr>
|
||||
<td><?= $key ?>
|
||||
<td><?= $types[$key] ?? '' ?>
|
||||
<td><?= \number_format($co, 2, ',', '.') ?>
|
||||
<td><?= $key; ?>
|
||||
<td><?= $types[$key] ?? ''; ?>
|
||||
<td><?= \number_format($co, 2, ',', '.'); ?>
|
||||
<?php endforeach; ?>
|
||||
<tr>
|
||||
<td>
|
||||
<td><?= 'Total' ?>
|
||||
<td><?= \number_format($costcenter[241][$fiscal_end->format('Y')]['value'] ?? 0, 2, ',', '.') ?>
|
||||
<td><?= 'Total'; ?>
|
||||
<td><?= \number_format($costcenter[241][$fiscal_end->format('Y')]['value'] ?? 0, 2, ',', '.'); ?>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
|
|
@ -378,18 +378,18 @@ require 'Worker.php';
|
|||
<?php $loop = $costcenter[241][$fiscal_end->format('Y')]['co'] ?? [];
|
||||
foreach ($loop as $key => $co) : ?>
|
||||
<tr>
|
||||
<td><?= $key ?>
|
||||
<td><?= $coDef[$key] ?? '' ?>
|
||||
<td><?= \number_format($co, 2, ',', '.') ?>
|
||||
<td><?= $key; ?>
|
||||
<td><?= $coDef[$key] ?? ''; ?>
|
||||
<td><?= \number_format($co, 2, ',', '.'); ?>
|
||||
<?php endforeach; ?>
|
||||
<tr>
|
||||
<td>
|
||||
<td><?= 'Total' ?>
|
||||
<td><?= \number_format($costcenter[241][$fiscal_end->format('Y')]['value'] ?? 0, 2, ',', '.') ?>
|
||||
<td><?= 'Total'; ?>
|
||||
<td><?= \number_format($costcenter[241][$fiscal_end->format('Y')]['value'] ?? 0, 2, ',', '.'); ?>
|
||||
</table>
|
||||
</section>
|
||||
</div>
|
||||
<input type="radio" id="c-tab-5" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-5' ? ' checked' : '' ?>>
|
||||
<input type="radio" id="c-tab-5" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-5' ? ' checked' : ''; ?>>
|
||||
<div class="tab">
|
||||
<section class="box">
|
||||
<table class="default">
|
||||
|
|
@ -403,14 +403,14 @@ require 'Worker.php';
|
|||
<?php $loop = $account[4480][$fiscal_end->format('Y')]['type'] ?? [];
|
||||
foreach ($loop as $key => $stype) : ?>
|
||||
<tr>
|
||||
<td><?= $key ?>
|
||||
<td><?= $types[$key] ?? '' ?>
|
||||
<td><?= \number_format($stype, 2, ',', '.') ?>
|
||||
<td><?= $key; ?>
|
||||
<td><?= $types[$key] ?? ''; ?>
|
||||
<td><?= \number_format($stype, 2, ',', '.'); ?>
|
||||
<?php endforeach; ?>
|
||||
<tr>
|
||||
<td>
|
||||
<td><?= 'Total' ?>
|
||||
<td><?= \number_format($account[4480][$fiscal_end->format('Y')]['value'] ?? 0, 2, ',', '.') ?>
|
||||
<td><?= 'Total'; ?>
|
||||
<td><?= \number_format($account[4480][$fiscal_end->format('Y')]['value'] ?? 0, 2, ',', '.'); ?>
|
||||
</table>
|
||||
</section>
|
||||
|
||||
|
|
@ -426,14 +426,14 @@ require 'Worker.php';
|
|||
<?php $loop = $account[4480][$fiscal_end->format('Y')]['cc'] ?? [];
|
||||
foreach ($loop as $key => $cc) : ?>
|
||||
<tr>
|
||||
<td><?= $key ?>
|
||||
<td><?= $ccDef[$key] ?? '' ?>
|
||||
<td><?= \number_format($cc, 2, ',', '.') ?>
|
||||
<td><?= $key; ?>
|
||||
<td><?= $ccDef[$key] ?? ''; ?>
|
||||
<td><?= \number_format($cc, 2, ',', '.'); ?>
|
||||
<?php endforeach; ?>
|
||||
<tr>
|
||||
<td>
|
||||
<td><?= 'Total' ?>
|
||||
<td><?= \number_format($account[4480][$fiscal_end->format('Y')]['value'] ?? 0, 2, ',', '.') ?>
|
||||
<td><?= 'Total'; ?>
|
||||
<td><?= \number_format($account[4480][$fiscal_end->format('Y')]['value'] ?? 0, 2, ',', '.'); ?>
|
||||
</table>
|
||||
</section>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ class TemplateTest extends \PHPUnit\Framework\TestCase
|
|||
$this->template->setUnit(new NullUnit(1));
|
||||
self::assertEquals(1, $this->template->getUnit()->getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* @testdox The creator can be set and returned correctly
|
||||
* @covers Modules\Helper\Models\Template
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user