@extends('layouts.app')

@section('content')
<div class="panel panel-default">
    <div class="panel-heading">Billing service</div>

    <div class="panel-body">
       <a  class="btn btn-primary" href="{{ route('billing-services.edit',$service->id)}}">Edit</a><br><br>
    	service ref - {{$service->service_ref}}<br>
    	setup date - {{$service->setup_date}}<br>
    	last billed date - {{$service->last_billed}}<br>
    	next billed date - {{$service->next_billed}}<br>
    	cancelled date - {{$service->canseled_date}}<br>
    	description - {{$service->description}}<br>
    	do not bill - {{$service->do_not_bill}}<br>
    	fee - {{$service->fee}}<br>
    	renew - @if( $service->renew == 1 ) Monthly  @endif
                @if( $service->renew == 2 ) Quarterly  @endif
                @if( $service->renew == 3 ) Annually  @endif<br>
    	agreement - {{$service->agreement}}<br>
    	notes - {{$service->notes}}<br>
    	username - {{$service->username}}<br>
    	password - {{$service->password}}<br>
        tax rate type - {{ $xeroTaxes[$service['tax_type']] }}<br>
    	@if( $service->customer_id == 0 )
		<div style="color: red">Not linked to customer</div>
		@else
		Customer: <div style="color: green">{{$service->customer->xero_name}}</div>
		@endif
       
    </div>
</div>
@endsection