viewinvoice.tpl.orig 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  1. {*
  2. **********************************************************
  3. * Developed by: Team Theme Metro
  4. * Website: http://www.thememetro.com
  5. **********************************************************
  6. *}
  7. {if $themesettings.clientarea.viandq eq "outer-layout"}
  8. <!DOCTYPE html>
  9. <html lang="en">
  10. <head>
  11. <meta charset="{$charset}" />
  12. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  13. <meta name="viewport" content="width=device-width, initial-scale=1">
  14. <title>{$companyname} - {$pagetitle}</title>
  15. <link href="{$WEB_ROOT}/templates/{$template}/assets/css/invoice.min.css" rel="stylesheet">
  16. {include file="templates/$template/includes/head.tpl"}
  17. </head>
  18. <body {if $themesettings.customcolors.darkmode == '1'} class="dark-mode{if $themesettings.customcolors.dmimggs != '1'} gray_logos{/if}"{/if} style="margin: 0;">
  19. {else}
  20. <link href="{$WEB_ROOT}/templates/{$template}/assets/css/invoice.min.css" rel="stylesheet">
  21. {include file="{$template}/header.tpl"}
  22. {/if}
  23. <div {if $themesettings.clientarea.viandq eq "outer-layout"}class="container" style="margin: 15px auto;"{/if}>
  24. {if $invalidInvoiceIdRequested}
  25. {include file="$template/includes/panel.tpl" type="danger" headerTitle=$LANG.error bodyContent=$LANG.invoiceserror bodyTextCenter=true}
  26. {else}
  27. <div class="row">
  28. <div class="col-lg-9">
  29. <div class="TM-card invoice{if $themesettings.customcolors.darkmode != '1'}{if $themesettings.clientarea.viandqbg neq ""} {$themesettings.clientarea.viandqbg}{/if}{/if}" style="padding: 45px 30px;">
  30. <div class="company-logo">
  31. {if $themesettings.general.enablelogo}
  32. <img src="{$themesettings.general.logourl}" alt="{$companyname}" class="logo-light img-responsive" />
  33. {if $themesettings.general.darklogo}
  34. <img src="{$themesettings.general.darklogo}" alt="{$companyname}" class="logo-dark img-responsive" />
  35. {else}
  36. <h2 class="logo-dark">{$companyname}</h2>
  37. {/if}
  38. {else}
  39. <h2 class="logo-light">{$companyname}</h2>
  40. {/if}
  41. </div>
  42. {if $paymentSuccessAwaitingNotification}
  43. {include file="$template/includes/alert.tpl" type="success" msg=$LANG.invoicePaymentSuccessAwaitingNotify}
  44. {elseif $paymentSuccess}
  45. {include file="$template/includes/alert.tpl" type="success" msg=$LANG.invoicepaymentsuccessconfirmation}
  46. {elseif $paymentInititated}
  47. {include file="$template/includes/alert.tpl" type="info" msg=$LANG.$LANG.invoicePaymentInitiated}
  48. {elseif $pendingReview}
  49. {include file="$template/includes/alert.tpl" type="info" msg=$LANG.invoicepaymentpendingreview}
  50. {elseif $paymentFailed}
  51. {include file="$template/includes/alert.tpl" type="danger" msg=$LANG.invoicepaymentfailedconfirmation}
  52. {elseif $offlineReview}
  53. {include file="$template/includes/alert.tpl" type="info" msg=$LANG.invoiceofflinepaid}
  54. {/if}
  55. <div class="section">
  56. <div class="invoice-info">
  57. <div class="invoice-title">
  58. <span class="title"> {$pagetitle}
  59. {if $status eq "Draft"}
  60. <span class="invoice-status label label-info">{$LANG.invoicesdraft}</span>
  61. {elseif $status eq "Unpaid"}
  62. <span class="invoice-status label label-danger">{$LANG.invoicesunpaid}</span>
  63. {elseif $status eq "Paid"}
  64. <span class="invoice-status label label-success">{$LANG.invoicespaid}</span>
  65. {elseif $status eq "Refunded"}
  66. <span class="invoice-status label label-info">{$LANG.invoicesrefunded}</span>
  67. {elseif $status eq "Cancelled"}
  68. <span class="invoice-status label label-info">{$LANG.invoicescancelled}</span>
  69. {elseif $status eq "Collections"}
  70. <span class="invoice-status label label-info">{$LANG.invoicescollections}</span>
  71. {elseif $status eq "Payment Pending"}
  72. <span class="invoice-status label label-warning">{$LANG.invoicesPaymentPending}</span>
  73. {/if}
  74. </span>
  75. </div>
  76. <div class="invoice-date">
  77. <div class="pull-right">
  78. <div class="text-right">
  79. <strong>{$LANG.invoicesdatecreated}</strong><br />
  80. <span class="text-muted">{$date}</span>
  81. </div>
  82. {if $status eq "Unpaid" || $status eq "Draft"}
  83. <div class="text-right">
  84. <strong>{$LANG.invoicesdatedue}</strong><br />
  85. <span class="text-muted">{$datedue}</span>
  86. </div>
  87. {/if}
  88. {if $status neq "Unpaid"}
  89. <div class="text-right">
  90. <strong>{$LANG.orderpaymentmethod}</strong><br />
  91. <span class="text-muted">{$paymentmethod}{if $paymethoddisplayname} ({$paymethoddisplayname}){/if}</span>
  92. </div>
  93. {/if}
  94. </div>
  95. </div>
  96. </div>
  97. </div>
  98. <div class="section">
  99. <div class="row">
  100. <div class="col-sm-7">
  101. <h4>{$LANG.invoicespayto}:</h4>
  102. <address>
  103. {$payto}
  104. {if $taxCode}<br />{$taxIdLabel}: {$taxCode}{/if}
  105. </address>
  106. </div>
  107. <div class="col-sm-5">
  108. <h4>{$LANG.invoicesinvoicedto}:</h4>
  109. <address> {if $clientsdetails.companyname}{$clientsdetails.companyname}<br />{/if}
  110. {$clientsdetails.firstname} {$clientsdetails.lastname}<br />
  111. {$clientsdetails.address1}, {$clientsdetails.address2}<br />
  112. {$clientsdetails.city}, {$clientsdetails.state}, {$clientsdetails.postcode}<br />
  113. {$clientsdetails.country}
  114. {if $clientsdetails.tax_id}<br />{$taxIdLabel}: {$clientsdetails.tax_id}{/if}
  115. {if $customfields}
  116. <br /><br />
  117. {foreach from=$customfields item=customfield}
  118. {$customfield.fieldname}: {$customfield.value}<br />
  119. {/foreach}
  120. {/if}
  121. </address>
  122. </div>
  123. </div>
  124. </div>
  125. {if $notes}
  126. <div class="section">
  127. {include file="$template/includes/panel.tpl" type="info" headerTitle=$LANG.invoicesnotes bodyContent=$notes}
  128. </div>
  129. {/if}
  130. <div class="section">
  131. <h4>{$LANG.invoicelineitems}</h4>
  132. <div class="table-responsive">
  133. <table class="table table-hover">
  134. <thead>
  135. <tr>
  136. <th>{$LANG.invoicesdescription}</th>
  137. <th width="20%" class="text-center">{$LANG.invoicesamount}</th>
  138. </tr>
  139. </thead>
  140. <tbody>
  141. {foreach from=$invoiceitems item=item}
  142. <tr>
  143. <td>{$item.description}{if $item.taxed eq "true"} *{/if}</td>
  144. <td class="text-center">{$item.amount}</td>
  145. </tr>
  146. {/foreach}
  147. <tr>
  148. <td class="total-row text-right"><strong>{$LANG.invoicessubtotal}</strong></td>
  149. <td class="total-row text-center">{$subtotal}</td>
  150. </tr>
  151. {if $taxname}
  152. <tr>
  153. <td class="total-row text-right"><strong>{$taxrate}% {$taxname}</strong></td>
  154. <td class="total-row text-center">{$tax}</td>
  155. </tr>
  156. {/if}
  157. {if $taxname2}
  158. <tr>
  159. <td class="total-row text-right"><strong>{$taxrate2}% {$taxname2}</strong></td>
  160. <td class="total-row text-center">{$tax2}</td>
  161. </tr>
  162. {/if}
  163. <tr>
  164. <td class="total-row text-right"><strong>{$LANG.invoicescredit}</strong></td>
  165. <td class="total-row text-center">{$credit}</td>
  166. </tr>
  167. <tr class="active">
  168. <td class="total-row text-right"><strong>{$LANG.invoicestotal}</strong></td>
  169. <td class="total-row text-center">{$total}</td>
  170. </tr>
  171. </tbody>
  172. </table>
  173. </div>
  174. {if $taxrate}
  175. <p class="text-muted">* {$LANG.invoicestaxindicator}</p>
  176. {/if}
  177. </div>
  178. <div class="section">
  179. <h4>{$LANG.invoicestransactions}</h4>
  180. <div class="table-responsive">
  181. <table class="table table-hover">
  182. <thead>
  183. <tr>
  184. <th>{$LANG.invoicestransdate}</th>
  185. <th>{$LANG.invoicestransgateway}</th>
  186. <th>{$LANG.invoicestransid}</th>
  187. <th>{$LANG.invoicestransamount}</th>
  188. </tr>
  189. </thead>
  190. <tbody>
  191. {foreach from=$transactions item=transaction}
  192. <tr>
  193. <td>{$transaction.date}</td>
  194. <td>{$transaction.gateway}</td>
  195. <td>{$transaction.transid}</td>
  196. <td>{$transaction.amount}</td>
  197. </tr>
  198. {foreachelse}
  199. <tr>
  200. <td colspan="4">{$LANG.invoicestransnonefound}</td>
  201. </tr>
  202. {/foreach}
  203. <tr class="total-row active">
  204. <td></td>
  205. <td></td>
  206. <td><strong>{$LANG.invoicesbalance}</strong></td>
  207. <td>{$balance}</td>
  208. </tr>
  209. </tbody>
  210. </table>
  211. </div>
  212. </div>
  213. </div>
  214. </div>
  215. <div class="col-lg-3 sidebar d-print-none">
  216. {if $status eq "Unpaid"}
  217. <div menuitemname="Client Details" class="panel panel-sidebar panel-invoice-info">
  218. <div class="panel-body">
  219. <div class="total">
  220. <span class="text-muted">{$LANG.invoicestotaldue}</span>
  221. <span class="total-price">{$balance}</span>
  222. </div>
  223. {if $status eq "Unpaid" && $allowchangegateway}
  224. <label>{$LANG.orderpaymentmethod}:</label>
  225. <span data-role="paymethod-info">
  226. <form method="post" action="{$smarty.server.PHP_SELF}?id={$invoiceid}">
  227. <div class="form-group">
  228. {$gatewaydropdown}
  229. </div>
  230. </form>
  231. </span>
  232. {else}
  233. {$paymentmethod}{if $paymethoddisplayname} ({$paymethoddisplayname}){/if}
  234. {/if}
  235. {if $status eq "Unpaid" || $status eq "Draft"}
  236. <div class="payment-form" data-btntext="{$LANG.makepayment}" data-btnsubscribetext="Subscribe">
  237. {$paymentbutton}
  238. </div>
  239. {/if}
  240. </div>
  241. </div>
  242. {if $manualapplycredit}
  243. <div menuitemname="Add Funds" class="panel panel-sidebar panel-invoice-info panel-apply-credit">
  244. <div class="panel-body">
  245. <form method="post" action="{$smarty.server.PHP_SELF}?id={$invoiceid}">
  246. <input type="hidden" name="applycredit" value="true">
  247. <div class="total">
  248. <span class="text-muted">{$LANG.invoiceaddcreditdesc1}:</span>
  249. <span class="total-price">{$totalcredit}</span>
  250. </div>
  251. <div class="form-group">
  252. <label class="control-label">{$LANG.invoiceaddcreditamount}</label>
  253. <div class="input-group input-group-sm">
  254. <input type="text" name="creditamount" value="{$creditamount}" class="form-control" />
  255. <span class="input-group-append">
  256. <input type="submit" value="{$LANG.invoiceaddcreditapply}" class="btn btn-success" />
  257. </span>
  258. </div>
  259. </div>
  260. </form>
  261. </div>
  262. </div>
  263. {/if}
  264. {/if}
  265. <div menuitemname="Client Details" class="panel panel-sidebar">
  266. <div class="panel-heading">
  267. <h3 class="panel-title">
  268. <i class="fas fa-location-arrow"></i>&nbsp;{$LANG.actions}<i class="fas fa-chevron-up panel-minimise pull-right"></i>
  269. </h3>
  270. </div>
  271. <div class="list-group">
  272. <a href="javascript:window.print()" class="list-group-item list-group-item-action"><i class="fas fa-print fa-fw"></i>&nbsp;{$LANG.print}</a>
  273. <a href="dl.php?type=i&amp;id={$invoiceid}" class="list-group-item list-group-item-action"><i class="fas fa-download fa-fw"></i>&nbsp;{$LANG.invoicesdownload}</a>
  274. <a href="clientarea.php?action=invoices" class="list-group-item list-group-item-action"><i class="fas fa-chevron-double-left fa-fw"></i>&nbsp;{$LANG.goback}</a>
  275. </div>
  276. </div>
  277. </div>
  278. </div>
  279. {/if}
  280. </div>
  281. <div id="fullpage-overlay" class="w-hidden">
  282. <div class="outer-wrapper">
  283. <div class="inner-wrapper">
  284. <img src="{$WEB_ROOT}/assets/img/overlay-spinner.svg">
  285. <br>
  286. <span class="msg"></span>
  287. </div>
  288. </div>
  289. </div>
  290. <script>
  291. $(document).ready(function() {
  292. $(".payment-form").length > 0
  293. var s = $(".payment-form").data("btntext"),
  294. o = $(".payment-form").data("btnsubscribetext");
  295. $(".payment-form").find('input[type="image"]').attr("type", "submit").attr("value", s).addClass("btn btn-primary"),
  296. $(".payment-form").find('.btn').addClass("btn-sm"),
  297. $("#paynow").html(s).attr("style", "color: #fff").addClass("btn");
  298. var c = $(".payment-form").find("form").length;
  299. 2 == c && $(".payment-form").find("form:first").find('input[type="submit"]').attr("value", o)
  300. });
  301. </script>
  302. {if $themesettings.clientarea.viandq eq "outer-layout"}
  303. </body>
  304. </html>
  305. {else}
  306. {include file="{$template}/footer.tpl"}
  307. {/if}