1{capture name=path}
2  <a href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}">
3    {l s='My account'}
4  </a>
5  <span class="navigation-pipe">
6        {$navigationPipe}
7    </span>
8  <span class="navigation_page">
9        {l s='Return Merchandise Authorization (RMA)'}
10    </span>
11{/capture}
12
13<h1 class="page-heading">
14  {l s='Return Merchandise Authorization (RMA)'}
15</h1>
16{if isset($errorQuantity) && $errorQuantity}
17  <p class="error">
18    {l s='You do not have enough products to request an additional merchandise return.'}
19  </p>
20{/if}
21{if isset($errorMsg) && $errorMsg}
22  <div class="alert alert-danger">
23    {l s='Please provide an explanation for your RMA.'}
24  </div>
25  <form method="POST"  id="returnOrderMessage">
26    <div class="textarea form-group">
27      <label>{l s='Please provide an explanation for your RMA:'}</label>
28      <textarea name="returnText" class="form-control"></textarea>
29    </div>
30    {foreach $ids_order_detail as $id_order_detail}
31      <input type="hidden" name="ids_order_detail[{$id_order_detail|intval}]" value="{$id_order_detail|intval}">
32    {/foreach}
33    {foreach $order_qte_input as $key => $value}
34      <input type="hidden" name="order_qte_input[{$key|intval}]" value="{$value|intval}">
35    {/foreach}
36    <input type="hidden" name="id_order" value="{$id_order|intval}">
37    <input class="unvisible" type="submit" name="submitReturnMerchandise" value="{l s='Make an RMA slip'}">
38    <p>
39      <button type="submit" name="submitReturnMerchandise" class="btn btn-success">
40       <span>
41         {l s='Make an RMA slip'} <i class="icon icon-chevron-right"></i>
42       </span>
43      </button>
44    </p>
45  </form>
46
47{/if}
48{if isset($errorDetail1) && $errorDetail1}
49  <div class="alert alert-danger">
50    {l s='Please check at least one product you would like to return.'}
51  </div>
52{/if}
53{if isset($errorDetail2) && $errorDetail2}
54  <div class="alert alert-danger">
55    {l s='For each product you wish to add, please specify the desired quantity.'}
56  </div>
57{/if}
58{if isset($errorNotReturnable) && $errorNotReturnable}
59  <div class="alert alert-danger">
60    {l s='This order cannot be returned.'}
61  </div>
62{/if}
63
64<p>
65  <b>{l s='Here is a list of pending merchandise returns'}.</b>
66</p>
67<div class="block-center" id="block-history">
68  {if $ordersReturn && count($ordersReturn)}
69    <table id="order-list" class="table table-bordered footab">
70      <thead>
71      <tr>
72        <th data-sort-ignore="true">{l s='Return'}</th>
73        <th data-sort-ignore="true">{l s='Order'}</th>
74        <th data-hide="phone">{l s='Package status'}</th>
75        <th data-hide="phone,tablet">{l s='Date issued'}</th>
76        <th data-sort-ignore="true" data-hide="phone,tablet">{l s='Return slip'}</th>
77      </tr>
78      </thead>
79      <tbody>
80      {foreach from=$ordersReturn item=return name=myLoop}
81        <tr>
82          <td class="bold">
83            <a href="javascript:showOrder(0, {$return.id_order_return|intval}, '{$link->getPageLink('order-return', true)|escape:'html':'UTF-8'}');">
84              {l s='#'}{$return.id_order_return|string_format:"%06d"}
85            </a>
86          </td>
87          <td class="history_method">
88            <a href="javascript:showOrder(1, {$return.id_order|intval}, '{$link->getPageLink('order-detail', true)|escape:'html':'UTF-8'}');">
89              {$return.reference}
90            </a>
91          </td>
92          <td class="history_method" data-value="{$return.state}">
93            <span class="label label-info">
94              {$return.state_name|escape:'html':'UTF-8'}
95            </span>
96          </td>
97          <td class="bold" data-value="{$return.date_add|regex_replace:"/[\-\:\ ]/":""}">
98            {dateFormat date=$return.date_add full=0}
99          </td>
100          <td class="history_invoice">
101            {if $return.state == 2}
102              <a class="btn btn-default" href="{$link->getPageLink('pdf-order-return', true, NULL, "id_order_return={$return.id_order_return|intval}")|escape:'html':'UTF-8'}" title="{l s='Order return'} {l s='#'}{$return.id_order_return|string_format:"%06d"}">
103                <i class="icon icon-file-text"></i> {l s='Print out'}
104              </a>
105            {else}
106              --
107            {/if}
108          </td>
109        </tr>
110      {/foreach}
111      </tbody>
112    </table>
113    <div id="block-order-detail" class="unvisible">&nbsp;</div>
114  {else}
115    <div class="alert alert-warning">{l s='You have no merchandise return authorizations.'}</div>
116  {/if}
117</div>
118
119<nav>
120  <ul class="pager">
121    <li class="previous">
122      <a href="{$link->getPageLink('my-account', true)|escape:'html':'UTF-8'}">
123        {if $isRtl}&rarr;{else}&larr;{/if} {l s='Back to your account'}
124      </a>
125    </li>
126  </ul>
127</nav>
128