@@ -103,10 +138,22 @@ export default {
},
data(){
return {
+ key: 1,
section: 'customerTransactionSection',
isLoading: true,
wallet: null,
- attention: false
+ showingPreciseAmount: false,
+ showingTransactionCount: 10,
+ attention: false,
+ reference_no: null,
+ startDate: null,
+ endDate: null,
+ options: {
+ status_in: [2, 3],
+ owner_type: 'App\\Models\\Wallet',
+ owner_id: 0,
+ per_page: this.showingTransactionCount
+ }
}
},
computed: {
@@ -119,8 +166,17 @@ export default {
if(inComplete){
this.fetchWallet();
}
+ },
+ showingTransactionCount() {
+ this.key ++;
}
},
+ validations: {
+ showingTransactionCount: { },
+ reference_no: { },
+ startDate: { },
+ endDate: { },
+ },
created(){
this.$store.dispatch('updateListQueue', {'name': this.section});
},
@@ -130,22 +186,29 @@ export default {
var filters = {with_transactions: true};
this.submit(route('api.wallet.company_module.show', this.id) + '?filters=' + JSON.stringify(filters), 'get', this.section, false, false);
},
- remainingBalance(index) {
- let tempBalance = 0;
+ submitSearch() {
+ console.log("searcvhing");
+ delete this.options.with_order_reference_like;
+ delete this.options.created_after_or_equal;
+ delete this.options.created_before_or_equal;
- if(this.wallet){
- let transactions = this.wallet.transactions.slice().reverse();
- transactions.slice(0, transactions.length - index).map(function(transaction) {
- [2, 11].includes(transaction.type) ? tempBalance -= (transaction.amount) : tempBalance += (transaction.amount);
- return tempBalance
- }, 0);
+ if (this.reference_no) {
+ this.options.with_order_reference_like = this.reference_no
}
-
- return (Math.round((tempBalance + Number.EPSILON) * 100) / 100).toFixed(2).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
+ if (this.startDate) {
+ this.options.created_after_or_equal = this.startDate
+ }
+ if (this.endDate) {
+ this.options.created_before_or_equal = this.endDate
+ }
+
+ this.key ++;
},
successHandler(response){
this.isLoading = false;
this.wallet = response.payload.data;
+ this.options.owner_id = this.wallet.id
+ this.key ++;
}
}
}
diff --git a/resources/assets/vue/components/wallets/elements/CustomerWalletTransactionComponent.vue b/resources/assets/vue/components/wallets/elements/CustomerWalletTransactionComponent.vue
new file mode 100644
index 00000000..cb0bb88f
--- /dev/null
+++ b/resources/assets/vue/components/wallets/elements/CustomerWalletTransactionComponent.vue
@@ -0,0 +1,35 @@
+
+
+
{{data.created_at}}
+
+
{{[5, 9, 15].includes(parseFloat(data.type)) ? formatValue(data.amount) : ''}}
+
{{[2, 11].includes(parseFloat(data.type)) ? '- ' + formatValue(data.amount, ) : ''}}
+
{{formatValue(data.running_balance)}}
+
+
+
\ No newline at end of file
diff --git a/resources/views/pages/dashboards/customer.blade.php b/resources/views/pages/dashboards/customer.blade.php
index 159b504b..614ee62a 100644
--- a/resources/views/pages/dashboards/customer.blade.php
+++ b/resources/views/pages/dashboards/customer.blade.php
@@ -10,7 +10,7 @@
-
Welcome Abroad, we provide logistics services.
+ Welcome Aboard, we provide logistics services.
Powered by technology, delivered by experts.
@@ -310,4 +310,4 @@
-
\ No newline at end of file
+
diff --git a/resources/views/pages/feedback.blade.php b/resources/views/pages/feedback.blade.php
index e29a3eb6..bccf5204 100644
--- a/resources/views/pages/feedback.blade.php
+++ b/resources/views/pages/feedback.blade.php
@@ -25,9 +25,11 @@
+
Version
Question Set
Question Text
-
Answer
+
Answer Text
+
Answer Value
Source System
Source Marking
Source Email
diff --git a/resources/views/pages/feedback/customer.blade.php b/resources/views/pages/feedback/customer.blade.php
index 5decb580..39527063 100644
--- a/resources/views/pages/feedback/customer.blade.php
+++ b/resources/views/pages/feedback/customer.blade.php
@@ -1,4 +1,5 @@
@extends('layouts.base_no_login')
+@section('title', 'Share Your Feedback - CIEF Customer Service')
@section('inner_content')
@endsection
diff --git a/resources/views/pages/pdfs/packing_list_measurement.blade.php b/resources/views/pages/pdfs/packing_list_measurement.blade.php
index 3a7c3cc9..e17ceb7a 100644
--- a/resources/views/pages/pdfs/packing_list_measurement.blade.php
+++ b/resources/views/pages/pdfs/packing_list_measurement.blade.php
@@ -42,10 +42,13 @@
- @php
- $packages = $invoice_transaction->owner->packages;
+ @php
+ $billable_packing_list = $invoice_transaction->owner->packingLists()->first();
+ $billable_packing_list = $billable_packing_list ? $billable_packing_list : $invoice_transaction->owner;
+ $packages = $billable_packing_list->packages;
$totalCBM = 0;
$totalQty = 0;
+ $order_reference = $invoice_transaction->owner->owner ? $invoice_transaction->owner->owner->reference : null;
@endphp
@foreach ($packages as $key => $package)
@php
@@ -57,7 +60,8 @@
@endphp
{{ $key + 1 }}
- {!! $package->description !!}
+
+ {!! $order_reference . ' ' . $billable_packing_list->owner->reference !!}
{!! $measurement !!}
diff --git a/resources/views/pages/pdfs/shipping_invoices_combined.blade.php b/resources/views/pages/pdfs/shipping_invoices_combined.blade.php
index ce0b7e9c..fb7fb494 100644
--- a/resources/views/pages/pdfs/shipping_invoices_combined.blade.php
+++ b/resources/views/pages/pdfs/shipping_invoices_combined.blade.php
@@ -129,6 +129,8 @@ $grandSubTotal = 0;
@foreach ($invoice_transactions as $transaction)
@include('pages.pdfs.shipping_invoice_inner', ['invoice_transaction' => $transaction])
+
+ @include('pages.pdfs.packing_list_measurement', ['invoice_transaction' => $transaction])
@endforeach
diff --git a/resources/views/vendor/head.blade.php b/resources/views/vendor/head.blade.php
index 6173a632..f36a5b76 100644
--- a/resources/views/vendor/head.blade.php
+++ b/resources/views/vendor/head.blade.php
@@ -8,7 +8,7 @@
-IZYIM Shipping
+@yield('title', 'IZYIM Shipping')
@@ -28,4 +28,4 @@
-
\ No newline at end of file
+
diff --git a/routes/transaction.php b/routes/transaction.php
index 9f770be8..01e996dd 100644
--- a/routes/transaction.php
+++ b/routes/transaction.php
@@ -9,6 +9,9 @@ Route::group(['prefix' => 'transactions', 'namespace' => 'Transactions', 'as' =>
Route::delete('/delete/{id}', 'DeleteTransactionController@delete')->name('delete');
Route::delete('/delete-payment/{id}', 'DeletePaymentTransactionController@delete')->name('payment.delete');
Route::put('{id}/status/update/{status}', 'UpdateTransactionStatusController@update')->where('status', 'approve|expire|reject')->name('update');
+ route::post('/{invoice_id}/regenerate', 'RegenerateSingleShippingInvoiceTransactionController@regenerate')->name('invoice.regenerate');
+
+ Route::get('wallet/list', 'ListWalletTransactionsController@list')->name('wallet.list');
Route::group(['prefix' => 'payment', 'as' => 'payment.'], function () {
Route::post('/create', 'CreatePaymentTransactionController@create')->name('create');
diff --git a/routes/web.php b/routes/web.php
index 88bab558..cc85078e 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -1,11 +1,8 @@
name('packaging_list.on_hold.export');
Route::get('/export/arrived-parcel', 'Exports\ExportArrivedParcelController@export')->name('packing_list.arrived_parcel.export');
Route::get('/export/parcel-summary', 'Exports\ExportArrivedParcelController@summary');
+Route::get('/export/aging-list', 'Exports\ExportArrivedParcelController@aging')->name('aging-listing.export');
Route::get('/export/parcel-postcode', 'Exports\ExportParcelPostcodesController@export');
Route::get('/export/{year}/customer-total-order', 'Exports\ExportCustomersToExcelController@totalOrders');
Route::get('/export/packing-list-warehouse/guangzhou2-to-johor', 'Exports\ExportArrivedParcelController@guangZhou2ToJohor');
@@ -1068,6 +1062,8 @@ Route::get('/wallet/{marking}/details', function ($marking) {
return view('pages.wallet.index', ['id' => $id, 'marking' => $marking]);
})->name('wallet.details');
+Route::get('/wallet/{wallet_id}/{is_precise}/export', 'Exports\ExportCustomersWalletTransactionToExcelController@export')->name('wallet.details-export');
+
Route::get('/wallet/audit', function (Request $request) {
$wallets = \App\Models\Wallet::all();
@@ -1223,10 +1219,31 @@ Route::get('/wallets/active', function(){
echo '';
});
-Route::get('/accident-approve-invoice', function(){
- $invoices = Transaction::where('type', TransactionType::SHIPPING_INVOICE)->whereDate('updated_at', '2023-10-12')->get();
+Route::get('fix-payment-status-updated-but-failed-update-invoice', function (UpdatesTransactionStatus $updatesTransactionStatus, UpdateDoFromVTPortalProcessor $updateDoFromVTPortalProcessor, UpdateDoFromYDPortalProcessor $updateDoFromYDPortalProcessor) {
+ $invoices = Transaction::where('type', TransactionType::SHIPPING_INVOICE)->whereIn('status', [2])
+ ->whereHas('transactions', function ($query) {
+ $query->where('type', TransactionType::PAYMENT)
+ ->whereIn('status', [2, 3]);
+ })->get();
+
+
foreach ($invoices as $invoice) {
- $orderMarking = $invoice->owner->owner->reference;
- echo ''.$orderMarking.' ';
+ echo "Fixing" . $invoice->owner->owner->reference . ' ';
+
+ $totalPaidAmount = $invoice->transactions->where('type', TransactionType::PAYMENT)->whereIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED])->sum('amount');
+
+ if (($invoice->amount - $totalPaidAmount) < 0.01) {
+ $updatesTransactionStatus->execute($invoice, ApprovalStatus::COMPLETED);
+ $packingList = $invoice->owner;
+ $packingList->status = ApprovalStatus::APPROVED;
+ $packingList->save();
+
+ if (app()->environment('production')) {
+ $updateDoFromVTPortalProcessor->execute($packingList);
+ $updateDoFromYDPortalProcessor->execute($packingList);
+ }
+
+ echo 'done fix ' . $invoice->owner->owner->reference . ' ';
+ }
}
-});
+});
\ No newline at end of file