diff --git a/resources/assets/vue/components/bookings/forms/BookingPaymentQuotationComponent.vue b/resources/assets/vue/components/bookings/forms/BookingPaymentQuotationComponent.vue index c9ababa4..6f436dcb 100644 --- a/resources/assets/vue/components/bookings/forms/BookingPaymentQuotationComponent.vue +++ b/resources/assets/vue/components/bookings/forms/BookingPaymentQuotationComponent.vue @@ -92,7 +92,7 @@
| No | -Stock Code | -Description | -Quantity | -Unit Price (RM) | -Total Amount (RM) |
- ||
|---|---|---|---|---|---|---|---|
| No | +Stock Code | +Description | +Quantity | +Unit Price (RM) | +Total Amount (RM) |
+ ||
| {{ $key + 1 }} | -{{ $transaction_detail->product_code }} | -{{ $transaction_detail->product_name }} | -{{ $transaction_detail->quantity }} | -- @if($transaction->booking()->first()->fix_currency_id !== 1) - {{ number_format( (1/$currency_rate) * $transaction_detail->price, 2) }} - @else - {{ number_format($transaction_detail->price, 2) }} - @endif - | -- @if($transaction->booking()->first()->fix_currency_id !== 1) - - {{ number_format((float)number_format( (1/$currency_rate) * $transaction_detail->price, 2,'.','')*$transaction_detail->quantity,2) }} - - @php - $subtotal += number_format((float)number_format( (1/$currency_rate) * $transaction_detail->price, 2,'.','')*$transaction_detail->quantity,2,'.',''); - @endphp - @else - {{ number_format((float)number_format($transaction_detail->price, 2,'.','')*$transaction_detail->quantity,2) }} - - @php - $subtotal += number_format((float)number_format($transaction_detail->price, 2,'.','')*$transaction_detail->quantity,2,'.',''); - @endphp - @endif - | -||
| {{ $key + 1 }} | +{{ $transaction_detail->product_code }} | +{{ $transaction_detail->product_name }} | +{{ $transaction_detail->quantity }} | ++ @php + $unitPrice = $transaction_detail->price / $currencyRate; + @endphp + {{ number_format($unitPrice, 2) }} + | ++ @php + $itemTotal = $unitPrice * $transaction_detail->quantity; + $subtotal += $itemTotal; + @endphp + {{ number_format($itemTotal, 2) }} + | +||
| - | Subtotal | -- {{ number_format($subtotal, 2) }} - | -|||||
| - | Service Charges | -- {{ number_format($transaction->service_charge, 2) }} - | -|||||
| + | Subtotal | +{{ number_format($subtotal, 2) }} | +|||||
| + | Service Charges | ++ {{ number_format($transaction->service_charge, 2) }} + | +|||||
| Voucher ({{ $voucher_redemption->voucher->code }}) | -- -{{ $voucher_redemption->value }} - | +-{{ $voucherDiscount }} | |||||
| + | Adjustment | ++ @php + $adjustment = $transaction->amount - $subtotal; + @endphp + {{ number_format($adjustment, 2) }} + | +|||||
| - | Adjustment | -- @if($transaction->booking()->first()->fix_currency_id !== 1) - {{ number_format((float)number_format( (1/$currency_rate) * $transaction->amount, 2,'.','') - (float)number_format($subtotal, 2,'.',''),2) }} - @else - {{ number_format((float)number_format($transaction->amount, 2,'.','') - (float)number_format($subtotal, 2,'.',''),2) }} - @endif - | -|||||
| - | Tax | -{{ number_format($transaction->tax, 2) }} | -|||||
| - | Total | -- @if($transaction->booking()->first()->fix_currency_id !== 1) - {{ number_format( ((1/$currency_rate) * $transaction->amount) + $transaction->service_charge + $transaction->tax + $voucher_discount, 2) }} - @else - {{ number_format($transaction->amount + $transaction->service_charge + $transaction->tax + $voucher_discount, 2) }} - @endif - | +Tax | +{{ number_format($transaction->tax, 2) }} | |||
| + | Total | ++ @php + $total = $subtotal + $transaction->service_charge + $transaction->tax + $voucherDiscount; + @endphp + {{ number_format($total, 2) }} + | +|||||
| No | -Stock Code | -Description | -Quantity | -Unit Price (RM) | -Total Amount (RM) |
- ||
|---|---|---|---|---|---|---|---|
| No | +Stock Code | +Description | +Quantity | +Unit Price (RM) | +Total Amount (RM) |
+ ||
| {{ $key + 1 }} | -{{ $transaction_detail->product_code }} | -{{ $transaction_detail->product_name }} | -{{ $transaction_detail->quantity }} | -- @if($transaction->booking()->first()->fix_currency_id !== 1) - {{ number_format( (1/$currency_rate) * $transaction_detail->price, 2) }} - @else - {{ number_format($transaction_detail->price, 2) }} - @endif - | -- @if($transaction->booking()->first()->fix_currency_id !== 1) + @php + $subtotal = 0; + $voucher_redemption = isset($voucher_redemption) ? $voucher_redemption : null; - {{ number_format((float)number_format( (1/$currency_rate) * $transaction_detail->price, 2,'.','')*$transaction_detail->quantity,2) }} - - @php - $subtotal += number_format((float)number_format( (1/$currency_rate) * $transaction_detail->price, 2,'.','')*$transaction_detail->quantity,2,'.',''); - @endphp - @else - {{ number_format((float)number_format($transaction_detail->price, 2,'.','')*$transaction_detail->quantity,2) }} - - @php - $subtotal += number_format((float)number_format($transaction_detail->price, 2,'.','')*$transaction_detail->quantity,2,'.',''); - @endphp - @endif - | -||
| {{ $key + 1 }} | +{{ $transaction_detail->product_code }} | +{{ $transaction_detail->product_name }} | +{{ $transaction_detail->quantity }} | ++ @php + $unitPrice = $transaction_detail->price / $currencyRate; + @endphp + {{ number_format($unitPrice, 2) }} + | ++ @php + $itemTotal = $unitPrice * $transaction_detail->quantity; + $subtotal += $itemTotal; + @endphp + {{ number_format($itemTotal, 2) }} + | +||
| - | Subtotal | -- {{ number_format($subtotal, 2) }} - | -|||||
| - | Service Charges | -- {{ number_format($transaction->service_charge, 2) }} - | -|||||
| + | Subtotal | +{{ number_format($subtotal, 2) }} | +|||||
| + | Service Charges | +{{ number_format($transaction->service_charge, 2) }} | +|||||
| Voucher ({{ $voucher_redemption->voucher->code }}) | -- -{{ $voucher_redemption->value }} - | +-{{ $voucherDiscount }} | |||||
| + | Adjustment | ++ @php + $adjustment = $transaction->amount - $subtotal; + @endphp + {{ number_format($adjustment, 2) }} + | +|||||
| - | Adjustment | -- @if($transaction->booking()->first()->fix_currency_id !== 1) - {{ number_format((float)number_format( (1/$currency_rate) * $transaction->amount, 2,'.','') - (float)number_format($subtotal, 2,'.',''),2) }} - @else - {{ number_format((float)number_format($transaction->amount, 2,'.','') - (float)number_format($subtotal, 2,'.',''),2) }} - @endif - | -|||||
| - | Tax | -{{ number_format($transaction->tax, 2) }} | -|||||
| - | Total | -- @if($transaction->booking()->first()->fix_currency_id !== 1) - {{ number_format($subtotal + $transaction->service_charge + $transaction->tax + $voucher_discount, 2) }} - @else - {{ number_format($transaction->amount + $transaction->service_charge + $transaction->tax + $voucher_discount, 2) }} - @endif - | +Tax | +{{ number_format($transaction->tax, 2) }} | |||
| + | Total | ++ @php + $total = $subtotal + $transaction->service_charge + $transaction->tax + $voucherDiscount; + @endphp + {{ number_format($total, 2) }} + | +|||||
|
-
- Buyer
-
+
+ Buyer
+
@@ -34,34 +34,34 @@
- {{ $supplier->name }}
-
+ {{ $supplier->name }}
+
- {{-- {{ $supplier }} --}}
-
+ {{-- {{ $supplier }} --}}
+
- @php - $addresses = $supplier->addresses()->where('billing', '=', true)->first(); - @endphp - {{ $addresses->street_one }} - {{ $addresses->street_two }} - {{ $addresses->state()->first()->name }} - {{ $addresses->district()->first()->name }} - + @php + $billingAddress = $supplier->addresses()->where('billing', '=', true)->first(); + @endphp + {{ $billingAddress->street_one }} + {{ $billingAddress->street_two }} + {{ $billingAddress->state()->first()->name }} + {{ $billingAddress->district()->first()->name }} + - Phone: {{ $supplier->contacts()->first()->phone }} - + Phone: {{ $supplier->contacts()->first()->phone }} + |
-
- Seller
-
+
+ Seller
+
- CIEF Worldwide Sdn Bhd (1134596-M) - + CIEF Worldwide Sdn Bhd (1134596-M) +
No. 72-3, Jalan Jalil 1, The Earth Bukit Jalil, @@ -78,116 +78,91 @@
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||