templates/fos/parcels/receipt/receipt_g03_pdf.html.twig line 1

Open in your IDE?
  1. {% block stylesheets %}
  2. <style>
  3. h6 {
  4. font-weight: bold;
  5. }
  6. h3 {
  7. /*font-size: 20px;*/
  8. }
  9. h5, h3, h4, p {
  10. padding: 0px;
  11. font-family: "Amaranth", sans-serif;
  12. background: #ffffff;
  13. }
  14. legend {
  15. border: none;
  16. padding: 5px;
  17. }
  18. .print-area h5, .print-area h3, .print-area h4 {
  19. padding: 0px;
  20. font-family: "Nova Flat", sans-serif;
  21. background: #ffffff;
  22. border: none;
  23. margin: 0;
  24. }
  25. .print-area p {
  26. font-size: 12px;
  27. padding: 4px;
  28. margin: 0px;
  29. line-height: 10px;
  30. border: none;
  31. }
  32. hr {
  33. margin-top: 1px;
  34. margin-bottom: 1px;
  35. border-top: 2px dashed rgba(0, 0, 0, 0.99);
  36. }
  37. .print-area hr {
  38. border-top: 1px dashed rgba(0, 0, 0, 0.99);
  39. }
  40. .print-area {
  41. width: 28%;
  42. background: white;
  43. /*border: 1px dotted;*/
  44. padding: 2%;
  45. display: block;
  46. /*background-color: firebrick;*/
  47. }
  48. .print-area table {
  49. font-family: 'Fjord One', serif;
  50. }
  51. element.style {
  52. }
  53. fieldset {
  54. display: block;
  55. margin-left: 0px;
  56. margin-right: 2px;
  57. border-top: 1px dotted black;
  58. }
  59. .kkk fieldset {
  60. float: right;
  61. width: 40%;
  62. }
  63. .detail {
  64. padding: 0px;
  65. font-size: 11px;
  66. border: none;
  67. }
  68. @media print {
  69. .sf-toolbar, .sf-display-none, .sf-minitoolbar {
  70. display: none;
  71. }
  72. .print-area {
  73. display: block;
  74. }
  75. @page {
  76. margin: 0 !important;
  77. }
  78. html {
  79. margin: 0 !important;
  80. }
  81. body {
  82. margin: 0 !important;
  83. }
  84. .print-area {
  85. width: 100%;
  86. }
  87. .pro {
  88. display: none;
  89. }
  90. .sf-toolbar, .sf-toolbarreset, .sf-minitoolbar {
  91. display: none;
  92. }
  93. /*.page-break {display: block; page-break-before: always }*/
  94. .page-break {
  95. page-break-before: avoid;
  96. }
  97. .page-break {
  98. page-break-after: always;
  99. }
  100. pre, blockquote {
  101. page-break-inside: avoid;
  102. }
  103. }
  104. .parcel {
  105. /*font-family: 'Big Shoulders Text', cursive;*/
  106. margin-bottom: 10px;
  107. /*margin-left: 10px;*/
  108. }
  109. .parcel h3, .parcel span {
  110. font-family: 'Merriweather', serif;
  111. margin-top: 15px;
  112. }
  113. .sender_receiver {
  114. }
  115. .destinations {
  116. float: left;
  117. width: auto;
  118. padding: 0px;
  119. font-family: 'Open Sans', sans-serif;
  120. margin-bottom: 15px;
  121. }
  122. .destinations h4, .destinations b {
  123. font-family: 'Merriweather', serif;
  124. }
  125. .destinations h3 {
  126. margin-bottom: 10px;
  127. }
  128. .description {
  129. font-size: 30px;
  130. /*margin-left: 10px;*/
  131. }
  132. .all_parcels {
  133. text-transform: uppercase;
  134. /*-ms-transform: rotate(90deg);*/
  135. /*-moz-transform: rotate(90deg);*/
  136. /*-webkit-transform: rotate(90deg);*/
  137. /*-o-transform: rotate(90deg);*/
  138. margin-top: 115px;
  139. width: 430px;
  140. margin-left: -60px;
  141. }
  142. .payment button, .print, .payment a {
  143. width: 150px;
  144. border-radius: 30px;
  145. }
  146. .payment .cash {
  147. float: right;
  148. }
  149. .payment .cash img {
  150. height: 20px;
  151. }
  152. .dropdown-menu > li.kopie > a {
  153. padding-left: 5px;
  154. }
  155. .dropdown-submenu {
  156. position: relative;
  157. }
  158. .dropdown-submenu > .dropdown-menu {
  159. top: 0;
  160. left: 100%;
  161. margin-top: -6px;
  162. margin-left: -1px;
  163. -webkit-border-radius: 0 6px 6px 6px;
  164. -moz-border-radius: 0 6px 6px 6px;
  165. border-radius: 0 6px 6px 6px;
  166. }
  167. .dropdown-submenu > a:after {
  168. border-color: transparent transparent transparent #333;
  169. border-style: solid;
  170. border-width: 5px 0 5px 5px;
  171. content: " ";
  172. display: block;
  173. float: right;
  174. height: 0;
  175. margin-right: -10px;
  176. margin-top: 5px;
  177. width: 0;
  178. }
  179. .dropdown-submenu:hover > a:after {
  180. border-left-color: #555;
  181. }
  182. .dropdown-menu > li > a:hover, .dropdown-menu > .active > a:hover {
  183. text-decoration: underline;
  184. }
  185. @media (max-width: 767px) {
  186. .navbar-nav {
  187. display: inline;
  188. }
  189. .navbar-default .navbar-brand {
  190. display: inline;
  191. }
  192. .navbar-default .navbar-toggle .icon-bar {
  193. background-color: #fff;
  194. }
  195. .navbar-default .navbar-nav .dropdown-menu > li > a {
  196. color: red;
  197. background-color: #ccc;
  198. border-radius: 4px;
  199. margin-top: 2px;
  200. }
  201. .navbar-default .navbar-nav .open .dropdown-menu > li > a {
  202. color: #333;
  203. }
  204. .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
  205. .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
  206. background-color: #ccc;
  207. }
  208. .navbar-nav .open .dropdown-menu {
  209. border-bottom: 1px solid white;
  210. border-radius: 0;
  211. }
  212. .dropdown-menu {
  213. padding-left: 10px;
  214. }
  215. .dropdown-menu .dropdown-menu {
  216. padding-left: 20px;
  217. }
  218. .dropdown-menu .dropdown-menu .dropdown-menu {
  219. padding-left: 30px;
  220. }
  221. li.dropdown.open {
  222. border: 0px solid red;
  223. }
  224. }
  225. @media (min-width: 768px) {
  226. ul.nav li:hover > ul.dropdown-menu {
  227. display: block;
  228. }
  229. #navbar {
  230. text-align: center;
  231. }
  232. }
  233. .dropdown-submenu .dropdown-menu li {
  234. font-size: 12px;
  235. }
  236. .invalid-feedback {
  237. color: orangered;
  238. font-size: 12px;
  239. }
  240. legend {
  241. display: block;
  242. max-width: 100%;
  243. width: auto;
  244. padding: 10px;
  245. margin-bottom: 5px;
  246. font-size: 12px;
  247. line-height: 1px;
  248. color: inherit;
  249. white-space: normal;
  250. border: 1px solid;
  251. /*font-family: "Nova Flat", Helvetica, Arial, sans-serif;*/
  252. font-family: "Amaranth", Monaco, Consolas, "Courier New", monospace;
  253. font-weight: bolder;
  254. }
  255. fieldset {
  256. display: block;
  257. margin-left: 0px;
  258. margin-right: 2px;
  259. margin-top: 10px;
  260. padding-left: 10px;
  261. /*padding-top: 0.35em;
  262. padding-bottom: 0.625em;
  263. padding-left: 0.75em;
  264. padding-right: 0.75em;*/
  265. border-top: 1px dotted black;
  266. }
  267. .datagrid-cell {
  268. text-transform: uppercase;
  269. }
  270. .datagrid-footer-inner {
  271. font-weight: bolder;
  272. }
  273. .datagrid-footer-inner .datagrid-cell {
  274. font-size: 20px;
  275. }
  276. .panel-footer {
  277. text-align: center;
  278. }
  279. h6 {
  280. font-weight: bold;
  281. }
  282. h3 {
  283. /*font-size: 20px;*/
  284. }
  285. h5, h3, h4, p {
  286. padding: 0px;
  287. font-family: "Amaranth", sans-serif;
  288. background: #ffffff;
  289. border: 1px dotted #cccccc;
  290. }
  291. legend {
  292. border: none;
  293. padding: 5px;
  294. }
  295. .print-area h5, .print-area h3, .print-area h4 {
  296. padding: 0px;
  297. font-family: "Nova Flat", sans-serif;
  298. background: #ffffff;
  299. border: none;
  300. margin: 0;
  301. }
  302. .print-area p {
  303. font-size: 12px;
  304. padding: 0px;
  305. margin: 0px;
  306. line-height: 10px;
  307. border: none;
  308. }
  309. hr {
  310. margin-top: 1px;
  311. margin-bottom: 1px;
  312. border-top: 2px dashed rgba(0, 0, 0, 0.99);
  313. }
  314. .print-area hr {
  315. border-top: 1px dashed rgba(0, 0, 0, 0.99);
  316. }
  317. .print-area {
  318. width: 28%;
  319. background: white;
  320. /*border: 1px dotted;*/
  321. padding: 2%;
  322. display: block;
  323. }
  324. .print-area table {
  325. font-family: monospace, monospace;
  326. }
  327. element.style {
  328. }
  329. fieldset {
  330. display: block;
  331. margin-left: 0px;
  332. margin-right: 2px;
  333. /*border: 1px dashed black;*/
  334. padding: 0px;
  335. }
  336. .detail {
  337. padding: 0px;
  338. font-size: 11px;
  339. border: none;
  340. }
  341. @media print {
  342. .print-area {
  343. display: block;
  344. }
  345. @page {
  346. margin: 0 !important;
  347. }
  348. html {
  349. margin: 0 !important;
  350. }
  351. body {
  352. margin: 0 !important;
  353. }
  354. .print-area {
  355. width: 100%;
  356. }
  357. .pro {
  358. display: none;
  359. }
  360. .sf-toolbar, .sf-toolbarreset, .sf-minitoolbar {
  361. display: none;
  362. }
  363. }
  364. table {
  365. border-collapse: collapse;
  366. }
  367. </style>
  368. {% endblock %}
  369. {% block body %}
  370. <div class="print-area" id="print-area">
  371. <div class="receipt-print" style="border: 1px solid black;">
  372. <div align="center">
  373. <img id="img.base-64" style="height: 80px;" src="{{ 'data:image/jpg;base64,'~logoBase64 }}" alt=""/>
  374. </div>
  375. <h5 style="text-align: center; align-content: center">NENO COURIER SERVICES LTD</h5>
  376. <p style="text-align: center; align-content: center; font-size: 10px">
  377. P.O BOX 660-60100 - EMBU <br/>
  378. TEL:{{ waybill.fromStation.stationName }}:{{ waybill.fromStation.phoneNumbers }}<br>
  379. {{ waybill.toStation.stationName }}: {{ waybill.toStation.phoneNumbers }} </p>
  380. <p style="text-align: center;">----------------------------------------------</p>
  381. <table style="width: 100%; font-size: 10px">
  382. <tr>
  383. <td align="right" style="width: 40%;">PIN:</td>
  384. <td>P051185384I</td>
  385. </tr>
  386. <tr>
  387. {% if transaction.pinNumber %}
  388. <td align="right">BUYERS PIN:</td>
  389. <td>{{ transaction.pinNumber | upper }}</td>
  390. {% endif %}
  391. </tr>
  392. </table>
  393. <div style="align-content: center; text-align: center; ">
  394. <p style="font-weight: bold; font-size: 10px; margin-bottom: 5px;">{{ receiptType }}</p>
  395. </div>
  396. <table style="width: 100%; border: 1px solid black; border-top: 1px dashed black; padding: 5px;">
  397. <thead>
  398. <tr>
  399. <td colspan="2" style="text-align: center; padding: 0px;">
  400. <p style="text-align: center; font-size: 10px;">{{ transaction.createdAt | date }}</p>
  401. <p style="font-size: 10px;"> WAYBILL/RCP#{{ waybill.id }}</p>
  402. </td>
  403. </tr>
  404. <tr>
  405. <td colspan="2" style="text-align: center; padding: 0px;">
  406. {# <barcode code="{{ waybill.id }}" height="0.66" type="EAN128C" text="1"/>#}
  407. {# <br>#}
  408. <p style='font-weight:bolder; font-size: 20px; font-family: "Amaranth", sans-serif'>{{ waybill.id }}</p>
  409. </td>
  410. </tr>
  411. </thead>
  412. </table>
  413. <table style="width: 100%; border: 1px solid black; padding: 5px;">
  414. <thead>
  415. <tr>
  416. <th style="text-align: left;">
  417. <h6>Parcel Value</h6>
  418. </th>
  419. <th style="text-align: right;">
  420. <h6>{{ waybill.parcelValue | number_format }}</h6>
  421. </th>
  422. </tr>
  423. </thead>
  424. </table>
  425. <table style="width: 100%; border: 1px solid black; padding: 5px;">
  426. <thead>
  427. <tr>
  428. <th style="text-align: left;">
  429. <h6>FROM</h6>
  430. </th>
  431. <th style="text-align: right;">
  432. <h6>TO</h6>
  433. </th>
  434. </tr>
  435. </thead>
  436. <tbody>
  437. <tr>
  438. <td style="font-size: 10px;">
  439. <div style="">
  440. <p style="font-weight: normal;">{{ waybill.senderName | upper }}</p>
  441. <p>{{ waybill.senderPhoneNumber }}</p>
  442. <p>{{ waybill.fromStation.stationName | upper }}</p>
  443. </div>
  444. </td>
  445. <td style="text-align: right; font-size: 10px;">
  446. <div style="">
  447. <p style="font-weight: normal; ">{{ waybill.receiverName | upper }}</p>
  448. <p>{{ waybill.receiverPhoneNumber }}</p>
  449. <p>{{ waybill.toStation.stationName | upper }}</p><br>
  450. </div>
  451. </td>
  452. </tr>
  453. </tbody>
  454. </table>
  455. {# <div style="text-align: center; margin-bottom: 0px;">- - - - - - - - - - - - - - - - - - - - - - - - -</div>#}
  456. <table style="margin-top: 1px; width:100%; margin-bottom: 0px; font-size: 10px;">
  457. {% for index, parcel in parcels %}
  458. <tr>
  459. <td><b style="font-size: 18px;">◾</b></td>
  460. <td colspan="2" style="font-size: 12px;">{{ parcel.description | slice(0,25) }} </td>
  461. <td align="right" style="font-size: 12px; padding-left: 5px; padding-right:5px;">1 x</td>
  462. <td align="right"
  463. style="font-size: 12px;">{{ (transaction.amount/waybill.percelCount) | number_format(2, '.', ',') }}</td>
  464. </tr>
  465. {% endfor %}
  466. </table>
  467. <div style="text-align: center; margin-bottom: 0px;">- - - - - - - - - - - - - - - - - - - - - - - - -</div>
  468. <table style="text-align: center; width: 100%; align-content: center;">
  469. <tr style="border-bottom: 1px solid black;">
  470. <td align="left" style="font-size: 10px;">TOTAL TAX EXCL</td>
  471. <td align="right"
  472. style="font-weight: bolder;font-size: 10px;">{{ (transaction.grossAmount - transaction.taxAmount) | number_format(2, '.', ',') }}</td>
  473. </tr>
  474. <tr>
  475. <td align="left" style="font-size: 10px;">TAXES 16%</td>
  476. <td align="right"
  477. style="font-weight: bolder;font-size: 10px;">{{ transaction.taxAmount | number_format(2, '.', ',') }}</td>
  478. </tr>
  479. </table>
  480. <div style="text-align: center; margin-bottom: -2px;"></div>
  481. <table style="text-align: center; width:100%; align-content: center;">
  482. <tr style="">
  483. <td align="left" style="font-weight: bold; font-size: 10px;">TOTAL AMOUNT</td>
  484. <td align="right"
  485. style="font-weight: bold; font-size: 10px;">{{ transaction.amount | number_format(2, '.', ',') }}</td>
  486. </tr>
  487. </table>
  488. {# <b style="text-align: center; margin-bottom: 0px;">- - - - - - - - - - - - - - - - - - - - - - - - -</b>#}
  489. <div style="border: 1px dotted; margin: 3px; padding: 2px;">
  490. <table style="width: 100%;">
  491. {% if transaction.paymentMethod == 'MPESA' %}
  492. <tr>
  493. <td style="text-align: left; font-size: 10px;">PAID IN</td>
  494. <td style="text-align: right; font-size: 10px;"> {{ transaction.paymentMethod }} [{{ mpesa.mpesa.transactionId }}]
  495. by {{ mpesa.mpesa.firstName | capitalize }}</td>
  496. </tr>
  497. {% elseif transaction.paymentMethod == 'MPESA_CASH' %}
  498. <tr>
  499. <td style="text-align: left;font-size: 10px;">PAID IN</td>
  500. <td style="text-align: right;font-size: 10px;"> {{ transaction.paymentMethod }} [{{ mpesa.mpesa.transactionId }}]
  501. by {{ mpesa.mpesa.firstName | capitalize }}</td>
  502. </tr>
  503. {% else %}
  504. <tr>
  505. <td style="text-align: left; font-size: 10px;">PAID IN</td>
  506. <td style="text-align: right; font-size: 10px;">CASH</td>
  507. </tr>
  508. {% endif %}
  509. </table>
  510. <table style="width: 100%;">
  511. <tr>
  512. <td style="text-align: left;font-size: 10px;">SERVED BY</td>
  513. <td style="text-align: right;font-size: 10px;">{{ by.preferredName | capitalize }}</td>
  514. </tr>
  515. </table>
  516. </div>
  517. <p>
  518. {# <b style="text-align: center;">- - - - - - - - - - - - - - - - - - - - - - - - -</b>#}
  519. {% if qrcode is defined %}
  520. <table>
  521. <tr>
  522. <td>
  523. <img id="img.base-64" style="width: 100px; height: 100px;" src="{{ 'data:image/png;base64,'~qrcode }}" alt=""/>
  524. </td>
  525. <td>
  526. <p style="width: 100%; font-weight: bold; font-size: 10px;">CONTROL UNIT </p>
  527. <p>-------------------------</p>
  528. <p style="font-size: 10px;"><b>SERIAL NUMBER</b></p>
  529. {# <p style="font-size: 10px; font-weight: normal;">KRAMW011202207060805</p>#}
  530. {# <p style="font-size: 10px; font-weight: normal;">KRAMW011202207060805</p>#}
  531. {# <p style="font-size: 10px; font-weight: normal;">KRAMW011202207061147</p>#}
  532. <p style="font-size: 10px; font-weight: normal;">{{ transaction.cuSerialNumber }}</p>
  533. <p style="font-size: 10px;"><b>INVOICE NUMBER</b></p>
  534. <p style="font-size: 10px;font-weight: normal;">{{ timsInvoiceNumber }}</p>
  535. </td>
  536. </tr>
  537. </table>
  538. {% endif %}
  539. <div style="text-align: center;">
  540. <p>
  541. <i>"<b>Thank you</b> for choosing <br> Neno Courier Services."</i>
  542. </p>
  543. <p><i>Have an awesome
  544. {% set currentHour = (waybill.createdAt | date('H')) %}
  545. {% if currentHour > 0 and currentHour < 12 %}
  546. day
  547. {% elseif currentHour >= 12 and currentHour < 15 %}
  548. afternoon
  549. {% elseif currentHour >= 16 and currentHour < 23 %}
  550. evening
  551. {% endif %}
  552. </i></p>
  553. </div>
  554. </div>
  555. {% for parcel in parcels %}
  556. <div class="page-break" style="margin-top:0px;"></div>
  557. <div style="border: 1px solid black;">
  558. <div style="text-align: center; margin-bottom: 1px; margin-top:1px; border: 1px solid black;">
  559. <h3>NENO COURIER SERVICES</h3>
  560. <p style="text-align: center; align-content: center; ">P.O BOX 660-60100,
  561. Tel:{{ waybill.fromStation.stationName }}:
  562. <b style="font-family: 'Merriweather', serif;"> {{ waybill.fromStation.phoneNumbers }}</b>
  563. {{ waybill.toStation.stationName }}:
  564. <b>{{ waybill.toStation.phoneNumbers }}</b>
  565. </p>
  566. <h1 style="margin: 1px; padding: 0px;"><b style="font-weight: bold; font-family: serif">{{ waybill.id }}</b>
  567. </h1>
  568. <div style="text-align: center; margin-bottom: 1px;">
  569. <barcode code="{{ waybill.id }}" size="2" type="I25" text="1"/>
  570. <h4><b>{{ waybill.id }}</b></h4>
  571. </div>
  572. <p align="center">{{ transaction.createdAt | date }}</p>
  573. <h5>by:{{ waybill.createdBy.person.preferredName }}</h5>
  574. <hr>
  575. </div>
  576. <table rotate="90" style="padding-top:50px; border-collapse: collapse;">
  577. <thead>
  578. <tr>
  579. <th colspan="2">
  580. <div style="font-size: 45px;">
  581. {{ waybill.toStation }} -
  582. {% if waybill.fromStation.id < 10 %}
  583. 00{{ waybill.fromStation.id }}
  584. {% elseif waybill.fromStation.id > 9 and waybill.fromStation.id < 100 %}
  585. 0{{ waybill.fromStation.id }}
  586. {% else %}
  587. {{ waybill.fromStation.id }}
  588. {% endif %}
  589. </div>
  590. </th>
  591. </tr>
  592. <tr>
  593. <th colspan="2">
  594. <h3 style="width: 400px; font-weight: normal; ">
  595. {# {% set receiverP = waybill.receiverPhoneNumber | split(' ') %}
  596. {{ receiverP[0] ~ ' *** '~receiverP[2] }}#}
  597. {{ waybill.receiverPhoneNumber }}
  598. <span>KES{{ transaction.amount }}</span>
  599. </h3>
  600. </th>
  601. </tr>
  602. </thead>
  603. <tbody>
  604. <tr style="border-bottom: 1px solid black;">
  605. <th style="border-bottom: 1px solid black;">
  606. <h6 style="text-align: left">FROM</h6>
  607. </th>
  608. <th style="border-bottom: 1px solid black;">
  609. <h6 style="text-align: left">TO</h6>
  610. </th>
  611. </tr>
  612. <tr>
  613. <td style="border-bottom: 1px solid black;">
  614. <div class="destinations">
  615. <h4 style="font-weight: bold;">{{ waybill.senderName | upper }}</h4>
  616. <h5>
  617. {# {% set senderP = waybill.senderPhoneNumber | split(' ') %}#}
  618. {# {{ senderP[0] ~ ' *** '~senderP[2] }}#}
  619. {{ waybill.senderPhoneNumber }}
  620. </h5>
  621. <h5>{{ waybill.fromStation.stationName }}</h5>
  622. </div>
  623. </td>
  624. <td style="border-bottom: 1px solid black;">
  625. <div class="destinations">
  626. <h4 style="font-weight: bold;">{{ waybill.receiverName | upper }}</h4>
  627. <h5>
  628. {# {% set receiverP = waybill.receiverPhoneNumber | split(' ') %}
  629. {{ receiverP[0] ~ ' *** '~receiverP[2] }}#}
  630. {{ waybill.receiverPhoneNumber }}
  631. </h5>
  632. <h5>{{ waybill.toStation.stationName }}</h5>
  633. </div>
  634. </td>
  635. </tr>
  636. <tr>
  637. <td colspan="2">
  638. <div class="description">
  639. <div style="font-size: 25px;">
  640. {{ parcel.description | slice(0, 70) }}
  641. {% if parcel.description|length > 70 %}
  642. ...
  643. {% endif %}
  644. </div>
  645. <br>
  646. </div>
  647. </td>
  648. </tr>
  649. </tbody>
  650. </table>
  651. </div>
  652. {% endfor %}
  653. </div>
  654. {% endblock %}