@solvimon/solvimon-web 0.1.0-alpha.19 → 0.1.0-alpha.20
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.
- package/README.md +9 -7
- package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Y3CzulQq.mjs → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Ce30EXY5.mjs} +8 -9
- package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-kmam2c7P.js +1 -0
- package/dist/{Amount.vue.es-CRG-6dps.mjs → Amount.vue.es-BO5sS1UX.mjs} +4 -2
- package/dist/Amount.vue.es-JDVa_3H-.js +1 -0
- package/dist/{Avatar.vue.es-ClUBm_l5.js → Avatar.vue.es-BGTZSAqU.js} +1 -1
- package/dist/{Avatar.vue.es-DJp6NEU_.mjs → Avatar.vue.es-DJzJiYtv.mjs} +1 -1
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BUMK11Dw.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-Bq2mTdUs.mjs} +5 -6
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-DzrInCPA.js → BillingInformation.vue_vue_type_script_setup_true_lang-BtNTRSqH.js} +1 -1
- package/dist/{Button.vue.es-BrWHdiEA.mjs → Button.vue.es-Cm9pLU9i.mjs} +61 -93
- package/dist/Button.vue.es-O8mNivLL.js +1 -0
- package/dist/Chip.vue.es-BBmn-qJp.mjs +120 -0
- package/dist/Chip.vue.es-DmCjC1hi.js +1 -0
- package/dist/{Comparators.vue.es-CU32AC4n.mjs → Comparators.vue.es-CYfxd5H-.mjs} +1 -1
- package/dist/{Comparators.vue.es-CfVGYJ_x.js → Comparators.vue.es-DK8wGjxM.js} +1 -1
- package/dist/{ContextMenu.vue.es-BBPFQfqY.mjs → ContextMenu.vue.es-CTc1ktXb.mjs} +23 -23
- package/dist/ContextMenu.vue.es-DaW0yp4Y.js +1 -0
- package/dist/{CustomerBillingInformation.vue.es-s-LYXA4T.js → CustomerBillingInformation.vue.es-BX0Da7Kr.js} +1 -1
- package/dist/{CustomerBillingInformation.vue.es-CLmXk5B9.mjs → CustomerBillingInformation.vue.es-CMZO8oLj.mjs} +3 -3
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Bi_dCntQ.js +1 -0
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-B2CtcBm0.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CtdFharm.mjs} +8 -10
- package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-Bej5_H7r.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BDqBXbJq.mjs} +37 -34
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-ZyN2vlNu.js +1 -0
- package/dist/{DividerText.vue.es-DMg-DNgi.mjs → DividerText.vue.es-CeAHAe_Y.mjs} +1 -1
- package/dist/{DividerText.vue.es-D5ieOE1e.js → DividerText.vue.es-DjT4i_YD.js} +1 -1
- package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CTG5XdQt.mjs → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-DLE5-9wz.mjs} +16 -16
- package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-5I81Qr6q.js → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-DkIK-lID.js} +1 -1
- package/dist/ErrorNotification.vue.es-CHyVTBGs.mjs +38 -0
- package/dist/ErrorNotification.vue.es-CaEFTi2k.js +1 -0
- package/dist/FormMessage.vue.es-Bd4_NG9H.js +1 -0
- package/dist/{FormMessage.vue.es-DFQXxiSC.mjs → FormMessage.vue.es-C3oxwq_8.mjs} +3 -3
- package/dist/IconButton.vue.es-BHdQskx0.js +1 -0
- package/dist/{IconButton.vue.es-DcC4f5EQ.mjs → IconButton.vue.es-KywqWWvr.mjs} +20 -23
- package/dist/{IconTitle.vue.es-mQCMxc64.mjs → IconTitle.vue.es-BmjBdZb_.mjs} +13 -11
- package/dist/IconTitle.vue.es-D9Wc3PIq.js +1 -0
- package/dist/Input.vue.es-DqKJhFTr.js +1 -0
- package/dist/{Input.vue.es-Dp_RH03h.mjs → Input.vue.es-WZGF8dfr.mjs} +28 -16
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-56fy6uY6.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-B6efz7NU.mjs} +2 -2
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-CLUcV3qa.js → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-LE6zBLKM.js} +1 -1
- package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-ztaMeHQc.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-C2aLMfu6.mjs} +2 -2
- package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-flgEyaoj.js → InvoiceEntryView.vue_vue_type_script_setup_true_lang-CtpFzWU3.js} +1 -1
- package/dist/{InvoiceSummary.vue.es-nCYeQ4tj.mjs → InvoiceSummary.vue.es-BI5sD_8F.mjs} +1057 -671
- package/dist/InvoiceSummary.vue.es-BWYIHezU.js +1 -0
- package/dist/Modal.vue.es-B_1aqm_m.js +1 -0
- package/dist/{Modal.vue.es-5EpA4Q0t.mjs → Modal.vue.es-qdUHDOnU.mjs} +172 -56
- package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-BKKXQbge.js +1 -0
- package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-D7IX9qqy.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-Ch1TFO7x.mjs} +7 -8
- package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-C8nvN-6f.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CsH47WSM.mjs} +3 -3
- package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-D1oKZZ_m.js → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-mKNNYnMU.js} +1 -1
- package/dist/{PaymentHistoryBlock-Dejtgyos.mjs → PaymentHistoryBlock-CgNUV8Gy.mjs} +1 -1
- package/dist/{PaymentHistoryBlock-RBxlC5xt.js → PaymentHistoryBlock-Ci8aSJeb.js} +1 -1
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DZwnDzha.js +1 -0
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-Dk52bjJd.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-Uj1aK-dp.mjs} +16 -16
- package/dist/{PaymentIntegrationForm-CbqfAdkc.mjs → PaymentIntegrationForm-CLokpXvK.mjs} +1 -1
- package/dist/{PaymentIntegrationForm-BWr7iyU6.js → PaymentIntegrationForm-CsuueDE0.js} +1 -1
- package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DJHwpswk.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CRUs7sP4.mjs} +26 -8
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-kKkzRi6w.js +1 -0
- package/dist/{PaymentIntegrationFormAdyen-CuRwe9_9.mjs → PaymentIntegrationFormAdyen-C885o8IE.mjs} +37 -29
- package/dist/PaymentIntegrationFormAdyen-Co19AgvG.js +1 -0
- package/dist/{PaymentIntegrationFormStripe-JZw2m1kJ.mjs → PaymentIntegrationFormStripe-BjMdJmDC.mjs} +8 -6
- package/dist/PaymentIntegrationFormStripe-DWff6wzK.js +1 -0
- package/dist/PaymentMethod.vue.es-CdskNJ3Z.js +1 -0
- package/dist/PaymentMethod.vue.es-rv-pu1CC.mjs +677 -0
- package/dist/{PaymentMethodForm-C5WqTDow.mjs → PaymentMethodForm-IEuDxEPN.mjs} +1 -1
- package/dist/{PaymentMethodForm-CBjHdZT7.js → PaymentMethodForm-hZuVHAti.js} +1 -1
- package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-Cj60U90J.js +1 -0
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-DhPTbip8.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-gA74Rak9.mjs} +21 -8
- package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-B3H_AWMM.js +1 -0
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-DbTvbHk7.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-CTn-OxM6.mjs} +7 -7
- package/dist/{PricingGroupRangeInput.vue.es-A6eW-u2k.mjs → PricingGroupRangeInput.vue.es-ButaePib.mjs} +13 -17
- package/dist/PricingGroupRangeInput.vue.es-Cls2lm80.js +1 -0
- package/dist/{Section.vue.es-tLYXp-tF.js → Section.vue.es-CAJvEDn6.js} +1 -1
- package/dist/{Section.vue.es-MEFUWCxU.mjs → Section.vue.es-DX_9ueCG.mjs} +1 -1
- package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-CQAkPfJz.js +1 -0
- package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-xvgyB2Yr.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DVtMzgjc.mjs} +31 -37
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-BJVXCHny.js +1 -0
- package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-B_Zkbqx2.mjs → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-ByO-L6nm.mjs} +171 -105
- package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-Cj36jvZF.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-C5zB3CgZ.mjs} +4 -4
- package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-CabskT-r.js +1 -0
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-D-T1wGg7.js +1 -0
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-CfXgGKXA.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-DKd2DIVb.mjs} +12 -13
- package/dist/{TooltipParagraph.vue.es-B5aHQv9O.mjs → TooltipParagraph.vue.es-C5RTcrid.mjs} +3 -3
- package/dist/{TooltipParagraph.vue.es-fSwKGXKg.js → TooltipParagraph.vue.es-H9fI7zzt.js} +1 -1
- package/dist/{TrialChip.vue.es-Fp7Lqo-b.mjs → TrialChip.vue.es-B1puKyR-.mjs} +3 -3
- package/dist/TrialChip.vue.es-CCs50m02.js +1 -0
- package/dist/accel.svg.es-CE5tIWtm.mjs +4 -0
- package/dist/accel.svg.es-Dt_1wJmV.js +1 -0
- package/dist/ach.svg.es-B4tn0_IV.js +1 -0
- package/dist/ach.svg.es-D4QPcIU-.mjs +4 -0
- package/dist/{adyen-Ba-mF3Jy.mjs → adyen-BXi_D9TQ.mjs} +14 -21
- package/dist/adyen-VS2sDW0m.js +1 -0
- package/dist/amazon-pay.svg.es-B428S4f3.js +1 -0
- package/dist/amazon-pay.svg.es-DUScOW15.mjs +4 -0
- package/dist/amex.svg.es-BCXkaVLN.mjs +4 -0
- package/dist/amex.svg.es-Bn9e31C3.js +1 -0
- package/dist/apple-pay.svg.es-Cfgn0K28.js +1 -0
- package/dist/apple-pay.svg.es-DlCfkt39.mjs +4 -0
- package/dist/bacs.svg.es-BKsvSeIP.mjs +4 -0
- package/dist/bacs.svg.es-hL7hLPkQ.js +1 -0
- package/dist/bancontact.svg.es-BbRqGgZ9.mjs +4 -0
- package/dist/bancontact.svg.es-DU2ejvNL.js +1 -0
- package/dist/carnet.svg.es-C5SFaOsa.js +1 -0
- package/dist/carnet.svg.es-Db-KEb13.mjs +4 -0
- package/dist/cartes-bancaires.svg.es-ByD-JAAi.mjs +4 -0
- package/dist/cartes-bancaires.svg.es-CbBJQZrk.js +1 -0
- package/dist/cashapp.svg.es-CnS5r_D8.mjs +4 -0
- package/dist/cashapp.svg.es-DE4vMu_p.js +1 -0
- package/dist/{cn.es-DB5pDpxS.mjs → cn.es-BEU5D0Wz.mjs} +4 -4
- package/dist/cn.es-DxSeYcoP.js +1 -0
- package/dist/components/BillingInformation/BillingInformation.cjs +1 -1
- package/dist/components/BillingInformation/BillingInformation.mjs +4 -4
- package/dist/components/BillingInformationForm/BillingInformationForm.cjs +1 -1
- package/dist/components/BillingInformationForm/BillingInformationForm.mjs +8 -8
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs +1 -1
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +4 -4
- package/dist/components/Invoice/Invoice.cjs +1 -1
- package/dist/components/Invoice/Invoice.mjs +19 -19
- package/dist/components/InvoiceDetails/InvoiceDetails.cjs +1 -1
- package/dist/components/InvoiceDetails/InvoiceDetails.mjs +3 -3
- package/dist/components/InvoiceHeader/InvoiceHeader.cjs +1 -1
- package/dist/components/InvoiceHeader/InvoiceHeader.mjs +2 -2
- package/dist/components/InvoicesList/InvoicesList.cjs +1 -1
- package/dist/components/InvoicesList/InvoicesList.mjs +3 -3
- package/dist/components/PaymentHistory/PaymentHistory.cjs +1 -1
- package/dist/components/PaymentHistory/PaymentHistory.mjs +3 -3
- package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs +1 -1
- package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +5 -5
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs +1 -1
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +4 -4
- package/dist/components/SubscriptionsList/SubscriptionsList.cjs +1 -1
- package/dist/components/SubscriptionsList/SubscriptionsList.mjs +5 -5
- package/dist/components/WalletBalances/WalletBalances.cjs +1 -1
- package/dist/components/WalletBalances/WalletBalances.mjs +3 -3
- package/dist/{customElements-DdFA__me.mjs → customElements-B-89a5oH.mjs} +134 -53
- package/dist/customElements-DD7bpqkx.js +1 -0
- package/dist/{customer-D7HUfF3j.js → customer-DozNwS_a.js} +1 -1
- package/dist/{customer-B0AMetq6.mjs → customer-Dzj1g9lV.mjs} +1 -1
- package/dist/dana.svg.es-Bbn6_ktN.mjs +4 -0
- package/dist/dana.svg.es-DKZaseoJ.js +1 -0
- package/dist/dankort.svg.es-D8FgSiFf.js +1 -0
- package/dist/dankort.svg.es-DtAdliQq.mjs +4 -0
- package/dist/de-DE-BeyQVhTv.mjs +299 -0
- package/dist/de-DE-BvHD68Ay.js +1 -0
- package/dist/de-DE-CI2zQkiP.mjs +266 -0
- package/dist/de-DE-_40QfLNJ.js +1 -0
- package/dist/diners.svg.es-DhchsD1D.mjs +4 -0
- package/dist/diners.svg.es-SydF_H-Z.js +1 -0
- package/dist/discover.svg.es-B8vgzVNG.js +1 -0
- package/dist/discover.svg.es-BnqYPvnV.mjs +4 -0
- package/dist/eftpos.svg.es-DO0YPaY1.js +1 -0
- package/dist/eftpos.svg.es-DRLaafYa.mjs +4 -0
- package/dist/elo.svg.es-CTOm1rvj.js +1 -0
- package/dist/elo.svg.es-CgkEOP_O.mjs +4 -0
- package/dist/en-US--NRsi7Hz.js +1 -0
- package/dist/{en-US-D0P7NNNZ.mjs → en-US-5YWNEi-V.mjs} +72 -1
- package/dist/{en-US-Daw3v6GD.mjs → en-US-DksUWPIu.mjs} +10 -0
- package/dist/en-US-dqfKx3GS.js +1 -0
- package/dist/eps.svg.es-CApyGjyU.js +1 -0
- package/dist/eps.svg.es-D6IHsRYP.mjs +4 -0
- package/dist/formatting.es-DBtYnvI5.js +1 -0
- package/dist/{formatting.es-D-oVnc8H.mjs → formatting.es-eYgXv_AK.mjs} +3 -1
- package/dist/gcash.svg.es-BhJ-eA2z.mjs +4 -0
- package/dist/gcash.svg.es-JaL4fpZr.js +1 -0
- package/dist/girocard.svg.es-D_3LML4l.mjs +4 -0
- package/dist/girocard.svg.es-tVgtT23w.js +1 -0
- package/dist/go-pay.svg.es-6UtgwVBA.mjs +4 -0
- package/dist/go-pay.svg.es-fYX6yMzJ.js +1 -0
- package/dist/google-pay.svg.es-BYXX1em8.js +1 -0
- package/dist/google-pay.svg.es-CRxXgFVl.mjs +4 -0
- package/dist/hipercard.svg.es-Ct1-mF9F.mjs +4 -0
- package/dist/hipercard.svg.es-D-nmiFXB.js +1 -0
- package/dist/icon-sprite.svg.es-BpwT0GQ5.js +1 -0
- package/dist/icon-sprite.svg.es-YYqtl2IP.mjs +4 -0
- package/dist/ideal.svg.es-D23EhJJ2.mjs +4 -0
- package/dist/ideal.svg.es-DXtHE0Jb.js +1 -0
- package/dist/{index-C5bKRt7l.mjs → index-Cai7laNY.mjs} +1 -1
- package/dist/{index-BJ3dHkSK.js → index-IZaUTAsE.js} +1 -1
- package/dist/{index.es-0cystq8F.mjs → index.es-D5xOw_SJ.mjs} +2 -2
- package/dist/{invoices-BSd-nKeE.mjs → invoices-1oYkdQQV.mjs} +1 -1
- package/dist/{invoices-BiqM6xN6.js → invoices-BAoh6X2a.js} +1 -1
- package/dist/it-IT-B6blp8MI.mjs +299 -0
- package/dist/it-IT-CEP3oeWs.js +1 -0
- package/dist/it-IT-CMy1tHKZ.mjs +266 -0
- package/dist/it-IT-aPQY57ht.js +1 -0
- package/dist/jcb.svg.es-Bz6J-c0s.js +1 -0
- package/dist/jcb.svg.es-CcH08OoO.mjs +4 -0
- package/dist/kakao-pay.svg.es-DcgRDAsc.mjs +4 -0
- package/dist/kakao-pay.svg.es-qVTABboW.js +1 -0
- package/dist/klarna.svg.es-Clu-7zkp.js +1 -0
- package/dist/klarna.svg.es-DfIPX0gr.mjs +4 -0
- package/dist/maestro.svg.es-CVmNVokN.mjs +4 -0
- package/dist/maestro.svg.es-e8E_H2QU.js +1 -0
- package/dist/mastercard.svg.es-B8z0ZySS.mjs +4 -0
- package/dist/mastercard.svg.es-YO3_jGD6.js +1 -0
- package/dist/momo.svg.es-BXTQlQRy.js +1 -0
- package/dist/momo.svg.es-Bm5zCTOT.mjs +4 -0
- package/dist/{nl-NL-B4zEBFTw.mjs → nl-NL-CckNM7R9.mjs} +10 -0
- package/dist/nl-NL-CjoW8r_M.mjs +314 -0
- package/dist/nl-NL-e_vf6OuT.js +1 -0
- package/dist/nl-NL-zRUAuEHg.js +1 -0
- package/dist/nyce.svg.es-CgurqLKH.mjs +4 -0
- package/dist/nyce.svg.es-DM6esO47.js +1 -0
- package/dist/open-banking.svg.es-DUM360xB.js +1 -0
- package/dist/open-banking.svg.es-DzzLCVp_.mjs +4 -0
- package/dist/{paymentMethods-Cu2RzLgm.js → paymentMethods-CZ3ydybI.js} +1 -1
- package/dist/{paymentMethods-BsrkEbKT.mjs → paymentMethods-DIV78w0O.mjs} +1 -1
- package/dist/{payments-Bbm1HMQj.js → payments--lkjiwCt.js} +1 -1
- package/dist/{payments-B6Nfd6Al.mjs → payments-Cvqdrprv.mjs} +1 -1
- package/dist/paypal.svg.es-BdkNTf3c.js +1 -0
- package/dist/paypal.svg.es-DltWzW4V.mjs +4 -0
- package/dist/pulse.svg.es-BdpWAuIN.js +1 -0
- package/dist/pulse.svg.es-BecAwT-p.mjs +4 -0
- package/dist/screens/Checkout/Checkout.cjs +1 -1
- package/dist/screens/Checkout/Checkout.mjs +62 -62
- package/dist/screens/CustomerOverview/CustomerOverview.cjs +1 -1
- package/dist/screens/CustomerOverview/CustomerOverview.mjs +10 -10
- package/dist/screens/PayInvoice/PayInvoice.cjs +1 -1
- package/dist/screens/PayInvoice/PayInvoice.mjs +141 -38
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs +1 -1
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +12 -14
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs +1 -1
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +28 -31
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +1 -1
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +18 -18
- package/dist/sepa.svg.es-BF8PYKZg.js +1 -0
- package/dist/sepa.svg.es-cbE9g8gV.mjs +4 -0
- package/dist/star.svg.es-DsCD-tSp.mjs +4 -0
- package/dist/star.svg.es-Q50IzqXr.js +1 -0
- package/dist/{subscriptions-B4BOzLxR.js → subscriptions-300o4ae0.js} +1 -1
- package/dist/{subscriptions-C2C4WTuI.mjs → subscriptions-DcMHBPVJ.mjs} +1 -1
- package/dist/trustly.svg.es-C0Ou1HWk.mjs +4 -0
- package/dist/trustly.svg.es-CHojqNqm.js +1 -0
- package/dist/twint.svg.es-CQ-ZDfy8.js +1 -0
- package/dist/twint.svg.es-WrZYquRs.mjs +4 -0
- package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +2 -0
- package/dist/types/components/payments/PaymentMethodsUnavailableCard/PaymentMethodsUnavailableCard.types.d.ts +8 -0
- package/dist/types/components/providers/LoggerProvider/LoggerProvider.lib.d.ts +8 -0
- package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +32 -2
- package/dist/types/translations/supported.d.ts +1 -1
- package/dist/unionpay.svg.es-DYgo83Hf.mjs +4 -0
- package/dist/unionpay.svg.es-YqJKKFEj.js +1 -0
- package/dist/url-CjULBkjW.js +1 -0
- package/dist/url-CvNDq4wp.mjs +22 -0
- package/dist/{useActionDispatchProvider-D55t_7LY.mjs → useActionDispatchProvider-BVOBO0Jx.mjs} +1 -1
- package/dist/{useActionDispatchProvider-Cz8xLLYA.js → useActionDispatchProvider-Cv9amjTf.js} +1 -1
- package/dist/{useCustomer-DYCpgA-3.js → useCustomer-DLHOs4BR.js} +1 -1
- package/dist/{useCustomer-BNhHz9RJ.mjs → useCustomer-EDhref7T.mjs} +1 -1
- package/dist/{useCustomerFormLabels-mX5QpApD.mjs → useCustomerFormLabels-B61-4xQ7.mjs} +111 -85
- package/dist/useCustomerFormLabels-C6wW4n2e.js +1 -0
- package/dist/useExperimentalFeature-0yFoaEzV.js +1 -0
- package/dist/useExperimentalFeature-DvxOrFPU.mjs +9 -0
- package/dist/{useInvoiceData-BczeMpuk.js → useInvoiceData-BSjVeJrI.js} +1 -1
- package/dist/{useInvoiceData-D-EvEioP.mjs → useInvoiceData-C0Y5WrbT.mjs} +2 -2
- package/dist/useInvoicesList-BRDZqsaB.js +1 -0
- package/dist/{useInvoicesList-BJJYwkIA.mjs → useInvoicesList-CYoE7q0u.mjs} +220 -184
- package/dist/{useLoadInitialData-BoGjdUu-.mjs → useLoadInitialData-Cp1OA8y6.mjs} +1 -1
- package/dist/{useLoadInitialData-CiJldX50.js → useLoadInitialData-u7IyXqb6.js} +1 -1
- package/dist/usePaymentMethodAvailability-B3s1lqQ2.js +1 -0
- package/dist/usePaymentMethodAvailability-EuhZPghG.mjs +141 -0
- package/dist/{usePaymentMethodOptions-fBvWYynV.js → usePaymentMethodOptions--8QpMvNm.js} +1 -1
- package/dist/{usePaymentMethodOptions-d49aOdLB.mjs → usePaymentMethodOptions-Cljh7HYp.mjs} +1 -1
- package/dist/{usePaymentMethods-Bkouz8aQ.mjs → usePaymentMethods-BJzoI8dZ.mjs} +1 -1
- package/dist/{usePaymentMethods-CFL3hFW_.js → usePaymentMethods-DvEnJWmB.js} +1 -1
- package/dist/usePayments-CANj0QVc.js +1 -0
- package/dist/{usePayments-BlliAt1E.mjs → usePayments-CaT1CBzE.mjs} +159 -59
- package/dist/{usePortal-fhri8neB.js → usePortal-BjGoSeLy.js} +1 -1
- package/dist/{usePortal-eyA4OqjU.mjs → usePortal-CMPQ0M9R.mjs} +1 -1
- package/dist/{useSubscription--IGLmLS6.mjs → useSubscription-D1UKnZAx.mjs} +1 -1
- package/dist/{useSubscription-V3KSuhOY.js → useSubscription-DZfRHbL7.js} +1 -1
- package/dist/visa.svg.es-B6aU_qRs.mjs +4 -0
- package/dist/visa.svg.es-D6sc4YTE.js +1 -0
- package/dist/vpay.svg.es-4qIqS4aX.mjs +4 -0
- package/dist/vpay.svg.es-CLGTyB09.js +1 -0
- package/dist/zip.svg.es-3PzSBe1E.mjs +4 -0
- package/dist/zip.svg.es-BRsgmur-.js +1 -0
- package/package.json +14 -2
- package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang--AVI4Q4E.js +0 -1
- package/dist/Amount.vue.es-CeW8S7kT.js +0 -1
- package/dist/Button.vue.es-aLcIdATK.js +0 -1
- package/dist/Chip.vue.es-DPGTweAr.mjs +0 -164
- package/dist/Chip.vue.es-q4c-DXXl.js +0 -1
- package/dist/ContextMenu.vue.es-C_TL7-kg.js +0 -1
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CMIVAoQq.js +0 -1
- package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BP-VRwEM.js +0 -1
- package/dist/ErrorNotification.vue.es-BX3khKFc.js +0 -1
- package/dist/ErrorNotification.vue.es-C22Kt8Qn.mjs +0 -30
- package/dist/FormMessage.vue.es-LeWoj774.js +0 -1
- package/dist/IconButton.vue.es-CVFn0Ntj.js +0 -1
- package/dist/IconTitle.vue.es-DoN4GVde.js +0 -1
- package/dist/Input.vue.es-C8VhMKuI.js +0 -1
- package/dist/InvoiceSummary.vue.es-emE-mCFh.js +0 -1
- package/dist/Modal.vue.es-CX5geho3.js +0 -1
- package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-B_IIOBjg.js +0 -1
- package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BdfWchcQ.js +0 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-D8fkE1yG.js +0 -1
- package/dist/PaymentIntegrationFormAdyen-BjPpoLF7.js +0 -1
- package/dist/PaymentIntegrationFormStripe-51KZc27R.js +0 -1
- package/dist/PaymentMethod.vue.es-CH__kPw4.mjs +0 -636
- package/dist/PaymentMethod.vue.es-uVZO0Zju.js +0 -1
- package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-BktA5F4r.js +0 -1
- package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-XPz73RVU.js +0 -1
- package/dist/PricingGroupRangeInput.vue.es-BuQeJCEX.js +0 -1
- package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Jk34S5B7.js +0 -1
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-CttBs_G8.js +0 -1
- package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-Dl5Lg39D.js +0 -1
- package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-CTnTWaB8.js +0 -1
- package/dist/TrialChip.vue.es-0nrqSZeY.js +0 -1
- package/dist/adyen-BMDZQBUG.js +0 -1
- package/dist/cn.es-BLHlMR4Y.js +0 -1
- package/dist/customElements-BTJzBHMy.js +0 -1
- package/dist/en-US-BSrbFk5W.js +0 -1
- package/dist/en-US-scSQQXK8.js +0 -1
- package/dist/formatting.es-9hM8aHSg.js +0 -1
- package/dist/nl-NL-B5tuyIOM.mjs +0 -88
- package/dist/nl-NL-Bs3d8q6T.js +0 -1
- package/dist/nl-NL-DIAZWDF9.js +0 -1
- package/dist/useCustomerFormLabels-Cw6QpEJY.js +0 -1
- package/dist/useInvoicesList-rMg-8LbH.js +0 -1
- package/dist/usePayments-BKTNn_RN.js +0 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { ref, openBlock, createElementBlock, renderSlot, defineComponent, normalizeClass, Fragment, renderList, createVNode, withCtx, createElementVNode, createTextVNode, toDisplayString, createBlock, unref, createCommentVNode, withKeys, normalizeProps, guardReactiveProps,
|
|
2
|
-
import { u as useIntl, _ as _sfc_main$
|
|
3
|
-
import { _ as _sfc_main$
|
|
1
|
+
import { ref, openBlock, createElementBlock, renderSlot, defineComponent, normalizeClass, Fragment, renderList, createVNode, withCtx, createElementVNode, createTextVNode, toDisplayString, createBlock, unref, createCommentVNode, createSlots, withKeys, normalizeProps, guardReactiveProps, computed, mergeProps, isRef } from "vue";
|
|
2
|
+
import { u as useIntl, _ as _sfc_main$u, k as formatTimezone } from "./customElements-B-89a5oH.mjs";
|
|
3
|
+
import { _ as _sfc_main$l } from "./Amount.vue.es-BO5sS1UX.mjs";
|
|
4
4
|
import { i as isEmpty } from "./useService-W3Kxems4.mjs";
|
|
5
|
-
import { _ as _sfc_main$
|
|
5
|
+
import { _ as _sfc_main$n, a as _sfc_main$s } from "./Button.vue.es-Cm9pLU9i.mjs";
|
|
6
6
|
import { _ as _export_sfc } from "./floating-ui.vue.es-DWY7pdz8.mjs";
|
|
7
7
|
import { a as getCustomerName } from "./customer.es-C_vSWcVA.mjs";
|
|
8
|
-
import {
|
|
8
|
+
import { M as MAX_FRACTION_DIGITS, f as formatAmount, a as formatEnum } from "./formatting.es-eYgXv_AK.mjs";
|
|
9
|
+
import { _ as _sfc_main$k, u as useToggleList } from "./Comparators.vue.es-CYfxd5H-.mjs";
|
|
10
|
+
import { _ as _sfc_main$m } from "./Chip.vue.es-BBmn-qJp.mjs";
|
|
9
11
|
import { g as getComposedString } from "./getComposedString.es-CELkn0I7.mjs";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { _ as _sfc_main$
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { _ as _sfc_main$p } from "./IconTitle.vue.es-mQCMxc64.mjs";
|
|
16
|
-
import { a as _sfc_main$q } from "./ContextMenu.vue.es-BBPFQfqY.mjs";
|
|
12
|
+
import { _ as _sfc_main$o, T as TooltipContent, a as _sfc_main$p } from "./TooltipParagraph.vue.es-C5RTcrid.mjs";
|
|
13
|
+
import { f as useResizeObserver } from "./index.es-D5xOw_SJ.mjs";
|
|
14
|
+
import { _ as _sfc_main$t } from "./DividerText.vue.es-CeAHAe_Y.mjs";
|
|
15
|
+
import { _ as _sfc_main$q } from "./IconTitle.vue.es-BmjBdZb_.mjs";
|
|
16
|
+
import { a as _sfc_main$r } from "./ContextMenu.vue.es-CTc1ktXb.mjs";
|
|
17
17
|
const useSimpleToggleList = (initialToggledItems = []) => {
|
|
18
18
|
const toggledItems = ref(initialToggledItems);
|
|
19
19
|
const toggle = (index) => {
|
|
@@ -26,15 +26,15 @@ const useSimpleToggleList = (initialToggledItems = []) => {
|
|
|
26
26
|
};
|
|
27
27
|
return [toggledItems, toggle];
|
|
28
28
|
};
|
|
29
|
-
const _sfc_main$
|
|
29
|
+
const _sfc_main$j = {};
|
|
30
30
|
const _hoisted_1$g = { class: "w-full table-fixed" };
|
|
31
31
|
function _sfc_render(_ctx, _cache) {
|
|
32
32
|
return openBlock(), createElementBlock("table", _hoisted_1$g, [
|
|
33
33
|
renderSlot(_ctx.$slots, "default")
|
|
34
34
|
]);
|
|
35
35
|
}
|
|
36
|
-
const InvoiceTable = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
37
|
-
const _sfc_main$
|
|
36
|
+
const InvoiceTable = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render]]);
|
|
37
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
38
38
|
__name: "InvoiceTableData",
|
|
39
39
|
props: {
|
|
40
40
|
number: { type: Boolean, default: false },
|
|
@@ -53,7 +53,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
|
-
const _sfc_main$
|
|
56
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
57
57
|
__name: "InvoiceTableHeader",
|
|
58
58
|
props: {
|
|
59
59
|
left: { type: Boolean, default: false },
|
|
@@ -62,21 +62,31 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
62
62
|
setup(__props) {
|
|
63
63
|
return (_ctx, _cache) => {
|
|
64
64
|
return openBlock(), createElementBlock("th", {
|
|
65
|
-
class: normalizeClass(["border-b py-1.5 text-xs font-bold uppercase text-
|
|
65
|
+
class: normalizeClass(["border-b py-1.5 text-xs font-bold uppercase text-subtle", { "text-left": __props.left, "text-right": __props.right }])
|
|
66
66
|
}, [
|
|
67
67
|
renderSlot(_ctx.$slots, "default")
|
|
68
68
|
], 2);
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
|
+
const INVOICE_PERIOD = "INVOICE_PERIOD";
|
|
73
|
+
const INVOICE_PERIOD_SUBTOTAL = "INVOICE_PERIOD_SUBTOTAL";
|
|
74
|
+
const INVOICE_PERIOD_TOTAL = "INVOICE_PERIOD_TOTAL";
|
|
75
|
+
const SUMMARY_LINE_AMOUNT = "SUMMARY_LINE_AMOUNT";
|
|
76
|
+
const SUMMARY_TOTAL_TAX = "SUMMARY_TOTAL_TAX";
|
|
77
|
+
const SUMMARY_TOTAL_INCLUDING_TAX = "SUMMARY_TOTAL_INCLUDING_TAX";
|
|
78
|
+
const SUMMARY_TOTAL_EXCLUDING_TAX = "SUMMARY_TOTAL_EXCLUDING_TAX";
|
|
79
|
+
const SUMMARY_TOTAL_DISCOUNT = "SUMMARY_TOTAL_DISCOUNT";
|
|
80
|
+
const SUMMARY_AMOUNT_DUE = "SUMMARY_AMOUNT_DUE";
|
|
81
|
+
const DEDUCTION = "DEDUCTION";
|
|
82
|
+
const HAS_SUBLINES = "HAS_SUBLINES";
|
|
72
83
|
const _hoisted_1$f = { class: "flex items-center" };
|
|
73
84
|
const _hoisted_2$a = {
|
|
74
85
|
key: 0,
|
|
75
|
-
class: "text-xs text-
|
|
86
|
+
class: "text-xs text-secondary"
|
|
76
87
|
};
|
|
77
88
|
const _hoisted_3$6 = { class: "flex items-center" };
|
|
78
|
-
const
|
|
79
|
-
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
89
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
80
90
|
__name: "InvoiceSubLineRow",
|
|
81
91
|
props: {
|
|
82
92
|
subLines: {},
|
|
@@ -85,10 +95,11 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
85
95
|
periodOrder: {},
|
|
86
96
|
groupOrder: {},
|
|
87
97
|
processingOnlyCustomers: {},
|
|
98
|
+
displayInvoiceSubLinesPerProcessingOnlyCustomer: { type: Boolean },
|
|
88
99
|
showTaxPerLineItem: { type: Boolean, default: true }
|
|
89
100
|
},
|
|
90
101
|
setup(__props) {
|
|
91
|
-
const { formatMessage } = useIntl();
|
|
102
|
+
const { formatMessage, formatNumber } = useIntl();
|
|
92
103
|
const props = __props;
|
|
93
104
|
const getCustomerName$1 = (customerId) => {
|
|
94
105
|
var _a;
|
|
@@ -108,14 +119,26 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
108
119
|
var _a;
|
|
109
120
|
return ((_a = subLine.usage_based_conversion) == null ? void 0 : _a.conditions) ?? subLine.conditions;
|
|
110
121
|
};
|
|
122
|
+
const getConversionCreditsQuantity = (subLine) => {
|
|
123
|
+
var _a, _b;
|
|
124
|
+
const quantity = (_b = (_a = subLine.details.conversion) == null ? void 0 : _a.credits) == null ? void 0 : _b.quantity;
|
|
125
|
+
if (quantity === void 0) {
|
|
126
|
+
return formatMessage({
|
|
127
|
+
id: "generic.not_available",
|
|
128
|
+
defaultMessage: "N/A",
|
|
129
|
+
description: "Used in scenarios where no data is available to be displayed"
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
return formatNumber(+quantity, { maximumFractionDigits: MAX_FRACTION_DIGITS });
|
|
133
|
+
};
|
|
111
134
|
return (_ctx, _cache) => {
|
|
112
|
-
return __props.subLines && __props.isOpen ? (openBlock(), createElementBlock(Fragment, { key: 0 },
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
key:
|
|
135
|
+
return __props.subLines && __props.isOpen ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(__props.subLines, (subLine, subLineIndex) => {
|
|
136
|
+
return openBlock(), createElementBlock(Fragment, { key: subLineIndex }, [
|
|
137
|
+
!subLine.processing_only_customer_resource_id ? (openBlock(), createElementBlock("tr", {
|
|
138
|
+
key: 0,
|
|
116
139
|
class: normalizeClass(subLineIndex > 0 ? "border-t" : "")
|
|
117
140
|
}, [
|
|
118
|
-
createVNode(_sfc_main$
|
|
141
|
+
createVNode(_sfc_main$i, null, {
|
|
119
142
|
default: withCtx(() => {
|
|
120
143
|
var _a, _b, _c, _d, _e, _f;
|
|
121
144
|
return [
|
|
@@ -138,7 +161,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
138
161
|
((_a = getSubLineConditions(subLine)) == null ? void 0 : _a.name) || ((_b = getSubLineConditions(subLine)) == null ? void 0 : _b.meter_properties) ? (openBlock(), createElementBlock("div", _hoisted_2$a, [
|
|
139
162
|
((_c = getSubLineConditions(subLine)) == null ? void 0 : _c.name) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
140
163
|
createTextVNode(toDisplayString((_d = getSubLineConditions(subLine)) == null ? void 0 : _d.name), 1)
|
|
141
|
-
], 64)) : ((_e = getSubLineConditions(subLine)) == null ? void 0 : _e.meter_properties) ? (openBlock(), createBlock(unref(_sfc_main$
|
|
164
|
+
], 64)) : ((_e = getSubLineConditions(subLine)) == null ? void 0 : _e.meter_properties) ? (openBlock(), createBlock(unref(_sfc_main$k), {
|
|
142
165
|
key: 1,
|
|
143
166
|
comparators: (_f = getSubLineConditions(subLine)) == null ? void 0 : _f.meter_properties
|
|
144
167
|
}, null, 8, ["comparators"])) : createCommentVNode("", true)
|
|
@@ -149,23 +172,20 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
149
172
|
}),
|
|
150
173
|
_: 2
|
|
151
174
|
}, 1024),
|
|
152
|
-
createVNode(_sfc_main$
|
|
175
|
+
createVNode(_sfc_main$i, {
|
|
153
176
|
number: "",
|
|
154
177
|
class: "text-right tabular-nums"
|
|
155
178
|
}, {
|
|
156
|
-
default: withCtx(() =>
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
createTextVNode(toDisplayString(((_b = (_a = subLine.details.conversion) == null ? void 0 : _a.credits) == null ? void 0 : _b.quantity) ?? "N/A"), 1)
|
|
160
|
-
];
|
|
161
|
-
}),
|
|
179
|
+
default: withCtx(() => [
|
|
180
|
+
createTextVNode(toDisplayString(getConversionCreditsQuantity(subLine)), 1)
|
|
181
|
+
]),
|
|
162
182
|
_: 2
|
|
163
183
|
}, 1024),
|
|
164
|
-
createVNode(_sfc_main$
|
|
184
|
+
createVNode(_sfc_main$i, { class: "text-right tabular-nums" }, {
|
|
165
185
|
default: withCtx(() => {
|
|
166
186
|
var _a, _b;
|
|
167
187
|
return [
|
|
168
|
-
((_a = subLine.details.band) == null ? void 0 : _a.amount) ? (openBlock(), createBlock(_sfc_main$
|
|
188
|
+
((_a = subLine.details.band) == null ? void 0 : _a.amount) ? (openBlock(), createBlock(_sfc_main$l, {
|
|
169
189
|
key: 0,
|
|
170
190
|
value: subLine.details.band.amount
|
|
171
191
|
}, null, 8, ["value"])) : ((_b = subLine.details.band) == null ? void 0 : _b.percentage) ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
@@ -177,37 +197,32 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
177
197
|
}),
|
|
178
198
|
_: 2
|
|
179
199
|
}, 1024),
|
|
180
|
-
__props.showTaxPerLineItem ? (openBlock(), createBlock(_sfc_main$
|
|
200
|
+
__props.showTaxPerLineItem ? (openBlock(), createBlock(_sfc_main$i, { key: 0 }, {
|
|
181
201
|
default: withCtx(() => [..._cache[0] || (_cache[0] = [
|
|
182
202
|
createTextVNode(" ", -1)
|
|
183
203
|
])]),
|
|
184
204
|
_: 1
|
|
185
205
|
})) : createCommentVNode("", true),
|
|
186
|
-
subLine.details.amount ? (openBlock(), createBlock(_sfc_main$
|
|
206
|
+
subLine.details.amount ? (openBlock(), createBlock(_sfc_main$i, {
|
|
187
207
|
key: 1,
|
|
188
208
|
class: "text-right tabular-nums"
|
|
189
209
|
}, {
|
|
190
210
|
default: withCtx(() => [
|
|
191
|
-
createVNode(_sfc_main$
|
|
192
|
-
value: subLine.details.amount
|
|
193
|
-
|
|
211
|
+
createVNode(_sfc_main$l, {
|
|
212
|
+
value: subLine.details.amount,
|
|
213
|
+
"data-testid": unref(INVOICE_PERIOD_SUBTOTAL)
|
|
214
|
+
}, null, 8, ["value", "data-testid"])
|
|
194
215
|
]),
|
|
195
216
|
_: 2
|
|
196
217
|
}, 1024)) : createCommentVNode("", true)
|
|
197
|
-
], 2)
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
return openBlock(), createElementBlock("tr", {
|
|
201
|
-
key: i,
|
|
202
|
-
tabindex: void 0,
|
|
203
|
-
class: normalizeClass(["group", { "border-t": i !== 0 }])
|
|
218
|
+
], 2)) : __props.displayInvoiceSubLinesPerProcessingOnlyCustomer && __props.processingOnlyCustomers ? (openBlock(), createElementBlock("tr", {
|
|
219
|
+
key: 1,
|
|
220
|
+
class: normalizeClass(["group", { "border-t": subLineIndex > 0 }])
|
|
204
221
|
}, [
|
|
205
|
-
createVNode(_sfc_main$
|
|
222
|
+
createVNode(_sfc_main$i, { class: "pl-4" }, {
|
|
206
223
|
default: withCtx(() => [
|
|
207
224
|
createElementVNode("div", _hoisted_3$6, [
|
|
208
|
-
|
|
209
|
-
subLine.processing_only_customer_resource_id
|
|
210
|
-
)), 1)) : createCommentVNode("", true)
|
|
225
|
+
createElementVNode("div", null, toDisplayString(getCustomerName$1(subLine.processing_only_customer_resource_id)), 1)
|
|
211
226
|
])
|
|
212
227
|
]),
|
|
213
228
|
_: 2
|
|
@@ -216,20 +231,146 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
216
231
|
details: subLine.details,
|
|
217
232
|
hideTaxDetails: true
|
|
218
233
|
})
|
|
219
|
-
], 2)
|
|
220
|
-
|
|
221
|
-
|
|
234
|
+
], 2)) : createCommentVNode("", true)
|
|
235
|
+
], 64);
|
|
236
|
+
}), 128)) : createCommentVNode("", true);
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
const _hoisted_1$e = { class: "flex gap-4" };
|
|
241
|
+
const _hoisted_2$9 = { class: "flex items-center gap-2" };
|
|
242
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
243
|
+
__name: "PricingClauseChip",
|
|
244
|
+
props: {
|
|
245
|
+
iconName: {}
|
|
246
|
+
},
|
|
247
|
+
setup(__props) {
|
|
248
|
+
return (_ctx, _cache) => {
|
|
249
|
+
return openBlock(), createElementBlock("div", _hoisted_1$e, [
|
|
250
|
+
createVNode(_sfc_main$m, null, {
|
|
251
|
+
default: withCtx(() => [
|
|
252
|
+
createElementVNode("div", _hoisted_2$9, [
|
|
253
|
+
createVNode(_sfc_main$n, {
|
|
254
|
+
icon: __props.iconName,
|
|
255
|
+
size: "xs"
|
|
256
|
+
}, null, 8, ["icon"]),
|
|
257
|
+
createElementVNode("span", null, [
|
|
258
|
+
renderSlot(_ctx.$slots, "chip-content")
|
|
259
|
+
])
|
|
260
|
+
])
|
|
261
|
+
]),
|
|
262
|
+
_: 3
|
|
263
|
+
}),
|
|
264
|
+
renderSlot(_ctx.$slots, "chip-postfix")
|
|
265
|
+
]);
|
|
222
266
|
};
|
|
223
267
|
}
|
|
224
268
|
});
|
|
225
|
-
const _hoisted_1$
|
|
226
|
-
const _hoisted_2$9 = { class: "flex items-center" };
|
|
269
|
+
const _hoisted_1$d = { class: "flex flex-col gap-2" };
|
|
227
270
|
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
271
|
+
__name: "InvoicePricingClauseChip",
|
|
272
|
+
props: {
|
|
273
|
+
clauseType: {},
|
|
274
|
+
priceDetailsBand: {},
|
|
275
|
+
invoiceLineDescription: {}
|
|
276
|
+
},
|
|
277
|
+
setup(__props) {
|
|
278
|
+
const intl = useIntl();
|
|
279
|
+
return (_ctx, _cache) => {
|
|
280
|
+
return openBlock(), createElementBlock("div", _hoisted_1$d, [
|
|
281
|
+
createElementVNode("span", null, toDisplayString(__props.invoiceLineDescription), 1),
|
|
282
|
+
__props.clauseType === "DISCOUNT" && __props.priceDetailsBand ? (openBlock(), createBlock(unref(_sfc_main$f), {
|
|
283
|
+
key: 0,
|
|
284
|
+
"icon-name": "south_east"
|
|
285
|
+
}, createSlots({ _: 2 }, [
|
|
286
|
+
__props.priceDetailsBand.amount ? {
|
|
287
|
+
name: "chip-content",
|
|
288
|
+
fn: withCtx(() => [
|
|
289
|
+
createTextVNode(toDisplayString(unref(intl).$t(
|
|
290
|
+
{
|
|
291
|
+
id: "invoice.amount_discount",
|
|
292
|
+
defaultMessage: "{amount} discount",
|
|
293
|
+
description: "Represents a certain amount of discount, where {amount} is replaced with the amount"
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
amount: unref(formatAmount)(__props.priceDetailsBand.amount)
|
|
297
|
+
}
|
|
298
|
+
).toUpperCase()), 1)
|
|
299
|
+
]),
|
|
300
|
+
key: "0"
|
|
301
|
+
} : __props.priceDetailsBand.percentage ? {
|
|
302
|
+
name: "chip-content",
|
|
303
|
+
fn: withCtx(() => [
|
|
304
|
+
createTextVNode(toDisplayString(unref(intl).$t(
|
|
305
|
+
{
|
|
306
|
+
id: "invoice.percentage_discount",
|
|
307
|
+
defaultMessage: "{percentage}% discount",
|
|
308
|
+
description: "Represents a certain percentage of discount, where {percentage} is replaced with the percentage (number only)"
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
percentage: __props.priceDetailsBand.percentage ?? "0"
|
|
312
|
+
}
|
|
313
|
+
).toUpperCase()), 1)
|
|
314
|
+
]),
|
|
315
|
+
key: "1"
|
|
316
|
+
} : void 0
|
|
317
|
+
]), 1024)) : __props.clauseType === "ADJUSTMENT" ? (openBlock(), createBlock(unref(_sfc_main$f), {
|
|
318
|
+
key: 1,
|
|
319
|
+
"icon-name": "info"
|
|
320
|
+
}, {
|
|
321
|
+
"chip-content": withCtx(() => [
|
|
322
|
+
createTextVNode(toDisplayString(unref(intl).$t({
|
|
323
|
+
id: "invoice.adjustment_chip_body",
|
|
324
|
+
defaultMessage: "Adjustment",
|
|
325
|
+
description: "Used on invoice lines to mark as adjusted"
|
|
326
|
+
}).toUpperCase()), 1)
|
|
327
|
+
]),
|
|
328
|
+
_: 1
|
|
329
|
+
})) : __props.clauseType === "MARKUP" ? (openBlock(), createBlock(unref(_sfc_main$f), {
|
|
330
|
+
key: 2,
|
|
331
|
+
"icon-name": "north_east"
|
|
332
|
+
}, {
|
|
333
|
+
"chip-content": withCtx(() => {
|
|
334
|
+
var _a;
|
|
335
|
+
return [
|
|
336
|
+
createTextVNode(toDisplayString(unref(intl).$t(
|
|
337
|
+
{
|
|
338
|
+
id: "invoice.markup_percentage",
|
|
339
|
+
defaultMessage: "{percentage}% markup",
|
|
340
|
+
description: "Markup percentage, where {percentage} is replaced with the percentage (number only)"
|
|
341
|
+
},
|
|
342
|
+
{ percentage: ((_a = __props.priceDetailsBand) == null ? void 0 : _a.percentage) ?? "0" }
|
|
343
|
+
).toUpperCase()), 1)
|
|
344
|
+
];
|
|
345
|
+
}),
|
|
346
|
+
_: 1
|
|
347
|
+
})) : __props.clauseType === "COMMITMENT" ? (openBlock(), createBlock(unref(_sfc_main$f), {
|
|
348
|
+
key: 3,
|
|
349
|
+
"icon-name": "sell"
|
|
350
|
+
}, {
|
|
351
|
+
"chip-content": withCtx(() => [
|
|
352
|
+
createTextVNode(toDisplayString(unref(intl).$t({
|
|
353
|
+
id: "invoice.commitment",
|
|
354
|
+
defaultMessage: "commitment",
|
|
355
|
+
description: "Used on invoice lines to mark as commitment"
|
|
356
|
+
}).toUpperCase()), 1)
|
|
357
|
+
]),
|
|
358
|
+
_: 1
|
|
359
|
+
})) : createCommentVNode("", true)
|
|
360
|
+
]);
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
});
|
|
364
|
+
const _hoisted_1$c = ["tabindex", "onClick"];
|
|
365
|
+
const _hoisted_2$8 = { class: "flex items-center" };
|
|
366
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
228
367
|
__name: "InvoiceCommitment",
|
|
229
368
|
props: {
|
|
230
369
|
commitments: {},
|
|
231
370
|
groupOrder: {},
|
|
232
|
-
invoicePeriodOrder: {}
|
|
371
|
+
invoicePeriodOrder: {},
|
|
372
|
+
processingOnlyCustomers: {},
|
|
373
|
+
displayInvoiceSubLinesPerProcessingOnlyCustomer: { type: Boolean }
|
|
233
374
|
},
|
|
234
375
|
setup(__props) {
|
|
235
376
|
const intl = useIntl();
|
|
@@ -238,11 +379,19 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
238
379
|
toggle(formatIndex(groupOrder, invoiceLineOrder));
|
|
239
380
|
};
|
|
240
381
|
const formatIndex = (rootIndex, index) => `${rootIndex}-line-${index}`;
|
|
382
|
+
const getLineDescription = (line) => {
|
|
383
|
+
var _a;
|
|
384
|
+
return line.description ?? ((_a = line.details) == null ? void 0 : _a.description) ?? intl.$t({
|
|
385
|
+
id: "generic.not_available",
|
|
386
|
+
defaultMessage: "N/A",
|
|
387
|
+
description: "Used in scenarios where no data is available to be displayed"
|
|
388
|
+
});
|
|
389
|
+
};
|
|
241
390
|
return (_ctx, _cache) => {
|
|
242
391
|
return openBlock(), createBlock(InvoiceTable, null, {
|
|
243
392
|
default: withCtx(() => [
|
|
244
393
|
createElementVNode("tr", null, [
|
|
245
|
-
createVNode(_sfc_main$
|
|
394
|
+
createVNode(_sfc_main$h, {
|
|
246
395
|
left: "",
|
|
247
396
|
colspan: "5"
|
|
248
397
|
}, {
|
|
@@ -255,7 +404,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
255
404
|
]),
|
|
256
405
|
_: 1
|
|
257
406
|
}),
|
|
258
|
-
createVNode(_sfc_main$
|
|
407
|
+
createVNode(_sfc_main$h, {
|
|
259
408
|
right: "",
|
|
260
409
|
class: "w-60"
|
|
261
410
|
}, {
|
|
@@ -276,11 +425,11 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
276
425
|
tabindex: line.sub_lines ? 0 : void 0,
|
|
277
426
|
onClick: ($event) => toggleLine(__props.groupOrder, line["line_order"])
|
|
278
427
|
}, [
|
|
279
|
-
createVNode(_sfc_main$
|
|
428
|
+
createVNode(_sfc_main$i, { colspan: "2" }, {
|
|
280
429
|
default: withCtx(() => {
|
|
281
|
-
var _a
|
|
430
|
+
var _a;
|
|
282
431
|
return [
|
|
283
|
-
line.sub_lines ? (openBlock(), createBlock(_sfc_main$
|
|
432
|
+
line.sub_lines ? (openBlock(), createBlock(_sfc_main$n, {
|
|
284
433
|
key: 0,
|
|
285
434
|
icon: "keyboard_arrow_down",
|
|
286
435
|
size: "md",
|
|
@@ -288,56 +437,53 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
288
437
|
"-rotate-90": !unref(getIsOpen)(formatIndex(__props.groupOrder, line["line_order"]))
|
|
289
438
|
}])
|
|
290
439
|
}, null, 8, ["class"])) : createCommentVNode("", true),
|
|
291
|
-
createElementVNode("div", _hoisted_2$
|
|
440
|
+
createElementVNode("div", _hoisted_2$8, [
|
|
292
441
|
renderSlot(_ctx.$slots, "invoice-line-prefix", {
|
|
293
442
|
lineOrder: line.line_order,
|
|
294
443
|
periodOrder: __props.invoicePeriodOrder,
|
|
295
444
|
groupOrder: __props.groupOrder
|
|
296
445
|
}),
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
createTextVNode(toDisplayString(unref(intl).$t({
|
|
303
|
-
id: "generic.not_available",
|
|
304
|
-
defaultMessage: "N/A",
|
|
305
|
-
description: "Used in scenarios where no data is available to be displayed"
|
|
306
|
-
})), 1)
|
|
307
|
-
], 64))
|
|
446
|
+
createVNode(_sfc_main$e, {
|
|
447
|
+
"clause-type": "COMMITMENT",
|
|
448
|
+
"invoice-line-description": getLineDescription(line),
|
|
449
|
+
"price-details-band": (_a = line.details) == null ? void 0 : _a.band
|
|
450
|
+
}, null, 8, ["invoice-line-description", "price-details-band"])
|
|
308
451
|
])
|
|
309
452
|
];
|
|
310
453
|
}),
|
|
311
454
|
_: 2
|
|
312
455
|
}, 1024),
|
|
313
|
-
createVNode(_sfc_main$
|
|
456
|
+
createVNode(_sfc_main$i, { colspan: "3" }, {
|
|
314
457
|
default: withCtx(() => [..._cache[0] || (_cache[0] = [
|
|
315
458
|
createTextVNode(" ", -1)
|
|
316
459
|
])]),
|
|
317
460
|
_: 1
|
|
318
461
|
}),
|
|
319
|
-
createVNode(_sfc_main$
|
|
462
|
+
createVNode(_sfc_main$i, { number: "" }, {
|
|
320
463
|
default: withCtx(() => {
|
|
321
464
|
var _a, _b;
|
|
322
465
|
return [
|
|
323
|
-
((_a = line.details) == null ? void 0 : _a.amount) ? (openBlock(), createBlock(_sfc_main$
|
|
466
|
+
((_a = line.details) == null ? void 0 : _a.amount) ? (openBlock(), createBlock(_sfc_main$l, {
|
|
324
467
|
key: 0,
|
|
325
|
-
value: (_b = line.details) == null ? void 0 : _b.amount
|
|
326
|
-
|
|
468
|
+
value: (_b = line.details) == null ? void 0 : _b.amount,
|
|
469
|
+
"data-testid": unref(SUMMARY_LINE_AMOUNT)
|
|
470
|
+
}, null, 8, ["value", "data-testid"])) : createCommentVNode("", true)
|
|
327
471
|
];
|
|
328
472
|
}),
|
|
329
473
|
_: 2
|
|
330
474
|
}, 1024)
|
|
331
|
-
], 10, _hoisted_1$
|
|
332
|
-
createVNode(_sfc_main$
|
|
475
|
+
], 10, _hoisted_1$c),
|
|
476
|
+
createVNode(_sfc_main$g, {
|
|
333
477
|
ref_for: true,
|
|
334
478
|
ref: formatIndex(__props.groupOrder, line["line_order"]),
|
|
335
479
|
"sub-lines": line.sub_lines ?? [],
|
|
336
480
|
"line-order": line["line_order"],
|
|
337
481
|
"period-order": __props.invoicePeriodOrder,
|
|
338
482
|
"group-order": __props.groupOrder,
|
|
339
|
-
"is-open": unref(getIsOpen)(formatIndex(__props.groupOrder, line["line_order"]))
|
|
340
|
-
|
|
483
|
+
"is-open": unref(getIsOpen)(formatIndex(__props.groupOrder, line["line_order"])),
|
|
484
|
+
"processing-only-customers": __props.processingOnlyCustomers,
|
|
485
|
+
"display-invoice-sub-lines-per-processing-only-customer": __props.displayInvoiceSubLinesPerProcessingOnlyCustomer
|
|
486
|
+
}, null, 8, ["sub-lines", "line-order", "period-order", "group-order", "is-open", "processing-only-customers", "display-invoice-sub-lines-per-processing-only-customer"])
|
|
341
487
|
], 64);
|
|
342
488
|
}), 128))
|
|
343
489
|
]),
|
|
@@ -346,9 +492,9 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
346
492
|
};
|
|
347
493
|
}
|
|
348
494
|
});
|
|
349
|
-
const _hoisted_1$
|
|
350
|
-
const _hoisted_2$
|
|
351
|
-
const _sfc_main$
|
|
495
|
+
const _hoisted_1$b = ["tabindex", "onClick"];
|
|
496
|
+
const _hoisted_2$7 = { class: "flex items-center" };
|
|
497
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
352
498
|
__name: "InvoiceDiscountMarkup",
|
|
353
499
|
props: {
|
|
354
500
|
lines: {},
|
|
@@ -358,7 +504,9 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
358
504
|
expandedItems: {},
|
|
359
505
|
isExpandable: { type: Boolean },
|
|
360
506
|
invoicePeriodOrder: {},
|
|
361
|
-
groupOrder: {}
|
|
507
|
+
groupOrder: {},
|
|
508
|
+
processingOnlyCustomers: {},
|
|
509
|
+
displayInvoiceSubLinesPerProcessingOnlyCustomer: { type: Boolean }
|
|
362
510
|
},
|
|
363
511
|
setup(__props) {
|
|
364
512
|
const intl = useIntl();
|
|
@@ -371,7 +519,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
371
519
|
return openBlock(), createBlock(InvoiceTable, null, {
|
|
372
520
|
default: withCtx(() => [
|
|
373
521
|
createElementVNode("tr", null, [
|
|
374
|
-
createVNode(_sfc_main$
|
|
522
|
+
createVNode(_sfc_main$h, {
|
|
375
523
|
left: "",
|
|
376
524
|
class: "w-3/5"
|
|
377
525
|
}, {
|
|
@@ -384,13 +532,13 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
384
532
|
]),
|
|
385
533
|
_: 1
|
|
386
534
|
}),
|
|
387
|
-
createVNode(_sfc_main$
|
|
535
|
+
createVNode(_sfc_main$h, { colspan: "2" }, {
|
|
388
536
|
default: withCtx(() => [..._cache[0] || (_cache[0] = [
|
|
389
537
|
createTextVNode(" ", -1)
|
|
390
538
|
])]),
|
|
391
539
|
_: 1
|
|
392
540
|
}),
|
|
393
|
-
createVNode(_sfc_main$
|
|
541
|
+
createVNode(_sfc_main$h, {
|
|
394
542
|
left: "",
|
|
395
543
|
class: "w-1/5"
|
|
396
544
|
}, {
|
|
@@ -407,7 +555,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
407
555
|
]),
|
|
408
556
|
_: 1
|
|
409
557
|
}),
|
|
410
|
-
createVNode(_sfc_main$
|
|
558
|
+
createVNode(_sfc_main$h, {
|
|
411
559
|
left: "",
|
|
412
560
|
class: "w-1/5"
|
|
413
561
|
}, {
|
|
@@ -420,7 +568,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
420
568
|
]),
|
|
421
569
|
_: 1
|
|
422
570
|
}),
|
|
423
|
-
createVNode(_sfc_main$
|
|
571
|
+
createVNode(_sfc_main$h, {
|
|
424
572
|
right: "",
|
|
425
573
|
class: "w-1/5"
|
|
426
574
|
}, {
|
|
@@ -441,11 +589,11 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
441
589
|
tabindex: __props.isExpandable ? 0 : void 0,
|
|
442
590
|
onClick: ($event) => toggleLine(__props.groupOrder, line["line_order"])
|
|
443
591
|
}, [
|
|
444
|
-
createVNode(_sfc_main$
|
|
592
|
+
createVNode(_sfc_main$i, { class: "w-3/5" }, {
|
|
445
593
|
default: withCtx(() => {
|
|
446
594
|
var _a, _b;
|
|
447
595
|
return [
|
|
448
|
-
line.sub_lines ? (openBlock(), createBlock(_sfc_main$
|
|
596
|
+
line.sub_lines ? (openBlock(), createBlock(_sfc_main$n, {
|
|
449
597
|
key: 0,
|
|
450
598
|
icon: "keyboard_arrow_down",
|
|
451
599
|
size: "md",
|
|
@@ -453,7 +601,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
453
601
|
"-rotate-90": !unref(getIsOpen)(formatIndex(__props.groupOrder, line["line_order"]))
|
|
454
602
|
}])
|
|
455
603
|
}, null, 8, ["class"])) : createCommentVNode("", true),
|
|
456
|
-
createElementVNode("div", _hoisted_2$
|
|
604
|
+
createElementVNode("div", _hoisted_2$7, [
|
|
457
605
|
renderSlot(_ctx.$slots, "invoice-line-prefix", {
|
|
458
606
|
lineOrder: line.line_order,
|
|
459
607
|
periodOrder: __props.invoicePeriodOrder,
|
|
@@ -471,13 +619,13 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
471
619
|
}),
|
|
472
620
|
_: 2
|
|
473
621
|
}, 1024),
|
|
474
|
-
createVNode(_sfc_main$
|
|
622
|
+
createVNode(_sfc_main$i, { colspan: "2" }, {
|
|
475
623
|
default: withCtx(() => [..._cache[1] || (_cache[1] = [
|
|
476
624
|
createTextVNode(" ", -1)
|
|
477
625
|
])]),
|
|
478
626
|
_: 1
|
|
479
627
|
}),
|
|
480
|
-
createVNode(_sfc_main$
|
|
628
|
+
createVNode(_sfc_main$i, { class: "w-1/5 tabular-nums" }, {
|
|
481
629
|
default: withCtx(() => {
|
|
482
630
|
var _a, _b, _c;
|
|
483
631
|
return [
|
|
@@ -486,37 +634,40 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
486
634
|
}),
|
|
487
635
|
_: 2
|
|
488
636
|
}, 1024),
|
|
489
|
-
createVNode(_sfc_main$
|
|
637
|
+
createVNode(_sfc_main$i, { class: "w-1/5" }, {
|
|
490
638
|
default: withCtx(() => [..._cache[2] || (_cache[2] = [
|
|
491
639
|
createTextVNode(" ", -1)
|
|
492
640
|
])]),
|
|
493
641
|
_: 1
|
|
494
642
|
}),
|
|
495
|
-
createVNode(_sfc_main$
|
|
643
|
+
createVNode(_sfc_main$i, {
|
|
496
644
|
number: "",
|
|
497
645
|
class: "w-1/5"
|
|
498
646
|
}, {
|
|
499
647
|
default: withCtx(() => {
|
|
500
648
|
var _a;
|
|
501
649
|
return [
|
|
502
|
-
((_a = line.details) == null ? void 0 : _a.amount) ? (openBlock(), createBlock(_sfc_main$
|
|
650
|
+
((_a = line.details) == null ? void 0 : _a.amount) ? (openBlock(), createBlock(_sfc_main$l, {
|
|
503
651
|
key: 0,
|
|
504
|
-
value: line.details.amount
|
|
505
|
-
|
|
652
|
+
value: line.details.amount,
|
|
653
|
+
"data-testid": unref(SUMMARY_LINE_AMOUNT)
|
|
654
|
+
}, null, 8, ["value", "data-testid"])) : createCommentVNode("", true)
|
|
506
655
|
];
|
|
507
656
|
}),
|
|
508
657
|
_: 2
|
|
509
658
|
}, 1024)
|
|
510
|
-
], 10, _hoisted_1$
|
|
511
|
-
createVNode(_sfc_main$
|
|
659
|
+
], 10, _hoisted_1$b),
|
|
660
|
+
createVNode(_sfc_main$g, {
|
|
512
661
|
ref_for: true,
|
|
513
662
|
ref: formatIndex(__props.groupOrder, line["line_order"]),
|
|
514
663
|
"sub-lines": line.sub_lines ?? [],
|
|
515
664
|
"line-order": line["line_order"],
|
|
516
665
|
"is-open": unref(getIsOpen)(formatIndex(__props.groupOrder, line["line_order"])),
|
|
517
666
|
"period-order": __props.invoicePeriodOrder,
|
|
518
|
-
"group-order": __props.groupOrder
|
|
519
|
-
|
|
667
|
+
"group-order": __props.groupOrder,
|
|
668
|
+
"processing-only-customers": __props.processingOnlyCustomers,
|
|
669
|
+
"display-invoice-sub-lines-per-processing-only-customer": __props.displayInvoiceSubLinesPerProcessingOnlyCustomer
|
|
670
|
+
}, null, 8, ["sub-lines", "line-order", "is-open", "period-order", "group-order", "processing-only-customers", "display-invoice-sub-lines-per-processing-only-customer"])
|
|
520
671
|
], 64);
|
|
521
672
|
}), 128))
|
|
522
673
|
]),
|
|
@@ -525,14 +676,18 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
525
676
|
};
|
|
526
677
|
}
|
|
527
678
|
});
|
|
528
|
-
const
|
|
529
|
-
|
|
679
|
+
const getInvoiceGroupAmountType = (group) => {
|
|
680
|
+
var _a;
|
|
681
|
+
return ((_a = group.lines) == null ? void 0 : _a.some((line) => !!line.sub_lines)) ? HAS_SUBLINES : void 0;
|
|
682
|
+
};
|
|
683
|
+
const _hoisted_1$a = ["tabindex"];
|
|
684
|
+
const _hoisted_2$6 = { key: 0 };
|
|
530
685
|
const _hoisted_3$5 = {
|
|
531
686
|
colspan: "2",
|
|
532
687
|
class: "p-0"
|
|
533
688
|
};
|
|
534
689
|
const _hoisted_4$5 = { class: "-mx-9 bg-gray-50 px-9 py-3 text-xs" };
|
|
535
|
-
const _sfc_main$
|
|
690
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
536
691
|
__name: "InvoiceGroupCommitment",
|
|
537
692
|
props: {
|
|
538
693
|
group: {},
|
|
@@ -542,8 +697,10 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
542
697
|
invoicePeriodOrder: {},
|
|
543
698
|
groupOrder: {},
|
|
544
699
|
isExpandable: { type: Boolean },
|
|
700
|
+
forceExpanded: { type: Boolean },
|
|
545
701
|
amountType: {},
|
|
546
702
|
processingOnlyCustomers: {},
|
|
703
|
+
displayInvoiceSubLinesPerProcessingOnlyCustomer: { type: Boolean },
|
|
547
704
|
showTaxPerLineItem: { type: Boolean }
|
|
548
705
|
},
|
|
549
706
|
setup(__props) {
|
|
@@ -551,7 +708,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
551
708
|
return (_ctx, _cache) => {
|
|
552
709
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
553
710
|
createElementVNode("tr", {
|
|
554
|
-
class: normalizeClass(["border-t", { "cursor-pointer": __props.isExpandable }]),
|
|
711
|
+
class: normalizeClass(["border-t break-inside-avoid", { "cursor-pointer": __props.isExpandable }]),
|
|
555
712
|
tabindex: __props.isExpandable ? 0 : void 0,
|
|
556
713
|
onClick: _cache[0] || (_cache[0] = ($event) => __props.handleToggleItems(__props.formatIndex(__props.invoicePeriodOrder, __props.groupOrder))),
|
|
557
714
|
onKeyup: [
|
|
@@ -559,9 +716,9 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
559
716
|
_cache[2] || (_cache[2] = withKeys(($event) => __props.handleToggleItems(__props.formatIndex(__props.invoicePeriodOrder, __props.groupOrder)), ["space"]))
|
|
560
717
|
]
|
|
561
718
|
}, [
|
|
562
|
-
createVNode(_sfc_main$
|
|
719
|
+
createVNode(_sfc_main$i, { class: "p-0" }, {
|
|
563
720
|
default: withCtx(() => [
|
|
564
|
-
__props.isExpandable ? (openBlock(), createBlock(_sfc_main$
|
|
721
|
+
__props.isExpandable ? (openBlock(), createBlock(_sfc_main$n, {
|
|
565
722
|
key: 0,
|
|
566
723
|
icon: "keyboard_arrow_down",
|
|
567
724
|
size: "md",
|
|
@@ -579,36 +736,42 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
579
736
|
]),
|
|
580
737
|
_: 1
|
|
581
738
|
}),
|
|
582
|
-
createVNode(_sfc_main$
|
|
739
|
+
createVNode(_sfc_main$i, { number: "" }, {
|
|
583
740
|
default: withCtx(() => [
|
|
584
|
-
__props.amountType === "INCLUDING_TAX" ? (openBlock(), createBlock(_sfc_main$
|
|
741
|
+
__props.amountType === "INCLUDING_TAX" ? (openBlock(), createBlock(_sfc_main$l, {
|
|
585
742
|
key: 0,
|
|
586
|
-
value: __props.group.amount_including_tax
|
|
587
|
-
|
|
743
|
+
value: __props.group.amount_including_tax,
|
|
744
|
+
"data-testid": unref(INVOICE_PERIOD_TOTAL),
|
|
745
|
+
"data-type": unref(getInvoiceGroupAmountType)(__props.group)
|
|
746
|
+
}, null, 8, ["value", "data-testid", "data-type"])) : (openBlock(), createBlock(_sfc_main$l, {
|
|
588
747
|
key: 1,
|
|
589
|
-
value: __props.group.amount_excluding_tax
|
|
590
|
-
|
|
748
|
+
value: __props.group.amount_excluding_tax,
|
|
749
|
+
"data-testid": unref(INVOICE_PERIOD_TOTAL),
|
|
750
|
+
"data-type": unref(getInvoiceGroupAmountType)(__props.group)
|
|
751
|
+
}, null, 8, ["value", "data-testid", "data-type"]))
|
|
591
752
|
]),
|
|
592
753
|
_: 1
|
|
593
754
|
})
|
|
594
|
-
], 42, _hoisted_1$
|
|
595
|
-
__props.expandedItems.includes(__props.formatIndex(__props.invoicePeriodOrder, __props.groupOrder)) && __props.group.lines ? (openBlock(), createElementBlock("tr", _hoisted_2$
|
|
755
|
+
], 42, _hoisted_1$a),
|
|
756
|
+
(__props.forceExpanded || __props.expandedItems.includes(__props.formatIndex(__props.invoicePeriodOrder, __props.groupOrder))) && __props.group.lines ? (openBlock(), createElementBlock("tr", _hoisted_2$6, [
|
|
596
757
|
createElementVNode("td", _hoisted_3$5, [
|
|
597
758
|
createElementVNode("div", _hoisted_4$5, [
|
|
598
|
-
createVNode(_sfc_main$
|
|
759
|
+
createVNode(_sfc_main$d, {
|
|
599
760
|
commitments: __props.group.lines,
|
|
600
761
|
"format-index": __props.formatIndex,
|
|
601
762
|
"handle-toggle-items": __props.handleToggleItems,
|
|
602
763
|
"expanded-items": __props.expandedItems,
|
|
603
764
|
"is-expandable": __props.isExpandable,
|
|
604
765
|
"invoice-period-order": __props.invoicePeriodOrder,
|
|
605
|
-
"group-order": __props.groupOrder
|
|
766
|
+
"group-order": __props.groupOrder,
|
|
767
|
+
"processing-only-customers": __props.processingOnlyCustomers,
|
|
768
|
+
"display-invoice-sub-lines-per-processing-only-customer": __props.displayInvoiceSubLinesPerProcessingOnlyCustomer
|
|
606
769
|
}, {
|
|
607
770
|
"invoice-line-prefix": withCtx((linePrefixProps) => [
|
|
608
771
|
renderSlot(_ctx.$slots, "invoice-line-prefix", normalizeProps(guardReactiveProps(linePrefixProps)))
|
|
609
772
|
]),
|
|
610
773
|
_: 3
|
|
611
|
-
}, 8, ["commitments", "format-index", "handle-toggle-items", "expanded-items", "is-expandable", "invoice-period-order", "group-order"])
|
|
774
|
+
}, 8, ["commitments", "format-index", "handle-toggle-items", "expanded-items", "is-expandable", "invoice-period-order", "group-order", "processing-only-customers", "display-invoice-sub-lines-per-processing-only-customer"])
|
|
612
775
|
])
|
|
613
776
|
])
|
|
614
777
|
])) : createCommentVNode("", true)
|
|
@@ -616,14 +779,14 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
616
779
|
};
|
|
617
780
|
}
|
|
618
781
|
});
|
|
619
|
-
const _hoisted_1$
|
|
620
|
-
const _hoisted_2$
|
|
782
|
+
const _hoisted_1$9 = ["tabindex"];
|
|
783
|
+
const _hoisted_2$5 = { key: 0 };
|
|
621
784
|
const _hoisted_3$4 = {
|
|
622
785
|
colspan: "2",
|
|
623
786
|
class: "p-0"
|
|
624
787
|
};
|
|
625
788
|
const _hoisted_4$4 = { class: "-mx-9 bg-gray-50 px-9 py-3 text-xs" };
|
|
626
|
-
const _sfc_main$
|
|
789
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
627
790
|
__name: "InvoiceGroupDiscountMarkup",
|
|
628
791
|
props: {
|
|
629
792
|
heading: {},
|
|
@@ -634,15 +797,17 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
634
797
|
invoicePeriodOrder: {},
|
|
635
798
|
groupOrder: {},
|
|
636
799
|
isExpandable: { type: Boolean },
|
|
800
|
+
forceExpanded: { type: Boolean },
|
|
637
801
|
amountType: {},
|
|
638
802
|
processingOnlyCustomers: {},
|
|
803
|
+
displayInvoiceSubLinesPerProcessingOnlyCustomer: { type: Boolean },
|
|
639
804
|
showTaxPerLineItem: { type: Boolean }
|
|
640
805
|
},
|
|
641
806
|
setup(__props) {
|
|
642
807
|
return (_ctx, _cache) => {
|
|
643
808
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
644
809
|
createElementVNode("tr", {
|
|
645
|
-
class: normalizeClass(["border-t", { "cursor-pointer": __props.isExpandable }]),
|
|
810
|
+
class: normalizeClass(["border-t break-inside-avoid", { "cursor-pointer": __props.isExpandable }]),
|
|
646
811
|
tabindex: __props.isExpandable ? 0 : void 0,
|
|
647
812
|
onClick: _cache[0] || (_cache[0] = ($event) => __props.handleToggleItems(__props.formatIndex(__props.invoicePeriodOrder, __props.groupOrder))),
|
|
648
813
|
onKeyup: [
|
|
@@ -650,9 +815,9 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
650
815
|
_cache[2] || (_cache[2] = withKeys(($event) => __props.handleToggleItems(__props.formatIndex(__props.invoicePeriodOrder, __props.groupOrder)), ["space"]))
|
|
651
816
|
]
|
|
652
817
|
}, [
|
|
653
|
-
createVNode(_sfc_main$
|
|
818
|
+
createVNode(_sfc_main$i, { class: "p-0" }, {
|
|
654
819
|
default: withCtx(() => [
|
|
655
|
-
__props.isExpandable ? (openBlock(), createBlock(_sfc_main$
|
|
820
|
+
__props.isExpandable ? (openBlock(), createBlock(_sfc_main$n, {
|
|
656
821
|
key: 0,
|
|
657
822
|
icon: "keyboard_arrow_down",
|
|
658
823
|
size: "md",
|
|
@@ -666,23 +831,27 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
666
831
|
]),
|
|
667
832
|
_: 1
|
|
668
833
|
}),
|
|
669
|
-
createVNode(_sfc_main$
|
|
834
|
+
createVNode(_sfc_main$i, { number: "" }, {
|
|
670
835
|
default: withCtx(() => [
|
|
671
|
-
__props.amountType === "INCLUDING_TAX" ? (openBlock(), createBlock(_sfc_main$
|
|
836
|
+
__props.amountType === "INCLUDING_TAX" ? (openBlock(), createBlock(_sfc_main$l, {
|
|
672
837
|
key: 0,
|
|
673
|
-
value: __props.group.amount_including_tax
|
|
674
|
-
|
|
838
|
+
value: __props.group.amount_including_tax,
|
|
839
|
+
"data-testid": unref(INVOICE_PERIOD_TOTAL),
|
|
840
|
+
"data-type": unref(getInvoiceGroupAmountType)(__props.group)
|
|
841
|
+
}, null, 8, ["value", "data-testid", "data-type"])) : (openBlock(), createBlock(_sfc_main$l, {
|
|
675
842
|
key: 1,
|
|
676
|
-
value: __props.group.amount_excluding_tax
|
|
677
|
-
|
|
843
|
+
value: __props.group.amount_excluding_tax,
|
|
844
|
+
"data-testid": unref(INVOICE_PERIOD_TOTAL),
|
|
845
|
+
"data-type": unref(getInvoiceGroupAmountType)(__props.group)
|
|
846
|
+
}, null, 8, ["value", "data-testid", "data-type"]))
|
|
678
847
|
]),
|
|
679
848
|
_: 1
|
|
680
849
|
})
|
|
681
|
-
], 42, _hoisted_1$
|
|
682
|
-
__props.expandedItems.includes(__props.formatIndex(__props.invoicePeriodOrder, __props.groupOrder)) && __props.group.lines ? (openBlock(), createElementBlock("tr", _hoisted_2$
|
|
850
|
+
], 42, _hoisted_1$9),
|
|
851
|
+
(__props.forceExpanded || __props.expandedItems.includes(__props.formatIndex(__props.invoicePeriodOrder, __props.groupOrder))) && __props.group.lines ? (openBlock(), createElementBlock("tr", _hoisted_2$5, [
|
|
683
852
|
createElementVNode("td", _hoisted_3$4, [
|
|
684
853
|
createElementVNode("div", _hoisted_4$4, [
|
|
685
|
-
createVNode(_sfc_main$
|
|
854
|
+
createVNode(_sfc_main$c, {
|
|
686
855
|
type: __props.group.type,
|
|
687
856
|
lines: __props.group.lines,
|
|
688
857
|
"format-index": __props.formatIndex,
|
|
@@ -690,13 +859,15 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
690
859
|
"expanded-items": __props.expandedItems,
|
|
691
860
|
"is-expandable": __props.isExpandable,
|
|
692
861
|
"invoice-period-order": __props.invoicePeriodOrder,
|
|
693
|
-
"group-order": __props.groupOrder
|
|
862
|
+
"group-order": __props.groupOrder,
|
|
863
|
+
"processing-only-customers": __props.processingOnlyCustomers,
|
|
864
|
+
"display-invoice-sub-lines-per-processing-only-customer": __props.displayInvoiceSubLinesPerProcessingOnlyCustomer
|
|
694
865
|
}, {
|
|
695
866
|
"invoice-line-prefix": withCtx((linePrefixProps) => [
|
|
696
867
|
renderSlot(_ctx.$slots, "invoice-line-prefix", normalizeProps(guardReactiveProps(linePrefixProps)))
|
|
697
868
|
]),
|
|
698
869
|
_: 3
|
|
699
|
-
}, 8, ["type", "lines", "format-index", "handle-toggle-items", "expanded-items", "is-expandable", "invoice-period-order", "group-order"])
|
|
870
|
+
}, 8, ["type", "lines", "format-index", "handle-toggle-items", "expanded-items", "is-expandable", "invoice-period-order", "group-order", "processing-only-customers", "display-invoice-sub-lines-per-processing-only-customer"])
|
|
700
871
|
])
|
|
701
872
|
])
|
|
702
873
|
])) : createCommentVNode("", true)
|
|
@@ -705,157 +876,62 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
705
876
|
}
|
|
706
877
|
});
|
|
707
878
|
const getInvoiceGroupOriginalCustomerId = (group, isShowOriginalCustomerInvoiceLine) => {
|
|
708
|
-
if (!isShowOriginalCustomerInvoiceLine) {
|
|
709
|
-
return void 0;
|
|
710
|
-
}
|
|
711
|
-
return group.forwarded_from_customer_id;
|
|
712
|
-
};
|
|
713
|
-
const _hoisted_1$a = { class: "flex gap-4" };
|
|
714
|
-
const _hoisted_2$5 = { class: "flex items-center gap-2" };
|
|
715
|
-
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
716
|
-
__name: "PricingClauseChip",
|
|
717
|
-
props: {
|
|
718
|
-
iconName: {},
|
|
719
|
-
chipColor: {}
|
|
720
|
-
},
|
|
721
|
-
setup(__props) {
|
|
722
|
-
return (_ctx, _cache) => {
|
|
723
|
-
return openBlock(), createElementBlock("div", _hoisted_1$a, [
|
|
724
|
-
createVNode(_sfc_main$m, { color: __props.chipColor }, {
|
|
725
|
-
default: withCtx(() => [
|
|
726
|
-
createElementVNode("div", _hoisted_2$5, [
|
|
727
|
-
createVNode(_sfc_main$l, {
|
|
728
|
-
icon: __props.iconName,
|
|
729
|
-
size: "xs"
|
|
730
|
-
}, null, 8, ["icon"]),
|
|
731
|
-
createElementVNode("span", null, [
|
|
732
|
-
renderSlot(_ctx.$slots, "chip-content")
|
|
733
|
-
])
|
|
734
|
-
])
|
|
735
|
-
]),
|
|
736
|
-
_: 3
|
|
737
|
-
}, 8, ["color"]),
|
|
738
|
-
renderSlot(_ctx.$slots, "chip-postfix")
|
|
739
|
-
]);
|
|
740
|
-
};
|
|
741
|
-
}
|
|
742
|
-
});
|
|
743
|
-
const _hoisted_1$9 = { class: "flex flex-col gap-2" };
|
|
744
|
-
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
745
|
-
__name: "InvoicePricingClauseChip",
|
|
746
|
-
props: {
|
|
747
|
-
clauseType: {},
|
|
748
|
-
priceDetailsBand: {},
|
|
749
|
-
invoiceLineDescription: {}
|
|
750
|
-
},
|
|
751
|
-
setup(__props) {
|
|
752
|
-
const intl = useIntl();
|
|
753
|
-
return (_ctx, _cache) => {
|
|
754
|
-
return openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
755
|
-
createElementVNode("span", null, toDisplayString(__props.invoiceLineDescription), 1),
|
|
756
|
-
__props.clauseType === "DISCOUNT" && __props.priceDetailsBand ? (openBlock(), createBlock(unref(_sfc_main$a), {
|
|
757
|
-
key: 0,
|
|
758
|
-
"icon-name": "south_east",
|
|
759
|
-
"chip-color": "yellow"
|
|
760
|
-
}, createSlots({ _: 2 }, [
|
|
761
|
-
__props.priceDetailsBand.amount ? {
|
|
762
|
-
name: "chip-content",
|
|
763
|
-
fn: withCtx(() => [
|
|
764
|
-
createTextVNode(toDisplayString(unref(intl).$t(
|
|
765
|
-
{
|
|
766
|
-
id: "invoice.amount_discount",
|
|
767
|
-
defaultMessage: "{amount} discount",
|
|
768
|
-
description: "Represents a certain amount of discount, where {amount} is replaced with the amount"
|
|
769
|
-
},
|
|
770
|
-
{
|
|
771
|
-
amount: unref(formatAmount)(__props.priceDetailsBand.amount)
|
|
772
|
-
}
|
|
773
|
-
).toUpperCase()), 1)
|
|
774
|
-
]),
|
|
775
|
-
key: "0"
|
|
776
|
-
} : __props.priceDetailsBand.percentage ? {
|
|
777
|
-
name: "chip-content",
|
|
778
|
-
fn: withCtx(() => [
|
|
779
|
-
createTextVNode(toDisplayString(unref(intl).$t(
|
|
780
|
-
{
|
|
781
|
-
id: "invoice.percentage_discount",
|
|
782
|
-
defaultMessage: "{percentage}% discount",
|
|
783
|
-
description: "Represents a certain percentage of discount, where {percentage} is replaced with the percentage (number only)"
|
|
784
|
-
},
|
|
785
|
-
{
|
|
786
|
-
percentage: __props.priceDetailsBand.percentage ?? "0"
|
|
787
|
-
}
|
|
788
|
-
).toUpperCase()), 1)
|
|
789
|
-
]),
|
|
790
|
-
key: "1"
|
|
791
|
-
} : void 0
|
|
792
|
-
]), 1024)) : __props.clauseType === "ADJUSTMENT" ? (openBlock(), createBlock(unref(_sfc_main$a), {
|
|
793
|
-
key: 1,
|
|
794
|
-
"icon-name": "info",
|
|
795
|
-
"chip-color": "yellow"
|
|
796
|
-
}, {
|
|
797
|
-
"chip-content": withCtx(() => [
|
|
798
|
-
createTextVNode(toDisplayString(unref(intl).$t({
|
|
799
|
-
id: "invoice.adjustment_chip_body",
|
|
800
|
-
defaultMessage: "Adjustment",
|
|
801
|
-
description: "Used on invoice lines to mark as adjusted"
|
|
802
|
-
}).toUpperCase()), 1)
|
|
803
|
-
]),
|
|
804
|
-
_: 1
|
|
805
|
-
})) : __props.clauseType === "MARKUP" ? (openBlock(), createBlock(unref(_sfc_main$a), {
|
|
806
|
-
key: 2,
|
|
807
|
-
"icon-name": "north_east",
|
|
808
|
-
"chip-color": "teal-light"
|
|
809
|
-
}, {
|
|
810
|
-
"chip-content": withCtx(() => {
|
|
811
|
-
var _a;
|
|
812
|
-
return [
|
|
813
|
-
createTextVNode(toDisplayString(unref(intl).$t(
|
|
814
|
-
{
|
|
815
|
-
id: "invoice.markup_percentage",
|
|
816
|
-
defaultMessage: "{percentage}% markup",
|
|
817
|
-
description: "Markup percentage, where {percentage} is replaced with the percentage (number only)"
|
|
818
|
-
},
|
|
819
|
-
{ percentage: ((_a = __props.priceDetailsBand) == null ? void 0 : _a.percentage) ?? "0" }
|
|
820
|
-
).toUpperCase()), 1)
|
|
821
|
-
];
|
|
822
|
-
}),
|
|
823
|
-
_: 1
|
|
824
|
-
})) : __props.clauseType === "COMMITMENT" ? (openBlock(), createBlock(unref(_sfc_main$a), {
|
|
825
|
-
key: 3,
|
|
826
|
-
"icon-name": "sell",
|
|
827
|
-
"chip-color": "orange"
|
|
828
|
-
}, {
|
|
829
|
-
"chip-content": withCtx(() => [
|
|
830
|
-
createTextVNode(toDisplayString(unref(intl).$t({
|
|
831
|
-
id: "invoice.commitment",
|
|
832
|
-
defaultMessage: "commitment",
|
|
833
|
-
description: "Used on invoice lines to mark as commitment"
|
|
834
|
-
}).toUpperCase()), 1)
|
|
835
|
-
]),
|
|
836
|
-
_: 1
|
|
837
|
-
})) : createCommentVNode("", true)
|
|
838
|
-
]);
|
|
839
|
-
};
|
|
879
|
+
if (!isShowOriginalCustomerInvoiceLine) {
|
|
880
|
+
return void 0;
|
|
840
881
|
}
|
|
841
|
-
|
|
882
|
+
return group.forwarded_from_customer_id;
|
|
883
|
+
};
|
|
884
|
+
const resolveInvoiceLineTierBounds = (band) => {
|
|
885
|
+
let lowerBound = { kind: "default" };
|
|
886
|
+
let topBound = { kind: "default" };
|
|
887
|
+
if (band.tier_lower_bound && "number" in band.tier_lower_bound) {
|
|
888
|
+
lowerBound = { kind: "number", value: +band.tier_lower_bound.number };
|
|
889
|
+
} else if (band.tier_lower_bound && "amount" in band.tier_lower_bound) {
|
|
890
|
+
const { quantity, currency } = band.tier_lower_bound.amount;
|
|
891
|
+
lowerBound = { kind: "amount", currency, quantity: quantity ?? 0 };
|
|
892
|
+
}
|
|
893
|
+
if (band.tier_top_bound && "number" in band.tier_top_bound) {
|
|
894
|
+
topBound = { kind: "number", value: +band.tier_top_bound.number };
|
|
895
|
+
} else if (band.tier_top_bound && "amount" in band.tier_top_bound) {
|
|
896
|
+
const { quantity, currency } = band.tier_top_bound.amount;
|
|
897
|
+
topBound = { kind: "amount", currency, quantity };
|
|
898
|
+
}
|
|
899
|
+
return { lowerBound, topBound };
|
|
900
|
+
};
|
|
901
|
+
const resolveInvoiceLineStatusLabel = (details) => {
|
|
902
|
+
var _a, _b, _c, _d;
|
|
903
|
+
switch (details == null ? void 0 : details.price_bound) {
|
|
904
|
+
case "BELOW_MINIMUM_AMOUNT":
|
|
905
|
+
return { kind: "band_minimum_amount", amount: (_a = details.band) == null ? void 0 : _a.minimum_amount };
|
|
906
|
+
case "NOT_HIT":
|
|
907
|
+
return { kind: "price_bound_within_bounds" };
|
|
908
|
+
case "ABOVE_MAXIMUM_AMOUNT":
|
|
909
|
+
return { kind: "price_bound_maximum_amount", amount: (_b = details.band) == null ? void 0 : _b.maximum_amount };
|
|
910
|
+
case "BELOW_MINIMUM_NUMBER":
|
|
911
|
+
return { kind: "band_minimum_number", value: (_c = details.band) == null ? void 0 : _c.minimum_number };
|
|
912
|
+
case "ABOVE_MAXIMUM_NUMBER":
|
|
913
|
+
return { kind: "band_maximum_number", value: (_d = details.band) == null ? void 0 : _d.maximum_number };
|
|
914
|
+
default:
|
|
915
|
+
return { kind: "none" };
|
|
916
|
+
}
|
|
917
|
+
};
|
|
842
918
|
const _hoisted_1$8 = { class: "items-left flex flex-col gap-1 leading-none" };
|
|
843
919
|
const _hoisted_2$4 = { class: "flex items-center" };
|
|
844
920
|
const _hoisted_3$3 = {
|
|
845
921
|
key: 0,
|
|
846
|
-
class: "ml-1 text-xs text-
|
|
922
|
+
class: "ml-1 text-xs text-secondary"
|
|
847
923
|
};
|
|
848
924
|
const _hoisted_4$3 = { key: 0 };
|
|
849
925
|
const _hoisted_5$2 = {
|
|
850
926
|
key: 1,
|
|
851
|
-
class: "text-xs text-
|
|
927
|
+
class: "text-xs text-secondary"
|
|
852
928
|
};
|
|
853
929
|
const _hoisted_6$2 = {
|
|
854
930
|
key: 2,
|
|
855
|
-
class: "text-xs text-
|
|
931
|
+
class: "text-xs text-secondary"
|
|
856
932
|
};
|
|
857
|
-
const _hoisted_7$2 = { class: "text-[9pt] text-
|
|
858
|
-
const _sfc_main$
|
|
933
|
+
const _hoisted_7$2 = { class: "text-[9pt] text-secondary" };
|
|
934
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
859
935
|
__name: "InvoiceLineRow",
|
|
860
936
|
props: {
|
|
861
937
|
data: {},
|
|
@@ -868,28 +944,22 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
868
944
|
setup(__props) {
|
|
869
945
|
const { $t, formatNumber } = useIntl();
|
|
870
946
|
const props = __props;
|
|
947
|
+
const formatTierBound = (bound) => {
|
|
948
|
+
if (bound.kind === "default") return void 0;
|
|
949
|
+
if (bound.kind === "number") return formatNumber(bound.value);
|
|
950
|
+
return `${bound.currency} ${bound.quantity}`;
|
|
951
|
+
};
|
|
871
952
|
const formattedTier = (band) => {
|
|
872
953
|
if (!band) return "";
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
lowerBound = formatNumber(+band.tier_lower_bound.number);
|
|
877
|
-
} else if (band.tier_lower_bound && "amount" in band.tier_lower_bound) {
|
|
878
|
-
const { quantity, currency } = band.tier_lower_bound.amount;
|
|
879
|
-
lowerBound = `${currency} ${quantity ?? 0}`;
|
|
880
|
-
}
|
|
881
|
-
if (band.tier_top_bound && "number" in band.tier_top_bound) {
|
|
882
|
-
topBound = ` - ${formatNumber(+band.tier_top_bound.number)}`;
|
|
883
|
-
} else if (band.tier_top_bound && "amount" in band.tier_top_bound) {
|
|
884
|
-
const { quantity, currency } = band.tier_top_bound.amount;
|
|
885
|
-
topBound = ` - ${currency} ${quantity}`;
|
|
886
|
-
}
|
|
887
|
-
return lowerBound + topBound;
|
|
954
|
+
const { lowerBound, topBound } = resolveInvoiceLineTierBounds(band);
|
|
955
|
+
const formattedTopBound = formatTierBound(topBound);
|
|
956
|
+
return (formatTierBound(lowerBound) ?? "0") + (formattedTopBound ? ` - ${formattedTopBound}` : "+");
|
|
888
957
|
};
|
|
889
958
|
const includedVolumeDetails = computed(() => {
|
|
890
959
|
var _a;
|
|
891
960
|
return (_a = props.data.details) == null ? void 0 : _a.included_volume_details;
|
|
892
961
|
});
|
|
962
|
+
const statusLabel = computed(() => resolveInvoiceLineStatusLabel(props.data.details));
|
|
893
963
|
const invoiceLineName = computed(() => {
|
|
894
964
|
var _a, _b;
|
|
895
965
|
if ((_a = props.data) == null ? void 0 : _a.product_items) {
|
|
@@ -899,13 +969,13 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
899
969
|
});
|
|
900
970
|
return (_ctx, _cache) => {
|
|
901
971
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
902
|
-
createVNode(_sfc_main$
|
|
972
|
+
createVNode(_sfc_main$i, { class: "align-top" }, {
|
|
903
973
|
default: withCtx(() => {
|
|
904
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i
|
|
974
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
905
975
|
return [
|
|
906
976
|
createElementVNode("div", _hoisted_1$8, [
|
|
907
977
|
createElementVNode("div", null, [
|
|
908
|
-
__props.data.sub_lines ? (openBlock(), createBlock(_sfc_main$
|
|
978
|
+
__props.data.sub_lines ? (openBlock(), createBlock(_sfc_main$n, {
|
|
909
979
|
key: 0,
|
|
910
980
|
icon: "keyboard_arrow_down",
|
|
911
981
|
size: "md",
|
|
@@ -922,7 +992,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
922
992
|
["PRICING", "REVENUE", "ONE_OFF"].includes(__props.data.type) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
923
993
|
createTextVNode(toDisplayString(invoiceLineName.value) + " ", 1),
|
|
924
994
|
__props.data.type === "ONE_OFF" && __props.groupType !== "ONE_OFF" ? (openBlock(), createElementBlock("div", _hoisted_3$3, toDisplayString(unref(formatEnum)(__props.data.type)), 1)) : createCommentVNode("", true)
|
|
925
|
-
], 64)) : (openBlock(), createBlock(_sfc_main$
|
|
995
|
+
], 64)) : (openBlock(), createBlock(_sfc_main$e, {
|
|
926
996
|
key: 1,
|
|
927
997
|
"invoice-line-description": invoiceLineName.value,
|
|
928
998
|
"clause-type": __props.data.type,
|
|
@@ -944,51 +1014,51 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
944
1014
|
((_h = __props.data.conditions) == null ? void 0 : _h.name) || ((_i = __props.data.conditions) == null ? void 0 : _i.meter_properties) ? (openBlock(), createElementBlock("div", _hoisted_6$2, [
|
|
945
1015
|
__props.data.conditions.name ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
946
1016
|
createTextVNode(toDisplayString(__props.data.conditions.name), 1)
|
|
947
|
-
], 64)) : __props.data.conditions.meter_properties ? (openBlock(), createBlock(unref(_sfc_main$
|
|
1017
|
+
], 64)) : __props.data.conditions.meter_properties ? (openBlock(), createBlock(unref(_sfc_main$k), {
|
|
948
1018
|
key: 1,
|
|
949
1019
|
comparators: __props.data.conditions.meter_properties
|
|
950
1020
|
}, null, 8, ["comparators"])) : createCommentVNode("", true)
|
|
951
1021
|
])) : createCommentVNode("", true)
|
|
952
1022
|
]),
|
|
953
1023
|
createElementVNode("span", _hoisted_7$2, [
|
|
954
|
-
|
|
1024
|
+
statusLabel.value.kind === "band_minimum_amount" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
955
1025
|
createTextVNode(toDisplayString(unref($t)({
|
|
956
1026
|
id: "invoice.line.band_minimum_amount",
|
|
957
1027
|
defaultMessage: "Band minimum amount",
|
|
958
1028
|
description: "Minimum amount specified in a band"
|
|
959
1029
|
})) + " ", 1),
|
|
960
|
-
|
|
1030
|
+
statusLabel.value.amount ? (openBlock(), createBlock(_sfc_main$l, {
|
|
961
1031
|
key: 0,
|
|
962
|
-
value:
|
|
1032
|
+
value: statusLabel.value.amount
|
|
963
1033
|
}, null, 8, ["value"])) : createCommentVNode("", true)
|
|
964
|
-
], 64)) :
|
|
1034
|
+
], 64)) : statusLabel.value.kind === "price_bound_within_bounds" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
965
1035
|
createTextVNode(toDisplayString(unref($t)({
|
|
966
1036
|
id: "invoice.line.price_bound_within_bounds",
|
|
967
1037
|
defaultMessage: "Within bounds",
|
|
968
1038
|
description: "Label used when min and max bounds are specified but reached"
|
|
969
1039
|
})), 1)
|
|
970
|
-
], 64)) :
|
|
1040
|
+
], 64)) : statusLabel.value.kind === "price_bound_maximum_amount" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
971
1041
|
createTextVNode(toDisplayString(unref($t)({
|
|
972
1042
|
id: "invoice.line.price_bound_maximum_amount",
|
|
973
1043
|
defaultMessage: "Maximum amount",
|
|
974
|
-
description: "
|
|
1044
|
+
description: "Maximum amount specified in a band"
|
|
975
1045
|
})) + " ", 1),
|
|
976
|
-
|
|
1046
|
+
statusLabel.value.amount ? (openBlock(), createBlock(_sfc_main$l, {
|
|
977
1047
|
key: 0,
|
|
978
|
-
value:
|
|
1048
|
+
value: statusLabel.value.amount
|
|
979
1049
|
}, null, 8, ["value"])) : createCommentVNode("", true)
|
|
980
|
-
], 64)) :
|
|
1050
|
+
], 64)) : statusLabel.value.kind === "band_minimum_number" ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
981
1051
|
createTextVNode(toDisplayString(unref($t)({
|
|
982
1052
|
id: "invoice.line.band_minimum_number",
|
|
983
1053
|
defaultMessage: "Minimum number",
|
|
984
1054
|
description: "Minimum number of units specified in a band"
|
|
985
|
-
})) + " " + toDisplayString(
|
|
986
|
-
], 64)) :
|
|
1055
|
+
})) + " " + toDisplayString(statusLabel.value.value), 1)
|
|
1056
|
+
], 64)) : statusLabel.value.kind === "band_maximum_number" ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
987
1057
|
createTextVNode(toDisplayString(unref($t)({
|
|
988
1058
|
id: "invoice.line.band_maximum_number",
|
|
989
1059
|
defaultMessage: "Maximum number",
|
|
990
1060
|
description: "Maximum number of units specified in a band"
|
|
991
|
-
})) + " " + toDisplayString(
|
|
1061
|
+
})) + " " + toDisplayString(statusLabel.value.value), 1)
|
|
992
1062
|
], 64)) : createCommentVNode("", true)
|
|
993
1063
|
])
|
|
994
1064
|
];
|
|
@@ -1002,9 +1072,95 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
1002
1072
|
};
|
|
1003
1073
|
}
|
|
1004
1074
|
});
|
|
1075
|
+
const resolveInvoiceRowQuantity = (pricingType, details, preferConversionCredits) => {
|
|
1076
|
+
var _a, _b;
|
|
1077
|
+
if (pricingType === "PASS_THROUGH") return { kind: "hidden" };
|
|
1078
|
+
if (preferConversionCredits && ((_b = (_a = details == null ? void 0 : details.conversion) == null ? void 0 : _a.credits) == null ? void 0 : _b.quantity)) {
|
|
1079
|
+
return { kind: "conversion-credits", value: details.conversion.credits.quantity };
|
|
1080
|
+
}
|
|
1081
|
+
if (details == null ? void 0 : details.price_bound) {
|
|
1082
|
+
const { price_bound: priceBound, meter_value: meterValue, band } = details;
|
|
1083
|
+
if (priceBound === "BELOW_MINIMUM_AMOUNT" || priceBound === "ABOVE_MAXIMUM_AMOUNT") {
|
|
1084
|
+
return { kind: "raw", value: meterValue.count };
|
|
1085
|
+
}
|
|
1086
|
+
if (priceBound === "NOT_HIT" && "amount" in meterValue && meterValue.amount) {
|
|
1087
|
+
return { kind: "amount", amount: meterValue.amount };
|
|
1088
|
+
}
|
|
1089
|
+
if (priceBound === "NOT_HIT" && "number" in meterValue && meterValue.number) {
|
|
1090
|
+
return { kind: "raw", value: meterValue.number };
|
|
1091
|
+
}
|
|
1092
|
+
if (priceBound === "RATIO" && meterValue.number) {
|
|
1093
|
+
return { kind: "number", value: +meterValue.number };
|
|
1094
|
+
}
|
|
1095
|
+
if (priceBound === "BELOW_MINIMUM_NUMBER" && (band == null ? void 0 : band.minimum_number)) {
|
|
1096
|
+
return { kind: "number", value: +band.minimum_number };
|
|
1097
|
+
}
|
|
1098
|
+
if (priceBound === "ABOVE_MAXIMUM_NUMBER" && (band == null ? void 0 : band.maximum_number)) {
|
|
1099
|
+
return { kind: "number", value: +band.maximum_number };
|
|
1100
|
+
}
|
|
1101
|
+
return { kind: "hidden" };
|
|
1102
|
+
}
|
|
1103
|
+
if ((details == null ? void 0 : details.meter_value) && "number" in details.meter_value) {
|
|
1104
|
+
return { kind: "number", value: +details.meter_value.number };
|
|
1105
|
+
}
|
|
1106
|
+
if ((details == null ? void 0 : details.meter_value) && "amount" in details.meter_value) {
|
|
1107
|
+
return { kind: "amount", amount: details.meter_value.amount };
|
|
1108
|
+
}
|
|
1109
|
+
return { kind: "one" };
|
|
1110
|
+
};
|
|
1111
|
+
const BOUNDED_NUMBER_PRICE_BOUNDS = ["NOT_HIT", "BELOW_MINIMUM_NUMBER", "ABOVE_MAXIMUM_NUMBER"];
|
|
1112
|
+
const resolveInvoiceRowPrice = (pricingType, details, modelType) => {
|
|
1113
|
+
if (pricingType === "PASS_THROUGH") return { kind: "pass-through" };
|
|
1114
|
+
if (details == null ? void 0 : details.price_bound) {
|
|
1115
|
+
const { price_bound: priceBound, band: band2, amount: amount2 } = details;
|
|
1116
|
+
if (priceBound === "BELOW_MINIMUM_AMOUNT" && (band2 == null ? void 0 : band2.minimum_amount)) {
|
|
1117
|
+
return { kind: "amount", amount: band2.minimum_amount };
|
|
1118
|
+
}
|
|
1119
|
+
if (priceBound === "ABOVE_MAXIMUM_AMOUNT" && (band2 == null ? void 0 : band2.maximum_amount)) {
|
|
1120
|
+
return { kind: "amount", amount: band2.maximum_amount };
|
|
1121
|
+
}
|
|
1122
|
+
if (priceBound === "RATIO") {
|
|
1123
|
+
const perSeatAmount = modelType === "PER_SEAT" ? band2 == null ? void 0 : band2.amount : void 0;
|
|
1124
|
+
return { kind: "amount", amount: perSeatAmount ?? amount2, suffix: { kind: "tier-top-bound" } };
|
|
1125
|
+
}
|
|
1126
|
+
if (BOUNDED_NUMBER_PRICE_BOUNDS.includes(priceBound)) {
|
|
1127
|
+
if (band2 && band2.amount) {
|
|
1128
|
+
return { kind: "amount", amount: band2.amount };
|
|
1129
|
+
}
|
|
1130
|
+
if (band2 && "percentage" in band2) {
|
|
1131
|
+
return { kind: "percentage", value: band2.percentage };
|
|
1132
|
+
}
|
|
1133
|
+
if (band2 && amount2) {
|
|
1134
|
+
return { kind: "amount", amount: amount2, suffix: { kind: "fixed-amount" } };
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
return { kind: "hidden" };
|
|
1138
|
+
}
|
|
1139
|
+
const band = details == null ? void 0 : details.band;
|
|
1140
|
+
const amount = details == null ? void 0 : details.amount;
|
|
1141
|
+
if (band && band.amount) {
|
|
1142
|
+
return { kind: "amount", amount: band.amount, suffix: { kind: "block-size-or-per-unit" } };
|
|
1143
|
+
}
|
|
1144
|
+
if (band && "percentage" in band) {
|
|
1145
|
+
return { kind: "percentage", value: band.percentage };
|
|
1146
|
+
}
|
|
1147
|
+
if (band && amount) {
|
|
1148
|
+
if (pricingType === "STAIR_STEP" || pricingType === "STAIR_STEP_TOP_UP") {
|
|
1149
|
+
return { kind: "amount", amount, suffix: { kind: "fixed-amount" } };
|
|
1150
|
+
}
|
|
1151
|
+
if (pricingType === "TOP_TIERED") {
|
|
1152
|
+
return { kind: "amount", amount, suffix: { kind: "per-unit" } };
|
|
1153
|
+
}
|
|
1154
|
+
if (pricingType === "FLAT") {
|
|
1155
|
+
return { kind: "amount", amount, suffix: { kind: "flat-fee" } };
|
|
1156
|
+
}
|
|
1157
|
+
return { kind: "amount", amount };
|
|
1158
|
+
}
|
|
1159
|
+
return { kind: "hidden" };
|
|
1160
|
+
};
|
|
1005
1161
|
const _hoisted_1$7 = {
|
|
1006
|
-
key:
|
|
1007
|
-
class: "text-xs text-
|
|
1162
|
+
key: 5,
|
|
1163
|
+
class: "text-xs text-secondary"
|
|
1008
1164
|
};
|
|
1009
1165
|
const _hoisted_2$3 = {
|
|
1010
1166
|
key: 1,
|
|
@@ -1012,30 +1168,33 @@ const _hoisted_2$3 = {
|
|
|
1012
1168
|
};
|
|
1013
1169
|
const _hoisted_3$2 = {
|
|
1014
1170
|
key: 0,
|
|
1015
|
-
class: "text-2xs text-
|
|
1171
|
+
class: "text-2xs text-secondary"
|
|
1172
|
+
};
|
|
1173
|
+
const _hoisted_4$2 = {
|
|
1174
|
+
key: 1,
|
|
1175
|
+
class: "text-2xs text-secondary"
|
|
1016
1176
|
};
|
|
1017
|
-
const _hoisted_4$2 = { class: "text-2xs text-gray-500" };
|
|
1018
1177
|
const _hoisted_5$1 = {
|
|
1019
1178
|
key: 0,
|
|
1020
|
-
class: "text-2xs text-
|
|
1179
|
+
class: "text-2xs text-secondary"
|
|
1021
1180
|
};
|
|
1022
1181
|
const _hoisted_6$1 = {
|
|
1023
1182
|
key: 1,
|
|
1024
|
-
class: "text-2xs text-
|
|
1183
|
+
class: "text-2xs text-secondary"
|
|
1025
1184
|
};
|
|
1026
1185
|
const _hoisted_7$1 = {
|
|
1027
|
-
key:
|
|
1028
|
-
class: "text-2xs text-
|
|
1186
|
+
key: 2,
|
|
1187
|
+
class: "text-2xs text-secondary"
|
|
1029
1188
|
};
|
|
1030
1189
|
const _hoisted_8$1 = {
|
|
1031
|
-
key:
|
|
1032
|
-
class: "text-2xs text-
|
|
1190
|
+
key: 3,
|
|
1191
|
+
class: "text-2xs text-secondary"
|
|
1033
1192
|
};
|
|
1034
1193
|
const _hoisted_9$1 = {
|
|
1035
|
-
key:
|
|
1036
|
-
class: "text-2xs text-
|
|
1194
|
+
key: 4,
|
|
1195
|
+
class: "text-2xs text-secondary"
|
|
1037
1196
|
};
|
|
1038
|
-
const _hoisted_10$1 = { class: "text-2xs text-
|
|
1197
|
+
const _hoisted_10$1 = { class: "text-2xs text-secondary" };
|
|
1039
1198
|
const _hoisted_11$1 = {
|
|
1040
1199
|
key: 0,
|
|
1041
1200
|
class: "flex justify-end"
|
|
@@ -1043,14 +1202,14 @@ const _hoisted_11$1 = {
|
|
|
1043
1202
|
const _hoisted_12$1 = { class: "flex items-center justify-end gap-1" };
|
|
1044
1203
|
const _hoisted_13$1 = {
|
|
1045
1204
|
key: 0,
|
|
1046
|
-
class: "text-2xs tabular-nums text-
|
|
1205
|
+
class: "text-2xs tabular-nums text-secondary"
|
|
1047
1206
|
};
|
|
1048
|
-
const _hoisted_14 = {
|
|
1207
|
+
const _hoisted_14$1 = {
|
|
1049
1208
|
key: 1,
|
|
1050
1209
|
class: "inline-block"
|
|
1051
1210
|
};
|
|
1052
|
-
const _hoisted_15 = { class: "flex items-center justify-end gap-1" };
|
|
1053
|
-
const _sfc_main$
|
|
1211
|
+
const _hoisted_15$1 = { class: "flex items-center justify-end gap-1" };
|
|
1212
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
1054
1213
|
__name: "InvoiceRowContent",
|
|
1055
1214
|
props: {
|
|
1056
1215
|
pricingType: {},
|
|
@@ -1059,7 +1218,8 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
1059
1218
|
amountType: {},
|
|
1060
1219
|
hideTaxDetails: { type: Boolean },
|
|
1061
1220
|
modelType: {},
|
|
1062
|
-
showTaxPerLineItem: { type: Boolean, default: true }
|
|
1221
|
+
showTaxPerLineItem: { type: Boolean, default: true },
|
|
1222
|
+
preferConversionCredits: { type: Boolean }
|
|
1063
1223
|
},
|
|
1064
1224
|
setup(__props) {
|
|
1065
1225
|
const props = __props;
|
|
@@ -1073,7 +1233,27 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
1073
1233
|
return (_a = includedVolumeDetails.value) == null ? void 0 : _a.available_included_volume;
|
|
1074
1234
|
}
|
|
1075
1235
|
);
|
|
1236
|
+
const quantityDisplay = computed(
|
|
1237
|
+
() => resolveInvoiceRowQuantity(props.pricingType, props.details, props.preferConversionCredits)
|
|
1238
|
+
);
|
|
1239
|
+
const priceDisplay = computed(
|
|
1240
|
+
() => resolveInvoiceRowPrice(props.pricingType, props.details, props.modelType)
|
|
1241
|
+
);
|
|
1076
1242
|
const { $t, formatNumber } = useIntl();
|
|
1243
|
+
const fixedAmountLabel = computed(
|
|
1244
|
+
() => $t({
|
|
1245
|
+
id: "invoice.line.fixed_amount",
|
|
1246
|
+
defaultMessage: "Fixed amount",
|
|
1247
|
+
description: "Label shown when a price band charges a fixed amount regardless of usage"
|
|
1248
|
+
})
|
|
1249
|
+
);
|
|
1250
|
+
const flatFeeLabel = computed(
|
|
1251
|
+
() => $t({
|
|
1252
|
+
id: "invoice.line.flat_fee",
|
|
1253
|
+
defaultMessage: "Flat fee",
|
|
1254
|
+
description: "Label shown for a flat, usage-independent fee"
|
|
1255
|
+
})
|
|
1256
|
+
);
|
|
1077
1257
|
const tierTopBoundNumber = computed(() => {
|
|
1078
1258
|
var _a, _b;
|
|
1079
1259
|
const tierTopBound = (_b = (_a = props.details) == null ? void 0 : _a.band) == null ? void 0 : _b.tier_top_bound;
|
|
@@ -1090,6 +1270,23 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
1090
1270
|
{ count: +tierTopBoundNumber.value, formattedCount: tierTopBoundNumber.value }
|
|
1091
1271
|
);
|
|
1092
1272
|
});
|
|
1273
|
+
const perSeatAmount = computed(
|
|
1274
|
+
() => {
|
|
1275
|
+
var _a, _b;
|
|
1276
|
+
return props.modelType === "PER_SEAT" ? (_b = (_a = props.details) == null ? void 0 : _a.band) == null ? void 0 : _b.amount : void 0;
|
|
1277
|
+
}
|
|
1278
|
+
);
|
|
1279
|
+
const perUnitLabel = computed(
|
|
1280
|
+
() => props.modelType === "PER_SEAT" ? $t({
|
|
1281
|
+
id: "invoice.line.per_seat",
|
|
1282
|
+
defaultMessage: "Per seat",
|
|
1283
|
+
description: "Label shown when a price band applies per single seat"
|
|
1284
|
+
}) : $t({
|
|
1285
|
+
id: "invoice.line.per_unit",
|
|
1286
|
+
defaultMessage: "Per unit",
|
|
1287
|
+
description: "Label shown when a price band applies per single unit"
|
|
1288
|
+
})
|
|
1289
|
+
);
|
|
1093
1290
|
const blockSizeNumber = computed(() => {
|
|
1094
1291
|
var _a, _b;
|
|
1095
1292
|
const blockSize = (_b = (_a = props.details) == null ? void 0 : _a.band) == null ? void 0 : _b.block_size;
|
|
@@ -1111,63 +1308,48 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
1111
1308
|
});
|
|
1112
1309
|
return (_ctx, _cache) => {
|
|
1113
1310
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
1114
|
-
createVNode(_sfc_main$
|
|
1311
|
+
createVNode(_sfc_main$i, {
|
|
1115
1312
|
number: "",
|
|
1116
1313
|
class: "align-top"
|
|
1117
1314
|
}, {
|
|
1118
1315
|
default: withCtx(() => {
|
|
1119
|
-
var _a
|
|
1316
|
+
var _a;
|
|
1120
1317
|
return [
|
|
1121
|
-
|
|
1122
|
-
((
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
value: availableIncludedVolume.value.amount
|
|
1152
|
-
}, null, 8, ["value"]),
|
|
1153
|
-
createTextVNode(" " + toDisplayString(unref($t)({
|
|
1154
|
-
id: "invoice.line.included",
|
|
1155
|
-
defaultMessage: "included",
|
|
1156
|
-
description: "Used to specify an included amount. Should be lowercase."
|
|
1157
|
-
})), 1)
|
|
1158
|
-
], 64)) : availableIncludedVolume.value.type === "NUMBER" ? (openBlock(), createElementBlock("span", _hoisted_2$3, toDisplayString(availableIncludedVolume.value.number) + " " + toDisplayString(unref($t)({
|
|
1159
|
-
id: "invoice.line.units_included",
|
|
1160
|
-
defaultMessage: "units included",
|
|
1161
|
-
description: "Used to specify an included units. Should be lowercase."
|
|
1162
|
-
})), 1)) : createCommentVNode("", true)
|
|
1163
|
-
])) : createCommentVNode("", true)
|
|
1164
|
-
], 64))
|
|
1165
|
-
], 64)) : createCommentVNode("", true)
|
|
1318
|
+
quantityDisplay.value.kind === "raw" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
1319
|
+
createTextVNode(toDisplayString(quantityDisplay.value.value), 1)
|
|
1320
|
+
], 64)) : quantityDisplay.value.kind === "amount" ? (openBlock(), createBlock(_sfc_main$l, {
|
|
1321
|
+
key: 1,
|
|
1322
|
+
value: quantityDisplay.value.amount
|
|
1323
|
+
}, null, 8, ["value"])) : quantityDisplay.value.kind === "number" ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
1324
|
+
createTextVNode(toDisplayString(unref(formatNumber)(quantityDisplay.value.value)), 1)
|
|
1325
|
+
], 64)) : quantityDisplay.value.kind === "conversion-credits" ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
1326
|
+
createTextVNode(toDisplayString(unref(formatNumber)(+quantityDisplay.value.value, {
|
|
1327
|
+
maximumFractionDigits: unref(MAX_FRACTION_DIGITS)
|
|
1328
|
+
})), 1)
|
|
1329
|
+
], 64)) : quantityDisplay.value.kind === "one" ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [
|
|
1330
|
+
createTextVNode("1")
|
|
1331
|
+
], 64)) : createCommentVNode("", true),
|
|
1332
|
+
quantityDisplay.value.kind !== "conversion-credits" && quantityDisplay.value.kind !== "hidden" && !((_a = __props.details) == null ? void 0 : _a.price_bound) && availableIncludedVolume.value ? (openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
1333
|
+
availableIncludedVolume.value.type === "AMOUNT" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
1334
|
+
createVNode(_sfc_main$l, {
|
|
1335
|
+
value: availableIncludedVolume.value.amount
|
|
1336
|
+
}, null, 8, ["value"]),
|
|
1337
|
+
createTextVNode(" " + toDisplayString(unref($t)({
|
|
1338
|
+
id: "invoice.line.included",
|
|
1339
|
+
defaultMessage: "included",
|
|
1340
|
+
description: "Used to specify an included amount. Should be lowercase."
|
|
1341
|
+
})), 1)
|
|
1342
|
+
], 64)) : availableIncludedVolume.value.type === "NUMBER" ? (openBlock(), createElementBlock("span", _hoisted_2$3, toDisplayString(availableIncludedVolume.value.number) + " " + toDisplayString(unref($t)({
|
|
1343
|
+
id: "invoice.line.units_included",
|
|
1344
|
+
defaultMessage: "units included",
|
|
1345
|
+
description: "Used to specify an included units. Should be lowercase."
|
|
1346
|
+
})), 1)) : createCommentVNode("", true)
|
|
1347
|
+
])) : createCommentVNode("", true)
|
|
1166
1348
|
];
|
|
1167
1349
|
}),
|
|
1168
1350
|
_: 1
|
|
1169
1351
|
}),
|
|
1170
|
-
|
|
1352
|
+
priceDisplay.value.kind === "pass-through" ? (openBlock(), createBlock(_sfc_main$i, {
|
|
1171
1353
|
key: 0,
|
|
1172
1354
|
class: "text-right align-top"
|
|
1173
1355
|
}, {
|
|
@@ -1179,83 +1361,31 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
1179
1361
|
})), 1)
|
|
1180
1362
|
]),
|
|
1181
1363
|
_: 1
|
|
1182
|
-
})) : (openBlock(), createBlock(_sfc_main$
|
|
1364
|
+
})) : (openBlock(), createBlock(_sfc_main$i, {
|
|
1183
1365
|
key: 1,
|
|
1184
1366
|
number: "",
|
|
1185
1367
|
class: "align-top"
|
|
1186
1368
|
}, {
|
|
1187
1369
|
default: withCtx(() => {
|
|
1188
|
-
var _a, _b, _c, _d, _e
|
|
1370
|
+
var _a, _b, _c, _d, _e;
|
|
1189
1371
|
return [
|
|
1190
|
-
|
|
1191
|
-
(
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
], 64)) : ["NOT_HIT", "BELOW_MINIMUM_NUMBER", "ABOVE_MAXIMUM_NUMBER"].includes(
|
|
1203
|
-
(_h = __props.details) == null ? void 0 : _h.price_bound
|
|
1204
|
-
) ? (openBlock(), createElementBlock(Fragment, { key: 3 }, [
|
|
1205
|
-
((_i = __props.details) == null ? void 0 : _i.band) && __props.details.band.amount ? (openBlock(), createBlock(_sfc_main$k, {
|
|
1206
|
-
key: 0,
|
|
1207
|
-
value: __props.details.band.amount
|
|
1208
|
-
}, null, 8, ["value"])) : ((_j = __props.details) == null ? void 0 : _j.band) && "percentage" in __props.details.band ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
1209
|
-
createTextVNode(toDisplayString(__props.details.band.percentage) + "% ", 1)
|
|
1210
|
-
], 64)) : ((_k = __props.details) == null ? void 0 : _k.band) && __props.details.amount ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
1211
|
-
createVNode(_sfc_main$k, {
|
|
1212
|
-
value: __props.details.amount
|
|
1213
|
-
}, null, 8, ["value"]),
|
|
1214
|
-
createElementVNode("div", _hoisted_4$2, toDisplayString(unref($t)({
|
|
1215
|
-
id: "invoice.line.fixed_amount",
|
|
1216
|
-
defaultMessage: "Fixed amount",
|
|
1217
|
-
description: "Label shown when a price band charges a fixed amount regardless of usage"
|
|
1218
|
-
})), 1)
|
|
1219
|
-
], 64)) : createCommentVNode("", true)
|
|
1220
|
-
], 64)) : createCommentVNode("", true)
|
|
1221
|
-
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
1222
|
-
((_l = __props.details) == null ? void 0 : _l.band) && __props.details.band.amount ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
1223
|
-
createVNode(_sfc_main$k, {
|
|
1224
|
-
value: __props.details.band.amount
|
|
1225
|
-
}, null, 8, ["value"]),
|
|
1226
|
-
blockSizeUnitsLabel.value ? (openBlock(), createElementBlock("div", _hoisted_5$1, toDisplayString(blockSizeUnitsLabel.value), 1)) : __props.modelType !== "RECURRING" ? (openBlock(), createElementBlock("div", _hoisted_6$1, toDisplayString(unref($t)({
|
|
1227
|
-
id: "invoice.line.per_unit",
|
|
1228
|
-
defaultMessage: "Per unit",
|
|
1229
|
-
description: "Label shown when a price band applies per single unit"
|
|
1230
|
-
})), 1)) : createCommentVNode("", true)
|
|
1231
|
-
], 64)) : ((_m = __props.details) == null ? void 0 : _m.band) && "percentage" in __props.details.band ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
1232
|
-
createTextVNode(toDisplayString(__props.details.band.percentage) + "% ", 1)
|
|
1233
|
-
], 64)) : ((_n = __props.details) == null ? void 0 : _n.band) && __props.details.amount ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
1234
|
-
createVNode(_sfc_main$k, {
|
|
1235
|
-
value: __props.details.amount
|
|
1236
|
-
}, null, 8, ["value"]),
|
|
1237
|
-
__props.pricingType === "STAIR_STEP" || __props.pricingType === "STAIR_STEP_TOP_UP" ? (openBlock(), createElementBlock("div", _hoisted_7$1, toDisplayString(unref($t)({
|
|
1238
|
-
id: "invoice.line.fixed_amount",
|
|
1239
|
-
defaultMessage: "Fixed amount",
|
|
1240
|
-
description: "Label shown when a price band charges a fixed amount regardless of usage"
|
|
1241
|
-
})), 1)) : createCommentVNode("", true),
|
|
1242
|
-
__props.pricingType === "TOP_TIERED" ? (openBlock(), createElementBlock("div", _hoisted_8$1, toDisplayString(unref($t)({
|
|
1243
|
-
id: "invoice.line.per_unit",
|
|
1244
|
-
defaultMessage: "Per unit",
|
|
1245
|
-
description: "Label shown when a price band applies per single unit"
|
|
1246
|
-
})), 1)) : createCommentVNode("", true),
|
|
1247
|
-
__props.pricingType === "FLAT" ? (openBlock(), createElementBlock("div", _hoisted_9$1, toDisplayString(unref($t)({
|
|
1248
|
-
id: "invoice.line.flat_fee",
|
|
1249
|
-
defaultMessage: "Flat fee",
|
|
1250
|
-
description: "Label shown for a flat, usage-independent fee"
|
|
1251
|
-
})), 1)) : createCommentVNode("", true)
|
|
1252
|
-
], 64)) : createCommentVNode("", true)
|
|
1253
|
-
], 64))
|
|
1372
|
+
priceDisplay.value.kind === "amount" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
1373
|
+
createVNode(_sfc_main$l, {
|
|
1374
|
+
value: priceDisplay.value.amount
|
|
1375
|
+
}, null, 8, ["value"]),
|
|
1376
|
+
((_a = priceDisplay.value.suffix) == null ? void 0 : _a.kind) === "tier-top-bound" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
1377
|
+
tierTopBoundUnitsLabel.value ? (openBlock(), createElementBlock("div", _hoisted_3$2, toDisplayString(tierTopBoundUnitsLabel.value), 1)) : perSeatAmount.value ? (openBlock(), createElementBlock("div", _hoisted_4$2, toDisplayString(perUnitLabel.value), 1)) : createCommentVNode("", true)
|
|
1378
|
+
], 64)) : ((_b = priceDisplay.value.suffix) == null ? void 0 : _b.kind) === "block-size-or-per-unit" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
1379
|
+
blockSizeUnitsLabel.value ? (openBlock(), createElementBlock("div", _hoisted_5$1, toDisplayString(blockSizeUnitsLabel.value), 1)) : __props.modelType !== "RECURRING" ? (openBlock(), createElementBlock("div", _hoisted_6$1, toDisplayString(perUnitLabel.value), 1)) : createCommentVNode("", true)
|
|
1380
|
+
], 64)) : ((_c = priceDisplay.value.suffix) == null ? void 0 : _c.kind) === "per-unit" ? (openBlock(), createElementBlock("div", _hoisted_7$1, toDisplayString(perUnitLabel.value), 1)) : ((_d = priceDisplay.value.suffix) == null ? void 0 : _d.kind) === "fixed-amount" ? (openBlock(), createElementBlock("div", _hoisted_8$1, toDisplayString(fixedAmountLabel.value), 1)) : ((_e = priceDisplay.value.suffix) == null ? void 0 : _e.kind) === "flat-fee" ? (openBlock(), createElementBlock("div", _hoisted_9$1, toDisplayString(flatFeeLabel.value), 1)) : createCommentVNode("", true)
|
|
1381
|
+
], 64)) : priceDisplay.value.kind === "percentage" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
1382
|
+
createTextVNode(toDisplayString(priceDisplay.value.value) + "% ", 1)
|
|
1383
|
+
], 64)) : createCommentVNode("", true)
|
|
1254
1384
|
];
|
|
1255
1385
|
}),
|
|
1256
1386
|
_: 1
|
|
1257
1387
|
})),
|
|
1258
|
-
__props.showTaxPerLineItem ? (openBlock(), createBlock(_sfc_main$
|
|
1388
|
+
__props.showTaxPerLineItem ? (openBlock(), createBlock(_sfc_main$i, {
|
|
1259
1389
|
key: 2,
|
|
1260
1390
|
number: "",
|
|
1261
1391
|
class: "align-top"
|
|
@@ -1268,7 +1398,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
1268
1398
|
}, [
|
|
1269
1399
|
createElementVNode("div", null, toDisplayString(taxCategory.percentage) + "%", 1),
|
|
1270
1400
|
createElementVNode("div", _hoisted_10$1, [
|
|
1271
|
-
createVNode(_sfc_main$
|
|
1401
|
+
createVNode(_sfc_main$l, {
|
|
1272
1402
|
value: taxCategory.tax_amount
|
|
1273
1403
|
}, null, 8, ["value"])
|
|
1274
1404
|
])
|
|
@@ -1277,7 +1407,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
1277
1407
|
]),
|
|
1278
1408
|
_: 1
|
|
1279
1409
|
})) : createCommentVNode("", true),
|
|
1280
|
-
createVNode(_sfc_main$
|
|
1410
|
+
createVNode(_sfc_main$i, {
|
|
1281
1411
|
number: "",
|
|
1282
1412
|
class: "align-top"
|
|
1283
1413
|
}, {
|
|
@@ -1292,24 +1422,25 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
1292
1422
|
class: "inline-block"
|
|
1293
1423
|
}, [
|
|
1294
1424
|
createElementVNode("div", _hoisted_12$1, [
|
|
1295
|
-
createVNode(_sfc_main$
|
|
1296
|
-
value: __props.details.amount
|
|
1297
|
-
|
|
1298
|
-
|
|
1425
|
+
createVNode(_sfc_main$l, {
|
|
1426
|
+
value: __props.details.amount,
|
|
1427
|
+
"data-testid": unref(SUMMARY_LINE_AMOUNT)
|
|
1428
|
+
}, null, 8, ["value", "data-testid"]),
|
|
1429
|
+
((_a2 = __props.details) == null ? void 0 : _a2.pricing_amount.quantity) !== __props.details.amount.quantity ? (openBlock(), createBlock(_sfc_main$o, {
|
|
1299
1430
|
key: 0,
|
|
1300
1431
|
placement: "top-end"
|
|
1301
1432
|
}, {
|
|
1302
1433
|
tooltip: withCtx(() => [
|
|
1303
1434
|
createVNode(TooltipContent, null, {
|
|
1304
1435
|
default: withCtx(() => [
|
|
1305
|
-
createVNode(_sfc_main$
|
|
1436
|
+
createVNode(_sfc_main$p, null, {
|
|
1306
1437
|
default: withCtx(() => [
|
|
1307
1438
|
createTextVNode(toDisplayString(unref($t)({
|
|
1308
1439
|
id: "invoice.line.original_currency",
|
|
1309
1440
|
defaultMessage: "Original currency",
|
|
1310
1441
|
description: "Original currency"
|
|
1311
1442
|
})) + " ", 1),
|
|
1312
|
-
createVNode(_sfc_main$
|
|
1443
|
+
createVNode(_sfc_main$l, {
|
|
1313
1444
|
value: __props.details.pricing_amount,
|
|
1314
1445
|
class: "font-semibold"
|
|
1315
1446
|
}, null, 8, ["value"])
|
|
@@ -1321,7 +1452,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
1321
1452
|
})
|
|
1322
1453
|
]),
|
|
1323
1454
|
default: withCtx(() => [
|
|
1324
|
-
createVNode(_sfc_main$
|
|
1455
|
+
createVNode(_sfc_main$n, {
|
|
1325
1456
|
icon: "info",
|
|
1326
1457
|
size: "2xs"
|
|
1327
1458
|
})
|
|
@@ -1336,7 +1467,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
1336
1467
|
defaultMessage: "Excl. tax",
|
|
1337
1468
|
description: "Value excludes tax"
|
|
1338
1469
|
})) + " ", 1),
|
|
1339
|
-
createVNode(_sfc_main$
|
|
1470
|
+
createVNode(_sfc_main$l, {
|
|
1340
1471
|
value: taxCategory.base_amount
|
|
1341
1472
|
}, null, 8, ["value"])
|
|
1342
1473
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
@@ -1345,32 +1476,33 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
1345
1476
|
defaultMessage: "Incl. tax",
|
|
1346
1477
|
description: "Value includes tax"
|
|
1347
1478
|
})) + " ", 1),
|
|
1348
|
-
createVNode(_sfc_main$
|
|
1479
|
+
createVNode(_sfc_main$l, {
|
|
1349
1480
|
value: taxCategory.total_amount
|
|
1350
1481
|
}, null, 8, ["value"])
|
|
1351
1482
|
], 64))
|
|
1352
1483
|
])) : createCommentVNode("", true)
|
|
1353
1484
|
]);
|
|
1354
|
-
}), 128)) : (openBlock(), createElementBlock("div", _hoisted_14, [
|
|
1355
|
-
createElementVNode("div", _hoisted_15, [
|
|
1356
|
-
createVNode(_sfc_main$
|
|
1357
|
-
value: __props.details.amount
|
|
1358
|
-
|
|
1359
|
-
|
|
1485
|
+
}), 128)) : (openBlock(), createElementBlock("div", _hoisted_14$1, [
|
|
1486
|
+
createElementVNode("div", _hoisted_15$1, [
|
|
1487
|
+
createVNode(_sfc_main$l, {
|
|
1488
|
+
value: __props.details.amount,
|
|
1489
|
+
"data-testid": unref(SUMMARY_LINE_AMOUNT)
|
|
1490
|
+
}, null, 8, ["value", "data-testid"]),
|
|
1491
|
+
((_e = __props.details) == null ? void 0 : _e.pricing_amount.quantity) !== __props.details.amount.quantity ? (openBlock(), createBlock(_sfc_main$o, {
|
|
1360
1492
|
key: 0,
|
|
1361
1493
|
placement: "top-end"
|
|
1362
1494
|
}, {
|
|
1363
1495
|
tooltip: withCtx(() => [
|
|
1364
1496
|
createVNode(TooltipContent, null, {
|
|
1365
1497
|
default: withCtx(() => [
|
|
1366
|
-
createVNode(_sfc_main$
|
|
1498
|
+
createVNode(_sfc_main$p, null, {
|
|
1367
1499
|
default: withCtx(() => [
|
|
1368
1500
|
createTextVNode(toDisplayString(unref($t)({
|
|
1369
1501
|
id: "invoice.line.original_currency",
|
|
1370
1502
|
defaultMessage: "Original currency",
|
|
1371
1503
|
description: "Original currency"
|
|
1372
1504
|
})) + " ", 1),
|
|
1373
|
-
createVNode(_sfc_main$
|
|
1505
|
+
createVNode(_sfc_main$l, {
|
|
1374
1506
|
value: __props.details.pricing_amount,
|
|
1375
1507
|
class: "font-semibold"
|
|
1376
1508
|
}, null, 8, ["value"])
|
|
@@ -1382,7 +1514,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
1382
1514
|
})
|
|
1383
1515
|
]),
|
|
1384
1516
|
default: withCtx(() => [
|
|
1385
|
-
createVNode(_sfc_main$
|
|
1517
|
+
createVNode(_sfc_main$n, {
|
|
1386
1518
|
icon: "info",
|
|
1387
1519
|
size: "2xs"
|
|
1388
1520
|
})
|
|
@@ -1404,7 +1536,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
1404
1536
|
}
|
|
1405
1537
|
});
|
|
1406
1538
|
const _hoisted_1$6 = ["tabindex", "onClick"];
|
|
1407
|
-
const _sfc_main$
|
|
1539
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
1408
1540
|
__name: "InvoiceLineGroup",
|
|
1409
1541
|
props: {
|
|
1410
1542
|
group: {},
|
|
@@ -1414,7 +1546,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
1414
1546
|
amountType: {},
|
|
1415
1547
|
invoicePeriodOrder: {},
|
|
1416
1548
|
processingOnlyCustomers: {},
|
|
1417
|
-
|
|
1549
|
+
displayInvoiceSubLinesPerProcessingOnlyCustomer: { type: Boolean },
|
|
1550
|
+
showTaxPerLineItem: { type: Boolean, default: true },
|
|
1551
|
+
isExpandable: { type: Boolean, default: true }
|
|
1418
1552
|
},
|
|
1419
1553
|
setup(__props) {
|
|
1420
1554
|
const props = __props;
|
|
@@ -1435,9 +1569,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
1435
1569
|
createVNode(InvoiceTable, null, {
|
|
1436
1570
|
default: withCtx(() => [
|
|
1437
1571
|
createElementVNode("tr", null, [
|
|
1438
|
-
createVNode(_sfc_main$
|
|
1572
|
+
createVNode(_sfc_main$h, {
|
|
1439
1573
|
left: "",
|
|
1440
|
-
class: "w-1/5 text-
|
|
1574
|
+
class: "w-1/5 text-secondary"
|
|
1441
1575
|
}, {
|
|
1442
1576
|
default: withCtx(() => [
|
|
1443
1577
|
createTextVNode(toDisplayString(unref(intl).$t({
|
|
@@ -1448,9 +1582,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
1448
1582
|
]),
|
|
1449
1583
|
_: 1
|
|
1450
1584
|
}),
|
|
1451
|
-
createVNode(_sfc_main$
|
|
1585
|
+
createVNode(_sfc_main$h, {
|
|
1452
1586
|
right: "",
|
|
1453
|
-
class: "w-1/5 text-
|
|
1587
|
+
class: "w-1/5 text-secondary"
|
|
1454
1588
|
}, {
|
|
1455
1589
|
default: withCtx(() => [
|
|
1456
1590
|
createTextVNode(toDisplayString(unref(intl).$t({
|
|
@@ -1461,9 +1595,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
1461
1595
|
]),
|
|
1462
1596
|
_: 1
|
|
1463
1597
|
}),
|
|
1464
|
-
createVNode(_sfc_main$
|
|
1598
|
+
createVNode(_sfc_main$h, {
|
|
1465
1599
|
right: "",
|
|
1466
|
-
class: "w-1/5 text-
|
|
1600
|
+
class: "w-1/5 text-secondary"
|
|
1467
1601
|
}, {
|
|
1468
1602
|
default: withCtx(() => [
|
|
1469
1603
|
createTextVNode(toDisplayString(unref(intl).$t({
|
|
@@ -1474,10 +1608,10 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
1474
1608
|
]),
|
|
1475
1609
|
_: 1
|
|
1476
1610
|
}),
|
|
1477
|
-
__props.showTaxPerLineItem ? (openBlock(), createBlock(_sfc_main$
|
|
1611
|
+
__props.showTaxPerLineItem ? (openBlock(), createBlock(_sfc_main$h, {
|
|
1478
1612
|
key: 0,
|
|
1479
1613
|
right: "",
|
|
1480
|
-
class: "w-1/5 text-
|
|
1614
|
+
class: "w-1/5 text-secondary"
|
|
1481
1615
|
}, {
|
|
1482
1616
|
default: withCtx(() => [
|
|
1483
1617
|
createTextVNode(toDisplayString(unref(intl).$t({
|
|
@@ -1488,9 +1622,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
1488
1622
|
]),
|
|
1489
1623
|
_: 1
|
|
1490
1624
|
})) : createCommentVNode("", true),
|
|
1491
|
-
createVNode(_sfc_main$
|
|
1625
|
+
createVNode(_sfc_main$h, {
|
|
1492
1626
|
right: "",
|
|
1493
|
-
class: "w-1/5 text-
|
|
1627
|
+
class: "w-1/5 text-secondary"
|
|
1494
1628
|
}, {
|
|
1495
1629
|
default: withCtx(() => [
|
|
1496
1630
|
createTextVNode(toDisplayString(unref(intl).$t({
|
|
@@ -1505,14 +1639,16 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
1505
1639
|
(openBlock(true), createElementBlock(Fragment, null, renderList(sortedLines.value, (line, i) => {
|
|
1506
1640
|
return openBlock(), createElementBlock(Fragment, { key: i }, [
|
|
1507
1641
|
createElementVNode("tr", {
|
|
1508
|
-
tabindex: line.sub_lines ? 0 : void 0,
|
|
1509
|
-
class: normalizeClass(["group", {
|
|
1642
|
+
tabindex: __props.isExpandable && line.sub_lines ? 0 : void 0,
|
|
1643
|
+
class: normalizeClass(["group", {
|
|
1644
|
+
"cursor-pointer": __props.isExpandable && line.sub_lines,
|
|
1645
|
+
"border-t": i !== 0
|
|
1646
|
+
}]),
|
|
1510
1647
|
onClick: ($event) => toggleLine(__props.group.group_order, line["line_order"])
|
|
1511
1648
|
}, [
|
|
1512
|
-
(openBlock(), createBlock(_sfc_main$
|
|
1649
|
+
(openBlock(), createBlock(_sfc_main$9, {
|
|
1513
1650
|
key: i,
|
|
1514
1651
|
data: line,
|
|
1515
|
-
"is-first-in-group": i === 0,
|
|
1516
1652
|
"period-order": __props.invoicePeriodOrder,
|
|
1517
1653
|
"group-order": __props.group.group_order,
|
|
1518
1654
|
"is-last": i === sortedLines.value.length - 1,
|
|
@@ -1525,7 +1661,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
1525
1661
|
"line-content": withCtx((lineContentProps) => {
|
|
1526
1662
|
var _a, _b;
|
|
1527
1663
|
return [
|
|
1528
|
-
createVNode(_sfc_main$
|
|
1664
|
+
createVNode(_sfc_main$8, {
|
|
1529
1665
|
details: lineContentProps.details,
|
|
1530
1666
|
"pricing-type": line.pricing_type,
|
|
1531
1667
|
"tax-categories": line.tax_categories,
|
|
@@ -1546,13 +1682,14 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
1546
1682
|
];
|
|
1547
1683
|
}),
|
|
1548
1684
|
_: 2
|
|
1549
|
-
}, 1032, ["data", "
|
|
1685
|
+
}, 1032, ["data", "period-order", "group-order", "is-last", "group-type", "is-expanded"]))
|
|
1550
1686
|
], 10, _hoisted_1$6),
|
|
1551
|
-
createVNode(_sfc_main$
|
|
1687
|
+
createVNode(_sfc_main$g, {
|
|
1552
1688
|
ref_for: true,
|
|
1553
1689
|
ref: formatIndex(__props.group.group_order, line["line_order"]),
|
|
1554
1690
|
"sub-lines": line.sub_lines ?? [],
|
|
1555
1691
|
"processing-only-customers": __props.processingOnlyCustomers,
|
|
1692
|
+
"display-invoice-sub-lines-per-processing-only-customer": __props.displayInvoiceSubLinesPerProcessingOnlyCustomer,
|
|
1556
1693
|
"line-order": line["line_order"],
|
|
1557
1694
|
"is-open": unref(getIsOpen)(formatIndex(__props.group.group_order, line["line_order"])),
|
|
1558
1695
|
"period-order": __props.invoicePeriodOrder,
|
|
@@ -1565,9 +1702,10 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
1565
1702
|
"subline-content": withCtx((sublineContentProps) => {
|
|
1566
1703
|
var _a, _b;
|
|
1567
1704
|
return [
|
|
1568
|
-
createVNode(_sfc_main$
|
|
1705
|
+
createVNode(_sfc_main$8, {
|
|
1569
1706
|
details: sublineContentProps.details,
|
|
1570
1707
|
"hide-tax-details": sublineContentProps.hideTaxDetails,
|
|
1708
|
+
"prefer-conversion-credits": "",
|
|
1571
1709
|
"pricing-type": line.pricing_type,
|
|
1572
1710
|
"tax-categories": line.tax_categories,
|
|
1573
1711
|
"amount-type": __props.amountType,
|
|
@@ -1577,7 +1715,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
1577
1715
|
];
|
|
1578
1716
|
}),
|
|
1579
1717
|
_: 2
|
|
1580
|
-
}, 1032, ["sub-lines", "processing-only-customers", "line-order", "is-open", "period-order", "group-order", "show-tax-per-line-item"])
|
|
1718
|
+
}, 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"])
|
|
1581
1719
|
], 64);
|
|
1582
1720
|
}), 128))
|
|
1583
1721
|
]),
|
|
@@ -1592,7 +1730,7 @@ const _hoisted_2$2 = {
|
|
|
1592
1730
|
key: 2,
|
|
1593
1731
|
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"
|
|
1594
1732
|
};
|
|
1595
|
-
const _sfc_main$
|
|
1733
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
1596
1734
|
__name: "InvoiceTableRowLabel",
|
|
1597
1735
|
props: {
|
|
1598
1736
|
label: {},
|
|
@@ -1606,7 +1744,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
1606
1744
|
});
|
|
1607
1745
|
return (_ctx, _cache) => {
|
|
1608
1746
|
return openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
1609
|
-
isLabelCutOff.value ? (openBlock(), createBlock(_sfc_main$
|
|
1747
|
+
isLabelCutOff.value ? (openBlock(), createBlock(_sfc_main$o, {
|
|
1610
1748
|
key: 0,
|
|
1611
1749
|
placement: "bottom-start",
|
|
1612
1750
|
class: "min-w-0 leading-normal"
|
|
@@ -1614,7 +1752,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
1614
1752
|
tooltip: withCtx(() => [
|
|
1615
1753
|
createVNode(TooltipContent, null, {
|
|
1616
1754
|
default: withCtx(() => [
|
|
1617
|
-
createVNode(_sfc_main$
|
|
1755
|
+
createVNode(_sfc_main$p, null, {
|
|
1618
1756
|
default: withCtx(() => [
|
|
1619
1757
|
createTextVNode(toDisplayString(__props.label), 1)
|
|
1620
1758
|
]),
|
|
@@ -1650,7 +1788,7 @@ const _hoisted_3$1 = {
|
|
|
1650
1788
|
class: "p-0"
|
|
1651
1789
|
};
|
|
1652
1790
|
const _hoisted_4$1 = { class: "-mx-9 bg-gray-50 px-9 py-3 text-xs" };
|
|
1653
|
-
const _sfc_main$
|
|
1791
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
1654
1792
|
__name: "InvoiceGroupRevenue",
|
|
1655
1793
|
props: {
|
|
1656
1794
|
forwardedFromCustomers: {},
|
|
@@ -1662,8 +1800,10 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1662
1800
|
invoicePeriodOrder: {},
|
|
1663
1801
|
groupOrder: {},
|
|
1664
1802
|
isExpandable: { type: Boolean },
|
|
1803
|
+
forceExpanded: { type: Boolean },
|
|
1665
1804
|
amountType: {},
|
|
1666
1805
|
processingOnlyCustomers: {},
|
|
1806
|
+
displayInvoiceSubLinesPerProcessingOnlyCustomer: { type: Boolean },
|
|
1667
1807
|
showTaxPerLineItem: { type: Boolean, default: true }
|
|
1668
1808
|
},
|
|
1669
1809
|
setup(__props) {
|
|
@@ -1689,7 +1829,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1689
1829
|
return (_ctx, _cache) => {
|
|
1690
1830
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
1691
1831
|
createElementVNode("tr", {
|
|
1692
|
-
class: normalizeClass(["border-t", { "cursor-pointer": __props.isExpandable }]),
|
|
1832
|
+
class: normalizeClass(["border-t break-inside-avoid", { "cursor-pointer": __props.isExpandable }]),
|
|
1693
1833
|
tabindex: __props.isExpandable ? 0 : void 0,
|
|
1694
1834
|
onClick: _cache[0] || (_cache[0] = ($event) => __props.handleToggleItems(__props.formatIndex(__props.invoicePeriodOrder, __props.groupOrder))),
|
|
1695
1835
|
onKeyup: [
|
|
@@ -1697,11 +1837,11 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1697
1837
|
_cache[2] || (_cache[2] = withKeys(($event) => __props.handleToggleItems(__props.formatIndex(__props.invoicePeriodOrder, __props.groupOrder)), ["space"]))
|
|
1698
1838
|
]
|
|
1699
1839
|
}, [
|
|
1700
|
-
createVNode(_sfc_main$
|
|
1840
|
+
createVNode(_sfc_main$i, { class: "p-0" }, {
|
|
1701
1841
|
default: withCtx(() => {
|
|
1702
1842
|
var _a;
|
|
1703
1843
|
return [
|
|
1704
|
-
__props.isExpandable ? (openBlock(), createBlock(_sfc_main$
|
|
1844
|
+
__props.isExpandable ? (openBlock(), createBlock(_sfc_main$n, {
|
|
1705
1845
|
key: 0,
|
|
1706
1846
|
icon: "keyboard_arrow_down",
|
|
1707
1847
|
size: "md",
|
|
@@ -1711,7 +1851,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1711
1851
|
)
|
|
1712
1852
|
}])
|
|
1713
1853
|
}, null, 8, ["class"])) : createCommentVNode("", true),
|
|
1714
|
-
createVNode(_sfc_main$
|
|
1854
|
+
createVNode(_sfc_main$6, {
|
|
1715
1855
|
label: label.value,
|
|
1716
1856
|
count: __props.isExpandable ? ((_a = __props.group.lines) == null ? void 0 : _a.length) ?? 0 : void 0
|
|
1717
1857
|
}, null, 8, ["label", "count"])
|
|
@@ -1719,23 +1859,27 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1719
1859
|
}),
|
|
1720
1860
|
_: 1
|
|
1721
1861
|
}),
|
|
1722
|
-
createVNode(_sfc_main$
|
|
1862
|
+
createVNode(_sfc_main$i, { number: "" }, {
|
|
1723
1863
|
default: withCtx(() => [
|
|
1724
|
-
__props.amountType === "INCLUDING_TAX" ? (openBlock(), createBlock(_sfc_main$
|
|
1864
|
+
__props.amountType === "INCLUDING_TAX" ? (openBlock(), createBlock(_sfc_main$l, {
|
|
1725
1865
|
key: 0,
|
|
1726
|
-
value: __props.group.amount_including_tax
|
|
1727
|
-
|
|
1866
|
+
value: __props.group.amount_including_tax,
|
|
1867
|
+
"data-testid": unref(INVOICE_PERIOD_TOTAL),
|
|
1868
|
+
"data-type": unref(getInvoiceGroupAmountType)(__props.group)
|
|
1869
|
+
}, null, 8, ["value", "data-testid", "data-type"])) : (openBlock(), createBlock(_sfc_main$l, {
|
|
1728
1870
|
key: 1,
|
|
1729
|
-
value: __props.group.amount_excluding_tax
|
|
1730
|
-
|
|
1871
|
+
value: __props.group.amount_excluding_tax,
|
|
1872
|
+
"data-testid": unref(INVOICE_PERIOD_TOTAL),
|
|
1873
|
+
"data-type": unref(getInvoiceGroupAmountType)(__props.group)
|
|
1874
|
+
}, null, 8, ["value", "data-testid", "data-type"]))
|
|
1731
1875
|
]),
|
|
1732
1876
|
_: 1
|
|
1733
1877
|
})
|
|
1734
1878
|
], 42, _hoisted_1$4),
|
|
1735
|
-
__props.expandedItems.includes(__props.formatIndex(__props.invoicePeriodOrder, __props.groupOrder)) ? (openBlock(), createElementBlock("tr", _hoisted_2$1, [
|
|
1879
|
+
__props.forceExpanded || __props.expandedItems.includes(__props.formatIndex(__props.invoicePeriodOrder, __props.groupOrder)) ? (openBlock(), createElementBlock("tr", _hoisted_2$1, [
|
|
1736
1880
|
createElementVNode("td", _hoisted_3$1, [
|
|
1737
1881
|
createElementVNode("div", _hoisted_4$1, [
|
|
1738
|
-
createVNode(_sfc_main$
|
|
1882
|
+
createVNode(_sfc_main$7, {
|
|
1739
1883
|
"invoice-period-order": __props.invoicePeriodOrder,
|
|
1740
1884
|
"start-date": __props.group.start_at,
|
|
1741
1885
|
"end-date": __props.group.end_at,
|
|
@@ -1743,7 +1887,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1743
1887
|
group: __props.group,
|
|
1744
1888
|
"amount-type": __props.amountType,
|
|
1745
1889
|
"processing-only-customers": __props.processingOnlyCustomers,
|
|
1746
|
-
"
|
|
1890
|
+
"display-invoice-sub-lines-per-processing-only-customer": __props.displayInvoiceSubLinesPerProcessingOnlyCustomer,
|
|
1891
|
+
"show-tax-per-line-item": __props.showTaxPerLineItem,
|
|
1892
|
+
"is-expandable": __props.isExpandable
|
|
1747
1893
|
}, {
|
|
1748
1894
|
"invoice-line-prefix": withCtx((linePrefixProps) => [
|
|
1749
1895
|
renderSlot(_ctx.$slots, "invoice-line-prefix", normalizeProps(guardReactiveProps(linePrefixProps)))
|
|
@@ -1752,7 +1898,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1752
1898
|
renderSlot(_ctx.$slots, "one-off-line-context-menu", mergeProps(oneOffGroupProps, { groupOrder: __props.groupOrder }))
|
|
1753
1899
|
]),
|
|
1754
1900
|
_: 3
|
|
1755
|
-
}, 8, ["invoice-period-order", "start-date", "end-date", "total", "group", "amount-type", "processing-only-customers", "show-tax-per-line-item"])
|
|
1901
|
+
}, 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"])
|
|
1756
1902
|
])
|
|
1757
1903
|
])
|
|
1758
1904
|
])) : createCommentVNode("", true)
|
|
@@ -1760,6 +1906,155 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
1760
1906
|
};
|
|
1761
1907
|
}
|
|
1762
1908
|
});
|
|
1909
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
1910
|
+
__name: "InvoiceGroupWalletBalance",
|
|
1911
|
+
props: {
|
|
1912
|
+
lines: {},
|
|
1913
|
+
creditTypes: {}
|
|
1914
|
+
},
|
|
1915
|
+
setup(__props) {
|
|
1916
|
+
const props = __props;
|
|
1917
|
+
const { $t } = useIntl();
|
|
1918
|
+
const creditsLabel = computed(
|
|
1919
|
+
() => $t({
|
|
1920
|
+
defaultMessage: "Credits",
|
|
1921
|
+
description: "Generic fallback label for a wallet balance row with no known credit type",
|
|
1922
|
+
id: "invoiceGroupWalletBalance.creditsLabel"
|
|
1923
|
+
})
|
|
1924
|
+
);
|
|
1925
|
+
const creditTypesById = computed(
|
|
1926
|
+
() => (props.creditTypes ?? []).reduce((acc, creditType) => {
|
|
1927
|
+
acc[creditType.id] = creditType.name;
|
|
1928
|
+
return acc;
|
|
1929
|
+
}, {})
|
|
1930
|
+
);
|
|
1931
|
+
const getCreditTypeLabel = (credit) => {
|
|
1932
|
+
if (!(credit == null ? void 0 : credit.credit_type_id)) {
|
|
1933
|
+
return creditsLabel.value;
|
|
1934
|
+
}
|
|
1935
|
+
return creditTypesById.value[credit.credit_type_id] ?? credit.credit_type_id;
|
|
1936
|
+
};
|
|
1937
|
+
const walletBalanceRows = computed(() => {
|
|
1938
|
+
const seenRowKeys = /* @__PURE__ */ new Set();
|
|
1939
|
+
return (props.lines ?? []).map((line) => {
|
|
1940
|
+
var _a;
|
|
1941
|
+
return (_a = line.details) == null ? void 0 : _a.wallet_balance_details;
|
|
1942
|
+
}).filter((details) => !!details).map((details, index) => {
|
|
1943
|
+
var _a, _b, _c;
|
|
1944
|
+
const primaryCredit = [
|
|
1945
|
+
details.used_wallet_credits,
|
|
1946
|
+
details.left_wallet_credits,
|
|
1947
|
+
details.available_wallet_credits
|
|
1948
|
+
].find((credit) => Boolean(credit == null ? void 0 : credit.credit_type_id));
|
|
1949
|
+
return {
|
|
1950
|
+
key: `${(primaryCredit == null ? void 0 : primaryCredit.credit_type_id) ?? "credits"}-${index}`,
|
|
1951
|
+
label: getCreditTypeLabel(primaryCredit),
|
|
1952
|
+
available: ((_a = details.available_wallet_credits) == null ? void 0 : _a.quantity) ?? "-",
|
|
1953
|
+
used: ((_b = details.used_wallet_credits) == null ? void 0 : _b.quantity) ?? "-",
|
|
1954
|
+
left: ((_c = details.left_wallet_credits) == null ? void 0 : _c.quantity) ?? "-"
|
|
1955
|
+
};
|
|
1956
|
+
}).filter((row) => {
|
|
1957
|
+
const rowKey = `${row.label}-${row.available}-${row.used}-${row.left}`;
|
|
1958
|
+
if (seenRowKeys.has(rowKey)) {
|
|
1959
|
+
return false;
|
|
1960
|
+
}
|
|
1961
|
+
seenRowKeys.add(rowKey);
|
|
1962
|
+
return true;
|
|
1963
|
+
});
|
|
1964
|
+
});
|
|
1965
|
+
return (_ctx, _cache) => {
|
|
1966
|
+
return walletBalanceRows.value.length ? (openBlock(), createBlock(InvoiceTable, { key: 0 }, {
|
|
1967
|
+
default: withCtx(() => [
|
|
1968
|
+
createElementVNode("tr", null, [
|
|
1969
|
+
createVNode(_sfc_main$h, {
|
|
1970
|
+
left: "",
|
|
1971
|
+
class: "w-2/5 text-gray-400"
|
|
1972
|
+
}, {
|
|
1973
|
+
default: withCtx(() => [
|
|
1974
|
+
createTextVNode(toDisplayString(unref($t)({
|
|
1975
|
+
defaultMessage: "Credit breakdown",
|
|
1976
|
+
description: "Table heading for the credit-type column in the wallet balance table",
|
|
1977
|
+
id: "invoiceGroupWalletBalance.creditBreakdownHeading"
|
|
1978
|
+
})), 1)
|
|
1979
|
+
]),
|
|
1980
|
+
_: 1
|
|
1981
|
+
}),
|
|
1982
|
+
createVNode(_sfc_main$h, {
|
|
1983
|
+
right: "",
|
|
1984
|
+
class: "w-1/5 text-gray-400"
|
|
1985
|
+
}, {
|
|
1986
|
+
default: withCtx(() => [
|
|
1987
|
+
createTextVNode(toDisplayString(unref($t)({
|
|
1988
|
+
defaultMessage: "Available",
|
|
1989
|
+
description: "Table heading for the available-credits column in the wallet balance table",
|
|
1990
|
+
id: "invoiceGroupWalletBalance.availableHeading"
|
|
1991
|
+
})), 1)
|
|
1992
|
+
]),
|
|
1993
|
+
_: 1
|
|
1994
|
+
}),
|
|
1995
|
+
createVNode(_sfc_main$h, {
|
|
1996
|
+
right: "",
|
|
1997
|
+
class: "w-1/5 text-gray-400"
|
|
1998
|
+
}, {
|
|
1999
|
+
default: withCtx(() => [
|
|
2000
|
+
createTextVNode(toDisplayString(unref($t)({
|
|
2001
|
+
defaultMessage: "Used",
|
|
2002
|
+
description: "Table heading for the used-credits column in the wallet balance table",
|
|
2003
|
+
id: "invoiceGroupWalletBalance.usedHeading"
|
|
2004
|
+
})), 1)
|
|
2005
|
+
]),
|
|
2006
|
+
_: 1
|
|
2007
|
+
}),
|
|
2008
|
+
createVNode(_sfc_main$h, {
|
|
2009
|
+
right: "",
|
|
2010
|
+
class: "w-1/5 text-gray-400"
|
|
2011
|
+
}, {
|
|
2012
|
+
default: withCtx(() => [
|
|
2013
|
+
createTextVNode(toDisplayString(unref($t)({
|
|
2014
|
+
defaultMessage: "Left",
|
|
2015
|
+
description: "Table heading for the remaining-credits column in the wallet balance table",
|
|
2016
|
+
id: "invoiceGroupWalletBalance.leftHeading"
|
|
2017
|
+
})), 1)
|
|
2018
|
+
]),
|
|
2019
|
+
_: 1
|
|
2020
|
+
})
|
|
2021
|
+
]),
|
|
2022
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(walletBalanceRows.value, (row) => {
|
|
2023
|
+
return openBlock(), createElementBlock("tr", {
|
|
2024
|
+
key: row.key
|
|
2025
|
+
}, [
|
|
2026
|
+
createVNode(_sfc_main$i, null, {
|
|
2027
|
+
default: withCtx(() => [
|
|
2028
|
+
createTextVNode(toDisplayString(row.label), 1)
|
|
2029
|
+
]),
|
|
2030
|
+
_: 2
|
|
2031
|
+
}, 1024),
|
|
2032
|
+
createVNode(_sfc_main$i, { number: "" }, {
|
|
2033
|
+
default: withCtx(() => [
|
|
2034
|
+
createTextVNode(toDisplayString(row.available), 1)
|
|
2035
|
+
]),
|
|
2036
|
+
_: 2
|
|
2037
|
+
}, 1024),
|
|
2038
|
+
createVNode(_sfc_main$i, { number: "" }, {
|
|
2039
|
+
default: withCtx(() => [
|
|
2040
|
+
createTextVNode(toDisplayString(row.used), 1)
|
|
2041
|
+
]),
|
|
2042
|
+
_: 2
|
|
2043
|
+
}, 1024),
|
|
2044
|
+
createVNode(_sfc_main$i, { number: "" }, {
|
|
2045
|
+
default: withCtx(() => [
|
|
2046
|
+
createTextVNode(toDisplayString(row.left), 1)
|
|
2047
|
+
]),
|
|
2048
|
+
_: 2
|
|
2049
|
+
}, 1024)
|
|
2050
|
+
]);
|
|
2051
|
+
}), 128))
|
|
2052
|
+
]),
|
|
2053
|
+
_: 1
|
|
2054
|
+
})) : createCommentVNode("", true);
|
|
2055
|
+
};
|
|
2056
|
+
}
|
|
2057
|
+
});
|
|
1763
2058
|
function toValue(r) {
|
|
1764
2059
|
return typeof r === "function" ? r() : unref(r);
|
|
1765
2060
|
}
|
|
@@ -1789,7 +2084,7 @@ function useToggle(initialValue = false, options = {}) {
|
|
|
1789
2084
|
const _hoisted_1$3 = {
|
|
1790
2085
|
key: 0,
|
|
1791
2086
|
totals: "",
|
|
1792
|
-
class: "border-t"
|
|
2087
|
+
class: "border-t break-inside-avoid"
|
|
1793
2088
|
};
|
|
1794
2089
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
1795
2090
|
__name: "InvoiceSummaryTotalExcludingTax",
|
|
@@ -1800,7 +2095,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1800
2095
|
const intl = useIntl();
|
|
1801
2096
|
return (_ctx, _cache) => {
|
|
1802
2097
|
return __props.baseAmount ? (openBlock(), createElementBlock("tr", _hoisted_1$3, [
|
|
1803
|
-
createVNode(_sfc_main$
|
|
2098
|
+
createVNode(_sfc_main$i, null, {
|
|
1804
2099
|
default: withCtx(() => [
|
|
1805
2100
|
createTextVNode(toDisplayString(unref(intl).$t({
|
|
1806
2101
|
id: "invoice.table_header.total_excluding_taxes",
|
|
@@ -1810,9 +2105,12 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1810
2105
|
]),
|
|
1811
2106
|
_: 1
|
|
1812
2107
|
}),
|
|
1813
|
-
createVNode(_sfc_main$
|
|
2108
|
+
createVNode(_sfc_main$i, { number: "" }, {
|
|
1814
2109
|
default: withCtx(() => [
|
|
1815
|
-
createVNode(_sfc_main$
|
|
2110
|
+
createVNode(_sfc_main$l, {
|
|
2111
|
+
value: __props.baseAmount,
|
|
2112
|
+
"data-testid": unref(SUMMARY_TOTAL_EXCLUDING_TAX)
|
|
2113
|
+
}, null, 8, ["value", "data-testid"])
|
|
1816
2114
|
]),
|
|
1817
2115
|
_: 1
|
|
1818
2116
|
})
|
|
@@ -1822,7 +2120,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
1822
2120
|
});
|
|
1823
2121
|
const _hoisted_1$2 = {
|
|
1824
2122
|
key: 0,
|
|
1825
|
-
class: "border-t font-bold"
|
|
2123
|
+
class: "border-t font-bold break-inside-avoid"
|
|
1826
2124
|
};
|
|
1827
2125
|
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
1828
2126
|
__name: "InvoiceSummaryTotalIncludingTax",
|
|
@@ -1834,7 +2132,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1834
2132
|
const intl = useIntl();
|
|
1835
2133
|
return (_ctx, _cache) => {
|
|
1836
2134
|
return __props.totalAmount ? (openBlock(), createElementBlock("tr", _hoisted_1$2, [
|
|
1837
|
-
createVNode(_sfc_main$
|
|
2135
|
+
createVNode(_sfc_main$i, { class: "font-bold" }, {
|
|
1838
2136
|
default: withCtx(() => [
|
|
1839
2137
|
createTextVNode(toDisplayString(__props.isCustomerFacing ? unref(intl).$t({
|
|
1840
2138
|
id: "invoice.table_header.total_including_taxes_customer_facing",
|
|
@@ -1848,9 +2146,12 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1848
2146
|
]),
|
|
1849
2147
|
_: 1
|
|
1850
2148
|
}),
|
|
1851
|
-
createVNode(_sfc_main$
|
|
2149
|
+
createVNode(_sfc_main$i, { number: "" }, {
|
|
1852
2150
|
default: withCtx(() => [
|
|
1853
|
-
createVNode(_sfc_main$
|
|
2151
|
+
createVNode(_sfc_main$l, {
|
|
2152
|
+
value: __props.totalAmount,
|
|
2153
|
+
"data-testid": unref(SUMMARY_TOTAL_INCLUDING_TAX)
|
|
2154
|
+
}, null, 8, ["value", "data-testid"])
|
|
1854
2155
|
]),
|
|
1855
2156
|
_: 1
|
|
1856
2157
|
})
|
|
@@ -1874,7 +2175,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1874
2175
|
return openBlock(), createBlock(InvoiceTable, { class: "table-fixed" }, {
|
|
1875
2176
|
default: withCtx(() => [
|
|
1876
2177
|
createElementVNode("tr", null, [
|
|
1877
|
-
createVNode(_sfc_main$
|
|
2178
|
+
createVNode(_sfc_main$h, { left: "" }, {
|
|
1878
2179
|
default: withCtx(() => [
|
|
1879
2180
|
createTextVNode(toDisplayString(unref(intl).$t({
|
|
1880
2181
|
id: "invoice.table_header.tax type",
|
|
@@ -1884,7 +2185,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1884
2185
|
]),
|
|
1885
2186
|
_: 1
|
|
1886
2187
|
}),
|
|
1887
|
-
createVNode(_sfc_main$
|
|
2188
|
+
createVNode(_sfc_main$h, { right: "" }, {
|
|
1888
2189
|
default: withCtx(() => [
|
|
1889
2190
|
createTextVNode(toDisplayString(unref(intl).$t({
|
|
1890
2191
|
id: "invoice.table_header.base amount",
|
|
@@ -1894,7 +2195,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1894
2195
|
]),
|
|
1895
2196
|
_: 1
|
|
1896
2197
|
}),
|
|
1897
|
-
createVNode(_sfc_main$
|
|
2198
|
+
createVNode(_sfc_main$h, { right: "" }, {
|
|
1898
2199
|
default: withCtx(() => [
|
|
1899
2200
|
createTextVNode(toDisplayString(unref(intl).$t({
|
|
1900
2201
|
id: "invoice.table_header.tax_percentage",
|
|
@@ -1904,7 +2205,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1904
2205
|
]),
|
|
1905
2206
|
_: 1
|
|
1906
2207
|
}),
|
|
1907
|
-
createVNode(_sfc_main$
|
|
2208
|
+
createVNode(_sfc_main$h, { right: "" }, {
|
|
1908
2209
|
default: withCtx(() => [
|
|
1909
2210
|
createTextVNode(toDisplayString(unref(intl).$t({
|
|
1910
2211
|
id: "invoice.table_header.tax amount",
|
|
@@ -1922,29 +2223,29 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1922
2223
|
default: withCtx(() => [
|
|
1923
2224
|
(openBlock(true), createElementBlock(Fragment, null, renderList(taxCategory.rates, (rate, rateIndex) => {
|
|
1924
2225
|
return openBlock(), createElementBlock("tr", { key: rateIndex }, [
|
|
1925
|
-
createVNode(_sfc_main$
|
|
2226
|
+
createVNode(_sfc_main$i, null, {
|
|
1926
2227
|
default: withCtx(() => [
|
|
1927
2228
|
createTextVNode(toDisplayString(rate.name) + " (" + toDisplayString(taxCategory.category) + ") ", 1)
|
|
1928
2229
|
]),
|
|
1929
2230
|
_: 2
|
|
1930
2231
|
}, 1024),
|
|
1931
|
-
createVNode(_sfc_main$
|
|
2232
|
+
createVNode(_sfc_main$i, { number: "" }, {
|
|
1932
2233
|
default: withCtx(() => [
|
|
1933
|
-
createVNode(_sfc_main$
|
|
2234
|
+
createVNode(_sfc_main$l, {
|
|
1934
2235
|
value: taxCategory.base_amount
|
|
1935
2236
|
}, null, 8, ["value"])
|
|
1936
2237
|
]),
|
|
1937
2238
|
_: 2
|
|
1938
2239
|
}, 1024),
|
|
1939
|
-
createVNode(_sfc_main$
|
|
2240
|
+
createVNode(_sfc_main$i, { number: "" }, {
|
|
1940
2241
|
default: withCtx(() => [
|
|
1941
2242
|
createTextVNode(toDisplayString(rate.percentage) + "%", 1)
|
|
1942
2243
|
]),
|
|
1943
2244
|
_: 2
|
|
1944
2245
|
}, 1024),
|
|
1945
|
-
createVNode(_sfc_main$
|
|
2246
|
+
createVNode(_sfc_main$i, { number: "" }, {
|
|
1946
2247
|
default: withCtx(() => [
|
|
1947
|
-
createVNode(_sfc_main$
|
|
2248
|
+
createVNode(_sfc_main$l, {
|
|
1948
2249
|
value: rate.tax_amount
|
|
1949
2250
|
}, null, 8, ["value"])
|
|
1950
2251
|
]),
|
|
@@ -1956,29 +2257,29 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
1956
2257
|
_: 2
|
|
1957
2258
|
}, 1024)
|
|
1958
2259
|
])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
1959
|
-
createVNode(_sfc_main$
|
|
2260
|
+
createVNode(_sfc_main$i, null, {
|
|
1960
2261
|
default: withCtx(() => [
|
|
1961
2262
|
createTextVNode(toDisplayString(taxCategory.name) + " (" + toDisplayString(taxCategory.category) + ") ", 1)
|
|
1962
2263
|
]),
|
|
1963
2264
|
_: 2
|
|
1964
2265
|
}, 1024),
|
|
1965
|
-
createVNode(_sfc_main$
|
|
2266
|
+
createVNode(_sfc_main$i, { number: "" }, {
|
|
1966
2267
|
default: withCtx(() => [
|
|
1967
|
-
createVNode(_sfc_main$
|
|
2268
|
+
createVNode(_sfc_main$l, {
|
|
1968
2269
|
value: taxCategory.base_amount
|
|
1969
2270
|
}, null, 8, ["value"])
|
|
1970
2271
|
]),
|
|
1971
2272
|
_: 2
|
|
1972
2273
|
}, 1024),
|
|
1973
|
-
createVNode(_sfc_main$
|
|
2274
|
+
createVNode(_sfc_main$i, { number: "" }, {
|
|
1974
2275
|
default: withCtx(() => [
|
|
1975
2276
|
createTextVNode(toDisplayString(taxCategory.percentage) + "%", 1)
|
|
1976
2277
|
]),
|
|
1977
2278
|
_: 2
|
|
1978
2279
|
}, 1024),
|
|
1979
|
-
createVNode(_sfc_main$
|
|
2280
|
+
createVNode(_sfc_main$i, { number: "" }, {
|
|
1980
2281
|
default: withCtx(() => [
|
|
1981
|
-
createVNode(_sfc_main$
|
|
2282
|
+
createVNode(_sfc_main$l, {
|
|
1982
2283
|
value: taxCategory.tax_amount
|
|
1983
2284
|
}, null, 8, ["value"])
|
|
1984
2285
|
]),
|
|
@@ -2000,33 +2301,48 @@ const _hoisted_2 = {
|
|
|
2000
2301
|
};
|
|
2001
2302
|
const _hoisted_3 = { class: "flex flex-col gap-2" };
|
|
2002
2303
|
const _hoisted_4 = { key: 0 };
|
|
2003
|
-
const _hoisted_5 =
|
|
2004
|
-
const _hoisted_6 = {
|
|
2005
|
-
const _hoisted_7 = {
|
|
2304
|
+
const _hoisted_5 = { key: 3 };
|
|
2305
|
+
const _hoisted_6 = {
|
|
2006
2306
|
colspan: "2",
|
|
2007
2307
|
class: "p-0"
|
|
2008
2308
|
};
|
|
2009
|
-
const
|
|
2010
|
-
const
|
|
2011
|
-
const
|
|
2012
|
-
const _hoisted_11 = {
|
|
2309
|
+
const _hoisted_7 = ["tabindex"];
|
|
2310
|
+
const _hoisted_8 = { key: 1 };
|
|
2311
|
+
const _hoisted_9 = {
|
|
2013
2312
|
colspan: "2",
|
|
2014
2313
|
class: "p-0"
|
|
2015
2314
|
};
|
|
2016
|
-
const
|
|
2315
|
+
const _hoisted_10 = { class: "-mx-9 bg-gray-50 px-9 py-3 text-xs" };
|
|
2316
|
+
const _hoisted_11 = ["tabindex", "onClick", "onKeyup"];
|
|
2317
|
+
const _hoisted_12 = { key: 0 };
|
|
2017
2318
|
const _hoisted_13 = {
|
|
2319
|
+
colspan: "2",
|
|
2320
|
+
class: "p-0"
|
|
2321
|
+
};
|
|
2322
|
+
const _hoisted_14 = { class: "-mx-9 bg-gray-50 px-9 py-3 text-xs" };
|
|
2323
|
+
const _hoisted_15 = { key: 1 };
|
|
2324
|
+
const _hoisted_16 = {
|
|
2325
|
+
colspan: "2",
|
|
2326
|
+
class: "p-0"
|
|
2327
|
+
};
|
|
2328
|
+
const _hoisted_17 = {
|
|
2018
2329
|
key: 0,
|
|
2019
|
-
class: "border-t font-bold"
|
|
2330
|
+
class: "break-inside-avoid border-t font-bold"
|
|
2020
2331
|
};
|
|
2021
2332
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
2022
2333
|
__name: "InvoiceSummary",
|
|
2023
2334
|
props: {
|
|
2024
2335
|
invoice: {},
|
|
2025
2336
|
isExpandable: { type: Boolean, default: false },
|
|
2337
|
+
forceExpanded: { type: Boolean, default: false },
|
|
2338
|
+
heading: { default: "details" },
|
|
2026
2339
|
isInvoiceLineCreatable: { type: Boolean, default: false },
|
|
2027
2340
|
isNoteCreatable: { type: Boolean, default: false },
|
|
2028
2341
|
showRenderedServicesHeader: { type: Boolean, default: true },
|
|
2029
|
-
isCustomerFacing: { type: Boolean }
|
|
2342
|
+
isCustomerFacing: { type: Boolean },
|
|
2343
|
+
showTotals: { type: Boolean, default: true },
|
|
2344
|
+
hideOneOffCreditBreakdown: { type: Boolean, default: false },
|
|
2345
|
+
showWalletBalance: { type: Boolean, default: true }
|
|
2030
2346
|
},
|
|
2031
2347
|
emits: ["add-invoice-line", "add-note"],
|
|
2032
2348
|
setup(__props, { emit: __emit }) {
|
|
@@ -2116,6 +2432,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2116
2432
|
}
|
|
2117
2433
|
return group.description ?? "";
|
|
2118
2434
|
};
|
|
2435
|
+
const groupHasWalletBalance = (group) => props.showWalletBalance && !(props.hideOneOffCreditBreakdown && group.type === "ONE_OFF") && (group.lines ?? []).some((line) => {
|
|
2436
|
+
var _a;
|
|
2437
|
+
return !!((_a = line.details) == null ? void 0 : _a.wallet_balance_details);
|
|
2438
|
+
});
|
|
2119
2439
|
const getInvoiceGroupsByType = (invoicePeriod) => {
|
|
2120
2440
|
return invoicePeriod.groups.reduce(
|
|
2121
2441
|
(acc, invoiceGroup) => {
|
|
@@ -2156,35 +2476,67 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2156
2476
|
return result;
|
|
2157
2477
|
});
|
|
2158
2478
|
const showTaxPerLineItem = computed(() => props.invoice.show_tax_per_line_item !== false);
|
|
2479
|
+
const sectionTitle = computed(() => {
|
|
2480
|
+
if (props.heading === "summary") {
|
|
2481
|
+
return intl.$t({
|
|
2482
|
+
id: "invoice.summaryTitle",
|
|
2483
|
+
defaultMessage: "Invoice summary",
|
|
2484
|
+
description: "Title for the compact, always-shown invoice summary section"
|
|
2485
|
+
});
|
|
2486
|
+
}
|
|
2487
|
+
switch (props.invoice.type) {
|
|
2488
|
+
case "CREDIT":
|
|
2489
|
+
return intl.$t({
|
|
2490
|
+
id: "invoice.creditDetailsTitle",
|
|
2491
|
+
defaultMessage: "Credit details",
|
|
2492
|
+
description: "Title for the invoice summary of a credit-note invoice"
|
|
2493
|
+
});
|
|
2494
|
+
case "ONE_OFF":
|
|
2495
|
+
return intl.$t({
|
|
2496
|
+
id: "invoice.oneOffDetailsTitle",
|
|
2497
|
+
defaultMessage: "One-off details",
|
|
2498
|
+
description: "Title for the invoice summary of a one-off invoice"
|
|
2499
|
+
});
|
|
2500
|
+
case "ONE_OFF_CREDIT":
|
|
2501
|
+
return intl.$t({
|
|
2502
|
+
id: "invoice.oneOffCreditDetailsTitle",
|
|
2503
|
+
defaultMessage: "One-off credit details",
|
|
2504
|
+
description: "Title for the invoice summary of a one-off credit-note invoice"
|
|
2505
|
+
});
|
|
2506
|
+
default:
|
|
2507
|
+
return intl.$t({
|
|
2508
|
+
id: "invoice.title",
|
|
2509
|
+
defaultMessage: "Details",
|
|
2510
|
+
description: "Title for the invoice summary"
|
|
2511
|
+
});
|
|
2512
|
+
}
|
|
2513
|
+
});
|
|
2159
2514
|
return (_ctx, _cache) => {
|
|
2160
2515
|
var _a;
|
|
2161
2516
|
return openBlock(), createElementBlock("div", null, [
|
|
2162
2517
|
createElementVNode("div", _hoisted_1, [
|
|
2163
2518
|
_ctx.$slots.logo ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
2164
2519
|
renderSlot(_ctx.$slots, "logo")
|
|
2165
|
-
])) : (openBlock(), createBlock(_sfc_main$
|
|
2520
|
+
])) : (openBlock(), createBlock(_sfc_main$q, {
|
|
2166
2521
|
key: 1,
|
|
2167
|
-
title:
|
|
2168
|
-
id: "invoice.title",
|
|
2169
|
-
defaultMessage: "Details",
|
|
2170
|
-
description: "Title for the invoice summary"
|
|
2171
|
-
}),
|
|
2522
|
+
title: sectionTitle.value,
|
|
2172
2523
|
variant: "neutral",
|
|
2173
|
-
icon: "draft"
|
|
2524
|
+
icon: "draft",
|
|
2525
|
+
"icon-class": "print:hidden",
|
|
2526
|
+
"title-class": "print:text-sm"
|
|
2174
2527
|
}, null, 8, ["title"])),
|
|
2175
2528
|
_ctx.$slots.intro ? renderSlot(_ctx.$slots, "intro", {}, void 0, void 0, 2) : createCommentVNode("", true),
|
|
2176
2529
|
createElementVNode("div", _hoisted_3, [
|
|
2177
|
-
((_a = addInvoiceContextMenuItems.value) == null ? void 0 : _a.length) ? (openBlock(), createBlock(
|
|
2530
|
+
((_a = addInvoiceContextMenuItems.value) == null ? void 0 : _a.length) ? (openBlock(), createBlock(_sfc_main$r, {
|
|
2178
2531
|
key: 0,
|
|
2179
2532
|
items: addInvoiceContextMenuItems.value,
|
|
2180
2533
|
width: "auto"
|
|
2181
2534
|
}, {
|
|
2182
2535
|
trigger: withCtx(() => [
|
|
2183
|
-
createVNode(
|
|
2536
|
+
createVNode(_sfc_main$s, {
|
|
2184
2537
|
"icon-prefix": "add",
|
|
2185
2538
|
size: "sm",
|
|
2186
|
-
|
|
2187
|
-
color: "gray"
|
|
2539
|
+
intent: "secondary"
|
|
2188
2540
|
}, {
|
|
2189
2541
|
default: withCtx(() => [
|
|
2190
2542
|
createTextVNode(toDisplayString(unref(formatMessage)({
|
|
@@ -2205,12 +2557,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2205
2557
|
renderSlot(_ctx.$slots, "notes"),
|
|
2206
2558
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.invoice.periods, (invoicePeriod, invoicePeriodIndex) => {
|
|
2207
2559
|
return openBlock(), createElementBlock(Fragment, { key: invoicePeriodIndex }, [
|
|
2208
|
-
__props.showRenderedServicesHeader ? (openBlock(), createBlock(_sfc_main$
|
|
2560
|
+
__props.showRenderedServicesHeader ? (openBlock(), createBlock(_sfc_main$t, {
|
|
2209
2561
|
key: 0,
|
|
2210
2562
|
class: "mt-6"
|
|
2211
2563
|
}, {
|
|
2212
2564
|
default: withCtx(() => [
|
|
2213
|
-
createVNode(_sfc_main$
|
|
2565
|
+
createVNode(_sfc_main$u, {
|
|
2214
2566
|
tag: "h2",
|
|
2215
2567
|
variant: "caps-heading"
|
|
2216
2568
|
}, {
|
|
@@ -2224,7 +2576,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2224
2576
|
}, 1024)) : createCommentVNode("", true),
|
|
2225
2577
|
invoicePeriod.groups ? (openBlock(), createBlock(InvoiceTable, {
|
|
2226
2578
|
key: 1,
|
|
2227
|
-
class: normalizeClass({ "mt-3": __props.showRenderedServicesHeader })
|
|
2579
|
+
class: normalizeClass({ "mt-3": __props.showRenderedServicesHeader }),
|
|
2580
|
+
"data-testid": unref(INVOICE_PERIOD)
|
|
2228
2581
|
}, {
|
|
2229
2582
|
default: withCtx(() => [
|
|
2230
2583
|
(openBlock(true), createElementBlock(Fragment, null, renderList(Object.entries(
|
|
@@ -2237,18 +2590,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2237
2590
|
], -1)
|
|
2238
2591
|
])])) : createCommentVNode("", true),
|
|
2239
2592
|
createElementVNode("tr", null, [
|
|
2240
|
-
createVNode(_sfc_main$
|
|
2593
|
+
createVNode(_sfc_main$h, {
|
|
2241
2594
|
left: "",
|
|
2242
|
-
class: "text-
|
|
2595
|
+
class: "text-secondary"
|
|
2243
2596
|
}, {
|
|
2244
2597
|
default: withCtx(() => [
|
|
2245
2598
|
createTextVNode(toDisplayString(getTableHeading(groupType)), 1)
|
|
2246
2599
|
]),
|
|
2247
2600
|
_: 2
|
|
2248
2601
|
}, 1024),
|
|
2249
|
-
createVNode(_sfc_main$
|
|
2602
|
+
createVNode(_sfc_main$h, {
|
|
2250
2603
|
right: "",
|
|
2251
|
-
class: "text-
|
|
2604
|
+
class: "w-28 text-secondary"
|
|
2252
2605
|
}, {
|
|
2253
2606
|
default: withCtx(() => [
|
|
2254
2607
|
createTextVNode(toDisplayString(unref(intl).$t({
|
|
@@ -2262,17 +2615,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2262
2615
|
]),
|
|
2263
2616
|
(openBlock(true), createElementBlock(Fragment, null, renderList(groups, (group, groupIndex) => {
|
|
2264
2617
|
return openBlock(), createElementBlock(Fragment, { key: groupIndex }, [
|
|
2265
|
-
groupType === "REVENUE" || groupType === "PRICING" || groupType === "ONE_OFF" ? (openBlock(), createBlock(_sfc_main$
|
|
2618
|
+
groupType === "REVENUE" || groupType === "PRICING" || groupType === "ONE_OFF" ? (openBlock(), createBlock(_sfc_main$5, {
|
|
2266
2619
|
key: 0,
|
|
2267
2620
|
group,
|
|
2268
2621
|
"expanded-items": unref(expandedItems),
|
|
2269
2622
|
"handle-toggle-items": handleToggleItems,
|
|
2270
2623
|
"is-expandable": __props.isExpandable,
|
|
2624
|
+
"force-expanded": __props.forceExpanded,
|
|
2271
2625
|
"format-index": formatIndex,
|
|
2272
2626
|
"invoice-period-order": invoicePeriod.period_order,
|
|
2273
2627
|
"group-order": group.group_order,
|
|
2274
2628
|
"amount-type": __props.invoice.pricing_amount_type,
|
|
2275
2629
|
"processing-only-customers": __props.invoice.processing_only_customers,
|
|
2630
|
+
"display-invoice-sub-lines-per-processing-only-customer": __props.invoice.display_invoice_sub_lines_per_processing_only_customer,
|
|
2276
2631
|
"show-tax-per-line-item": showTaxPerLineItem.value,
|
|
2277
2632
|
"forwarded-from-customers": __props.invoice.forwarded_from_customers,
|
|
2278
2633
|
"show-original-customer-invoice-line": __props.invoice.show_original_customer_invoice_line
|
|
@@ -2286,12 +2641,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2286
2641
|
}))
|
|
2287
2642
|
]),
|
|
2288
2643
|
_: 2
|
|
2289
|
-
}, 1032, ["group", "expanded-items", "is-expandable", "invoice-period-order", "group-order", "amount-type", "processing-only-customers", "show-tax-per-line-item", "forwarded-from-customers", "show-original-customer-invoice-line"])) : groupType === "DISCOUNT" || groupType === "MARKUP" ? (openBlock(), createBlock(_sfc_main$
|
|
2644
|
+
}, 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"])) : groupType === "DISCOUNT" || groupType === "MARKUP" ? (openBlock(), createBlock(_sfc_main$a, {
|
|
2290
2645
|
key: 1,
|
|
2291
2646
|
group,
|
|
2292
2647
|
"expanded-items": unref(expandedItems),
|
|
2293
2648
|
"handle-toggle-items": handleToggleItems,
|
|
2294
2649
|
"is-expandable": __props.isExpandable,
|
|
2650
|
+
"force-expanded": __props.forceExpanded,
|
|
2295
2651
|
"format-index": formatIndex,
|
|
2296
2652
|
"invoice-period-order": invoicePeriod.period_order,
|
|
2297
2653
|
"group-order": group.group_order,
|
|
@@ -2310,12 +2666,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2310
2666
|
renderSlot(_ctx.$slots, "invoice-line-prefix", mergeProps({ ref_for: true }, linePrefixProps))
|
|
2311
2667
|
]),
|
|
2312
2668
|
_: 3
|
|
2313
|
-
}, 8, ["group", "expanded-items", "is-expandable", "invoice-period-order", "group-order", "amount-type", "heading"])) : groupType === "COMMITMENT" ? (openBlock(), createBlock(_sfc_main$
|
|
2669
|
+
}, 8, ["group", "expanded-items", "is-expandable", "force-expanded", "invoice-period-order", "group-order", "amount-type", "heading"])) : groupType === "COMMITMENT" ? (openBlock(), createBlock(_sfc_main$b, {
|
|
2314
2670
|
key: 2,
|
|
2315
2671
|
group,
|
|
2316
2672
|
"expanded-items": unref(expandedItems),
|
|
2317
2673
|
"handle-toggle-items": handleToggleItems,
|
|
2318
2674
|
"is-expandable": __props.isExpandable,
|
|
2675
|
+
"force-expanded": __props.forceExpanded,
|
|
2319
2676
|
"format-index": formatIndex,
|
|
2320
2677
|
"invoice-period-order": invoicePeriod.period_order,
|
|
2321
2678
|
"group-order": group.group_order,
|
|
@@ -2325,111 +2682,124 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2325
2682
|
renderSlot(_ctx.$slots, "invoice-line-prefix", mergeProps({ ref_for: true }, linePrefixProps))
|
|
2326
2683
|
]),
|
|
2327
2684
|
_: 3
|
|
2328
|
-
}, 8, ["group", "expanded-items", "is-expandable", "invoice-period-order", "group-order", "amount-type"])) : createCommentVNode("", true)
|
|
2685
|
+
}, 8, ["group", "expanded-items", "is-expandable", "force-expanded", "invoice-period-order", "group-order", "amount-type"])) : createCommentVNode("", true),
|
|
2686
|
+
groupHasWalletBalance(group) ? (openBlock(), createElementBlock("tr", _hoisted_5, [
|
|
2687
|
+
createElementVNode("td", _hoisted_6, [
|
|
2688
|
+
createVNode(_sfc_main$4, {
|
|
2689
|
+
lines: group.lines,
|
|
2690
|
+
"credit-types": __props.invoice.credit_types
|
|
2691
|
+
}, null, 8, ["lines", "credit-types"])
|
|
2692
|
+
])
|
|
2693
|
+
])) : createCommentVNode("", true)
|
|
2329
2694
|
], 64);
|
|
2330
2695
|
}), 128))
|
|
2331
2696
|
], 64);
|
|
2332
2697
|
}), 128))
|
|
2333
2698
|
]),
|
|
2334
2699
|
_: 2
|
|
2335
|
-
}, 1032, ["class"])) : createCommentVNode("", true)
|
|
2700
|
+
}, 1032, ["class", "data-testid"])) : createCommentVNode("", true)
|
|
2336
2701
|
], 64);
|
|
2337
2702
|
}), 128)),
|
|
2338
|
-
__props.invoice.tax_summary ? (openBlock(), createBlock(InvoiceTable, {
|
|
2703
|
+
__props.invoice.tax_summary && (__props.showTotals || (__props.forceExpanded || unref(expandedTaxes)) && __props.invoice.tax_categories) ? (openBlock(), createBlock(InvoiceTable, {
|
|
2339
2704
|
key: 1,
|
|
2340
|
-
class: "mt-6"
|
|
2705
|
+
class: "mt-6 print:ml-auto print:w-2/3"
|
|
2341
2706
|
}, {
|
|
2342
2707
|
default: withCtx(() => [
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2708
|
+
__props.showTotals ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
2709
|
+
createElementVNode("tr", null, [
|
|
2710
|
+
createVNode(_sfc_main$h, {
|
|
2711
|
+
left: "",
|
|
2712
|
+
class: "text-secondary"
|
|
2713
|
+
}, {
|
|
2714
|
+
default: withCtx(() => [
|
|
2715
|
+
createTextVNode(toDisplayString(unref(intl).$t({
|
|
2716
|
+
id: "invoice.totals_table_heading",
|
|
2717
|
+
defaultMessage: "Totals",
|
|
2718
|
+
description: "Table heading for the totals column in the invoice table"
|
|
2719
|
+
})), 1)
|
|
2720
|
+
]),
|
|
2721
|
+
_: 1
|
|
2722
|
+
}),
|
|
2723
|
+
createVNode(_sfc_main$h, {
|
|
2724
|
+
right: "",
|
|
2725
|
+
class: "w-28 text-secondary"
|
|
2726
|
+
}, {
|
|
2727
|
+
default: withCtx(() => [
|
|
2728
|
+
createTextVNode(toDisplayString(unref(intl).$t({
|
|
2729
|
+
id: "invoice.amount_table_heading",
|
|
2730
|
+
defaultMessage: "Amount",
|
|
2731
|
+
description: "Table heading for the amount column in the invoice table"
|
|
2732
|
+
})), 1)
|
|
2733
|
+
]),
|
|
2734
|
+
_: 1
|
|
2735
|
+
})
|
|
2736
|
+
]),
|
|
2737
|
+
__props.invoice.pricing_amount_type === "INCLUDING_TAX" ? (openBlock(), createBlock(_sfc_main$2, {
|
|
2738
|
+
key: 0,
|
|
2739
|
+
"total-amount": __props.invoice.tax_summary.total_amount,
|
|
2740
|
+
"is-customer-facing": __props.isCustomerFacing
|
|
2741
|
+
}, null, 8, ["total-amount", "is-customer-facing"])) : (openBlock(), createBlock(_sfc_main$3, {
|
|
2742
|
+
key: 1,
|
|
2743
|
+
"base-amount": __props.invoice.tax_summary.base_amount
|
|
2744
|
+
}, null, 8, ["base-amount"])),
|
|
2745
|
+
__props.invoice.tax_summary.tax_amount ? (openBlock(), createElementBlock("tr", {
|
|
2746
|
+
key: 2,
|
|
2747
|
+
class: normalizeClass([{ "cursor-pointer": __props.invoice.tax_categories && __props.isExpandable }, "break-inside-avoid border-t"]),
|
|
2748
|
+
tabindex: __props.isExpandable ? 0 : void 0,
|
|
2749
|
+
onClick: handleToggleTaxes,
|
|
2750
|
+
onKeyup: [
|
|
2751
|
+
withKeys(handleToggleTaxes, ["enter"]),
|
|
2752
|
+
withKeys(handleToggleTaxes, ["space"])
|
|
2753
|
+
]
|
|
2754
|
+
}, [
|
|
2755
|
+
createVNode(_sfc_main$i, null, {
|
|
2756
|
+
default: withCtx(() => [
|
|
2757
|
+
__props.isExpandable && __props.invoice.tax_categories && __props.invoice.tax_categories.length ? (openBlock(), createBlock(_sfc_main$n, {
|
|
2758
|
+
key: 0,
|
|
2759
|
+
icon: "keyboard_arrow_down",
|
|
2760
|
+
size: "md",
|
|
2761
|
+
class: normalizeClass(["absolute -translate-x-7 text-slate-400", { "-rotate-90": !unref(expandedTaxes) }])
|
|
2762
|
+
}, null, 8, ["class"])) : createCommentVNode("", true),
|
|
2763
|
+
createVNode(_sfc_main$6, {
|
|
2764
|
+
label: unref(intl).$t({
|
|
2765
|
+
id: "invoice.taxes_table_heading",
|
|
2766
|
+
defaultMessage: "Taxes",
|
|
2767
|
+
description: "Table heading for the taxes column in the invoice table"
|
|
2768
|
+
}),
|
|
2769
|
+
count: __props.isExpandable && __props.invoice.tax_categories ? __props.invoice.tax_categories.length : void 0
|
|
2770
|
+
}, null, 8, ["label", "count"])
|
|
2771
|
+
]),
|
|
2772
|
+
_: 1
|
|
2773
|
+
}),
|
|
2774
|
+
createVNode(_sfc_main$i, { number: "" }, {
|
|
2775
|
+
default: withCtx(() => [
|
|
2776
|
+
createVNode(_sfc_main$l, {
|
|
2777
|
+
value: __props.invoice.tax_summary.tax_amount,
|
|
2778
|
+
"data-testid": unref(SUMMARY_TOTAL_TAX)
|
|
2779
|
+
}, null, 8, ["value", "data-testid"])
|
|
2780
|
+
]),
|
|
2781
|
+
_: 1
|
|
2782
|
+
})
|
|
2783
|
+
], 42, _hoisted_7)) : createCommentVNode("", true)
|
|
2784
|
+
], 64)) : createCommentVNode("", true),
|
|
2785
|
+
(__props.forceExpanded || unref(expandedTaxes)) && __props.invoice.tax_categories ? (openBlock(), createElementBlock("tr", _hoisted_8, [
|
|
2786
|
+
createElementVNode("td", _hoisted_9, [
|
|
2787
|
+
createElementVNode("div", _hoisted_10, [
|
|
2420
2788
|
createVNode(_sfc_main$1, {
|
|
2421
2789
|
"tax-categories": __props.invoice.tax_categories
|
|
2422
2790
|
}, null, 8, ["tax-categories"])
|
|
2423
2791
|
])
|
|
2424
2792
|
])
|
|
2425
2793
|
])) : createCommentVNode("", true),
|
|
2426
|
-
__props.
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2794
|
+
__props.showTotals ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
2795
|
+
__props.invoice.pricing_amount_type === "INCLUDING_TAX" ? (openBlock(), createBlock(_sfc_main$3, {
|
|
2796
|
+
key: 0,
|
|
2797
|
+
"base-amount": __props.invoice.tax_summary.base_amount
|
|
2798
|
+
}, null, 8, ["base-amount"])) : (openBlock(), createBlock(_sfc_main$2, {
|
|
2799
|
+
key: 1,
|
|
2800
|
+
"total-amount": __props.invoice.tax_summary.total_amount
|
|
2801
|
+
}, null, 8, ["total-amount"]))
|
|
2802
|
+
], 64)) : createCommentVNode("", true)
|
|
2433
2803
|
]),
|
|
2434
2804
|
_: 1
|
|
2435
2805
|
})) : createCommentVNode("", true),
|
|
@@ -2439,9 +2809,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2439
2809
|
}, {
|
|
2440
2810
|
default: withCtx(() => [
|
|
2441
2811
|
createElementVNode("tr", null, [
|
|
2442
|
-
createVNode(_sfc_main$
|
|
2812
|
+
createVNode(_sfc_main$h, {
|
|
2443
2813
|
left: "",
|
|
2444
|
-
class: "text-
|
|
2814
|
+
class: "text-secondary"
|
|
2445
2815
|
}, {
|
|
2446
2816
|
default: withCtx(() => [
|
|
2447
2817
|
createTextVNode(toDisplayString(unref(intl).$t({
|
|
@@ -2458,7 +2828,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2458
2828
|
(openBlock(true), createElementBlock(Fragment, null, renderList(rootGroup.groups, (group, groupIndex) => {
|
|
2459
2829
|
return openBlock(), createElementBlock(Fragment, { key: groupIndex }, [
|
|
2460
2830
|
createElementVNode("tr", {
|
|
2461
|
-
class: normalizeClass(["border-t", { "pt-6": rootGroupIndex === 0, "cursor-pointer": __props.isExpandable }]),
|
|
2831
|
+
class: normalizeClass(["break-inside-avoid border-t", { "pt-6": rootGroupIndex === 0, "cursor-pointer": __props.isExpandable }]),
|
|
2462
2832
|
tabindex: __props.isExpandable ? 0 : void 0,
|
|
2463
2833
|
onClick: ($event) => handleToggleDeductions(formatIndex(rootGroupIndex, groupIndex)),
|
|
2464
2834
|
onKeyup: [
|
|
@@ -2466,11 +2836,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2466
2836
|
withKeys(($event) => handleToggleDeductions(formatIndex(rootGroupIndex, groupIndex)), ["space"])
|
|
2467
2837
|
]
|
|
2468
2838
|
}, [
|
|
2469
|
-
createVNode(_sfc_main$
|
|
2839
|
+
createVNode(_sfc_main$i, { class: "p-0" }, {
|
|
2470
2840
|
default: withCtx(() => {
|
|
2471
2841
|
var _a2;
|
|
2472
2842
|
return [
|
|
2473
|
-
__props.isExpandable ? (openBlock(), createBlock(_sfc_main$
|
|
2843
|
+
__props.isExpandable ? (openBlock(), createBlock(_sfc_main$n, {
|
|
2474
2844
|
key: 0,
|
|
2475
2845
|
icon: "keyboard_arrow_down",
|
|
2476
2846
|
size: "md",
|
|
@@ -2480,7 +2850,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2480
2850
|
)
|
|
2481
2851
|
}])
|
|
2482
2852
|
}, null, 8, ["class"])) : createCommentVNode("", true),
|
|
2483
|
-
createVNode(_sfc_main$
|
|
2853
|
+
createVNode(_sfc_main$6, {
|
|
2484
2854
|
label: getDeductionLabel(group),
|
|
2485
2855
|
count: __props.isExpandable ? ((_a2 = group.lines) == null ? void 0 : _a2.length) ?? 0 : void 0
|
|
2486
2856
|
}, null, 8, ["label", "count"])
|
|
@@ -2488,25 +2858,32 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2488
2858
|
}),
|
|
2489
2859
|
_: 2
|
|
2490
2860
|
}, 1024),
|
|
2491
|
-
createVNode(_sfc_main$
|
|
2861
|
+
createVNode(_sfc_main$i, {
|
|
2862
|
+
number: "",
|
|
2863
|
+
class: "w-28"
|
|
2864
|
+
}, {
|
|
2492
2865
|
default: withCtx(() => [
|
|
2493
|
-
createVNode(_sfc_main$
|
|
2494
|
-
value: group.amount_excluding_tax
|
|
2495
|
-
|
|
2866
|
+
createVNode(_sfc_main$l, {
|
|
2867
|
+
value: group.amount_excluding_tax,
|
|
2868
|
+
"data-testid": unref(SUMMARY_TOTAL_DISCOUNT),
|
|
2869
|
+
"data-type": unref(DEDUCTION)
|
|
2870
|
+
}, null, 8, ["value", "data-testid", "data-type"])
|
|
2496
2871
|
]),
|
|
2497
2872
|
_: 2
|
|
2498
2873
|
}, 1024)
|
|
2499
|
-
], 42,
|
|
2500
|
-
unref(expandedDeductions).includes(formatIndex(rootGroupIndex, groupIndex)) ? (openBlock(), createElementBlock("tr",
|
|
2501
|
-
createElementVNode("td",
|
|
2502
|
-
createElementVNode("div",
|
|
2503
|
-
createVNode(_sfc_main$
|
|
2874
|
+
], 42, _hoisted_11),
|
|
2875
|
+
__props.forceExpanded || unref(expandedDeductions).includes(formatIndex(rootGroupIndex, groupIndex)) ? (openBlock(), createElementBlock("tr", _hoisted_12, [
|
|
2876
|
+
createElementVNode("td", _hoisted_13, [
|
|
2877
|
+
createElementVNode("div", _hoisted_14, [
|
|
2878
|
+
createVNode(_sfc_main$7, {
|
|
2504
2879
|
"start-date": group.start_at,
|
|
2505
2880
|
"end-date": group.end_at,
|
|
2506
2881
|
total: group.amount_excluding_tax,
|
|
2507
2882
|
group,
|
|
2508
2883
|
"amount-type": __props.invoice.pricing_amount_type,
|
|
2509
|
-
"show-tax-per-line-item": showTaxPerLineItem.value
|
|
2884
|
+
"show-tax-per-line-item": showTaxPerLineItem.value,
|
|
2885
|
+
"processing-only-customers": __props.invoice.processing_only_customers,
|
|
2886
|
+
"display-invoice-sub-lines-per-processing-only-customer": __props.invoice.display_invoice_sub_lines_per_processing_only_customer
|
|
2510
2887
|
}, {
|
|
2511
2888
|
"one-off-line-context-menu": withCtx((oneOffGroupProps) => [
|
|
2512
2889
|
renderSlot(_ctx.$slots, "one-off-line-context-menu", mergeProps({ ref_for: true }, oneOffGroupProps, {
|
|
@@ -2515,16 +2892,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2515
2892
|
}))
|
|
2516
2893
|
]),
|
|
2517
2894
|
_: 2
|
|
2518
|
-
}, 1032, ["start-date", "end-date", "total", "group", "amount-type", "show-tax-per-line-item"])
|
|
2895
|
+
}, 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"])
|
|
2519
2896
|
])
|
|
2520
2897
|
])
|
|
2898
|
+
])) : createCommentVNode("", true),
|
|
2899
|
+
groupHasWalletBalance(group) ? (openBlock(), createElementBlock("tr", _hoisted_15, [
|
|
2900
|
+
createElementVNode("td", _hoisted_16, [
|
|
2901
|
+
createVNode(_sfc_main$4, {
|
|
2902
|
+
lines: group.lines,
|
|
2903
|
+
"credit-types": __props.invoice.credit_types
|
|
2904
|
+
}, null, 8, ["lines", "credit-types"])
|
|
2905
|
+
])
|
|
2521
2906
|
])) : createCommentVNode("", true)
|
|
2522
2907
|
], 64);
|
|
2523
2908
|
}), 128))
|
|
2524
2909
|
], 64);
|
|
2525
2910
|
}), 128)),
|
|
2526
|
-
__props.invoice.open_invoice_amount && !__props.invoice.paid ? (openBlock(), createElementBlock("tr",
|
|
2527
|
-
createVNode(_sfc_main$
|
|
2911
|
+
__props.invoice.open_invoice_amount && !__props.invoice.paid && __props.showTotals ? (openBlock(), createElementBlock("tr", _hoisted_17, [
|
|
2912
|
+
createVNode(_sfc_main$i, { class: "font-bold" }, {
|
|
2528
2913
|
default: withCtx(() => [
|
|
2529
2914
|
createTextVNode(toDisplayString(unref(intl).$t({
|
|
2530
2915
|
id: "invoice.amount_due_table_heading",
|
|
@@ -2534,11 +2919,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2534
2919
|
]),
|
|
2535
2920
|
_: 1
|
|
2536
2921
|
}),
|
|
2537
|
-
createVNode(_sfc_main$
|
|
2922
|
+
createVNode(_sfc_main$i, { number: "" }, {
|
|
2538
2923
|
default: withCtx(() => [
|
|
2539
|
-
createVNode(_sfc_main$
|
|
2540
|
-
value: __props.invoice.open_invoice_amount
|
|
2541
|
-
|
|
2924
|
+
createVNode(_sfc_main$l, {
|
|
2925
|
+
value: __props.invoice.open_invoice_amount,
|
|
2926
|
+
"data-testid": unref(SUMMARY_AMOUNT_DUE)
|
|
2927
|
+
}, null, 8, ["value", "data-testid"])
|
|
2542
2928
|
]),
|
|
2543
2929
|
_: 1
|
|
2544
2930
|
})
|
|
@@ -2553,6 +2939,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2553
2939
|
export {
|
|
2554
2940
|
InvoiceTable as I,
|
|
2555
2941
|
_sfc_main as _,
|
|
2556
|
-
_sfc_main$
|
|
2557
|
-
_sfc_main$
|
|
2942
|
+
_sfc_main$h as a,
|
|
2943
|
+
_sfc_main$i as b
|
|
2558
2944
|
};
|