diff --git a/resources/assets/vue/components/bookings/elements/TransactionGroupComponent.vue b/resources/assets/vue/components/bookings/elements/TransactionGroupComponent.vue index 24794be1..2e7c30c5 100644 --- a/resources/assets/vue/components/bookings/elements/TransactionGroupComponent.vue +++ b/resources/assets/vue/components/bookings/elements/TransactionGroupComponent.vue @@ -21,24 +21,19 @@
| Sub total booking amount: | +Sub total booking amount: | @php $sub_total_booking_amount = number_format((float)$transactions->sum('original_amount'), 2, '.', ''); @endphp{{$transaction->original_currency->short_code}} {{$sub_total_booking_amount}} | ||||||||||
| Transfer fee: | +Transfer fee: | @php $transfer_fee = number_format((float)$transferFeeTransactions->sum('service_charge'), 2, '.', ''); @endphp{{$transaction->original_currency->short_code}} {{$transfer_fee}} | ||||||||||
| Total booking amount: | +Total booking amount: | @php $total_booking_amount = number_format((float) ($transactions->sum('original_amount') + $transfer_fee), 2, '.', ''); @endphp{{$transaction->original_currency->short_code}} {{$total_booking_amount}} | ||||||||||
| Sub total amount: | +Sub total amount: | @php $sub_total_amount = number_format((float)$transactions->sum('amount') + ($transfer_fee * 1/$transactions[0]->currency_rate), 2, '.', ''); @endphpMYR {{$sub_total_amount}} | ||||||||||
| Service charge: | +Service charge: | @php $service_charge = number_format((float)$transactions->sum('service_charge'), 2, '.', ''); @endphpMYR {{$service_charge}} | ||||||||||
| Total amount: | +Total amount: | @php $total_amount = number_format((float)$sub_total_amount + $service_charge, 2, '.', ''); @endphp diff --git a/resources/views/pages/pdfs/supplier_deliver_order_group_invoice.blade.php b/resources/views/pages/pdfs/supplier_deliver_order_group_invoice.blade.php index 5bc6eedd..bdc56409 100644 --- a/resources/views/pages/pdfs/supplier_deliver_order_group_invoice.blade.php +++ b/resources/views/pages/pdfs/supplier_deliver_order_group_invoice.blade.php @@ -12,7 +12,7 @@|||||||||||
| - Delivery Order + Invoice |
PO#: {{$group->reference}} @@ -66,7 +66,7 @@ | ||||
| {{ $key + 1 }} | {{$transaction->owner->owner->marking}} | -Please refer to the appedix reference no: {{$transaction->owner->owner->company->reference}} | +Please refer to the appedix reference no: {{$transaction->owner->owner->marking}} | {{$transaction->currency_rate}} | {{$transaction->currency->short_code}} {{number_format((float)$transaction->amount, 2, '.', '')}} | @php diff --git a/routes/web.php b/routes/web.php index a901bb4c..9748bc7c 100644 --- a/routes/web.php +++ b/routes/web.php @@ -299,6 +299,7 @@ Route::get('/export/imported-receipt-mapped', 'Exports\ExportCustomersToExcelCon Route::get('/export/analytic/booking', 'Exports\ExportAnalyticToExcelController@bookingData'); Route::get('/export/analytic/bills', 'Exports\ExportAnalyticToExcelController@billingData'); Route::get('/export/customers/leads', 'Exports\ExportCustomersToExcelController@leadsData')->name('leads.export'); +route::get('/export/excel/{id}', 'Exports\ExportCustomersToExcelController@exportCurrencyVendorOrder')->name('group.excel'); Route::get('/products', function (\App\Classes\Modules\Exports\Services\ExportsProducts $exportsProducts) { $bookings = Booking::where(function($query){ @@ -545,32 +546,6 @@ Route::get('/group/text/{id}', function($id){ } })->name('group.text'); -route::get('/group/pdf/{id}', function ($id) { - $group = \App\Models\Group::where('id', $id)->first(); - $supplier = $group->issuerCompany; - - $transferFeeTransactions = $group->transactions() - ->with(['transactions' => function ($transaction) { - return $transaction->where('type', TransactionType::TRANSFER_FEE); - }]) - ->get() - ->pluck('transactions') - ->flatten(); - - $html = view('pages.pdfs.currency_vendor_order', [ - 'transactions' => $group->transactions, - 'transferFeeTransactions' => $transferFeeTransactions, - 'supplier' => $supplier - ])->render(); - - $dompdf = new Dompdf(); - $dompdf->loadHtml($html); - $dompdf->setPaper('A4', 'portrait'); - $dompdf->render(); - - return $dompdf->stream("group_pdf_{$id}.pdf"); -})->name('group.pdf'); - Route::get('/group/invoice/{id}', function ($id) { $group = Group::findOrFail($id); @@ -600,24 +575,6 @@ Route::get('/group/invoice/{id}', function ($id) { return $dompdf->stream("invoice_pdf_{$supplier->name}.pdf"); })->name('group.invoice'); -route::get('/export/excel/{id}', 'Exports\ExportCustomersToExcelController@exportCurrencyVendorOrder'); -route:: get('/group/excel/{id}',function ($id) { - - echo '