receipt.blade.php 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <div class="modal-content" style='width:60%;margin:0 auto !important'>
  2. <div class="modal-header">
  3. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
  4. <h4 class="modal-title">Payment Receipt &nbsp;&nbsp;&nbsp;
  5. <span id="print" style="cursor: pointer;"><i class="fa fa-print"></i> </span> &nbsp;&nbsp;&nbsp;
  6. </h4>
  7. </div>
  8. <style type="text/css">
  9. #table_details{
  10. width: 100%;
  11. margin-bottom: 15px;
  12. }
  13. #table_details tr td{
  14. width: 50%;
  15. padding:5px 13px;
  16. }
  17. #table_details tr td b{
  18. width:100px;
  19. }
  20. </style>
  21. <div class="modal-body" style="padding: 10px 20px;width: 80%;margin:auto;" id="printableArea">
  22. <div class="invoice-box" style="border:1px solid #f1e4e4;">
  23. <table style="background: #edf5f4;width: 100%;height: 55px;border-bottom: 1px solid #f1e4e4;">
  24. <tr>
  25. <td class="text-center" style="border-right: 1px solid #f1e4e4;width: 60%;font-size: 22px;"> Electronic Business Solution ltd. </td>
  26. <td>
  27. <ul class="text-center" style="font-size:20px;border-bottom: 1px solid #f1e4e4;padding: 6px 0px;margin: 0px;font-weight: 600;">SALARY SLIP</ul>
  28. <ul class="text-center" style="font-size:14px;padding: 3px 0px;margin: 0px;font-weight: 600;">{{ date("F Y", strtotime(@$pay->date)) }}</ul>
  29. </td>
  30. </tr>
  31. </table>
  32. <table id="table_details" style="margin-top: 10px;">
  33. <tr>
  34. <td><b>Full Name </b>: {{$emp->name}}</td>
  35. <td><b>Designation </b>: {{$emp_details->designation->name}}</td>
  36. </tr>
  37. </table>
  38. <table class="table table-bordered" style="border-bottom: 1px solid #f1e4e4;">
  39. <thead>
  40. <tr>
  41. <th class="text-center">Description</th>
  42. <th class="text-center">Amount</th>
  43. </tr>
  44. </thead>
  45. <tbody>
  46. @foreach($single->psHead as $data)
  47. <tr>
  48. <td class="text-left" style="width: 40%;">{{$data->head->name}}</td>
  49. <td class="text-right">{{ number_format($data->amount,2) }}</td>
  50. </tr>
  51. @endforeach
  52. <tr>
  53. <th class="text-center">Total</th>
  54. <td class="text-right">{{ number_format($pay->gross_amount,2) }} TK.</td>
  55. </tr>
  56. <tr style="background: #edf5f4;">
  57. <th class="text-center">Paid Amount</th>
  58. <td class="text-right"> {{ number_format($pay->paid_amount,2) }} TK.</td>
  59. </tr>
  60. @if($pay->gross_amount > $pay->paid_amount)
  61. <tr style="background: #edf5f4;">
  62. <th class="text-center">Due</th>
  63. <td class="text-right">{{ number_format($pay->gross_amount - $pay->paid_amount,2) }} TK.</td>
  64. </tr>
  65. @endif
  66. </tbody>
  67. </table>
  68. <table id="table_details" style="margin-bottom:60px;">
  69. <tr>
  70. <td class="text-left">
  71. <ul>Payment Date <span style="padding-left: 10px;padding-right: 10px;">: </span> {{ date("d M Y", strtotime(@$pay->updated_at)) }}</ul>
  72. {{-- <ul>Media <span style="padding-left: 72px;">:</span></ul> --}}
  73. </td>
  74. <td class="text-center">Signature</td>
  75. </tr>
  76. </table>
  77. </div>
  78. </div>
  79. </div>
  80. <script src="{{ asset('/assets/') }}/print/printThis.js"></script>
  81. <script type="text/javascript">
  82. $(document).ready(function() {
  83. $('#btn_email').click(function(e){
  84. e.preventDefault();
  85. var inv_id=$(this).data('inv_id');
  86. $.ajax({
  87. url: '{{ url('invoice/invoice_created_email') }}/'+inv_id,
  88. type: 'GET'
  89. })
  90. .done(function(res) {
  91. alert('Email sent successfully !')
  92. });
  93. });
  94. });
  95. </script>
  96. <script>
  97. $('#print').click(function(e){
  98. $('#printableArea').printThis({
  99. debug: false, // show the iframe for debugging
  100. importCSS: true, // import page CSS
  101. importStyle: true, // import style tags
  102. printContainer: true, // path to additional css file - use an array [] for multiple
  103. pageTitle: "SALARY SLIP", // add title to print page
  104. removeInline: false, // remove all inline styles from print elements
  105. printDelay: 33, // variable print delay
  106. header: null, // prefix to html
  107. footer: null, // postfix to html
  108. base: false , // preserve the BASE tag, or accept a string for the URL
  109. formValues: true, // preserve input/form values
  110. canvas: false, // copy canvas elements (experimental)
  111. doctypeString: "", // enter a different doctype for older markup
  112. removeScripts: false, // remove script tags from print content
  113. copyTagClasses: false // copy classes from the html & body tag
  114. });
  115. });
  116. </script>