mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-29 01:14:04 +00:00
Compare commits
22 Commits
test
...
package-ui
| Author | SHA1 | Date | |
|---|---|---|---|
| 741ee423c7 | |||
| e1f5286b59 | |||
| abfd4758c4 | |||
| ba7f9a9efe | |||
| 914e9a6f0f | |||
| 525e7a5dd1 | |||
| a3cad7816c | |||
| 2100c4a14a | |||
| 0d090b4eaf | |||
| 73801a5acd | |||
| 2c0eeab84e | |||
| 40c4a39927 | |||
| 866df52e52 | |||
| b34d909a09 | |||
| 26b3e968e9 | |||
| 7b127b2cba | |||
| 7488313a0e | |||
| 7589b5c553 | |||
| d8391fe479 | |||
| c01e8d6eb2 | |||
| 5aad5f1729 | |||
| 485a6e2e82 |
@@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Classes\General\Eloquent\Filters;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
|
|
||||||
|
class BillNo implements Filter
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Builder $builder
|
||||||
|
* @param $value
|
||||||
|
* @return Builder|mixed
|
||||||
|
*/
|
||||||
|
public static function apply(Builder $builder, $value)
|
||||||
|
{
|
||||||
|
return $builder->where('bill_no', $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -15,7 +15,7 @@ class DoesNotHaveTransactionType implements Filter
|
|||||||
public static function apply(Builder $builder, $value)
|
public static function apply(Builder $builder, $value)
|
||||||
{
|
{
|
||||||
return $builder->whereDoesntHave('transactions', function (Builder $query) use($value) {
|
return $builder->whereDoesntHave('transactions', function (Builder $query) use($value) {
|
||||||
$query->where('type', $value)->whereIn('status', [0,1,2,3]);
|
$query->where('type', $value)->whereIn('status', [0,1,2,3,5]);
|
||||||
})->whereHas('containers', function ($query){
|
})->whereHas('containers', function ($query){
|
||||||
return $query->whereDate('loading_date', '>=', Carbon::parse('20-09-2022'));
|
return $query->whereDate('loading_date', '>=', Carbon::parse('20-09-2022'));
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ namespace App\Classes\Modules\Billplzs\Services;
|
|||||||
|
|
||||||
use Illuminate\Support\Facades\Http;
|
use Illuminate\Support\Facades\Http;
|
||||||
use App\Classes\Exceptions\MalformedRequestException;
|
use App\Classes\Exceptions\MalformedRequestException;
|
||||||
|
use Illuminate\Support\Facades\App;
|
||||||
|
|
||||||
class CreatesBillplzBill
|
class CreatesBillplzBill
|
||||||
{
|
{
|
||||||
@@ -25,7 +26,7 @@ class CreatesBillplzBill
|
|||||||
$response = Http::withBasicAuth(config('billplz.api_key').':', '')->post(config('billplz.base_url').'/api/v3/bills', [
|
$response = Http::withBasicAuth(config('billplz.api_key').':', '')->post(config('billplz.base_url').'/api/v3/bills', [
|
||||||
'collection_id' => config('billplz.collection_id'),
|
'collection_id' => config('billplz.collection_id'),
|
||||||
'name' => $name,
|
'name' => $name,
|
||||||
'email' => $email,
|
'email' => App::environment('production') ? $email : 'development@cief-malaysia.com',
|
||||||
'description' => $description,
|
'description' => $description,
|
||||||
'amount' => $this->finalizeAmount($amount),
|
'amount' => $this->finalizeAmount($amount),
|
||||||
'redirect_url' => route('online_payment.redirect'),
|
'redirect_url' => route('online_payment.redirect'),
|
||||||
|
|||||||
@@ -5,9 +5,8 @@ namespace App\Classes\Modules\Transactions\ControllersLogic;
|
|||||||
use App\Classes\General\Abstracts\AbstractControllerLogic;
|
use App\Classes\General\Abstracts\AbstractControllerLogic;
|
||||||
use App\Classes\Modules\Transactions\Services\FetchesGroup;
|
use App\Classes\Modules\Transactions\Services\FetchesGroup;
|
||||||
use App\Classes\Modules\Transactions\Services\DeletesTransaction;
|
use App\Classes\Modules\Transactions\Services\DeletesTransaction;
|
||||||
|
use App\Classes\Modules\Transactions\Services\DeletesGroup;
|
||||||
use App\Classes\Modules\Transactions\Services\UpdatesTransactionStatus;
|
use App\Classes\Modules\Transactions\Services\UpdatesTransactionStatus;
|
||||||
use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
|
||||||
use App\Http\Resources\GroupResource;
|
|
||||||
use Illuminate\Http\JsonResponse;
|
use Illuminate\Http\JsonResponse;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
@@ -24,14 +23,11 @@ class DeleteGroupLogic extends AbstractControllerLogic
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @var UpdatesTransactionStatus */
|
|
||||||
private $updatesTransactionStatus;
|
|
||||||
|
|
||||||
/** @var FetchesGroup */
|
/** @var FetchesGroup */
|
||||||
private $fetchesGroup;
|
private $fetchesGroup;
|
||||||
|
|
||||||
/** @var DeletesTransaction */
|
/** @var DeletesGroup */
|
||||||
private $deletesTransaction;
|
private $deletesGroup;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DeleteGroupLogic constructor.
|
* DeleteGroupLogic constructor.
|
||||||
@@ -39,11 +35,10 @@ class DeleteGroupLogic extends AbstractControllerLogic
|
|||||||
* @param FetchesGroup $fetchesGroup
|
* @param FetchesGroup $fetchesGroup
|
||||||
* @param DeletesTransaction $deletesTransaction
|
* @param DeletesTransaction $deletesTransaction
|
||||||
*/
|
*/
|
||||||
public function __construct(updatesTransactionStatus $updatesTransactionStatus, FetchesGroup $fetchesGroup, DeletesTransaction $deletesTransaction)
|
public function __construct(FetchesGroup $fetchesGroup, DeletesGroup $deletesGroup)
|
||||||
{
|
{
|
||||||
$this->updatesTransactionStatus = $updatesTransactionStatus;
|
|
||||||
$this->fetchesGroup = $fetchesGroup;
|
$this->fetchesGroup = $fetchesGroup;
|
||||||
$this->deletesTransaction = $deletesTransaction;
|
$this->deletesGroup = $deletesGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -55,19 +50,9 @@ class DeleteGroupLogic extends AbstractControllerLogic
|
|||||||
{
|
{
|
||||||
$group = $this->fetchesGroup->execute(['id' => $request->route('id')]);
|
$group = $this->fetchesGroup->execute(['id' => $request->route('id')]);
|
||||||
|
|
||||||
$items = $group->transactions()->get();
|
$this->deletesGroup->execute($group);
|
||||||
|
|
||||||
foreach($items as $item) {
|
return $this->response([]);
|
||||||
$bill = $item;
|
|
||||||
$payment = $bill->owner;
|
|
||||||
$group->transactions()->detach($bill->id);
|
|
||||||
$this->updatesTransactionStatus->execute($payment, ApprovalStatus::APPROVED);
|
|
||||||
$this->deletesTransaction->execute($bill);
|
|
||||||
}
|
|
||||||
|
|
||||||
$group->delete();
|
|
||||||
|
|
||||||
return $this->resourceResponse(new GroupResource($group));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Classes\Modules\Transactions\Services;
|
||||||
|
|
||||||
|
use App\Classes\General\Eloquent\AbstractDeleteRecord;
|
||||||
|
use App\Models\Group;
|
||||||
|
|
||||||
|
class DeletesGroup extends AbstractDeleteRecord
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param Group $model
|
||||||
|
* @return mixed
|
||||||
|
* @throws \App\Classes\Exceptions\MalformedRequestException
|
||||||
|
*/
|
||||||
|
public function execute(Group $model) {
|
||||||
|
return $this->handler($model);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Classes\Modules\Transactions\Services;
|
||||||
|
|
||||||
|
|
||||||
|
use App\Classes\General\Eloquent\AbstractFetchRecord;
|
||||||
|
use Illuminate\Database\Eloquent\Builder;
|
||||||
|
use App\Models\Group;
|
||||||
|
|
||||||
|
class FetchesGroup extends AbstractFetchRecord
|
||||||
|
{
|
||||||
|
|
||||||
|
/** @var Transaction */
|
||||||
|
private $repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* FetchesTransaction constructor.
|
||||||
|
* @param Transaction $repository
|
||||||
|
*/
|
||||||
|
public function __construct(Group $repository)
|
||||||
|
{
|
||||||
|
$this->repository = $repository;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Builder
|
||||||
|
*/
|
||||||
|
public function getRepository(): Builder
|
||||||
|
{
|
||||||
|
return $this->repository->newQuery();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -77,7 +77,6 @@ class FixBillplzFailedCallbackPayment extends Command
|
|||||||
{
|
{
|
||||||
ini_set('memory_limit', '-1');
|
ini_set('memory_limit', '-1');
|
||||||
|
|
||||||
$this->info(Carbon::now() . ' : Fix failled callback from billplz cron started.');
|
|
||||||
$this->outputArray = [];
|
$this->outputArray = [];
|
||||||
$start = new Carbon();
|
$start = new Carbon();
|
||||||
|
|
||||||
@@ -85,6 +84,11 @@ class FixBillplzFailedCallbackPayment extends Command
|
|||||||
|
|
||||||
$transactions = Transaction::where('type', TransactionType::PAYMENT)->where('payment_method', PaymentMethodType::PAYMENT_GATEWAY)->whereNotIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED])->get();
|
$transactions = Transaction::where('type', TransactionType::PAYMENT)->where('payment_method', PaymentMethodType::PAYMENT_GATEWAY)->whereNotIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED])->get();
|
||||||
$totalTransactions = count($transactions);
|
$totalTransactions = count($transactions);
|
||||||
|
|
||||||
|
if ($totalTransactions) {
|
||||||
|
$this->info(Carbon::now() . ' : Fix failled callback from billplz cron started.');
|
||||||
|
}
|
||||||
|
|
||||||
$counter = 1;
|
$counter = 1;
|
||||||
$totalAmount = 0;
|
$totalAmount = 0;
|
||||||
foreach ($transactions as $transaction){
|
foreach ($transactions as $transaction){
|
||||||
@@ -180,6 +184,9 @@ class FixBillplzFailedCallbackPayment extends Command
|
|||||||
$end = new Carbon();
|
$end = new Carbon();
|
||||||
$elapsedTime = $start->diff($end)->format('%H:%I:%S');
|
$elapsedTime = $start->diff($end)->format('%H:%I:%S');
|
||||||
|
|
||||||
$this->info(Carbon::now() . ' : Done Billplz Failled Callback. ElapsedTime: ' . $elapsedTime . '. Total: ' . $totalAmount);
|
if ($totalTransactions) {
|
||||||
|
$this->info(Carbon::now() . ' : Done Billplz Failled Callback. ElapsedTime: ' . $elapsedTime . '. Total: ' . $totalAmount);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class Kernel extends ConsoleKernel
|
|||||||
$schedule->command('billplz-failed-callback:fix')
|
$schedule->command('billplz-failed-callback:fix')
|
||||||
->dailyAt('00:00')
|
->dailyAt('00:00')
|
||||||
->withoutOverlapping()
|
->withoutOverlapping()
|
||||||
->appendOutputTo (storage_path().'/logs/dix_failed_callback_from_billplz.log');
|
->appendOutputTo (storage_path().'/logs/fix_failed_callback_from_billplz.log');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ namespace App\Http\Resources;
|
|||||||
use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
use App\Classes\ValueObjects\Constants\ApprovalStatus;
|
||||||
use App\Classes\ValueObjects\Constants\OrderRoleTypes;
|
use App\Classes\ValueObjects\Constants\OrderRoleTypes;
|
||||||
use App\Classes\ValueObjects\Constants\PackingListType;
|
use App\Classes\ValueObjects\Constants\PackingListType;
|
||||||
|
use App\Classes\ValueObjects\Constants\TransactionType;
|
||||||
use App\Classes\ValueObjects\Constants\TransportType;
|
use App\Classes\ValueObjects\Constants\TransportType;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Illuminate\Http\Resources\Json\JsonResource;
|
use Illuminate\Http\Resources\Json\JsonResource;
|
||||||
@@ -47,7 +48,7 @@ class OrderResource extends JsonResource
|
|||||||
];
|
];
|
||||||
}),
|
}),
|
||||||
'invoices' => $this->whenLoaded('packingLists', function() {
|
'invoices' => $this->whenLoaded('packingLists', function() {
|
||||||
return TransactionResource::collection($this->transactions()->whereNotIn('transactions.status', [0, 1])->get());
|
return TransactionResource::collection($this->transactions()->whereNotIn('transactions.status', [0, 1])->where('transactions.type', TransactionType::SHIPPING_INVOICE)->get());
|
||||||
}),
|
}),
|
||||||
'remarks' => RemarkResource::collection($this->remarks),
|
'remarks' => RemarkResource::collection($this->remarks),
|
||||||
'created_at' => $this->created_at->format('d-m-Y')
|
'created_at' => $this->created_at->format('d-m-Y')
|
||||||
|
|||||||
+1
-1
@@ -63,7 +63,7 @@
|
|||||||
<div class="row" v-if="selectedInvoice.length">
|
<div class="row" v-if="selectedInvoice.length">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div v-if="section === 'customerPendingPaymentInvoiceComponent'" class="btn btn-success btn-xl pointer m-t-10 w-100 requestModal" data-type="makePayment">Make Payment</div>
|
<div v-if="section === 'customerPendingPaymentInvoiceComponent'" class="btn btn-success btn-xl pointer m-t-10 w-100 requestModal" data-type="makePayment">Make Payment</div>
|
||||||
<div v-if="section === 'customerPaidInvoiceComponent'" class="btn btn-info btn-xl pointer m-t-10 w-100" @click='generateSummaryInvoice'>Generate Summary Invoice</div>
|
<div v-if="['customerPaidInvoiceComponent', 'customerPendingPaymentInvoiceComponent'].includes(section)" class="btn btn-info btn-xl pointer m-t-10 w-100" @click='generateSummaryInvoice'>Generate Summary Invoice</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="makePayment">
|
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="makePayment">
|
||||||
|
|||||||
+1
-1
@@ -84,7 +84,7 @@
|
|||||||
<div class="col bg-master-lightest p-1 p-sm-4">
|
<div class="col bg-master-lightest p-1 p-sm-4">
|
||||||
<div class="row tabsContainer tabContent" tab-name="pendingPayment">
|
<div class="row tabsContainer tabContent" tab-name="pendingPayment">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<customer-payment-billing-inner-component :endpoint="route('api.transaction.list')" section="customerPendingPaymentInvoiceComponent" :company_module_id="company_module_id" :options="{'per_page': 10, order_by: {column: 'id', DESC: true}, 'status_in': [2], 'receiver': company_module_id, 'type': 1, 'does_not_have_payment_status_in': [0,1] ,'does_not_have_group_transactions': 1}"></customer-payment-billing-inner-component>
|
<customer-payment-billing-inner-component :endpoint="route('api.transaction.list')" section="customerPendingPaymentInvoiceComponent" :company_module_id="company_module_id" :options="{'per_page': 10, order_by: {column: 'id', DESC: true}, 'status_in': [2], 'receiver': company_module_id, 'type': 1, 'does_not_have_payment_status_in': [0,1] ,'does_not_have_groups': 1}"></customer-payment-billing-inner-component>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row tabsContainer tabContent hide" tab-name="groupPaymentInProgress">
|
<div class="row tabsContainer tabContent hide" tab-name="groupPaymentInProgress">
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
<template>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
|
<loading-component style="height: 300px; top: 0;" key="1" color="success" v-show="isLoading" ></loading-component>
|
||||||
|
<div class="row justify-content-center" v-show="!isLoading">
|
||||||
|
<div class="col">
|
||||||
|
<div class="row m-b-20">
|
||||||
|
<div class="col">
|
||||||
|
<h3 class="all-caps">Are you Sure?</h3>
|
||||||
|
<div class="fs-11">{{ contentText }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col p-r-5">
|
||||||
|
<div class="btn btn-sm btn-default btn-block bg-master-lighter" data-dismiss="modal">Cancel</div>
|
||||||
|
</div>
|
||||||
|
<div class="col p-l-5">
|
||||||
|
<div class="btn btn-sm btn-block b-rad-none" :class="[{'btn-danger': modalType !== 'confirm'}, {'btn-success': modalType === 'confirm'}]" @click="submit(apiRoute, apiMethod, section, true, true)">{{ buttonText }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import componentHandler from '../../../general/mixins/componentHandler';
|
||||||
|
import ModalFormHandler from '../../../general/mixins/modalFormHandler';
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
contentText: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
modalType: {
|
||||||
|
type: String,
|
||||||
|
default: 'confirm'
|
||||||
|
},
|
||||||
|
buttonText: {
|
||||||
|
type: String,
|
||||||
|
default: 'Confirm'
|
||||||
|
},
|
||||||
|
apiRoute: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
apiMethod: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
},
|
||||||
|
mixins: [componentHandler, ModalFormHandler]
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
<template>
|
||||||
|
<div class="row">
|
||||||
|
<list-component
|
||||||
|
section="packageListSection"
|
||||||
|
:endpoint="route('api.packing_list.list')"
|
||||||
|
:options="{
|
||||||
|
packing_list_type: 1,
|
||||||
|
packing_list_status: 2,
|
||||||
|
per_page: 5,
|
||||||
|
owner_id: 1,
|
||||||
|
order_by: { column: 'arrival_date', DESC: true },
|
||||||
|
with_arrival_date: true,
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<template slot="list" slot-scope="{ data }">
|
||||||
|
<parcel-component
|
||||||
|
v-for="packages in data.packages"
|
||||||
|
:data="packages"
|
||||||
|
:key="packages.id"
|
||||||
|
></parcel-component>
|
||||||
|
</template>
|
||||||
|
</list-component>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import componentHandler from "../../../general/mixins/componentHandler";
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
section: "packageListSection",
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {},
|
||||||
|
mixins: [componentHandler],
|
||||||
|
};
|
||||||
|
</script>
|
||||||
+17
@@ -65,6 +65,23 @@
|
|||||||
<p class="no-margin fs-10 all-caps">Billing Question</p>
|
<p class="no-margin fs-10 all-caps">Billing Question</p>
|
||||||
<div>{{ latestComment ? latestComment.content : '' }} </div>
|
<div>{{ latestComment ? latestComment.content : '' }} </div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-auto" v-if="invoice_status == 'Suspended Invoice'">
|
||||||
|
<div class="btn bg-grey no-border muted requestModal" data-type="deleteInvoiceFunction">
|
||||||
|
<i class="fa fa-trash"></i>
|
||||||
|
</div>
|
||||||
|
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="deleteInvoiceFunction">
|
||||||
|
<general-confirmation-form-component
|
||||||
|
contentText="Are you sure you want to delete this Invoice?"
|
||||||
|
modalType="delete"
|
||||||
|
buttonText="Delete"
|
||||||
|
class="text-center"
|
||||||
|
:apiRoute="route('api.transaction.delete', item.suspended_invoice.id)"
|
||||||
|
apiMethod="delete"
|
||||||
|
:section="section"
|
||||||
|
>
|
||||||
|
</general-confirmation-form-component>
|
||||||
|
</modal-component>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+27
-8
@@ -20,14 +20,30 @@
|
|||||||
<p class="no-margin fs-10 all-caps">Payment Date</p>
|
<p class="no-margin fs-10 all-caps">Payment Date</p>
|
||||||
<div>{{ item.created_at }}</div>
|
<div>{{ item.created_at }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto pointer btn btn-success" v-if="item.payment_method == 5 && item.status != 2">
|
<div class="col-auto pointer btn btn-success" v-if="item.payment_method == 5 && item.status != 2" @click="retryPayment()">
|
||||||
<a :href="route('billplz.bill', item.reference)">
|
<div class=" no-border h-100">
|
||||||
<div class=" no-border h-100">
|
<i class="fa fa-repeat fs-20 text-white"></i>
|
||||||
<i class="fa fa-repeat fs-20 text-white"></i>
|
</div>
|
||||||
</div>
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-auto pointer btn btn-success requestModal pointer" v-if="item.payment_method == 1 && item.status != 2" data-type="paymentProofModal" @click="selectedID(item.id)">
|
<div class="col-auto requestModal" v-if="item.status != 2" data-type="deleteGroupTransaction">
|
||||||
|
<div class="btn bg-grey no-border">
|
||||||
|
<i class="fa fa-times"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="deleteGroupTransaction">
|
||||||
|
<general-confirmation-form-component
|
||||||
|
contentText="Are you sure you want to delete this Group Payment?"
|
||||||
|
modalType="delete"
|
||||||
|
buttonText="Delete"
|
||||||
|
class="text-center"
|
||||||
|
:apiRoute="route('api.transaction.group.delete', item.id)"
|
||||||
|
apiMethod="delete"
|
||||||
|
:section="section"
|
||||||
|
>
|
||||||
|
</general-confirmation-form-component>
|
||||||
|
</modal-component>
|
||||||
|
<!-- payment method 1 -->
|
||||||
|
<!-- <div class="col-auto pointer btn btn-success requestModal pointer" v-if="item.payment_method == 1 && item.status != 2" data-type="paymentProofModal" @click="selectedID(item.id)">
|
||||||
<div class="no-border h-100">
|
<div class="no-border h-100">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="30" height="30" viewBox="0 0 172 172" style=" fill:#000000;"><defs><linearGradient x1="86" y1="70.76994" x2="86" y2="116.46013" gradientUnits="userSpaceOnUse" id="color-1_52139_gr1"><stop offset="0" stop-color="#ffffff"></stop><stop offset="1" stop-color="#ffffff"></stop></linearGradient><linearGradient x1="61.8125" y1="34.48869" x2="61.8125" y2="144.97181" gradientUnits="userSpaceOnUse" id="color-2_52139_gr2"><stop offset="0" stop-color="#ffffff"></stop><stop offset="1" stop-color="#ffffff"></stop></linearGradient><linearGradient x1="130.34375" y1="34.48869" x2="130.34375" y2="144.97181" gradientUnits="userSpaceOnUse" id="color-3_52139_gr3"><stop offset="0" stop-color="#ffffff"></stop><stop offset="1" stop-color="#ffffff"></stop></linearGradient><linearGradient x1="86" y1="32.25" x2="86" y2="148.71013" gradientUnits="userSpaceOnUse" id="color-4_52139_gr4"><stop offset="0" stop-color="#ffffff"></stop><stop offset="1" stop-color="#ffffff"></stop></linearGradient></defs><g fill="none" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><path d="M0,172v-172h172v172z" fill="none"></path><g><path d="M102.45825,99.43213h-5.70825c-1.4835,0 -2.6875,1.16637 -2.6875,2.65256v8.10013c0,1.48081 -1.19862,2.68481 -2.67944,2.68481h-10.76612c-1.48081,0 -2.67944,-1.204 -2.67944,-2.68481v-8.10013c0,-1.48619 -1.204,-2.65256 -2.6875,-2.65256h-5.70825c-1.93769,0 -3.04225,-2.39188 -1.88125,-4.05275l14.577,-20.855c1.8275,-2.61494 5.69481,-2.61763 7.52231,-0.00538l14.577,20.86306c1.16369,1.66088 0.05644,4.05006 -1.87856,4.05006z" fill="url(#color-1_52139_gr1)"></path><path d="M51.0625,67.1875h5.375c0,-8.0625 7.23206,-16.12231 16.125,-16.12231v-5.375c-11.85456,0 -21.5,10.74731 -21.5,21.49731z" fill="url(#color-2_52139_gr2)"></path><path d="M139.75,80.625c0,-10.75 -8.44144,-18.80981 -18.8125,-18.80981v5.375c7.40944,0 13.4375,5.37231 13.4375,13.43481z" fill="url(#color-3_52139_gr3)"></path><path d="M148.09738,92.27263c1.59369,-3.68188 2.40263,-7.59219 2.40263,-11.64494c0,-16.29969 -13.26281,-29.5625 -29.5625,-29.5625c-6.5145,0 -12.68769,2.08819 -17.78588,5.96088c-4.30269,-13.03438 -16.52006,-22.08587 -30.58912,-22.08587c-17.78319,0 -32.25,14.46681 -32.25,32.25c0,4.14681 0.16662,8.05981 1.42437,10.74731h-1.42437c-13.33806,0 -24.1875,10.84944 -24.1875,24.1875c0,11.56431 8.16194,21.24737 19.0275,23.62044c1.02394,6.39894 6.53869,11.31706 13.2225,11.31706h56.4375h16.125h5.375c6.54944,0 12.00238,-4.71388 13.18488,-10.92469c9.2235,-1.20131 16.37762,-9.08913 16.37762,-18.63513c0,-6.09256 -2.924,-11.72019 -7.77762,-15.23006zM126.3125,131.6875h-5.375h-16.125h-56.4375c-3.49912,0 -6.45538,-2.6875 -7.568,-5.375h93.0735c-1.11263,2.6875 -4.06888,5.375 -7.568,5.375zM137.0625,120.9375h-96.75c-10.37106,0 -18.8125,-8.44144 -18.8125,-18.8125c0,-10.37106 8.44144,-18.8125 18.8125,-18.8125h9.51375l-1.68506,-3.78131c-2.23063,-5.01488 -2.45369,-7.48737 -2.45369,-12.341c0,-14.81888 12.05613,-26.875 26.875,-26.875c13.01825,0 24.13106,9.29875 26.42619,22.11275l0.92719,5.17075l3.64962,-3.77325c4.60638,-4.76225 10.77687,-7.38525 17.372,-7.38525c13.33806,0 24.1875,10.84944 24.1875,24.1875c0,3.6765 -0.81431,7.21056 -2.37575,10.41944l-1.763,3.32713l2.37037,1.26044c4.40481,2.34081 7.14338,6.88806 7.14338,11.868c0,7.40944 -6.02806,13.43481 -13.4375,13.43481z" fill="url(#color-4_52139_gr4)"></path></g></g></svg>
|
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="30" height="30" viewBox="0 0 172 172" style=" fill:#000000;"><defs><linearGradient x1="86" y1="70.76994" x2="86" y2="116.46013" gradientUnits="userSpaceOnUse" id="color-1_52139_gr1"><stop offset="0" stop-color="#ffffff"></stop><stop offset="1" stop-color="#ffffff"></stop></linearGradient><linearGradient x1="61.8125" y1="34.48869" x2="61.8125" y2="144.97181" gradientUnits="userSpaceOnUse" id="color-2_52139_gr2"><stop offset="0" stop-color="#ffffff"></stop><stop offset="1" stop-color="#ffffff"></stop></linearGradient><linearGradient x1="130.34375" y1="34.48869" x2="130.34375" y2="144.97181" gradientUnits="userSpaceOnUse" id="color-3_52139_gr3"><stop offset="0" stop-color="#ffffff"></stop><stop offset="1" stop-color="#ffffff"></stop></linearGradient><linearGradient x1="86" y1="32.25" x2="86" y2="148.71013" gradientUnits="userSpaceOnUse" id="color-4_52139_gr4"><stop offset="0" stop-color="#ffffff"></stop><stop offset="1" stop-color="#ffffff"></stop></linearGradient></defs><g fill="none" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><path d="M0,172v-172h172v172z" fill="none"></path><g><path d="M102.45825,99.43213h-5.70825c-1.4835,0 -2.6875,1.16637 -2.6875,2.65256v8.10013c0,1.48081 -1.19862,2.68481 -2.67944,2.68481h-10.76612c-1.48081,0 -2.67944,-1.204 -2.67944,-2.68481v-8.10013c0,-1.48619 -1.204,-2.65256 -2.6875,-2.65256h-5.70825c-1.93769,0 -3.04225,-2.39188 -1.88125,-4.05275l14.577,-20.855c1.8275,-2.61494 5.69481,-2.61763 7.52231,-0.00538l14.577,20.86306c1.16369,1.66088 0.05644,4.05006 -1.87856,4.05006z" fill="url(#color-1_52139_gr1)"></path><path d="M51.0625,67.1875h5.375c0,-8.0625 7.23206,-16.12231 16.125,-16.12231v-5.375c-11.85456,0 -21.5,10.74731 -21.5,21.49731z" fill="url(#color-2_52139_gr2)"></path><path d="M139.75,80.625c0,-10.75 -8.44144,-18.80981 -18.8125,-18.80981v5.375c7.40944,0 13.4375,5.37231 13.4375,13.43481z" fill="url(#color-3_52139_gr3)"></path><path d="M148.09738,92.27263c1.59369,-3.68188 2.40263,-7.59219 2.40263,-11.64494c0,-16.29969 -13.26281,-29.5625 -29.5625,-29.5625c-6.5145,0 -12.68769,2.08819 -17.78588,5.96088c-4.30269,-13.03438 -16.52006,-22.08587 -30.58912,-22.08587c-17.78319,0 -32.25,14.46681 -32.25,32.25c0,4.14681 0.16662,8.05981 1.42437,10.74731h-1.42437c-13.33806,0 -24.1875,10.84944 -24.1875,24.1875c0,11.56431 8.16194,21.24737 19.0275,23.62044c1.02394,6.39894 6.53869,11.31706 13.2225,11.31706h56.4375h16.125h5.375c6.54944,0 12.00238,-4.71388 13.18488,-10.92469c9.2235,-1.20131 16.37762,-9.08913 16.37762,-18.63513c0,-6.09256 -2.924,-11.72019 -7.77762,-15.23006zM126.3125,131.6875h-5.375h-16.125h-56.4375c-3.49912,0 -6.45538,-2.6875 -7.568,-5.375h93.0735c-1.11263,2.6875 -4.06888,5.375 -7.568,5.375zM137.0625,120.9375h-96.75c-10.37106,0 -18.8125,-8.44144 -18.8125,-18.8125c0,-10.37106 8.44144,-18.8125 18.8125,-18.8125h9.51375l-1.68506,-3.78131c-2.23063,-5.01488 -2.45369,-7.48737 -2.45369,-12.341c0,-14.81888 12.05613,-26.875 26.875,-26.875c13.01825,0 24.13106,9.29875 26.42619,22.11275l0.92719,5.17075l3.64962,-3.77325c4.60638,-4.76225 10.77687,-7.38525 17.372,-7.38525c13.33806,0 24.1875,10.84944 24.1875,24.1875c0,3.6765 -0.81431,7.21056 -2.37575,10.41944l-1.763,3.32713l2.37037,1.26044c4.40481,2.34081 7.14338,6.88806 7.14338,11.868c0,7.40944 -6.02806,13.43481 -13.4375,13.43481z" fill="url(#color-4_52139_gr4)"></path></g></g></svg>
|
||||||
</div>
|
</div>
|
||||||
@@ -36,7 +52,7 @@
|
|||||||
<div class=" no-border h-100">
|
<div class=" no-border h-100">
|
||||||
<i class="fa fa-repeat fs-20 text-white"></i>
|
<i class="fa fa-repeat fs-20 text-white"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
<div class="col-auto">
|
<div class="col-auto">
|
||||||
<div class="btn bg-grey no-border" @click="expanded = !expanded">
|
<div class="btn bg-grey no-border" @click="expanded = !expanded">
|
||||||
<i class="fa" :class="{'fa-angle-down': !expanded, 'fa-angle-up': expanded}" ></i>
|
<i class="fa" :class="{'fa-angle-down': !expanded, 'fa-angle-up': expanded}" ></i>
|
||||||
@@ -83,6 +99,9 @@
|
|||||||
},
|
},
|
||||||
selectedID(id){
|
selectedID(id){
|
||||||
this.selected_id = id;
|
this.selected_id = id;
|
||||||
|
},
|
||||||
|
retryPayment(){
|
||||||
|
window.location.href = route('billplz.bill', this.item.reference);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|||||||
+3
-4
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="row">
|
<div class="row" @keyup.enter="submitForm">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<loading-component style="height: 50px; top: 0;" key="1" color="success" v-show="$store.getters.isLoading(section)"></loading-component>
|
<loading-component style="height: 50px; top: 0;" key="1" color="success" v-show="$store.getters.isLoading(section)"></loading-component>
|
||||||
<div class="row" v-show="!$store.getters.isLoading(section)">
|
<div class="row" v-show="!$store.getters.isLoading(section)">
|
||||||
@@ -37,6 +37,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import ModalFormHandler from '../../../general/mixins/modalFormHandler';
|
import ModalFormHandler from '../../../general/mixins/modalFormHandler';
|
||||||
|
import { required } from "vuelidate/lib/validators";
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
data:{
|
data:{
|
||||||
@@ -58,9 +59,7 @@
|
|||||||
},
|
},
|
||||||
validations: {
|
validations: {
|
||||||
parameters: {
|
parameters: {
|
||||||
content: {
|
content:{ required },
|
||||||
required: false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
@extends('layouts.base_portal')
|
||||||
|
@section('inner_content')
|
||||||
|
<div class="row" :class="[{'d-flex': !$store.getters.isAdmin}]">
|
||||||
|
<div class="col">
|
||||||
|
<packages-section-component></packages-section-component>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endsection
|
||||||
File diff suppressed because one or more lines are too long
+2
-1
@@ -4,6 +4,7 @@ use Illuminate\Support\Facades\Route;
|
|||||||
|
|
||||||
Route::group(['middleware' => 'apipub', 'prefix' => 'v1', 'as' => 'apipub.'], function () {
|
Route::group(['middleware' => 'apipub', 'prefix' => 'v1', 'as' => 'apipub.'], function () {
|
||||||
Route::group(['middleware' => 'token.check'], function () {
|
Route::group(['middleware' => 'token.check'], function () {
|
||||||
Route::get('/list', 'Transactions\ListTransactionsController@list')->name('list');
|
Route::get('transactions/query', 'Transactions\ListTransactionsController@list')->name('transaction.list');
|
||||||
|
Route::get('groups/query', 'Transactions\ListGroupsController@list')->name('group.list');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
+47
-60
@@ -139,6 +139,10 @@ Route::get('/orders', function () {
|
|||||||
return view('pages.orders.index');
|
return view('pages.orders.index');
|
||||||
})->name('orders');
|
})->name('orders');
|
||||||
|
|
||||||
|
Route::get('/packages', function () {
|
||||||
|
return view('pages.customers.packages');
|
||||||
|
})->name('packages');
|
||||||
|
|
||||||
Route::get('/support', function () {
|
Route::get('/support', function () {
|
||||||
return view('pages.support', [
|
return view('pages.support', [
|
||||||
'email' => null,
|
'email' => null,
|
||||||
@@ -246,6 +250,11 @@ Route::get('/customer/{marking}/payment-and-billing', function ($marking) {
|
|||||||
return view('pages.customers.paymentsBilling', ['company_module_id' => $company_module_id]);
|
return view('pages.customers.paymentsBilling', ['company_module_id' => $company_module_id]);
|
||||||
})->name('customer.payment-and-billing');
|
})->name('customer.payment-and-billing');
|
||||||
|
|
||||||
|
Route::get('/customer-invoices/{company_module_id}/payment-and-billing', function ($company_module_id) {
|
||||||
|
// todo-new: check company_module_id
|
||||||
|
return view('pages.customers.paymentsBilling', ['company_module_id' => $company_module_id]);
|
||||||
|
})->name('customer.payment-and-billing-by-company-module-id');
|
||||||
|
|
||||||
Route::get('/orders/refresh', function(Request $request){
|
Route::get('/orders/refresh', function(Request $request){
|
||||||
$packingLists = PackingList::where('type', PackingListType::WAREHOUSE_RECEIVE_LIST)->has('containers')->get();
|
$packingLists = PackingList::where('type', PackingListType::WAREHOUSE_RECEIVE_LIST)->has('containers')->get();
|
||||||
dd($packingLists);
|
dd($packingLists);
|
||||||
@@ -495,18 +504,21 @@ Route::get('/customer/summary/{year}/monthly', function ($year) {
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::get('/customers/active/{active_start}/{active_end}/{inactive_start?}/{inactive_end?}/{with_cbm?}', function ($active_start, $active_end, $inactive_start=null, $inactive_end=null, $with_cbm = false) {
|
Route::get('/customers/active/{active_start}/{active_end}/{inactive_start?}/{inactive_end?}/{with_cbm?}', function ($active_start, $active_end, $inactive_start = null, $inactive_end = null, $with_cbm = false) {
|
||||||
$activeCompanies = CompanyModule::where('type', BusinessType::IMPORTER)->whereHas('orderPackingLists', function($query) use($inactive_start, $inactive_end) {
|
/* $activeCompanies = CompanyModule::where('type', BusinessType::IMPORTER)->whereHas('orderPackingLists', function($query) use($inactive_start, $inactive_end) {
|
||||||
return $query->where('packing_lists.type', PackingListType::WAREHOUSE_RECEIVE_LIST)->whereHas('transports', function ($query) use ($inactive_start, $inactive_end) {
|
return $query->where('packing_lists.type', PackingListType::WAREHOUSE_RECEIVE_LIST)->whereHas('transports', function ($query) use ($inactive_start, $inactive_end) {
|
||||||
return $query->where('drop_date', '>=', Carbon::parse($inactive_start))->where('drop_date', '<=', Carbon::parse($inactive_end)->addDay());
|
return $query->where('drop_date', '>=', Carbon::parse($inactive_start))->where('drop_date', '<=', Carbon::parse($inactive_end)->addDay());
|
||||||
});
|
});
|
||||||
})->pluck('id');
|
})->pluck('id');
|
||||||
|
|
||||||
|
$companies = CompanyModule::where('type', BusinessType::IMPORTER)->whereHas('orderPackingLists', function($query) use($active_start, $active_end) {
|
||||||
|
return $query->where('packing_lists.type', PackingListType::WAREHOUSE_RECEIVE_LIST)->whereHas('transports', function ($query) use ($active_start, $active_end) {
|
||||||
|
return $query->whereDate('drop_date', '>=', Carbon::parse($active_start))->whereDate('drop_date', '<=', Carbon::parse($active_end)->addDay());
|
||||||
|
});
|
||||||
|
})->whereNotIn('id', $activeCompanies)->get();*/
|
||||||
|
|
||||||
|
$companies = getActiveCompanies($inactive_start, $inactive_end, $active_start, $active_end);
|
||||||
|
|
||||||
$companies = CompanyModule::where('type', BusinessType::IMPORTER)->whereHas('orderPackingLists', function($query) use($active_start, $active_end) {
|
|
||||||
return $query->where('packing_lists.type', PackingListType::WAREHOUSE_RECEIVE_LIST)->whereHas('transports', function ($query) use ($active_start, $active_end) {
|
|
||||||
return $query->whereDate('drop_date', '>=', Carbon::parse($active_start))->whereDate('drop_date', '<=', Carbon::parse($active_end)->addDay());
|
|
||||||
});
|
|
||||||
})->whereNotIn('id', $activeCompanies)->get();
|
|
||||||
|
|
||||||
echo '<h4>List of customers active between <span style="color: green; font-weight: bold">'. Carbon::parse($active_start)->format('d/m/Y'). ' - '. Carbon::parse($active_end)->format('d/m/Y').'</span> & inactive between <span style="color: red; font-weight: bold">'. Carbon::parse($inactive_start)->format('d/m/Y'). ' - '. Carbon::parse($inactive_end)->format('d/m/Y').'</span></h4>';
|
echo '<h4>List of customers active between <span style="color: green; font-weight: bold">'. Carbon::parse($active_start)->format('d/m/Y'). ' - '. Carbon::parse($active_end)->format('d/m/Y').'</span> & inactive between <span style="color: red; font-weight: bold">'. Carbon::parse($inactive_start)->format('d/m/Y'). ' - '. Carbon::parse($inactive_end)->format('d/m/Y').'</span></h4>';
|
||||||
echo '<table>
|
echo '<table>
|
||||||
@@ -1043,7 +1055,7 @@ Route::get('/wallet/{marking}/details', function ($marking) {
|
|||||||
Route::get('/wallet/audit', function (Request $request) {
|
Route::get('/wallet/audit', function (Request $request) {
|
||||||
$wallets = \App\Models\Wallet::all();
|
$wallets = \App\Models\Wallet::all();
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach ($wallets as $wallet){
|
foreach ($wallets as $wallet){
|
||||||
$topups = 0;
|
$topups = 0;
|
||||||
$credit = 0;
|
$credit = 0;
|
||||||
@@ -1067,31 +1079,6 @@ Route::get('/wallet/audit', function (Request $request) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Route::get('/billplz/audit', function (Request $request) {
|
|
||||||
$transactions = Transaction::where('type', TransactionType::PAYMENT)->where('payment_method', PaymentMethodType::PAYMENT_GATEWAY)->whereIn('status', [ApprovalStatus::COMPLETED, ApprovalStatus::APPROVED])->get();
|
|
||||||
$i = 0;
|
|
||||||
$totalAmount = 0;
|
|
||||||
foreach ($transactions as $transaction){
|
|
||||||
$response = Http::withBasicAuth(config('billplz.api_key').':', '')->get(config('billplz.base_url').'/api/v3/bills/'.$transaction->payment_reference);
|
|
||||||
|
|
||||||
if($response->successful()){
|
|
||||||
$data = $response->json();
|
|
||||||
if($data['paid']){
|
|
||||||
|
|
||||||
} else {
|
|
||||||
|
|
||||||
$transaction->status = ApprovalStatus::REJECTED;
|
|
||||||
$transaction->save();
|
|
||||||
|
|
||||||
$invoice = $transaction->owner;
|
|
||||||
$invoice->status = ApprovalStatus::APPROVED;
|
|
||||||
|
|
||||||
$totalAmount += $transaction->amount;
|
|
||||||
echo 'Order: '. $transaction->owner->owner->owner->reference . ' - Date: '.$transaction->owner->created_at->format('d-m-Y').' - Amount: '. $transaction->amount . " </br></br>";
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
echo "billplz error</br>";
|
|
||||||
}
|
|
||||||
Route::get('/final-duplicated-invoice-debug', function(){
|
Route::get('/final-duplicated-invoice-debug', function(){
|
||||||
$duplicatedTransactions = Transaction::select(DB::raw('owner_type, owner_id, receiver, type, GROUP_CONCAT(id) as transaction_ids, COUNT(*) as count'))
|
$duplicatedTransactions = Transaction::select(DB::raw('owner_type, owner_id, receiver, type, GROUP_CONCAT(id) as transaction_ids, COUNT(*) as count'))
|
||||||
->whereNotIn('status', [ApprovalStatus::REJECTED,ApprovalStatus::SUSPENDED,ApprovalStatus::EXPIRED])
|
->whereNotIn('status', [ApprovalStatus::REJECTED,ApprovalStatus::SUSPENDED,ApprovalStatus::EXPIRED])
|
||||||
@@ -1115,31 +1102,31 @@ Route::get('/final-duplicated-invoice-debug', function(){
|
|||||||
<th style="border: 1px solid black" >Invoices</th>
|
<th style="border: 1px solid black" >Invoices</th>
|
||||||
</tr>';
|
</tr>';
|
||||||
|
|
||||||
foreach ($duplicatedTransactions as $transaction) {
|
foreach ($duplicatedTransactions as $transaction) {
|
||||||
$transactionIds = explode(',', $transaction->transaction_ids);
|
$transactionIds = explode(',', $transaction->transaction_ids);
|
||||||
|
|
||||||
$duplicatedInvoice = Transaction::whereIn('id', $transactionIds)->get();
|
$duplicatedInvoice = Transaction::whereIn('id', $transactionIds)->get();
|
||||||
|
|
||||||
$order_reference = $duplicatedInvoice->first()->owner->owner->reference ?? null;
|
$order_reference = $duplicatedInvoice->first()->owner->owner->reference ?? null;
|
||||||
|
|
||||||
if ($transaction->type == TransactionType::PAYMENT) {
|
if ($transaction->type == TransactionType::PAYMENT) {
|
||||||
$order_reference = $duplicatedInvoice->first()->owner->owner->owner->reference ?? null;
|
$order_reference = $duplicatedInvoice->first()->owner->owner->owner->reference ?? null;
|
||||||
}
|
|
||||||
|
|
||||||
echo '<tr>';
|
|
||||||
// echo '<td style="border: 1px solid black">' . $transaction->owner_type . '</td>';
|
|
||||||
// echo '<td style="border: 1px solid black">' . $transaction->owner_id . '</td>';
|
|
||||||
echo '<td style="border: 1px solid black">' . $transaction->receiver . '</td>';
|
|
||||||
echo '<td style="border: 1px solid black">' . '<a target="_blank" href="'.route('order.show', $order_reference).'">'. $order_reference .'</a>' . '</td>';
|
|
||||||
echo '<td style="border: 1px solid black">' . $transactionType[$transaction->type] . '</td>';
|
|
||||||
echo '<td style="border: 1px solid black">' . count($transactionIds) . '</td>';
|
|
||||||
echo '<td style="border: 1px solid black; text-align: left">';
|
|
||||||
foreach ($duplicatedInvoice as $invoice) {
|
|
||||||
echo '<p>ID: ' . $invoice->id . '. Status: ' . $approvalStatusArray[$invoice->status] . '. Amount: ' . $invoice->amount . '</p>';
|
|
||||||
}
|
}
|
||||||
echo'</td>';
|
|
||||||
echo '</tr>';
|
echo '<tr>';
|
||||||
}
|
// echo '<td style="border: 1px solid black">' . $transaction->owner_type . '</td>';
|
||||||
echo '</table>';
|
// echo '<td style="border: 1px solid black">' . $transaction->owner_id . '</td>';
|
||||||
|
echo '<td style="border: 1px solid black">' . $transaction->receiver . '</td>';
|
||||||
|
echo '<td style="border: 1px solid black">' . '<a target="_blank" href="'.route('order.show', $order_reference).'">'. $order_reference .'</a>' . '</td>';
|
||||||
|
echo '<td style="border: 1px solid black">' . $transactionType[$transaction->type] . '</td>';
|
||||||
|
echo '<td style="border: 1px solid black">' . count($transactionIds) . '</td>';
|
||||||
|
echo '<td style="border: 1px solid black; text-align: left">';
|
||||||
|
foreach ($duplicatedInvoice as $invoice) {
|
||||||
|
echo '<p>ID: ' . $invoice->id . '. Status: ' . $approvalStatusArray[$invoice->status] . '. Amount: ' . $invoice->amount . '</p>';
|
||||||
|
}
|
||||||
|
echo'</td>';
|
||||||
|
echo '</tr>';
|
||||||
|
}
|
||||||
|
echo '</table>';
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user