commit before consolodating payment methods
This commit is contained in:
@@ -180,48 +180,62 @@
|
||||
@foreach($order->items as $item)
|
||||
<div class="item-row">
|
||||
<div class="item-info">
|
||||
<div class="item-name">{{ $item->product->name }}</div>
|
||||
<div class="item-name">{{ $item->product->name }}{{ $item->is_sample ? ' - Sample' : '' }}</div>
|
||||
<div class="item-qty">
|
||||
@php
|
||||
$stock = $item->printStock;
|
||||
$stockText = $stock ? "{$stock->name}" : "Standard";
|
||||
$stockCost = 0;
|
||||
|
||||
if ($stock) {
|
||||
$stockCost = $item->type === 'wallpaper' ? $stock->cost_per_meter : $stock->cost_per_m2;
|
||||
if (!$item->is_sample && $stock) {
|
||||
$stockCost = $item->type === 'wallpaper' ? $stock->cost_per_meter : $stock->cost_per_m2;
|
||||
}
|
||||
@endphp
|
||||
|
||||
@if($item->type === 'wallpaper')
|
||||
Length: {{ $item->length }}m | Finish: {{ $stockText }}<br>
|
||||
<small>Stock Cost: R{{ number_format($stockCost, 2) }}/m</small>
|
||||
@if($item->is_sample)
|
||||
Sample - Fixed Price: R{{ number_format(\App\Services\ShippingService::getSampleCost(), 2) }}
|
||||
@elseif($item->type === 'wallpaper')
|
||||
Length: {{ $item->length }}m | Finish: {{ $stockText }}<br>
|
||||
<small>Stock Cost: R{{ number_format($stockCost, 2) }}/m</small>
|
||||
@elseif($item->type === 'mural')
|
||||
Dimensions: {{ $item->width }}m × {{ $item->height }}m ({{ number_format($item->width * $item->height, 2) }}m²) | Finish: {{ $stockText }}<br>
|
||||
<small>Stock Cost: R{{ number_format($stockCost, 2) }}/m²</small>
|
||||
Dimensions: {{ $item->width }}m × {{ $item->height }}m ({{ number_format($item->width * $item->height, 2) }}m²) | Finish: {{ $stockText }}<br>
|
||||
<small>Stock Cost: R{{ number_format($stockCost, 2) }}/m²</small>
|
||||
@else
|
||||
<small>Price: R{{ number_format($stockCost, 2) }} per unit</small>
|
||||
<small>Price: R{{ number_format($stockCost, 2) }} per unit</small>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="item-price">
|
||||
R{{ number_format(
|
||||
$item->quantity * (
|
||||
$item->type === 'wallpaper'
|
||||
? $stockCost * $item->length
|
||||
: ($item->type === 'mural'
|
||||
? $stockCost * $item->width * $item->height
|
||||
: $stockCost
|
||||
)
|
||||
),
|
||||
$item->is_sample
|
||||
? \App\Services\ShippingService::getSampleCost() * $item->quantity
|
||||
: $item->quantity * (
|
||||
$item->type === 'wallpaper'
|
||||
? $stockCost * $item->length
|
||||
: ($item->type === 'mural'
|
||||
? $stockCost * $item->width * $item->height
|
||||
: $stockCost
|
||||
)
|
||||
),
|
||||
2
|
||||
) }}
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="total-row" style="justify-content: space-between; border-top: 1px solid #eee; padding-top: 1rem; margin-top: 1rem; font-size: 0.95rem; color: #666;">
|
||||
<span>Subtotal:</span>
|
||||
<span>R{{ number_format($order->total, 2) }}</span>
|
||||
</div>
|
||||
@if($order->shipping_fee)
|
||||
<div class="total-row" style="justify-content: space-between; border-top: none; padding-top: 0.5rem; margin-top: 0; font-size: 0.95rem; color: #666;">
|
||||
<span>Shipping:</span>
|
||||
<span>R{{ number_format($order->shipping_fee, 2) }}</span>
|
||||
</div>
|
||||
@endif
|
||||
<div class="total-row">
|
||||
<span>Order Total:</span>
|
||||
<span>R{{ number_format($order->total, 2) }}</span>
|
||||
<span>R{{ number_format($order->total + ($order->shipping_fee ?? 0), 2) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card--pink">
|
||||
|
||||
Reference in New Issue
Block a user