added gholak

This commit is contained in:
2026-08-01 17:30:14 +03:30
parent 9642e603e7
commit eaff9dead2
12 changed files with 538 additions and 75 deletions
@@ -323,9 +323,9 @@ class PargarInboundController extends Controller
$walletInterface = new WalletInterface($customer->id, $ownerType);
$wallet = $walletInterface->wallet;
// GoldInv پرگار فقط با طلای کیف اصلی مقایسه می‌شود — محصولات جدا سهمی ندارند
// GoldInv پرگار با جمع آزاد+قلک محصولات کیف اصلی مقایسه می‌شود (انتقال قلک سند نمی‌زند)
$appGold = app(WalletBalanceService::class)
->effectiveMainWalletGold((int) $customer->id, $ownerType);
->accountingVisibleMainWalletGold((int) $customer->id, $ownerType);
$appCash = (float) ($wallet->cash ?? 0);
$goldDiff = $goldInv - $appGold;
$rialDiff = $rialInv - $appCash;