@php $logo = \App\Models\Utility::get_file('uploads/logo'); $company_logo = \App\Models\Utility::GetLogo(); $creatorId = \Auth::user()->creatorId(); $setting = DB::table('settings')->where('created_by', $creatorId)->pluck('value', 'name')->toArray(); $settings_data = isset($ewaybill) ? \App\Models\Utility::settingsById($ewaybill->created_by) : \App\Models\Utility::settingsById($creatorId); $company_state = strtolower(trim($settings_data['company_state'] ?? 'defaultstate')); $billing_state = isset($customer) ? strtolower(trim($customer->billing_state ?? '')) : ''; @endphp @extends('layouts.admin') @section('page-title') {{__('EWayBill Edit')}} @endsection @section('breadcrumb')
| {{__('Items')}} |
{{__('Quantity')}} |
{{__('Price')}} |
{{__('Discount')}} |
{{__('Tax')}} (%) | {{__('Amount')}} {{__('after tax & discount')}} |
|
|---|---|---|---|---|---|---|
| {{ Form::select('item', $product_services, null, array('class' => 'form-control select item', 'data-url' => route('ewaybill.product'))) }} |
{{ Form::number('quantity', null, array('class' => 'form-control quantity', 'required' => 'required', 'placeholder' => __('Qty'))) }}
|
{{ Form::number('price', null, array('class' => 'form-control price', 'required' => 'required', 'placeholder' => __('Price'))) }}
{{\Auth::user()->currencySymbol()}}
|
{{ Form::number('discount', null, array('class' => 'form-control discount', 'required' => 'required', 'placeholder' => __('Discount'))) }}
{{\Auth::user()->currencySymbol()}}
|
{{-- Hidden fields for JS --}}
{{-- Tax Badge --}}
@php
$taxType = strtolower(Utility::getValByName('tax_type') ?? 'gst');
$vatRate = isset($billItem) ? ($billItem->itemTaxRate ?? 0) : 0;
$gstRate = isset($billItem) ? ($billItem->itemTaxRate ?? 0) : 0;
@endphp
@if($taxType === 'vat')
VAT ({{ number_format($vatRate, 2) }}%)
@else
CGST ({{ number_format($gstRate / 2, 2) }}%)
SGST ({{ number_format($gstRate / 2, 2) }}%)
@endif
{{-- Hidden form inputs for tax calculations --}}
{{ Form::hidden('tax', '', ['class' => 'form-control tax']) }}
{{ Form::hidden('itemTaxPrice', '', ['class' => 'form-control itemTaxPrice']) }}
{{ Form::hidden('itemTaxRate', $vatRate ?: $gstRate, ['class' => 'form-control itemTaxRate']) }}
|
0.00 | |
|
{{ Form::textarea('description', null, array('class' => 'form-control pro_description', 'rows' => '2', 'placeholder' => __('Description'))) }}
|
||||||
| {{__('Sub Total')}} ({{\Auth::user()->currencySymbol()}}) | 0.00 | |||||
| {{__('Discount')}} ({{\Auth::user()->currencySymbol()}}) | 0.00 | |||||
| {{__('Tax')}} ({{\Auth::user()->currencySymbol()}}) | 0.00 | |||||
| {{__('Total Amount')}} ({{\Auth::user()->currencySymbol()}}) | 0.00 | |||||