@unimaze/billing 0.1.2-rc.8 → 0.2.0-rc.0

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 (85) hide show
  1. package/lib/common/components/attachments/Attachment.d.ts +7 -3
  2. package/lib/common/components/attachments/Attachment.js +69 -15
  3. package/lib/common/components/attachments/index.d.ts +5 -2
  4. package/lib/common/components/attachments/index.js +18 -5
  5. package/lib/common/components/base-information/ReferenceIdentifiers.d.ts +17 -0
  6. package/lib/common/components/base-information/ReferenceIdentifiers.js +54 -0
  7. package/lib/common/components/base-information/index.d.ts +6 -3
  8. package/lib/common/components/base-information/index.js +131 -80
  9. package/lib/common/components/billing-lines/BillingCalculations.d.ts +11 -0
  10. package/lib/common/components/billing-lines/BillingCalculations.js +63 -0
  11. package/lib/common/components/billing-lines/BillingTaxSummary.d.ts +10 -0
  12. package/lib/common/components/billing-lines/BillingTaxSummary.js +53 -0
  13. package/lib/common/components/billing-lines/NewBillingLines.d.ts +10 -0
  14. package/lib/common/components/billing-lines/NewBillingLines.js +77 -0
  15. package/lib/common/components/billing-lines/index.d.ts +7 -15
  16. package/lib/common/components/billing-lines/index.js +173 -62
  17. package/lib/{src/common/components/issuer/index.d.ts → common/components/customer/hardCoddedCustomer.d.ts} +2 -2
  18. package/lib/common/components/{issuer/index.js → customer/hardCoddedCustomer.js} +5 -8
  19. package/lib/common/components/customer/index.d.ts +5 -6
  20. package/lib/common/components/customer/index.js +101 -12
  21. package/lib/common/components/delivery-location/index.d.ts +5 -2
  22. package/lib/common/components/delivery-location/index.js +65 -10
  23. package/lib/common/components/editable-cell/index.js +7 -9
  24. package/lib/common/components/form-item/index.d.ts +23 -0
  25. package/lib/common/components/form-item/index.js +44 -0
  26. package/lib/common/components/locale-intl/index.d.ts +10 -0
  27. package/lib/common/components/locale-intl/index.js +45 -0
  28. package/lib/common/components/payment-method/index.d.ts +6 -3
  29. package/lib/common/components/payment-method/index.js +107 -15
  30. package/lib/common/components/payment-method/paymentMethodForConversion.d.ts +9 -0
  31. package/lib/common/components/payment-method/paymentMethodForConversion.js +44 -0
  32. package/lib/common/components/supplier/index.d.ts +5 -2
  33. package/lib/common/components/supplier/index.js +108 -28
  34. package/lib/common/consts/formLayout.d.ts +44 -0
  35. package/lib/common/consts/formLayout.js +35 -0
  36. package/lib/common/consts/validationRules.js +0 -7
  37. package/lib/common/types/ReceiverRequirements.d.ts +71 -72
  38. package/lib/common/types/ReceiverRequirements.js +64 -81
  39. package/lib/create-credit-note/index.js +2 -4
  40. package/lib/create-invoice/index.js +131 -26
  41. package/lib/src/common/components/attachments/Attachment.d.ts +7 -3
  42. package/lib/src/common/components/attachments/index.d.ts +5 -2
  43. package/lib/src/common/components/base-information/ReferenceIdentifiers.d.ts +17 -0
  44. package/lib/src/common/components/base-information/index.d.ts +6 -3
  45. package/lib/src/common/components/billing-lines/BillingCalculations.d.ts +11 -0
  46. package/lib/src/common/components/billing-lines/BillingTaxSummary.d.ts +10 -0
  47. package/lib/src/common/components/billing-lines/NewBillingLines.d.ts +10 -0
  48. package/lib/src/common/components/billing-lines/index.d.ts +7 -15
  49. package/lib/src/common/components/customer/index.d.ts +5 -6
  50. package/lib/src/common/components/delivery-location/index.d.ts +5 -2
  51. package/lib/src/common/components/form-item/index.d.ts +23 -0
  52. package/lib/src/common/components/locale-intl/index.d.ts +10 -0
  53. package/lib/src/common/components/payment-method/index.d.ts +6 -3
  54. package/lib/src/common/components/payment-method/paymentMethodForConversion.d.ts +9 -0
  55. package/lib/src/common/components/supplier/index.d.ts +5 -2
  56. package/lib/src/common/consts/formLayout.d.ts +44 -0
  57. package/lib/src/common/types/ReceiverRequirements.d.ts +71 -72
  58. package/lib/src/translations/locales.d.ts +75 -0
  59. package/lib/src/utils/ApiUtility.d.ts +8 -1
  60. package/lib/src/utils/BillingLineUtility.d.ts +10 -0
  61. package/lib/src/utils/ConversionUtility.d.ts +4 -3
  62. package/lib/src/utils/RequirementsUtility.d.ts +3 -1
  63. package/lib/src/utils/index.d.ts +1 -1
  64. package/lib/translations/locales/is.json +71 -0
  65. package/lib/translations/locales.d.ts +75 -0
  66. package/lib/translations/locales.js +10 -0
  67. package/lib/utils/ApiUtility.d.ts +8 -1
  68. package/lib/utils/ApiUtility.js +17 -1
  69. package/lib/utils/BillingLineUtility.d.ts +10 -0
  70. package/lib/utils/BillingLineUtility.js +90 -0
  71. package/lib/utils/ConversionUtility.d.ts +4 -3
  72. package/lib/utils/ConversionUtility.js +98 -66
  73. package/lib/utils/RequirementsUtility.d.ts +3 -1
  74. package/lib/utils/RequirementsUtility.js +15 -5
  75. package/lib/utils/index.d.ts +1 -1
  76. package/lib/utils/index.js +1 -0
  77. package/package.json +8 -5
  78. package/lib/common/components/component-container/style/index.d.ts +0 -1
  79. package/lib/common/components/component-container/style/index.js +0 -3
  80. package/lib/common/components/issuer/index.d.ts +0 -7
  81. package/lib/common/components/payer/index.d.ts +0 -3
  82. package/lib/common/components/payer/index.js +0 -51
  83. package/lib/src/common/components/payer/index.d.ts +0 -3
  84. package/lib/style/index.d.ts +0 -1
  85. package/lib/style/index.js +0 -3
