<?php $__env->startSection('content'); ?>
<div class="container">
    <h2 class="mb-4">Car Sale Invoice</h2>

    <div class="card mb-4">
        <div class="card-header bg-primary text-white">
            Seller Information
        </div>
        <div class="card-body">
            <p><strong>Name:</strong> <?php echo e($sale->seller_name); ?></p>
            <p><strong>CNIC:</strong> <?php echo e($sale->seller_cnic); ?></p>
            <p><strong>Phone:</strong> <?php echo e($sale->seller_phone); ?></p>
            <p><strong>Address:</strong> <?php echo e($sale->seller_address); ?></p>
        </div>
    </div>

    <div class="card mb-4">
        <div class="card-header bg-success text-white">
            Buyer Information
        </div>
        <div class="card-body">
            <p><strong>Name:</strong> <?php echo e($sale->buyer_name); ?></p>
            <p><strong>CNIC:</strong> <?php echo e($sale->buyer_cnic); ?></p>
            <p><strong>Phone:</strong> <?php echo e($sale->buyer_phone); ?></p>
            <p><strong>Address:</strong> <?php echo e($sale->buyer_address); ?></p>
        </div>
    </div>

    <div class="card mb-4">
    <div class="card-header bg-info text-white">
        Payment Information
    </div>
    <div class="card-body">
        <p><strong>Car ID:</strong> <?php echo e($sale->car_id); ?></p>
        <p><strong>Registration No:</strong> <?php echo e($sale->registration_no); ?></p>
        <p><strong>Make:</strong> <?php echo e($sale->make); ?></p>
        <p><strong>Model:</strong> <?php echo e($sale->model); ?></p>
        <p><strong>Chassis No:</strong> <?php echo e($sale->chassis_no); ?></p>
        <p><strong>Engine No:</strong> <?php echo e($sale->engine_no); ?></p>
        <p><strong>Registered City:</strong> <?php echo e($sale->registered_city); ?></p>
        <p><strong>Transmission:</strong> <?php echo e($sale->transmission); ?></p>
        <p><strong>Color:</strong> <?php echo e($sale->color); ?></p>
        <p><strong>Sale Date:</strong> <?php echo e(\Carbon\Carbon::parse($sale->date)->format('d-m-Y')); ?></p> <!-- New line -->
        <hr>
        <p><strong>Purchase Price:</strong> <?php echo e(number_format($sale->purchase_price)); ?></p>

        <p><strong>Sold Price:</strong> <?php echo e(number_format($sale->soled_price)); ?></p>
        <p><strong>Received Amount:</strong> <?php echo e(number_format($sale->received_amount)); ?></p>
        <p><strong>Remaining Payment:</strong> <?php echo e(number_format($sale->soled_price - $sale->received_amount)); ?></p>

        <p><strong>Profit:</strong> <?php echo e(number_format($sale->soled_price - $sale->purchase_price)); ?></p>



    </div>
</div>


    <a href="<?php echo e(route('car.sales')); ?>" class="btn btn-secondary">Back to Sales List</a>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /Applications/XAMPP/xamppfiles/htdocs/laravel-app1/resources/views/car_sales/show.blade.php ENDPATH**/ ?>