@extends('layouts.app') @section('content') @include("layouts.Cmodal") @include("invoices.modal")
  @if($duplicate) @lang('layout.CreateNewInvoice') @else @lang('layout.EditInvoice') @endif
@if($paid_stamp!='') @endif
@if($duplicate) {{Form::model($invoice,['route' => ['invoice.store',$invoice->id],'method' => 'post','class' => 'form-horizontal','id'=>'sales-form','files'=> true])}} @else {{Form::model($invoice,['route' => ['invoice.update',$invoice->id],'method' => 'PATCH','class' => 'form-horizontal','id'=>'sales-form','files'=> true])}} @endif {{ csrf_field() }}
{{-- --}} @if(getCustomeForm('invoice','itemSearch')) @if(systemConfig()[23] == 1)

@lang('layout.OnHand'):@{{(selected_itemes)?(Number.parseFloat(selected_itemes.on_hand * selected_itemes.measure_unit / selected_itemes.measure.measure_unit).toFixed(2)):''}} @{{(selected_itemes)?selected_itemes.measure.measure_name:''}}

@{{(selected_itemes && selected_iventory_site)?(Number.parseFloat(selected_iventory_site.OnHand * selected_itemes.measure_unit / selected_itemes.measure.measure_unit).toFixed(2)):''}}

@lang('layout.Quantity')

@lang('layout.ByAdvancePricing') : @{{ AdvancePrice }}

@if(systemConfig()[30] == 1)

@lang('layout.Price') : @{{(selected_itemes==null)?null:Number.parseFloat((AdvancePrice_cost * selected_itemes.measure.measure_unit / selected_itemes.measure_unit) * selected_currency.static_rate / selected_currency.rate).toFixed(precision())}} @{{selected_currency.symbol}}

@else

@lang('layout.Price') : @{{(selected_itemes==null)?null:Number.parseFloat((AdvancePrice_cost * selected_itemes.measure.measure_unit / selected_itemes.measure_unit) * selected_currency.rate).toFixed(precision())}} @{{selected_currency.symbol}}

@endif
@if(systemConfig()[30] == 1)

@lang('layout.CostInInventory'): @{{(selected_itemes==null)?null:Number.parseFloat((selected_itemes.LasCost * selected_itemes.measure.measure_unit / selected_itemes.measure_unit) * selected_currency.static_rate / selected_currency.rate).toFixed(precision())}} @{{selected_currency.symbol}}

@else

@lang('layout.CostInInventory'): @{{(selected_itemes==null)?null:Number.parseFloat((selected_itemes.LasCost * selected_itemes.measure.measure_unit / selected_itemes.measure_unit) * selected_currency.rate).toFixed(precision())}} @{{selected_currency.symbol}}

