mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-28 08:53:59 +00:00
Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0 into development
This commit is contained in:
@@ -65,7 +65,7 @@ class AutoPurchaseOrderFillLogic extends AbstractControllerLogic
|
||||
public function logic(Request $request) : JsonResponse
|
||||
{
|
||||
$bookings = Booking::where(function($query){
|
||||
return $query->whereMonth('created_at', 01)->orWhereMonth('created_at', 02);
|
||||
return $query->whereMonth('created_at', 03)->orWhereMonth('created_at', 04);
|
||||
})->whereDoesntHave('transactions', function($q){
|
||||
$q->where('type', TransactionType::PURCHASE_ORDER);
|
||||
$q->whereIn('status', [ApprovalStatus::PENDING_VERIFICATION, ApprovalStatus::APPROVED]);
|
||||
|
||||
@@ -7,21 +7,26 @@ use App\Classes\ValueObjects\Constants\CompanyType;
|
||||
use App\Models\Company;
|
||||
use Maatwebsite\Excel\Concerns\Exportable;
|
||||
use Maatwebsite\Excel\Concerns\FromQuery;
|
||||
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
||||
use Maatwebsite\Excel\Concerns\WithHeadingRow;
|
||||
use Maatwebsite\Excel\Concerns\WithHeadings;
|
||||
use Maatwebsite\Excel\Concerns\WithMapping;
|
||||
|
||||
class ExportsCustomers implements FromQuery, WithHeadingRow, WithMapping
|
||||
class ExportsCustomers implements FromQuery, WithHeadings, WithHeadingRow, WithMapping, ShouldAutoSize
|
||||
{
|
||||
|
||||
use Exportable;
|
||||
|
||||
public function headings(): array
|
||||
{
|
||||
return [
|
||||
'Marking',
|
||||
'Name',
|
||||
'Company Name',
|
||||
'Email',
|
||||
'Account Name',
|
||||
'Phone Number',
|
||||
'Business type',
|
||||
'Number of bookings',
|
||||
'Last booking Date',
|
||||
'Bookings total',
|
||||
'Registration Date',
|
||||
'System Registration'
|
||||
@@ -44,13 +49,18 @@ class ExportsCustomers implements FromQuery, WithHeadingRow, WithMapping
|
||||
public function map($company): array
|
||||
{
|
||||
|
||||
$employee = $company->employees()->first();
|
||||
$lastBooking = $company->bookings()->orderByDesc('id')->first();
|
||||
|
||||
return [
|
||||
$company->reference,
|
||||
$company->name,
|
||||
$company->employees()->first() ? $company->employees()->first()->name : '',
|
||||
$employee ? $employee->email : '',
|
||||
$employee ? $employee->name : '',
|
||||
$company->contacts()->first() ? $company->contacts()->first()->phone : '',
|
||||
$company->type === CompanyType::COMPANY_BUSINESS ? 'Company' : 'individual',
|
||||
count($company->bookings),
|
||||
$lastBooking ? $lastBooking->created_at : '',
|
||||
$company->bookings()->sum('fix_amount'),
|
||||
\PhpOffice\PhpSpreadsheet\Shared\Date::dateTimeToExcel($company->created_at),
|
||||
count($company->segments()->where('segment_id', '=', 5)->get()) ? 'Exchange 1.0' : 'Exchange 2.0'
|
||||
|
||||
@@ -97,7 +97,7 @@ class CreateSupplierTransactionProcessor
|
||||
$this->pushBill($billTransaction);
|
||||
|
||||
$transferFeeNumber = $this->generatesTransactionBillNumber->execute('TRFR-');
|
||||
$transferFee = $this->calculatesTransactionTransferFee->execute($billTransaction->amount, $constant);
|
||||
$transferFee = $this->calculatesTransactionTransferFee->execute($billTransaction->original_amount, $constant);
|
||||
$object = new TransactionObject($transferFeeNumber, TransactionType::TRANSFER_FEE, 1, $supplier->id,
|
||||
$supplier->banks()->where('default', true)->first()->id, PaymentMethodType::CASH,
|
||||
$payment->original_amount, $payment->original_amount, $payment->original_currency_id, $payment->original_currency_id,
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 56 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
@@ -14,18 +14,10 @@
|
||||
<small class="bold fs-10 text-danger">{{error}}</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-b-10" v-if="type === 2">
|
||||
<div class="col">
|
||||
<validation-wrapper-component :validator="$v.parameters.reference">
|
||||
<label>Reference</label>
|
||||
<input type="text" class="form-control" v-model="parameters.reference" :disabled="disabled">
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-b-10">
|
||||
<div class="col">
|
||||
<validation-wrapper-component :validator="$v.parameters.account_no">
|
||||
<label>{{ serviceType.id === 4 ? 'Alipay recipient Email / Phone' : 'Account No.' }}</label>
|
||||
<label>{{ serviceType.id === 4 ? '1688 Login Id/Email/Phone' : 'Account No.' }}</label>
|
||||
<input type="text" class="form-control" v-model="parameters.account_no" :disabled="disabled">
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
@@ -33,20 +25,17 @@
|
||||
<div class="row m-b-10">
|
||||
<div class="col">
|
||||
<validation-wrapper-component :validator="$v.parameters.holder_name">
|
||||
<label>Account Holder Name</label>
|
||||
<label>1688 Login Password</label>
|
||||
<input type="text" class="form-control" v-model="parameters.holder_name" @keyup="onlyChinese($event)" :disabled="disabled">
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" v-show="englishTextWarning === true">
|
||||
<div class="row m-b-10">
|
||||
<div class="col">
|
||||
<div class="fs-11 text-danger m-b-10" v-if="!confirmProceedEnglishText">Warning: We do not encourage to transfer to non-chinese recipient Alipay account ! <span class="text-danger bold pointer text-underline" @click="confirmProceedEnglishText = !confirmProceedEnglishText">Proceed Anyway.</span></div>
|
||||
<div class="row" v-if="confirmProceedEnglishText">
|
||||
<div class="col text-danger bold">
|
||||
<p>Foreign name alipay may exceed Monthly / Yearly Limit , and may be unable to withdraw your funds out.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="text-danger m-b-10" v-if="confirmProceedEnglishText">The risk is too high. <span class="text-danger bold pointer text-underline" @click="confirmProceedEnglishText = !confirmProceedEnglishText">I changed my mind.</span></div>
|
||||
<validation-wrapper-component :validator="$v.parameters.bank_branch">
|
||||
<label>AliPay 6-digit Payment Pin</label>
|
||||
<input type="text" class="form-control" v-model="parameters.bank_branch" :disabled="disabled">
|
||||
</validation-wrapper-component>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
@@ -54,7 +43,7 @@
|
||||
<div class="btn btn-sm btn-default bg-master-lightest btn-block b-rad-none" :data-dismiss="closable ? 'modal' : ''" @click="$emit('close')">{{disabled ? 'Change Recipient Account' : 'Cancel'}}</div>
|
||||
</div>
|
||||
<div class="col p-l-5" v-if="!disabled">
|
||||
<button class="btn btn-sm btn-success btn-block b-rad-none" @click="submitForm()" :disabled="!confirmProceedEnglishText && englishTextWarning">Add Account</button>
|
||||
<button class="btn btn-sm btn-success btn-block b-rad-none" @click="submitForm()">Add Account</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -102,7 +91,7 @@
|
||||
bank_name: '-',
|
||||
holder_name: '',
|
||||
account_no: '',
|
||||
bank_branch: '-',
|
||||
bank_branch: '',
|
||||
country_id: this.country_id,
|
||||
},
|
||||
englishTextWarning: false,
|
||||
@@ -117,15 +106,15 @@
|
||||
account_no: {
|
||||
required
|
||||
},
|
||||
reference: {
|
||||
required: requiredIf(function () { return this.parameters.type === 2 })
|
||||
bank_branch: {
|
||||
required
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
submitForm(){
|
||||
this.parameters.account_type = 3,
|
||||
this.parameters.bank_name = '-',
|
||||
this.parameters.account_type = 3;
|
||||
this.parameters.bank_name = '-';
|
||||
this.submit(route('api.bank.create'), 'post', this.section, true, false);
|
||||
},
|
||||
successHandler(response){
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
<!--</div>-->
|
||||
<div class="row parentContainer">
|
||||
<div class="col">
|
||||
<div class="row text-center m-b-15" v-if="data.serviceType.id === 4">
|
||||
<div class="row text-center m-b-15 hide" v-if="data.serviceType.id === 4">
|
||||
<div class="col-auto p-r-0">
|
||||
<div class="b-a b-grey bg-white padding-15 pointer b-primary text-primary">
|
||||
<div class="m-b-5">
|
||||
@@ -103,7 +103,7 @@
|
||||
<div class="row" id="select-list" name="select-list">
|
||||
<div class="col">
|
||||
<div class="form-group no-margin form-group-default">
|
||||
<label>{{ data.serviceType.id === 4 ? 'Alipay recipient Email / Phone' : 'Account No.' }}</label>
|
||||
<label>{{ data.serviceType.id === 4 ? '1688 Login Id/Email/Phone' : 'Account No.' }}</label>
|
||||
<input type="text" class="form-control" v-model="account_no" @keyup="parameters.bankAccount = {}" @focus="dropdownStatus = true">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div class="row parentContainer">
|
||||
<div class="col">
|
||||
<new-service-announcement-component :data="data"></new-service-announcement-component>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row m-l-0 m-r-0 m-b-20" v-if="!data.services.length">
|
||||
|
||||
+194
@@ -0,0 +1,194 @@
|
||||
<template>
|
||||
<div class="row m-b-15 align-items-end parentContainer">
|
||||
<div class="col">
|
||||
<div class="row m-l-0 m-r-0 m-b-15 animate__animated animate__tada animate__repeat-2 animate__delay-3s" v-if="!data.segments.some(item => item.id === 13 || item.id === 16)">
|
||||
<div class="col bg-white padding-15">
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<img class="m-b-10 w-100" src="/images/1688_approved.png" />
|
||||
</div>
|
||||
<div class="col"></div>
|
||||
<div class="col-4">
|
||||
<img class="m-b-10 w-100" src="/images/best-rate-300x127.png" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row ">
|
||||
<div class="col">
|
||||
<h5 class="m-b-0">Hi, {{$store.getters.getUserName}}</h5>
|
||||
<h4 class="m-t-0">A new <span class="bold">1688 payment</span> solution for you</h4>
|
||||
<p>Our team will access your 1688 account and pay on your behalf.</p>
|
||||
<p>To activate the service, <span class="bold text-underline text-complete pointer requestModal" data-type="requirements" @click="ServiceWaitingList">check requirements</span>.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="checkbox check-primary m-t-0">
|
||||
<input type="checkbox" v-model="acknowledge" id="acknowledge">
|
||||
<label for="acknowledge" style="white-space: pre-wrap;">I hereby acknowledge that I have read the requirements and my 1688 account is eligible for this service.</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col text-center">
|
||||
<div class="btn btn-lg block btn m-b-5 no-border text-white" :class="[{'bg-primary': acknowledge}, {'bg-primary-lighter': !acknowledge}]" :style="{ cursor: acknowledge ? 'pointer' : 'no-drop' }" @click="activateService">Activate Service</div>
|
||||
<!--<p class="text-danger fs-12 bold pointer">Didn't meet the requirements?</p>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" :class="[{'overflow-hidden': !expanded}]">
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<!--<p>Our team will access your 1688 account and pay on your behalf.</p>-->
|
||||
<div class="row">
|
||||
<div class="col m-t-10" v-if="expanded">
|
||||
<p>1. Officially <span class="bold text-success all-caps">Authorized</span> by Alibaba 1688.</p>
|
||||
<p>2. <span class="bold text-success all-caps">No restrictions</span> on the amount you want to transfer.</p>
|
||||
<p>3. You can be sure your account will <span class="bold text-success all-caps">never freeze</span>, 100% guarantee.</p>
|
||||
<p class="m-b-20">4. You're handed a <span class="bold text-success all-caps">local invoice</span>, complete with tax information and line items for your records.</p>
|
||||
<p class="no-margin text-center hint-text pointer text-underline" @click="ServiceNotInterested">No thank you, I am not interested.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" v-if="!expanded">
|
||||
<div class="col">
|
||||
<div class="m-b-0 m-t-5 d-flex justify-content-center text-complete text-underline cursor" @click="expanded = !expanded">Learn more</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<modal-component small type="requirements">
|
||||
<div class="row" v-if="!failed">
|
||||
<div class="col text-center">
|
||||
<div class="row">
|
||||
<div class="col text-center">
|
||||
<div class="row m-b-20">
|
||||
<div class="col">
|
||||
<h3 class="all-caps">Service Requirements</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<iframe width="100%" height="auto" src="https://www.youtube.com/embed/6OQG50XnAOg" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-b-15 text-left">
|
||||
<div class="col">
|
||||
<h4>To active this the service, please ensure that:</h4>
|
||||
<p class="bold">1. Your 1688 account is linked with your Alipay account.</p>
|
||||
<p class="bold">2. Your Alipay account has real-name authorized. [text]</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row text-left m-b-10">
|
||||
<div class="col">
|
||||
<p>If you fulfill the two requirements above, please click "activate" button to activate the service immediately</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="btn btn-lg btn m-b-5 btn-primary p-l-50 p-r-50" @click="activateService">Activate</div>
|
||||
<p class="no-margin text-center text-danger pointer text-underline" @click="failedRequierments">don't meet the requirements?</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" v-if="failed">
|
||||
<div class="col">
|
||||
<div class="row m-b-20">
|
||||
<div class="col">
|
||||
<h3 class="all-caps">How to fulfill the requirements for 1688 Payment</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row m-b-15 text-left">
|
||||
<div class="col">
|
||||
<h4>You need to ensure your Alipay is verified & bound to your 1688 account.</h4>
|
||||
<p class="bold">1. Download and sign up on Alipay app.</p>
|
||||
<p class="bold">2. Complete registration and receive verification code.</p>
|
||||
<p class="bold">3. Click on "Me" shortcut at the bottom of Alipay homepage.</p>
|
||||
<p class="bold">4. Click on 'Settings'at top right.</p>
|
||||
<p class="bold">5. Select "Account & Security", click on "Real Name Verification".</p>
|
||||
<p class="bold">6. Click on "Verify now" , and submit the info requested.</p>
|
||||
<p class="bold">7. You may use any verification method using passport.</p>
|
||||
<p class="bold">8. Upload your passport photo and complete personal information</p>
|
||||
<p class="bold">9. If Alipay shows "Verified", then it is successful.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row text-left m-b-10">
|
||||
<div class="col">
|
||||
<p>For further enquiries, contact us via the chatbox.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</modal-component>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import componentHandler from '../../../general/mixins/componentHandler';
|
||||
export default {
|
||||
data(){
|
||||
return {
|
||||
acknowledge: false,
|
||||
parameters: {
|
||||
segment_id: ''
|
||||
},
|
||||
expanded: false,
|
||||
failed: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
activateService(){
|
||||
this.parameters = {
|
||||
segment_id: 13
|
||||
};
|
||||
|
||||
if(this.acknowledge){
|
||||
this.submit(this.route('api.company.segment.assign', this.data.id), 'post', 'activateService', true, false);
|
||||
}
|
||||
|
||||
location.reload();
|
||||
},
|
||||
ServiceWaitingList(){
|
||||
this.acknowledge = true;
|
||||
this.parameters = {
|
||||
segment_id: 14
|
||||
};
|
||||
|
||||
this.submit(this.route('api.company.segment.assign', this.data.id), 'post', 'activateService', false, false)
|
||||
},
|
||||
failedRequierments(){
|
||||
this.failed = true;
|
||||
this.acknowledge = true;
|
||||
this.parameters = {
|
||||
segment_id: 17
|
||||
};
|
||||
|
||||
this.submit(this.route('api.company.segment.assign', this.data.id), 'post', 'activateService', false, false)
|
||||
},
|
||||
ServiceNotInterested(){
|
||||
this.parameters = {
|
||||
segment_id: 16
|
||||
};
|
||||
|
||||
this.submit(this.route('api.company.segment.assign', this.data.id), 'post', 'activateService', true, false);
|
||||
location.reload();
|
||||
}
|
||||
},
|
||||
mixins: [componentHandler]
|
||||
}
|
||||
</script>
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="row">
|
||||
<div class="row parentContainer">
|
||||
<div class="col">
|
||||
<div class="row m-b-20 parentContainer" v-if="data.id === 9">
|
||||
<div class="col-auto">
|
||||
@@ -22,50 +22,6 @@
|
||||
</div>
|
||||
</modal-component>
|
||||
</div>
|
||||
<div class="row m-l-0 m-r-0 m-b-15">
|
||||
<div class="col bg-white padding-15">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="bold d-flex align-items-center m-b-10">
|
||||
<span class="rounded badge-success m-r-10 padding-5 p-l-15 p-r-15">New</span> March 1, 2020
|
||||
</div>
|
||||
<h5 class="bold fs-18">Try out our wallet to get a better rate now.</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<img class="m-b-10 w-100" src="/images/10107.jpg" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" :class="[{'h-25': !expanded}, {'overflow-hidden': !expanded}]">
|
||||
<div class="col position-relative">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<p>Transferring your payments by using the wallet just got a lot easier.</p>
|
||||
<div class="row">
|
||||
<div class="col" v-if="expanded">
|
||||
<p class="no-margin">This release you can:</p>
|
||||
<p class="no-margin">1. Top up once, pay for multiple transfers</p>
|
||||
<p class="no-margin">2. Get your refund back to your wallet</p>
|
||||
<p class="no-margin">3. Get a better exchange rate.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row position-absolute top-0 w-100 gradient-white p-t-15 p-b-15" v-if="!expanded">
|
||||
<div class="col">
|
||||
<div class="m-b-0 m-t-5 d-flex justify-content-center cursor" @click="expanded = !expanded">Show more <i class="fa fa-angle-down fs-20 bold m-l-10"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" v-if="expanded">
|
||||
<div class="col">
|
||||
<div class="m-b-0 m-t-5 d-flex justify-content-center cursor" @click="expanded = !expanded">Show less <i class="fa fa-angle-up fs-20 bold m-l-10"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" v-if="!reload">
|
||||
<div class="col">
|
||||
<div class="bg-complete" :class="[{'padding-25': !mini}, {'padding-15': mini}]">
|
||||
@@ -121,7 +77,6 @@
|
||||
data(){
|
||||
return {
|
||||
reload: false,
|
||||
expanded: false
|
||||
}
|
||||
},
|
||||
mixins: [componentHandler],
|
||||
|
||||
Reference in New Issue
Block a user