@@ -1,9 +1,12 @@
1
1
  import * as React from 'react';
2
2
  import '@ant-design/compatible/assets/index.css';
3
3
  import { FormInstance } from "antd/es/form";
4
- interface Props {
4
+ import { InjectedIntlProps } from "react-intl";
5
+ interface Props extends InjectedIntlProps {
5
6
  form: FormInstance;
6
7
  documentType: "creditNote" | "invoice";
7
8
  }
8
- declare const BaseInformation: React.FC<Props>;
9
- export default BaseInformation;
9
+ declare const BaseInformationIntl: React.ComponentClass<Pick<Props, "form" | "documentType">, any> & {
10
+ WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
11
+ };
12
+ export default BaseInformationIntl;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { BillingLineMetadataOverride } from "../../types/BillingLineMetadataOverride";
3
+ import { InjectedIntlProps } from "react-intl";
4
+ interface Props extends InjectedIntlProps {
5
+ billingLinesMetadata: BillingLineMetadataOverride[] | undefined;
6
+ renderCurrencyColumn: (text: string | number) => string;
7
+ }
8
+ declare const _default: React.ComponentClass<Pick<Props, "billingLinesMetadata" | "renderCurrencyColumn">, any> & {
9
+ WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
10
+ };
11
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { BillingLineMetadataOverride } from "../../types/BillingLineMetadataOverride";
3
+ import { InjectedIntlProps } from "react-intl";
4
+ interface Props extends InjectedIntlProps {
5
+ billingLines: BillingLineMetadataOverride[] | undefined;
6
+ }
7
+ declare const _default: React.ComponentClass<Pick<Props, "billingLines">, any> & {
8
+ WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
9
+ };
10
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { InjectedIntlProps } from "react-intl";
3
+ import { FormInstance } from "antd/es/form";
4
+ interface Props extends InjectedIntlProps {
5
+ formInstance: FormInstance;
6
+ }
7
+ declare const _default: React.ComponentClass<Pick<Props, "formInstance">, any> & {
8
+ WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
9
+ };
10
+ export default _default;
@@ -1,27 +1,19 @@
1
1
  import * as React from 'react';
2
2
  import '@ant-design/compatible/assets/index.css';
3
3
  import { BillingLineMetadata } from "@unimaze/api-clients/lib/mapi/models";
4
+ import { InjectedIntlProps } from "react-intl";
4
5
  import { BillingLineMetadataOverride } from "../../types/BillingLineMetadataOverride";
5
6
  import { FormInstance } from "antd/es/form";
6
- import { ColumnType } from 'antd/es/table';
7
- interface EditableColumnProps<T> extends ColumnType<T> {
8
- editable?: boolean;
9
- }
10
- interface Props {
7
+ interface Props extends InjectedIntlProps {
11
8
  formInstance: FormInstance;
12
9
  setBillingLineMetadata: (formInstance: FormInstance, billingLineMetadata: BillingLineMetadata[]) => void;
13
- }
14
- interface States {
15
10
  dataSource: BillingLineMetadataOverride[];
16
- editableIndex: number;
17
- }
18
- declare class BillingLines extends React.Component<Props, States> {
19
- columns: EditableColumnProps<BillingLineMetadataOverride>[];
20
- constructor(props: Props);
21
- renderCurrencyColumn: (text: string) => string;
22
11
  handleDelete: (index: number) => void;
23
12
  handleAdd: () => void;
24
13
  handleSave: (row: BillingLineMetadataOverride, formInstance: FormInstance) => void;
25
- render(): JSX.Element;
14
+ editableIndex: number;
26
15
  }
27
- export default BillingLines;
16
+ declare const BillingLinesIntl: React.ComponentClass<Pick<Props, "formInstance" | "setBillingLineMetadata" | "dataSource" | "handleDelete" | "handleAdd" | "handleSave" | "editableIndex">, any> & {
17
+ WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
18
+ };
19
+ export default BillingLinesIntl;
@@ -1,7 +1,6 @@
1
1
  import * as React from 'react';
2
- import { wapi2 } from "@unimaze/api-clients";
3
- interface Props {
4
- customer: wapi2.ProfileOutput;
5
- }
6
- declare const Customer: React.FC<Props>;
7
- export default Customer;
2
+ import { InjectedIntlProps } from "react-intl";
3
+ declare const CustomerIntl: React.ComponentClass<Pick<InjectedIntlProps, never>, any> & {
4
+ WrappedComponent: React.ComponentType<InjectedIntlProps>;
5
+ };
6
+ export default CustomerIntl;
@@ -1,3 +1,6 @@
1
1
  import * as React from 'react';
2
- declare const DeliveryLocation: React.FC;
3
- export default DeliveryLocation;
2
+ import { InjectedIntlProps } from "react-intl";
3
+ declare const DeliveryLocationIntl: React.ComponentClass<Pick<InjectedIntlProps, never>, any> & {
4
+ WrappedComponent: React.ComponentType<InjectedIntlProps>;
5
+ };
6
+ export default DeliveryLocationIntl;
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import { AvailableFields } from "../../types/ReceiverRequirements";
3
+ import { NamePath, Rule } from "rc-field-form/lib/interface";
4
+ import { InjectedIntlProps } from "react-intl";
5
+ interface StringMap {
6
+ [key: string]: string;
7
+ }
8
+ interface Props extends InjectedIntlProps {
9
+ receiverRequirementsKey: AvailableFields;
10
+ defaultLabel: React.ReactNode;
11
+ defaultIsRequired: boolean;
12
+ fieldName: NamePath;
13
+ additionalRules?: Rule[];
14
+ style?: React.CSSProperties;
15
+ initialValue?: StringMap;
16
+ verticalLabels?: boolean;
17
+ onlyLabelOnFirstInList?: boolean;
18
+ index?: number;
19
+ }
20
+ declare const _default: React.ComponentClass<Pick<Props, "style" | "initialValue" | "fieldName" | "index" | "receiverRequirementsKey" | "defaultLabel" | "defaultIsRequired" | "additionalRules" | "verticalLabels" | "onlyLabelOnFirstInList">, any> & {
21
+ WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
22
+ };
23
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ import "moment/locale/is";
3
+ import "moment/locale/sr";
4
+ interface IHotSwappingIntlProviderOwnProps {
5
+ initialLocale: string;
6
+ initialMessages: any;
7
+ languageString?: string;
8
+ }
9
+ declare const HotIntlProvider: React.FC<IHotSwappingIntlProviderOwnProps>;
10
+ export default HotIntlProvider;
@@ -1,3 +1,6 @@
1
- /// <reference types="react" />
2
- declare const PaymentMethod: () => JSX.Element;
3
- export default PaymentMethod;
1
+ import React from 'react';
2
+ import { InjectedIntlProps } from "react-intl";
3
+ declare const _default: React.ComponentClass<Pick<InjectedIntlProps, never>, any> & {
4
+ WrappedComponent: React.ComponentType<InjectedIntlProps>;
5
+ };
6
+ export default _default;
@@ -0,0 +1,9 @@
1
+ import { PaymentMeansType } from "@unimaze/api-clients/lib/mapi";
2
+ import { TransferMetadata, ClaimMetadata } from '@unimaze/api-clients/lib/mapi/models';
3
+ import { Store } from 'antd/es/form/interface';
4
+ export interface IPaymentMeans {
5
+ type: PaymentMeansType;
6
+ domesticTransfer?: TransferMetadata | undefined;
7
+ domesticClaim?: ClaimMetadata | undefined;
8
+ }
9
+ export declare const PaymentMethodFormData: (formData: Store) => IPaymentMeans;
@@ -1,3 +1,6 @@
1
1
  import * as React from 'react';
2
- declare const Supplier: React.FC;
3
- export default Supplier;
2
+ import { InjectedIntlProps } from "react-intl";
3
+ declare const SupplierIntl: React.ComponentClass<Pick<InjectedIntlProps, never>, any> & {
4
+ WrappedComponent: React.ComponentType<InjectedIntlProps>;
5
+ };
6
+ export default SupplierIntl;
@@ -0,0 +1,44 @@
1
+ declare const formItemLayout: {
2
+ labelCol: {
3
+ xs: {
4
+ span: number;
5
+ };
6
+ sm: {
7
+ span: number;
8
+ };
9
+ };
10
+ wrapperCol: {
11
+ xs: {
12
+ span: number;
13
+ };
14
+ sm: {
15
+ span: number;
16
+ };
17
+ };
18
+ };
19
+ declare const formItemVerticalLayout: {
20
+ labelCol: {
21
+ span: number;
22
+ };
23
+ wrapperCol: {
24
+ span: number;
25
+ };
26
+ };
27
+ declare const fullWidthInput: {
28
+ wrapperCol: {
29
+ span: number;
30
+ };
31
+ };
32
+ declare const formItemLayoutWithOutLabel: {
33
+ wrapperCol: {
34
+ xs: {
35
+ span: number;
36
+ offset: number;
37
+ };
38
+ sm: {
39
+ span: number;
40
+ offset: number;
41
+ };
42
+ };
43
+ };
44
+ export { formItemLayout, formItemVerticalLayout, fullWidthInput, formItemLayoutWithOutLabel };
@@ -1,82 +1,81 @@
1
- interface KeyValuePair {
2
- key: string;
3
- value: string;
4
- }
5
- interface FieldRequirement {
1
+ interface Values {
2
+ key?: string;
6
3
  label?: string;
7
- key: string;
4
+ values?: Values[];
5
+ }
6
+ interface FieldRequirement extends Values {
8
7
  isRequired: boolean;
9
- values?: KeyValuePair[];
10
8
  }
11
9
  declare type ReceiverRequirements = {
12
10
  [key in AvailableFields]?: FieldRequirement;
13
11
  };
14
12
  export declare enum AvailableFields {
15
- 'invoiceNo' = "invoiceNo",
16
- 'issueDate' = "issueDate",
17
- 'dueDate' = "dueDate",
18
- 'graceDate' = "graceDate",
19
- 'currencyCode' = "currencyCode",
20
- 'notes' = "notes",
21
- 'accountingCost' = "accountingCost",
22
- 'buyerReference' = "buyerReference",
23
- 'orderReference.documentNo' = "orderReference.documentNo",
24
- 'billingReferences.invoices' = "billingReferences.invoices",
25
- 'billingReferences.documentNo' = "billingReferences.documentNo",
26
- 'billingReferences.issueDate' = "billingReferences.issueDate",
27
- 'billingReferences.creditNotes' = "billingReferences.creditNotes",
28
- 'referenceIdentifiers.type' = "referenceIdentifiers.type",
29
- 'referenceIdentifiers.code' = "referenceIdentifiers.code",
30
- 'referenceIdentifiers.value' = "referenceIdentifiers.value",
31
- 'supplier.vatNumber' = "supplier.vatNumber",
32
- 'supplier.address.streetNameAndNumber' = "supplier.address.streetNameAndNumber",
33
- 'supplier.address.city' = "supplier.address.city",
34
- 'supplier.address.postalZone' = "supplier.address.postalZone",
35
- 'supplier.address.countryCode' = "supplier.address.countryCode",
36
- 'supplier.contact.name' = "supplier.contact.name",
37
- 'supplier.contact.electronicMail' = "supplier.contact.electronicMail",
38
- 'supplier.contact.telephone' = "supplier.contact.telephone",
39
- 'supplier.name' = "supplier.name",
40
- 'supplier.identifier' = "supplier.identifier",
41
- 'customer.address.streetNameAndNumber' = "customer.address.streetNameAndNumber",
42
- 'customer.address.city' = "customer.address.city",
43
- 'customer.address.postalZone' = "customer.address.postalZone",
44
- 'customer.address.countryCode' = "customer.address.countryCode",
45
- 'customer.contact.name' = "customer.contact.name",
46
- 'customer.contact.electronicMail' = "customer.contact.electronicMail",
47
- 'customer.contact.telephone' = "customer.contact.telephone",
48
- 'customer.name' = "customer.name",
49
- 'customer.identifier' = "customer.identifier",
50
- 'customer.locationIdentifier' = "customer.locationIdentifier",
51
- 'payee.name' = "payee.name",
52
- 'payee.identifier' = "payee.identifier",
53
- 'payee.sepaBankIdentification' = "payee.sepaBankIdentification",
54
- 'invoiceLines.itemNo' = "invoiceLines.itemNo",
55
- 'invoiceLines.name' = "invoiceLines.name",
56
- 'invoiceLines.quantity' = "invoiceLines.quantity",
57
- 'invoiceLines.uniteOfMeasure.unit' = "invoiceLines.unitOfMeasure.unit",
58
- 'invoiceLines.uniteOfMeasure.code' = "invoiceLines.unitOfMeasure.code",
59
- 'invoiceLines.priceAmount' = "invoiceLines.priceAmount",
60
- 'invoiceLines.taxCategoryType' = "invoiceLines.taxCategoryType",
61
- 'invoiceLines.taxableAmount' = "invoiceLines.taxableAmount",
62
- 'invoiceLines.taxAmount' = "invoiceLines.taxAmount",
63
- 'invoiceLines.taxPercentage' = "invoiceLines.taxPercentage",
64
- 'invoiceLines.discountValue' = "invoiceLines.discountValue",
65
- 'paymentTerms.note' = "paymentTerms.note",
66
- 'paymentMeans.type' = "paymentMeans.type",
67
- 'paymentMeans.internationalTransfer' = "paymentMeans.internationalTransfer",
68
- 'paymentMeans.domesticTransfer' = "paymentMeans.domesticTransfer",
69
- 'paymentMeans.domesticClaim' = "paymentMeans.domesticClaim",
70
- 'delivery.partyName' = "delivery.partyName",
71
- 'delivery.locationIdentifier' = "delivery.locationIdentifier",
72
- 'delivery.address.streetNameAndNumber' = "delivery.address.streetNameAndNumber",
73
- 'delivery.address.city' = "delivery.address.city",
74
- 'delivery.address.postalZone' = "delivery.address.postalZone",
75
- 'delivery.address.countryCode' = "delivery.address.countryCode",
76
- 'delivery.actualDeliveryDate' = "delivery.actualDeliveryDate",
77
- 'prepaidAmount' = "prepaidAmount",
78
- 'payableAmount' = "payableAmount",
79
- 'payableRoundingAmount' = "payableRoundingAmount"
13
+ "invoiceNo" = "invoiceNo",
14
+ "issueDate" = "issueDate",
15
+ "dueDate" = "dueDate",
16
+ "graceDate" = "graceDate",
17
+ "currencyCode" = "currencyCode",
18
+ "notes" = "notes",
19
+ "accountingCost" = "accountingCost",
20
+ "buyerReference" = "buyerReference",
21
+ "orderReference.documentNo" = "orderReference.documentNo",
22
+ "billingReferences.invoices" = "billingReferences.invoices",
23
+ "billingReferences.documentNo" = "billingReferences.documentNo",
24
+ "billingReferences.issueDate" = "billingReferences.issueDate",
25
+ "billingReferences.creditNotes" = "billingReferences.creditNotes",
26
+ "referenceIdentifiers.type" = "referenceIdentifiers.type",
27
+ "referenceIdentifiers.code" = "referenceIdentifiers.code",
28
+ "referenceIdentifiers.value" = "referenceIdentifiers.value",
29
+ "referenceIdentifiers" = "referenceIdentifiers",
30
+ "supplier.vatNumber" = "supplier.vatNumber",
31
+ "supplier.address.streetNameAndNumber" = "supplier.address.streetNameAndNumber",
32
+ "supplier.address.city" = "supplier.address.city",
33
+ "supplier.address.postalZone" = "supplier.address.postalZone",
34
+ "supplier.address.countryCode" = "supplier.address.countryCode",
35
+ "supplier.contact.name" = "supplier.contact.name",
36
+ "supplier.contact.electronicMail" = "supplier.contact.electronicMail",
37
+ "supplier.contact.telephone" = "supplier.contact.telephone",
38
+ "supplier.name" = "supplier.name",
39
+ "supplier.identifier" = "supplier.identifier",
40
+ "customer.address.streetNameAndNumber" = "customer.address.streetNameAndNumber",
41
+ "customer.address.city" = "customer.address.city",
42
+ "customer.address.postalZone" = "customer.address.postalZone",
43
+ "customer.address.countryCode" = "customer.address.countryCode",
44
+ "customer.contact.name" = "customer.contact.name",
45
+ "customer.contact.electronicMail" = "customer.contact.electronicMail",
46
+ "customer.contact.telephone" = "customer.contact.telephone",
47
+ "customer.name" = "customer.name",
48
+ "customer.identifier" = "customer.identifier",
49
+ "customer.locationIdentifier" = "customer.locationIdentifier",
50
+ "payee.name" = "payee.name",
51
+ "payee.identifier" = "payee.identifier",
52
+ "payee.sepaBankIdentification" = "payee.sepaBankIdentification",
53
+ "invoiceLines.itemNo" = "invoiceLines.itemNo",
54
+ "invoiceLines.name" = "invoiceLines.name",
55
+ "invoiceLines.quantity" = "invoiceLines.quantity",
56
+ "invoiceLines.uniteOfMeasure.unit" = "invoiceLines.unitOfMeasure.unit",
57
+ "invoiceLines.uniteOfMeasure.code" = "invoiceLines.unitOfMeasure.code",
58
+ "invoiceLines.unitPriceAmount" = "invoiceLines.unitPriceAmount",
59
+ "invoiceLines.taxCategoryType" = "invoiceLines.taxCategoryType",
60
+ "invoiceLines.taxableAmount" = "invoiceLines.taxableAmount",
61
+ "invoiceLines.taxAmount" = "invoiceLines.taxAmount",
62
+ "invoiceLines.taxPercentage" = "invoiceLines.taxPercentage",
63
+ "invoiceLines.discountValue" = "invoiceLines.discountValue",
64
+ "paymentTerms.note" = "paymentTerms.note",
65
+ "paymentMeans.type" = "paymentMeans.type",
66
+ "paymentMeans.internationalTransfer" = "paymentMeans.internationalTransfer",
67
+ "paymentMeans.domesticTransfer" = "paymentMeans.domesticTransfer",
68
+ "paymentMeans.domesticClaim" = "paymentMeans.domesticClaim",
69
+ "delivery.partyName" = "delivery.partyName",
70
+ "delivery.locationIdentifier" = "delivery.locationIdentifier",
71
+ "delivery.address.streetNameAndNumber" = "delivery.address.streetNameAndNumber",
72
+ "delivery.address.city" = "delivery.address.city",
73
+ "delivery.address.postalZone" = "delivery.address.postalZone",
74
+ "delivery.address.countryCode" = "delivery.address.countryCode",
75
+ "delivery.actualDeliveryDate" = "delivery.actualDeliveryDate",
76
+ "prepaidAmount" = "prepaidAmount",
77
+ "payableAmount" = "payableAmount",
78
+ "payableRoundingAmount" = "payableRoundingAmount"
80
79
  }
81
80
  export { ReceiverRequirements, FieldRequirement };
82
81
  export declare const receiverRequirementsObject: ReceiverRequirements;
@@ -0,0 +1,75 @@
1
+ declare const _default: {
2
+ en: {};
3
+ is: {
4
+ "attachment_labels_Reference": string;
5
+ "attachment_labels_Reference_requiredMessage": string;
6
+ "attachment_labels_Description": string;
7
+ "attachment_labels_Description_requiredMessage": string;
8
+ "attachment_labels_File": string;
9
+ "attachment_title": string;
10
+ "baseInformation_title": string;
11
+ "baseInformation_invoiceNo": string;
12
+ "baseInformation_issueDate": string;
13
+ "baseInformation_dueDate": string;
14
+ "baseInformation_orderReference_documentNo": string;
15
+ "baseInformation_notes": string;
16
+ "baseInformation_currencyCode": string;
17
+ "billingCalculations_labels_TaxAmountWithoutVat": string;
18
+ "billingCalculations_labels_TotalVatAmount": string;
19
+ "billingCalculations_labels_TotalAmountWithVat": string;
20
+ "billingTaxSummary_taxOverview": string;
21
+ "billingTaxSummary_taxableAmount": string;
22
+ "billingTaxSummary_taxAmount": string;
23
+ "billingLines_title": string;
24
+ "billingLines_itemNo": string;
25
+ "billingLines_name": string;
26
+ "billingLines_quantity": string;
27
+ "billingLines_unitOfMeasure": string;
28
+ "billingLines_unitPriceAmount": string;
29
+ "billingLines_taxCategoryType": string;
30
+ "billingLines_taxCategoryPercentage": string;
31
+ "billingLines_discount": string;
32
+ "billingLines_lineAmount": string;
33
+ "billingLines_taxAmount": string;
34
+ "billingLines_button_addRow": string;
35
+ "deliveryLocation_title": string;
36
+ "deliveryLocation_partyName": string;
37
+ "deliveryLocation_streetNameAndNumber": string;
38
+ "deliveryLocation_postalZone": string;
39
+ "deliveryLocation_city": string;
40
+ "deliveryLocation_countryCode": string;
41
+ "formItem_required_errorMessage": string;
42
+ "paymentMethod_labels_domesticTransfer_bankNo": string;
43
+ "paymentMethod_labels_domesticTransfer_typeNo": string;
44
+ "paymentMethod_labels_domesticTransfer_accountNo": string;
45
+ "paymentMethod_labels_domesticTransfer_paymentReference": string;
46
+ "paymentMethod_labels_icelandicClaim_bankNo": string;
47
+ "paymentMethod_labels_icelandicClaim_claimNo": string;
48
+ "paymentMethod_labels_methods_undefined": string;
49
+ "paymentMethod_labels_methods_mutuallyAgreed": string;
50
+ "paymentMethod_labels_methods_domesticTransfer": string;
51
+ "paymentMethod_labels_methods_domesticClaim": string;
52
+ "paymentMethod_rulles_number": string;
53
+ "supplier_title": string;
54
+ "supplier_name": string;
55
+ "supplier_identifier": string;
56
+ "supplier_vatNumber": string;
57
+ "supplier_address_streetNameAndNumber": string;
58
+ "supplier_address_zip_postalCode": string;
59
+ "supplier_address_city": string;
60
+ "supplier_address_countryCode": string;
61
+ "supplier_contact_email": string;
62
+ "supplier_contact_name": string;
63
+ "supplier_notValidEmail": string;
64
+ "customer_title": string;
65
+ "customer_name": string;
66
+ "customer_identifier": string;
67
+ "customer_address_streetNameAndNumber": string;
68
+ "customer_address_zip_postalCode": string;
69
+ "customer_address_city": string;
70
+ "customer_address_countryCode": string;
71
+ "customer_contact_email": string;
72
+ "customer_contact_name": string;
73
+ };
74
+ };
75
+ export default _default;
@@ -10,5 +10,12 @@ interface CreateSubmitInvoice {
10
10
  services?: string[];
11
11
  invoiceMetadataInput?: InvoiceMetadataInput;
12
12
  }
13
+ interface AttachDocument {
14
+ messageId: string;
15
+ name: string;
16
+ contentType: string;
17
+ more: boolean;
18
+ }
19
+ declare const submitDocument: (data: any, attachDocument: AttachDocument, mapiBaseUrl: string, apiKey?: string | undefined) => AxiosPromise<mapi.MessageOutput>;
13
20
  declare const submitInvoice: (createSubmitInvoice: CreateSubmitInvoice, mapiBaseUrl: string, apiKey?: string | undefined, callName?: string | undefined, language?: LanguageProp) => AxiosPromise<mapi.MessageOutput>;
14
- export { submitInvoice, CreateSubmitInvoice };
21
+ export { submitInvoice, CreateSubmitInvoice, submitDocument, AttachDocument };
@@ -0,0 +1,10 @@
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
+ import React from "react";
5
+ export declare const billingLinesFieldsMetadata: (formInstance: FormInstance) => BillingLineMetadata[];
6
+ export declare const calculateTaxableAmount: (discountValue: string | null | undefined, quantity: number | null, unitPriceAmount: number | null) => number;
7
+ export declare const calculateTaxAmount: (taxableAmount: number, taxPercentage: number) => number;
8
+ export declare const calculateTaxPercentage: (taxCategoryType: TaxCategoryTypeEnum) => number;
9
+ export declare const generateTaxCategoryLabel: (taxCategoryType: TaxCategoryTypeEnum) => string;
10
+ export declare const getCorrectInputNode: (dataIdx: "unitOfMeasure" | "itemNo" | "name" | "description" | "quantity" | "unitPriceAmount" | "taxCategoryType" | "taxableAmount" | "taxAmount" | "taxPercentage" | "discountValue" | "discountReason" | "notes" | "accountingCost" | "billingPeriod" | "buyersItemNo" | "standardItemNo" | "originCountryCode" | "commodityClassification" | "additionalItemProperties" | "referenceIdentifiers" | "orderLineReference" | "key") => React.ReactChild;
@@ -1,5 +1,6 @@
1
- import { InvoiceMetadataInput } from "@unimaze/api-clients/lib/mapi";
1
+ import { BillingLineMetadata, InvoiceMetadataInput } from "@unimaze/api-clients/lib/mapi";
2
2
  import { Store } from "antd/es/form/interface";
3
3
  import { ProfileOutput } from "@unimaze/api-clients/lib/wapi2";
4
- declare const convertToInvoiceMetadataInput: (formValues: Store, customer: ProfileOutput) => InvoiceMetadataInput;
5
- export { /*convertToCreditNoteMetadataInput,*/ convertToInvoiceMetadataInput };
4
+ import { PaymentMeansMetadata } from "@unimaze/api-clients/lib/mapi/api";
5
+ declare const convertToInvoiceMetadataInput: (formValues: Store, billingLines: BillingLineMetadata[], paymentMethod: PaymentMeansMetadata, customer?: ProfileOutput | undefined) => InvoiceMetadataInput;
6
+ export { convertToInvoiceMetadataInput };
@@ -1,3 +1,5 @@
1
+ import React from 'react';
1
2
  import { AvailableFields, FieldRequirement, ReceiverRequirements } from "../common/types/ReceiverRequirements";
2
3
  export declare const getReceiverRequirements: (recRequirements: ReceiverRequirements, key: AvailableFields) => FieldRequirement;
3
- export declare const getReceiverRequirementsLabelWithDefault: (recRequirements: ReceiverRequirements, key: AvailableFields, defaultLabel: string) => string;
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;
@@ -1,2 +1,2 @@
1
1
  export { convertToInvoiceMetadataInput } from "./ConversionUtility";
2
- export { submitInvoice, CreateSubmitInvoice } from "./ApiUtility";
2
+ export { submitInvoice, CreateSubmitInvoice, submitDocument, AttachDocument } from "./ApiUtility";
@@ -0,0 +1,71 @@
1
+ {
2
+ "attachment_labels_Reference": "Reference",
3
+ "attachment_labels_Reference_requiredMessage": "Please input the reference",
4
+ "attachment_labels_Description": "Description",
5
+ "attachment_labels_Description_requiredMessage": "Please input the description",
6
+ "attachment_labels_File": "File",
7
+ "attachment_title": "Attachments",
8
+ "baseInformation_title": "Base Information",
9
+ "baseInformation_invoiceNo": "Invoice No",
10
+ "baseInformation_issueDate": "Issue date",
11
+ "baseInformation_dueDate": "Due date",
12
+ "baseInformation_orderReference_documentNo": "Order no",
13
+ "baseInformation_notes": "Notes",
14
+ "baseInformation_currencyCode": "Currency",
15
+ "billingCalculations_labels_TaxAmountWithoutVat": "Total amount without VAT",
16
+ "billingCalculations_labels_TotalVatAmount": "Total VAT amount",
17
+ "billingCalculations_labels_TotalAmountWithVat": "Total amount with VAT",
18
+ "billingTaxSummary_taxOverview": "Tax overview",
19
+ "billingTaxSummary_taxableAmount": "Taxable amount",
20
+ "billingTaxSummary_taxAmount": "Tax",
21
+ "billingLines_title": "Document lines",
22
+ "billingLines_itemNo": "Item no",
23
+ "billingLines_name": "Name",
24
+ "billingLines_quantity": "Quantity",
25
+ "billingLines_unitOfMeasure": "Unit of measure",
26
+ "billingLines_unitPriceAmount": "Unit price amount",
27
+ "billingLines_taxCategoryType": "Tax category",
28
+ "billingLines_taxCategoryPercentage": "Tax percentage",
29
+ "billingLines_discount": "Discount",
30
+ "billingLines_lineAmount": "Amount",
31
+ "billingLines_taxAmount": "Tax inclusive amount",
32
+ "billingLines_button_addRow": "Add a row",
33
+ "deliveryLocation_title": "Delivery location",
34
+ "deliveryLocation_partyName": "Party name",
35
+ "deliveryLocation_streetNameAndNumber": "Address",
36
+ "deliveryLocation_postalZone": "Postal no",
37
+ "deliveryLocation_city": "Town/City",
38
+ "deliveryLocation_countryCode": "Country code",
39
+ "formItem_required_errorMessage": "This field is required",
40
+ "paymentMethod_labels_domesticTransfer_bankNo": "Bank no",
41
+ "paymentMethod_labels_domesticTransfer_typeNo": "Type no",
42
+ "paymentMethod_labels_domesticTransfer_accountNo": "Account no",
43
+ "paymentMethod_labels_domesticTransfer_paymentReference": "Payment reference",
44
+ "paymentMethod_labels_icelandicClaim_bankNo": "Bank no",
45
+ "paymentMethod_labels_icelandicClaim_claimNo": "Claim no",
46
+ "paymentMethod_labels_methods_undefined": "Undefined",
47
+ "paymentMethod_labels_methods_mutuallyAgreed": "Mutually agreed",
48
+ "paymentMethod_labels_methods_domesticTransfer": "Domestic transfer",
49
+ "paymentMethod_labels_methods_domesticClaim": "Claim (Icelandic)",
50
+ "paymentMethod_rulles_number": "Please use only number characters",
51
+ "supplier_title": "Supplier",
52
+ "supplier_name": "Supplier name",
53
+ "supplier_identifier": "Identifier",
54
+ "supplier_vatNumber": "VAT no",
55
+ "supplier_address_streetNameAndNumber": "Address",
56
+ "supplier_address_zip_postalCode": "Zip/Postal code",
57
+ "supplier_address_city": "City",
58
+ "supplier_address_countryCode": "Country code",
59
+ "supplier_contact_email": "E-Mail",
60
+ "supplier_contact_name": "Contact name",
61
+ "supplier_notValidEmail": "This is not a valid E-Mail",
62
+ "customer_title": "Customer",
63
+ "customer_name": "Customer name",
64
+ "customer_identifier": "Identifier",
65
+ "customer_address_streetNameAndNumber": "Address",
66
+ "customer_address_zip_postalCode": "Zip/Postal code",
67
+ "customer_address_city": "City",
68
+ "customer_address_countryCode": "Country code",
69
+ "customer_contact_email": "E-Mail",
70
+ "customer_contact_name": "Contact name"
71
+ }