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 6.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. @php
  2. $data = $this->form->getRawState();
  3. $viewModel = new \App\View\Models\InvoiceViewModel($this->record, $data);
  4. $viewSpecial = $viewModel->buildViewData();
  5. extract($viewSpecial,\EXTR_SKIP);
  6. @endphp
  7. {!! $font_html !!}
  8. <style>
  9. .inv-paper {
  10. font-family: '{{ $font_family }}', sans-serif;
  11. }
  12. </style>
  13. <x-company.invoice.container class="modern-template-container">
  14. <!-- Colored Header with Logo -->
  15. <x-company.invoice.header class="bg-gray-800 h-20">
  16. <!-- Logo -->
  17. <div class="w-2/3">
  18. @if($logo && $show_logo)
  19. <x-company.invoice.logo class="ml-6" :src="$logo"/>
  20. @endif
  21. </div>
  22. <!-- Ribbon Container -->
  23. <div class="w-1/3 absolute right-0 top-0 p-2 h-28 flex flex-col justify-end rounded-bl-sm"
  24. style="background: {{ $accent_color }};">
  25. @if($header)
  26. <h1 class="text-3xl font-bold text-white text-center uppercase">{{ $header }}</h1>
  27. @endif
  28. </div>
  29. </x-company.invoice.header>
  30. <!-- Company Details -->
  31. <x-company.invoice.metadata class="modern-template-metadata space-y-6">
  32. <div class="text-xs">
  33. <h2 class="text-base font-semibold">{{ $company_name }}</h2>
  34. @if($company_address && $company_city && $company_state && $company_zip)
  35. <p>{{ $company_address }}</p>
  36. <p>{{ $company_city }}, {{ $company_state }} {{ $company_zip }}</p>
  37. <p>{{ $company_country }}</p>
  38. @endif
  39. </div>
  40. <div class="flex justify-between items-end">
  41. <!-- Billing Details -->
  42. <div class="text-xs">
  43. <h3 class="text-gray-600 dark:text-gray-400 font-medium tracking-tight mb-1">BILL TO</h3>
  44. <p class="text-base font-bold" style="color: {{ $accent_color }}">John Doe</p>
  45. <p>123 Main Street</p>
  46. <p>New York, New York 10001</p>
  47. <p>United States</p>
  48. </div>
  49. <div class="text-xs">
  50. <table class="min-w-full">
  51. <tbody>
  52. <tr>
  53. <td class="font-semibold text-right pr-2">Invoice Number:</td>
  54. <td class="text-left pl-2">{{ $invoice_number }}</td>
  55. </tr>
  56. <tr>
  57. <td class="font-semibold text-right pr-2">Invoice Date:</td>
  58. <td class="text-left pl-2">{{ $invoice_date }}</td>
  59. </tr>
  60. <tr>
  61. <td class="font-semibold text-right pr-2">Payment Due:</td>
  62. <td class="text-left pl-2">{{ $invoice_due_date }}</td>
  63. </tr>
  64. </tbody>
  65. </table>
  66. </div>
  67. </div>
  68. </x-company.invoice.metadata>
  69. <!-- Line Items Table -->
  70. <x-company.invoice.line-items class="modern-template-line-items">
  71. <table class="w-full text-left table-fixed">
  72. <thead class="text-sm leading-8">
  73. <tr class="text-gray-600 dark:text-gray-400">
  74. <th class="text-left pl-6">{{ $item_name }}</th>
  75. <th class="text-center">{{ $unit_name }}</th>
  76. <th class="text-right">{{ $price_name }}</th>
  77. <th class="text-right pr-6">{{ $amount_name }}</th>
  78. </tr>
  79. </thead>
  80. <tbody class="text-xs border-t-2 border-b-2 leading-8">
  81. <tr class="bg-gray-100 dark:bg-gray-800">
  82. <td class="text-left pl-6 font-semibold">Item 1</td>
  83. <td class="text-center">2</td>
  84. <td class="text-right">$150.00</td>
  85. <td class="text-right pr-6">$300.00</td>
  86. </tr>
  87. <tr>
  88. <td class="text-left pl-6 font-semibold">Item 2</td>
  89. <td class="text-center">3</td>
  90. <td class="text-right">$200.00</td>
  91. <td class="text-right pr-6">$600.00</td>
  92. </tr>
  93. <tr class="bg-gray-100 dark:bg-gray-800">
  94. <td class="text-left pl-6 font-semibold">Item 3</td>
  95. <td class="text-center">1</td>
  96. <td class="text-right">$180.00</td>
  97. <td class="text-right pr-6">$180.00</td>
  98. </tr>
  99. </tbody>
  100. <tfoot class="text-xs leading-loose">
  101. <tr>
  102. <td class="pl-6" colspan="2"></td>
  103. <td class="text-right font-semibold">Subtotal:</td>
  104. <td class="text-right pr-6">$1080.00</td>
  105. </tr>
  106. <tr class="text-success-800 dark:text-success-600">
  107. <td class="pl-6" colspan="2"></td>
  108. <td class="text-right">Discount (5%):</td>
  109. <td class="text-right pr-6">($54.00)</td>
  110. </tr>
  111. <tr>
  112. <td class="pl-6" colspan="2"></td>
  113. <td class="text-right">Sales Tax (10%):</td>
  114. <td class="text-right pr-6">$102.60</td>
  115. </tr>
  116. <tr>
  117. <td class="pl-6" colspan="2"></td>
  118. <td class="text-right font-semibold border-t">Total:</td>
  119. <td class="text-right border-t pr-6">$1128.60</td>
  120. </tr>
  121. <tr>
  122. <td class="pl-6" colspan="2"></td>
  123. <td class="text-right font-semibold border-t-4 border-double">Amount Due (USD):</td>
  124. <td class="text-right border-t-4 border-double pr-6">$1128.60</td>
  125. </tr>
  126. </tfoot>
  127. </table>
  128. </x-company.invoice.line-items>
  129. <!-- Footer Notes -->
  130. <x-company.invoice.footer class="modern-template-footer">
  131. <h4 class="font-semibold px-6" style="color: {{ $accent_color }}">Terms & Conditions</h4>
  132. <span class="border-t-2 my-2 border-gray-300 block w-full"></span>
  133. <div class="flex justify-between space-x-4 px-6">
  134. <p class="w-1/2 break-words line-clamp-4">{{ $terms }}</p>
  135. <p class="w-1/2 break-words line-clamp-4">{{ $footer }}</p>
  136. </div>
  137. </x-company.invoice.footer>
  138. </x-company.invoice.container>