fix(wallet): absorb cash left on old owner type
Deposits credited before customer type was set stayed on owner_type 0 and assets ignored them. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -26,6 +26,10 @@ class AssetSummaryService
|
||||
|
||||
public function buildForCustomer(int $customerId, int $ownerType, bool $includeInactiveProducts = false): array
|
||||
{
|
||||
if ($customerId > 0 && $ownerType > 0) {
|
||||
$this->walletBalanceService->absorbMismatchedOwnerTypeBalances($customerId, $ownerType);
|
||||
}
|
||||
|
||||
$catalogQuery = Product::query()->with('file');
|
||||
if (!$includeInactiveProducts) {
|
||||
$catalogQuery->where('active', 1);
|
||||
|
||||
Reference in New Issue
Block a user