mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-19 04:23:55 +00:00
Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/exchange-2.0 into rate-history-refactored
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Companies;
|
||||
|
||||
use App\Classes\Modules\Companies\ControllersLogic\UpdateCompanyNameAndDebtorLogic;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class UpdateCompanyNameAndDebtorController extends Controller
|
||||
{
|
||||
/**
|
||||
* @param Request $request
|
||||
*/
|
||||
public function update(Request $request, UpdateCompanyNameAndDebtorLogic $logic) : JsonResponse
|
||||
{
|
||||
return $logic->execute($request);
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@ use App\Classes\ValueObjects\Constants\TransactionType;
|
||||
use App\Classes\ValueObjects\Constants\DocumentType;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class BookingResource extends JsonResource
|
||||
{
|
||||
|
||||
@@ -37,6 +37,7 @@ class CompanyResource extends JsonResource
|
||||
'id' => $this->id,
|
||||
'name' => $this->name,
|
||||
'reference' => $this->reference,
|
||||
'debtor' => $this->debtor,
|
||||
'type' => (int) $this->type,
|
||||
'business_type' => (int) $this->business_type,
|
||||
'status' => (int) $this->status,
|
||||
|
||||
@@ -7,6 +7,7 @@ use App\Classes\ValueObjects\Constants\TransactionType;
|
||||
use App\Models\Transaction;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class WalletTransactionResource extends JsonResource
|
||||
{
|
||||
@@ -27,7 +28,14 @@ class WalletTransactionResource extends JsonResource
|
||||
$description = 'Credit Voucher for '.$this->payment_reference;
|
||||
break;
|
||||
case 1:
|
||||
$marking = Transaction::where('payment_reference', $this->bill_no)->first()->owner->marking;
|
||||
$booking = Transaction::where('payment_reference', $this->bill_no)->first()->owner;
|
||||
|
||||
if(!$booking) {
|
||||
$description = 'Payment for unknown booking, please contact tech support.';
|
||||
break;
|
||||
}
|
||||
|
||||
$marking = $booking->marking;
|
||||
$description = 'Payment For booking refs.'.'<a href="'.route('booking.details', $marking).'">'.$marking.'</a>';
|
||||
break;
|
||||
case 11:
|
||||
|
||||
Reference in New Issue
Block a user