@solvimon/solvimon-web 0.1.0-alpha.28 → 0.1.0-alpha.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (189) hide show
  1. package/README.md +26 -1
  2. package/dist/{Alert.vue.es-lIiAWf2S.mjs → Alert.vue.es-CNrEaLvh.mjs} +58 -46
  3. package/dist/AuthProvider.handle-DKfNs8rr.mjs +50 -0
  4. package/dist/{Avatar.vue.es-Beg7umjO.mjs → Avatar.vue.es-r0NbcIib.mjs} +1 -1
  5. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-DBGe1PvD.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-Cp4yGqaw.mjs} +8 -8
  6. package/dist/{Button.vue.es-rh6mITmN.mjs → Button.vue.es-Zw--kuaU.mjs} +4 -4
  7. package/dist/{ChargeOnDemandModal-CPjPa_uq.mjs → ChargeOnDemandModal-B8FDkS9U.mjs} +35 -34
  8. package/dist/Checkout.entry.ce-DsGl-5aR.mjs +4202 -0
  9. package/dist/CheckoutAddressFields.vue_vue_type_script_setup_true_lang-2D8VM_7W.mjs +828 -0
  10. package/dist/{Chip.vue.es-Cn2R_0mE.mjs → Chip.vue.es-D3UDSyXC.mjs} +3 -3
  11. package/dist/ContentWithAsideLayout-Bnbsq8_5.mjs +32 -0
  12. package/dist/{ContextMenu.vue.es-DRxsa7bZ.mjs → ContextMenu.vue.es-B9mFpUQK.mjs} +87 -88
  13. package/dist/{CustomerBillingInformation.vue.es-DQfL5RMR.mjs → CustomerBillingInformation.vue.es-B8NiQaJs.mjs} +3 -3
  14. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Ct-eYaEN.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DBivC5Eb.mjs} +21 -20
  15. package/dist/CustomerShippingAddresses-Bj8Y17O8.mjs +397 -0
  16. package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BzTSwo4i.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BmPKfIjT.mjs} +798 -792
  17. package/dist/{DividerText.vue.es-M0XqSz55.mjs → DividerText.vue.es-CNbgif-3.mjs} +1 -1
  18. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CVP-7ne3.mjs +55 -0
  19. package/dist/{ErrorNotification.vue.es-CKlt4hr2.mjs → ErrorNotification.vue.es-DNd65mQq.mjs} +2 -2
  20. package/dist/FormMessage.vue.es-Cjv358Ab.mjs +39 -0
  21. package/dist/{IconButton.vue.es-oe4MVBK1.mjs → IconButton.vue.es-C8lYFx5_.mjs} +2 -2
  22. package/dist/{IconTitle.vue.es-BO6KBS4v.mjs → IconTitle.vue.es-O2kcqgKm.mjs} +3 -3
  23. package/dist/{Input.vue.es-DAlPmtE_.mjs → Input.vue.es-D8Oj8MWv.mjs} +23 -22
  24. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-CCTl5GWa.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-rhqYVdfV.mjs} +2 -2
  25. package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-DMGqj_Uk.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-06R-M8Q3.mjs} +4 -4
  26. package/dist/InvoicePreview.vue.es-4Q2hzaFS.mjs +286 -0
  27. package/dist/InvoicePricingClauseChip.vue.es-DKU0xu0t.mjs +124 -0
  28. package/dist/Label.vue.es-DtpLM1KH.mjs +113 -0
  29. package/dist/{Modal.vue.es-CTNACAst.mjs → Modal.vue.es-C8ZcO117.mjs} +109 -103
  30. package/dist/OrderSummaryInvoice.vue_vue_type_script_setup_true_lang-3DQLCR3U.mjs +441 -0
  31. package/dist/PaymentCompletedCard.vue_vue_type_script_setup_true_lang-DfTb9psX.mjs +48 -0
  32. package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-DLfAfB_m.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-BoGTtg5G.mjs} +46 -88
  33. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CKm-XYuF.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-BIAm22Kq.mjs} +3 -3
  34. package/dist/{PaymentHistoryBlock-BmA8jbMb.mjs → PaymentHistoryBlock-BvY2nXGV.mjs} +1 -1
  35. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BDMse2lO.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-bQKhUonq.mjs} +4 -4
  36. package/dist/{PaymentIntegrationForm-D1Xw-xIt.mjs → PaymentIntegrationForm-CcfQSzKM.mjs} +1 -1
  37. package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CCxw0PCv.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CvzcLJVq.mjs} +68 -69
  38. package/dist/{PaymentIntegrationFormAdyen-CfT5aD4L.mjs → PaymentIntegrationFormAdyen-DqgDfO6K.mjs} +126 -117
  39. package/dist/{PaymentIntegrationFormStripe-DKXJ-mjd.mjs → PaymentIntegrationFormStripe-BYdAkvLt.mjs} +193 -179
  40. package/dist/{PaymentMethod.vue.es-Cauxx4Xr.mjs → PaymentMethod.vue.es-b0p3a0L-.mjs} +7 -7
  41. package/dist/{PaymentMethodForm-CypZOYUZ.mjs → PaymentMethodForm-BsTrTwCg.mjs} +1 -1
  42. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-De8FgdYD.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-sUOmLORl.mjs} +7 -7
  43. package/dist/{PaymentMethodSelector.vue_vue_type_script_setup_true_lang-Dw28tfpD.mjs → PaymentMethodSelector.vue_vue_type_script_setup_true_lang-DsnAhR79.mjs} +36 -35
  44. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-OtjVO7lR.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-CSW4LfmH.mjs} +7 -7
  45. package/dist/{PlanCustomizationEditor-Xtww2r9K.mjs → PlanCustomizationEditor-D29N4HUM.mjs} +9 -9
  46. package/dist/PortalLinkUnverified-B_EE2wTJ.mjs +52 -0
  47. package/dist/{PortalNotAvailable-B_59GUwN.mjs → PortalNotAvailable-DPE9y37H.mjs} +2 -2
  48. package/dist/{PricingGroupRangeInput.vue.es-C9LJW3b8.mjs → PricingGroupRangeInput.vue.es-tIMXIhpZ.mjs} +14 -13
  49. package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DdWxoB8q.mjs → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DqxWxSQe.mjs} +32 -32
  50. package/dist/RadioGroupExtended.vue.es-3nDXqIGi.mjs +176 -0
  51. package/dist/{Section.vue.es-iS8hVGWA.mjs → Section.vue.es-CvX9tg2f.mjs} +1 -1
  52. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Cl7I1Apo.mjs +60 -0
  53. package/dist/ShippingAddressesModal-C4p1IXXk.mjs +418 -0
  54. package/dist/{StepInput.vue.es-Dpan1RQd.mjs → StepInput.vue.es-DweyzpkL.mjs} +4 -4
  55. package/dist/{SubscriptionDetails.entry.ce-DufQX3uI.mjs → SubscriptionDetails.entry.ce-D5SwM0YS.mjs} +230 -225
  56. package/dist/{SubscriptionSchedules-DAahcNoI.mjs → SubscriptionSchedules-BZqlpAtk.mjs} +1 -1
  57. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-BH7DdOWK.mjs +5185 -0
  58. package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-Wmjqy7RZ.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-DoJxiqVB.mjs} +3 -3
  59. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-BeRLuEyR.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BbjdBHSQ.mjs} +23 -22
  60. package/dist/TooltipParagraph.vue.es-Dw0ndjle.mjs +132 -0
  61. package/dist/TranslationOverride.vue_vue_type_script_setup_true_lang-BhjZVMSx.mjs +31 -0
  62. package/dist/{TrialChip.vue.es-B-XBSHWE.mjs → TrialChip.vue.es-DOopmaXA.mjs} +2 -2
  63. package/dist/{api.es-QaC926Xu.mjs → api.es-qgvzNMU-.mjs} +2 -2
  64. package/dist/{cn.es-2bVdkiFV.mjs → cn.es-B8acFrov.mjs} +380 -476
  65. package/dist/components/BillingInformation/BillingInformation.mjs +9 -7
  66. package/dist/components/BillingInformationForm/BillingInformationForm.mjs +57 -54
  67. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +20 -18
  68. package/dist/components/Invoice/Invoice.mjs +2660 -193
  69. package/dist/components/InvoiceDetails/InvoiceDetails.mjs +6 -4
  70. package/dist/components/InvoiceHeader/InvoiceHeader.mjs +18 -17
  71. package/dist/components/InvoicesList/InvoicesList.mjs +13 -11
  72. package/dist/components/PaymentHistory/PaymentHistory.mjs +8 -6
  73. package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +19 -17
  74. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +19 -17
  75. package/dist/components/SubscriptionsList/SubscriptionsList.mjs +20 -18
  76. package/dist/components/WalletBalances/WalletBalances.mjs +17 -15
  77. package/dist/customElements-BTj4ii4f.mjs +5072 -0
  78. package/dist/{customer-CqddTiOr.mjs → customer-BIjC0CWJ.mjs} +1 -1
  79. package/dist/customer.es-DQKl6wFt.mjs +24 -0
  80. package/dist/{de-DE-BW8dMvhW.mjs → de-DE-DBbERiFr.mjs} +38 -0
  81. package/dist/{de-DE-BNMj3boy.mjs → de-DE-UJ6X6jXu.mjs} +1 -1
  82. package/dist/floating-ui.vue.es-BvAf8-si.mjs +1003 -0
  83. package/dist/{formControl-CsITfsBk.mjs → formControl-BZQLHnOO.mjs} +5 -5
  84. package/dist/fr-FR-Cvvbkwlj.mjs +307 -0
  85. package/dist/fr-FR-IWJE-urI.mjs +431 -0
  86. package/dist/icon-sprite.svg.es-BWBB8SGw.mjs +4 -0
  87. package/dist/{index.es-CXkP_k3u.mjs → index.es-C7J3WGGo.mjs} +4 -4
  88. package/dist/index.es-CpmQmvOg.mjs +633 -0
  89. package/dist/index.mjs +2 -2
  90. package/dist/{invoices-Cf1qDAv4.mjs → invoices-e1sKLgxg.mjs} +3 -3
  91. package/dist/{it-IT-Byg06KWc.mjs → it-IT-B7ui2oxO.mjs} +38 -0
  92. package/dist/{it-IT-DRvuxM1F.mjs → it-IT-DnJP5URH.mjs} +1 -1
  93. package/dist/{nl-NL-x3zQqzZ7.mjs → nl-NL-Bafh2xoT.mjs} +38 -0
  94. package/dist/{nl-NL-DLUwWbMG.mjs → nl-NL-q9xfTZF0.mjs} +1 -1
  95. package/dist/{paymentMethods-BUuOmDq9.mjs → paymentMethods-B_82JGk_.mjs} +2 -2
  96. package/dist/paymentMethods-Nfv9HdkS.mjs +61 -0
  97. package/dist/{paymentOutcome-D17VD4MV.mjs → paymentOutcome-BXEU5-84.mjs} +5 -5
  98. package/dist/payments-BnxbzQUC.mjs +68 -0
  99. package/dist/pricing-BOhvWWMj.mjs +29 -0
  100. package/dist/{pricingPlanScheduleOverrides-COr9F8DO.mjs → pricingPlanScheduleOverrides-Dxv5FOBd.mjs} +2 -2
  101. package/dist/{pricingPlanSchedules-BK_o9p6h.mjs → pricingPlanSchedules-Dv7ZCgNp.mjs} +1 -1
  102. package/dist/screens/Checkout/Checkout.mjs +2 -2
  103. package/dist/screens/CustomerOverview/CustomerOverview.mjs +128 -83
  104. package/dist/screens/PayInvoice/PayInvoice.mjs +572 -218
  105. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +21 -19
  106. package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +2 -2
  107. package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +261 -266
  108. package/dist/{sorting.es-qtEN8J8T.mjs → sorting.es-CVyKw23D.mjs} +1 -1
  109. package/dist/subscriptions-BWXZGK0E.mjs +66 -0
  110. package/dist/taxId.es-DkD3Ltr8.mjs +243 -0
  111. package/dist/types/components/customer/CheckoutForm/CheckoutAddressFields.types.d.ts +2 -0
  112. package/dist/types/components/customer/ShippingAddressForm/ShippingAddressForm.types.d.ts +9 -0
  113. package/dist/types/components/customer/ShippingAddresses/ShippingAddressCard.types.d.ts +11 -0
  114. package/dist/types/components/customer/ShippingAddresses/ShippingAddressList.types.d.ts +9 -0
  115. package/dist/types/components/customer/ShippingAddresses/ShippingAddressesModal.types.d.ts +26 -0
  116. package/dist/types/components/invoices/InvoiceOrderSummary/InvoiceOrderSummary.types.d.ts +5 -0
  117. package/dist/types/components/payments/PayButton/PayButton.types.d.ts +2 -0
  118. package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +11 -0
  119. package/dist/types/components/payments/PaymentIntegrationFormStripe/PaymentIntegrationFormStripeFrame.types.d.ts +4 -1
  120. package/dist/types/components/providers/AuthProvider/AuthProvider.handle.d.ts +17 -0
  121. package/dist/types/components/providers/AuthProvider/AuthProvider.lib.d.ts +23 -1
  122. package/dist/types/components/providers/AuthProvider/AuthProvider.types.d.ts +12 -0
  123. package/dist/types/components/providers/AuthProvider/AuthProvider.vue.d.ts +3 -1
  124. package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +2 -2
  125. package/dist/types/components/providers/Provider/Provider.types.d.ts +1 -1
  126. package/dist/types/components/providers/Provider/Provider.vue.d.ts +3 -1
  127. package/dist/types/components/subscriptions/OrderSummaryInvoice.types.d.ts +16 -0
  128. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementForm.types.d.ts +2 -0
  129. package/dist/types/public/components/CustomerShippingAddresses/CustomerShippingAddresses.types.d.ts +12 -0
  130. package/dist/types/public/core/types.d.ts +5 -0
  131. package/dist/types/public/screens/PayInvoice/PayInvoice.types.d.ts +3 -1
  132. package/dist/types/translations/supported.d.ts +1 -1
  133. package/dist/types/types/portalAuthentication.d.ts +2 -0
  134. package/dist/types/types/portalToken.d.ts +9 -0
  135. package/dist/types/types/shippingAddress.d.ts +9 -0
  136. package/dist/types/vendor/@solvimon/solvimon-types/index.d.ts +2 -0
  137. package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalPolicies.d.ts +1 -1
  138. package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalRequests.d.ts +27 -6
  139. package/dist/types/vendor/@solvimon/solvimon-types/types/ConfigMeterProperties.d.ts +3 -0
  140. package/dist/types/vendor/@solvimon/solvimon-types/types/Entitlement.d.ts +6 -0
  141. package/dist/types/vendor/@solvimon/solvimon-types/types/Integrations.d.ts +9 -1
  142. package/dist/types/vendor/@solvimon/solvimon-types/types/Invoice.d.ts +16 -1
  143. package/dist/types/vendor/@solvimon/solvimon-types/types/JWT.d.ts +10 -0
  144. package/dist/types/vendor/@solvimon/solvimon-types/types/MeterPropertyVariable.d.ts +16 -0
  145. package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentAcceptor.d.ts +6 -0
  146. package/dist/types/vendor/@solvimon/solvimon-types/types/Permission.d.ts +1 -1
  147. package/dist/types/vendor/@solvimon/solvimon-types/types/Platform.d.ts +12 -3
  148. package/dist/types/vendor/@solvimon/solvimon-types/types/Portal.d.ts +71 -0
  149. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSubscription.d.ts +14 -0
  150. package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteTemplates.d.ts +1 -0
  151. package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteVersions.d.ts +35 -0
  152. package/dist/types/vendor/@solvimon/solvimon-types/types/Quotes.d.ts +16 -0
  153. package/dist/types/vendor/@solvimon/solvimon-types/types/ShippingAddress.d.ts +54 -0
  154. package/dist/{useActionDispatchProvider-DC_fUykI.mjs → useActionDispatchProvider-3W2vEyIg.mjs} +1 -1
  155. package/dist/{useCustomer-C3kTh7wn.mjs → useCustomer-cObBvDOu.mjs} +2 -2
  156. package/dist/useCustomerFormLabels-DJWf2O17.mjs +1173 -0
  157. package/dist/{useIncrementalLoading-C_sHmW7d.mjs → useIncrementalLoading-CATuO36d.mjs} +2 -2
  158. package/dist/{useInvoiceData-BIh8-h8b.mjs → useInvoiceData-DD44HTl7.mjs} +2 -2
  159. package/dist/{useInvoicesList-Y6p0Pqpy.mjs → useInvoicesList-CpB-41MQ.mjs} +10 -10
  160. package/dist/useLazyFloating.es-CycqRyeb.mjs +68 -0
  161. package/dist/useLoadInitialData-qzdnBoui.mjs +15 -0
  162. package/dist/{usePaymentFormHold-FfNc578l.mjs → usePaymentFormHold-ByUZi3A-.mjs} +28 -36
  163. package/dist/{usePaymentMethodAvailability-CnYTvG15.mjs → usePaymentMethodAvailability-DUdrs0Ji.mjs} +4 -4
  164. package/dist/usePaymentMethods-ByaKF7mf.mjs +21 -0
  165. package/dist/{usePayments-CykCZPG2.mjs → usePayments-BXABv-lF.mjs} +9 -9
  166. package/dist/{usePortal-CxzKGhbK.mjs → usePortal-CwR_FxTb.mjs} +1 -1
  167. package/dist/{useService-B0OQJmif.mjs → useService-BZcbUZHI.mjs} +3 -3
  168. package/dist/{useTimePeriod.es-JkXdHNWr.mjs → useTimePeriod.es-BpdiVwg8.mjs} +1 -1
  169. package/package.json +7 -7
  170. package/dist/Checkbox.vue.es-DsyiJ-VY.mjs +0 -50
  171. package/dist/Checkout.entry.ce-BZ1rYQvt.mjs +0 -5279
  172. package/dist/ContentWithAsideLayout-BCM8tmZN.mjs +0 -38
  173. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-Bk4zwyWa.mjs +0 -362
  174. package/dist/FormMessage.vue.es-jG3fQZms.mjs +0 -29
  175. package/dist/InvoiceSummary.vue.es-DbNoGfYN.mjs +0 -2596
  176. package/dist/RadioGroupExtended.vue.es-UtKsdmiv.mjs +0 -163
  177. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Djc1SkEU.mjs +0 -688
  178. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DNr1CqVj.mjs +0 -5221
  179. package/dist/TooltipParagraph.vue.es-BjCn2BF6.mjs +0 -129
  180. package/dist/customElements-Di3zwlEU.mjs +0 -6447
  181. package/dist/customer.es-B5ppZf0j.mjs +0 -20
  182. package/dist/floating-ui.vue.es-CYt0fSY7.mjs +0 -1108
  183. package/dist/icon-sprite.svg.es-BZIz7-0d.mjs +0 -4
  184. package/dist/payments-Ci8bF4C6.mjs +0 -45
  185. package/dist/subscriptions-CwogJODR.mjs +0 -54
  186. package/dist/useCustomerFormLabels-CK7K50nB.mjs +0 -1369
  187. package/dist/useLoadInitialData-4k_Cyqef.mjs +0 -15
  188. package/dist/usePaymentMethodOptions-1QBcmgUf.mjs +0 -40
  189. package/dist/usePaymentMethods-gvr-rmwE.mjs +0 -15
