mirror of
https://gitlab.com/uldvstar/exchange-2.0.git
synced 2026-08-19 04:24:16 +00:00
fix wallets transaction lists
This commit is contained in:
@@ -15,6 +15,7 @@ use App\Models\SegmentConstant;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class CompanyResource extends JsonResource
|
||||
{
|
||||
@@ -28,7 +29,7 @@ class CompanyResource extends JsonResource
|
||||
{
|
||||
$lastPayment = $this->transactions()->where('transactions.type', TransactionType::PAYMENT)->whereIn('transactions.status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED])->orderBy('id', 'DESC')->first();
|
||||
$totalPayments = $this->transactions()->where('transactions.type', TransactionType::PAYMENT)->whereIn('transactions.status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED])->sum('amount');
|
||||
|
||||
Log::info($this->wallets()->first()->code);
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'name' => $this->name,
|
||||
|
||||
@@ -125,7 +125,6 @@ Route::get('/wallet/{marking}/details', function ($marking) {
|
||||
})->name('wallet.details');
|
||||
|
||||
Route::get('/wallets', function () {
|
||||
dd(\App\Models\Company::find(1923)->wallets()->first());
|
||||
return view('pages.wallet.wallets');
|
||||
})->name('wallet.wallets');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user