@extends('layouts.master') @section('css') @endsection @section('title') Delivery Note @endsection @section('content') @isset($accountingVoucher) @method('put') @else @endisset @csrf @isset($accountingVoucher) Edit Delivery Note @else Add Delivery Note @endisset Voucher Type Select voucher type Voucher Number @isset($accountingVoucher) @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 @else @if ($voucherType->prefix != null) {{ $voucherType->prefix }} @else @endif @endisset Voucher Date Party (Dr) Select ledger @isset($accountingVoucher) {{ $accountingVoucher->debitLedger->name }} @endisset Sales Ledger (Cr) Select ledger Tax Type @isset($accountingVoucher) IntraState InterState (IGST) @else IntraState InterState (IGST) @endisset Stock Location Choose stock location @if ($companyProfile->show_cost_center == 1) Cost Center Select Cost Center @foreach ($costCenters as $costCenter) cost_center_id == $costCenter->id ? 'selected' : '') : '' }}> {{ $costCenter->name }} @endforeach @endif Remarks {{ isset($accountingVoucher) ? $accountingVoucher->remarks : '' }} @if ($companyProfile->show_shipping_address == 1) Ship To Address {{ isset($accountingVoucher) ? $accountingVoucher->ship_to_address : '' }} @endif @if ($companyProfile->show_date_of_supply) Date of Supply @endif @if ($companyProfile->show_vehicle_number) Vehicle Number vehicle_no_mandatory) required @endif> @endif Stock Inward/Outwards delivery_note_inward == 0 ? 'selected' : '') : '' }}> Stock Outward delivery_note_inward == 1 ? 'selected' : '') : '' }}> Stock Inward Report Go Back Add Items SN Item {{-- Batch Expiry Scheme --}} Stock MRP Qty Unit @if (Auth::user()->company_profile->show_foc == 1) Foc @endif Price Price(Inc GST) Gross Value Disc% Taxable Value Tax Total Remarks @isset($accountingVoucherItems) @php $tabIndex = 0; @endphp @if (count($accountingVoucherItems) > 0) @foreach ($accountingVoucherItems as $key => $accountingVoucherItem) @php $key = $key + 1; @endphp {{ $key }} Select item {{ $accountingVoucherItem->stockItem->name }} batch_id != null) style="background-color: #6dc78e" @endif> --- batch_id != null) @php $lastInward = App\Models\StockLedger::where([ 'business_key' => Auth::user()->business_key, 'stock_item_id' => $accountingVoucherItem->stock_item_id, 'batch_id' => $accountingVoucherItem->batch_id, ]) ->where(function ($query) { $query->where('batch_mrp', '!=', null); }) ->orderBy('date', 'desc') ->first(); @endphp @if ($lastInward) value="{{ $lastInward->batch_mrp }}" @else value="{{ $accountingVoucherItem->stockItem->mrp }}" @endif @else value="{{ $accountingVoucherItem->stockItem->mrp }}" @endif id="mrp_{{ $key }}" readonly class="form-control min-width60 form-input-box"> @foreach ($accountingVoucherItem->units as $unit) unit_id == $unit->id ? 'selected' : '' }}> {{ $unit->symbol }} @endforeach @if (Auth::user()->company_profile->show_foc == 1) @php $focqty = \App\models\AccountingVoucherItem::where( 'foc_id', $accountingVoucherItem->id, ) ->where( 'stock_item_id', $accountingVoucherItem->stock_item_id, ) ->where( 'unit_id', $accountingVoucherItem->unit_id, ) ->first(); $focqty = $focqty ? $focqty->quantity : ''; @endphp @endif @php $totalTax = $accountingVoucherItem->cgst + $accountingVoucherItem->sgst + $accountingVoucherItem->igst + $accountingVoucherItem->cess; @endphp {{ $accountingVoucherItem->remarks ?? '' }} @php $tabIndex = $tabIndex + 8; @endphp @endforeach @endif @endisset {{-- --}} @if (Auth::user()->company_profile->show_foc == 1) @endif {{ isset($accountingVoucherItems) ? $accountingVoucherItems->sum('total') : '0.00' }} Discount : Freight/Etc : Add @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 Round Off : {{ isset($accountingVoucher) ? $accountingVoucher->round_off : '0.00' }} Grand Total : {{ isset($accountingVoucher) ? $accountingVoucher->amount : '0.00' }} Add Submit * Stock is based on the base unit of the item {{-- Print Modal --}}