@endif
@lang('layout.Total'): @{{(selected_itemes==null)?null:Number.parseFloat(selected_quantity * selected_price).toFixed(precision())}} @{{selected_currency.symbol}}
@endif @endif
@if(getSaleTaxation() == 'true') @endif @if(SendMoneyInSale() == 'true') @endif
@lang('layout.Total') : @{{ format_number(Number.parseFloat(((subtotal - (discount*(newSubTotal - newSubDiscountFiledRow)/100) - discountFiledRow) - saleTaxation)-payeds - total_return - sendMoneyAmount))}} @{{selected_currency.symbol}}
@lang('layout.Discount'): (@{{ Number.parseFloat(discount).toFixed(precision()) }}%) @{{ format_number(Number.parseFloat(discount*(newSubTotal - newSubDiscountFiledRow)/100)+Number.parseFloat(discountFiledRow)) }} @{{selected_currency.symbol}} @lang('layout.Payment'): @{{ payeds.toFixed(precision())}} @{{selected_currency.symbol}}
@lang('menu.Taxation'): (@{{ format_number(Number.parseFloat(sale_taxation)) }}%) @{{ format_number(Number.parseFloat(saleTaxation)) }} @{{selected_currency.symbol}} @lang('layout.Leakage'): @{{ format_number(Number(total_return))}} @{{selected_currency.symbol}}
@lang('layout.SendMoney'): @{{ format_number(Number(sendMoneyAmount))}} @{{selected_currency.symbol}}
@lang('layout.GrandTotal'): @{{ subtotal.toFixed(precision())}} @{{selected_currency.symbol}}
@if(getTaxation() =="true")
@lang('layout.Total') @lang('layout.Tax') : @{{ myRound(totalTax)}} @{{selected_currency.symbol}} @lang('layout.Sub-Total'): @{{ format_number(Number(checkedSubtotal))}} @{{selected_currency.symbol}}
@endif @if(getSaleCommission() =="true")
@lang('layout.Total') @lang('layout.Commission') : @{{ myRound(Number.parseFloat(totalCommi) + Number.parseFloat(sum_commission))}} @{{selected_currency.symbol}} @lang('layout.Sub-Total'): @{{ format_number(Number(checkedSubtotal))}} @{{selected_currency.symbol}}
@endif @if(getSubTotal() == 'true')
@lang('layout.Sub-Total')
@{{ format_number(Number(sub_Subtotal))}} @{{selected_currency.symbol}}
@lang('layout.Discount'): (@{{ format_number(Number.parseFloat(discount)) }}%)
@lang('layout.Total')
@{{ format_number(Number.parseFloat((sub_Subtotal - (sub_discount*(sub_Subtotal - subDiscountFiledRow)/100) - subDiscountFiledRow) - saleTaxation))}} @{{selected_currency.symbol}}
@endif
@lang('layout.Currency') @lang('layout.Payable') @lang('layout.Receivable') @lang('layout.AverageRate')
@{{ summ.currency }} @{{ member_format_number(Number(summ.payment)) }} @{{member_format_number(Number(summ.invoice)) }} @{{member_format_number(Number(summ.rate))}}
@if(systemConfig()[23] == 1) @if(getTaxation() =="true") @endif @if(getSaleCommission()=="true") @endif @if(getSaleByOtherMeasure() == "true") @endif @if(searchByCodeLocation()=="true") @endif @if(getSerailNumber() =="true") @endif @if(getSerialNumberTimes() >= 1 && getSerialNumberTimes() <= 9) @endif @if(getSerialNumberTimes() >= 2 && getSerialNumberTimes() <= 9) @endif @if(getSerialNumberTimes() >= 3 && getSerialNumberTimes() <= 9) @endif @if(getCounterForEachRow() == "true") @endif @if(getShowCBM()=="true") @endif @if(getShowCBM()=="true") @endif @if(searchByCodeLocation()=="true") @if(getExpireDate()=="true") @endif @endif @if(itemPicture()=="true") @endif @if(getShwoPriceLevel()=="per_item") @endif @if(getShwoPriceLevel()=="general_percent_per_item") @endif @if(getSaleCodePricePercentage() == 'true') @endif @if(QuantityBySecondMeasure()=="true") @endif @if(getM2()!="") @if(getFactorMeasure2()=="true") @if(getMeasureTwoAndThree()=="true") @endif @endif @endif @if(QuantityBySecondMeasure()=="true") @endif @if(getSaleSubMeasure()=="true") @endif @if(getM3()!="" && getSaleSubMeasure()!="true") @if(getFactorMeasure3()=="true") @if(getMeasureTwoAndThree()=="true") @endif @endif @endif @if(getM4()!="") @if(getFactorMeasure4()=="true") @endif @endif @if(getSaleCommission()=="true") @endif @if(getTaxation()=="true") @endif @if(getSubTotal() =="true") @endif @if(getTaxation() =="true") @endif @if(getSaleCommission() =="true") @endif @if(getSaleByOtherMeasure() == "true") @endif @if(searchByCodeLocation()=="true") @endif @if(getSerailNumber() =="true") @endif @if(getSerialNumberTimes() >= 1 && getSerialNumberTimes() <= 9) @endif @if(getSerialNumberTimes() >= 2 && getSerialNumberTimes() <= 9) @endif @if(getSerialNumberTimes() >= 3 && getSerialNumberTimes() <= 9) @endif @if(getCounterForEachRow() == "true") @endif @if(getShowCBM()=="true") @endif @if(getShowCBM()=="true") @endif @if(searchByCodeLocation()=="true") @if(getExpireDate()=="true") @endif @endif @if(itemPicture()=="true") @endif @if(systemConfig()[30] == 1) @else @endif @if(systemConfig()[30] == 1) @else @endif @if(getShwoPriceLevel()=="per_item") @endif @if(getShwoPriceLevel()=="general_percent_per_item") @endif @if(getSaleCodePricePercentage() == 'true') @endif @if(QuantityBySecondMeasure()=="true") @endif @if(getM2()!="" && getSaleSubMeasure()!="true") @if(getFactorMeasure2()=="true") @if(getMeasureTwoAndThree()=="true") @endif @if(getMeasureTwoAndThree()=="true" || QuantityBySecondMeasure()=="true") @else @endif @if(QuantityBySecondMeasure()=="true") @endif @endif @endif @if(getM3()!="") @if(getFactorMeasure3()=="true") @if(getMeasureTwoAndThree()=="true") @endif @endif @endif @if(getSaleSubMeasure() =="true") @endif @if(getM4()!="") @if(getFactorMeasure4()=="true") @endif @endif @if(getSaleCommission()=="true") @endif @if(getTaxation()=="true") @endif @if(getSubTotal() =="true") @endif
# @lang('layout.Edit')@lang('layout.Tax')@lang('layout.Commission')@lang('layout.PerQty')@lang('layout.Category') @lang('layout.Brand') @lang('layout.ItemName') @lang('layout.Location')@lang('layout.SerialNum') @lang('layout.SerialNumber2') @lang('layout.SerialNumber3') @lang('layout.SerialNum') @lang('layout.SiteName') @lang('layout.Description') @lang('layout.Description') :2 @lang('layout.Quantity') @lang('layout.OnHand') @lang('menu.GasStation') @lang('layout.OldCounter') @lang('layout.NewCounter') @lang('layout.OMeasureValue1') @lang('layout.PerQty') @lang('layout.OMeasureValue2') @lang('layout.CBM') @lang('layout.ExpireDate')@lang('layout.Measure') @lang('layout.Photo') @lang('layout.CostInInventory') @lang('layout.OilCostInInventory') @lang('layout.Density') @lang('layout.OilQuantity') @lang('layout.Measure') @lang('layout.PriceLevel') @lang('layout.PriceLevel') @lang('layout.Percentage')%@lang('layout.NewPrice') @lang('layout.ChangeMeasureTwo') @lang('layout.ChangeMeasureTwo') @lang('layout.Measure2') @lang('layout.OnHand') @lang('layout.EquivalentTo') @lang('layout.SubPrice') @lang('layout.ChangeMeasureThree') @lang('layout.Measure3') @lang('layout.Measure4') @lang('layout.Commission') @lang('layout.Amount') @lang('layout.Commission') @lang('layout.Percentage')%@lang('layout.Tax') @lang('layout.Percentage')%@lang('layout.Discount') @lang('layout.Discount') 2 @lang('layout.Total') @lang('layout.Subtotal')
@{{index+1}}
@{{(!item.item)?null:item.item.number}} @{{(!item.item)?null:item.item.number1}} @{{(!item.item)?null:item.item.number2}} @{{(!item.item)?null:item.item.number3}} @{{myRound((item.item==null)?null:saleItemQuantity(item.item,item.item.quantity,0))}}
@if(getCalQuantityOfOtherMeasure() == 'avgMethod') @if(getSelectQuantityByOtherMSPurch()=="true" && oilSale()=="true") @{{myRound((item.item==null)?null:((item.item.site==null)?null:(item.item.site.OnHand * item.item.site.per_qty)))}} @else @{{myRound((item.item==null)?null:((item.item.site==null)?null:(item.item.site.OnHand / item.item.site.per_qty)))}} @endif @elseif(getCalQuantityOfOtherMeasure() == 'simpleMethod') @{{myRound((item.item==null)?null:((item.item.site==null)?null:item.item.site.other_measure))}} @else @{{(item.item==null)?null:item.item.o_measure_v}} @endif
@{{myRound((item.item==null)?null:((item.item.site==null)?null:item.item.site.per_qty))}}
@if(getCalQuantityOfOtherMeasure() == 'avgMethod') @{{myRound((item.item==null)?null:((item.item.site==null)?null:(item.item.site.OnHand / item.item.site.per_qty2)))}} @elseif(getCalQuantityOfOtherMeasure() == 'simpleMethod') @{{myRound((item.item==null)?null:((item.item.site==null)?null:item.item.site.other_measure2))}} @else @{{(item.item==null)?null:item.item.o_measure_v1}} @endif
@{{myRound((item.item==null)?null:((item.item.site==null)?null:item.item.site.cbm))}} @{{(item.item==null)?null:((item.item.site==null)?null:item.item.selectItemExpireDate)}} @{{(item.item==null)? 0:myRound((item.item.LasCost * item.item.measure.measure_unit / item.item.measure_unit) *selected_currency.static_rate / selected_currency.rate)}} @{{selected_currency.symbol}} @{{(item.item==null)? 0:myRound((item.item.LasCost * item.item.measure.measure_unit / item.item.measure_unit) *selected_currency.rate)}} @{{selected_currency.symbol}} @{{(item.item==null)?null:((item.item.density)?myRound(((item.item.LasCost * item.item.measure.measure_unit / item.item.measure_unit) * item.item.density) * selected_currency.static_rate / selected_currency.rate):null)}} @{{(item.item==null)?null:((item.item.density)?myRound(((item.item.LasCost * item.item.measure.measure_unit / item.item.measure_unit) * item.item.density) * selected_currency.rate):null)}}
@if(getSaleAmountSecondMeasure()=="true") @{{myRound((item.item==null)?null:secoundMeasurQuantity(item.item,item.item.quantity))}} @endif
@{{myRound((item.item==null)?null:saleItemQuantitySecond(item.item,item.item.quantity_by_second_measure))}} @{{myRound((item.item==null)?null:subMQuantity(item.item,item.item.quantity))}}
@{{selected_currency.symbol}}
@{{selected_currency.symbol}} %
@{{selected_currency.symbol}} %
{{-- @{{(item.item==null)? 0:getItemTotal(item.item,selected_currency.rate,discountIsAmount,item.item.discount,1,per_qty_check).result}} @{{selected_currency.symbol}} --}} {{-- @{{(item.item==null)? 0:getItemTotalOil(item.item,selected_currency.rate,discountIsAmount,item.item.discount).result}} @{{selected_currency.symbol}} --}}

