mirror of
https://github.com/Karaka-Management/oms-ItemManagement.git
synced 2026-02-17 12:48:42 +00:00
test fixes + new test data
This commit is contained in:
parent
f2eb46f65f
commit
441a761109
|
|
@ -26,4 +26,11 @@ use phpOMS\Module\UpdaterAbstract;
|
||||||
*/
|
*/
|
||||||
final class Updater extends UpdaterAbstract
|
final class Updater extends UpdaterAbstract
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Path of the file
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public const PATH = __DIR__;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -468,7 +468,7 @@ final class BackendController extends Controller
|
||||||
|
|
||||||
$topCustomers = SalesBillMapper::getItemTopClients($item->id, new SmartDateTime('Y-01-01'), new SmartDateTime('now'), 5);
|
$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'));
|
$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);
|
$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'));
|
$monthlySalesCosts = SalesBillMapper::getItemMonthlySalesCosts($item->id, (new SmartDateTime('now'))->createModify(-1), new SmartDateTime('now'));
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -138,9 +138,9 @@ echo $this->getData('nav')->render(); ?>
|
||||||
? 'Web/Backend/img/logo_grey.png'
|
? 'Web/Backend/img/logo_grey.png'
|
||||||
: UriFactory::build($image->getPath()); ?>"></a>
|
: UriFactory::build($image->getPath()); ?>"></a>
|
||||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->number); ?></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('name1')->content); ?></a>
|
||||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getL11n('name2')->description); ?></a>
|
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getL11n('name2')->content); ?></a>
|
||||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getL11n('name3')->description); ?></a>
|
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->getL11n('name3')->content); ?></a>
|
||||||
<td><a href="<?= $url; ?>"><?= $this->getCurrency($value->salesPrice); ?></a>
|
<td><a href="<?= $url; ?>"><?= $this->getCurrency($value->salesPrice); ?></a>
|
||||||
<td>
|
<td>
|
||||||
<td>
|
<td>
|
||||||
|
|
|
||||||
|
|
@ -480,7 +480,7 @@ echo $this->getData('nav')->render();
|
||||||
<td><a href="<?= $url; ?>"><?= $value->id; ?></a>
|
<td><a href="<?= $url; ?>"><?= $value->id; ?></a>
|
||||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->type->title); ?></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->getLanguage()); ?></a>
|
||||||
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->description); ?></a>
|
<td><a href="<?= $url; ?>"><?= $this->printHtml($value->content); ?></a>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<?php if ($c === 0) : ?>
|
<?php if ($c === 0) : ?>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ namespace Modules\ItemManagement\tests\Models;
|
||||||
use Modules\Editor\Models\EditorDoc;
|
use Modules\Editor\Models\EditorDoc;
|
||||||
use Modules\ItemManagement\Models\Item;
|
use Modules\ItemManagement\Models\Item;
|
||||||
use Modules\Attribute\Models\Attribute;
|
use Modules\Attribute\Models\Attribute;
|
||||||
use Modules\ItemManagement\Models\ItemL11n;
|
|
||||||
use Modules\ItemManagement\Models\ItemStatus;
|
use Modules\ItemManagement\Models\ItemStatus;
|
||||||
use Modules\Media\Models\Media;
|
use Modules\Media\Models\Media;
|
||||||
use phpOMS\Localization\BaseStringL11n;
|
use phpOMS\Localization\BaseStringL11n;
|
||||||
|
|
@ -51,7 +50,7 @@ final class ItemTest extends \PHPUnit\Framework\TestCase
|
||||||
self::assertEquals([], $this->item->getNotes());
|
self::assertEquals([], $this->item->getNotes());
|
||||||
self::assertEquals([], $this->item->getFiles());
|
self::assertEquals([], $this->item->getFiles());
|
||||||
self::assertEquals([], $this->item->getAttributes());
|
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->salesPrice);
|
||||||
self::assertInstanceOf('phpOMS\Localization\Money', $this->item->purchasePrice);
|
self::assertInstanceOf('phpOMS\Localization\Money', $this->item->purchasePrice);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user