mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-22 22:13:59 +00:00
Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/exchange-2.0 into development
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -200,6 +200,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row no-margin justify-content-end" v-if="(item.transaction_bill.status === 2 || item.transaction_bill.status === 3)">
|
||||
<div class="col-auto no-padding m-l-5 requestModal pointer" v-if="$store.getters.isSuperAdmin" data-type="deletePaymentProofModal">
|
||||
<div class="icon-thumbnail fs-11 text-white icon-25 bg-danger btn-rounded float-left m-r-0">
|
||||
<i class="fa fa-trash fs-10"></i>
|
||||
</div>
|
||||
<modal-component type="deletePaymentProofModal">
|
||||
<reject-payment-transaction-form-component :data="item.transaction_bill" :section="section" class="text-center"></reject-payment-transaction-form-component>
|
||||
</modal-component>
|
||||
</div>
|
||||
<div v-for="file in item.transaction_bill.documents.files" v-bind:key="file.id" class="col-auto no-padding m-l-5">
|
||||
<document-file-viewer-component :file="file">
|
||||
<template slot="button">
|
||||
@@ -219,7 +227,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" v-if="$store.getters.isAdmin">
|
||||
<div class="row" v-if="$store.getters.isAdmin && item.transaction_bill">
|
||||
<div class="col-6 m-auto">
|
||||
<div class="row p-t-20 p-b-20 b-a b-dashed b-success requestModal pointer" v-if="item.transaction_bill.status === 1" data-type="paymentProofModal">
|
||||
<div class="col">
|
||||
@@ -235,7 +243,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<modal-component type="paymentProofModal">
|
||||
<payment-proof-form-component section="paymentProofSection" :id="item.transaction_bill.id" :data="item.transaction_bill"></payment-proof-form-component>
|
||||
<payment-proof-form-component :section="section" :id="item.transaction_bill.id" :data="item.transaction_bill"></payment-proof-form-component>
|
||||
</modal-component>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+12
-12
@@ -461,18 +461,18 @@ Route::get('/1688/fix/{reference}', function($reference){
|
||||
|
||||
Route::get('/po/manual/fix', function(){
|
||||
|
||||
$bookings = Booking::whereIn('company_id', [199, 510])->whereHas('documents', function($query){
|
||||
return $query->where('document_type', DocumentType::ECOMMERCE_PURCHASE_ORDER);
|
||||
})->get();
|
||||
|
||||
foreach ($bookings as $booking){
|
||||
$booking->status = ApprovalStatus::APPROVED;
|
||||
$booking->save();
|
||||
|
||||
$booking->documents()->whereIn('document_type', [DocumentType::PURCHASE_ORDER, DocumentType::DELIVER_ORDER, DocumentType::INVOICE, DocumentType::SUPPLIER_DELIVER_ORDER])->delete();
|
||||
$booking->transactions()->where('type', TransactionType::PURCHASE_ORDER)->update(['status' => ApprovalStatus::PENDING_SUBMISSION]);
|
||||
|
||||
}
|
||||
// $bookings = Booking::whereIn('company_id', [199, 510])->whereHas('documents', function($query){
|
||||
// return $query->where('document_type', DocumentType::ECOMMERCE_PURCHASE_ORDER);
|
||||
// })->get();
|
||||
//
|
||||
// foreach ($bookings as $booking){
|
||||
// $booking->status = ApprovalStatus::APPROVED;
|
||||
// $booking->save();
|
||||
//
|
||||
// $booking->documents()->whereIn('document_type', [DocumentType::PURCHASE_ORDER, DocumentType::DELIVER_ORDER, DocumentType::INVOICE, DocumentType::SUPPLIER_DELIVER_ORDER])->delete();
|
||||
// $booking->transactions()->where('type', TransactionType::PURCHASE_ORDER)->update(['status' => ApprovalStatus::PENDING_SUBMISSION]);
|
||||
//
|
||||
// }
|
||||
|
||||
})->name('ecommerce.fix');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user