-
+
+
{{item.name}}
diff --git a/resources/assets/vue/components/companies/forms/ChangeCustomerCompanyDetailsFormComponent.vue b/resources/assets/vue/components/companies/forms/ChangeCustomerCompanyDetailsFormComponent.vue
new file mode 100644
index 00000000..326274d3
--- /dev/null
+++ b/resources/assets/vue/components/companies/forms/ChangeCustomerCompanyDetailsFormComponent.vue
@@ -0,0 +1,194 @@
+
+
+
+
+
+
Edit Company Details
+
+
+
+
+
+
+ Debtor Code
+
+
+
+
+
+
+ E-Invoice Info
+
+
+
+
+ Billing Address Line 1
+
+
+
+
+
+
+
+ Billing Address Line 2
+
+
+
+
+
+
+
+ District
+
+
+
+
+
+ Post Code
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/resources/assets/vue/components/companies/forms/EInvoiceRequestFormComponent.vue b/resources/assets/vue/components/companies/forms/EInvoiceRequestFormComponent.vue
new file mode 100644
index 00000000..30828ea5
--- /dev/null
+++ b/resources/assets/vue/components/companies/forms/EInvoiceRequestFormComponent.vue
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+
Do you need E-Invoice?
+
You won't be able to request one after clicking 'No'.
+
+
+
+
+
+
+
+
+
+
diff --git a/resources/assets/vue/components/general/elements/DocumentFileViewerComponent.vue b/resources/assets/vue/components/general/elements/DocumentFileViewerComponent.vue
index 70f3280f..da0ce254 100644
--- a/resources/assets/vue/components/general/elements/DocumentFileViewerComponent.vue
+++ b/resources/assets/vue/components/general/elements/DocumentFileViewerComponent.vue
@@ -35,6 +35,13 @@
isClicked: false
}
},
+ watch: {
+ file: {
+ handler() {
+ this.loaded = false;
+ },
+ }
+ },
computed: {
type() {
return this.file.file.mime_type === 'application/pdf' ? 'pdf' : 'image'
diff --git a/resources/assets/vue/components/general/forms/ValidationErrorComponent.vue b/resources/assets/vue/components/general/forms/ValidationErrorComponent.vue
index e1020c2e..37223319 100644
--- a/resources/assets/vue/components/general/forms/ValidationErrorComponent.vue
+++ b/resources/assets/vue/components/general/forms/ValidationErrorComponent.vue
@@ -2,9 +2,14 @@
{{errorMessages[param]}}
+ {{errorMessages[param]}} {{object.max}} characters
{{errorMessages[param]}} {{object.min}} characters
{{errorMessages[param]}} {{object.eq}} field
{{errorMessages[param]}} {{object.max}}
+ {{errorMessages[param]}}
+
+ {{ errorMessages[param] }}
+
@@ -14,16 +19,20 @@
props: {
validator: {
required: true
- }
+ },
},
data(){
return {
errorMessages:{
required: 'this field is required',
email: 'enter a valid email address',
+ maxLength: 'this field must have at most',
minLength: 'this field must have at least',
sameAs: 'this field must match the',
- maxValue: 'this value must not exceeds'
+ maxValue: 'this value must not exceeds',
+ alphaNum: 'this value must be alphanumeric',
+ fiveDigits: 'this value must be exactly 5 digits', //custom
+ // notZero: 'this value cannot be zero',
},
}
},
diff --git a/resources/assets/vue/components/wallets/elements/CustomerWalletTransactionComponent.vue b/resources/assets/vue/components/wallets/elements/CustomerWalletTransactionComponent.vue
index ad5ccb07..c8220b04 100644
--- a/resources/assets/vue/components/wallets/elements/CustomerWalletTransactionComponent.vue
+++ b/resources/assets/vue/components/wallets/elements/CustomerWalletTransactionComponent.vue
@@ -1,7 +1,9 @@
{{data.created_at}}
-
+
{{[5, 9].includes(parseFloat(data.type)) ? formatValue(data.amount) : ''}}
{{[1, 11].includes(parseFloat(data.type)) ? '- ' + (formatValue(data.amount)) : ''}}
{{formatValue(data.running_balance)}}
diff --git a/resources/assets/vue/general/mixins/request.js b/resources/assets/vue/general/mixins/request.js
index 96318920..b4dc85a4 100644
--- a/resources/assets/vue/general/mixins/request.js
+++ b/resources/assets/vue/general/mixins/request.js
@@ -25,7 +25,7 @@ export default {
if (!success) {
this.openModal();
errorNotification ? this.$store.dispatch('createNotification', { title: response.title, message: response.message, type: 'error' }) : null;
- this.errorHandler(response, statusCode); return;
+ this.errorHandler(response, statusCode, section); return;
}
successNotification ? this.$store.dispatch('createNotification', { title: response.title, message: response.message, type: 'success' }) : null;
@@ -34,7 +34,7 @@ export default {
link.href = window.URL.createObjectURL(response);
link.download = fileName.trim();
link.click();
- this.successHandler(response)
+ this.successHandler(response, section)
});
} else {
response.json().then(response => {
@@ -42,11 +42,11 @@ export default {
if (!success) {
this.openModal();
errorNotification ? this.$store.dispatch('createNotification', { title: response.title, message: response.message, type: 'error' }) : null;
- this.errorHandler(response, statusCode); return;
+ this.errorHandler(response, statusCode, section); return;
}
successNotification ? this.$store.dispatch('createNotification', { title: response.title, message: response.message, type: 'success' }) : null;
- this.successHandler(response)
+ this.successHandler(response, section, this.parameters);
});
diff --git a/resources/views/errors/503.blade.php b/resources/views/errors/503.blade.php
index d8fbc8c3..f096db8d 100644
--- a/resources/views/errors/503.blade.php
+++ b/resources/views/errors/503.blade.php
@@ -22,8 +22,9 @@
-
We'll be back soon!
-
Sorry for the inconvenience but we're performing some maintenance at the moment. We'll be back online shortly!
+
{{ config('maintenance.title') }}
+
+
{{ config('maintenance.message') }}
— CIEF EXCHANGE
diff --git a/resources/views/pages/downloads/index.blade.php b/resources/views/pages/downloads/index.blade.php
index 355aa1a2..0f34dee7 100644
--- a/resources/views/pages/downloads/index.blade.php
+++ b/resources/views/pages/downloads/index.blade.php
@@ -66,6 +66,32 @@
+
+
+
+
+
+
+
EINV_DEBTOR_SUMMARY.xls
+
e-Invoice Debtor Summary Report
+
+
+ Download
+
+
+
diff --git a/resources/views/pages/pdfs/credit_note_v2.blade.php b/resources/views/pages/pdfs/credit_note_v2.blade.php
new file mode 100644
index 00000000..5155a3bf
--- /dev/null
+++ b/resources/views/pages/pdfs/credit_note_v2.blade.php
@@ -0,0 +1,118 @@
+@extends('layouts.base_pdf')
+@section('inner_content')
+
+
+
+ @php
+ $credit_title = 'Credit';
+ $bill_no = $credit_title === 'Refund' ? str_replace('CREDIT', 'REFUND', $transaction->bill_no) : $transaction->bill_no;
+ @endphp
+ {{ $bill_no }}
+
+
+
+
+
+
+
+
+
+ {{ $transaction->type == 9 ? 'Credit' : 'Debit' }} To
+
+
+
+
+
+
+ {{ $supplier->name }}
+
+
+ @php
+ $addresses = $supplier->addresses()->where('billing', '=', true)->first();
+ @endphp
+ {{ $addresses->street_one }}
+ {{ $addresses->street_two }} ,
+ {{ $addresses->district()->first()->name }},
+ {{ $addresses->postcode }}
+ {{ $addresses->state()->first()->name }},
+ {{ $addresses->country()->first()->name }}
+
+
+ Phone: {{ $supplier->contacts()->first()->phone }}
+
+ @if ($supplier->e_invoice === 1)
+ Buyer TIN: {{ $supplier->tin }}
+ @endif
+
+
+
+
+
+
+
+
+ No
+ Description
+ Quantity
+ Unit Price (RM)
+ Total Amount (RM)
+
+
+
+
+ 1
+ {{ ucfirst($transaction->payment_reference) }}
+ 1
+
+ {{ number_format($transaction->amount, 2) }}
+
+
+ {{ number_format($transaction->amount, 2) }}
+
+
+
+
+
+
+ Total
+
+ {{ number_format($transaction->amount, 2) }}
+
+
+
+
+
+
+
+ This is generated by computer. No signature required.
+ Page {PAGENO} of {nbpg}
+
+
+
+@endsection
diff --git a/resources/views/pages/pdfs/e_credit_note.blade.php b/resources/views/pages/pdfs/e_credit_note.blade.php
new file mode 100644
index 00000000..aa4c67d8
--- /dev/null
+++ b/resources/views/pages/pdfs/e_credit_note.blade.php
@@ -0,0 +1,147 @@
+@extends('layouts.base_pdf')
+@section('inner_content')
+
+
+
+ @php
+ $credit_title = 'E-Credit';
+ $bill_no = $transaction->bill_no;
+ @endphp
+ {{ $bill_no }}
+
+
+
+
+
+
+
+
+
+ {{ $transaction->type == 9 ? 'Credit' : 'Debit' }} To
+
+
+
+
+
+
+ {{ $supplier->name }}
+ @if ($brn)
+ (ROC: {{ $brn->reference }})
+ @endif
+
+
+ @php
+ $addresses = $supplier->addresses()->where('e_invoice', '=', true)->latest()->first();
+ @endphp
+ {{ $addresses->street_one }}
+ {{ $addresses->street_two }} ,
+ {{ $addresses->district()->first()->name }},
+ {{ $addresses->postcode }}
+ {{ $addresses->state()->first()->name }},
+ {{ $addresses->country()->first()->name }}
+
+
+ Phone: {{ $supplier->contacts()->first()->phone }}
+
+ @if ($supplier->e_invoice === 1)
+ Buyer TIN: {{ $supplier->tin }}
+ @endif
+
+
+
+
+
+
+
+
+ No
+ Description
+ Quantity
+ Unit Price (RM)
+ Total Amount (RM)
+
+
+
+
+ 1
+ {{ ucfirst($transaction->payment_reference) }}
+ 1
+
+ {{ number_format($transaction->amount, 2) }}
+
+
+ {{ number_format($transaction->amount, 2) }}
+
+
+
+
+
+
+ Total
+
+ {{ number_format($transaction->amount, 2) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ http://e-invoice uuid link
+
+
+
+
+
+
+
+
+
+
+ This is generated by computer. No signature required.
+ Page {PAGENO} of {nbpg}
+
+
+
+@endsection
diff --git a/resources/views/pages/pdfs/e_invoice.blade.php b/resources/views/pages/pdfs/e_invoice.blade.php
new file mode 100644
index 00000000..2a133bb8
--- /dev/null
+++ b/resources/views/pages/pdfs/e_invoice.blade.php
@@ -0,0 +1,115 @@
+@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('e_invoice', '=', true)->latest()->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 }}
+ @if ($supplier->e_invoice === 1)
+ Buyer TIN: {{ $supplier->tin }}
+ @endif
+
+
+
+
+
+
+
+
+ @include('pages.pdfs.purchase_order_table')
+
+
+
+ Note: All items purchased are subject to our Terms & Conditions. Please refer to our official website for more information.
+
+
+
+
+
+
+
+
+
+
+
+
+ Please transfer the payment to:
+ Bank: Maybank Berhad
+ Account Name: CIEF Worldwide Sdn Bhd
+ Account No: 568603010762
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ http://e-invoice uuid link
+
+
+
+
+
+
+
+
+
+@endsection
diff --git a/resources/views/pages/pdfs/invoice.blade.php b/resources/views/pages/pdfs/invoice.blade.php
index 2fe00625..9e560b44 100644
--- a/resources/views/pages/pdfs/invoice.blade.php
+++ b/resources/views/pages/pdfs/invoice.blade.php
@@ -26,7 +26,7 @@
Invoice
EI#: {{ $transaction->bill_no }}
Ref# {{ $po_order_transaction->booking->marking }}
-
Date: {{ $supplier->segments->whereIn('id', [23])->first() ? \Carbon\Carbon::now() : $po_order_transaction->booking->created_at }}
+
Date: {{ $document_date }}
diff --git a/resources/views/pages/pdfs/receipt_voucher.blade.php b/resources/views/pages/pdfs/receipt_voucher.blade.php
new file mode 100644
index 00000000..64942f6f
--- /dev/null
+++ b/resources/views/pages/pdfs/receipt_voucher.blade.php
@@ -0,0 +1,113 @@
+@extends('layouts.base_pdf')
+
+@section('inner_content')
+
+
+
+
+ {{ $transaction->bill_no }}
+
+
+
+
+
+
+
+
+
+
+ Received From:
+
+
+
+
+ {{ $supplier->name }}
+ @if ($supplier->e_invoice === 1)
+ (TIN: {{ $supplier->tin }})
+ @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 }}
+
+
+
+
+ @php
+ $total = round($transaction->amount, 2);
+ @endphp
+
+
+
+
+ RECEIVE THE SUM OF: {{ \App\Classes\General\Helper::convert(round($transaction->amount, 2)) }}
+
+
+
+
+
+
+
+ Payment Method
+ Transaction ID
+ Payment Amount
+
+
+
+
+ {{ ucwords(str_replace('_', ' ', \App\Classes\ValueObjects\Constants\PaymentMethodType::PAYMENT_METHODS_ID[$transaction->payment_method])) }}
+ {{ $transaction->owner->bill_no ?? '-' }}
+ {{ number_format($total, 2) }}
+
+
+
+
+
Paid For
+
+
+
+
+ Description
+ Amount
+
+
+
+
+ PAYMENT FOR REF. {{ $po_order_transaction->owner->marking ?? 'N/A' }}
+ {{ number_format($total, 2) }}
+
+
+
+
+
+
+
+ TOTAL: {{ number_format($total, 2) }}
+
+
AUTO GENERATED BY EXCHANGE PORTAL, NO SIGNATURE REQUIRED
+
+@endsection
diff --git a/resources/views/partials/header.blade.php b/resources/views/partials/header.blade.php
index eaeeaec7..54a1783a 100644
--- a/resources/views/partials/header.blade.php
+++ b/resources/views/partials/header.blade.php
@@ -66,6 +66,9 @@
+
diff --git a/resources/views/vendor/head.blade.php b/resources/views/vendor/head.blade.php
index 721ff047..6f621539 100644
--- a/resources/views/vendor/head.blade.php
+++ b/resources/views/vendor/head.blade.php
@@ -5,7 +5,10 @@
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-TQKCPCD');
-
+
Exchange - Overseas Money Transfers
diff --git a/routes/api.php b/routes/api.php
index 74de21b6..564f9304 100644
--- a/routes/api.php
+++ b/routes/api.php
@@ -72,6 +72,8 @@ Route::group(['middleware' => 'api', 'prefix' => 'v1', 'as' => 'api.'], function
require __DIR__ . '/job.php';
+ require __DIR__ . '/rule.php';
+
// require __DIR__ . '/rate.php';
// require __DIR__ . '/receipt.php';
});
diff --git a/routes/booking.php b/routes/booking.php
index e8e73856..e305276b 100644
--- a/routes/booking.php
+++ b/routes/booking.php
@@ -1,5 +1,8 @@
'booking', 'as' => 'booking.', 'namespace' => 'Bookings'], function () {
@@ -34,10 +37,17 @@ Route::group(['prefix' => 'booking', 'as' => 'booking.', 'namespace' => 'Booking
Route::delete('{id}/purchase_order/pdf', 'DeletePurchaseOrderPdfController@delete')->name('po.pdf.delete');
Route::put('{id}/updateAmount', 'UpdateBookingAmountController@update')->name('booking_amount.update');
+ Route::put('{id}/updateAmountWithPO', [UpdateBookingAmountController::class, 'updateOnHold'])->name('amount.update');
Route::put('{id}/updateOrderReferences', 'UpdateBookingOrderReferenceController@update')->name('booking_order_reference.update');
Route::post('/merge', 'MergeBookingController@merge')->name('merge');
Route::post('{id}/proforma/create', 'CreateProformaInvoiceTransaction@create')->name('proforma.create');
+ Route::group(['prefix' => '{id}/receipt', 'as' => 'receipt.'], function () {
+ Route::post('/', [RegenerateBookingPaymentRVController::class, 'regenerate'])->name('regenerate');
+ });
+ Route::group(['prefix' => '{id}/einvoice', 'as' => 'einvoice.'], function () {
+ Route::post('/', [RegenerateBookingEInvoiceController::class, 'regenerate'])->name('regenerate');
+ });
});
diff --git a/routes/company.php b/routes/company.php
index d3e9d4ba..d88bd398 100644
--- a/routes/company.php
+++ b/routes/company.php
@@ -1,5 +1,8 @@
'company', 'as' => 'company.', 'namespace' => 'Companies'], function () {
@@ -36,4 +39,8 @@ Route::group(['prefix' => 'company', 'as' => 'company.', 'namespace' => 'Compani
Route::put('/{document_id}/approval/{status}', 'ApproveIdentificationDocumentController@approve')->where('status', 'approve|reject')->name('approval');
});
+ Route::put('/details/update/{id}', [UpdateCompanyDetailsController::class, 'update'])->name('update.details');
+ Route::get('/e-invoice/info/{id}', [FetchCompanyEInvoiceInfoController::class, 'fetch'])->name('einvoice.info');
+ Route::post('/e-invoice/info/update', [UpdateCompanyEInvoiceInfoController::class, 'updateInfo'])->name('einvoice.info.update');
+ Route::post('/e-invoice/request/update', [UpdateCompanyEInvoiceInfoController::class, 'updateRequest'])->name('einvoice.request.update');
});
diff --git a/routes/crud.php b/routes/crud.php
index f01b72f7..b8db3c71 100644
--- a/routes/crud.php
+++ b/routes/crud.php
@@ -1,5 +1,7 @@
'address', 'as' => 'address.', 'namespace' => 'Addresses'], function () {
@@ -7,6 +9,7 @@ Route::group(['prefix' => 'address', 'as' => 'address.', 'namespace' => 'Address
Route::get('/list', 'ListAddressesController@list')->name('list');
Route::get('district/list', 'ListDistrictsController@list')->name('district.list');
+ Route::get('state/list', [ListStatesController::class, 'list'])->name('state.list');
Route::post('/create', 'CreateAddressController@create')->name('create');
diff --git a/routes/remark.php b/routes/remark.php
index 91ae4676..90f781eb 100644
--- a/routes/remark.php
+++ b/routes/remark.php
@@ -1,5 +1,6 @@
'Remarks', 'as' => 'remark.', 'prefix' => 'remark'], function () {
@@ -8,4 +9,6 @@ Route::group(['namespace' => 'Remarks', 'as' => 'remark.', 'prefix' => 'remark']
Route::post('/{id}/create', 'CreateRemarkController@create')->name('create');
Route::put('/update/{id}', 'UpdateRemarkController@update')->name('update');
Route::delete('/delete/{id}', 'DeleteRemarkController@delete')->name('delete');
+
+ Route::get('/list/refund-reasons', [ListRefundRemarksController::class, 'list'])->name('list.refund_reasons');
});
diff --git a/routes/rule.php b/routes/rule.php
new file mode 100644
index 00000000..d5330176
--- /dev/null
+++ b/routes/rule.php
@@ -0,0 +1,12 @@
+as('rule.')
+ ->group(function () {
+ 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');
+ });
diff --git a/routes/web.php b/routes/web.php
index 5ab78d66..d28151ea 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -32,7 +32,6 @@ use App\Classes\Modules\Documents\DataTransferObjects\DocumentObject;
use App\Classes\Modules\Bookings\Processors\CreatePurchaseOrderFor1688OrderProcessor;
use App\Classes\Modules\Bookings\Services\CalculatesBookingRefundAmount;
use App\Classes\Modules\Documents\Services\DeletesDocument;
-use App\Classes\Modules\Transactions\Processors\CreateInvoiceTransactionWithInvoiceNoProcessor;
use App\Classes\Modules\Transactions\Services\DeletesTransaction;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
@@ -326,6 +325,7 @@ Route::get('/export/analytic/booking', 'Exports\ExportAnalyticToExcelController@
Route::get('/export/analytic/bills', 'Exports\ExportAnalyticToExcelController@billingData')->name('billingData.export');;
Route::get('/export/customers/leads', 'Exports\ExportCustomersToExcelController@leadsData')->name('leads.export');
route::get('/export/excel/{id}', 'Exports\ExportCustomersToExcelController@exportCurrencyVendorOrder')->name('group.excel');
+Route::get('/export/einv-debtor/f614e339d7058904a831aad742e24d55', 'Exports\ExportCustomersToExcelController@eInvoiceDebtorSummary')->name('eInvoiceDebtorSummary.export');
Route::get('/export/all-customers-info-for-lark-system', 'Exports\ExportCustomersToExcelController@exportAllCustomersInfoForLarkSystem')->name('exportAllCustomersInfoForLarkSystem.export');
Route::get('/products', function (\App\Classes\Modules\Exports\Services\ExportsProducts $exportsProducts) {
@@ -785,7 +785,7 @@ Route::get('/invoice/fix', function(){
$existing_invoice_bill_no->forceDelete();
}
- (App()->make(CreateInvoiceTransactionWithInvoiceNoProcessor::class))->execute($booking, $bill_no);
+ (App()->make(CreateInvoiceTransactionProcessor::class))->execute($booking, $bill_no);
dump('regenerated invoice. Booking Marking - ' . $booking->marking . '. Bill_no - ' . $bill_no . '. Old bill_no - ' . $deletedInvoice->bill_no);
LogHelper::channel('regenerateInvoice')->info('regenerated invoice. Booking Marking - ' . $booking->marking . '. Bill_no - ' . $bill_no . '. Old bill_no - ' . $deletedInvoice->bill_no);
} else {
@@ -917,7 +917,7 @@ Route::get('/statements/{account}/transactions', function ($account) {
})->name('statements.account.transactions');
Route::get('/statements/{statement}', [BankStatementController::class, 'show'])->name('statements.show');
Route::get('/statements/mapping/rerun', [BankStatementController::class, 'rerun'])->name('statements.rerun');
-Route::get('/statements/{statement}/download', 'StatementController@download')->name('statements.download');
+// Route::get('/statements/{statement}/download', 'StatementController@download')->name('statements.download');
Route::get('/bank-record', 'Imports\ImportBankRecordController@import');
Route::get('/po/outsource/check', function(){
@@ -1010,7 +1010,8 @@ Route::get('/customer/vouchers/{marking}', function ($marking) {
}
})->name('customer.reward');
-Route::get('transaction/{id}/credit_note/download', 'Transactions\GenerateCreditNotePdfController@download')->name('transaction.credit_note.download');
+Route::get('transaction/{id}/credit_note/download', 'Transactions\GenerateCreditNotePdfController@downloadV2')->name('transaction.credit_note.download');
+Route::get('transaction/{id}/credit_note/download/v2', 'Transactions\GenerateCreditNotePdfController@downloadV2')->name('transaction.credit_note.download.v2');
Route::get('/invoice/{marking}/{started_at}/{ended_at}/fix', function($marking, $started_at, $ended_at) {
@@ -1081,7 +1082,7 @@ Route::get('/invoice/{marking}/{started_at}/{ended_at}/fix', function($marking,
$booking->transactions()->whereIn('transactions.type', [TransactionType::INVOICE, TransactionType::SUPPLIER_DELIVER])->delete();
$booking->documents()->whereIn('document_type', [DocumentType::INVOICE, DocumentType::PURCHASE_ORDER, DocumentType::DELIVER_ORDER, DocumentType::SUPPLIER_DELIVER_ORDER])->delete();
- (App()->make(CreateInvoiceTransactionWithInvoiceNoProcessor::class))->execute($booking, $firstBillNo);
+ (App()->make(CreateInvoiceTransactionProcessor::class))->execute($booking, $firstBillNo);
dump('regenerated invoice. Booking Marking - ' . $booking->marking . '. Bill_no - ' . $firstBillNo . '. Old bill_no - ' . $currentInvoice->bill_no);
LogHelper::channel('regenerateInvoice')->info('regenerated invoice. Booking Marking - ' . $booking->marking . '. Bill_no - ' . $firstBillNo . '. Old bill_no - ' . $currentInvoice->bill_no);
}