test fixes + new test data

This commit is contained in:
Dennis Eichhorn 2023-05-19 02:37:35 +00:00
parent f2eb46f65f
commit 441a761109
5 changed files with 13 additions and 7 deletions

View File

@ -26,4 +26,11 @@ use phpOMS\Module\UpdaterAbstract;
*/
final class Updater extends UpdaterAbstract
{
/**
* Path of the file
*
* @var string
* @since 1.0.0
*/
public const PATH = __DIR__;
}

View File

@ -468,7 +468,7 @@ final class BackendController extends Controller
$topCustomers = SalesBillMapper::getItemTopClients($item->id, new SmartDateTime('Y-01-01'), new SmartDateTime('now'), 5);
$allInvoices = SalesBillMapper::getItemBills($item->id, new SmartDateTime('Y-01-01'), new SmartDateTime('now'));
$regionSales = SalesBillMapper::getItemRegionSales($item->id, new SmartDateTime('Y-01-01'), new SmartDateTime('now'));
$regionSales = [];
$countrySales = SalesBillMapper::getItemCountrySales($item->id, new SmartDateTime('Y-01-01'), new SmartDateTime('now'), 5);
$monthlySalesCosts = SalesBillMapper::getItemMonthlySalesCosts($item->id, (new SmartDateTime('now'))->createModify(-1), new SmartDateTime('now'));
} else {

View File

@ -138,9 +138,9 @@ echo $this->getData('nav')->render(); ?>
? 'Web/Backend/img/logo_grey.png'
: UriFactory::build($image->getPath()); ?>"></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->number); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getL11n('name1')->description); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getL11n('name2')->description); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getL11n('name3')->description); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getL11n('name1')->content); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getL11n('name2')->content); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getL11n('name3')->content); ?></a>
<td><a href="<?= $url; ?>"><?= $this->getCurrency($value->salesPrice); ?></a>
<td>
<td>

View File

@ -480,7 +480,7 @@ echo $this->getData('nav')->render();
<td><a href="<?= $url; ?>"><?= $value->id; ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->type->title); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getLanguage()); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->description); ?></a>
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->content); ?></a>
<?php endforeach; ?>
<?php if ($c === 0) : ?>
<tr>

View File

@ -17,7 +17,6 @@ namespace Modules\ItemManagement\tests\Models;
use Modules\Editor\Models\EditorDoc;
use Modules\ItemManagement\Models\Item;
use Modules\Attribute\Models\Attribute;
use Modules\ItemManagement\Models\ItemL11n;
use Modules\ItemManagement\Models\ItemStatus;
use Modules\Media\Models\Media;
use phpOMS\Localization\BaseStringL11n;
@ -51,7 +50,7 @@ final class ItemTest extends \PHPUnit\Framework\TestCase
self::assertEquals([], $this->item->getNotes());
self::assertEquals([], $this->item->getFiles());
self::assertEquals([], $this->item->getAttributes());
self::assertInstanceOf('Modules\ItemManagement\Models\ItemL11n', $this->item->getL11n(''));
self::assertInstanceOf(BaseStringL11n::class, $this->item->getL11n(''));
self::assertInstanceOf('phpOMS\Localization\Money', $this->item->salesPrice);
self::assertInstanceOf('phpOMS\Localization\Money', $this->item->purchasePrice);
}