@extends('layout.main') @section('content')

Edit Invoice

@include('includes.errors') @include('includes.success')
@if(User::checkCategoryPermission('Invoice','Send')) Send @endif   Print Invoice   Close

{{Form::select('AccountID',$accounts,$Invoice->AccountID,array("class"=>"select2" ,"disabled"=>"disabled"))}} {{Form::hidden('AccountID',$Invoice->AccountID)}}
{{Form::select('BillingClassID', $BillingClass,$InvoiceBillingClass,array("class"=>"select2 small form-control1 small","id"=>"AccountBillingClassID","disabled"=>"disabled"));}}
{{Form::textarea('Address',$Invoice->Address,array( "ID"=>"Account_Address", "rows"=>4, "class"=>"form-control"))}}
{{Form::text('BarCode','',array( "ID"=>"BarCode", "class"=>"form-control", "onkeypress"=>"validateBarCodeInput(event)"))}}
{{Form::text('InvoiceNumber',$Invoice->InvoiceNumber,array("class"=>"form-control","readonly"=>"readonly"))}}


{{Form::text('IssueDate',date('Y-m-d',strtotime($Invoice->IssueDate)),array("class"=>" form-control datepicker" , "data-startdate"=>date('Y-m-d',strtotime("-2 month")), "data-date-format"=>"yyyy-mm-dd", "data-end-date"=>"+1w" ,"data-start-view"=>"2"))}}


{{Form::text('PONumber',$Invoice->PONumber,array("class"=>" form-control" ))}}
@if(count($InvoiceDetail)>0) @foreach($InvoiceDetail as $ProductRow) @endforeach @endif
Item/Subscription Description Unit Price Quantity Discount Tax 1 Tax 2 Line Total
{{Form::SelectControl('item_and_Subscription',0,['Type'=>$ProductRow->ProductType,'ID'=>$ProductRow->ProductID],0,'InvoiceDetail[ProductID][]')}} {{Form::textarea('InvoiceDetail[Description][]',$ProductRow->Description,array("class"=>"form-control autogrow invoice_estimate_textarea descriptions","rows"=>1))}} {{Form::text('InvoiceDetail[Price][]', number_format($ProductRow->Price,$RoundChargesAmount),array("class"=>"form-control Price","data-mask"=>"fdecimal"))}} {{Form::text('InvoiceDetail[Qty][]',$ProductRow->Qty,array("class"=>"form-control Qty"))}} {{Form::text('InvoiceDetail[DiscountAmount][]', number_format($ProductRow->DiscountAmount,$RoundChargesAmount),array("class"=>"form-control DiscountAmount","data-min"=>"1", "data-mask"=>"fdecimal"))}} {{Form::Select("InvoiceDetail[DiscountType][]",array("Percentage"=>"%","Flat"=>"Flat"),$ProductRow->DiscountType,array("class"=>"select2 small DiscountType"))}} {{Form::SelectExt( [ "name"=>"InvoiceDetail[TaxRateID][]", "data"=>$taxes, "selected"=>$ProductRow->TaxRateID, "value_key"=>"TaxRateID", "title_key"=>"Title", "data-title1"=>"data-amount", "data-value1"=>"Amount", "data-title2"=>"data-flatstatus", "data-value2"=>"FlatStatus", "class" =>"select2 small Taxentity TaxRateID", ])}} {{Form::SelectExt( [ "name"=>"InvoiceDetail[TaxRateID2][]", "data"=>$taxes, "selected"=>$ProductRow->TaxRateID2, "value_key"=>"TaxRateID", "title_key"=>"Title", "data-title1"=>"data-amount", "data-value1"=>"Amount", "data-title2"=>"data-flatstatus", "data-value2"=>"FlatStatus", "class" =>"select2 small Taxentity TaxRateID2", ] )}} {{Form::text('InvoiceDetail[LineTotal][]',number_format($ProductRow->LineTotal,$RoundChargesAmount),array("class"=>"form-control LineTotal","data-min"=>"1", "data-mask"=>"fdecimal","readonly"=>"readonly"))}} {{Form::hidden('InvoiceDetail[InvoiceDetailID][]',$ProductRow->InvoiceDetailID,array("class"=>"InvoiceDetailID"))}} {{Form::hidden('InvoiceDetail[ProductType][]',$ProductRow->ProductType,array("class"=>"ProductType"))}}
{{Form::textarea('Terms',$Invoice->Terms,array("class"=>" form-control" ,"rows"=>5))}}
{{Form::textarea('FooterTerm',$Invoice->FooterTerm,array("class"=>" form-control" ,"rows"=>5))}}
{{Form::textarea('Note',$Invoice->Note,array("class"=>" form-control" ,"rows"=>5))}}
@if(count($InvoiceAllTax)>0) @foreach($InvoiceAllTax as $key => $InvoiceAllTaxData) @if($key==0) @else @endif @endforeach @else @endif
Sub Total {{Form::text('SubTotal',number_format($Invoice->SubTotal,$RoundChargesAmount),array("class"=>"form-control SubTotal text-right","readonly"=>"readonly"))}}
VAT {{Form::text('TotalTax',number_format($Invoice->TotalTax,$RoundChargesAmount),array("class"=>"form-control TotalTax text-right","readonly"=>"readonly"))}}
Invoice Total {{Form::text('GrandTotal',number_format($Invoice->GrandTotal,$RoundChargesAmount),array("class"=>"form-control GrandTotal text-right","readonly"=>"readonly"))}}
  Tax
{{Form::SelectExt( [ "name"=>"InvoiceTaxes[field][]", "data"=>$taxes, "selected"=>$InvoiceAllTaxData->TaxRateID, "value_key"=>"TaxRateID", "title_key"=>"Title", "data-title1"=>"data-amount", "data-value1"=>"Amount", "data-title2"=>"data-flatstatus", "data-value2"=>"FlatStatus", "class" =>"select2 small Taxentity InvoiceTaxesFld InvoiceTaxesFldFirst", ] )}}
{{Form::text('InvoiceTaxes[value][]',$InvoiceAllTaxData->TaxAmount,array("class"=>"form-control InvoiceTaxesValue","readonly"=>"readonly"))}}
  Tax
{{Form::SelectExt( [ "name"=>"InvoiceTaxes[field][]", "data"=>$taxes, "selected"=>'', "value_key"=>"TaxRateID", "title_key"=>"Title", "data-title1"=>"data-amount", "data-value1"=>"Amount", "data-title2"=>"data-flatstatus", "data-value2"=>"FlatStatus", "class" =>"select2 small Taxentity InvoiceTaxesFld InvoiceTaxesFldFirst", ] )}}
{{Form::text('InvoiceTaxes[value][]','',array("class"=>"form-control InvoiceTaxesValue","readonly"=>"readonly"))}}
Grand Total {{Form::text('GrandTotalInvoice','',array("class"=>"form-control GrandTotalInvoice text-right","readonly"=>"readonly"))}}
@foreach($invoicelog as $invoicelogrw) @endforeach
Invoice Biography
Created Created By {{$Invoice->CreatedBy}} {{$Invoice->created_at}}
{{InVoiceLog::$log_status[$invoicelogrw->InvoiceLogStatus]}} {{$invoicelogrw->Note}} {{$invoicelogrw->created_at}}
@include('invoices.script_invoice_barcode_product') @include('invoices.script_invoice_add_edit') @include('composetmodels.productsubscriptionmodal') @include('includes.ajax_submit_script', array('formID'=>'invoice-from' , 'url' => 'invoice/'.$id.'/update' )) @stop @section('footer_ext') @parent @stop