Merge branch 'master' of gitlab.com:CIEFWorldwideSdnBhd/exchange-2.0 into refund-ui-tab

This commit is contained in:
azumiru
2022-03-07 01:53:17 +08:00
7 changed files with 26 additions and 6 deletions
@@ -0,0 +1,20 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class PaymentMethodNotIn implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return Builder|mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->whereNotIn('payment_method', $value);
}
}
@@ -121,7 +121,7 @@ class CreateBookingPaymentLogic extends AbstractControllerLogic
/** @var Wallet $wallet */
$wallet = $booking->company->wallets()->first();
if($wallet->amount < $amount){
if($wallet->amount < round($amount, 2)){
throw new MalformedRequestException('Insufficient wallet balance. Please Top up your wallet.');
}
@@ -4,7 +4,7 @@
<p>{{item.documents ? item.documents.created_at : item.updated_at}}</p>
</td>
<td class="v-align-middle ">
<p v-if="item.booking.bank.bank_name.includes('浙江网商银行')">1688.com</p>
<p v-if="item.booking.bank.bank_name.includes('浙江网商银行')">1688.com, </p>{{item.interval.value}} {{item.interval.duration}} days
</td>
<td class="v-align-middle ">
<p>{{item.booking.marking}}</p>
@@ -529,7 +529,7 @@
computed: {
walletOutstanding(){
let walletBalance = this.data.company.wallet ? this.data.company.wallet.amount : 0;
return walletBalance - this.calculation.total;
return (walletBalance - this.calculation.total).toFixed(2);
}
},
methods: {
@@ -114,7 +114,7 @@
</div>
<div class="row">
<div class="col">
<list-component ref="pendingOrdersList" section="pendingOrdersSection" :endpoint="route('api.transaction.list')" :options="{per_page: 10000, status: 2, type: 1, original_currency_id_in: [selectedCurrency.id], service_type_id_in: [selectedService.id]}">
<list-component ref="pendingOrdersList" section="pendingOrdersSection" :endpoint="route('api.transaction.list')" :options="{per_page: 10000, status: 2, owner_type: 'App\\Models\\Booking', type: 1, original_currency_id_in: [selectedCurrency.id], service_type_id_in: [selectedService.id]}">
<template slot="list" slot-scope="{data}">
<supplier-pending-order-component :data="data" v-on:input="updateOrder($event)"></supplier-pending-order-component>
</template>
@@ -47,7 +47,7 @@
},
methods: {
fetchList(Page = 1){
this.submit(route('api.transaction.list') + '?page='+ Page +'&filters=' + JSON.stringify({status: 2, type: 1, per_page: 50, order_by: {
this.submit(route('api.transaction.list') + '?page='+ Page +'&filters=' + JSON.stringify({status: 2, type: 1, owner_type: 'App\\Models\\Booking', per_page: 50, order_by: {
column: 'created_at',
DESC: true
}}), 'get', 'urgentListSection', false, true)
+1 -1
View File
@@ -11,7 +11,7 @@
</div>
<div class="row">
<div class="col">
<list-component key="2" section="paymentVerificationSection" :endpoint="route('api.transaction.list')" :options="{'type': 1, 'status': 3}">
<list-component key="2" section="paymentVerificationSection" :endpoint="route('api.transaction.list')" :options="{'type': 1, 'status': 3, 'payment_method_not_in': [4]}">
<template slot="list" slot-scope="{data}">
<payment-verification-component section="paymentVerificationSection" :data="data" :no_action="true"></payment-verification-component>
</template>