Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

invoice-totals.blade.php 2.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. @php
  2. use App\Enums\Accounting\DocumentDiscountMethod;
  3. use App\Utilities\Currency\CurrencyAccessor;
  4. use App\View\Models\InvoiceTotalViewModel;
  5. $data = $this->form->getRawState();
  6. $viewModel = new InvoiceTotalViewModel($this->record, $data);
  7. extract($viewModel->buildViewData(), EXTR_SKIP);
  8. $discountMethod = DocumentDiscountMethod::parse($data['discount_method']);
  9. $isPerDocumentDiscount = $discountMethod->isPerDocument();
  10. @endphp
  11. <div class="totals-summary w-full pr-14">
  12. <table class="w-full text-right table-fixed">
  13. <colgroup>
  14. <col class="w-[20%]"> {{-- Items --}}
  15. <col class="w-[30%]"> {{-- Description --}}
  16. <col class="w-[10%]"> {{-- Quantity --}}
  17. <col class="w-[10%]"> {{-- Price --}}
  18. <col class="w-[20%]"> {{-- Taxes --}}
  19. <col class="w-[10%]"> {{-- Amount --}}
  20. </colgroup>
  21. <tbody>
  22. <tr>
  23. <td colspan="4"></td>
  24. <td class="text-sm px-4 py-2 font-medium leading-6 text-gray-950 dark:text-white">Subtotal:</td>
  25. <td class="text-sm pl-4 py-2 leading-6">{{ $subtotal }}</td>
  26. </tr>
  27. <tr>
  28. <td colspan="4"></td>
  29. <td class="text-sm px-4 py-2 font-medium leading-6 text-gray-950 dark:text-white">Taxes:</td>
  30. <td class="text-sm pl-4 py-2 leading-6">{{ $taxTotal }}</td>
  31. </tr>
  32. @if($isPerDocumentDiscount)
  33. <tr>
  34. <td colspan="4" class="text-sm px-4 py-2 font-medium leading-6 text-gray-950 dark:text-white text-right">Discount:</td>
  35. <td class="text-sm px-4 py-2">
  36. <div class="flex justify-between space-x-2">
  37. @foreach($getChildComponentContainer()->getComponents() as $component)
  38. <div class="flex-1">{{ $component }}</div>
  39. @endforeach
  40. </div>
  41. </td>
  42. <td class="text-sm pl-4 py-2 leading-6">({{ $discountTotal }})</td>
  43. </tr>
  44. @else
  45. <tr>
  46. <td colspan="4"></td>
  47. <td class="text-sm px-4 py-2 font-medium leading-6 text-gray-950 dark:text-white">Discounts:</td>
  48. <td class="text-sm pl-4 py-2 leading-6">({{ $discountTotal }})</td>
  49. </tr>
  50. @endif
  51. <tr class="font-semibold">
  52. <td colspan="4"></td>
  53. <td class="text-sm px-4 py-2 font-medium leading-6 text-gray-950 dark:text-white">Total:</td>
  54. <td class="text-sm pl-4 py-2 leading-6">{{ $grandTotal }}</td>
  55. </tr>
  56. </tbody>
  57. </table>
  58. </div>