@unimaze/billing 0.1.0 → 0.1.2-rc.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/README.md +11 -3
  2. package/lib/common/components/attachments/Attachment.d.ts +8 -2
  3. package/lib/common/components/attachments/Attachment.js +33 -8
  4. package/lib/common/components/attachments/index.d.ts +9 -2
  5. package/lib/common/components/attachments/index.js +15 -6
  6. package/lib/common/components/base-information/ReferenceIdentifiers.d.ts +6 -0
  7. package/lib/common/components/base-information/ReferenceIdentifiers.js +40 -0
  8. package/lib/common/components/base-information/index.d.ts +6 -3
  9. package/lib/common/components/base-information/index.js +100 -81
  10. package/lib/common/components/billing-lines/BillingCalculations.d.ts +11 -0
  11. package/lib/common/components/billing-lines/BillingCalculations.js +61 -0
  12. package/lib/common/components/billing-lines/BillingTaxSummary.d.ts +10 -0
  13. package/lib/common/components/billing-lines/BillingTaxSummary.js +51 -0
  14. package/lib/common/components/billing-lines/billingLIneFormData.d.ts +7 -0
  15. package/lib/common/components/billing-lines/billingLIneFormData.js +63 -0
  16. package/lib/common/components/billing-lines/index.d.ts +10 -24
  17. package/lib/common/components/billing-lines/index.js +117 -39
  18. package/lib/common/components/customer/hardCoddedCustomer.d.ts +7 -0
  19. package/lib/common/components/{issuer/index.js → customer/hardCoddedCustomer.js} +5 -8
  20. package/lib/common/components/customer/index.d.ts +6 -0
  21. package/lib/common/components/customer/index.js +93 -0
  22. package/lib/common/components/delivery-location/index.d.ts +5 -2
  23. package/lib/common/components/delivery-location/index.js +43 -11
  24. package/lib/common/components/editable-cell/index.d.ts +1 -1
  25. package/lib/common/components/editable-cell/index.js +77 -11
  26. package/lib/common/components/editable-row/index.d.ts +5 -5
  27. package/lib/common/components/editable-row/index.js +8 -6
  28. package/lib/common/components/form-item/index.d.ts +21 -0
  29. package/lib/common/components/form-item/index.js +27 -0
  30. package/lib/common/components/index.d.ts +10 -5
  31. package/lib/common/components/index.js +20 -8
  32. package/lib/common/components/locale-intl/index.d.ts +10 -0
  33. package/lib/common/components/locale-intl/index.js +45 -0
  34. package/lib/common/components/payment-method/index.d.ts +6 -3
  35. package/lib/common/components/payment-method/index.js +67 -27
  36. package/lib/common/components/supplier/index.d.ts +6 -0
  37. package/lib/common/components/supplier/index.js +93 -0
  38. package/lib/common/consts/validationRules.d.ts +2 -3
  39. package/lib/common/consts/validationRules.js +1 -8
  40. package/lib/common/enums/index.d.ts +1 -1
  41. package/lib/common/enums/index.js +2 -4
  42. package/lib/common/types/BillingLineMetadataOverride.d.ts +2 -1
  43. package/lib/common/types/ReceiverRequirements.d.ts +81 -0
  44. package/lib/common/types/ReceiverRequirements.js +379 -0
  45. package/lib/create-credit-note/index.d.ts +2 -3
  46. package/lib/create-credit-note/index.js +17 -28
  47. package/lib/create-invoice/index.d.ts +1 -2
  48. package/lib/create-invoice/index.js +79 -21
  49. package/lib/example/src/index.d.ts +1 -1
  50. package/lib/index.d.ts +2 -3
  51. package/lib/index.js +8 -5
  52. package/lib/src/common/components/attachments/Attachment.d.ts +21 -0
  53. package/lib/src/common/components/attachments/index.d.ts +10 -0
  54. package/lib/src/common/components/base-information/ReferenceIdentifiers.d.ts +6 -0
  55. package/lib/src/common/components/base-information/index.d.ts +12 -0
  56. package/lib/src/common/components/billing-lines/BillingCalculations.d.ts +11 -0
  57. package/lib/src/common/components/billing-lines/BillingTaxSummary.d.ts +10 -0
  58. package/lib/src/common/components/billing-lines/billingLIneFormData.d.ts +7 -0
  59. package/lib/src/common/components/billing-lines/index.d.ts +13 -0
  60. package/lib/src/common/components/component-container/Content.d.ts +7 -0
  61. package/lib/src/common/components/component-container/Header.d.ts +9 -0
  62. package/lib/src/common/components/component-container/index.d.ts +10 -0
  63. package/lib/src/common/components/customer/index.d.ts +6 -0
  64. package/lib/src/common/components/delivery-location/index.d.ts +6 -0
  65. package/lib/src/common/components/editable-cell/index.d.ts +11 -0
  66. package/lib/src/common/components/editable-row/index.d.ts +6 -0
  67. package/lib/src/common/components/form-item/index.d.ts +21 -0
  68. package/lib/src/common/components/index.d.ts +10 -0
  69. package/lib/src/common/components/locale-intl/index.d.ts +10 -0
  70. package/lib/src/common/components/payment-method/index.d.ts +6 -0
  71. package/lib/src/common/components/supplier/index.d.ts +6 -0
  72. package/lib/src/common/consts/validationRules.d.ts +6 -0
  73. package/lib/src/common/types/ReceiverRequirements.d.ts +81 -0
  74. package/lib/src/create-invoice/index.d.ts +14 -0
  75. package/lib/src/translations/locales.d.ts +74 -0
  76. package/lib/src/utils/ApiUtility.d.ts +21 -0
  77. package/lib/src/utils/BillingLineUtility.d.ts +8 -0
  78. package/lib/src/utils/ConversionUtility.d.ts +5 -0
  79. package/lib/src/utils/RequirementsUtility.d.ts +5 -0
  80. package/lib/src/utils/billingLineFormData.d.ts +7 -0
  81. package/lib/src/utils/index.d.ts +2 -0
  82. package/lib/style/index.css +0 -1222
  83. package/lib/translations/locales/is.json +70 -0
  84. package/lib/translations/locales.d.ts +74 -0
  85. package/lib/translations/locales.js +10 -0
  86. package/lib/utils/ApiUtility.d.ts +21 -0
  87. package/lib/utils/ApiUtility.js +59 -0
  88. package/lib/utils/BillingLineUtility.d.ts +8 -0
  89. package/lib/utils/BillingLineUtility.js +66 -0
  90. package/lib/utils/ConversionUtility.d.ts +5 -0
  91. package/lib/utils/ConversionUtility.js +146 -0
  92. package/lib/utils/RequirementsUtility.d.ts +5 -0
  93. package/lib/utils/RequirementsUtility.js +23 -0
  94. package/lib/utils/billingLineFormData.d.ts +7 -0
  95. package/lib/utils/billingLineFormData.js +63 -0
  96. package/lib/utils/index.d.ts +2 -5
  97. package/lib/utils/index.js +5 -162
  98. package/package.json +22 -7
  99. package/lib/common/components/issuer/index.d.ts +0 -7
  100. package/lib/common/components/payer/index.d.ts +0 -3
  101. package/lib/common/components/payer/index.js +0 -50
