This commit is contained in:
2023-11-09 19:24:47 +02:00
parent 1645f58a63
commit fc17eada24
19 changed files with 1255 additions and 953 deletions
+6 -5
View File
@@ -3,6 +3,7 @@
use Core\Config;
use Core\Db;
use Core\View;
use Enum\ShopId;
use Helper\Conversion;
use Location\Shop;
use User\Clan;
@@ -28,13 +29,13 @@ $giftsvars = [];
$otdel = 1;
if ((int)$u->info['room'] === 10) {
$shopId = Shop::MAIN;
$shopId = ShopId::MAIN;
}
if ((int)$u->info['room'] === 368) {
$shopId = Shop::SHOP_2;
$shopId = ShopId::SHOP_2;
}
if ((int)$u->info['room'] === 13) {
$shopId = Shop::BEREZKA;
$shopId = ShopId::BEREZKA;
}
if ($_SERVER["REQUEST_METHOD"] === "GET") { //неясно почему, $_GET вызывается буквалльно всегда, даже на пустом месте.
@@ -91,7 +92,7 @@ if ($actionSale) {
ItemsModel::delete($item['id']);
$u->addKr($sellprice);
$status = "Вы успешно продали предмет «{$item['name']}» за $sellprice кр.";
Delo::add(2, 'shopid:' . $shopId, $u->info['id'], "Предмет «{$item['name']}» [id:{$item['id']}] продан за $sellprice кр.", -$sellprice);
Delo::add(2, 'shopid:' . $shopId->value, $u->info['id'], "Предмет «{$item['name']}» [id:{$item['id']}] продан за $sellprice кр.", -$sellprice);
}
}
}
@@ -132,7 +133,7 @@ $renderArgs = [
'shop' => $shop,
'goLis' => $goLis,
'code' => $code,
'shopId' => $shopId,
'shopId' => $shopId->value,
'otdels' => $shop->getUsedOtdels(),
'i' => 1,
];