fix report 2

This commit is contained in:
2026-06-24 01:32:32 +03:30
parent 64a14701c7
commit 38dd8253f0
4 changed files with 190 additions and 24 deletions
@@ -385,7 +385,7 @@ class WalletController extends Controller
$records = Transaction::with([
'customer',
'wallet.product:id,metal_id',
'wallet.product:id,title,metal_id',
'product:id,title,metal_id,group_type,unit,amount,trade_by_quantity,direct_price',
])->whereNull('fund_id');
TableEngine::create($records, $request->all())
+12 -4
View File
@@ -253,6 +253,14 @@ class Controller extends BaseController
return self::metalTypeLabel();
}
/** عنوان محصول(ات) کیف اصلی از `main_wallet_products` */
public static function mainWalletProductLabel(): string
{
$labels = app(ConfigService::class)->mainWalletProductLabels();
return $labels !== '' ? $labels : self::mainWalletMetalLabel();
}
/** برچسب معاملات آبشده: مقدار setting یا «آبشده» */
public static function meltedGoldLabel(): string
{
@@ -328,22 +336,22 @@ class Controller extends BaseController
public static function mainMetalBuyTitle(): string
{
return self::productBuyTitle(self::mainWalletMetalLabel());
return self::productBuyTitle(self::mainWalletProductLabel());
}
public static function mainMetalSellTitle(): string
{
return self::productSellTitle(self::mainWalletMetalLabel());
return self::productSellTitle(self::mainWalletProductLabel());
}
public static function mainMetalDepositTitle(): string
{
return 'واریز ' . self::mainWalletMetalLabel();
return 'واریز ' . self::mainWalletProductLabel();
}
public static function mainMetalWithdrawTitle(): string
{
return 'برداشت ' . self::mainWalletMetalLabel();
return 'برداشت ' . self::mainWalletProductLabel();
}
/**