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.

default.blade.php 5.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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: Logo on the left and Company details on the right -->
  16. <div class="flex mb-4">
  17. <div class="w-2/5">
  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. <!-- Company Details -->
  25. <div class="w-3/5">
  26. <div class="text-xs text-gray-600 dark:text-gray-200 text-right space-y-1">
  27. <h2 class="text-xl font-bold text-gray-800 dark:text-white">{{ $company_name }}</h2>
  28. @if($company_address && $company_city && $company_state && $company_zip)
  29. <p>{{ $company_address }}</p>
  30. <p>{{ $company_city }}, {{ $company_state }} {{ $company_zip }}</p>
  31. <p>{{ $company_country }}</p>
  32. @endif
  33. </div>
  34. </div>
  35. </div>
  36. <!-- Border Line -->
  37. <div class="border-b-2 my-4" style="border-color: {{ $accent_color }}"></div>
  38. <!-- Invoice Details -->
  39. <div class="flex mb-4">
  40. <div class="w-2/5">
  41. <div class="text-left">
  42. <h1 class="text-3xl font-semibold text-gray-800 dark:text-white">{{ $header }}</h1>
  43. @if ($subheader)
  44. <p class="text-sm text-gray-600 dark:text-gray-100">{{ $subheader }}</p>
  45. @endif
  46. </div>
  47. </div>
  48. <div class="w-3/5">
  49. <div class="text-right">
  50. <p>
  51. <span class="text-xs font-semibold text-gray-500 dark:text-gray-100">No: </span>
  52. <span class="text-xs text-gray-700 dark:text-white">{{ $invoice_number }}</span>
  53. </p>
  54. <p>
  55. <span class="text-xs font-semibold text-gray-500 dark:text-gray-100">Date: </span>
  56. <span class="text-xs text-gray-500 dark:text-white">{{ $invoice_date }}</span>
  57. </p>
  58. <p>
  59. <span class="text-xs font-semibold text-gray-500 dark:text-gray-100">Due Date: </span>
  60. <span class="text-xs text-gray-500 dark:text-white">{{ $invoice_due_date }}</span>
  61. </p>
  62. </div>
  63. </div>
  64. </div>
  65. <!-- Billing Details -->
  66. <div class="text-xs text-gray-600 dark:text-gray-200 mb-4">
  67. <h3 class="text-base font-semibold text-gray-600 dark:text-gray-200 mb-2">BILL TO</h3>
  68. <p class="text-sm text-gray-800 dark:text-white font-semibold">John Doe</p>
  69. <p>123 Main Street</p>
  70. <p>New York, NY 10001</p>
  71. </div>
  72. <!-- Line Items Table -->
  73. <div class="mb-4">
  74. <table class="w-full border-collapse text-sm">
  75. <thead>
  76. <tr style="color: {{ $accent_color }}">
  77. <th class="text-left p-2 w-1/2">{{ $item_name }}</th>
  78. <th class="text-center p-2 w-1/6">{{ $unit_name }}</th>
  79. <th class="text-center p-2 w-1/6">{{ $price_name }}</th>
  80. <th class="text-center p-2 w-1/6">{{ $amount_name }}</th>
  81. </tr>
  82. </thead>
  83. <tbody>
  84. <tr class="bg-gray-200/75 dark:bg-gray-800">
  85. <td class="p-2">Item 1</td>
  86. <td class="p-2 text-center">2</td>
  87. <td class="p-2 text-center">$150.00</td>
  88. <td class="p-2 text-center">$300.00</td>
  89. </tr>
  90. <tr>
  91. <td class="p-2">Item 2</td>
  92. <td class="p-2 text-center">3</td>
  93. <td class="p-2 text-center">$200.00</td>
  94. <td class="p-2 text-center">$600.00</td>
  95. </tr>
  96. <tr class="bg-gray-200/75 dark:bg-gray-800">
  97. <td class="p-2">Item 3</td>
  98. <td class="p-2 text-center">1</td>
  99. <td class="p-2 text-center">$200.00</td>
  100. <td class="p-2 text-center">$200.00</td>
  101. </tr>
  102. </tbody>
  103. </table>
  104. </div>
  105. <!-- Total Amount -->
  106. <div class="text-right mb-8">
  107. <p class="text-sm text-gray-600 dark:text-gray-200">Subtotal: $1100.00</p>
  108. <p class="text-sm text-gray-600 dark:text-gray-200">Tax: $110.00</p>
  109. <p class="text-lg font-semibold text-gray-800 dark:text-white">Total: $1210.00</p>
  110. </div>
  111. <!-- Footer Notes -->
  112. <div class="pt-6 text-gray-600 dark:text-gray-300 text-xs">
  113. <p>{{ $footer }}</p>
  114. <div class="mt-2 border-t-2 border-gray-300 py-2">
  115. <h4 class="font-semibold text-gray-700 dark:text-gray-100 mb-2">Terms & Conditions:</h4>
  116. <p>{{ $terms }}</p>
  117. </div>
  118. </div>
  119. </div>
  120. </div>