@@ -0,0 +1,5 @@
1
+ import { BillingLineMetadata, InvoiceMetadataInput } from "@unimaze/api-clients/lib/mapi";
2
+ import { Store } from "antd/es/form/interface";
3
+ import { ProfileOutput } from "@unimaze/api-clients/lib/wapi2";
4
+ declare const convertToInvoiceMetadataInput: (formValues: Store, billingLines: BillingLineMetadata[], customer?: ProfileOutput | undefined) => InvoiceMetadataInput;
5
+ export { /*convertToCreditNoteMetadataInput,*/ convertToInvoiceMetadataInput };
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { AvailableFields, FieldRequirement, ReceiverRequirements } from "../common/types/ReceiverRequirements";
3
+ export declare const getReceiverRequirements: (recRequirements: ReceiverRequirements, key: AvailableFields) => FieldRequirement;
4
+ export declare const getReceiverRequirementsIsRequired: (recRequirements: ReceiverRequirements, key: AvailableFields, defaultIsRequired: boolean) => boolean;
5
+ export declare const getReceiverRequirementsLabelWithDefault: (recRequirements: ReceiverRequirements, key: AvailableFields, defaultLabel: React.ReactNode) => React.ReactNode;
@@ -0,0 +1,7 @@
1
+ import { BillingLineMetadata } from '@unimaze/api-clients/lib/mapi';
2
+ import { FormInstance } from "antd/es/form";
3
+ import { TaxCategoryTypeEnum } from "@unimaze/api-clients/lib/mapi/api";
4
+ export declare const billingLinesFieldsMetadata: (formInstance: FormInstance) => BillingLineMetadata[];
5
+ export declare const calculateTaxableAmount: (discountValue: string | null | undefined, quantity: number | null, unitPriceAmount: number | null) => number;
6
+ export declare const calculateTaxAmount: (taxableAmount: number, taxPercentage: number) => number;
7
+ export declare const calculateTaxPercentage: (taxCategoryType: TaxCategoryTypeEnum) => number;
@@ -0,0 +1,2 @@
1
+ export { convertToInvoiceMetadataInput } from "./ConversionUtility";
2
+ export { submitInvoice, CreateSubmitInvoice, submitDocument, AttachDocument } from "./ApiUtility";