commit before consolodating payment methods

This commit is contained in:
twotalesanimation
2025-12-30 10:40:45 +02:00
parent 3c24c0e9ef
commit a898c35a39
23 changed files with 673 additions and 2184 deletions
@@ -226,28 +226,34 @@
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<div class="item-details">
<h3><?php echo e($item['product']->name); ?></h3>
<h3><?php echo e($item['product']->name); ?><?php echo e($item['is_sample'] ? ' - Sample' : ''); ?></h3>
<p><?php echo e($item['product']->category->name); ?></p>
<?php
$stockCost = 0;
$stockUnit = $item['type'] === 'wallpaper' ? '/m' : '/m²';
if ($item['stock']) {
if (!$item['is_sample'] && $item['stock']) {
$stockCost = $item['type'] === 'wallpaper' ? $item['stock']->cost_per_meter : $item['stock']->cost_per_m2;
}
?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($item['stock']): ?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($item['is_sample']): ?>
<p style="font-size: 0.9rem; color: #666;">
Sample - Fixed Price: <span class="item-price">R<?php echo e(number_format(\App\Services\ShippingService::getSampleCost(), 2)); ?></span>
</p>
<?php elseif($item['stock']): ?>
<p style="font-size: 0.9rem; color: #666;">
<?php echo e($item['stock']->name); ?>: <span class="item-price">R<?php echo e(number_format($stockCost, 2)); ?><?php echo e($stockUnit); ?></span>
</p>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($item['type'] === 'wallpaper'): ?>
<p style="color: #666; font-size: 0.9rem;">Length: <?php echo e($item['length']); ?>m</p>
<?php elseif($item['type'] === 'mural'): ?>
<p style="color: #666; font-size: 0.9rem;">Dimensions: <?php echo e($item['width']); ?>m × <?php echo e($item['height']); ?>m (<?php echo e(number_format($item['width'] * $item['height'], 2)); ?>m²)</p>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(!$item['is_sample']): ?>
<?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if($item['type'] === 'wallpaper'): ?>
<p style="color: #666; font-size: 0.9rem;">Length: <?php echo e($item['length']); ?>m</p>
<?php elseif($item['type'] === 'mural'): ?>
<p style="color: #666; font-size: 0.9rem;">Dimensions: <?php echo e($item['width']); ?>m × <?php echo e($item['height']); ?>m (<?php echo e(number_format($item['width'] * $item['height'], 2)); ?>m²)</p>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
<p style="color: var(--primary-color); font-weight: 600;">Subtotal: R<?php echo e(number_format($item['subtotal'], 2)); ?></p>
@@ -279,20 +285,14 @@
<span>Subtotal:</span>
<span>R<?php echo e(number_format($total, 2)); ?></span>
</div>
<div class="summary-row">
<span>Shipping:</span>
<span>Free</span>
</div>
<div class="summary-row">
<span>Tax:</span>
<span>TBD</span>
<span><?php echo e($shippingLabel); ?>:</span>
<span>R <?php echo e(number_format($shippingFee, 2)); ?></span>
</div>
<div class="summary-row total">
<span>Total:</span>
<span>R <?php echo e(number_format($total, 2)); ?></span>
<span>R <?php echo e(number_format($total + $shippingFee, 2)); ?></span>
</div>
<div class="summary-actions">