update billplz ui

This commit is contained in:
edmondlang
2022-07-31 18:00:05 +08:00
parent af15e462ba
commit 374cc7748a
5 changed files with 32 additions and 2 deletions
@@ -0,0 +1,20 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class OwnerIdNotIn implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return Builder|mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->whereNotIn('owner_id', $value);
}
}
@@ -83,7 +83,7 @@ class CreatePaymentTransactionLogic extends AbstractControllerLogic
$payment_method = PaymentMethodType::PAYMENT_GATEWAY;
$billPlzBill = $this->createsBillplzBill->execute(
$company_module->name,
$company_module->employees()->first()->email ?? '',
(app()->environment(['production'])) ? $company_module->employees()->first()->email : '',
'This payment is for the invoice number . ' . $invoice_transaction->bill_no,
$amount,
$billNumber,
@@ -109,6 +109,11 @@
}
this.error = '';
},
successHandler(response){
if (response.payload.data.payment_method === 5) {
window.location.href = this.route('billplz.bill', response.payload.data.payment_reference) + '?auto_submit=true';
}
}
},
mixins: [formHandler]
}
@@ -102,7 +102,7 @@
<div class="col bg-master-lightest p-1 p-sm-4">
<div class="row tabsContainer tabContent" tab-name="pendingInvoice">
<div class="col">
<list-component section="pendingInvoiceSection" :endpoint="route('api.packing_list.list')" :options="{does_not_have_transaction_type: 1}">
<list-component section="pendingInvoiceSection" :endpoint="route('api.packing_list.list')" :options="{does_not_have_transaction_type: 1, owner_id_not_in: [1], type: 2}">
<template slot="list" slot-scope="{data}">
<admin-payments-billing-component :data="data" invoice_status="Pending Invoice" section="pendingInvoiceSection" ></admin-payments-billing-component>
</template>
+5
View File
@@ -420,3 +420,8 @@ Route::get('/payment-and-billing', function () {
return view('pages.paymentAndBilling');
})->name('admin.payment-and-billing');
Route::get('/notifications/list', 'Notifications\ListNotificationsController@list')->name('notifications.list');
Route::get('billplz/bills/{bill_no}', function($bill_no){
return redirect(env('BILLPLZ_BASE_URL').'/bills/'.$bill_no);
})->name('billplz.bill');