@extends('layouts.master') @section('css') @include('admin.stock-items.create-modal-css') @endsection @section('title') Purchase @endsection @section('content') @method('put') @csrf Edit Purchase @if ($nextVoucherId != null) Next @endif @if ($previousVoucherId != null) Previous @endif Voucher Number @if (str_contains($accountingVoucher->voucher_number, '-')) @php $explode = explode('-', $accountingVoucher->voucher_number); $voucherNumber = end($explode); $prefix = array_pop($explode); $prefix = implode('-', $explode); @endphp {{ $prefix }} @else @endif Voucher Type Select voucher type Voucher Date Purchase Ledger (Dr) Select ledger Party (Cr) Select ledger @if ($accountingVoucher->credit_ledger_id != null) {{ $accountingVoucher->creditLedger->name }} @endif Tax Type IntraState InterState (IGST) Stock Location Choose stock location Supplier Invoice No Supplier Invoice Date Supplier Invoice Amount Cost Center Select Cost Center @foreach ($costCenters as $costCenter) cost_center_id == $costCenter->id ? 'selected' : '') : '' }}> {{ $costCenter->name }} @endforeach Remarks {{ $accountingVoucher->remarks }} Without GST without_gst == 1 ? 'checked' : '' }} onchange="toggleGst()"> Report Go Back Purchase Price(Excl Tax) Purchase Price(Incl Tax) Gst (%) Cess (%) Add Items SN Item Stock MRP Qty Unit Price Gross Value Disc% Disc Amt Ad.Disc% Rebate Ad.Cost LC LC Inc Gst Pre.LC Price Slab Total @if (count($accountingVoucherItems) > 0) @php $tabIndex = 0; @endphp @foreach ($accountingVoucherItems as $key => $accountingVoucherItem) @php $key = $key + 1; @endphp {{ $key }} Select item {{ $accountingVoucherItem->stockItem->name }} --- @foreach ($accountingVoucherItem->units as $unit) unit_id == $unit->id ? 'selected' : '' }}> {{ $unit->symbol }} @endforeach {{-- unit_id == $accountingVoucherItem->unit->id ? 'selected' : '' }}> {{ $accountingVoucherItem->unit->symbol }} --}} @php $priceSlab = \App\Models\StockItemPriceSlab::where( 'business_key', Auth::user()->business_key, ) ->where( 'stock_item_id', $accountingVoucherItem->stock_item_id, ) ->where('unit_id', $accountingVoucherItem->unit_id) ->first(); if ($priceSlab) { $totalTax = ($accountingVoucherItem->stockItem->getGst( $accountingVoucher->voucher_date, ) + $accountingVoucherItem->stockItem->getCess( $accountingVoucher->voucher_date, )) / 100; $priceSlabPrice = round( $priceSlab->selling_price + $priceSlab->selling_price * $totalTax, 3, ); } else { $priceSlabPrice = 0; } @endphp @php $tabIndex += 8; @endphp @endforeach @endif {{ $accountingVoucherItems->sum('total') }} TCS : tcs > 0.0 ? 'checked' : '' }} id="tcs"> {{ $accountingVoucher->tcs }} Discount : Additional Discount : @if (Auth::user()->company_profile->show_freight) Freight/Etc : @endif Select Ledger @if ($accountingVoucher->additional_journal_voucher_ledger_id != null) {{ $accountingVoucher->additionalJournalVoucherLedger->name }} @endif @isset($accountingVoucher) @foreach ($accountingVoucher->accountingVoucherLedgers as $accountingVoucherLedger) Select Ledger {{ $accountingVoucherLedger->ledger->name }} amount }}> dr_or_cr == 'Dr' ? 'selected' : '' }}> Dr dr_or_cr == 'Cr' ? 'selected' : '' }}> Cr @endforeach @endisset Add Round Off : {{ $accountingVoucher->round_off }} Grand Total : {{ $accountingVoucher->amount }} Add Submit * Stock is based on the base unit of the item {{-- Modal --}}