mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-25 15:34:02 +00:00
Merge remote-tracking branch 'origin/development' into development
# Conflicts: # app/Classes/Modules/Billplzs/ControllersLogic/CallbackBillplzLogic.php
This commit is contained in:
@@ -25,7 +25,7 @@ class CreatesBillplzBill
|
||||
'name' => $name,
|
||||
'email' => $email,
|
||||
'description' => $description,
|
||||
'amount' => round($amount, 2) * 100,
|
||||
'amount' => $this->finalizeAmount($amount),
|
||||
'redirect_url' => route('online_payment.redirect'),
|
||||
'callback_url' => route('api.online_payment.callback'),
|
||||
'reference_1_label' => 'Bank Code',
|
||||
@@ -47,4 +47,9 @@ class CreatesBillplzBill
|
||||
throw new MalformedRequestException('Unable to get correct response from billplz server' . $exception->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
protected function finalizeAmount($amount){
|
||||
$number = round($amount, 2) * 100;
|
||||
return (string) $number;
|
||||
}
|
||||
}
|
||||
@@ -42,7 +42,7 @@ class BookingResource extends JsonResource
|
||||
'delivery_order' => new DocumentResource($this->documents()->where('document_type', DocumentType::DELIVER_ORDER)->first()),
|
||||
'invoice' => new DocumentResource($this->documents()->where('document_type', DocumentType::INVOICE)->first()),
|
||||
'supplier_delivery_order' => new DocumentResource($this->documents()->where('document_type', DocumentType::SUPPLIER_DELIVER_ORDER)->first()),
|
||||
'proforma_invoice' => new DocumentResource($this->documents()->where('document_type', DocumentType::PROFORMA_INVOICE)->whereNotIn('status', [ApprovalStatus::REJECTED, ApprovalStatus::EXPIRED])->first()),
|
||||
'proforma_invoice' => new DocumentResource($this->documents()->where('document_type', DocumentType::PROFORMA_INVOICE)->whereNotIn('status', [ApprovalStatus::REJECTED, ApprovalStatus::EXPIRED])->orderByDesc('id')->first()),
|
||||
],
|
||||
'status' => $this->status,
|
||||
'created_at' => Carbon::parse($this->created_at)->format('d-m-Y'),
|
||||
|
||||
@@ -122,6 +122,7 @@
|
||||
<div class="row" v-if="submitted && data.status !== 3">
|
||||
<div class="col-12 col-md-7">
|
||||
<button class="btn btn-xs btn-success b-rad-none" v-if="$store.getters.isAdmin && data.purchase_order.status === 1" @click="submit(route('api.booking.po.approval', data.id), 'post', section, true, true)">Approve Purchase Order</button>
|
||||
<button class="btn btn-xs btn-warning b-rad-none" v-if="data.documents.proforma_invoice" @click="submit(route('api.booking.proforma.create', data.id), 'post', section, true, true)">Regenerate Proforma Invoice</button>
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-6">
|
||||
<document-file-viewer-component :file="data.documents.proforma_invoice.files[0]" v-if="data.documents.proforma_invoice">
|
||||
@@ -149,7 +150,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-xs all-caps b-rad-none btn-default bg-master-lightest w-100" @click="submitted = false">Edit Purchase Order</button>
|
||||
<button class="btn btn-xs all-caps b-rad-none btn-success w-100 m-t-5" v-if="!data.documents.proforma_invoice" @click="submit(route('api.booking.proforma.create', data.id), 'post', section, true, true)">Generate Proforma Invoice</button>
|
||||
<button class="btn btn-xs all-caps b-rad-none btn-success w-100 m-t-5" v-if="!data.documents.proforma_invoice && data.outstanding_amount != 0" @click="submit(route('api.booking.proforma.create', data.id), 'post', section, true, true)">Generate Proforma Invoice</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
</div>
|
||||
<div class="address">
|
||||
@php
|
||||
$addresses = $supplier->addresses()->first();
|
||||
$addresses = $supplier->addresses()->where('billing', '=', true)->first();
|
||||
@endphp
|
||||
{{ $addresses->street_one }}
|
||||
{{ $addresses->street_two }} ,
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
</div>
|
||||
<div class="address">
|
||||
@php
|
||||
$addresses = $supplier->addresses()->first();
|
||||
$addresses = $supplier->addresses()->where('billing', '=', true)->first();
|
||||
@endphp
|
||||
{{ $addresses->street_one }}
|
||||
{{ $addresses->street_two }} ,
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
</div>
|
||||
<div class="address">
|
||||
@php
|
||||
$addresses = $supplier->addresses()->first();
|
||||
$addresses = $supplier->addresses()->where('billing', '=', true)->first();
|
||||
@endphp
|
||||
{{ $addresses->street_one }}
|
||||
{{ $addresses->street_two }} ,
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<br>
|
||||
<span class="address">
|
||||
@php
|
||||
$addresses = $supplier->addresses()->first();
|
||||
$addresses = $supplier->addresses()->where('billing', '=', true)->first();
|
||||
@endphp
|
||||
{{ $addresses->street_one }}
|
||||
{{ $addresses->street_two }}
|
||||
|
||||
Reference in New Issue
Block a user