@if(getShowRefundToSale()=="true")
@lang('layout.Leakage')
# @lang('layout.ItemName') @lang('layout.SiteName') @lang('layout.Quantity') @lang('layout.OMeasureValue1') @lang('layout.OMeasureValue2') @lang('layout.Measure') @lang('layout.NewPrice') @lang('layout.Total')
@{{index+1}}
@{{selected_currency.symbol}}
@{{(item.item==null)? 0:getItemTotal(item.item,selected_currency.rate,discountIsAmount,item.item.discount,selected_currency.hq_rate,per_qty_check, null, selected_currency.static_rate, item.perqty).result}} @{{selected_currency.symbol}}

@endif @endif @if(systemConfig()[26] == 1)
# @lang('layout.ServiceName') @lang('layout.Description') @lang('layout.Description') :2 @lang('layout.Quantity') @lang('layout.Measure') @lang('layout.Price') @lang('layout.Total')
@{{index+1}}
@{{selected_currency.symbol}}
@{{selected_currency.symbol}}
@endif
@if(voucherOfferingType() == '1')
# @lang('layout.Name') @lang('layout.Amount') @lang('layout.Date') @lang('layout.AccountRegister') @lang('layout.Description')
@{{index+1}} {{-- --}}
@endif
@permission('receive-create')
# @lang('layout.Number') @lang('layout.SelectBank') @lang('layout.Amount') @lang('layout.Rate') @lang('layout.Currency') @lang('layout.Amount') @lang('layout.Total') @lang('layout.Date') @lang('layout.Description')
@{{index+1}} @{{(payment.item==null)?null:(payment.item.number)}} @{{myRound(Number((payment.item==null)?null:payment.item.balance)-Number((payment.item==null)?null:payment.item.amount))}}
@{{selected_currency.symbol}}
@endpermission
@if(getOnCredit()=="true")
@lang('layout.OnCredit')
# @lang('layout.SelectBank') @lang('layout.Rate') @lang('layout.Currency') @lang('layout.Amount') @lang('layout.Date') @lang('layout.Description')
@{{index+1}}