@@ -1,2596 +0,0 @@
1
- import { ref as re, openBlock as t, createElementBlock as o, renderSlot as $, defineComponent as S, normalizeClass as N, Fragment as p, renderList as V, createVNode as a, withCtx as i, createElementVNode as _, createTextVNode as v, toDisplayString as r, createBlock as h, unref as l, createCommentVNode as b, createSlots as Ie, withKeys as j, normalizeProps as fe, guardReactiveProps as ve, computed as B, mergeProps as Q, isRef as Ae } from "vue";
2
- import { a as G, _ as Pe, q as pe } from "./customElements-Di3zwlEU.mjs";
3
- import { _ as I } from "./Amount.vue.es-DPqHB8Xd.mjs";
4
- import { a as Ue } from "./useService-B0OQJmif.mjs";
5
- import { a as H, _ as Le } from "./Button.vue.es-rh6mITmN.mjs";
6
- import { _ as Se } from "./floating-ui.vue.es-CYt0fSY7.mjs";
7
- import { a as Me } from "./customer.es-B5ppZf0j.mjs";
8
- import { M as $e, f as we, a as De } from "./formatting.es-RclXHhKo.mjs";
9
- import { _ as Ee, u as ge } from "./Comparators.vue.es-DQBI3f7m.mjs";
10
- import { _ as Re } from "./Chip.vue.es-Cn2R_0mE.mjs";
11
- import { g as ye } from "./getComposedString.es-C__uhJpd.mjs";
12
- import { _ as de, T as ue, a as ce } from "./TooltipParagraph.vue.es-BjCn2BF6.mjs";
13
- import { f as Fe } from "./index.es-CXkP_k3u.mjs";
14
- import { g as Ve, a as We, f as ze } from "./wallets.es-eH2C2ygn.mjs";
15
- import { _ as Ge } from "./DividerText.vue.es-M0XqSz55.mjs";
16
- import { _ as He } from "./IconTitle.vue.es-BO6KBS4v.mjs";
17
- import { a as Xe } from "./ContextMenu.vue.es-DRxsa7bZ.mjs";
18
- const xe = (e = []) => {
19
- const n = re(e);
20
- return [n, (m) => {
21
- typeof n.value.find((s) => s === m) == "number" ? n.value = n.value.filter((s) => s !== m) : n.value = [...n.value, m];
22
- }];
23
- }, qe = {}, je = { class: "w-full table-fixed" };
24
- function Ye(e, n) {
25
- return t(), o("table", je, [
26
- $(e.$slots, "default")
27
- ]);
28
- }
29
- const J = /* @__PURE__ */ Se(qe, [["render", Ye]]), k = /* @__PURE__ */ S({
30
- __name: "InvoiceTableData",
31
- props: {
32
- number: { type: Boolean, default: !1 },
33
- hasPadding: { type: Boolean, default: !0 }
34
- },
35
- setup(e) {
36
- return (n, d) => (t(), o("td", {
37
- class: N({
38
- "text-right tabular-nums": e.number,
39
- "py-2": e.hasPadding
40
- })
41
- }, [
42
- $(n.$slots, "default")
43
- ], 2));
44
- }
45
- }), w = /* @__PURE__ */ S({
46
- __name: "InvoiceTableHeader",
47
- props: {
48
- left: { type: Boolean, default: !1 },
49
- right: { type: Boolean, default: !1 }
50
- },
51
- setup(e) {
52
- return (n, d) => (t(), o("th", {
53
- class: N(["border-b py-1.5 text-xs font-bold uppercase text-subtle", { "text-left": e.left, "text-right": e.right }])
54
- }, [
55
- $(n.$slots, "default")
56
- ], 2));
57
- }
58
- }), Ke = "INVOICE_PERIOD", Qe = "INVOICE_PERIOD_SUBTOTAL", ie = "INVOICE_PERIOD_TOTAL", se = "SUMMARY_LINE_AMOUNT", Je = "SUMMARY_TOTAL_TAX", Ze = "SUMMARY_TOTAL_INCLUDING_TAX", et = "SUMMARY_TOTAL_EXCLUDING_TAX", tt = "SUMMARY_TOTAL_DISCOUNT", nt = "SUMMARY_AMOUNT_DUE", it = "DEDUCTION", at = "HAS_SUBLINES", ot = { class: "flex items-center" }, lt = {
59
- key: 0,
60
- class: "text-xs text-secondary"
61
- }, rt = { class: "flex items-center" }, be = /* @__PURE__ */ S({
62
- __name: "InvoiceSubLineRow",
63
- props: {
64
- subLines: {},
65
- isOpen: { type: Boolean },
66
- lineOrder: {},
67
- periodOrder: {},
68
- groupOrder: {},
69
- processingOnlyCustomers: {},
70
- displayInvoiceSubLinesPerProcessingOnlyCustomer: { type: Boolean },
71
- showTaxPerLineItem: { type: Boolean, default: !0 }
72
- },
73
- setup(e) {
74
- const { formatMessage: n, formatNumber: d } = G(), m = e, f = (c) => {
75
- var y;
76
- const g = (y = m.processingOnlyCustomers) == null ? void 0 : y.find(
77
- (x) => x.id === c
78
- );
79
- return g ? Me(g) : n({
80
- id: "generic.not_available",
81
- defaultMessage: "N/A",
82
- description: "Used in scenarios where no data is available to be displayed"
83
- });
84
- }, s = (c) => {
85
- var y;
86
- return ((y = c.usage_based_conversion) == null ? void 0 : y.conditions) ?? c.conditions;
87
- }, u = (c) => {
88
- var y, g;
89
- const x = (g = (y = c.details.conversion) == null ? void 0 : y.credits) == null ? void 0 : g.quantity;
90
- return x === void 0 ? n({
91
- id: "generic.not_available",
92
- defaultMessage: "N/A",
93
- description: "Used in scenarios where no data is available to be displayed"
94
- }) : d(+x, { maximumFractionDigits: $e });
95
- };
96
- return (c, y) => e.subLines && e.isOpen ? (t(!0), o(p, { key: 0 }, V(e.subLines, (g, x) => (t(), o(p, { key: x }, [
97
- g.processing_only_customer_resource_id ? e.displayInvoiceSubLinesPerProcessingOnlyCustomer && e.processingOnlyCustomers ? (t(), o("tr", {
98
- key: 1,
99
- class: N(["group", { "border-t": x > 0 }])
100
- }, [
101
- a(k, { class: "pl-4" }, {
102
- default: i(() => [
103
- _("div", rt, [
104
- _("div", null, r(f(g.processing_only_customer_resource_id)), 1)
105
- ])
106
- ]),
107
- _: 2
108
- }, 1024),
109
- $(c.$slots, "subline-content", {
110
- details: g.details,
111
- hideTaxDetails: !0
112
- })
113
- ], 2)) : b("", !0) : (t(), o("tr", {
114
- key: 0,
115
- class: N(x > 0 ? "border-t" : "")
116
- }, [
117
- a(k, null, {
118
- default: i(() => {
119
- var O, M, P, U, L, E;
120
- return [
121
- _("div", ot, [
122
- $(c.$slots, "invoice-line-prefix", {
123
- lineOrder: e.lineOrder,
124
- periodOrder: e.periodOrder,
125
- groupOrder: e.groupOrder
126
- }),
127
- _("div", null, [
128
- _("div", null, [
129
- g.description ? (t(), o(p, { key: 0 }, [
130
- v(r(g.description), 1)
131
- ], 64)) : g.details.description ? (t(), o(p, { key: 1 }, [
132
- v(r(g.details.description), 1)
133
- ], 64)) : (t(), o(p, { key: 2 }, [
134
- v(" N/A ")
135
- ], 64))
136
- ]),
137
- (O = s(g)) != null && O.name || (M = s(g)) != null && M.meter_properties ? (t(), o("div", lt, [
138
- (P = s(g)) != null && P.name ? (t(), o(p, { key: 0 }, [
139
- v(r((U = s(g)) == null ? void 0 : U.name), 1)
140
- ], 64)) : (L = s(g)) != null && L.meter_properties ? (t(), h(l(Ee), {
141
- key: 1,
142
- comparators: (E = s(g)) == null ? void 0 : E.meter_properties
143
- }, null, 8, ["comparators"])) : b("", !0)
144
- ])) : b("", !0)
145
- ])
146
- ])
147
- ];
148
- }),
149
- _: 2
150
- }, 1024),
151
- a(k, {
152
- number: "",
153
- class: "text-right tabular-nums"
154
- }, {
155
- default: i(() => [
156
- v(r(u(g)), 1)
157
- ]),
158
- _: 2
159
- }, 1024),
160
- a(k, { class: "text-right tabular-nums" }, {
161
- default: i(() => {
162
- var O, M;
163
- return [
164
- (O = g.details.band) != null && O.amount ? (t(), h(I, {
165
- key: 0,
166
- value: g.details.band.amount
167
- }, null, 8, ["value"])) : (M = g.details.band) != null && M.percentage ? (t(), o(p, { key: 1 }, [
168
- v(r(g.details.band.percentage) + "% ", 1)
169
- ], 64)) : (t(), o(p, { key: 2 }, [
170
- v(" N/A ")
171
- ], 64))
172
- ];
173
- }),
174
- _: 2
175
- }, 1024),
176
- e.showTaxPerLineItem ? (t(), h(k, { key: 0 }, {
177
- default: i(() => [...y[0] || (y[0] = [
178
- v(" ", -1)
179
- ])]),
180
- _: 1
181
- })) : b("", !0),
182
- g.details.amount ? (t(), h(k, {
183
- key: 1,
184
- class: "text-right tabular-nums"
185
- }, {
186
- default: i(() => [
187
- a(I, {
188
- value: g.details.amount,
189
- "data-testid": l(Qe)
190
- }, null, 8, ["value", "data-testid"])
191
- ]),
192
- _: 2
193
- }, 1024)) : b("", !0)
194
- ], 2))
195
- ], 64))), 128)) : b("", !0);
196
- }
197
- }), st = { class: "flex gap-4" }, dt = { class: "flex items-center gap-2" }, le = /* @__PURE__ */ S({
198
- __name: "PricingClauseChip",
199
- props: {
200
- iconName: {}
201
- },
202
- setup(e) {
203
- return (n, d) => (t(), o("div", st, [
204
- a(Re, null, {
205
- default: i(() => [
206
- _("div", dt, [
207
- a(H, {
208
- icon: e.iconName,
209
- size: "xs"
210
- }, null, 8, ["icon"]),
211
- _("span", null, [
212
- $(n.$slots, "chip-content")
213
- ])
214
- ])
215
- ]),
216
- _: 3
217
- }),
218
- $(n.$slots, "chip-postfix")
219
- ]));
220
- }
221
- }), ut = { class: "flex flex-col gap-2" }, Ce = /* @__PURE__ */ S({
222
- __name: "InvoicePricingClauseChip",
223
- props: {
224
- clauseType: {},
225
- priceDetailsBand: {},
226
- invoiceLineDescription: {}
227
- },
228
- setup(e) {
229
- const n = G();
230
- return (d, m) => (t(), o("div", ut, [
231
- _("span", null, r(e.invoiceLineDescription), 1),
232
- e.clauseType === "DISCOUNT" && e.priceDetailsBand ? (t(), h(l(le), {
233
- key: 0,
234
- "icon-name": "south_east"
235
- }, Ie({ _: 2 }, [
236
- e.priceDetailsBand.amount ? {
237
- name: "chip-content",
238
- fn: i(() => [
239
- v(r(l(n).$t(
240
- {
241
- id: "invoice.amount_discount",
242
- defaultMessage: "{amount} discount",
243
- description: "Represents a certain amount of discount, where {amount} is replaced with the amount"
244
- },
245
- {
246
- amount: l(we)(e.priceDetailsBand.amount)
247
- }
248
- ).toUpperCase()), 1)
249
- ]),
250
- key: "0"
251
- } : e.priceDetailsBand.percentage ? {
252
- name: "chip-content",
253
- fn: i(() => [
254
- v(r(l(n).$t(
255
- {
256
- id: "invoice.percentage_discount",
257
- defaultMessage: "{percentage}% discount",
258
- description: "Represents a certain percentage of discount, where {percentage} is replaced with the percentage (number only)"
259
- },
260
- {
261
- percentage: e.priceDetailsBand.percentage ?? "0"
262
- }
263
- ).toUpperCase()), 1)
264
- ]),
265
- key: "1"
266
- } : void 0
267
- ]), 1024)) : e.clauseType === "ADJUSTMENT" ? (t(), h(l(le), {
268
- key: 1,
269
- "icon-name": "info"
270
- }, {
271
- "chip-content": i(() => [
272
- v(r(l(n).$t({
273
- id: "invoice.adjustment_chip_body",
274
- defaultMessage: "Adjustment",
275
- description: "Used on invoice lines to mark as adjusted"
276
- }).toUpperCase()), 1)
277
- ]),
278
- _: 1
279
- })) : e.clauseType === "MARKUP" ? (t(), h(l(le), {
280
- key: 2,
281
- "icon-name": "north_east"
282
- }, {
283
- "chip-content": i(() => {
284
- var f;
285
- return [
286
- v(r(l(n).$t(
287
- {
288
- id: "invoice.markup_percentage",
289
- defaultMessage: "{percentage}% markup",
290
- description: "Markup percentage, where {percentage} is replaced with the percentage (number only)"
291
- },
292
- { percentage: ((f = e.priceDetailsBand) == null ? void 0 : f.percentage) ?? "0" }
293
- ).toUpperCase()), 1)
294
- ];
295
- }),
296
- _: 1
297
- })) : e.clauseType === "COMMITMENT" ? (t(), h(l(le), {
298
- key: 3,
299
- "icon-name": "sell"
300
- }, {
301
- "chip-content": i(() => [
302
- v(r(l(n).$t({
303
- id: "invoice.commitment",
304
- defaultMessage: "commitment",
305
- description: "Used on invoice lines to mark as commitment"
306
- }).toUpperCase()), 1)
307
- ]),
308
- _: 1
309
- })) : b("", !0)
310
- ]));
311
- }
312
- }), ct = ["tabindex", "onClick"], mt = { class: "flex items-center" }, ft = /* @__PURE__ */ S({
313
- __name: "InvoiceCommitment",
314
- props: {
315
- commitments: {},
316
- groupOrder: {},
317
- invoicePeriodOrder: {},
318
- amountType: {},
319
- processingOnlyCustomers: {},
320
- displayInvoiceSubLinesPerProcessingOnlyCustomer: { type: Boolean }
321
- },
322
- setup(e) {
323
- const n = G(), { getIsOpen: d, toggle: m } = ge(), f = (c, y) => {
324
- m(s(c, y));
325
- }, s = (c, y) => `${c}-line-${y}`, u = (c) => {
326
- var y;
327
- return c.description ?? ((y = c.details) == null ? void 0 : y.description) ?? n.$t({
328
- id: "generic.not_available",
329
- defaultMessage: "N/A",
330
- description: "Used in scenarios where no data is available to be displayed"
331
- });
332
- };
333
- return (c, y) => (t(), h(J, null, {
334
- default: i(() => [
335
- _("tr", null, [
336
- a(w, {
337
- left: "",
338
- colspan: "5"
339
- }, {
340
- default: i(() => [
341
- v(r(l(n).$t({
342
- id: "invoice.table_header.unit",
343
- defaultMessage: "Unit",
344
- description: "Table header for the column containing the number of units of invoice groups"
345
- })), 1)
346
- ]),
347
- _: 1
348
- }),
349
- a(w, {
350
- right: "",
351
- class: "w-60"
352
- }, {
353
- default: i(() => [
354
- v(r(l(n).$t({
355
- id: "invoice.table_header.sub_total",
356
- defaultMessage: "Subtotal",
357
- description: "Table header for the column containing the subtotal for invoices"
358
- })), 1)
359
- ]),
360
- _: 1
361
- })
362
- ]),
363
- (t(!0), o(p, null, V(e.commitments, (g, x) => (t(), o(p, { key: x }, [
364
- _("tr", {
365
- class: N(["border-t", { "cursor-pointer": g.sub_lines }]),
366
- tabindex: g.sub_lines ? 0 : void 0,
367
- onClick: (O) => f(e.groupOrder, g.line_order)
368
- }, [
369
- a(k, { colspan: "2" }, {
370
- default: i(() => {
371
- var O;
372
- return [
373
- g.sub_lines ? (t(), h(H, {
374
- key: 0,
375
- icon: "keyboard_arrow_down",
376
- size: "md",
377
- class: N(["absolute -translate-x-7 text-slate-400", {
378
- "-rotate-90": !l(d)(s(e.groupOrder, g.line_order))
379
- }])
380
- }, null, 8, ["class"])) : b("", !0),
381
- _("div", mt, [
382
- $(c.$slots, "invoice-line-prefix", {
383
- lineOrder: g.line_order,
384
- periodOrder: e.invoicePeriodOrder,
385
- groupOrder: e.groupOrder
386
- }),
387
- a(Ce, {
388
- "clause-type": "COMMITMENT",
389
- "invoice-line-description": u(g),
390
- "price-details-band": (O = g.details) == null ? void 0 : O.band
391
- }, null, 8, ["invoice-line-description", "price-details-band"])
392
- ])
393
- ];
394
- }),
395
- _: 2
396
- }, 1024),
397
- a(k, { colspan: "3" }, {
398
- default: i(() => [...y[0] || (y[0] = [
399
- v(" ", -1)
400
- ])]),
401
- _: 1
402
- }),
403
- a(k, { number: "" }, {
404
- default: i(() => {
405
- var O;
406
- return [
407
- (O = g.details) != null && O.amount ? (t(), h(I, {
408
- key: 0,
409
- value: e.amountType === "INCLUDING_TAX" ? g.amount_including_tax : g.amount_excluding_tax,
410
- "data-testid": l(se)
411
- }, null, 8, ["value", "data-testid"])) : b("", !0)
412
- ];
413
- }),
414
- _: 2
415
- }, 1024)
416
- ], 10, ct),
417
- a(be, {
418
- ref_for: !0,
419
- ref: s(e.groupOrder, g.line_order),
420
- "sub-lines": g.sub_lines ?? [],
421
- "line-order": g.line_order,
422
- "period-order": e.invoicePeriodOrder,
423
- "group-order": e.groupOrder,
424
- "is-open": l(d)(s(e.groupOrder, g.line_order)),
425
- "processing-only-customers": e.processingOnlyCustomers,
426
- "display-invoice-sub-lines-per-processing-only-customer": e.displayInvoiceSubLinesPerProcessingOnlyCustomer
427
- }, null, 8, ["sub-lines", "line-order", "period-order", "group-order", "is-open", "processing-only-customers", "display-invoice-sub-lines-per-processing-only-customer"])
428
- ], 64))), 128))
429
- ]),
430
- _: 3
431
- }));
432
- }
433
- }), vt = ["tabindex", "onClick"], gt = { class: "flex items-center" }, yt = /* @__PURE__ */ S({
434
- __name: "InvoiceDiscountMarkup",
435
- props: {
436
- lines: {},
437
- type: {},
438
- handleToggleItems: { type: Function },
439
- formatIndex: { type: Function },
440
- expandedItems: {},
441
- isExpandable: { type: Boolean },
442
- invoicePeriodOrder: {},
443
- groupOrder: {},
444
- amountType: {},
445
- processingOnlyCustomers: {},
446
- displayInvoiceSubLinesPerProcessingOnlyCustomer: { type: Boolean }
447
- },
448
- setup(e) {
449
- const n = G(), { getIsOpen: d, toggle: m } = ge(), f = (u, c) => {
450
- m(s(u, c));
451
- }, s = (u, c) => `${u}-line-${c}`;
452
- return (u, c) => (t(), h(J, null, {
453
- default: i(() => [
454
- _("tr", null, [
455
- a(w, {
456
- left: "",
457
- class: "w-3/5"
458
- }, {
459
- default: i(() => [
460
- v(r(l(n).$t({
461
- id: "invoice.table_header.quantity",
462
- defaultMessage: "Quantity",
463
- description: "Table header for quantity column"
464
- })), 1)
465
- ]),
466
- _: 1
467
- }),
468
- a(w, { colspan: "2" }, {
469
- default: i(() => [...c[0] || (c[0] = [
470
- v(" ", -1)
471
- ])]),
472
- _: 1
473
- }),
474
- a(w, {
475
- left: "",
476
- class: "w-1/5"
477
- }, {
478
- default: i(() => [
479
- v(r(e.type === "DISCOUNT" ? l(n).$t({
480
- id: "invoice.table_header.discount",
481
- defaultMessage: "Discount",
482
- description: "Table header for discount column"
483
- }) : l(n).$t({
484
- id: "invoice.table_header.markup",
485
- defaultMessage: "Markup",
486
- description: "Table header for markup column"
487
- })), 1)
488
- ]),
489
- _: 1
490
- }),
491
- a(w, {
492
- left: "",
493
- class: "w-1/5"
494
- }, {
495
- default: i(() => [
496
- v(r(e.type === "DISCOUNT" ? l(n).$t({
497
- id: "invoice.table_header.total",
498
- defaultMessage: "Total",
499
- description: "Table header for total column"
500
- }) : " "), 1)
501
- ]),
502
- _: 1
503
- }),
504
- a(w, {
505
- right: "",
506
- class: "w-1/5"
507
- }, {
508
- default: i(() => [
509
- v(r(l(n).$t({
510
- id: "invoice.table_header.sub_total",
511
- defaultMessage: "Subtotal",
512
- description: "Table header for the column containing the subtotal for invoices"
513
- })), 1)
514
- ]),
515
- _: 1
516
- })
517
- ]),
518
- (t(!0), o(p, null, V(e.lines, (y, g) => (t(), o(p, { key: g }, [
519
- _("tr", {
520
- class: N(["border-t", { "cursor-pointer": e.isExpandable }]),
521
- tabindex: e.isExpandable ? 0 : void 0,
522
- onClick: (x) => f(e.groupOrder, y.line_order)
523
- }, [
524
- a(k, { class: "w-3/5" }, {
525
- default: i(() => {
526
- var x, O;
527
- return [
528
- y.sub_lines ? (t(), h(H, {
529
- key: 0,
530
- icon: "keyboard_arrow_down",
531
- size: "md",
532
- class: N(["absolute -translate-x-7 text-slate-400", {
533
- "-rotate-90": !l(d)(s(e.groupOrder, y.line_order))
534
- }])
535
- }, null, 8, ["class"])) : b("", !0),
536
- _("div", gt, [
537
- $(u.$slots, "invoice-line-prefix", {
538
- lineOrder: y.line_order,
539
- periodOrder: e.invoicePeriodOrder,
540
- groupOrder: e.groupOrder
541
- }),
542
- y.description ? (t(), o(p, { key: 0 }, [
543
- v(r(y.description), 1)
544
- ], 64)) : (x = y.details) != null && x.description ? (t(), o(p, { key: 1 }, [
545
- v(r((O = y.details) == null ? void 0 : O.description), 1)
546
- ], 64)) : (t(), o(p, { key: 2 }, [
547
- v("N/A")
548
- ], 64))
549
- ])
550
- ];
551
- }),
552
- _: 2
553
- }, 1024),
554
- a(k, { colspan: "2" }, {
555
- default: i(() => [...c[1] || (c[1] = [
556
- v(" ", -1)
557
- ])]),
558
- _: 1
559
- }),
560
- a(k, { class: "w-1/5 tabular-nums" }, {
561
- default: i(() => {
562
- var x, O, M;
563
- return [
564
- v(r((O = (x = y.details) == null ? void 0 : x.band) != null && O.percentage ? `${(M = y.details) == null ? void 0 : M.band.percentage}%` : " "), 1)
565
- ];
566
- }),
567
- _: 2
568
- }, 1024),
569
- a(k, { class: "w-1/5" }, {
570
- default: i(() => [...c[2] || (c[2] = [
571
- v(" ", -1)
572
- ])]),
573
- _: 1
574
- }),
575
- a(k, {
576
- number: "",
577
- class: "w-1/5"
578
- }, {
579
- default: i(() => {
580
- var x;
581
- return [
582
- (x = y.details) != null && x.amount ? (t(), h(I, {
583
- key: 0,
584
- value: e.amountType === "INCLUDING_TAX" ? y.amount_including_tax : y.amount_excluding_tax,
585
- "data-testid": l(se)
586
- }, null, 8, ["value", "data-testid"])) : b("", !0)
587
- ];
588
- }),
589
- _: 2
590
- }, 1024)
591
- ], 10, vt),
592
- a(be, {
593
- ref_for: !0,
594
- ref: s(e.groupOrder, y.line_order),
595
- "sub-lines": y.sub_lines ?? [],
596
- "line-order": y.line_order,
597
- "is-open": l(d)(s(e.groupOrder, y.line_order)),
598
- "period-order": e.invoicePeriodOrder,
599
- "group-order": e.groupOrder,
600
- "processing-only-customers": e.processingOnlyCustomers,
601
- "display-invoice-sub-lines-per-processing-only-customer": e.displayInvoiceSubLinesPerProcessingOnlyCustomer
602
- }, null, 8, ["sub-lines", "line-order", "is-open", "period-order", "group-order", "processing-only-customers", "display-invoice-sub-lines-per-processing-only-customer"])
603
- ], 64))), 128))
604
- ]),
605
- _: 3
606
- }));
607
- }
608
- }), ae = (e) => {
609
- var n;
610
- return (n = e.lines) != null && n.some((d) => !!d.sub_lines) ? at : void 0;
611
- }, bt = ["tabindex"], pt = { key: 0 }, xt = {
612
- colspan: "2",
613
- class: "p-0"
614
- }, ht = { class: "-mx-9 bg-gray-50 px-9 py-3 text-xs" }, _t = /* @__PURE__ */ S({
615
- __name: "InvoiceGroupCommitment",
616
- props: {
617
- group: {},
618
- expandedItems: {},
619
- handleToggleItems: { type: Function },
620
- formatIndex: { type: Function },
621
- invoicePeriodOrder: {},
622
- groupOrder: {},
623
- isExpandable: { type: Boolean },
624
- forceExpanded: { type: Boolean },
625
- amountType: {},
626
- processingOnlyCustomers: {},
627
- displayInvoiceSubLinesPerProcessingOnlyCustomer: { type: Boolean },
628
- showTaxPerLineItem: { type: Boolean }
629
- },
630
- setup(e) {
631
- const n = G();
632
- return (d, m) => (t(), o(p, null, [
633
- _("tr", {
634
- class: N(["break-inside-avoid border-t", { "cursor-pointer": e.isExpandable }]),
635
- tabindex: e.isExpandable ? 0 : void 0,
636
- onClick: m[0] || (m[0] = (f) => e.handleToggleItems(e.formatIndex(e.invoicePeriodOrder, e.groupOrder))),
637
- onKeyup: [
638
- m[1] || (m[1] = j((f) => e.handleToggleItems(e.formatIndex(e.invoicePeriodOrder, e.groupOrder)), ["enter"])),
639
- m[2] || (m[2] = j((f) => e.handleToggleItems(e.formatIndex(e.invoicePeriodOrder, e.groupOrder)), ["space"]))
640
- ]
641
- }, [
642
- a(k, { class: "p-0" }, {
643
- default: i(() => [
644
- e.isExpandable ? (t(), h(H, {
645
- key: 0,
646
- icon: "keyboard_arrow_down",
647
- size: "md",
648
- class: N(["absolute -translate-x-7 text-slate-400", {
649
- "-rotate-90": !e.expandedItems.includes(
650
- e.formatIndex(e.invoicePeriodOrder, e.groupOrder)
651
- )
652
- }])
653
- }, null, 8, ["class"])) : b("", !0),
654
- v(" " + r(l(n).$t({
655
- id: "invoice.commitment_heading",
656
- defaultMessage: "Commitment",
657
- description: "Heading used for commitment in invoice tables"
658
- })), 1)
659
- ]),
660
- _: 1
661
- }),
662
- a(k, { number: "" }, {
663
- default: i(() => [
664
- e.amountType === "INCLUDING_TAX" ? (t(), h(I, {
665
- key: 0,
666
- value: e.group.amount_including_tax,
667
- "data-testid": l(ie),
668
- "data-type": l(ae)(e.group)
669
- }, null, 8, ["value", "data-testid", "data-type"])) : (t(), h(I, {
670
- key: 1,
671
- value: e.group.amount_excluding_tax,
672
- "data-testid": l(ie),
673
- "data-type": l(ae)(e.group)
674
- }, null, 8, ["value", "data-testid", "data-type"]))
675
- ]),
676
- _: 1
677
- })
678
- ], 42, bt),
679
- (e.forceExpanded || e.expandedItems.includes(e.formatIndex(e.invoicePeriodOrder, e.groupOrder))) && e.group.lines ? (t(), o("tr", pt, [
680
- _("td", xt, [
681
- _("div", ht, [
682
- a(ft, {
683
- commitments: e.group.lines,
684
- "format-index": e.formatIndex,
685
- "handle-toggle-items": e.handleToggleItems,
686
- "expanded-items": e.expandedItems,
687
- "is-expandable": e.isExpandable,
688
- "invoice-period-order": e.invoicePeriodOrder,
689
- "group-order": e.groupOrder,
690
- "amount-type": e.amountType,
691
- "processing-only-customers": e.processingOnlyCustomers,
692
- "display-invoice-sub-lines-per-processing-only-customer": e.displayInvoiceSubLinesPerProcessingOnlyCustomer
693
- }, {
694
- "invoice-line-prefix": i((f) => [
695
- $(d.$slots, "invoice-line-prefix", fe(ve(f)))
696
- ]),
697
- _: 3
698
- }, 8, ["commitments", "format-index", "handle-toggle-items", "expanded-items", "is-expandable", "invoice-period-order", "group-order", "amount-type", "processing-only-customers", "display-invoice-sub-lines-per-processing-only-customer"])
699
- ])
700
- ])
701
- ])) : b("", !0)
702
- ], 64));
703
- }
704
- }), kt = ["tabindex"], Tt = { key: 0 }, Ot = {
705
- colspan: "2",
706
- class: "p-0"
707
- }, It = { class: "-mx-9 bg-gray-50 px-9 py-3 text-xs" }, Mt = /* @__PURE__ */ S({
708
- __name: "InvoiceGroupDiscountMarkup",
709
- props: {
710
- heading: {},
711
- group: {},
712
- expandedItems: {},
713
- handleToggleItems: { type: Function },
714
- formatIndex: { type: Function },
715
- invoicePeriodOrder: {},
716
- groupOrder: {},
717
- isExpandable: { type: Boolean },
718
- forceExpanded: { type: Boolean },
719
- amountType: {},
720
- processingOnlyCustomers: {},
721
- displayInvoiceSubLinesPerProcessingOnlyCustomer: { type: Boolean },
722
- showTaxPerLineItem: { type: Boolean }
723
- },
724
- setup(e) {
725
- return (n, d) => (t(), o(p, null, [
726
- _("tr", {
727
- class: N(["break-inside-avoid border-t", { "cursor-pointer": e.isExpandable }]),
728
- tabindex: e.isExpandable ? 0 : void 0,
729
- onClick: d[0] || (d[0] = (m) => e.handleToggleItems(e.formatIndex(e.invoicePeriodOrder, e.groupOrder))),
730
- onKeyup: [
731
- d[1] || (d[1] = j((m) => e.handleToggleItems(e.formatIndex(e.invoicePeriodOrder, e.groupOrder)), ["enter"])),
732
- d[2] || (d[2] = j((m) => e.handleToggleItems(e.formatIndex(e.invoicePeriodOrder, e.groupOrder)), ["space"]))
733
- ]
734
- }, [
735
- a(k, { class: "p-0" }, {
736
- default: i(() => [
737
- e.isExpandable ? (t(), h(H, {
738
- key: 0,
739
- icon: "keyboard_arrow_down",
740
- size: "md",
741
- class: N(["absolute -translate-x-7 text-slate-400", {
742
- "-rotate-90": !e.expandedItems.includes(
743
- e.formatIndex(e.invoicePeriodOrder, e.groupOrder)
744
- )
745
- }])
746
- }, null, 8, ["class"])) : b("", !0),
747
- v(" " + r(e.heading), 1)
748
- ]),
749
- _: 1
750
- }),
751
- a(k, { number: "" }, {
752
- default: i(() => [
753
- e.amountType === "INCLUDING_TAX" ? (t(), h(I, {
754
- key: 0,
755
- value: e.group.amount_including_tax,
756
- "data-testid": l(ie),
757
- "data-type": l(ae)(e.group)
758
- }, null, 8, ["value", "data-testid", "data-type"])) : (t(), h(I, {
759
- key: 1,
760
- value: e.group.amount_excluding_tax,
761
- "data-testid": l(ie),
762
- "data-type": l(ae)(e.group)
763
- }, null, 8, ["value", "data-testid", "data-type"]))
764
- ]),
765
- _: 1
766
- })
767
- ], 42, kt),
768
- (e.forceExpanded || e.expandedItems.includes(e.formatIndex(e.invoicePeriodOrder, e.groupOrder))) && e.group.lines ? (t(), o("tr", Tt, [
769
- _("td", Ot, [
770
- _("div", It, [
771
- a(yt, {
772
- type: e.group.type,
773
- lines: e.group.lines,
774
- "format-index": e.formatIndex,
775
- "handle-toggle-items": e.handleToggleItems,
776
- "expanded-items": e.expandedItems,
777
- "is-expandable": e.isExpandable,
778
- "invoice-period-order": e.invoicePeriodOrder,
779
- "group-order": e.groupOrder,
780
- "amount-type": e.amountType,
781
- "processing-only-customers": e.processingOnlyCustomers,
782
- "display-invoice-sub-lines-per-processing-only-customer": e.displayInvoiceSubLinesPerProcessingOnlyCustomer
783
- }, {
784
- "invoice-line-prefix": i((m) => [
785
- $(n.$slots, "invoice-line-prefix", fe(ve(m)))
786
- ]),
787
- _: 3
788
- }, 8, ["type", "lines", "format-index", "handle-toggle-items", "expanded-items", "is-expandable", "invoice-period-order", "group-order", "amount-type", "processing-only-customers", "display-invoice-sub-lines-per-processing-only-customer"])
789
- ])
790
- ])
791
- ])) : b("", !0)
792
- ], 64));
793
- }
794
- }), $t = (e, n) => {
795
- if (n)
796
- return e.forwarded_from_customer_id;
797
- }, wt = (e) => {
798
- let n = { kind: "default" }, d = { kind: "default" };
799
- if (e.tier_lower_bound && "number" in e.tier_lower_bound)
800
- n = { kind: "number", value: +e.tier_lower_bound.number };
801
- else if (e.tier_lower_bound && "amount" in e.tier_lower_bound) {
802
- const { quantity: m, currency: f } = e.tier_lower_bound.amount;
803
- n = { kind: "amount", currency: f, quantity: m ?? 0 };
804
- }
805
- if (e.tier_top_bound && "number" in e.tier_top_bound)
806
- d = { kind: "number", value: +e.tier_top_bound.number };
807
- else if (e.tier_top_bound && "amount" in e.tier_top_bound) {
808
- const { quantity: m, currency: f } = e.tier_top_bound.amount;
809
- d = { kind: "amount", currency: f, quantity: m };
810
- }
811
- return { lowerBound: n, topBound: d };
812
- }, Et = (e) => {
813
- var n, d, m, f;
814
- switch (e == null ? void 0 : e.price_bound) {
815
- case "BELOW_MINIMUM_AMOUNT":
816
- return { kind: "band_minimum_amount", amount: (n = e.band) == null ? void 0 : n.minimum_amount };
817
- case "NOT_HIT":
818
- return { kind: "price_bound_within_bounds" };
819
- case "ABOVE_MAXIMUM_AMOUNT":
820
- return { kind: "price_bound_maximum_amount", amount: (d = e.band) == null ? void 0 : d.maximum_amount };
821
- case "BELOW_MINIMUM_NUMBER":
822
- return { kind: "band_minimum_number", value: (m = e.band) == null ? void 0 : m.minimum_number };
823
- case "ABOVE_MAXIMUM_NUMBER":
824
- return { kind: "band_maximum_number", value: (f = e.band) == null ? void 0 : f.maximum_number };
825
- default:
826
- return { kind: "none" };
827
- }
828
- }, Ct = { class: "items-left flex flex-col gap-1 leading-none" }, Nt = { class: "flex items-center" }, Bt = {
829
- key: 0,
830
- class: "ml-1 text-xs text-secondary"
831
- }, At = { key: 0 }, Pt = {
832
- key: 1,
833
- class: "text-xs text-secondary"
834
- }, Ut = {
835
- key: 2,
836
- class: "text-xs text-secondary"
837
- }, Lt = { class: "text-[9pt] text-secondary" }, St = /* @__PURE__ */ S({
838
- __name: "InvoiceLineRow",
839
- props: {
840
- data: {},
841
- isLast: { type: Boolean },
842
- periodOrder: {},
843
- groupOrder: {},
844
- groupType: {},
845
- isExpanded: { type: Boolean }
846
- },
847
- setup(e) {
848
- const { $t: n, formatNumber: d } = G(), m = e, f = (g) => {
849
- if (g.kind !== "default")
850
- return g.kind === "number" ? d(g.value) : `${g.currency} ${g.quantity}`;
851
- }, s = (g) => {
852
- if (!g) return "";
853
- const { lowerBound: x, topBound: O } = wt(g), M = f(O);
854
- return (f(x) ?? "0") + (M ? ` - ${M}` : "+");
855
- }, u = B(() => {
856
- var g;
857
- return (g = m.data.details) == null ? void 0 : g.included_volume_details;
858
- }), c = B(() => Et(m.data.details)), y = B(() => {
859
- var g, x;
860
- return (g = m.data) != null && g.product_items ? ye(m.data.product_items.map((O) => O.name)) : ((x = m.data) == null ? void 0 : x.description) ?? "N/A";
861
- });
862
- return (g, x) => (t(), o(p, null, [
863
- a(k, { class: "align-top" }, {
864
- default: i(() => {
865
- var O, M, P, U, L, E, W, C, z;
866
- return [
867
- _("div", Ct, [
868
- _("div", null, [
869
- e.data.sub_lines ? (t(), h(H, {
870
- key: 0,
871
- icon: "keyboard_arrow_down",
872
- size: "md",
873
- class: N(["absolute -translate-x-7 -translate-y-2 text-slate-400", {
874
- "-rotate-90": !e.isExpanded
875
- }])
876
- }, null, 8, ["class"])) : b("", !0),
877
- _("div", Nt, [
878
- $(g.$slots, "invoice-line-prefix", {
879
- lineOrder: e.data.line_order,
880
- periodOrder: e.periodOrder,
881
- groupOrder: e.groupOrder
882
- }),
883
- ["PRICING", "REVENUE", "ONE_OFF"].includes(e.data.type) ? (t(), o(p, { key: 0 }, [
884
- v(r(y.value) + " ", 1),
885
- e.data.type === "ONE_OFF" && e.groupType !== "ONE_OFF" ? (t(), o("div", Bt, r(l(De)(e.data.type)), 1)) : b("", !0)
886
- ], 64)) : (t(), h(Ce, {
887
- key: 1,
888
- "invoice-line-description": y.value,
889
- "clause-type": e.data.type,
890
- "price-details-band": (O = e.data.details) == null ? void 0 : O.band
891
- }, null, 8, ["invoice-line-description", "clause-type", "price-details-band"]))
892
- ])
893
- ]),
894
- ["TIERED", "STAIR_STEP", "TOP_TIERED"].includes(e.data.pricing_type) && !u.value && ((M = e.data.details) != null && M.band) ? (t(), o("div", At, r(s((P = e.data.details) == null ? void 0 : P.band)), 1)) : b("", !0),
895
- (L = (U = e.data.details) == null ? void 0 : U.split_pricing) != null && L.meter_properties ? (t(), o("span", Pt, [
896
- (t(!0), o(p, null, V((W = (E = e.data.details) == null ? void 0 : E.split_pricing) == null ? void 0 : W.meter_properties, (X, q) => (t(), o(p, null, [
897
- v(r(X.meter_property.name) + ": " + r(X.value), 1),
898
- q < e.data.details.split_pricing.meter_properties.length - 1 ? (t(), o(p, { key: 0 }, [
899
- v(r(", "))
900
- ], 64)) : b("", !0)
901
- ], 64))), 256))
902
- ])) : b("", !0),
903
- (C = e.data.conditions) != null && C.name || (z = e.data.conditions) != null && z.meter_properties ? (t(), o("div", Ut, [
904
- e.data.conditions.name ? (t(), o(p, { key: 0 }, [
905
- v(r(e.data.conditions.name), 1)
906
- ], 64)) : e.data.conditions.meter_properties ? (t(), h(l(Ee), {
907
- key: 1,
908
- comparators: e.data.conditions.meter_properties
909
- }, null, 8, ["comparators"])) : b("", !0)
910
- ])) : b("", !0)
911
- ]),
912
- _("span", Lt, [
913
- c.value.kind === "band_minimum_amount" ? (t(), o(p, { key: 0 }, [
914
- v(r(l(n)({
915
- id: "invoice.line.band_minimum_amount",
916
- defaultMessage: "Band minimum amount",
917
- description: "Minimum amount specified in a band"
918
- })) + " ", 1),
919
- c.value.amount ? (t(), h(I, {
920
- key: 0,
921
- value: c.value.amount
922
- }, null, 8, ["value"])) : b("", !0)
923
- ], 64)) : c.value.kind === "price_bound_within_bounds" ? (t(), o(p, { key: 1 }, [
924
- v(r(l(n)({
925
- id: "invoice.line.price_bound_within_bounds",
926
- defaultMessage: "Within bounds",
927
- description: "Label used when min and max bounds are specified but reached"
928
- })), 1)
929
- ], 64)) : c.value.kind === "price_bound_maximum_amount" ? (t(), o(p, { key: 2 }, [
930
- v(r(l(n)({
931
- id: "invoice.line.price_bound_maximum_amount",
932
- defaultMessage: "Maximum amount",
933
- description: "Maximum amount specified in a band"
934
- })) + " ", 1),
935
- c.value.amount ? (t(), h(I, {
936
- key: 0,
937
- value: c.value.amount
938
- }, null, 8, ["value"])) : b("", !0)
939
- ], 64)) : c.value.kind === "band_minimum_number" ? (t(), o(p, { key: 3 }, [
940
- v(r(l(n)({
941
- id: "invoice.line.band_minimum_number",
942
- defaultMessage: "Minimum number",
943
- description: "Minimum number of units specified in a band"
944
- })) + " " + r(c.value.value), 1)
945
- ], 64)) : c.value.kind === "band_maximum_number" ? (t(), o(p, { key: 4 }, [
946
- v(r(l(n)({
947
- id: "invoice.line.band_maximum_number",
948
- defaultMessage: "Maximum number",
949
- description: "Maximum number of units specified in a band"
950
- })) + " " + r(c.value.value), 1)
951
- ], 64)) : b("", !0)
952
- ])
953
- ];
954
- }),
955
- _: 3
956
- }),
957
- $(g.$slots, "line-content", {
958
- details: e.data.details
959
- })
960
- ], 64));
961
- }
962
- }), Dt = (e, n, d) => {
963
- var m, f;
964
- if (e === "PASS_THROUGH") return { kind: "hidden" };
965
- if (d && ((f = (m = n == null ? void 0 : n.conversion) == null ? void 0 : m.credits) != null && f.quantity))
966
- return { kind: "conversion-credits", value: n.conversion.credits.quantity };
967
- if (n != null && n.price_bound) {
968
- const { price_bound: s, meter_value: u, band: c } = n;
969
- return s === "BELOW_MINIMUM_AMOUNT" || s === "ABOVE_MAXIMUM_AMOUNT" ? { kind: "raw", value: u.count } : s === "NOT_HIT" && "amount" in u && u.amount ? { kind: "amount", amount: u.amount } : s === "NOT_HIT" && "number" in u && u.number ? { kind: "raw", value: u.number } : s === "RATIO" && u.number ? { kind: "number", value: +u.number } : s === "BELOW_MINIMUM_NUMBER" && (c != null && c.minimum_number) ? { kind: "number", value: +c.minimum_number } : s === "ABOVE_MAXIMUM_NUMBER" && (c != null && c.maximum_number) ? { kind: "number", value: +c.maximum_number } : { kind: "hidden" };
970
- }
971
- return n != null && n.meter_value && "number" in n.meter_value ? { kind: "number", value: +n.meter_value.number } : n != null && n.meter_value && "amount" in n.meter_value ? { kind: "amount", amount: n.meter_value.amount } : { kind: "one" };
972
- }, Rt = ["NOT_HIT", "BELOW_MINIMUM_NUMBER", "ABOVE_MAXIMUM_NUMBER"], Ft = (e, n, d) => {
973
- if (e === "PASS_THROUGH") return { kind: "pass-through" };
974
- if (n != null && n.price_bound) {
975
- const { price_bound: s, band: u, amount: c } = n;
976
- if (s === "BELOW_MINIMUM_AMOUNT" && (u != null && u.minimum_amount))
977
- return { kind: "amount", amount: u.minimum_amount };
978
- if (s === "ABOVE_MAXIMUM_AMOUNT" && (u != null && u.maximum_amount))
979
- return { kind: "amount", amount: u.maximum_amount };
980
- if (s === "RATIO")
981
- return { kind: "amount", amount: (d === "PER_SEAT" ? u == null ? void 0 : u.amount : void 0) ?? c, suffix: { kind: "tier-top-bound" } };
982
- if (Rt.includes(s)) {
983
- if (u && u.amount)
984
- return { kind: "amount", amount: u.amount };
985
- if (u && "percentage" in u)
986
- return { kind: "percentage", value: u.percentage };
987
- if (u && c)
988
- return { kind: "amount", amount: c, suffix: { kind: "fixed-amount" } };
989
- }
990
- return { kind: "hidden" };
991
- }
992
- const m = n == null ? void 0 : n.band, f = n == null ? void 0 : n.amount;
993
- return m && m.amount ? { kind: "amount", amount: m.amount, suffix: { kind: "block-size-or-per-unit" } } : m && "percentage" in m ? { kind: "percentage", value: m.percentage } : m && f ? e === "STAIR_STEP" || e === "STAIR_STEP_TOP_UP" ? { kind: "amount", amount: f, suffix: { kind: "fixed-amount" } } : e === "TOP_TIERED" ? { kind: "amount", amount: f, suffix: { kind: "per-unit" } } : e === "FLAT" ? { kind: "amount", amount: f, suffix: { kind: "flat-fee" } } : { kind: "amount", amount: f } : { kind: "hidden" };
994
- }, Vt = {
995
- key: 5,
996
- class: "text-xs text-secondary"
997
- }, Wt = {
998
- key: 1,
999
- class: "tabular-nums"
1000
- }, zt = {
1001
- key: 0,
1002
- class: "text-2xs text-secondary"
1003
- }, Gt = {
1004
- key: 1,
1005
- class: "text-2xs text-secondary"
1006
- }, Ht = {
1007
- key: 0,
1008
- class: "text-2xs text-secondary"
1009
- }, Xt = {
1010
- key: 1,
1011
- class: "text-2xs text-secondary"
1012
- }, qt = {
1013
- key: 2,
1014
- class: "text-2xs text-secondary"
1015
- }, jt = {
1016
- key: 3,
1017
- class: "text-2xs text-secondary"
1018
- }, Yt = {
1019
- key: 4,
1020
- class: "text-2xs text-secondary"
1021
- }, Kt = { class: "text-2xs text-secondary" }, Qt = {
1022
- key: 0,
1023
- class: "flex justify-end"
1024
- }, Jt = { class: "flex items-center justify-end gap-1" }, Zt = {
1025
- key: 0,
1026
- class: "text-2xs tabular-nums text-secondary"
1027
- }, en = {
1028
- key: 1,
1029
- class: "inline-block"
1030
- }, tn = { class: "flex items-center justify-end gap-1" }, he = /* @__PURE__ */ S({
1031
- __name: "InvoiceRowContent",
1032
- props: {
1033
- pricingType: {},
1034
- details: {},
1035
- amount: {},
1036
- taxCategories: {},
1037
- amountType: {},
1038
- hideTaxDetails: { type: Boolean },
1039
- modelType: {},
1040
- showTaxPerLineItem: { type: Boolean, default: !0 },
1041
- preferConversionCredits: { type: Boolean }
1042
- },
1043
- setup(e) {
1044
- const n = e, d = B(() => {
1045
- var E;
1046
- return (E = n.details) == null ? void 0 : E.included_volume_details;
1047
- }), m = B(
1048
- () => {
1049
- var E;
1050
- return (E = d.value) == null ? void 0 : E.available_included_volume;
1051
- }
1052
- ), f = B(
1053
- () => Dt(n.pricingType, n.details, n.preferConversionCredits)
1054
- ), s = B(
1055
- () => Ft(n.pricingType, n.details, n.modelType)
1056
- ), { $t: u, formatNumber: c } = G(), y = B(
1057
- () => u({
1058
- id: "invoice.line.fixed_amount",
1059
- defaultMessage: "Fixed amount",
1060
- description: "Label shown when a price band charges a fixed amount regardless of usage"
1061
- })
1062
- ), g = B(
1063
- () => u({
1064
- id: "invoice.line.flat_fee",
1065
- defaultMessage: "Flat fee",
1066
- description: "Label shown for a flat, usage-independent fee"
1067
- })
1068
- ), x = B(() => {
1069
- var E, W;
1070
- const C = (W = (E = n.details) == null ? void 0 : E.band) == null ? void 0 : W.tier_top_bound;
1071
- return C && "number" in C ? C.number : void 0;
1072
- }), O = B(() => {
1073
- if (x.value !== void 0)
1074
- return u(
1075
- {
1076
- id: "invoice.line.per_units_tier_top_bound",
1077
- defaultMessage: "per {count, plural, one {unit} other {{formattedCount} units}}",
1078
- description: "Number of units a tiered price band applies per. Singular form omits the count."
1079
- },
1080
- { count: +x.value, formattedCount: x.value }
1081
- );
1082
- }), M = B(
1083
- () => {
1084
- var E, W;
1085
- return n.modelType === "PER_SEAT" ? (W = (E = n.details) == null ? void 0 : E.band) == null ? void 0 : W.amount : void 0;
1086
- }
1087
- ), P = B(
1088
- () => n.modelType === "PER_SEAT" ? u({
1089
- id: "invoice.line.per_seat",
1090
- defaultMessage: "Per seat",
1091
- description: "Label shown when a price band applies per single seat"
1092
- }) : u({
1093
- id: "invoice.line.per_unit",
1094
- defaultMessage: "Per unit",
1095
- description: "Label shown when a price band applies per single unit"
1096
- })
1097
- ), U = B(() => {
1098
- var E, W;
1099
- const C = (W = (E = n.details) == null ? void 0 : E.band) == null ? void 0 : W.block_size;
1100
- return C && "number" in C ? C.number : void 0;
1101
- }), L = B(() => {
1102
- if (U.value !== void 0)
1103
- return u(
1104
- {
1105
- id: "invoice.line.per_units_block_size",
1106
- defaultMessage: "Per {count, plural, one {unit} other {{formattedCount} units}}",
1107
- description: "Number of units a price band block applies per. Singular form omits the count."
1108
- },
1109
- {
1110
- count: +U.value,
1111
- formattedCount: c(+U.value)
1112
- }
1113
- );
1114
- });
1115
- return (E, W) => (t(), o(p, null, [
1116
- a(k, {
1117
- number: "",
1118
- class: "align-top"
1119
- }, {
1120
- default: i(() => {
1121
- var C;
1122
- return [
1123
- f.value.kind === "raw" ? (t(), o(p, { key: 0 }, [
1124
- v(r(f.value.value), 1)
1125
- ], 64)) : f.value.kind === "amount" ? (t(), h(I, {
1126
- key: 1,
1127
- value: f.value.amount
1128
- }, null, 8, ["value"])) : f.value.kind === "number" ? (t(), o(p, { key: 2 }, [
1129
- v(r(l(c)(f.value.value)), 1)
1130
- ], 64)) : f.value.kind === "conversion-credits" ? (t(), o(p, { key: 3 }, [
1131
- v(r(l(c)(+f.value.value, {
1132
- maximumFractionDigits: l($e)
1133
- })), 1)
1134
- ], 64)) : f.value.kind === "one" ? (t(), o(p, { key: 4 }, [
1135
- v("1")
1136
- ], 64)) : b("", !0),
1137
- f.value.kind !== "conversion-credits" && f.value.kind !== "hidden" && !((C = e.details) != null && C.price_bound) && m.value ? (t(), o("div", Vt, [
1138
- m.value.type === "AMOUNT" ? (t(), o(p, { key: 0 }, [
1139
- a(I, {
1140
- value: m.value.amount
1141
- }, null, 8, ["value"]),
1142
- v(" " + r(l(u)({
1143
- id: "invoice.line.included",
1144
- defaultMessage: "included",
1145
- description: "Used to specify an included amount. Should be lowercase."
1146
- })), 1)
1147
- ], 64)) : m.value.type === "NUMBER" ? (t(), o("span", Wt, r(m.value.number) + " " + r(l(u)({
1148
- id: "invoice.line.units_included",
1149
- defaultMessage: "units included",
1150
- description: "Used to specify an included units. Should be lowercase."
1151
- })), 1)) : b("", !0)
1152
- ])) : b("", !0)
1153
- ];
1154
- }),
1155
- _: 1
1156
- }),
1157
- s.value.kind === "pass-through" ? (t(), h(k, {
1158
- key: 0,
1159
- class: "text-right align-top"
1160
- }, {
1161
- default: i(() => [
1162
- v(r(l(u)({
1163
- id: "invoice.line.pass_through",
1164
- defaultMessage: "Pass through",
1165
- description: "Name of the pass through pricing type"
1166
- })), 1)
1167
- ]),
1168
- _: 1
1169
- })) : (t(), h(k, {
1170
- key: 1,
1171
- number: "",
1172
- class: "align-top"
1173
- }, {
1174
- default: i(() => {
1175
- var C, z, X, q, Z;
1176
- return [
1177
- s.value.kind === "amount" ? (t(), o(p, { key: 0 }, [
1178
- a(I, {
1179
- value: s.value.amount
1180
- }, null, 8, ["value"]),
1181
- ((C = s.value.suffix) == null ? void 0 : C.kind) === "tier-top-bound" ? (t(), o(p, { key: 0 }, [
1182
- O.value ? (t(), o("div", zt, r(O.value), 1)) : M.value ? (t(), o("div", Gt, r(P.value), 1)) : b("", !0)
1183
- ], 64)) : ((z = s.value.suffix) == null ? void 0 : z.kind) === "block-size-or-per-unit" ? (t(), o(p, { key: 1 }, [
1184
- L.value ? (t(), o("div", Ht, r(L.value), 1)) : e.modelType !== "RECURRING" ? (t(), o("div", Xt, r(P.value), 1)) : b("", !0)
1185
- ], 64)) : ((X = s.value.suffix) == null ? void 0 : X.kind) === "per-unit" ? (t(), o("div", qt, r(P.value), 1)) : ((q = s.value.suffix) == null ? void 0 : q.kind) === "fixed-amount" ? (t(), o("div", jt, r(y.value), 1)) : ((Z = s.value.suffix) == null ? void 0 : Z.kind) === "flat-fee" ? (t(), o("div", Yt, r(g.value), 1)) : b("", !0)
1186
- ], 64)) : s.value.kind === "percentage" ? (t(), o(p, { key: 1 }, [
1187
- v(r(s.value.value) + "% ", 1)
1188
- ], 64)) : b("", !0)
1189
- ];
1190
- }),
1191
- _: 1
1192
- })),
1193
- e.showTaxPerLineItem ? (t(), h(k, {
1194
- key: 2,
1195
- number: "",
1196
- class: "align-top"
1197
- }, {
1198
- default: i(() => [
1199
- e.hideTaxDetails ? b("", !0) : (t(!0), o(p, { key: 0 }, V(e.taxCategories, (C, z) => (t(), o("div", {
1200
- key: z,
1201
- class: "tabular-nums"
1202
- }, [
1203
- _("div", null, r(C.percentage) + "%", 1),
1204
- _("div", Kt, [
1205
- a(I, {
1206
- value: C.tax_amount
1207
- }, null, 8, ["value"])
1208
- ])
1209
- ]))), 128))
1210
- ]),
1211
- _: 1
1212
- })) : b("", !0),
1213
- a(k, {
1214
- number: "",
1215
- class: "align-top"
1216
- }, {
1217
- default: i(() => {
1218
- var C, z, X, q, Z;
1219
- return [
1220
- (z = (C = e.details) == null ? void 0 : C.amount) != null && z.currency && ((q = (X = e.details) == null ? void 0 : X.amount) != null && q.quantity) ? (t(), o("div", Qt, [
1221
- e.showTaxPerLineItem ? (t(!0), o(p, { key: 0 }, V(e.taxCategories, (oe, T) => {
1222
- var D;
1223
- return t(), o("div", {
1224
- key: T,
1225
- class: "inline-block"
1226
- }, [
1227
- _("div", Jt, [
1228
- a(I, {
1229
- value: e.amount ?? e.details.amount,
1230
- "data-testid": T === 0 ? l(se) : void 0
1231
- }, null, 8, ["value", "data-testid"]),
1232
- ((D = e.details) == null ? void 0 : D.pricing_amount.quantity) !== e.details.amount.quantity ? (t(), h(de, {
1233
- key: 0,
1234
- placement: "top-end"
1235
- }, {
1236
- tooltip: i(() => [
1237
- a(ue, null, {
1238
- default: i(() => [
1239
- a(ce, null, {
1240
- default: i(() => [
1241
- v(r(l(u)({
1242
- id: "invoice.line.original_currency",
1243
- defaultMessage: "Original currency",
1244
- description: "Original currency"
1245
- })) + " ", 1),
1246
- a(I, {
1247
- value: e.details.pricing_amount,
1248
- class: "font-semibold"
1249
- }, null, 8, ["value"])
1250
- ]),
1251
- _: 1
1252
- })
1253
- ]),
1254
- _: 1
1255
- })
1256
- ]),
1257
- default: i(() => [
1258
- a(H, {
1259
- icon: "info",
1260
- size: "2xs"
1261
- })
1262
- ]),
1263
- _: 1
1264
- })) : b("", !0)
1265
- ]),
1266
- e.hideTaxDetails ? b("", !0) : (t(), o("div", Zt, [
1267
- e.amountType === "INCLUDING_TAX" ? (t(), o(p, { key: 0 }, [
1268
- v(r(l(u)({
1269
- id: "invoice.line.excl.tax",
1270
- defaultMessage: "Excl. tax",
1271
- description: "Value excludes tax"
1272
- })) + " ", 1),
1273
- a(I, {
1274
- value: oe.base_amount
1275
- }, null, 8, ["value"])
1276
- ], 64)) : (t(), o(p, { key: 1 }, [
1277
- v(r(l(u)({
1278
- id: "invoice.line.incl.tax",
1279
- defaultMessage: "Incl. tax",
1280
- description: "Value includes tax"
1281
- })) + " ", 1),
1282
- a(I, {
1283
- value: oe.total_amount
1284
- }, null, 8, ["value"])
1285
- ], 64))
1286
- ]))
1287
- ]);
1288
- }), 128)) : (t(), o("div", en, [
1289
- _("div", tn, [
1290
- a(I, {
1291
- value: e.amount ?? e.details.amount,
1292
- "data-testid": l(se)
1293
- }, null, 8, ["value", "data-testid"]),
1294
- ((Z = e.details) == null ? void 0 : Z.pricing_amount.quantity) !== e.details.amount.quantity ? (t(), h(de, {
1295
- key: 0,
1296
- placement: "top-end"
1297
- }, {
1298
- tooltip: i(() => [
1299
- a(ue, null, {
1300
- default: i(() => [
1301
- a(ce, null, {
1302
- default: i(() => [
1303
- v(r(l(u)({
1304
- id: "invoice.line.original_currency",
1305
- defaultMessage: "Original currency",
1306
- description: "Original currency"
1307
- })) + " ", 1),
1308
- a(I, {
1309
- value: e.details.pricing_amount,
1310
- class: "font-semibold"
1311
- }, null, 8, ["value"])
1312
- ]),
1313
- _: 1
1314
- })
1315
- ]),
1316
- _: 1
1317
- })
1318
- ]),
1319
- default: i(() => [
1320
- a(H, {
1321
- icon: "info",
1322
- size: "2xs"
1323
- })
1324
- ]),
1325
- _: 1
1326
- })) : b("", !0)
1327
- ])
1328
- ])),
1329
- $(E.$slots, "one-off-line-context-menu")
1330
- ])) : (t(), o(p, { key: 1 }, [
1331
- v("-")
1332
- ], 64))
1333
- ];
1334
- }),
1335
- _: 3
1336
- })
1337
- ], 64));
1338
- }
1339
- }), nn = ["DISCOUNT", "MARKUP"], an = (e) => {
1340
- const n = [...e].sort((u, c) => u.line_order - c.line_order), d = (u) => nn.includes(u.type), m = (u) => !!u.pricing_item_config_id && n.some(
1341
- (c) => !d(c) && c.pricing_item_config_id === u.pricing_item_config_id
1342
- ), f = n.filter((u) => d(u) && m(u)), s = n.filter((u) => !f.includes(u));
1343
- return f.forEach((u) => {
1344
- const c = s.findLastIndex(
1345
- (y) => y.pricing_item_config_id === u.pricing_item_config_id && (!d(y) || f.includes(y))
1346
- );
1347
- s.splice(c + 1, 0, u);
1348
- }), s;
1349
- }, on = ["tabindex", "onClick"], Ne = /* @__PURE__ */ S({
1350
- __name: "InvoiceLineGroup",
1351
- props: {
1352
- group: {},
1353
- startDate: {},
1354
- endDate: {},
1355
- total: {},
1356
- amountType: {},
1357
- invoicePeriodOrder: {},
1358
- processingOnlyCustomers: {},
1359
- displayInvoiceSubLinesPerProcessingOnlyCustomer: { type: Boolean },
1360
- showTaxPerLineItem: { type: Boolean, default: !0 },
1361
- isExpandable: { type: Boolean, default: !0 }
1362
- },
1363
- setup(e) {
1364
- const n = e, d = B(() => an(n.group.lines ?? [])), m = G(), { getIsOpen: f, toggle: s } = ge(), u = (y, g) => {
1365
- s(c(y, g));
1366
- }, c = (y, g) => `${y}-line-${g}`;
1367
- return (y, g) => (t(), o("div", null, [
1368
- a(J, null, {
1369
- default: i(() => [
1370
- _("tr", null, [
1371
- a(w, {
1372
- left: "",
1373
- class: "w-1/5 text-secondary"
1374
- }, {
1375
- default: i(() => [
1376
- v(r(l(m).$t({
1377
- id: "invoice.table_header.unit",
1378
- defaultMessage: "Unit",
1379
- description: "Table header for the column containing the number of units of invoice groups"
1380
- })), 1)
1381
- ]),
1382
- _: 1
1383
- }),
1384
- a(w, {
1385
- right: "",
1386
- class: "w-1/5 text-secondary"
1387
- }, {
1388
- default: i(() => [
1389
- v(r(l(m).$t({
1390
- id: "invoice.table_header.quantity",
1391
- defaultMessage: "Quantity",
1392
- description: "Table header for quantity column"
1393
- })), 1)
1394
- ]),
1395
- _: 1
1396
- }),
1397
- a(w, {
1398
- right: "",
1399
- class: "w-1/5 text-secondary"
1400
- }, {
1401
- default: i(() => [
1402
- v(r(l(m).$t({
1403
- id: "invoice.table_header.price",
1404
- defaultMessage: "Price",
1405
- description: "Table header for the column containing the number of units of invoice groups"
1406
- })), 1)
1407
- ]),
1408
- _: 1
1409
- }),
1410
- e.showTaxPerLineItem ? (t(), h(w, {
1411
- key: 0,
1412
- right: "",
1413
- class: "w-1/5 text-secondary"
1414
- }, {
1415
- default: i(() => [
1416
- v(r(l(m).$t({
1417
- id: "invoice.table_header.tax_rate",
1418
- defaultMessage: "Tax rate",
1419
- description: "Table header for the column containing the tax percentage of invoice groups"
1420
- })), 1)
1421
- ]),
1422
- _: 1
1423
- })) : b("", !0),
1424
- a(w, {
1425
- right: "",
1426
- class: "w-1/5 text-secondary"
1427
- }, {
1428
- default: i(() => [
1429
- v(r(l(m).$t({
1430
- id: "invoice.table_header.sub_total",
1431
- defaultMessage: "Subtotal",
1432
- description: "Table header for the column containing the subtotal for invoices"
1433
- })), 1)
1434
- ]),
1435
- _: 1
1436
- })
1437
- ]),
1438
- (t(!0), o(p, null, V(d.value, (x, O) => (t(), o(p, { key: O }, [
1439
- _("tr", {
1440
- tabindex: e.isExpandable && x.sub_lines ? 0 : void 0,
1441
- class: N(["group", {
1442
- "cursor-pointer": e.isExpandable && x.sub_lines,
1443
- "border-t": O !== 0
1444
- }]),
1445
- onClick: (M) => u(e.group.group_order, x.line_order)
1446
- }, [
1447
- (t(), h(St, {
1448
- key: O,
1449
- data: x,
1450
- "period-order": e.invoicePeriodOrder,
1451
- "group-order": e.group.group_order,
1452
- "is-last": O === d.value.length - 1,
1453
- "group-type": e.group.type,
1454
- "is-expanded": l(f)(c(e.group.group_order, x.line_order))
1455
- }, {
1456
- "invoice-line-prefix": i((M) => [
1457
- $(y.$slots, "invoice-line-prefix", Q({ ref_for: !0 }, M))
1458
- ]),
1459
- "line-content": i((M) => {
1460
- var P, U;
1461
- return [
1462
- a(he, {
1463
- details: M.details,
1464
- amount: e.amountType === "INCLUDING_TAX" ? x.amount_including_tax : x.amount_excluding_tax,
1465
- "pricing-type": x.pricing_type,
1466
- "tax-categories": x.tax_categories,
1467
- "amount-type": e.amountType,
1468
- "model-type": (U = (P = x.product_items) == null ? void 0 : P[0]) == null ? void 0 : U.model_type,
1469
- "show-tax-per-line-item": e.showTaxPerLineItem
1470
- }, Ie({ _: 2 }, [
1471
- x.type === "ONE_OFF" ? {
1472
- name: "one-off-line-context-menu",
1473
- fn: i((L) => [
1474
- $(y.$slots, "one-off-line-context-menu", Q({ ref_for: !0 }, L, {
1475
- lineOrder: x.line_order
1476
- }))
1477
- ]),
1478
- key: "0"
1479
- } : void 0
1480
- ]), 1032, ["details", "amount", "pricing-type", "tax-categories", "amount-type", "model-type", "show-tax-per-line-item"])
1481
- ];
1482
- }),
1483
- _: 2
1484
- }, 1032, ["data", "period-order", "group-order", "is-last", "group-type", "is-expanded"]))
1485
- ], 10, on),
1486
- a(be, {
1487
- ref_for: !0,
1488
- ref: c(e.group.group_order, x.line_order),
1489
- "sub-lines": x.sub_lines ?? [],
1490
- "processing-only-customers": e.processingOnlyCustomers,
1491
- "display-invoice-sub-lines-per-processing-only-customer": e.displayInvoiceSubLinesPerProcessingOnlyCustomer,
1492
- "line-order": x.line_order,
1493
- "is-open": l(f)(c(e.group.group_order, x.line_order)),
1494
- "period-order": e.invoicePeriodOrder,
1495
- "group-order": e.group.group_order,
1496
- "show-tax-per-line-item": e.showTaxPerLineItem
1497
- }, {
1498
- "invoice-line-prefix": i((M) => [
1499
- $(y.$slots, "invoice-line-prefix", Q({ ref_for: !0 }, M))
1500
- ]),
1501
- "subline-content": i((M) => {
1502
- var P, U;
1503
- return [
1504
- a(he, {
1505
- details: M.details,
1506
- "hide-tax-details": M.hideTaxDetails,
1507
- "prefer-conversion-credits": "",
1508
- "pricing-type": x.pricing_type,
1509
- "tax-categories": x.tax_categories,
1510
- "amount-type": e.amountType,
1511
- "model-type": (U = (P = x.product_items) == null ? void 0 : P[0]) == null ? void 0 : U.model_type,
1512
- "show-tax-per-line-item": e.showTaxPerLineItem
1513
- }, null, 8, ["details", "hide-tax-details", "pricing-type", "tax-categories", "amount-type", "model-type", "show-tax-per-line-item"])
1514
- ];
1515
- }),
1516
- _: 2
1517
- }, 1032, ["sub-lines", "processing-only-customers", "display-invoice-sub-lines-per-processing-only-customer", "line-order", "is-open", "period-order", "group-order", "show-tax-per-line-item"])
1518
- ], 64))), 128))
1519
- ]),
1520
- _: 3
1521
- })
1522
- ]));
1523
- }
1524
- }), ln = { class: "flex items-center" }, rn = {
1525
- key: 2,
1526
- class: "ml-1 inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-full bg-primary-100 text-2xs font-bold text-primary-600"
1527
- }, me = /* @__PURE__ */ S({
1528
- __name: "InvoiceTableRowLabel",
1529
- props: {
1530
- label: {},
1531
- count: {}
1532
- },
1533
- setup(e) {
1534
- const n = re(), d = re(!1);
1535
- return Fe(n, ([m]) => {
1536
- d.value = m.target.clientWidth < m.target.scrollWidth;
1537
- }), (m, f) => (t(), o("div", ln, [
1538
- d.value ? (t(), h(de, {
1539
- key: 0,
1540
- placement: "bottom-start",
1541
- class: "min-w-0 leading-normal"
1542
- }, {
1543
- tooltip: i(() => [
1544
- a(ue, null, {
1545
- default: i(() => [
1546
- a(ce, null, {
1547
- default: i(() => [
1548
- v(r(e.label), 1)
1549
- ]),
1550
- _: 1
1551
- })
1552
- ]),
1553
- _: 1
1554
- })
1555
- ]),
1556
- default: i(() => [
1557
- _("span", {
1558
- ref_key: "labelElement",
1559
- ref: n,
1560
- class: "block truncate"
1561
- }, r(e.label), 513)
1562
- ]),
1563
- _: 1
1564
- })) : (t(), o("span", {
1565
- key: 1,
1566
- ref_key: "labelElement",
1567
- ref: n,
1568
- class: N(["block", { truncate: e.count !== void 0 }])
1569
- }, r(e.label), 3)),
1570
- e.count !== void 0 ? (t(), o("span", rn, r(e.count), 1)) : b("", !0)
1571
- ]));
1572
- }
1573
- }), sn = ["tabindex"], dn = { key: 0 }, un = {
1574
- colspan: "2",
1575
- class: "p-0"
1576
- }, cn = { class: "-mx-9 bg-gray-50 px-9 py-3 text-xs" }, mn = /* @__PURE__ */ S({
1577
- __name: "InvoiceGroupRevenue",
1578
- props: {
1579
- forwardedFromCustomers: {},
1580
- showOriginalCustomerInvoiceLine: {},
1581
- group: {},
1582
- expandedItems: {},
1583
- handleToggleItems: {},
1584
- formatIndex: {},
1585
- invoicePeriodOrder: {},
1586
- groupOrder: {},
1587
- isExpandable: { type: Boolean },
1588
- forceExpanded: { type: Boolean },
1589
- amountType: {},
1590
- processingOnlyCustomers: {},
1591
- displayInvoiceSubLinesPerProcessingOnlyCustomer: { type: Boolean },
1592
- showTaxPerLineItem: { type: Boolean, default: !0 }
1593
- },
1594
- setup(e) {
1595
- const n = e, d = B(() => {
1596
- var m, f, s;
1597
- const u = [
1598
- (m = n.group.pricing) == null ? void 0 : m.name,
1599
- ye(((f = n.group.products) == null ? void 0 : f.map((g) => g.name)) ?? [])
1600
- ].filter(Boolean).join(" - "), c = $t(
1601
- n.group,
1602
- !!n.showOriginalCustomerInvoiceLine
1603
- );
1604
- if (!c)
1605
- return u;
1606
- const y = (s = n.forwardedFromCustomers) == null ? void 0 : s.find(
1607
- (g) => g.id === c
1608
- );
1609
- return [y && Me(y), u].filter(Boolean).join(" - ");
1610
- });
1611
- return (m, f) => (t(), o(p, null, [
1612
- _("tr", {
1613
- class: N(["border-t break-inside-avoid", { "cursor-pointer": e.isExpandable }]),
1614
- tabindex: e.isExpandable ? 0 : void 0,
1615
- onClick: f[0] || (f[0] = (s) => e.handleToggleItems(e.formatIndex(e.invoicePeriodOrder, e.groupOrder))),
1616
- onKeyup: [
1617
- f[1] || (f[1] = j((s) => e.handleToggleItems(e.formatIndex(e.invoicePeriodOrder, e.groupOrder)), ["enter"])),
1618
- f[2] || (f[2] = j((s) => e.handleToggleItems(e.formatIndex(e.invoicePeriodOrder, e.groupOrder)), ["space"]))
1619
- ]
1620
- }, [
1621
- a(k, { class: "p-0" }, {
1622
- default: i(() => {
1623
- var s;
1624
- return [
1625
- e.isExpandable ? (t(), h(H, {
1626
- key: 0,
1627
- icon: "keyboard_arrow_down",
1628
- size: "md",
1629
- class: N(["absolute -translate-x-7 text-slate-400", {
1630
- "-rotate-90": !e.expandedItems.includes(
1631
- e.formatIndex(e.invoicePeriodOrder, e.groupOrder)
1632
- )
1633
- }])
1634
- }, null, 8, ["class"])) : b("", !0),
1635
- a(me, {
1636
- label: d.value,
1637
- count: e.isExpandable ? ((s = e.group.lines) == null ? void 0 : s.length) ?? 0 : void 0
1638
- }, null, 8, ["label", "count"])
1639
- ];
1640
- }),
1641
- _: 1
1642
- }),
1643
- a(k, { number: "" }, {
1644
- default: i(() => [
1645
- e.amountType === "INCLUDING_TAX" ? (t(), h(I, {
1646
- key: 0,
1647
- value: e.group.amount_including_tax,
1648
- "data-testid": l(ie),
1649
- "data-type": l(ae)(e.group)
1650
- }, null, 8, ["value", "data-testid", "data-type"])) : (t(), h(I, {
1651
- key: 1,
1652
- value: e.group.amount_excluding_tax,
1653
- "data-testid": l(ie),
1654
- "data-type": l(ae)(e.group)
1655
- }, null, 8, ["value", "data-testid", "data-type"]))
1656
- ]),
1657
- _: 1
1658
- })
1659
- ], 42, sn),
1660
- e.forceExpanded || e.expandedItems.includes(e.formatIndex(e.invoicePeriodOrder, e.groupOrder)) ? (t(), o("tr", dn, [
1661
- _("td", un, [
1662
- _("div", cn, [
1663
- a(Ne, {
1664
- "invoice-period-order": e.invoicePeriodOrder,
1665
- "start-date": e.group.start_at,
1666
- "end-date": e.group.end_at,
1667
- total: e.group.amount_excluding_tax,
1668
- group: e.group,
1669
- "amount-type": e.amountType,
1670
- "processing-only-customers": e.processingOnlyCustomers,
1671
- "display-invoice-sub-lines-per-processing-only-customer": e.displayInvoiceSubLinesPerProcessingOnlyCustomer,
1672
- "show-tax-per-line-item": e.showTaxPerLineItem,
1673
- "is-expandable": e.isExpandable
1674
- }, {
1675
- "invoice-line-prefix": i((s) => [
1676
- $(m.$slots, "invoice-line-prefix", fe(ve(s)))
1677
- ]),
1678
- "one-off-line-context-menu": i((s) => [
1679
- $(m.$slots, "one-off-line-context-menu", Q(s, { groupOrder: e.groupOrder }))
1680
- ]),
1681
- _: 3
1682
- }, 8, ["invoice-period-order", "start-date", "end-date", "total", "group", "amount-type", "processing-only-customers", "display-invoice-sub-lines-per-processing-only-customer", "show-tax-per-line-item", "is-expandable"])
1683
- ])
1684
- ])
1685
- ])) : b("", !0)
1686
- ], 64));
1687
- }
1688
- }), _e = /* @__PURE__ */ S({
1689
- __name: "InvoiceGroupWalletBalance",
1690
- props: {
1691
- lines: {},
1692
- creditTypes: {}
1693
- },
1694
- setup(e) {
1695
- const n = e, { $t: d } = G(), m = B(
1696
- () => Ve(We(n.lines), {
1697
- creditTypes: n.creditTypes,
1698
- creditsLabel: d({
1699
- defaultMessage: "Credits",
1700
- description: "Generic fallback label for a wallet balance row with no known credit type",
1701
- id: "invoiceGroupWalletBalance.creditsLabel"
1702
- }),
1703
- walletLabel: d({
1704
- defaultMessage: "Wallet balance",
1705
- description: "Label for a wallet balance row of a wallet that pays in money",
1706
- id: "invoiceGroupWalletBalance.walletBalanceLabel"
1707
- })
1708
- })
1709
- ), f = (s) => ze(s, {
1710
- formatMoney: we,
1711
- formatQuantity: (u) => u
1712
- });
1713
- return (s, u) => m.value.length ? (t(), h(J, { key: 0 }, {
1714
- default: i(() => [
1715
- _("tr", null, [
1716
- a(w, {
1717
- left: "",
1718
- class: "w-2/5 text-gray-400"
1719
- }, {
1720
- default: i(() => [
1721
- v(r(l(d)({
1722
- defaultMessage: "Wallet breakdown",
1723
- description: "Table heading for the wallet column in the wallet balance table",
1724
- id: "invoiceGroupWalletBalance.walletBreakdownHeading"
1725
- })), 1)
1726
- ]),
1727
- _: 1
1728
- }),
1729
- a(w, {
1730
- right: "",
1731
- class: "w-1/5 text-gray-400"
1732
- }, {
1733
- default: i(() => [
1734
- v(r(l(d)({
1735
- defaultMessage: "Balance",
1736
- description: "Table heading for the balance column in the wallet balance table",
1737
- id: "invoiceGroupWalletBalance.balanceHeading"
1738
- })), 1)
1739
- ]),
1740
- _: 1
1741
- }),
1742
- a(w, {
1743
- right: "",
1744
- class: "w-1/5 text-gray-400"
1745
- }, {
1746
- default: i(() => [
1747
- v(r(l(d)({
1748
- defaultMessage: "Used",
1749
- description: "Table heading for the used-balance column in the wallet balance table",
1750
- id: "invoiceGroupWalletBalance.usedHeading"
1751
- })), 1)
1752
- ]),
1753
- _: 1
1754
- }),
1755
- a(w, {
1756
- right: "",
1757
- class: "w-1/5 text-gray-400"
1758
- }, {
1759
- default: i(() => [
1760
- v(r(l(d)({
1761
- defaultMessage: "Remaining",
1762
- description: "Table heading for the remaining-balance column in the wallet balance table",
1763
- id: "invoiceGroupWalletBalance.remainingHeading"
1764
- })), 1)
1765
- ]),
1766
- _: 1
1767
- })
1768
- ]),
1769
- (t(!0), o(p, null, V(m.value, (c) => (t(), o("tr", {
1770
- key: c.key
1771
- }, [
1772
- a(k, null, {
1773
- default: i(() => [
1774
- v(r(c.label), 1)
1775
- ]),
1776
- _: 2
1777
- }, 1024),
1778
- a(k, { number: "" }, {
1779
- default: i(() => [
1780
- v(r(f(c.availableBalance)), 1)
1781
- ]),
1782
- _: 2
1783
- }, 1024),
1784
- a(k, { number: "" }, {
1785
- default: i(() => [
1786
- v(r(f(c.usedBalance)), 1)
1787
- ]),
1788
- _: 2
1789
- }, 1024),
1790
- a(k, { number: "" }, {
1791
- default: i(() => [
1792
- v(r(f(c.leftBalance)), 1)
1793
- ]),
1794
- _: 2
1795
- }, 1024)
1796
- ]))), 128))
1797
- ]),
1798
- _: 1
1799
- })) : b("", !0);
1800
- }
1801
- });
1802
- function ke(e) {
1803
- return typeof e == "function" ? e() : l(e);
1804
- }
1805
- typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
1806
- function fn(e = !1, n = {}) {
1807
- const {
1808
- truthyValue: d = !0,
1809
- falsyValue: m = !1
1810
- } = n, f = Ae(e), s = re(e);
1811
- function u(c) {
1812
- if (arguments.length)
1813
- return s.value = c, s.value;
1814
- {
1815
- const y = ke(d);
1816
- return s.value = s.value === y ? ke(m) : y, s.value;
1817
- }
1818
- }
1819
- return f ? u : [s, u];
1820
- }
1821
- const vn = {
1822
- key: 0,
1823
- totals: "",
1824
- class: "border-t break-inside-avoid"
1825
- }, Te = /* @__PURE__ */ S({
1826
- __name: "InvoiceSummaryTotalExcludingTax",
1827
- props: {
1828
- baseAmount: {}
1829
- },
1830
- setup(e) {
1831
- const n = G();
1832
- return (d, m) => e.baseAmount ? (t(), o("tr", vn, [
1833
- a(k, null, {
1834
- default: i(() => [
1835
- v(r(l(n).$t({
1836
- id: "invoice.table_header.total_excluding_taxes",
1837
- defaultMessage: "Total excluding taxes",
1838
- description: "Table row header for the total excluding taxes column in the invoice table"
1839
- })), 1)
1840
- ]),
1841
- _: 1
1842
- }),
1843
- a(k, { number: "" }, {
1844
- default: i(() => [
1845
- a(I, {
1846
- value: e.baseAmount,
1847
- "data-testid": l(et)
1848
- }, null, 8, ["value", "data-testid"])
1849
- ]),
1850
- _: 1
1851
- })
1852
- ])) : b("", !0);
1853
- }
1854
- }), gn = {
1855
- key: 0,
1856
- class: "border-t font-bold break-inside-avoid"
1857
- }, Oe = /* @__PURE__ */ S({
1858
- __name: "InvoiceSummaryTotalIncludingTax",
1859
- props: {
1860
- totalAmount: {},
1861
- isCustomerFacing: { type: Boolean }
1862
- },
1863
- setup(e) {
1864
- const n = G();
1865
- return (d, m) => e.totalAmount ? (t(), o("tr", gn, [
1866
- a(k, { class: "font-bold" }, {
1867
- default: i(() => [
1868
- v(r(e.isCustomerFacing ? l(n).$t({
1869
- id: "invoice.table_header.total_including_taxes_customer_facing",
1870
- defaultMessage: "Total due today",
1871
- description: "Table row header for the total including taxes column in the invoice table for a customer facing component"
1872
- }) : l(n).$t({
1873
- id: "invoice.table_header.total_including_taxes",
1874
- defaultMessage: "Total including taxes",
1875
- description: "Table row header for the total including taxes column in the invoice table"
1876
- })), 1)
1877
- ]),
1878
- _: 1
1879
- }),
1880
- a(k, { number: "" }, {
1881
- default: i(() => [
1882
- a(I, {
1883
- value: e.totalAmount,
1884
- "data-testid": l(Ze)
1885
- }, null, 8, ["value", "data-testid"])
1886
- ]),
1887
- _: 1
1888
- })
1889
- ])) : b("", !0);
1890
- }
1891
- }), yn = {
1892
- key: 0,
1893
- colspan: "4",
1894
- class: "p-0"
1895
- }, bn = /* @__PURE__ */ S({
1896
- __name: "InvoiceTaxes",
1897
- props: {
1898
- taxCategories: {}
1899
- },
1900
- setup(e) {
1901
- const n = G();
1902
- return (d, m) => (t(), h(J, { class: "table-fixed" }, {
1903
- default: i(() => [
1904
- _("tr", null, [
1905
- a(w, { left: "" }, {
1906
- default: i(() => [
1907
- v(r(l(n).$t({
1908
- id: "invoice.table_header.tax type",
1909
- defaultMessage: "Tax type",
1910
- description: "Table header for the column containing the tax type"
1911
- })), 1)
1912
- ]),
1913
- _: 1
1914
- }),
1915
- a(w, { right: "" }, {
1916
- default: i(() => [
1917
- v(r(l(n).$t({
1918
- id: "invoice.table_header.base amount",
1919
- defaultMessage: "Base amount",
1920
- description: "Table header for the column containing the base amount"
1921
- })), 1)
1922
- ]),
1923
- _: 1
1924
- }),
1925
- a(w, { right: "" }, {
1926
- default: i(() => [
1927
- v(r(l(n).$t({
1928
- id: "invoice.table_header.tax_percentage",
1929
- defaultMessage: "Percentage",
1930
- description: "Table header for the column containing the tax percentage"
1931
- })), 1)
1932
- ]),
1933
- _: 1
1934
- }),
1935
- a(w, { right: "" }, {
1936
- default: i(() => [
1937
- v(r(l(n).$t({
1938
- id: "invoice.table_header.tax amount",
1939
- defaultMessage: "Tax amount",
1940
- description: "Table header for the column containing the tax amount"
1941
- })), 1)
1942
- ]),
1943
- _: 1
1944
- })
1945
- ]),
1946
- (t(!0), o(p, null, V(e.taxCategories, (f, s) => (t(), o("tr", { key: s }, [
1947
- f.rates ? (t(), o("td", yn, [
1948
- a(J, { class: "table-fixed" }, {
1949
- default: i(() => [
1950
- (t(!0), o(p, null, V(f.rates, (u, c) => (t(), o("tr", { key: c }, [
1951
- a(k, null, {
1952
- default: i(() => [
1953
- v(r(u.name) + " (" + r(f.category) + ") ", 1)
1954
- ]),
1955
- _: 2
1956
- }, 1024),
1957
- a(k, { number: "" }, {
1958
- default: i(() => [
1959
- a(I, {
1960
- value: f.base_amount
1961
- }, null, 8, ["value"])
1962
- ]),
1963
- _: 2
1964
- }, 1024),
1965
- a(k, { number: "" }, {
1966
- default: i(() => [
1967
- v(r(u.percentage) + "%", 1)
1968
- ]),
1969
- _: 2
1970
- }, 1024),
1971
- a(k, { number: "" }, {
1972
- default: i(() => [
1973
- a(I, {
1974
- value: u.tax_amount
1975
- }, null, 8, ["value"])
1976
- ]),
1977
- _: 2
1978
- }, 1024)
1979
- ]))), 128))
1980
- ]),
1981
- _: 2
1982
- }, 1024)
1983
- ])) : (t(), o(p, { key: 1 }, [
1984
- a(k, null, {
1985
- default: i(() => [
1986
- v(r(f.name) + " (" + r(f.category) + ") ", 1)
1987
- ]),
1988
- _: 2
1989
- }, 1024),
1990
- a(k, { number: "" }, {
1991
- default: i(() => [
1992
- a(I, {
1993
- value: f.base_amount
1994
- }, null, 8, ["value"])
1995
- ]),
1996
- _: 2
1997
- }, 1024),
1998
- a(k, { number: "" }, {
1999
- default: i(() => [
2000
- v(r(f.percentage) + "%", 1)
2001
- ]),
2002
- _: 2
2003
- }, 1024),
2004
- a(k, { number: "" }, {
2005
- default: i(() => [
2006
- a(I, {
2007
- value: f.tax_amount
2008
- }, null, 8, ["value"])
2009
- ]),
2010
- _: 2
2011
- }, 1024)
2012
- ], 64))
2013
- ]))), 128))
2014
- ]),
2015
- _: 1
2016
- }));
2017
- }
2018
- }), pn = { class: "flex items-start justify-between" }, xn = {
2019
- key: 0,
2020
- class: "max-h-9"
2021
- }, hn = { class: "flex flex-col gap-2" }, _n = { key: 0 }, kn = { key: 3 }, Tn = {
2022
- colspan: "2",
2023
- class: "p-0"
2024
- }, On = ["tabindex"], In = { key: 1 }, Mn = {
2025
- colspan: "2",
2026
- class: "p-0"
2027
- }, $n = { class: "-mx-9 bg-gray-50 px-9 py-3 text-xs" }, wn = ["tabindex", "onClick", "onKeyup"], En = { key: 0 }, Cn = {
2028
- colspan: "2",
2029
- class: "p-0"
2030
- }, Nn = { class: "-mx-9 bg-gray-50 px-9 py-3 text-xs" }, Bn = { key: 1 }, An = {
2031
- colspan: "2",
2032
- class: "p-0"
2033
- }, Pn = {
2034
- key: 0,
2035
- class: "break-inside-avoid border-t font-bold"
2036
- }, Jn = /* @__PURE__ */ S({
2037
- __name: "InvoiceSummary",
2038
- props: {
2039
- invoice: {},
2040
- isExpandable: { type: Boolean, default: !1 },
2041
- forceExpanded: { type: Boolean, default: !1 },
2042
- heading: { default: "details" },
2043
- isInvoiceLineCreatable: { type: Boolean, default: !1 },
2044
- isNoteCreatable: { type: Boolean, default: !1 },
2045
- showRenderedServicesHeader: { type: Boolean, default: !0 },
2046
- isCustomerFacing: { type: Boolean },
2047
- showTotals: { type: Boolean, default: !0 },
2048
- hideOneOffWalletBalance: { type: Boolean, default: !1 },
2049
- showWalletBalance: { type: Boolean, default: !0 }
2050
- },
2051
- emits: ["add-invoice-line", "add-note"],
2052
- setup(e, { emit: n }) {
2053
- const d = G(), { formatMessage: m } = d, f = n, s = e, [u, c] = xe(), [y, g] = xe(), [x, O] = fn(), M = (...T) => {
2054
- s.isExpandable && c(...T);
2055
- }, P = (T) => {
2056
- s.isExpandable && g(T);
2057
- }, U = () => {
2058
- !s.invoice.tax_categories || !s.isExpandable || O();
2059
- }, L = (T, D) => +`${T}${D}`, E = (T) => d.$t(
2060
- {
2061
- id: "invoice.service_period_heading",
2062
- defaultMessage: "Service period - {start_at} - {end_at}",
2063
- description: "Heading for rendered services where {start_at} is replaced for the start date and {end_at} for the end date in invoice summary"
2064
- },
2065
- {
2066
- start_at: d.formatDate({
2067
- date: T.start_at,
2068
- format: "date",
2069
- timezone: pe(s.invoice.customer.timezone),
2070
- offsetType: "offsetted"
2071
- }),
2072
- end_at: d.formatDate({
2073
- date: T.end_at,
2074
- format: "date",
2075
- timezone: pe(s.invoice.customer.timezone),
2076
- offsetType: "offsetted"
2077
- })
2078
- }
2079
- ), W = (T) => {
2080
- switch (T) {
2081
- case "PRICING":
2082
- case "REVENUE":
2083
- return d.$t({
2084
- id: "invoice.table_heading.products",
2085
- defaultMessage: "Products",
2086
- description: "Table heading for the column containing the products of the invoice"
2087
- });
2088
- case "COMMITMENT":
2089
- return d.$t({
2090
- id: "invoice.table_heading.commitments",
2091
- defaultMessage: "Commitments",
2092
- description: "Table heading for the column containing the commitments of the invoice"
2093
- });
2094
- case "DISCOUNT":
2095
- return d.$t({
2096
- id: "invoice.table_heading.discounts",
2097
- defaultMessage: "Discounts",
2098
- description: "Table heading for the column containing the discounts of the invoice"
2099
- });
2100
- case "MARKUP":
2101
- return d.$t({
2102
- id: "invoice.table_heading.markups",
2103
- defaultMessage: "Markups",
2104
- description: "Table heading for the column containing the markups of the invoice"
2105
- });
2106
- case "ONE_OFF":
2107
- return d.$t({
2108
- id: "invoice.table_heading.one_offs",
2109
- defaultMessage: "One-off's",
2110
- description: "Table heading for the column containing the one-offs of the invoice"
2111
- });
2112
- }
2113
- }, C = (T) => {
2114
- var D, R;
2115
- return (D = T.products) != null && D.length ? [(R = T.pricing) == null ? void 0 : R.name, ye(T.products.map((F) => F.name))].filter(Boolean).join(" - ") : T.description ?? "";
2116
- }, z = (T) => s.showWalletBalance && !(s.hideOneOffWalletBalance && T.type === "ONE_OFF") && (T.lines ?? []).some((D) => {
2117
- var R, F;
2118
- return !!((F = (R = D.details) == null ? void 0 : R.wallet_balances) != null && F.length);
2119
- }), X = (T) => T.groups.reduce(
2120
- (D, R) => R.type in D ? {
2121
- ...D,
2122
- [R.type]: [...D[R.type], R]
2123
- } : { ...D, [R.type]: [R] },
2124
- {}
2125
- ), q = B(() => {
2126
- const T = [];
2127
- return ["ONE_OFF", "STANDARD", "ONE_OFF_CREDIT"].includes(s.invoice.type) && ["DRAFT", "OPEN"].includes(s.invoice.status) && s.isInvoiceLineCreatable && T.push({
2128
- label: m({
2129
- defaultMessage: "Invoice line",
2130
- id: "JlhdD2",
2131
- description: "Label for adding an invoice line"
2132
- }),
2133
- onClick: () => f("add-invoice-line")
2134
- }), s.isNoteCreatable && T.push({
2135
- label: m({
2136
- defaultMessage: "Note",
2137
- id: "jB8+k/",
2138
- description: "Label for adding a note to an invoice"
2139
- }),
2140
- onClick: () => f("add-note")
2141
- }), T;
2142
- }), Z = B(() => s.invoice.show_tax_per_line_item !== !1), oe = B(() => {
2143
- if (s.heading === "summary")
2144
- return d.$t({
2145
- id: "invoice.summaryTitle",
2146
- defaultMessage: "Invoice summary",
2147
- description: "Title for the compact, always-shown invoice summary section"
2148
- });
2149
- switch (s.invoice.type) {
2150
- case "CREDIT":
2151
- return d.$t({
2152
- id: "invoice.creditDetailsTitle",
2153
- defaultMessage: "Credit details",
2154
- description: "Title for the invoice summary of a credit-note invoice"
2155
- });
2156
- case "ONE_OFF":
2157
- return d.$t({
2158
- id: "invoice.oneOffDetailsTitle",
2159
- defaultMessage: "One-off details",
2160
- description: "Title for the invoice summary of a one-off invoice"
2161
- });
2162
- case "ONE_OFF_CREDIT":
2163
- return d.$t({
2164
- id: "invoice.oneOffCreditDetailsTitle",
2165
- defaultMessage: "One-off credit details",
2166
- description: "Title for the invoice summary of a one-off credit-note invoice"
2167
- });
2168
- default:
2169
- return d.$t({
2170
- id: "invoice.title",
2171
- defaultMessage: "Details",
2172
- description: "Title for the invoice summary"
2173
- });
2174
- }
2175
- });
2176
- return (T, D) => {
2177
- var R;
2178
- return t(), o("div", null, [
2179
- _("div", pn, [
2180
- T.$slots.logo ? (t(), o("div", xn, [
2181
- $(T.$slots, "logo")
2182
- ])) : (t(), h(He, {
2183
- key: 1,
2184
- title: oe.value,
2185
- variant: "neutral",
2186
- icon: "draft",
2187
- "icon-class": "print:hidden",
2188
- "title-class": "print:text-sm"
2189
- }, null, 8, ["title"])),
2190
- T.$slots.intro ? $(T.$slots, "intro", {}, void 0, void 0, 2) : b("", !0),
2191
- _("div", hn, [
2192
- (R = q.value) != null && R.length ? (t(), h(Xe, {
2193
- key: 0,
2194
- items: q.value,
2195
- width: "auto"
2196
- }, {
2197
- trigger: i(() => [
2198
- a(Le, {
2199
- "icon-prefix": "add",
2200
- size: "sm",
2201
- intent: "secondary"
2202
- }, {
2203
- default: i(() => [
2204
- v(r(l(m)({
2205
- defaultMessage: "Add",
2206
- id: "YnK/yF",
2207
- description: "Label for adding an item to an invoice"
2208
- })), 1)
2209
- ]),
2210
- _: 1
2211
- })
2212
- ]),
2213
- _: 1
2214
- }, 8, ["items"])) : b("", !0),
2215
- $(T.$slots, "child-customers-selector")
2216
- ])
2217
- ]),
2218
- T.$slots.total ? $(T.$slots, "total", {}, void 0, void 0, 0) : b("", !0),
2219
- $(T.$slots, "notes"),
2220
- (t(!0), o(p, null, V(e.invoice.periods, (F, Y) => (t(), o(p, { key: Y }, [
2221
- e.showRenderedServicesHeader ? (t(), h(Ge, {
2222
- key: 0,
2223
- class: "mt-6"
2224
- }, {
2225
- default: i(() => [
2226
- a(Pe, {
2227
- tag: "h2",
2228
- variant: "caps-heading"
2229
- }, {
2230
- default: i(() => [
2231
- v(r(E(F)), 1)
2232
- ]),
2233
- _: 2
2234
- }, 1024)
2235
- ]),
2236
- _: 2
2237
- }, 1024)) : b("", !0),
2238
- F.groups ? (t(), h(J, {
2239
- key: 1,
2240
- class: N(["text-sm", { "mt-3": e.showRenderedServicesHeader }]),
2241
- "data-testid": l(Ke)
2242
- }, {
2243
- default: i(() => [
2244
- (t(!0), o(p, null, V(Object.entries(
2245
- X(F)
2246
- ), ([A, ee], K) => (t(), o(p, { key: A }, [
2247
- K > 0 ? (t(), o("tr", _n, [...D[0] || (D[0] = [
2248
- _("td", null, [
2249
- _("div", { class: "h-4" })
2250
- ], -1)
2251
- ])])) : b("", !0),
2252
- _("tr", null, [
2253
- a(w, {
2254
- left: "",
2255
- class: "text-secondary"
2256
- }, {
2257
- default: i(() => [
2258
- v(r(W(A)), 1)
2259
- ]),
2260
- _: 2
2261
- }, 1024),
2262
- a(w, {
2263
- right: "",
2264
- class: "w-28 text-secondary"
2265
- }, {
2266
- default: i(() => [
2267
- v(r(l(d).$t({
2268
- id: "invoice.amount_table_heading",
2269
- defaultMessage: "Amount",
2270
- description: "Table heading for the amount column in the invoice table"
2271
- })), 1)
2272
- ]),
2273
- _: 1
2274
- })
2275
- ]),
2276
- (t(!0), o(p, null, V(ee, (te, Be) => (t(), o(p, { key: Be }, [
2277
- A === "REVENUE" || A === "PRICING" || A === "ONE_OFF" ? (t(), h(mn, {
2278
- key: 0,
2279
- group: te,
2280
- "expanded-items": l(u),
2281
- "handle-toggle-items": M,
2282
- "is-expandable": e.isExpandable,
2283
- "force-expanded": e.forceExpanded,
2284
- "format-index": L,
2285
- "invoice-period-order": F.period_order,
2286
- "group-order": te.group_order,
2287
- "amount-type": e.invoice.pricing_amount_type,
2288
- "processing-only-customers": e.invoice.processing_only_customers,
2289
- "display-invoice-sub-lines-per-processing-only-customer": e.invoice.display_invoice_sub_lines_per_processing_only_customer,
2290
- "show-tax-per-line-item": Z.value,
2291
- "forwarded-from-customers": e.invoice.forwarded_from_customers,
2292
- "show-original-customer-invoice-line": e.invoice.show_original_customer_invoice_line
2293
- }, {
2294
- "invoice-line-prefix": i((ne) => [
2295
- $(T.$slots, "invoice-line-prefix", Q({ ref_for: !0 }, ne))
2296
- ]),
2297
- "one-off-line-context-menu": i((ne) => [
2298
- $(T.$slots, "one-off-line-context-menu", Q({ ref_for: !0 }, ne, {
2299
- periodOrder: F.period_order
2300
- }))
2301
- ]),
2302
- _: 2
2303
- }, 1032, ["group", "expanded-items", "is-expandable", "force-expanded", "invoice-period-order", "group-order", "amount-type", "processing-only-customers", "display-invoice-sub-lines-per-processing-only-customer", "show-tax-per-line-item", "forwarded-from-customers", "show-original-customer-invoice-line"])) : A === "DISCOUNT" || A === "MARKUP" ? (t(), h(Mt, {
2304
- key: 1,
2305
- group: te,
2306
- "expanded-items": l(u),
2307
- "handle-toggle-items": M,
2308
- "is-expandable": e.isExpandable,
2309
- "force-expanded": e.forceExpanded,
2310
- "format-index": L,
2311
- "invoice-period-order": F.period_order,
2312
- "group-order": te.group_order,
2313
- "amount-type": e.invoice.pricing_amount_type,
2314
- heading: A === "DISCOUNT" ? l(d).$t({
2315
- id: "invoice.discounts_table_heading",
2316
- defaultMessage: "Discounts",
2317
- description: "Heading for discounts in the invoice table"
2318
- }) : l(d).$t({
2319
- id: "invoice.markups_table_heading",
2320
- defaultMessage: "Markups",
2321
- description: "Heading for markups in the invoice table"
2322
- })
2323
- }, {
2324
- "invoice-line-prefix": i((ne) => [
2325
- $(T.$slots, "invoice-line-prefix", Q({ ref_for: !0 }, ne))
2326
- ]),
2327
- _: 3
2328
- }, 8, ["group", "expanded-items", "is-expandable", "force-expanded", "invoice-period-order", "group-order", "amount-type", "heading"])) : A === "COMMITMENT" ? (t(), h(_t, {
2329
- key: 2,
2330
- group: te,
2331
- "expanded-items": l(u),
2332
- "handle-toggle-items": M,
2333
- "is-expandable": e.isExpandable,
2334
- "force-expanded": e.forceExpanded,
2335
- "format-index": L,
2336
- "invoice-period-order": F.period_order,
2337
- "group-order": te.group_order,
2338
- "amount-type": e.invoice.pricing_amount_type
2339
- }, {
2340
- "invoice-line-prefix": i((ne) => [
2341
- $(T.$slots, "invoice-line-prefix", Q({ ref_for: !0 }, ne))
2342
- ]),
2343
- _: 3
2344
- }, 8, ["group", "expanded-items", "is-expandable", "force-expanded", "invoice-period-order", "group-order", "amount-type"])) : b("", !0),
2345
- z(te) ? (t(), o("tr", kn, [
2346
- _("td", Tn, [
2347
- a(_e, {
2348
- lines: te.lines,
2349
- "credit-types": e.invoice.credit_types
2350
- }, null, 8, ["lines", "credit-types"])
2351
- ])
2352
- ])) : b("", !0)
2353
- ], 64))), 128))
2354
- ], 64))), 128))
2355
- ]),
2356
- _: 2
2357
- }, 1032, ["class", "data-testid"])) : b("", !0)
2358
- ], 64))), 128)),
2359
- e.invoice.tax_summary && (e.showTotals || (e.forceExpanded || l(x)) && e.invoice.tax_categories) ? (t(), h(J, {
2360
- key: 1,
2361
- class: "mt-6 text-sm print:ml-auto print:w-2/3"
2362
- }, {
2363
- default: i(() => [
2364
- e.showTotals ? (t(), o(p, { key: 0 }, [
2365
- _("tr", null, [
2366
- a(w, {
2367
- left: "",
2368
- class: "text-secondary"
2369
- }, {
2370
- default: i(() => [
2371
- v(r(l(d).$t({
2372
- id: "invoice.totals_table_heading",
2373
- defaultMessage: "Totals",
2374
- description: "Table heading for the totals column in the invoice table"
2375
- })), 1)
2376
- ]),
2377
- _: 1
2378
- }),
2379
- a(w, {
2380
- right: "",
2381
- class: "w-28 text-secondary"
2382
- }, {
2383
- default: i(() => [
2384
- v(r(l(d).$t({
2385
- id: "invoice.amount_table_heading",
2386
- defaultMessage: "Amount",
2387
- description: "Table heading for the amount column in the invoice table"
2388
- })), 1)
2389
- ]),
2390
- _: 1
2391
- })
2392
- ]),
2393
- e.invoice.pricing_amount_type === "INCLUDING_TAX" ? (t(), h(Oe, {
2394
- key: 0,
2395
- "total-amount": e.invoice.tax_summary.total_amount,
2396
- "is-customer-facing": e.isCustomerFacing
2397
- }, null, 8, ["total-amount", "is-customer-facing"])) : (t(), h(Te, {
2398
- key: 1,
2399
- "base-amount": e.invoice.tax_summary.base_amount
2400
- }, null, 8, ["base-amount"])),
2401
- e.invoice.tax_summary.tax_amount ? (t(), o("tr", {
2402
- key: 2,
2403
- class: N([{ "cursor-pointer": e.invoice.tax_categories && e.isExpandable }, "break-inside-avoid border-t"]),
2404
- tabindex: e.isExpandable ? 0 : void 0,
2405
- onClick: U,
2406
- onKeyup: [
2407
- j(U, ["enter"]),
2408
- j(U, ["space"])
2409
- ]
2410
- }, [
2411
- a(k, null, {
2412
- default: i(() => [
2413
- e.isExpandable && e.invoice.tax_categories && e.invoice.tax_categories.length ? (t(), h(H, {
2414
- key: 0,
2415
- icon: "keyboard_arrow_down",
2416
- size: "md",
2417
- class: N(["absolute -translate-x-7 text-slate-400", { "-rotate-90": !l(x) }])
2418
- }, null, 8, ["class"])) : b("", !0),
2419
- a(me, {
2420
- label: l(d).$t({
2421
- id: "invoice.taxes_table_heading",
2422
- defaultMessage: "Taxes",
2423
- description: "Table heading for the taxes column in the invoice table"
2424
- }),
2425
- count: e.isExpandable && e.invoice.tax_categories ? e.invoice.tax_categories.length : void 0
2426
- }, null, 8, ["label", "count"])
2427
- ]),
2428
- _: 1
2429
- }),
2430
- a(k, { number: "" }, {
2431
- default: i(() => [
2432
- a(I, {
2433
- value: e.invoice.tax_summary.tax_amount,
2434
- "data-testid": l(Je)
2435
- }, null, 8, ["value", "data-testid"])
2436
- ]),
2437
- _: 1
2438
- })
2439
- ], 42, On)) : b("", !0)
2440
- ], 64)) : b("", !0),
2441
- (e.forceExpanded || l(x)) && e.invoice.tax_categories ? (t(), o("tr", In, [
2442
- _("td", Mn, [
2443
- _("div", $n, [
2444
- a(bn, {
2445
- "tax-categories": e.invoice.tax_categories
2446
- }, null, 8, ["tax-categories"])
2447
- ])
2448
- ])
2449
- ])) : b("", !0),
2450
- e.showTotals ? (t(), o(p, { key: 2 }, [
2451
- e.invoice.pricing_amount_type === "INCLUDING_TAX" ? (t(), h(Te, {
2452
- key: 0,
2453
- "base-amount": e.invoice.tax_summary.base_amount
2454
- }, null, 8, ["base-amount"])) : (t(), h(Oe, {
2455
- key: 1,
2456
- "total-amount": e.invoice.tax_summary.total_amount
2457
- }, null, 8, ["total-amount"]))
2458
- ], 64)) : b("", !0)
2459
- ]),
2460
- _: 1
2461
- })) : b("", !0),
2462
- l(Ue)(e.invoice.closed_periods) ? b("", !0) : (t(), h(J, {
2463
- key: 2,
2464
- class: "mt-6 text-sm"
2465
- }, {
2466
- default: i(() => [
2467
- _("tr", null, [
2468
- a(w, {
2469
- left: "",
2470
- class: "text-secondary"
2471
- }, {
2472
- default: i(() => [
2473
- v(r(l(d).$t({
2474
- id: "invoice.already_deducted_table_heading",
2475
- defaultMessage: "Already deducted",
2476
- description: "Table heading for the already deducted rows in the invoice table"
2477
- })), 1)
2478
- ]),
2479
- _: 1
2480
- })
2481
- ]),
2482
- (t(!0), o(p, null, V(e.invoice.closed_periods, (F, Y) => (t(), o(p, { key: Y }, [
2483
- (t(!0), o(p, null, V(F.groups, (A, ee) => (t(), o(p, { key: ee }, [
2484
- _("tr", {
2485
- class: N(["break-inside-avoid border-t", { "pt-6": Y === 0, "cursor-pointer": e.isExpandable }]),
2486
- tabindex: e.isExpandable ? 0 : void 0,
2487
- onClick: (K) => P(L(Y, ee)),
2488
- onKeyup: [
2489
- j((K) => P(L(Y, ee)), ["enter"]),
2490
- j((K) => P(L(Y, ee)), ["space"])
2491
- ]
2492
- }, [
2493
- a(k, { class: "p-0" }, {
2494
- default: i(() => {
2495
- var K;
2496
- return [
2497
- e.isExpandable ? (t(), h(H, {
2498
- key: 0,
2499
- icon: "keyboard_arrow_down",
2500
- size: "md",
2501
- class: N(["absolute -translate-x-7 text-slate-400", {
2502
- "-rotate-90": !l(y).includes(
2503
- L(Y, ee)
2504
- )
2505
- }])
2506
- }, null, 8, ["class"])) : b("", !0),
2507
- a(me, {
2508
- label: C(A),
2509
- count: e.isExpandable ? ((K = A.lines) == null ? void 0 : K.length) ?? 0 : void 0
2510
- }, null, 8, ["label", "count"])
2511
- ];
2512
- }),
2513
- _: 2
2514
- }, 1024),
2515
- a(k, {
2516
- number: "",
2517
- class: "w-28"
2518
- }, {
2519
- default: i(() => [
2520
- a(I, {
2521
- value: A.amount_excluding_tax,
2522
- "data-testid": l(tt),
2523
- "data-type": l(it)
2524
- }, null, 8, ["value", "data-testid", "data-type"])
2525
- ]),
2526
- _: 2
2527
- }, 1024)
2528
- ], 42, wn),
2529
- e.forceExpanded || l(y).includes(L(Y, ee)) ? (t(), o("tr", En, [
2530
- _("td", Cn, [
2531
- _("div", Nn, [
2532
- a(Ne, {
2533
- "start-date": A.start_at,
2534
- "end-date": A.end_at,
2535
- total: A.amount_excluding_tax,
2536
- group: A,
2537
- "amount-type": e.invoice.pricing_amount_type,
2538
- "show-tax-per-line-item": Z.value,
2539
- "processing-only-customers": e.invoice.processing_only_customers,
2540
- "display-invoice-sub-lines-per-processing-only-customer": e.invoice.display_invoice_sub_lines_per_processing_only_customer
2541
- }, {
2542
- "one-off-line-context-menu": i((K) => [
2543
- $(T.$slots, "one-off-line-context-menu", Q({ ref_for: !0 }, K, {
2544
- groupOrder: A.group_order,
2545
- periodOrder: F.period_order
2546
- }))
2547
- ]),
2548
- _: 2
2549
- }, 1032, ["start-date", "end-date", "total", "group", "amount-type", "show-tax-per-line-item", "processing-only-customers", "display-invoice-sub-lines-per-processing-only-customer"])
2550
- ])
2551
- ])
2552
- ])) : b("", !0),
2553
- z(A) ? (t(), o("tr", Bn, [
2554
- _("td", An, [
2555
- a(_e, {
2556
- lines: A.lines,
2557
- "credit-types": e.invoice.credit_types
2558
- }, null, 8, ["lines", "credit-types"])
2559
- ])
2560
- ])) : b("", !0)
2561
- ], 64))), 128))
2562
- ], 64))), 128)),
2563
- e.invoice.open_invoice_amount && !e.invoice.paid && e.showTotals ? (t(), o("tr", Pn, [
2564
- a(k, { class: "font-bold" }, {
2565
- default: i(() => [
2566
- v(r(l(d).$t({
2567
- id: "invoice.amount_due_table_heading",
2568
- defaultMessage: "Amount due",
2569
- description: "Table heading for the amount due row in the invoice table"
2570
- })), 1)
2571
- ]),
2572
- _: 1
2573
- }),
2574
- a(k, { number: "" }, {
2575
- default: i(() => [
2576
- a(I, {
2577
- value: e.invoice.open_invoice_amount,
2578
- "data-testid": l(nt)
2579
- }, null, 8, ["value", "data-testid"])
2580
- ]),
2581
- _: 1
2582
- })
2583
- ])) : b("", !0)
2584
- ]),
2585
- _: 3
2586
- }))
2587
- ]);
2588
- };
2589
- }
2590
- });
2591
- export {
2592
- J as I,
2593
- Jn as _,
2594
- w as a,
2595
- k as b
2596
- };