make id public, organigram impl. media password/encryption, settings bug fix, Money->FloatInt change, ...

This commit is contained in:
Dennis Eichhorn 2023-05-06 11:42:06 +00:00
parent 28e5b2648f
commit 261c1f643a
12 changed files with 15 additions and 15 deletions

View File

@ -65,7 +65,7 @@ final class Installer extends InstallerAbstract
$stock->type = 0;
StockMapper::create()->execute($stock);
$stockLocation = new StockLocation((string) ($stock->getId() . '-1'));
$stockLocation = new StockLocation((string) ($stock->id . '-1'));
$stockLocation->stock = $stock;
StockLocationMapper::create()->execute($stockLocation);
}

View File

@ -66,11 +66,11 @@ final class ApiController extends Controller
StockMapper::create()->execute($stock);
$stockLocation = new StockLocation($stock->name . '-1');
$stockLocation->stock = $stock->getId();
$stockLocation->stock = $stock->id;
StockLocationMapper::create()->execute($stockLocation);
$stockShelf = new StockShelf($stockLocation->name . '-1');
$stockShelf->location = $stockLocation->getId();
$stockShelf->location = $stockLocation->id;
StockShelfMapper::create()->execute($stockShelf);
}

View File

@ -30,7 +30,7 @@ class Stock
* @var int
* @since 1.0.0
*/
protected int $id = 0;
public int $id = 0;
/**
* NAme.

View File

@ -30,7 +30,7 @@ class StockLocation
* @var int
* @since 1.0.0
*/
protected int $id = 0;
public int $id = 0;
public string $name = '';

View File

@ -33,7 +33,7 @@ class StockMovement
* @var int
* @since 1.0.0
*/
protected int $id = 0;
public int $id = 0;
public int $quantity = 0;

View File

@ -30,7 +30,7 @@ class StockShelf
* @var int
* @since 1.0.0
*/
protected int $id = 0;
public int $id = 0;
public string $name = '';

View File

@ -32,10 +32,10 @@ echo $this->getData('nav')->render(); ?>
<tbody>
<?php $count = 0; foreach ($stocks as $key => $value) :
++$count;
$url = UriFactory::build('{/base}/warehouse/stock?{?}&id=' . $value->getId());
$url = UriFactory::build('{/base}/warehouse/stock?{?}&id=' . $value->id);
?>
<tr data-href="<?= $url; ?>">
<td><a href="<?= $url; ?>"><?= $value->getId(); ?></a>
<td><a href="<?= $url; ?>"><?= $value->id; ?></a>
<td><a href="<?= $url; ?>"><?= $value->type; ?></a>
<td><a href="<?= $url; ?>"><?= $value->name; ?></a>
<?php endforeach; ?>

View File

@ -32,10 +32,10 @@ echo $this->getData('nav')->render(); ?>
<tbody>
<?php $count = 0; foreach ($locations as $key => $value) :
++$count;
$url = UriFactory::build('{/base}/warehouse/stock/location?{?}&id=' . $value->getId());
$url = UriFactory::build('{/base}/warehouse/stock/location?{?}&id=' . $value->id);
?>
<tr data-href="<?= $url; ?>">
<td><a href="<?= $url; ?>"><?= $value->getId(); ?></a>
<td><a href="<?= $url; ?>"><?= $value->id; ?></a>
<td><a href="<?= $url; ?>"><?= $value->stock->name; ?></a>
<td><a href="<?= $url; ?>"><?= $value->name; ?></a>
<?php endforeach; ?>

View File

@ -37,6 +37,6 @@ final class StockLocationTest extends \PHPUnit\Framework\TestCase
*/
public function testDefault() : void
{
self::assertEquals(0, $this->stock->getId());
self::assertEquals(0, $this->stock->id);
}
}

View File

@ -37,6 +37,6 @@ final class StockMovementTest extends \PHPUnit\Framework\TestCase
*/
public function testDefault() : void
{
self::assertEquals(0, $this->movement->getId());
self::assertEquals(0, $this->movement->id);
}
}

View File

@ -37,6 +37,6 @@ final class StockShelfTest extends \PHPUnit\Framework\TestCase
*/
public function testDefault() : void
{
self::assertEquals(0, $this->stock->getId());
self::assertEquals(0, $this->stock->id);
}
}

View File

@ -37,6 +37,6 @@ final class StockTest extends \PHPUnit\Framework\TestCase
*/
public function testDefault() : void
{
self::assertEquals(0, $this->stock->getId());
self::assertEquals(0, $this->stock->id);
}
}