{{ Form::hidden('medicine_bill', isset($medicineBill) ? $medicineBill->id : null, ['id' => 'medicineBillId']) }} {{ Form::hidden('medicine_bill_status', isset($medicineBill) ? $medicineBill->payment_status : null, ['id' => 'medicineBillStatus']) }}
{{ Form::label('patient_id', __('messages.prescription.patient') . ':', ['class' => 'form-label']) }} {{ Form::select('patient_id', $patients, isset($medicineBill) ? $medicineBill->patient_id : null, ['class' => 'form-select', 'required', 'id' => 'prescriptionPatientId', 'placeholder' => __('messages.document.select_patient')]) }}
@if (isset($medicineBill))
{{ Form::label('bill_date', __('messages.bill.bill_date') . ':', ['class' => 'form-label']) }} {{ Form::text('bill_date', isset($medicineBill->bill_date) ? $medicineBill->bill_date : $medicineBill->updated_at , ['class' => getLoggedInUser()->thememode ? 'bg-light form-control edit_medicine_bill_date' : 'bg-white form-control edit_medicine_bill_date', 'id' => 'editBillDate', 'autocomplete' => 'off']) }}
@else
{{ Form::label('bill_date', __('messages.bill.bill_date') . ':', ['class' => 'form-label']) }} {{ Form::text('bill_date', null, ['class' => getLoggedInUser()->thememode ? 'bg-light form-control medicine_bill_date' : 'bg-white form-control medicine_bill_date', 'id' => 'medicine_bill_date', 'autocomplete' => 'off']) }}
@endif
{{ __('messages.medicine_bills.payment_status') . ' :' }}
{{-- --}} {{-- --}} @if ( !(isset($medicineBill))||(isset($medicineBill) && $medicineBill->payment_status != 1)) @endif @if (isset($medicineBill)) @foreach ($medicineBill->saleMedicine as $key => $saleMedicine) {{ Form::hidden('quantity1[]', $saleMedicine->sale_quantity, ['class' => 'previous-quantity', 'id' => 'previous-sale-qty' . $key + 1]) }} @endforeach @else @endif
{{ __('messages.medicine_categories') }} {{ __('messages.medicines') }}{{ __('lot no.') }}{{ __('messages.purchase_medicine.expiry_date') }} {{ __('messages.medicine_bills.sale_price') }}{{ __('Purchase Price') }}{{ __('messages.service.quantity') }} {{ __('messages.purchase_medicine.tax') }} {{ __('messages.bill.amount') }} {{ __('messages.common.add') }}
{{ Form::select('category_id[]', $medicineCategories, isset($saleMedicine->medicine->category->id) ? $saleMedicine->medicine->category->id : null , ['class' => 'form-select select2Selector medicineBillCategoriesId', 'required', 'placeholder' => __('messages.medicine.select_category'), 'data-id' => '1', 'data-control' => 'select2']) }} {{ Form::select('medicine[]', $medicines['medicines'], isset($saleMedicine->medicine->id) ? $saleMedicine->medicine->id:null, ['class' => 'form-select medicinePurchaseId purchaseMedicineId', 'placeholder' => __('messages.medicine_bills.select_medicine'), 'id' => 'medicineChooseId1', 'data-control' => 'select2', 'data-id' => 1, 'required']) }} {{ Form::text('expiry_date[]', null, ['class' => 'form-control medicineBillExpiryDate', 'id' => 'expiry_date1', 'placeholder' => __('messages.purchase_medicine.expiry_date')]) }} {{ Form::text('sale_price[]', number_format($saleMedicine->sale_price,2,'.',''), ['class' => 'form-control medicineBill-sale-price price-format ', 'id' => 'medicine_sale_price' . $key + 1, 'required']) }}
{{ Form::number('quantity[]', $saleMedicine->sale_quantity, ['class' => 'form-control medicineBill-quantity', 'id' => 'quantity' . $key + 1, 'required']) }} {{ __($saleMedicine->medicine->available_quantity) }}
{{ Form::number('tax_medicine[]', $saleMedicine->tax, ['class' => 'form-control medicineBill-tax','id' => 'tax' . $key + 1]) }} {{ __('%') }}
{{ Form::text('amount[]', number_format($saleMedicine->sale_quantity * $saleMedicine->sale_price,2,'.',''), ['class' => 'form-control medicine-bill-amount price-format', 'readonly', 'id' => 'amount' . $key + 1]) }}
{{ Form::select('category_id[]', $medicineCategories, null, ['class' => 'form-select medicineBillCategoriesId select2Selector','required','placeholder'=>'Select Category', 'data-id' => 1]) }} {{ Form::select('medicine[]', [], null,['class' => 'form-select medicinePurchaseId purchaseMedicineId','placeholder'=>'Select Medicine','id'=>'c1','data-control'=>'select2','data-id'=>1,'required']) }} {{ Form::text('expiry_date[]', null, ['class' => 'form-control medicineBillExpiryDate', 'id' => 'expiry_date1', 'placeholder' => __('messages.purchase_medicine.expiry_date')]) }} {{ Form::text('sale_price[]', '0.00', ['class' => 'form-control medicineBill-sale-price price-format', 'required', 'id' => 'medicine_sale_price1']) }}
{{ Form::number('quantity[]', 0, ['class' => 'form-control medicineBill-quantity', 'id' => 'quantity1', 'required']) }} {{ __('0') }}
{{ Form::number('tax_medicine[]', 0, ['class' => 'form-control medicineBill-tax', 'id' => 'tax1']) }} {{ __('%') }}
{{ Form::text('amount[]', '0.00', ['class' => 'form-control medicine-bill-amount price-format', 'readonly', 'id' => 'amount1']) }}
{{ Form::textarea('note', null, ['class' => 'form-control', 'rows' => 2, 'Note']) }}
{{ Form::text('total', isset($medicineBill) ? number_format($medicineBill->total,2,'.','') : '0.00', ['class' => 'form-control required price-format', 'readonly', 'id' => 'total']) }}
{{ Form::text('discount', isset($medicineBill) ? number_format($medicineBill->discount,2,'.','') : '0.00', ['class' => 'form-control medicineBill-discount required price-format', 'id' => 'discountAmount']) }}
{{ Form::number('tax', isset($medicineBill) ? number_format($medicineBill->tax_amount,2,'.','') : '0.00', ['class' => 'form-control', 'id' => 'medicineTotalTaxId', 'readonly', 'value' => '0.00']) }} {{-- {{ __('$') }} --}}
{{ Form::text('net_amount', isset($medicineBill) ? number_format($medicineBill->net_amount,2,'.','') : '0.00', ['class' => 'form-control required price-format', 'id' => 'netAmount', 'readonly']) }}
{{ Form::select('payment_type', App\Models\PurchaseMedicine::PAYMENT_METHOD, null, ['class' => 'form-select medicine-payment-mode', 'placeholder' => __('messages.subscription_plans.payment_type'), 'id' => 'paymentMode', 'required']) }}
{{ Form::textarea('payment_note', null, ['class' => 'form-control', 'placeholder' => __('messages.purchase_medicine.payment_note'), 'rows' => 3]) }}
{!! Form::submit(__('messages.common.save'), ['class' => 'btn btn-primary me-2', 'saveBtnPurchaseMedicne']) !!} {!! __('messages.common.cancel') !!}