+
+
Your Purchase Order {{data.purchase_order.status === 1 ? 'is Being Processed for Verification' : 'has been Approved' }}
@@ -227,19 +214,95 @@
Edit Purchase Order
-
Generate Proforma Invoice
-
-
-
-
+
+
+
+
+
+
+
+
+
+ Generate Banking Invoice
+ Regenerate Banking Invoice
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Banking Delivery Order
+
+
+
+
+
+
+
+
+
+
+
+
+ Generate Proforma Invoice
+
+
+
+
+
+
+
+ Regenerate Proforma Invoice
+
+
+
+
@@ -383,8 +446,16 @@
this.checkEInvoiceRule();
}
else if(section === this.section + 'CheckEInvoiceRule'){
+ this.checkEInvoiceAmountLimitRule();
+ }
+ else if(section === this.section + 'CheckEInvoiceAmountLimitRule'){
if(response.payload.data.isPassed){
- this.submit(route('api.booking.proforma.create', this.data.id), 'post', this.section, true, true);
+ if(this.data.service.id === 14 || this.data.service.id === 15 || this.data.service.id === 16 || this.data.service.id === 17 || this.data.service.id === 18 || this.data.service.id === 19){
+ this.submit(route('api.booking.banking.create', this.data.id), 'post', this.section, true, true);
+ }
+ else{
+ this.submit(route('api.booking.proforma.create', this.data.id), 'post', this.section, true, true);
+ }
}
}
else{
@@ -399,6 +470,14 @@
if(section === this.section + 'CheckEInvoiceRule' && statusCode === 422){
$('#modal-einvoice-info').modal('show');
}
+ else if(section === this.section + 'CheckEInvoiceAmountLimitRule' && statusCode === 422){
+ if(!this.data.company.e_invoice){
+ $('#modal-einvoice-request').modal('show');
+ }
+ else if(!this.data.company.tin){
+ $('#modal-einvoice-info').modal('show');
+ }
+ }
},
addProduct(){
this.products.push({
@@ -429,7 +508,26 @@
this.products.splice(index, 1);
},
handleGenerateProformaInvoice(){
- this.checkTransferRule();
+ if(this.data.company.e_invoice === null){
+ $('#modal-einvoice-request').modal('show');
+ }
+ else{
+ this.checkTransferRule();
+ }
+ },
+ handleGenerateBankingInvoice(){
+ if(this.data.company.e_invoice === null){
+ $('#modal-einvoice-request').modal('show');
+ }
+ else{
+ this.checkTransferRule();
+ }
+ },
+ handleEInvoiceRequestRespond({ choice }) {
+ // this.showModalEInvoiceRequest = false;
+ // if(!choice){
+ // this.showModalEInvoiceRequest = true;
+ // }
},
checkTransferRule(){
this.error = '';
@@ -446,6 +544,14 @@
};
this.submit(route('api.rule.check.einvoice'), 'post', this.section + 'CheckEInvoiceRule', false, true);
},
+ checkEInvoiceAmountLimitRule(){
+ this.error = '';
+ this.parameters = {
+ booking_id: this.data.id,
+ company_id: this.data.company.id,
+ };
+ this.submit(route('api.rule.check.einvoice.amount-limit'), 'post', this.section + 'CheckEInvoiceAmountLimitRule', false, true);
+ },
updatedEInvoiceInfo(info){
this.$store.dispatch('reloadList', {'name': "bookingDetailSection"});
},
diff --git a/resources/assets/vue/components/bookings/forms/confirmBookingComponent.vue b/resources/assets/vue/components/bookings/forms/confirmBookingComponent.vue
index d0a92e59..6fc7e203 100644
--- a/resources/assets/vue/components/bookings/forms/confirmBookingComponent.vue
+++ b/resources/assets/vue/components/bookings/forms/confirmBookingComponent.vue
@@ -11,6 +11,7 @@
+ @endif
+@endpush
\ No newline at end of file
diff --git a/resources/views/pages/pdfs/banking_invoice.blade.php b/resources/views/pages/pdfs/banking_invoice.blade.php
new file mode 100644
index 00000000..2e371273
--- /dev/null
+++ b/resources/views/pages/pdfs/banking_invoice.blade.php
@@ -0,0 +1,97 @@
+@extends('layouts.base_pdf')
+
+@section('inner_content')
+
+
+
+
+ {{ $transaction->bill_no }}
+
+
+
+
+
+
+
+
+
+
+
+ Bill To
+
+
+
+
+
+ {{ $supplier->name }}
+ @if ($brn)
+ (ROC: {{ $brn->reference }})
+ @endif
+
+
+ @php
+ $billingAddress = $supplier->addresses()->where('billing', '=', true)->first();
+ @endphp
+ {{ $billingAddress->street_one }}
+ {{ $billingAddress->street_two }},
+ {{ $billingAddress->district()->first()->name }},
+ {{ $billingAddress->postcode }}
+ {{ $billingAddress->state()->first()->name }},
+ {{ $billingAddress->country()->first()->name }}
+
+ Phone: {{ $supplier->contacts()->first()->phone }}
+
+
+
+
+
+
+
+
+
+
+ @include('pages.pdfs.purchase_order_table_v2')
+
+
+
+
+
+
{{ \App\Classes\General\Helper::convert(round($transaction->amount, 2)) }}
+
Notes:
+ 1. All cheques should be crossed and made payable to CIEF WORLDWIDE SDN. BHD. (MAYBANK) MBB-568603010762
+ 2. Goods sold are neither returnable nor refundable. Otherwise a cancellation fee of 20% on purchase price will be imposed.
+ 3. Interest rate 2% per month will be charged on all overdue bills.
+ 4. Price offered on invoice is based on present as at the current invoice date.
+ No any price amendment will be allowed after invoice being chop & sign.
+ CIEF WORLDWIDE SDN. BHD.
+
+
+
+
+
+ This is generated by computer. No signature required.
+ Page {PAGENO} of {nbpg}
+
+
+
+@endsection
diff --git a/resources/views/pages/pdfs/deliver_order_banking.blade.php b/resources/views/pages/pdfs/deliver_order_banking.blade.php
new file mode 100644
index 00000000..c788a655
--- /dev/null
+++ b/resources/views/pages/pdfs/deliver_order_banking.blade.php
@@ -0,0 +1,113 @@
+@extends('layouts.base_pdf')
+@section('inner_content')
+
+
+
+ {{ str_replace(['BI-'], 'BDO-', $transaction->bill_no) }}
+
+
+
+
+
+
+
+
+
+
+ Bill To
+
+
+
+
+
+
+ {{ $supplier->name }}
+ @if ($brn)
+ (ROC: {{ $brn->reference }})
+ @endif
+
+
+ @php
+ $billingAddress = $supplier->addresses()->where('billing', '=', true)->first();
+ @endphp
+ {{ $billingAddress->street_one }}
+ {{ $billingAddress->street_two }} ,
+ {{ $billingAddress->district()->first()->name }},
+ {{ $billingAddress->postcode }}
+ {{ $billingAddress->state()->first()->name }},
+ {{ $billingAddress->country()->first()->name }}
+
+
+ Phone: {{ $supplier->contacts()->first()->phone }}
+
+
+
+
+
+
+
+
+
+
+ @include('pages.pdfs.purchase_order_table_v2')
+
+
+
+
+
+
+
+
+ E & O.E
+ Receive In Good Order & Condition
+
+
+
+
+
+
+
+
+ CIEF WORLDWIDE SDN BHD
+
+
+
+
+
+
+
+
+
+
+
+ This is generated by computer. No signature required.
+ Page {PAGENO} of {nbpg}
+
+
+
+@endsection
diff --git a/routes/booking.php b/routes/booking.php
index 50e9911a..e0e467ce 100644
--- a/routes/booking.php
+++ b/routes/booking.php
@@ -3,6 +3,7 @@
use App\Http\Controllers\Bookings\RegenerateBookingPaymentRVController;
use App\Http\Controllers\Bookings\RegenerateBookingEInvoiceController;
use App\Http\Controllers\Bookings\UpdateBookingAmountController;
+use App\Http\Controllers\Bookings\CreateBankingInvoiceTransactionController;
use Illuminate\Support\Facades\Route;
Route::group(['prefix' => 'booking', 'as' => 'booking.', 'namespace' => 'Bookings'], function () {
@@ -43,6 +44,8 @@ Route::group(['prefix' => 'booking', 'as' => 'booking.', 'namespace' => 'Booking
Route::post('/merge', 'MergeBookingController@merge')->name('merge');
Route::post('{id}/proforma/create', 'CreateProformaInvoiceTransaction@create')->name('proforma.create');
+ Route::post('{id}/banking/create', [CreateBankingInvoiceTransactionController::class, 'create'])->name('banking.create');
+
Route::group(['prefix' => '{id}/receipt', 'as' => 'receipt.'], function () {
Route::post('/', [RegenerateBookingPaymentRVController::class, 'regenerate'])->name('regenerate');
diff --git a/routes/export.php b/routes/export.php
index 6cf7484c..f91357a9 100644
--- a/routes/export.php
+++ b/routes/export.php
@@ -28,4 +28,5 @@ Route::group(['prefix' => 'import', 'as' => 'import.', 'namespace' => 'Imports']
Route::post('/import/sales-invoice', [ImportController::class, 'salesInvoices'])->name('sales_invoices');
Route::post('/import/offical-receipt', [ImportController::class, 'officialReceipt'])->name('official_receipt');
Route::post('/import/sales-deposit', [ImportController::class, 'salesDeposit'])->name('sales_deposit');
+ Route::post('/import/credit-note', [ImportController::class, 'creditNote'])->name('credit_note');
});
diff --git a/routes/rule.php b/routes/rule.php
index d5330176..4918b4d0 100644
--- a/routes/rule.php
+++ b/routes/rule.php
@@ -9,4 +9,5 @@ Route::prefix('rule')
Route::post('/check/eInvoice', [CheckRuleController::class, 'checkEInvoiceRule'])->name('check.einvoice');
Route::post('/check/purchase-order', [CheckRuleController::class, 'checkPurchaseOrderRule'])->name('check.purchase.order');
Route::post('/check/tranfer', [CheckRuleController::class, 'checkTransferRule'])->name('check.transfer');
+ Route::post('/check/e-invoice/amount-limit', [CheckRuleController::class, 'checkEInvoiceAmountLimitRule'])->name('check.einvoice.amount-limit');
});
diff --git a/routes/web.php b/routes/web.php
index 0f707244..cc13fc90 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -36,7 +36,9 @@ use App\Classes\Modules\Transactions\Processors\CreateInvoiceTransactionV2Proces
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use App\Classes\General\AWSS3Helper;
+use App\Classes\ValueObjects\Constants\KVPKey;
use App\Http\Controllers\Reports\UnfinishedPaymentOrders;
+use App\Models\KeyValuePair;
use Illuminate\Support\Facades\File;
@@ -215,6 +217,8 @@ Route::post('/support', function (Request $request) {
$marking = $request->input('marking');
$email = $request->input('customer_email');
$bookingReference = $request->input('booking_reference');
+ $billNo = $request->input('bill_no');
+ $autocountDocNoInvoice = $request->input('autocount_docno_invoice');
$company = null;
$booking = null;
@@ -234,6 +238,21 @@ Route::post('/support', function (Request $request) {
$company = $booking->company;
}
+ if($billNo) {
+ $transaction = Transaction::where('bill_no', $billNo)->first();
+ if($transaction){
+ $booking = $transaction->booking;
+ }
+ }
+
+ if($autocountDocNoInvoice) {
+ $kvp = KeyValuePair::where('key', KVPKey::AUTOCOUNT_DOCNO_INVOICE)->where('value', $autocountDocNoInvoice)->first();
+ if($kvp){
+ $transaction = $kvp->owner()->withTrashed()->first();
+ $booking = $transaction ? $transaction->booking : null;
+ }
+ }
+
return view('pages.customer_support', [
'marking' => $marking,
'email' => $email,