@lang('layout.OnCredit')
# @lang('layout.Currency') @lang('layout.Balance') @lang('layout.Rate') @lang('layout.Amount') @lang('layout.Total') @lang('layout.Date') @lang('layout.Description')
@{{index+1}}
@{{selected_currency.symbol}}
@endif
@if(getTransferRent()=="true")
@lang('layout.TransferRent')
@lang('layout.Type') @lang('layout.Transmitter') @lang('layout.SelectBank') @lang('layout.Currency') @lang('layout.Rate') @lang('layout.Amount') @lang('layout.Description')
@{{(transfer_rent_bank_selected==null)?null:transfer_rent_bank_selected.code}} @{{selected_currency.symbol}}

@endif
@if(getInvoicePayment()== "true")
  @lang('layout.InvoicePayment') : (@lang('message.InvoicePaymetNote'))
# @lang('layout.Currency') * @lang('layout.Rate') * @lang('layout.Amount') * @lang('layout.Description') *
@{{index+1}}
@endif
@if(getDriverInfo()=="true")
@lang('layout.DriverInfo')
{{Form::text('transfer_code',$invoice->transferCode,['class' => 'form-control'])}}
{{Form::text('palce_of_weight',$invoice->PlaceOfWeight,['class' => 'form-control'])}}
{{Form::text('source_place',$invoice->sourcePlace,['class' => 'form-control'])}}
{{Form::textarea('transfer_description',$invoice->trDesription,['class' => 'form-control','rows' => '3'])}}
@endif @if(systemConfig()[16] != 0)
@lang('layout.FarmerContract')
@endif @if(expenseInSales() == 'true')

