@extends('layouts.app') @section('title', 'Edit Sale') @section('content')

Edit Sale

Update sale information and sold products

← Back
{{-- Errors --}} @if($errors->any())
Please fix the following errors:
@endif {{-- Info --}}
Sale: {{ $sale->sale_no }}
Fields marked with * are mandatory.
{{-- ========================================================= --}} {{-- SALE INFORMATION --}} {{-- ========================================================= --}}
Sale Information
{{-- Customer Name --}}
{{-- Customer Phone --}}
{{-- Sale Date --}}
{{-- Invoice Number --}}
{{-- Payment Status --}}
{{-- Notes --}}
{{-- ========================================================= --}} {{-- PRODUCTS --}} {{-- ========================================================= --}}
@csrf @method('PUT')
Products
@foreach($sale->items as $index => $item) @php $product = $item->product; $currentStock = (float) ($product->current_stock ?? $product->opening_stock ?? 0); /* | Original sold quantity ko current stock me temporarily | add kar rahe hain, taki same sale ki existing quantity | ko edit karte waqt invalid na maana jaye. */ $availableStock = $currentStock + (float) $item->qty; @endphp @endforeach {{-- Fallback if somehow sale has no items --}} @if($sale->items->count() === 0) @endif
Product Stock Qty MRP Selling GST % Tax Total Action
qty) }}" required > mrp) }}" > selling_price) }}" required > gst_rate) }}" >
{{-- ========================================================= --}} {{-- SALE SUMMARY --}} {{-- ========================================================= --}}
Sale Summary
{{-- Subtotal --}}
Subtotal 0.00
{{-- Discount --}}
{{-- GST --}}
GST Total 0.00

{{-- Grand Total --}}
Grand Total
0.00
@push('scripts') @endpush @endsection