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

Edit Estimate

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

{{Form::select('AccountID',$accounts,$AccountID,array("class"=>"select2" ,"disabled"=>"disabled"))}} {{Form::hidden('AccountID',$AccountID)}}
{{Form::select('BillingClassID', $BillingClass,$EstimateBillingClass,array("class"=>"select2 small form-control1 small","id"=>"AccountBillingClassID","disabled"=>"disabled"));}}
{{Form::textarea('Address',$Estimate->Address,array( "ID"=>"Account_Address", "rows"=>4, "class"=>"form-control"))}}
{{Form::text('EstimateNumber',$Estimate->EstimateNumber,array("class"=>"form-control","readonly"=>"readonly"))}}


{{Form::text('IssueDate',date('Y-m-d',strtotime($Estimate->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',$Estimate->PONumber,array("class"=>" form-control" ))}}
@if(count($EstimateDetail)>0) @foreach($EstimateDetail 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,'EstimateDetail[ProductID][]')}} {{Form::textarea('EstimateDetail[Description][]',$ProductRow->Description,array("class"=>"form-control autogrow descriptions invoice_estimate_textarea","rows"=>1))}} {{Form::text('EstimateDetail[Price][]', number_format($ProductRow->Price,$RoundChargesAmount),array("class"=>"form-control Price","data-mask"=>"fdecimal"))}} {{Form::text('EstimateDetail[Qty][]',$ProductRow->Qty,array("class"=>"form-control Qty","data-min"=>"1", "data-mask"=>"decimal"))}} {{Form::text('EstimateDetail[DiscountAmount][]',number_format($ProductRow->DiscountAmount,$RoundChargesAmount),array("class"=>"form-control DiscountAmount","data-min"=>"1", "data-mask"=>"fdecimal"))}} {{Form::Select("EstimateDetail[DiscountType][]",array("Percentage"=>"%","Flat"=>"Flat"),$ProductRow->DiscountType,array("class"=>"select2 small DiscountType"))}} {{Form::SelectExt( [ "name"=>"EstimateDetail[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"=>"EstimateDetail[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('EstimateDetail[LineTotal][]',number_format($ProductRow->LineTotal,$RoundChargesAmount),array("class"=>"form-control LineTotal","data-min"=>"1", "data-mask"=>"fdecimal","readonly"=>"readonly"))}} {{Form::hidden('EstimateDetail[EstimateDetailID][]',$ProductRow->EstimateDetailID,array("class"=>"EstimateDetailID"))}} {{Form::hidden('EstimateDetail[ProductType][]',$ProductRow->ProductType,array("class"=>"ProductType"))}}
{{Form::textarea('Terms',$Estimate->Terms,array("class"=>" form-control" ,"rows"=>5))}}
{{Form::textarea('FooterTerm',$Estimate->FooterTerm,array("class"=>" form-control" ,"rows"=>5))}}
{{Form::textarea('Note',$Estimate->Note,array("class"=>" form-control" ,"rows"=>5))}}
@if(count($EstimateAllTax)>0) @foreach($EstimateAllTax as $key => $EstimateAllTaxData) @if($key==0) @else @endif @endforeach @else @endif
Estimate Total {{Form::text('GrandTotal',number_format($Estimate->GrandTotal,$RoundChargesAmount),array("class"=>"form-control GrandTotal text-right","readonly"=>"readonly"))}}
  Tax
{{Form::SelectExt( [ "name"=>"EstimateTaxes[field][]", "data"=>$taxes, "selected"=>$EstimateAllTaxData->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 EstimateTaxesFld EstimateTaxesFldFirst", ] )}}
{{Form::text('EstimateTaxes[value][]',$EstimateAllTaxData->TaxAmount,array("class"=>"form-control EstimateTaxesValue","readonly"=>"readonly"))}}
  Tax
{{Form::SelectExt( [ "name"=>"EstimateTaxes[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 EstimateTaxesFld EstimateTaxesFldFirst", ] )}}
{{Form::text('EstimateTaxes[value][]','',array("class"=>"form-control EstimateTaxesValue","readonly"=>"readonly"))}}
Grand Total {{Form::text('GrandTotalEstimate','',array("class"=>"form-control GrandTotalEstimate text-right","readonly"=>"readonly"))}}
@include('estimates.script_estimate_add_edit') @include('composetmodels.productsubscriptionmodal') @include('includes.ajax_submit_script', array('formID'=>'estimate-from' , 'url' => 'estimate/'.$id.'/update' )) @stop @section('footer_ext') @parent @stop