@extends('layout.default')
@section('content')  
    <div class="row show-grid-forms my_content">
    @if (Session::has('success'))
        <div class="alert alert-success" style="width: 1120px;">
            {{ Session::get('success') }}
        </div>
    @endif
        {!! Form::open(array('id'=>'refund_form','role' => 'form','route' => 'refund','method' => 'POST','accept-charset' => 'ISO-8859-1')) !!}
        <div class="col-sm-2" style="text-align: right;">
            <b>Order ID</b>
        </div>
        <div class="col-sm-2">
            {!! Form::text('refund_order_id','',array('required'=>'required','class'=>'form-control'))!!}
        </div>    
        <div class="col-sm-2">
            {!! Form::submit('Submit', array('class' => 'btn btn-primary btn-label-left')) !!}
            {!! Form::close() !!}   
        </div>
    </div>

    @if(isset($report))
        <table class="table table-bordered">
            <thead>
               <tr>
                   <th>Market Place</th>
                   <th>Order ID</th>
                   <th>SKU</th>
                   <th>Sales</th>
                   <th>Shipping</th>
                   <th>Net Cost</th> 
                   <th>Tax</th>
                   <th>Commission</th>
                   <th style="text-align: center;">Quantity</th>
                   <th>Source</th>
               </tr>
           </thead>
           <tbody>
                <tr>
                    <td>{{ $report[0]->name }}</td>
                    <td>{{ $report[0]->report_order_id }}</td>
                    <td>{{ $report[0]->report_item_sku }}</td>
                    <td>{{ $report[0]->report_selling_price }}</td>
                    <td>{{ $report[0]->report_shipping_cost }}</td>
                    <td>{{ $report[0]->report_net_cost }}</td>
                    <td>{{ $report[0]->report_tax }}</td>
                    <td>{{ $report[0]->commission }}</td>
                    <td style="text-align: center;">{{ $report[0]->report_item_quantity }}</td>
                    <td>{{ $report[0]->source_name }}</td>
                </tr>
           </tbody>
        </table>
        <br/><br/><br/>
    <div class="row show-grid-forms my_content">
            {!! Form::open(array('id'=>'refund_form','role' => 'form','route' => 'refund','method' => 'POST','accept-charset' => 'ISO-8859-1')) !!}
        <div class="col-sm-2" style="text-align: right;">
            <b>Refund Amount</b>
        </div>
        <div class="col-sm-2">
            {!! Form::number('refund_amount','',array('required'=>'required','class'=>'form-control'))!!}
            {!! Form::hidden('report_id',$report[0]->report_id,array('required'=>'required','class'=>'form-control'))!!}
        </div>    
        <div class="col-sm-2">
            {!! Form::submit('Submit', array('class' => 'btn btn-primary btn-label-left')) !!}
            {!! Form::close() !!}   
        </div>
    </div>
    @endif
@stop