@unimaze/billing 0.13.2 → 0.15.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.
- package/lib/common/components/base-information/CostCenter.d.ts +12 -0
- package/lib/common/components/base-information/CostCenter.js +107 -0
- package/lib/common/components/base-information/index.js +24 -11
- package/lib/common/types/ReceiverRequirements.d.ts +1 -0
- package/lib/common/types/ReceiverRequirements.js +1 -0
- package/lib/create-invoice/CreateInvoiceConstructor.d.ts +11 -0
- package/lib/create-invoice/CreateInvoiceConstructor.js +213 -0
- package/lib/create-invoice/index.js +45 -15
- package/lib/example/src/index.d.ts +1 -0
- package/lib/src/common/components/attachments/Attachment.d.ts +18 -0
- package/lib/src/common/components/attachments/index.d.ts +6 -0
- package/lib/src/common/components/base-information/ReferenceIdentifiers.d.ts +17 -0
- package/lib/src/common/components/base-information/index.d.ts +11 -0
- package/lib/src/common/components/billing-lines/BillingCalculations.d.ts +11 -0
- package/lib/src/common/components/billing-lines/BillingTaxSummary.d.ts +10 -0
- package/lib/src/common/components/billing-lines/index.d.ts +19 -0
- package/lib/src/common/components/component-container/Content.d.ts +7 -0
- package/lib/src/common/components/component-container/Header.d.ts +9 -0
- package/lib/src/common/components/component-container/index.d.ts +10 -0
- package/lib/src/common/components/customer/index.d.ts +15 -0
- package/lib/src/common/components/delivery-location/index.d.ts +6 -0
- package/lib/src/common/components/editable-cell/index.d.ts +11 -0
- package/lib/src/common/components/editable-row/index.d.ts +5 -0
- package/lib/src/common/components/form-item/index.d.ts +23 -0
- package/lib/src/common/components/index.d.ts +10 -0
- package/lib/src/common/components/locale-intl/index.d.ts +10 -0
- package/lib/src/common/components/payment-method/index.d.ts +6 -0
- package/lib/src/common/components/payment-method/paymentMethodForConversion.d.ts +9 -0
- package/lib/src/common/components/supplier/index.d.ts +10 -0
- package/lib/src/common/consts/formLayout.d.ts +44 -0
- package/lib/src/common/consts/validationRules.d.ts +6 -0
- package/lib/src/common/types/ReceiverRequirements.d.ts +81 -0
- package/lib/src/create-invoice/index.d.ts +14 -0
- package/lib/src/translations/locales.d.ts +77 -0
- package/lib/src/utils/ApiUtility.d.ts +21 -0
- package/lib/src/utils/BillingLineUtility.d.ts +10 -0
- package/lib/src/utils/ConversionUtility.d.ts +8 -0
- package/lib/src/utils/RequirementsUtility.d.ts +5 -0
- package/lib/src/utils/index.d.ts +2 -0
- package/lib/style/index.css +50 -50
- package/lib/translations/locales/is.json +3 -0
- package/lib/translations/locales.d.ts +3 -0
- package/lib/utils/ConversionUtility.js +7 -0
- package/package.json +2 -3
|
@@ -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,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { BillingLineMetadata } from "@unimaze/api-clients/lib/mapi/models";
|
|
3
|
+
import { InjectedIntlProps } from "react-intl";
|
|
4
|
+
import { BillingLineMetadataOverride } from "../../types/BillingLineMetadataOverride";
|
|
5
|
+
import { FormInstance } from "antd/es/form";
|
|
6
|
+
interface Props extends InjectedIntlProps {
|
|
7
|
+
formInstance: FormInstance;
|
|
8
|
+
setBillingLineMetadata: (formInstance: FormInstance, billingLineMetadata: BillingLineMetadata[]) => void;
|
|
9
|
+
dataSource: BillingLineMetadataOverride[];
|
|
10
|
+
handleDelete: (index: number) => void;
|
|
11
|
+
handleAdd: (billingLineToAdd: BillingLineMetadataOverride) => void;
|
|
12
|
+
handleSave: (row: BillingLineMetadataOverride, formInstance: FormInstance) => void;
|
|
13
|
+
initialBillingLineData: BillingLineMetadataOverride;
|
|
14
|
+
editableIndex: number;
|
|
15
|
+
}
|
|
16
|
+
declare const BillingLinesIntl: React.ComponentClass<Pick<Props, "formInstance" | "setBillingLineMetadata" | "dataSource" | "handleDelete" | "handleAdd" | "handleSave" | "initialBillingLineData" | "editableIndex">, any> & {
|
|
17
|
+
WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
|
|
18
|
+
};
|
|
19
|
+
export default BillingLinesIntl;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconProps } from "@ant-design/compatible/es/icon";
|
|
3
|
+
interface HeaderProps {
|
|
4
|
+
iconProps?: IconProps;
|
|
5
|
+
title?: string | React.ReactNode;
|
|
6
|
+
action?: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
declare const Header: React.FC<HeaderProps>;
|
|
9
|
+
export default Header;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconProps } from "@ant-design/compatible/es/icon";
|
|
3
|
+
interface Props {
|
|
4
|
+
iconProps?: IconProps;
|
|
5
|
+
title?: string | React.ReactNode;
|
|
6
|
+
action?: React.ReactNode;
|
|
7
|
+
noPadding?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const ComponentContainer: React.FC<Props>;
|
|
10
|
+
export default ComponentContainer;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InjectedIntlProps } from "react-intl";
|
|
3
|
+
import { ProfileOutput } from "@unimaze/api-clients/lib/wapi2";
|
|
4
|
+
import { FormInstance } from "antd/es/form";
|
|
5
|
+
import { PartyMetadata } from "@unimaze/api-clients/lib/mapi";
|
|
6
|
+
interface Props extends InjectedIntlProps {
|
|
7
|
+
customers: ProfileOutput[];
|
|
8
|
+
formInstance: FormInstance;
|
|
9
|
+
chosenCustomer: PartyMetadata | undefined;
|
|
10
|
+
setChosenCustomer: (chosenCustomer: PartyMetadata) => void;
|
|
11
|
+
}
|
|
12
|
+
declare const CustomerIntl: React.ComponentClass<Pick<Props, "chosenCustomer" | "setChosenCustomer" | "customers" | "formInstance">, any> & {
|
|
13
|
+
WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
|
|
14
|
+
};
|
|
15
|
+
export default CustomerIntl;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
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,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BillingLineMetadataOverride } from "../../types/BillingLineMetadataOverride";
|
|
3
|
+
interface EditableCellProps {
|
|
4
|
+
record: BillingLineMetadataOverride;
|
|
5
|
+
handleSave: (billingLineMetadata: BillingLineMetadataOverride) => void;
|
|
6
|
+
dataIndex: keyof Omit<BillingLineMetadataOverride, 'key'>;
|
|
7
|
+
editable: boolean;
|
|
8
|
+
index: number;
|
|
9
|
+
}
|
|
10
|
+
declare const EditableCell: React.FC<EditableCellProps>;
|
|
11
|
+
export default EditableCell;
|
|
@@ -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" | "receiverRequirementsKey" | "defaultLabel" | "defaultIsRequired" | "additionalRules" | "verticalLabels" | "onlyLabelOnFirstInList" | "index">, any> & {
|
|
21
|
+
WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
|
|
22
|
+
};
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { default as Attachments } from "./attachments";
|
|
2
|
+
export { default as BaseInformation } from "./base-information";
|
|
3
|
+
export { default as BillingLines } from "./billing-lines";
|
|
4
|
+
export { default as ComponentContainer } from "./component-container";
|
|
5
|
+
export { default as Customer } from "./customer";
|
|
6
|
+
export { default as DeliveryLocation } from "./delivery-location";
|
|
7
|
+
export { default as EditableCell } from "./editable-cell";
|
|
8
|
+
export { default as EditableRow } from "./editable-row";
|
|
9
|
+
export { default as PaymentMethod } from "./payment-method";
|
|
10
|
+
export { default as Supplier } from "./supplier";
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { InjectedIntlProps } from "react-intl";
|
|
3
|
+
import { BillingLineMetadataOverride } from "../../types/BillingLineMetadataOverride";
|
|
4
|
+
interface Props extends InjectedIntlProps {
|
|
5
|
+
billingLinesDataSource: BillingLineMetadataOverride[];
|
|
6
|
+
}
|
|
7
|
+
declare const SupplierIntl: React.ComponentClass<Pick<Props, "billingLinesDataSource">, any> & {
|
|
8
|
+
WrappedComponent: React.ComponentType<Props & InjectedIntlProps>;
|
|
9
|
+
};
|
|
10
|
+
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 };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BillingLineMetadataOverride } from "../types/BillingLineMetadataOverride";
|
|
2
|
+
import { Rule } from "rc-field-form/lib/interface";
|
|
3
|
+
export declare type ValidationRulesObject = {
|
|
4
|
+
[key in keyof Omit<BillingLineMetadataOverride, 'key'>]: Rule[];
|
|
5
|
+
};
|
|
6
|
+
export declare const validationRules: ValidationRulesObject;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
interface Values {
|
|
2
|
+
key?: string;
|
|
3
|
+
label?: string;
|
|
4
|
+
values?: Values[];
|
|
5
|
+
}
|
|
6
|
+
interface FieldRequirement extends Values {
|
|
7
|
+
isRequired: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare type ReceiverRequirements = {
|
|
10
|
+
[key in AvailableFields]?: FieldRequirement;
|
|
11
|
+
};
|
|
12
|
+
export declare enum AvailableFields {
|
|
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"
|
|
79
|
+
}
|
|
80
|
+
export { ReceiverRequirements, FieldRequirement };
|
|
81
|
+
export declare const receiverRequirementsObject: ReceiverRequirements;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import "../style/index.css";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ProfileOutput } from "@unimaze/api-clients/lib/wapi2";
|
|
4
|
+
import { CommonProps } from "../common/types/CommonProps";
|
|
5
|
+
interface Props extends CommonProps {
|
|
6
|
+
customers: ProfileOutput[];
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Component for creating a form for creating an invoice and submitting it to the MAPI transaction services
|
|
10
|
+
*
|
|
11
|
+
* @component
|
|
12
|
+
*/
|
|
13
|
+
declare const CreateInvoice: React.FC<Props>;
|
|
14
|
+
export default CreateInvoice;
|
|
@@ -0,0 +1,77 @@
|
|
|
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
|
+
"referenceIdentifiers_labels_addButton": string;
|
|
74
|
+
"referenceIdentifiers_labels_referenceIdentifier": string;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { mapi } from "@unimaze/api-clients";
|
|
2
|
+
import { InvoiceMetadataInput, TransactionProcessingMode } from "@unimaze/api-clients/lib/mapi/api";
|
|
3
|
+
import { AxiosPromise } from "axios";
|
|
4
|
+
import { LanguageProp } from "../common/types/CommonProps";
|
|
5
|
+
interface CreateSubmitInvoice {
|
|
6
|
+
messageId: string;
|
|
7
|
+
more: boolean;
|
|
8
|
+
conversationIdentifier?: string;
|
|
9
|
+
processingMode?: TransactionProcessingMode;
|
|
10
|
+
services?: string[];
|
|
11
|
+
invoiceMetadataInput?: InvoiceMetadataInput;
|
|
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>;
|
|
20
|
+
declare const submitInvoice: (createSubmitInvoice: CreateSubmitInvoice, mapiBaseUrl: string, apiKey?: string | undefined, callName?: string | undefined, language?: LanguageProp) => AxiosPromise<mapi.MessageOutput>;
|
|
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;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BillingLineMetadata, InvoiceMetadataInput, PartyMetadata } from "@unimaze/api-clients/lib/mapi";
|
|
2
|
+
import { Store } from "antd/es/form/interface";
|
|
3
|
+
import { ProfileOutput } from "@unimaze/api-clients/lib/wapi2";
|
|
4
|
+
import { PaymentMeansMetadata } from "@unimaze/api-clients/lib/mapi/api";
|
|
5
|
+
declare const convertToInvoiceMetadataInput: (formValues: Store, billingLines: BillingLineMetadata[], paymentMethod: PaymentMeansMetadata, chosenCustomer: PartyMetadata) => InvoiceMetadataInput;
|
|
6
|
+
declare const profileOutputToPartyMetadata: (profileOutput: ProfileOutput) => PartyMetadata;
|
|
7
|
+
declare const convertToReadableKennitala: (isoIdentifier: string) => string;
|
|
8
|
+
export { convertToInvoiceMetadataInput, profileOutputToPartyMetadata, convertToReadableKennitala };
|
|
@@ -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;
|
package/lib/style/index.css
CHANGED
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
.component_header {
|
|
2
|
-
height: 3.3em;
|
|
3
|
-
background-color: #fff;
|
|
4
|
-
border-bottom: solid 1px #d9d9d9;
|
|
5
|
-
border-radius: 4px 4px 0 0;
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
justify-content: space-between;
|
|
9
|
-
padding: 1em 2em;
|
|
10
|
-
}
|
|
11
|
-
.component_header_title {
|
|
12
|
-
font-size: 1.1em;
|
|
13
|
-
}
|
|
14
|
-
.component_header_title > span > i {
|
|
15
|
-
font-size: 20px;
|
|
16
|
-
}
|
|
17
|
-
.header_icon {
|
|
18
|
-
font-size: 1.5em;
|
|
19
|
-
margin-right: 0.75em;
|
|
20
|
-
color: #1890ff;
|
|
21
|
-
}
|
|
22
|
-
.header_right {
|
|
23
|
-
display: flex;
|
|
24
|
-
justify-content: flex-end;
|
|
25
|
-
}
|
|
26
|
-
@media screen and (max-width: 768px) {
|
|
27
|
-
.header_right {
|
|
28
|
-
justify-content: flex-start;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
.header_right > button {
|
|
32
|
-
margin-bottom: unset !important;
|
|
33
|
-
}
|
|
34
|
-
.component_body {
|
|
35
|
-
border-radius: 0 0 4px 4px;
|
|
36
|
-
}
|
|
37
|
-
.component_wrapper {
|
|
38
|
-
align-self: stretch;
|
|
39
|
-
height: 100%;
|
|
40
|
-
background-color: #fff;
|
|
41
|
-
border: solid 1px #d9d9d9;
|
|
42
|
-
border-radius: 4px;
|
|
43
|
-
}
|
|
44
|
-
.component_wrapper_padding {
|
|
45
|
-
padding: 1em;
|
|
46
|
-
}
|
|
47
|
-
.umz_noValidationMessage .ant-form-item-explain {
|
|
48
|
-
height: 20px !important;
|
|
49
|
-
visibility: hidden !important;
|
|
50
|
-
}
|
|
1
|
+
.component_header {
|
|
2
|
+
height: 3.3em;
|
|
3
|
+
background-color: #fff;
|
|
4
|
+
border-bottom: solid 1px #d9d9d9;
|
|
5
|
+
border-radius: 4px 4px 0 0;
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: space-between;
|
|
9
|
+
padding: 1em 2em;
|
|
10
|
+
}
|
|
11
|
+
.component_header_title {
|
|
12
|
+
font-size: 1.1em;
|
|
13
|
+
}
|
|
14
|
+
.component_header_title > span > i {
|
|
15
|
+
font-size: 20px;
|
|
16
|
+
}
|
|
17
|
+
.header_icon {
|
|
18
|
+
font-size: 1.5em;
|
|
19
|
+
margin-right: 0.75em;
|
|
20
|
+
color: #1890ff;
|
|
21
|
+
}
|
|
22
|
+
.header_right {
|
|
23
|
+
display: flex;
|
|
24
|
+
justify-content: flex-end;
|
|
25
|
+
}
|
|
26
|
+
@media screen and (max-width: 768px) {
|
|
27
|
+
.header_right {
|
|
28
|
+
justify-content: flex-start;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
.header_right > button {
|
|
32
|
+
margin-bottom: unset !important;
|
|
33
|
+
}
|
|
34
|
+
.component_body {
|
|
35
|
+
border-radius: 0 0 4px 4px;
|
|
36
|
+
}
|
|
37
|
+
.component_wrapper {
|
|
38
|
+
align-self: stretch;
|
|
39
|
+
height: 100%;
|
|
40
|
+
background-color: #fff;
|
|
41
|
+
border: solid 1px #d9d9d9;
|
|
42
|
+
border-radius: 4px;
|
|
43
|
+
}
|
|
44
|
+
.component_wrapper_padding {
|
|
45
|
+
padding: 1em;
|
|
46
|
+
}
|
|
47
|
+
.umz_noValidationMessage .ant-form-item-explain {
|
|
48
|
+
height: 20px !important;
|
|
49
|
+
visibility: hidden !important;
|
|
50
|
+
}
|
|
51
51
|
/*# sourceMappingURL=index.css.map */
|
|
@@ -141,6 +141,9 @@
|
|
|
141
141
|
"createInvoice_successfullyUploadedAttachmentMsg": "Það tókst að hlaða upp viðhenginu {attachment}",
|
|
142
142
|
"createInvoice_ErrorUploadedAttachmentMsg": "Villa við að hlaða upp viðhenginu {attachment}",
|
|
143
143
|
"createInvoice_Submit": "Senda",
|
|
144
|
+
"createInvoice_SendCopy": "Senda afrit",
|
|
145
|
+
"createInvoice_SendCopyTooltip": "Sendir þér afrit af reikningnum sem PDF",
|
|
146
|
+
"createInvoice_SendCopyTooltipDisabled": "Netfang þarf að fyllast út til þess að hægt sé að senda þér afrit",
|
|
144
147
|
"billingLines_labels_addButton": "Bæta við línu",
|
|
145
148
|
"rulesMessages_name_required": "Vinsamlega sláið inn heiti hluts",
|
|
146
149
|
"rulesMessages_unitOfMeasure_required": "Vinsamlega veljið mælieiningu",
|
|
@@ -143,6 +143,9 @@ declare const _default: {
|
|
|
143
143
|
"createInvoice_successfullyUploadedAttachmentMsg": string;
|
|
144
144
|
"createInvoice_ErrorUploadedAttachmentMsg": string;
|
|
145
145
|
"createInvoice_Submit": string;
|
|
146
|
+
"createInvoice_SendCopy": string;
|
|
147
|
+
"createInvoice_SendCopyTooltip": string;
|
|
148
|
+
"createInvoice_SendCopyTooltipDisabled": string;
|
|
146
149
|
"billingLines_labels_addButton": string;
|
|
147
150
|
"rulesMessages_name_required": string;
|
|
148
151
|
"rulesMessages_unitOfMeasure_required": string;
|
|
@@ -99,6 +99,12 @@ var convertToInvoiceMetadataInput = function (formValues, invoiceLinesWithCalcul
|
|
|
99
99
|
var orderReference = invoice.orderReference && invoice.orderReference.hasOwnProperty("documentNo")
|
|
100
100
|
? invoice.orderReference
|
|
101
101
|
: undefined;
|
|
102
|
+
// NBNB: FOR NOW THIS IS ONLY FOR PROJECT, CREATE FUNCTION THAT WOULD RETURN CORRECT OBJECT STRUCTURE IF OTHER PROPERTIES ARE BEING USED
|
|
103
|
+
var documentReferences = invoice.documentReferences
|
|
104
|
+
&& invoice.documentReferences.project
|
|
105
|
+
&& invoice.documentReferences.project.documentNo
|
|
106
|
+
? invoice.documentReferences
|
|
107
|
+
: undefined;
|
|
102
108
|
var resp = {
|
|
103
109
|
messageHandling: getMessageHandling(chosenCustomer),
|
|
104
110
|
invoice: {
|
|
@@ -144,6 +150,7 @@ var convertToInvoiceMetadataInput = function (formValues, invoiceLinesWithCalcul
|
|
|
144
150
|
buyerReference: invoice.buyerReference,
|
|
145
151
|
paymentMeans: paymentMethod,
|
|
146
152
|
referenceIdentifiers: referenceIdentifiers,
|
|
153
|
+
documentReferences: documentReferences,
|
|
147
154
|
orderReference: orderReference,
|
|
148
155
|
}
|
|
149
156
|
};
|