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.

classic.blade.php 6.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. @php
  2. $data = $this->form->getRawState();
  3. $viewModel = new \App\View\Models\InvoiceViewModel($this->record, $data);
  4. $viewSpecial = $viewModel->buildViewData();
  5. extract($viewSpecial);
  6. @endphp
  7. {!! $font_html !!}
  8. <style>
  9. .paper {
  10. font-family: '{{ $font_family }}', sans-serif;
  11. }
  12. </style>
  13. <div class="print-template flex justify-center p-6">
  14. <div class="paper bg-[#ffffff] dark:bg-gray-950 p-8 rounded-lg shadow-[0_0_10px_rgba(0,0,0,0.1)] w-[612px] h-[791px]">
  15. <!-- Header Section -->
  16. <div class="flex justify-between items-start pb-3">
  17. <!-- Logo -->
  18. <div style="width: 20%;" class="text-left">
  19. @if($logo && $show_logo)
  20. <img src="{{ URL::asset($logo) }}" alt="logo" style="width: 100%; height: auto">
  21. @endif
  22. </div>
  23. <!-- Company Details -->
  24. <div style="width: 60%;" class="text-right text-xs text-gray-600 dark:text-gray-200 space-y-1">
  25. <h2 class="text-xl font-bold text-gray-800 dark:text-white">{{ $company_name }}</h2>
  26. @if($company_address && $company_city && $company_state)
  27. <p>{{ $company_address }}</p>
  28. <p>{{ $company_city }}, {{ $company_state }} {{ $company_zip }}</p>
  29. <p>{{ $company_country }}</p>
  30. @endif
  31. </div>
  32. </div>
  33. <!-- Empty line for spacing -->
  34. <div class="my-4"></div>
  35. <!-- Invoice Title/Header Centered -->
  36. <div class="text-center" style="height: 60px;">
  37. <h1 class="text-3xl font-semibold text-gray-800 dark:text-white">{{ $header }}</h1>
  38. @if ($subheader)
  39. <p class="text-sm text-gray-600">{{ $subheader }}</p>
  40. @endif
  41. </div>
  42. <!-- Billing and Invoice Summary -->
  43. <div class="flex justify-between pt-4">
  44. <!-- Label for Billing and Invoice Details -->
  45. <div class="text-base text-gray-600 dark:text-gray-200 mb-2">
  46. <h4 class="font-semibold">Bill To:</h4>
  47. </div>
  48. </div>
  49. <div class="flex justify-between" style="height: 60px;">
  50. <!-- Billing Details -->
  51. <table style="width: 65%">
  52. <tbody class="text-xs text-left p-1">
  53. <tr>
  54. <td>John Doe</td>
  55. </tr>
  56. <tr>
  57. <td>123 Main Street</td>
  58. </tr>
  59. <tr>
  60. <td>New York, NY 10001</td>
  61. </tr>
  62. </tbody>
  63. </table>
  64. <!-- Invoice Details -->
  65. <table style="width: 35%">
  66. <tbody class="text-xs text-right p-1">
  67. <tr>
  68. <td>Invoice No:</td>
  69. <td>{{ $invoice_number }}</td>
  70. </tr>
  71. <tr>
  72. <td>Invoice Date:</td>
  73. <td>{{ $invoice_date }}</td>
  74. </tr>
  75. <tr>
  76. <td>Invoice Due:</td>
  77. <td>{{ $invoice_due_date }}</td>
  78. </tr>
  79. </tbody>
  80. </table>
  81. </div>
  82. <!-- Line Items -->
  83. <div class="my-8">
  84. <table class="w-full text-sm border-collapse">
  85. <thead class="border-b-2">
  86. <tr>
  87. <th class="p-2 w-1/12 text-center">#</th>
  88. <th class="p-2 w-5/12 text-left">{{ $item_name }}</th>
  89. <th class="p-2 w-2/12 text-right">{{ $unit_name }}</th>
  90. <th class="p-2 w-2/12 text-right">{{ $price_name }}</th>
  91. <th class="p-2 w-2/12 text-right">{{ $amount_name }}</th>
  92. </tr>
  93. </thead>
  94. <tbody class="text-xs">
  95. <tr class="border-b">
  96. <td class="p-2 text-center">1</td>
  97. <td class="p-2 text-left">Web Development</td>
  98. <td class="p-2 text-right">10</td>
  99. <td class="p-2 text-right">$100.00</td>
  100. <td class="p-2 text-right">$1000.00</td>
  101. </tr>
  102. <tr class="border-b">
  103. <td class="p-2 text-center">2</td>
  104. <td class="p-2 text-left">Consulting</td>
  105. <td class="p-2 text-right">5</td>
  106. <td class="p-2 text-right">$200.00</td>
  107. <td class="p-2 text-right">$1000.00</td>
  108. </tr>
  109. <tr class="border-b">
  110. <td class="p-2 text-center">3</td>
  111. <td class="p-2 text-left">Design Services</td>
  112. <td class="p-2 text-right">8</td>
  113. <td class="p-2 text-right">$125.00</td>
  114. <td class="p-2 text-right">$1000.00</td>
  115. </tr>
  116. </tbody>
  117. </table>
  118. <!-- Financial Details and Notes -->
  119. <div class="flex justify-between text-xs">
  120. <!-- Notes Section -->
  121. <div class="w-8/12 border rounded p-2 mt-4">
  122. <h4 class="font-semibold mb-2">Notes:</h4>
  123. <p>{{ $footer }}</p>
  124. </div>
  125. <!-- Financial Summary -->
  126. <div class="w-4/12 mt-2">
  127. <table class="w-full border-collapse">
  128. <tbody class="text-right">
  129. <tr>
  130. <td class="p-2">Subtotal:</td>
  131. <td class="p-2">$3000.00</td>
  132. </tr>
  133. <tr>
  134. <td class="p-2">Tax:</td>
  135. <td class="p-2">$300.00</td>
  136. </tr>
  137. <tr>
  138. <td class="p-2">Total:</td>
  139. <td class="p-2">$3300.00</td>
  140. </tr>
  141. </tbody>
  142. </table>
  143. </div>
  144. </div>
  145. </div>
  146. <!-- Footer -->
  147. <div class="flex justify-between mt-8 border-t-2 pt-4">
  148. <div class="text-xs text-gray-600 dark:text-gray-300">
  149. <h4 class="font-semibold mb-2">Terms & Conditions:</h4>
  150. <p>{{ $terms }}</p>
  151. </div>
  152. </div>
  153. </div>
  154. </div>