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

Edit CreditNote

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

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


{{Form::text('IssueDate',date('Y-m-d',strtotime($CreditNotes->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"))}}


@if(count($CreditNotesDetail)>0) @foreach($CreditNotesDetail 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,'CreditNotesDetail[ProductID][]')}} {{Form::textarea('CreditNotesDetail[Description][]',$ProductRow->Description,array("class"=>"form-control autogrow descriptions invoice_creditnotes_textarea","rows"=>1))}} {{Form::text('CreditNotesDetail[Price][]', number_format($ProductRow->Price,$RoundChargesAmount),array("class"=>"form-control Price","data-mask"=>"fdecimal"))}} {{Form::text('CreditNotesDetail[Qty][]',$ProductRow->Qty,array("class"=>"form-control Qty","data-min"=>"1", "data-mask"=>"decimal"))}} {{Form::text('CreditNotesDetail[DiscountAmount][]', number_format($ProductRow->DiscountAmount,$RoundChargesAmount),array("class"=>"form-control DiscountAmount","data-min"=>"1", "data-mask"=>"fdecimal"))}} {{Form::Select("CreditNotesDetail[DiscountType][]",array("Percentage"=>"%","Flat"=>"Flat"),$ProductRow->DiscountType,array("class"=>"select2 small DiscountType"))}} {{Form::SelectExt( [ "name"=>"CreditNotesDetail[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"=>"CreditNotesDetail[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('CreditNotesDetail[LineTotal][]',number_format($ProductRow->LineTotal,$RoundChargesAmount),array("class"=>"form-control LineTotal","data-min"=>"1", "data-mask"=>"fdecimal","readonly"=>"readonly"))}} {{Form::hidden('CreditNotesDetail[CreditNotesDetailID][]',$ProductRow->CreditNotesDetailID,array("class"=>"CreditNotesDetailID"))}} {{Form::hidden('CreditNotesDetail[ProductType][]',$ProductRow->ProductType,array("class"=>"ProductType"))}}
{{Form::textarea('Terms',$CreditNotes->Terms,array("class"=>" form-control" ,"rows"=>5))}}
{{Form::textarea('FooterTerm',$CreditNotes->FooterTerm,array("class"=>" form-control" ,"rows"=>5))}}
{{Form::textarea('Note',$CreditNotes->Note,array("class"=>" form-control" ,"rows"=>5))}}
@if(count($CreditNotesAllTax)>0) @foreach($CreditNotesAllTax as $key => $CreditNotesAllTaxData) @if($key==0) @else @endif @endforeach @else @endif
Sub Total {{Form::text('SubTotal',number_format($CreditNotes->SubTotal,$RoundChargesAmount),array("class"=>"form-control SubTotal text-right","readonly"=>"readonly"))}}
Credit Note Total {{Form::text('GrandTotal',number_format($CreditNotes->GrandTotal,$RoundChargesAmount),array("class"=>"form-control GrandTotal text-right","readonly"=>"readonly"))}}
  Tax
{{Form::SelectExt( [ "name"=>"CreditNotesTaxes[field][]", "data"=>$taxes, "selected"=>$CreditNotesAllTaxData->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 CreditNotesTaxesFld CreditNotesTaxesFldFirst", ] )}}
{{Form::text('CreditNotesTaxes[value][]',$CreditNotesAllTaxData->TaxAmount,array("class"=>"form-control CreditNotesTaxesValue","readonly"=>"readonly"))}}
  Tax
{{Form::SelectExt( [ "name"=>"CreditNotesTaxes[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 CreditNotesTaxesFld CreditNotesTaxesFldFirst", ] )}}
{{Form::text('CreditNotesTaxes[value][]','',array("class"=>"form-control CreditNotesTaxesValue","readonly"=>"readonly"))}}
Grand Total {{Form::text('GrandTotalCreditNotes','',array("class"=>"form-control GrandTotalCreditNotes text-right","readonly"=>"readonly"))}}
@include('creditnotes.script_creditnotes_add_edit') @include('composetmodels.productsubscriptionmodal') @include('includes.ajax_submit_script', array('formID'=>'creditnotes-from' , 'url' => 'creditnotes/'.$id.'/update' )) @stop @section('footer_ext') @parent @stop