viewinvoice.tpl 13 KB

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