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.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <x-company.invoice.container class="modern-template-container">
  2. <!-- Colored Header with Logo -->
  3. <x-company.invoice.header class="bg-gray-800 h-24">
  4. <!-- Logo -->
  5. <div class="w-2/3">
  6. @if($document->logo && $document->showLogo)
  7. <x-company.invoice.logo class="ml-8" :src="$document->logo"/>
  8. @endif
  9. </div>
  10. <!-- Ribbon Container -->
  11. <div class="w-1/3 absolute right-0 top-0 p-3 h-32 flex flex-col justify-end rounded-bl-sm"
  12. style="background: {{ $document->accentColor }};">
  13. @if($document->header)
  14. <h1 class="text-4xl font-bold text-white text-center uppercase">{{ $document->header }}</h1>
  15. @endif
  16. </div>
  17. </x-company.invoice.header>
  18. <!-- Company Details -->
  19. <x-company.invoice.metadata class="modern-template-metadata space-y-8">
  20. <div class="text-sm">
  21. <h2 class="text-lg font-semibold">{{ $document->company->name }}</h2>
  22. @if($formattedAddress = $document->company->getFormattedAddressHtml())
  23. {!! $formattedAddress !!}
  24. @endif
  25. </div>
  26. <div class="flex justify-between items-end">
  27. <!-- Billing Details -->
  28. <div class="text-sm tracking-tight">
  29. <h3 class="text-gray-600 dark:text-gray-400 font-medium tracking-tight mb-1">BILL TO</h3>
  30. <p class="text-base font-bold"
  31. style="color: {{ $document->accentColor }}">{{ $document->client->name }}</p>
  32. @if($formattedAddress = $document->client->getFormattedAddressHtml())
  33. {!! $formattedAddress !!}
  34. @endif
  35. </div>
  36. <div class="text-sm tracking-tight">
  37. <table class="min-w-full">
  38. <tbody>
  39. <tr>
  40. <td class="font-semibold text-right pr-2">{{ $document->label->number }}:</td>
  41. <td class="text-left pl-2">{{ $document->number }}</td>
  42. </tr>
  43. @if($document->referenceNumber)
  44. <tr>
  45. <td class="font-semibold text-right pr-2">{{ $document->label->referenceNumber }}:</td>
  46. <td class="text-left pl-2">{{ $document->referenceNumber }}</td>
  47. </tr>
  48. @endif
  49. <tr>
  50. <td class="font-semibold text-right pr-2">{{ $document->label->date }}:</td>
  51. <td class="text-left pl-2">{{ $document->date }}</td>
  52. </tr>
  53. <tr>
  54. <td class="font-semibold text-right pr-2">{{ $document->label->dueDate }}:</td>
  55. <td class="text-left pl-2">{{ $document->dueDate }}</td>
  56. </tr>
  57. </tbody>
  58. </table>
  59. </div>
  60. </div>
  61. </x-company.invoice.metadata>
  62. <!-- Line Items Table -->
  63. <x-company.invoice.line-items class="modern-template-line-items">
  64. <table class="w-full text-left table-fixed">
  65. <thead class="text-sm leading-relaxed">
  66. <tr class="text-gray-600 dark:text-gray-400">
  67. <th class="text-left pl-6 w-[50%] py-4">{{ $document->columnLabel->items }}</th>
  68. <th class="text-center w-[10%] py-4">{{ $document->columnLabel->units }}</th>
  69. <th class="text-right w-[20%] py-4">{{ $document->columnLabel->price }}</th>
  70. <th class="text-right pr-6 w-[20%] py-4">{{ $document->columnLabel->amount }}</th>
  71. </tr>
  72. </thead>
  73. <tbody class="text-sm tracking-tight border-y-2">
  74. @foreach($document->lineItems as $index => $item)
  75. <tr @class(['bg-gray-100 dark:bg-gray-800' => $index % 2 === 0])>
  76. <td class="text-left pl-6 font-semibold py-3">
  77. {{ $item->name }}
  78. @if($item->description)
  79. <div class="text-gray-600 font-normal line-clamp-2 mt-1">{{ $item->description }}</div>
  80. @endif
  81. </td>
  82. <td class="text-center py-3">{{ $item->quantity }}</td>
  83. <td class="text-right py-3">{{ $item->unitPrice }}</td>
  84. <td class="text-right pr-6 py-3">{{ $item->subtotal }}</td>
  85. </tr>
  86. @endforeach
  87. </tbody>
  88. <tfoot class="text-sm tracking-tight summary-section">
  89. <tr>
  90. <td class="pl-6 py-2" colspan="2"></td>
  91. <td class="text-right font-semibold py-2">Subtotal:</td>
  92. <td class="text-right pr-6 py-2">{{ $document->subtotal }}</td>
  93. </tr>
  94. @if($document->discount)
  95. <tr class="text-success-800 dark:text-success-600">
  96. <td class="pl-6 py-2" colspan="2"></td>
  97. <td class="text-right py-2">Discount:</td>
  98. <td class="text-right pr-6 py-2">
  99. ({{ $document->discount }})
  100. </td>
  101. </tr>
  102. @endif
  103. @if($document->tax)
  104. <tr>
  105. <td class="pl-6 py-2" colspan="2"></td>
  106. <td class="text-right py-2">Tax:</td>
  107. <td class="text-right pr-6 py-2">{{ $document->tax }}</td>
  108. </tr>
  109. @endif
  110. <tr>
  111. <td class="pl-6 py-2" colspan="2"></td>
  112. <td class="text-right font-semibold border-t py-2">Total:</td>
  113. <td class="text-right border-t pr-6 py-2">{{ $document->total }}</td>
  114. </tr>
  115. @if($document->amountDue)
  116. <tr>
  117. <td class="pl-6 py-2" colspan="2"></td>
  118. <td class="text-right font-semibold border-t-4 border-double py-2">{{ $document->label->amountDue }}
  119. ({{ $document->currencyCode }}):
  120. </td>
  121. <td class="text-right border-t-4 border-double pr-6 py-2">{{ $document->amountDue }}</td>
  122. </tr>
  123. @endif
  124. </tfoot>
  125. </table>
  126. </x-company.invoice.line-items>
  127. <!-- Footer Notes -->
  128. <x-company.invoice.footer class="modern-template-footer tracking-tight">
  129. <h4 class="font-semibold px-6 text-sm" style="color: {{ $document->accentColor }}">
  130. Terms & Conditions
  131. </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 text-sm">
  134. <p class="w-1/2 break-words line-clamp-4">{{ $document->terms }}</p>
  135. <p class="w-1/2 break-words line-clamp-4">{{ $document->footer }}</p>
  136. </div>
  137. </x-company.invoice.footer>
  138. </x-company.invoice.container>