You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
1.9 KiB

  1. ::use 'design.mtt'::
  2. <div id="content" class="col-md-8">
  3. <div class="article">
  4. <h2>
  5. ::__("Modify the order delivered on ::date::",{date:hDate(date)})::
  6. </h2>
  7. <p>
  8. ::raw _("You can modify here an existing order. If you would like to remove a product, just key-in the quantity 0.<br/>You may not be able to modify all elements as the order could be closed for some suppliers")::
  9. </p>
  10. <form name="order" id="order" method="POST" action="">
  11. <input type="hidden" name="token" value="::token::"/>
  12. <table class="table table-bordered">
  13. <tr>
  14. <th>::_("Product")::</th>
  15. <th>::_("U.P.")::</th>
  16. <th>::_("Sub-total")::</th>
  17. <th>::_("Fees")::</th>
  18. <th>::_("Total")::</th>
  19. <th>::_("Quantity")::</th>
  20. </tr>
  21. ::set total = 0::
  22. ::foreach o orders::
  23. <tr>
  24. <td>
  25. <a href="#" onclick="_.overlay('/shop/productInfo/::o.productId::')">
  26. <img src="::o.productImage::" style="width:32px;height:32px;" />
  27. ::o.quantity:: x ::o.productName::
  28. </a>
  29. </td>
  30. <td>
  31. ::formatNum(o.productPrice)::&nbsp;::currency()::
  32. </td>
  33. <td>
  34. ::formatNum(o.subTotal)::&nbsp;::currency()::
  35. </td>
  36. <td>
  37. $$nullSafe(::formatNum(o.fees)::)
  38. </td>
  39. <td>
  40. ::formatNum(o.total)::&nbsp;::currency()::
  41. </td>
  42. <td>
  43. ::if o.canModify::
  44. <input type="text" class="form-control" name="product::o.productId::" id="product::o.productId::" value="::o.quantity::" />
  45. ::else::
  46. <span style="color:#AAA">::_("Order closed or already paid")::</span>
  47. ::end::
  48. </td>
  49. ::set total = total + o.total::
  50. </tr>
  51. ::end::
  52. <tr>
  53. <th colspan="3"></th>
  54. <th>::_("TOTAL")::</th>
  55. <th>::roundTo(total,2)::::currency()::</th>
  56. <th></th>
  57. </tr>
  58. </table>
  59. <input type="submit" class="btn btn-primary" value="::_("Update the order")::" name="submit" id="submit" />
  60. </form>
  61. </div>
  62. </div>
  63. ::end::