@lang('layout.ExpenseSection')

# @lang('layout.SelectAccount') @lang('layout.ExpenseCategory') @lang('layout.ExpenseClass') @lang('layout.Description') @lang('layout.Amount')
@{{itemIndex+1}}
@{{selected_currency.symbol}}

@endif {{-- Begin Member Transfer --}} @if(SendMoneyInSale() == 'true')

@lang('layout.SendMoney')

# @lang('layout.Person') @lang('layout.Amount') @lang('layout.Description')
@{{itemIndex+1}}
@endif {{-- End Member Transfer --}} @if(systemConfig()[21] == 1)
@lang('layout.WashingForm')

@endif @if(getInvoiceTotal() == 'true')
@lang('layout.GrandTotal'): @{{ subtotal.toFixed(precision())}} @{{selected_currency.symbol}} @lang('layout.Payment'): @{{ payeds.toFixed(precision())}} @{{selected_currency.symbol}} @lang('layout.Discount'): (@{{Number.parseFloat(discount).toFixed(precision())}}%) @{{ format_number(Number.parseFloat(discount*(newSubTotal - newSubDiscountFiledRow)/100)+Number.parseFloat(discountFiledRow)) }} @{{selected_currency.symbol}} @lang('layout.Total') : @{{ format_number(Number.parseFloat(((subtotal - (discount*(newSubTotal - newSubDiscountFiledRow)/100) - discountFiledRow) - saleTaxation)-payeds))}} @{{selected_currency.symbol}}
@endif
@if(getHesabSabeqa() =='true')
@endif
@if(searchByCodeLocation()=="true")
@endif
@if(getInvoiceType() == 71)
@endif
@if(voucherOfferingType() == '1')
@{{ errors.first('currency') }}
@{{ errors.first('currency_rate') }}
@endif @if(getConversionToAnotherCurrency() == 'true')
@{{ errors.first('currency') }}
@{{ errors.first('currency_rate') }}
@endif @if(getPrintDescription()=="true")
@endif
@if($duplicate) @else @endif @lang('layout.Cancel')
{!! Form::close() !!}

 

 

@endsection @push('scripts') @endpush