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.

modern.blade.php 7.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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. <!-- Colored Header with Logo -->
  16. <div class="flex">
  17. <div class="text-white py-3 flex items-start justify-start bg-gray-800" style="height: 80px; width: 85%;">
  18. @if($logo && $show_logo)
  19. <div class="text-left">
  20. <img src="{{ \Illuminate\Support\Facades\URL::asset($logo) }}" alt="logo" style="width: 120px; height: auto">
  21. </div>
  22. @endif
  23. </div>
  24. <!-- Ribbon Container -->
  25. <div class="text-white flex flex-col justify-end p-2" style="background: {{ $accent_color }}; width: 30%; height: 120px; margin-left: -15%;">
  26. @if($header)
  27. <div class="text-center align-bottom">
  28. <h1 class="text-3xl font-bold">{{ $header }}</h1>
  29. </div>
  30. @endif
  31. </div>
  32. </div>
  33. <!-- Company Details -->
  34. <div class="flex justify-between">
  35. <div class="text-xs text-gray-600 dark:text-gray-200 space-y-1">
  36. <h2 class="text-xl font-bold text-gray-800 dark:text-white">{{ $company_name }}</h2>
  37. @if($company_address && $company_city && $company_state && $company_zip)
  38. <p>{{ $company_address }}</p>
  39. <p>{{ $company_city }}, {{ $company_state }} {{ $company_zip }}</p>
  40. <p>{{ $company_country }}</p>
  41. @endif
  42. </div>
  43. <table class="mt-6" style="width: 35%; height: 100px">
  44. <thead class="border-b-2" style="border-color: {{ $accent_color }}">
  45. <tr class="p-1">
  46. <th class="text-xs text text-gray-500 text-right">Total Due</th>
  47. <th class="text-xs text-gray-500 text-left">:</th>
  48. <th class="text-sm font-semibold text-gray-800 dark:text-white text-right">USD $1100.00</th>
  49. </tr>
  50. </thead>
  51. <tr>
  52. <td colspan="3" class="py-1"></td>
  53. </tr>
  54. <tbody class="text-xs text-gray-500 dark:text-white">
  55. <tr class="p-1">
  56. <td class="text-right">Invoice No</td>
  57. <td class="text-left">:</td>
  58. <td class="text-right">{{ $invoice_number }}</td>
  59. </tr>
  60. <tr class="p-1">
  61. <td class="text-right">Invoice Date</td>
  62. <td class="text-left">:</td>
  63. <td class="text-right">{{ $invoice_date }}</td>
  64. </tr>
  65. <tr class="p-1">
  66. <td class="text-right">Invoice Due</td>
  67. <td class="text-left">:</td>
  68. <td class="text-right">{{ $invoice_due_date }}</td>
  69. </tr>
  70. </tbody>
  71. </table>
  72. </div>
  73. <!-- Billing Details -->
  74. <div class="text-xs text-gray-600 dark:text-gray-200 mb-4">
  75. <h3 class="text-base font-semibold text-gray-600 dark:text-gray-200 tracking-tight mb-2">BILL TO</h3>
  76. <p class="text-lg font-semibold" style="color: {{ $accent_color }}">John Doe</p>
  77. <p>123 Main Street</p>
  78. <p>New York, NY 10001</p>
  79. </div>
  80. <!-- Line Items Table -->
  81. <div class="mb-8">
  82. <table class="w-full border-collapse text-sm">
  83. <thead style="background: {{ $accent_color }};">
  84. <tr class="text-[#ffffff]">
  85. <th class="text-left p-2 w-1/12">No</th>
  86. <th class="text-left p-2 w-7/12">{{ $item_name }}</th>
  87. <th class="text-left p-2 w-1/6">{{ $unit_name }}</th>
  88. <th class="text-left p-2 w-1/6">{{ $price_name }}</th>
  89. <th class="text-left p-2 w-1/6">{{ $amount_name }}</th>
  90. </tr>
  91. </thead>
  92. <tbody class="text-xs">
  93. <tr class="border-b border-gray-300">
  94. <td class="p-2 bg-gray-100 dark:bg-gray-800">01</td>
  95. <td class="p-2">Item 1</td>
  96. <td class="p-2 bg-gray-100 dark:bg-gray-800">2</td>
  97. <td class="p-2">$150.00</td>
  98. <td class="p-2 bg-gray-100 dark:bg-gray-800">$300.00</td>
  99. </tr>
  100. <tr class="border-b border-gray-300">
  101. <td class="p-2 bg-gray-100 dark:bg-gray-800">02</td>
  102. <td class="p-2">Item 2</td>
  103. <td class="p-2 bg-gray-100 dark:bg-gray-800">3</td>
  104. <td class="p-2">$200.00</td>
  105. <td class="p-2 bg-gray-100 dark:bg-gray-800">$600.00</td>
  106. </tr>
  107. <tr class="border-b border-gray-300">
  108. <td class="p-2 bg-gray-100 dark:bg-gray-800">03</td>
  109. <td class="p-2">Item 3</td>
  110. <td class="p-2 bg-gray-100 dark:bg-gray-800">1</td>
  111. <td class="p-2">$180.00</td>
  112. <td class="p-2 bg-gray-100 dark:bg-gray-800">$180.00</td>
  113. </tr>
  114. <tr>
  115. <td class="p-2"></td>
  116. <td class="p-2"></td>
  117. <td class="p-2"></td>
  118. <td class="p-2">Subtotal:</td>
  119. <td class="p-2 bg-gray-100 dark:bg-gray-800">$1000.00</td>
  120. </tr>
  121. <tr>
  122. <td class="p-2"></td>
  123. <td class="p-2"></td>
  124. <td class="p-2"></td>
  125. <td class="p-2">Tax:</td>
  126. <td class="p-2 bg-gray-100 dark:bg-gray-800">$100.00</td>
  127. </tr>
  128. <tr>
  129. <td class="p-2"></td>
  130. <td class="p-2"></td>
  131. <td class="p-2"></td>
  132. <td class="p-2">Total:</td>
  133. <td class="p-2 bg-gray-100 dark:bg-gray-800">$1100.00</td>
  134. </tr>
  135. </tbody>
  136. </table>
  137. </div>
  138. <!-- Footer Notes -->
  139. <div class="text-gray-600 dark:text-gray-300 text-xs">
  140. <h4 class="font-semibold text-gray-700 dark:text-gray-100 mb-2" style="color: {{ $accent_color }}">Terms & Conditions:</h4>
  141. <div class="flex mt-2 justify-between py-2 border-t-2 border-gray-300">
  142. <div class="w-1/2">
  143. <p>{{ $terms }}</p>
  144. </div>
  145. <div class="w-1/2 text-right">
  146. <p>{{ $footer }}</p>
  147. </div>
  148. </div>
  149. </div>
  150. </div>
  151. </div>