@spaceinvoices/react-ui 0.4.1 → 0.4.3
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/cli/dist/index.js +1 -1
- package/package.json +1 -1
- package/registry.json +25 -0
- package/src/components/advance-invoices/advance-invoices.hooks.ts +32 -2
- package/src/components/advance-invoices/create/create-advance-invoice-form.tsx +109 -4
- package/src/components/advance-invoices/create/locales/de.ts +2 -0
- package/src/components/advance-invoices/create/locales/es.ts +2 -0
- package/src/components/advance-invoices/create/locales/fr.ts +2 -0
- package/src/components/advance-invoices/create/locales/hr.ts +2 -0
- package/src/components/advance-invoices/create/locales/it.ts +2 -0
- package/src/components/advance-invoices/create/locales/nl.ts +2 -0
- package/src/components/advance-invoices/create/locales/pl.ts +2 -0
- package/src/components/advance-invoices/create/locales/pt.ts +2 -0
- package/src/components/advance-invoices/create/locales/sl.ts +2 -0
- package/src/components/advance-invoices/create/prepare-advance-invoice-submission.ts +17 -0
- package/src/components/advance-invoices/list/list-row-actions.tsx +3 -6
- package/src/components/advance-invoices/list/list-table.tsx +105 -2
- package/src/components/advance-invoices/list/locales/de.ts +4 -0
- package/src/components/advance-invoices/list/locales/en.ts +4 -0
- package/src/components/advance-invoices/list/locales/es.ts +4 -0
- package/src/components/advance-invoices/list/locales/fr.ts +4 -0
- package/src/components/advance-invoices/list/locales/hr.ts +4 -0
- package/src/components/advance-invoices/list/locales/it.ts +4 -0
- package/src/components/advance-invoices/list/locales/nl.ts +4 -0
- package/src/components/advance-invoices/list/locales/pl.ts +4 -0
- package/src/components/advance-invoices/list/locales/pt.ts +4 -0
- package/src/components/advance-invoices/list/locales/sl.ts +4 -0
- package/src/components/credit-notes/create/create-credit-note-form.tsx +177 -6
- package/src/components/credit-notes/create/locales/de.ts +8 -0
- package/src/components/credit-notes/create/locales/es.ts +8 -0
- package/src/components/credit-notes/create/locales/fr.ts +7 -0
- package/src/components/credit-notes/create/locales/hr.ts +7 -0
- package/src/components/credit-notes/create/locales/it.ts +9 -0
- package/src/components/credit-notes/create/locales/nl.ts +7 -0
- package/src/components/credit-notes/create/locales/pl.ts +7 -0
- package/src/components/credit-notes/create/locales/pt.ts +7 -0
- package/src/components/credit-notes/create/locales/sl.ts +7 -0
- package/src/components/credit-notes/credit-notes.hooks.ts +30 -0
- package/src/components/credit-notes/list/list-row-actions.tsx +3 -6
- package/src/components/credit-notes/list/list-table.tsx +79 -8
- package/src/components/credit-notes/list/locales/de.ts +4 -1
- package/src/components/credit-notes/list/locales/en.ts +5 -0
- package/src/components/credit-notes/list/locales/es.ts +4 -1
- package/src/components/credit-notes/list/locales/fr.ts +4 -1
- package/src/components/credit-notes/list/locales/hr.ts +4 -1
- package/src/components/credit-notes/list/locales/it.ts +4 -1
- package/src/components/credit-notes/list/locales/nl.ts +4 -1
- package/src/components/credit-notes/list/locales/pl.ts +4 -1
- package/src/components/credit-notes/list/locales/pt.ts +4 -1
- package/src/components/credit-notes/list/locales/sl.ts +4 -1
- package/src/components/customers/create-customer-form/create-customer-form.tsx +0 -1
- package/src/components/dashboard/collection-rate-card/use-collection-rate.ts +2 -2
- package/src/components/dashboard/invoice-status-chart/use-invoice-status.ts +3 -3
- package/src/components/dashboard/payment-methods-chart/use-payment-methods.ts +1 -1
- package/src/components/dashboard/payment-trend-chart/use-payment-trend.ts +1 -1
- package/src/components/dashboard/revenue-trend-chart/use-revenue-trend.ts +1 -1
- package/src/components/dashboard/shared/use-revenue-data.ts +4 -4
- package/src/components/dashboard/shared/use-stats-counts.ts +4 -4
- package/src/components/dashboard/shared/use-stats-query.ts +1 -1
- package/src/components/dashboard/tax-collected-card/use-tax-collected.ts +2 -2
- package/src/components/dashboard/top-customers-chart/use-top-customers.ts +1 -1
- package/src/components/delivery-notes/create/create-delivery-note-form.tsx +332 -0
- package/src/components/delivery-notes/create/locales/de.ts +50 -0
- package/src/components/delivery-notes/create/locales/es.ts +49 -0
- package/src/components/delivery-notes/create/locales/fr.ts +50 -0
- package/src/components/delivery-notes/create/locales/hr.ts +49 -0
- package/src/components/delivery-notes/create/locales/it.ts +49 -0
- package/src/components/delivery-notes/create/locales/nl.ts +50 -0
- package/src/components/delivery-notes/create/locales/pl.ts +49 -0
- package/src/components/delivery-notes/create/locales/pt.ts +50 -0
- package/src/components/delivery-notes/create/locales/sl.ts +49 -0
- package/src/components/delivery-notes/create/prepare-delivery-note-submission.ts +38 -0
- package/src/components/delivery-notes/create/use-delivery-note-customer-form.ts +1 -0
- package/src/components/delivery-notes/delivery-notes.hooks.ts +15 -0
- package/src/components/delivery-notes/list/index.ts +3 -0
- package/src/components/delivery-notes/list/list-row-actions.tsx +103 -0
- package/src/components/delivery-notes/list/list-table.tsx +214 -0
- package/src/components/delivery-notes/list/locales/de.ts +9 -0
- package/src/components/delivery-notes/list/locales/en.ts +11 -0
- package/src/components/delivery-notes/list/locales/es.ts +9 -0
- package/src/components/delivery-notes/list/locales/fr.ts +9 -0
- package/src/components/delivery-notes/list/locales/hr.ts +9 -0
- package/src/components/delivery-notes/list/locales/it.ts +9 -0
- package/src/components/delivery-notes/list/locales/nl.ts +9 -0
- package/src/components/delivery-notes/list/locales/pl.ts +9 -0
- package/src/components/delivery-notes/list/locales/pt.ts +9 -0
- package/src/components/delivery-notes/list/locales/sl.ts +9 -0
- package/src/components/delivery-notes/list/use-delivery-note-download.ts +63 -0
- package/src/components/documents/create/document-details-section.tsx +103 -33
- package/src/components/documents/create/live-preview.tsx +37 -10
- package/src/components/documents/create/mark-as-paid-section.tsx +11 -2
- package/src/components/documents/create/prepare-document-submission.ts +1 -1
- package/src/components/documents/documents.hooks.ts +2 -1
- package/src/components/documents/shared/document-preview-display.tsx +12 -5
- package/src/components/documents/types.ts +10 -1
- package/src/components/documents/view/document-actions-bar.tsx +30 -0
- package/src/components/documents/view/document-details-card.tsx +3 -3
- package/src/components/documents/view/document-payments-list.tsx +3 -3
- package/src/components/documents/view/document-relations-list.tsx +105 -0
- package/src/components/documents/view/locales/de.ts +26 -0
- package/src/components/documents/view/locales/es.ts +26 -0
- package/src/components/documents/view/locales/fr.ts +26 -0
- package/src/components/documents/view/locales/hr.ts +26 -0
- package/src/components/documents/view/locales/it.ts +26 -0
- package/src/components/documents/view/locales/nl.ts +26 -0
- package/src/components/documents/view/locales/pl.ts +26 -0
- package/src/components/documents/view/locales/pt.ts +26 -0
- package/src/components/documents/view/locales/sl.ts +26 -0
- package/src/components/documents/view/use-document-download.ts +5 -3
- package/src/components/entities/create-entity-form.tsx +1 -1
- package/src/components/entities/entity-settings-form/entity-settings-form.tsx +2 -3
- package/src/components/entities/entity-settings-form/locales/es.ts +2 -0
- package/src/components/entities/entity-settings-form/locales/fr.ts +2 -0
- package/src/components/entities/entity-settings-form/locales/hr.ts +2 -0
- package/src/components/entities/entity-settings-form/locales/it.ts +2 -0
- package/src/components/entities/entity-settings-form/locales/nl.ts +2 -0
- package/src/components/entities/entity-settings-form/locales/pl.ts +2 -0
- package/src/components/entities/entity-settings-form/locales/pt.ts +2 -0
- package/src/components/entities/fina-settings-form/fina-operator-required-dialog.tsx +109 -0
- package/src/components/entities/fina-settings-form/fina-settings-form.tsx +377 -35
- package/src/components/entities/fina-settings-form/fina-settings.hooks.ts +106 -20
- package/src/components/entities/fina-settings-form/index.ts +1 -0
- package/src/components/entities/fina-settings-form/locales/de.ts +54 -34
- package/src/components/entities/fina-settings-form/locales/en.ts +51 -34
- package/src/components/entities/fina-settings-form/locales/es.ts +50 -34
- package/src/components/entities/fina-settings-form/locales/fr.ts +50 -34
- package/src/components/entities/fina-settings-form/locales/hr.ts +50 -34
- package/src/components/entities/fina-settings-form/locales/it.ts +50 -34
- package/src/components/entities/fina-settings-form/locales/nl.ts +50 -34
- package/src/components/entities/fina-settings-form/locales/pl.ts +50 -34
- package/src/components/entities/fina-settings-form/locales/pt.ts +50 -34
- package/src/components/entities/fina-settings-form/locales/sl.ts +50 -34
- package/src/components/entities/fina-settings-form/sections/certificate-settings-section.tsx +18 -0
- package/src/components/entities/fina-settings-form/sections/premises-management-section.tsx +64 -89
- package/src/components/entities/fina-settings-form/sections/register-premise-dialog.tsx +51 -323
- package/src/components/entities/furs-settings-form/furs-operator-required-dialog.tsx +106 -0
- package/src/components/entities/furs-settings-form/furs-settings-form.tsx +33 -10
- package/src/components/entities/furs-settings-form/furs-settings.hooks.ts +12 -11
- package/src/components/entities/furs-settings-form/index.ts +1 -0
- package/src/components/entities/furs-settings-form/locales/de.ts +27 -3
- package/src/components/entities/furs-settings-form/locales/en.ts +17 -3
- package/src/components/entities/furs-settings-form/locales/es.ts +26 -3
- package/src/components/entities/furs-settings-form/locales/fr.ts +26 -3
- package/src/components/entities/furs-settings-form/locales/hr.ts +26 -3
- package/src/components/entities/furs-settings-form/locales/it.ts +26 -3
- package/src/components/entities/furs-settings-form/locales/nl.ts +26 -3
- package/src/components/entities/furs-settings-form/locales/pl.ts +26 -3
- package/src/components/entities/furs-settings-form/locales/pt.ts +26 -3
- package/src/components/entities/furs-settings-form/locales/sl.ts +16 -3
- package/src/components/entities/furs-settings-form/sections/certificate-settings-section.tsx +22 -0
- package/src/components/entities/furs-settings-form/sections/general-settings-section.tsx +26 -5
- package/src/components/entities/furs-settings-form/sections/register-premise-dialog.tsx +14 -2
- package/src/components/entities/settings/tax-rules-settings-form.tsx +4 -4
- package/src/components/estimates/list/list-row-actions.tsx +3 -7
- package/src/components/estimates/list/list-table.tsx +35 -2
- package/src/components/estimates/list/locales/de.ts +3 -0
- package/src/components/estimates/list/locales/en.ts +3 -0
- package/src/components/estimates/list/locales/es.ts +3 -0
- package/src/components/estimates/list/locales/fr.ts +3 -0
- package/src/components/estimates/list/locales/hr.ts +3 -0
- package/src/components/estimates/list/locales/it.ts +3 -0
- package/src/components/estimates/list/locales/nl.ts +3 -0
- package/src/components/estimates/list/locales/pl.ts +3 -0
- package/src/components/estimates/list/locales/pt.ts +3 -0
- package/src/components/estimates/list/locales/sl.ts +3 -0
- package/src/components/export/document-export-form.tsx +34 -34
- package/src/components/invoices/create/create-invoice-form.tsx +107 -5
- package/src/components/invoices/create/prepare-invoice-submission.ts +17 -0
- package/src/components/invoices/invoices-furs.hooks.ts +24 -9
- package/src/components/invoices/invoices.hooks.ts +32 -2
- package/src/components/invoices/list/list-row-actions.tsx +26 -11
- package/src/components/invoices/list/list-table.tsx +121 -5
- package/src/components/invoices/list/locales/de.ts +5 -0
- package/src/components/invoices/list/locales/en.ts +5 -0
- package/src/components/invoices/list/locales/es.ts +5 -0
- package/src/components/invoices/list/locales/fr.ts +5 -0
- package/src/components/invoices/list/locales/hr.ts +5 -0
- package/src/components/invoices/list/locales/it.ts +5 -0
- package/src/components/invoices/list/locales/nl.ts +5 -0
- package/src/components/invoices/list/locales/pl.ts +5 -0
- package/src/components/invoices/list/locales/pt.ts +5 -0
- package/src/components/invoices/list/locales/sl.ts +5 -0
- package/src/components/invoices/view/fiscalization-status-card.tsx +4 -1
- package/src/components/items/item-list-table/item-list-row-actions.tsx +5 -8
- package/src/components/items/item-list-table/item-list-row.tsx +5 -3
- package/src/components/items/item-list-table/item-list-table.tsx +5 -1
- package/src/components/recurring-invoices/create-recurring-invoice-form/create-recurring-invoice-form.tsx +418 -0
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/de.ts +45 -0
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/es.ts +44 -0
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/fr.ts +44 -0
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/hr.ts +44 -0
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/it.ts +44 -0
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/nl.ts +44 -0
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/pl.ts +44 -0
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/pt.ts +44 -0
- package/src/components/recurring-invoices/create-recurring-invoice-form/locales/sl.ts +44 -0
- package/src/components/recurring-invoices/index.ts +3 -0
- package/src/components/recurring-invoices/list/index.ts +2 -0
- package/src/components/recurring-invoices/list/list-row-actions.tsx +139 -0
- package/src/components/recurring-invoices/list/list-table.tsx +179 -0
- package/src/components/recurring-invoices/list/locales/de.ts +27 -0
- package/src/components/recurring-invoices/list/locales/en.ts +5 -0
- package/src/components/recurring-invoices/list/locales/es.ts +27 -0
- package/src/components/recurring-invoices/list/locales/fr.ts +27 -0
- package/src/components/recurring-invoices/list/locales/hr.ts +27 -0
- package/src/components/recurring-invoices/list/locales/it.ts +27 -0
- package/src/components/recurring-invoices/list/locales/nl.ts +27 -0
- package/src/components/recurring-invoices/list/locales/pl.ts +27 -0
- package/src/components/recurring-invoices/list/locales/pt.ts +27 -0
- package/src/components/recurring-invoices/list/locales/sl.ts +27 -0
- package/src/components/recurring-invoices/recurring-invoices.hooks.ts +28 -0
- package/src/components/table/data-table.tsx +122 -5
- package/src/components/table/selection-toolbar.tsx +36 -0
- package/src/components/tax-reports/kir-export-form.tsx +75 -55
- package/src/components/taxes/tax-list-table/tax-list-row-actions.tsx +3 -6
- package/src/components/taxes/tax-list-table/tax-list-row.tsx +3 -2
- package/src/components/taxes/tax-list-table/tax-list-table.tsx +5 -1
- package/src/components/ui/checkbox.tsx +5 -5
- package/src/generate-schemas.ts +45 -18
- package/src/generated/schemas/authorizeshopify_body.ts +22 -0
- package/src/generated/schemas/creditnote.ts +0 -2
- package/src/generated/schemas/deliverynote.ts +134 -0
- package/src/generated/schemas/entity.ts +5 -1
- package/src/generated/schemas/index.ts +42 -28
- package/src/generated/schemas/order.ts +129 -0
- package/src/generated/schemas/orderintegration.ts +51 -0
- package/src/generated/schemas/payment.ts +24 -2
- package/src/generated/schemas/recurringinvoice.ts +61 -0
- package/src/generated/schemas/renderadvanceinvoicepreview_body.ts +108 -140
- package/src/generated/schemas/rendercreditnotepreview_body.ts +109 -141
- package/src/generated/schemas/renderdeliverynotepreview_body.ts +185 -0
- package/src/generated/schemas/renderestimatepreview_body.ts +79 -82
- package/src/generated/schemas/renderinvoicepreview_body.ts +109 -141
- package/src/generated/schemas/startpdfexport_body.ts +18 -2
- package/src/generated/schemas/userfinasettings.ts +19 -0
- package/src/generated/schemas/webhook.ts +54 -0
- package/src/hooks/use-duplicate-document.ts +11 -3
- package/src/hooks/use-next-document-number.ts +2 -2
- package/src/lib/furs-error-utils.ts +36 -0
- package/src/lib/schemas/advance-invoice.ts +3 -3
- package/src/lib/schemas/credit-note.ts +3 -3
- package/src/lib/schemas/estimate.ts +3 -3
- package/src/lib/schemas/invoice.ts +3 -3
- package/src/providers/sdk-provider.tsx +5 -7
- package/src/providers/white-label-provider.tsx +3 -0
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
import { zodResolver } from "@hookform/resolvers/zod";
|
|
2
|
+
import type { CreateDeliveryNoteRequest, DeliveryNote } from "@spaceinvoices/js-sdk";
|
|
3
|
+
import { useQueryClient } from "@tanstack/react-query";
|
|
4
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
5
|
+
import type { Resolver } from "react-hook-form";
|
|
6
|
+
import { useForm, useWatch } from "react-hook-form";
|
|
7
|
+
import type { z } from "zod";
|
|
8
|
+
import { Checkbox } from "@/ui/components/ui/checkbox";
|
|
9
|
+
import { Form } from "@/ui/components/ui/form";
|
|
10
|
+
import { Label } from "@/ui/components/ui/label";
|
|
11
|
+
import { createDeliveryNoteSchema } from "@/ui/generated/schemas";
|
|
12
|
+
import { useNextDocumentNumber } from "@/ui/hooks/use-next-document-number";
|
|
13
|
+
import type { ComponentTranslationProps } from "@/ui/lib/translation";
|
|
14
|
+
import { createTranslation } from "@/ui/lib/translation";
|
|
15
|
+
import { useEntities } from "@/ui/providers/entities-context";
|
|
16
|
+
import { useFormFooterRegistration } from "@/ui/providers/form-footer-context";
|
|
17
|
+
import { CUSTOMERS_CACHE_KEY } from "../../customers/customers.hooks";
|
|
18
|
+
import { DocumentDetailsSection, DocumentNoteField } from "../../documents/create/document-details-section";
|
|
19
|
+
import { DocumentItemsSection, type PriceModesMap } from "../../documents/create/document-items-section";
|
|
20
|
+
import { DocumentRecipientSection } from "../../documents/create/document-recipient-section";
|
|
21
|
+
import type { DocumentTypes } from "../../documents/types";
|
|
22
|
+
import { useCreateDeliveryNote } from "../delivery-notes.hooks";
|
|
23
|
+
import de from "./locales/de";
|
|
24
|
+
import es from "./locales/es";
|
|
25
|
+
import fr from "./locales/fr";
|
|
26
|
+
import hr from "./locales/hr";
|
|
27
|
+
import it from "./locales/it";
|
|
28
|
+
import nl from "./locales/nl";
|
|
29
|
+
import pl from "./locales/pl";
|
|
30
|
+
import pt from "./locales/pt";
|
|
31
|
+
import sl from "./locales/sl";
|
|
32
|
+
import { prepareDeliveryNoteSubmission } from "./prepare-delivery-note-submission";
|
|
33
|
+
import { useDeliveryNoteCustomerForm } from "./use-delivery-note-customer-form";
|
|
34
|
+
|
|
35
|
+
const translations = {
|
|
36
|
+
sl,
|
|
37
|
+
de,
|
|
38
|
+
it,
|
|
39
|
+
fr,
|
|
40
|
+
es,
|
|
41
|
+
pt,
|
|
42
|
+
nl,
|
|
43
|
+
pl,
|
|
44
|
+
hr,
|
|
45
|
+
} as const;
|
|
46
|
+
|
|
47
|
+
// Form values: extend schema with local-only fields (number is for display, not sent to API)
|
|
48
|
+
type CreateDeliveryNoteFormValues = z.infer<typeof createDeliveryNoteSchema> & {
|
|
49
|
+
number?: string;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/** Preview payload extends request with display-only fields */
|
|
53
|
+
type DeliveryNotePreviewPayload = Partial<CreateDeliveryNoteRequest> & { number?: string };
|
|
54
|
+
|
|
55
|
+
type CreateDeliveryNoteFormProps = {
|
|
56
|
+
type: DocumentTypes;
|
|
57
|
+
entityId: string;
|
|
58
|
+
onSuccess?: (data: DeliveryNote) => void;
|
|
59
|
+
onError?: (error: unknown) => void;
|
|
60
|
+
onChange?: (data: DeliveryNotePreviewPayload) => void;
|
|
61
|
+
onAddNewTax?: () => void;
|
|
62
|
+
/** Initial values for form fields (used for document duplication) */
|
|
63
|
+
initialValues?: Partial<CreateDeliveryNoteRequest>;
|
|
64
|
+
} & ComponentTranslationProps;
|
|
65
|
+
|
|
66
|
+
export default function CreateDeliveryNoteForm({
|
|
67
|
+
type,
|
|
68
|
+
entityId,
|
|
69
|
+
onSuccess,
|
|
70
|
+
onError,
|
|
71
|
+
onChange,
|
|
72
|
+
onAddNewTax,
|
|
73
|
+
initialValues,
|
|
74
|
+
t: translateProp,
|
|
75
|
+
namespace,
|
|
76
|
+
locale,
|
|
77
|
+
}: CreateDeliveryNoteFormProps) {
|
|
78
|
+
const t = createTranslation({
|
|
79
|
+
t: translateProp,
|
|
80
|
+
namespace,
|
|
81
|
+
locale,
|
|
82
|
+
translations,
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
const { activeEntity } = useEntities();
|
|
86
|
+
const queryClient = useQueryClient();
|
|
87
|
+
|
|
88
|
+
// Draft submission state
|
|
89
|
+
const [isDraftPending, setIsDraftPending] = useState(false);
|
|
90
|
+
|
|
91
|
+
// Hide prices state (delivery note specific)
|
|
92
|
+
const defaultHidePrices = (activeEntity?.settings as any)?.delivery_note_hide_prices ?? false;
|
|
93
|
+
const [hidePrices, setHidePrices] = useState<boolean>((initialValues as any)?.hide_prices ?? defaultHidePrices);
|
|
94
|
+
|
|
95
|
+
// Fetch next delivery note number
|
|
96
|
+
const { data: nextNumberData } = useNextDocumentNumber(entityId, "delivery_note", {
|
|
97
|
+
enabled: !!entityId,
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
const form = useForm<CreateDeliveryNoteFormValues>({
|
|
101
|
+
resolver: zodResolver(createDeliveryNoteSchema) as Resolver<CreateDeliveryNoteFormValues>,
|
|
102
|
+
defaultValues: {
|
|
103
|
+
number: "",
|
|
104
|
+
date: initialValues?.date || new Date().toISOString(),
|
|
105
|
+
customer_id: initialValues?.customer_id ?? undefined,
|
|
106
|
+
// Cast customer to form schema type (API type may have additional fields)
|
|
107
|
+
customer: (initialValues?.customer as CreateDeliveryNoteFormValues["customer"]) ?? undefined,
|
|
108
|
+
items: initialValues?.items?.length
|
|
109
|
+
? initialValues.items.map((item) => ({
|
|
110
|
+
name: item.name || "",
|
|
111
|
+
description: item.description || "",
|
|
112
|
+
quantity: item.quantity ?? 1,
|
|
113
|
+
// Use gross_price if set, otherwise use price
|
|
114
|
+
price: item.gross_price ?? item.price,
|
|
115
|
+
taxes: item.taxes || [],
|
|
116
|
+
}))
|
|
117
|
+
: [
|
|
118
|
+
{
|
|
119
|
+
name: "",
|
|
120
|
+
description: "",
|
|
121
|
+
quantity: 1,
|
|
122
|
+
price: undefined,
|
|
123
|
+
taxes: [],
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
currency_code: initialValues?.currency_code || activeEntity?.currency_code || "EUR",
|
|
127
|
+
note: initialValues?.note ?? "",
|
|
128
|
+
},
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
// Price modes per item (gross vs net) - collected from component state at submit
|
|
132
|
+
const onChangeRef = useRef(onChange);
|
|
133
|
+
onChangeRef.current = onChange;
|
|
134
|
+
|
|
135
|
+
const initialPriceModes = useMemo(() => {
|
|
136
|
+
if (!initialValues?.items) return {};
|
|
137
|
+
return initialValues.items.reduce((acc, item, index) => {
|
|
138
|
+
acc[index] = item.gross_price != null;
|
|
139
|
+
return acc;
|
|
140
|
+
}, {} as PriceModesMap);
|
|
141
|
+
}, [initialValues?.items]);
|
|
142
|
+
const priceModesRef = useRef<PriceModesMap>(initialPriceModes);
|
|
143
|
+
|
|
144
|
+
// Update number when fetched
|
|
145
|
+
useEffect(() => {
|
|
146
|
+
if (nextNumberData?.number) {
|
|
147
|
+
form.setValue("number", nextNumberData.number);
|
|
148
|
+
}
|
|
149
|
+
}, [nextNumberData?.number, form]);
|
|
150
|
+
|
|
151
|
+
// Auto-add tax field for tax subject entities
|
|
152
|
+
useEffect(() => {
|
|
153
|
+
if (activeEntity?.is_tax_subject) {
|
|
154
|
+
const items = form.getValues("items") || [];
|
|
155
|
+
if (items.length > 0 && (!items[0].taxes || items[0].taxes.length === 0)) {
|
|
156
|
+
form.setValue("items.0.taxes", [{ tax_id: undefined }]);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}, [activeEntity?.is_tax_subject, form]);
|
|
160
|
+
|
|
161
|
+
const formValues = useWatch({
|
|
162
|
+
control: form.control,
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
// Extract customer management logic into a custom hook
|
|
166
|
+
const {
|
|
167
|
+
originalCustomer,
|
|
168
|
+
showCustomerForm,
|
|
169
|
+
shouldFocusName,
|
|
170
|
+
selectedCustomerId,
|
|
171
|
+
initialCustomerName,
|
|
172
|
+
handleCustomerSelect,
|
|
173
|
+
handleCustomerClear,
|
|
174
|
+
} = useDeliveryNoteCustomerForm(form as any);
|
|
175
|
+
|
|
176
|
+
const { mutate: createDeliveryNote, isPending } = useCreateDeliveryNote({
|
|
177
|
+
entityId,
|
|
178
|
+
onSuccess: (data) => {
|
|
179
|
+
// Invalidate customers cache when a customer was created/linked
|
|
180
|
+
if (data.customer_id) {
|
|
181
|
+
queryClient.invalidateQueries({ queryKey: [CUSTOMERS_CACHE_KEY] });
|
|
182
|
+
}
|
|
183
|
+
onSuccess?.(data);
|
|
184
|
+
},
|
|
185
|
+
onError,
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
// Shared submit logic for both regular save and save as draft
|
|
189
|
+
const submitDeliveryNote = useCallback(
|
|
190
|
+
(values: CreateDeliveryNoteFormValues, isDraft: boolean) => {
|
|
191
|
+
try {
|
|
192
|
+
const submission = prepareDeliveryNoteSubmission(values, {
|
|
193
|
+
originalCustomer,
|
|
194
|
+
priceModes: priceModesRef.current,
|
|
195
|
+
isDraft,
|
|
196
|
+
hidePrices,
|
|
197
|
+
});
|
|
198
|
+
createDeliveryNote(submission);
|
|
199
|
+
} catch (error) {
|
|
200
|
+
console.error("Delivery note submission error:", error);
|
|
201
|
+
if (onError) {
|
|
202
|
+
onError(error);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
[createDeliveryNote, onError, originalCustomer, hidePrices],
|
|
207
|
+
);
|
|
208
|
+
|
|
209
|
+
// Handle save as draft
|
|
210
|
+
const handleSaveAsDraft = useCallback(async () => {
|
|
211
|
+
setIsDraftPending(true);
|
|
212
|
+
try {
|
|
213
|
+
const isValid = await form.trigger();
|
|
214
|
+
if (isValid) {
|
|
215
|
+
const values = form.getValues();
|
|
216
|
+
submitDeliveryNote(values, true);
|
|
217
|
+
}
|
|
218
|
+
} finally {
|
|
219
|
+
setIsDraftPending(false);
|
|
220
|
+
}
|
|
221
|
+
}, [form, submitDeliveryNote]);
|
|
222
|
+
|
|
223
|
+
const secondaryAction = useMemo(
|
|
224
|
+
() => ({
|
|
225
|
+
label: t("Save as Draft"),
|
|
226
|
+
onClick: handleSaveAsDraft,
|
|
227
|
+
isPending: isDraftPending,
|
|
228
|
+
}),
|
|
229
|
+
[t, handleSaveAsDraft, isDraftPending],
|
|
230
|
+
);
|
|
231
|
+
|
|
232
|
+
useFormFooterRegistration({
|
|
233
|
+
formId: "create-delivery-note-form",
|
|
234
|
+
isPending,
|
|
235
|
+
isDirty: form.formState.isDirty,
|
|
236
|
+
label: t("Create Delivery Note"),
|
|
237
|
+
secondaryAction,
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
useEffect(() => {
|
|
241
|
+
const callback = onChangeRef.current;
|
|
242
|
+
if (!callback) return;
|
|
243
|
+
|
|
244
|
+
const currentItems = form.getValues("items") || [];
|
|
245
|
+
|
|
246
|
+
// Transform items to use gross_price when price mode is gross
|
|
247
|
+
const transformedItems = currentItems.map((item: any, index: number) => {
|
|
248
|
+
const { price, ...rest } = item;
|
|
249
|
+
const isGross = priceModesRef.current[index] ?? false;
|
|
250
|
+
if (isGross) {
|
|
251
|
+
return { ...rest, gross_price: price };
|
|
252
|
+
}
|
|
253
|
+
return { ...rest, price };
|
|
254
|
+
});
|
|
255
|
+
|
|
256
|
+
const payload: DeliveryNotePreviewPayload = {
|
|
257
|
+
number: formValues.number,
|
|
258
|
+
date: formValues.date,
|
|
259
|
+
customer_id: formValues.customer_id,
|
|
260
|
+
customer: formValues.customer,
|
|
261
|
+
items: transformedItems,
|
|
262
|
+
currency_code: formValues.currency_code,
|
|
263
|
+
note: formValues.note,
|
|
264
|
+
hide_prices: hidePrices,
|
|
265
|
+
};
|
|
266
|
+
callback(payload);
|
|
267
|
+
}, [formValues, form, hidePrices]);
|
|
268
|
+
|
|
269
|
+
const onSubmit = (values: CreateDeliveryNoteFormValues) => {
|
|
270
|
+
submitDeliveryNote(values, false);
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
return (
|
|
274
|
+
<Form {...form}>
|
|
275
|
+
<form id="create-delivery-note-form" onSubmit={form.handleSubmit(onSubmit)} className="space-y-8">
|
|
276
|
+
<div className="flex w-full flex-col md:flex-row md:gap-6">
|
|
277
|
+
<DocumentRecipientSection
|
|
278
|
+
control={form.control}
|
|
279
|
+
entityId={entityId}
|
|
280
|
+
onCustomerSelect={handleCustomerSelect}
|
|
281
|
+
onCustomerClear={handleCustomerClear}
|
|
282
|
+
showCustomerForm={showCustomerForm}
|
|
283
|
+
shouldFocusName={shouldFocusName}
|
|
284
|
+
selectedCustomerId={selectedCustomerId}
|
|
285
|
+
initialCustomerName={initialCustomerName}
|
|
286
|
+
t={t}
|
|
287
|
+
/>
|
|
288
|
+
|
|
289
|
+
<DocumentDetailsSection control={form.control} documentType={type} t={t}>
|
|
290
|
+
{/* Delivery note specific: Hide prices toggle */}
|
|
291
|
+
<div className="flex items-center gap-2">
|
|
292
|
+
<Checkbox
|
|
293
|
+
id="hide-prices"
|
|
294
|
+
checked={hidePrices}
|
|
295
|
+
onCheckedChange={(checked) => setHidePrices(checked === true)}
|
|
296
|
+
/>
|
|
297
|
+
<Label htmlFor="hide-prices" className="cursor-pointer font-normal text-sm">
|
|
298
|
+
{t("Hide prices")}
|
|
299
|
+
</Label>
|
|
300
|
+
</div>
|
|
301
|
+
</DocumentDetailsSection>
|
|
302
|
+
</div>
|
|
303
|
+
|
|
304
|
+
<DocumentItemsSection
|
|
305
|
+
control={form.control}
|
|
306
|
+
watch={form.watch}
|
|
307
|
+
setValue={form.setValue}
|
|
308
|
+
getValues={form.getValues}
|
|
309
|
+
entityId={entityId}
|
|
310
|
+
currencyCode={activeEntity?.currency_code ?? undefined}
|
|
311
|
+
onAddNewTax={onAddNewTax}
|
|
312
|
+
t={t}
|
|
313
|
+
maxTaxesPerItem={activeEntity?.country_rules?.max_taxes_per_item}
|
|
314
|
+
priceModesRef={priceModesRef}
|
|
315
|
+
initialPriceModes={initialPriceModes}
|
|
316
|
+
/>
|
|
317
|
+
|
|
318
|
+
<DocumentNoteField
|
|
319
|
+
control={form.control}
|
|
320
|
+
t={t}
|
|
321
|
+
entity={activeEntity}
|
|
322
|
+
document={{
|
|
323
|
+
number: formValues.number,
|
|
324
|
+
date: formValues.date,
|
|
325
|
+
currency_code: formValues.currency_code,
|
|
326
|
+
customer: formValues.customer as any,
|
|
327
|
+
}}
|
|
328
|
+
/>
|
|
329
|
+
</form>
|
|
330
|
+
</Form>
|
|
331
|
+
);
|
|
332
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"Create Delivery Note": "Lieferschein erstellen",
|
|
3
|
+
Details: "Details",
|
|
4
|
+
Number: "Nummer",
|
|
5
|
+
Date: "Datum",
|
|
6
|
+
Recipient: "Empfänger",
|
|
7
|
+
"Search or create customer...": "Kunde suchen oder erstellen...",
|
|
8
|
+
Clear: "Löschen",
|
|
9
|
+
Name: "Name",
|
|
10
|
+
Address: "Adresse",
|
|
11
|
+
"Address 2": "Adresse 2",
|
|
12
|
+
"Post Code": "Postleitzahl",
|
|
13
|
+
City: "Stadt",
|
|
14
|
+
State: "Bundesland",
|
|
15
|
+
Country: "Land",
|
|
16
|
+
"Tax Number": "Steuernummer",
|
|
17
|
+
Items: "Positionen",
|
|
18
|
+
"Add item": "Position hinzufügen",
|
|
19
|
+
Tax: "Steuer",
|
|
20
|
+
"Tax rate": "Steuersatz",
|
|
21
|
+
"Add tax": "Steuer hinzufügen",
|
|
22
|
+
"Select tax...": "Steuer auswählen...",
|
|
23
|
+
"Loading...": "Laden...",
|
|
24
|
+
"No taxes found": "Keine Steuern gefunden",
|
|
25
|
+
"Add new tax...": "Neue Steuer hinzufügen...",
|
|
26
|
+
Note: "Notiz",
|
|
27
|
+
"Insert variable": "Variable einfügen",
|
|
28
|
+
"Add payment instructions, terms, or other notes...":
|
|
29
|
+
"Zahlungsanweisungen, Bedingungen oder andere Notizen hinzufügen...",
|
|
30
|
+
Quantity: "Menge",
|
|
31
|
+
Price: "Preis",
|
|
32
|
+
Unit: "Einheit",
|
|
33
|
+
Discount: "Rabatt",
|
|
34
|
+
Description: "Beschreibung",
|
|
35
|
+
Save: "Speichern",
|
|
36
|
+
"Save as Draft": "Als Entwurf speichern",
|
|
37
|
+
"Pick a date": "Datum auswählen",
|
|
38
|
+
Currency: "Währung",
|
|
39
|
+
"Select currency": "Währung auswählen",
|
|
40
|
+
"Percentage discount": "Prozentualer Rabatt",
|
|
41
|
+
"Fixed amount discount": "Fester Rabatt",
|
|
42
|
+
Percentage: "Prozent",
|
|
43
|
+
"Fixed amount": "Fester Betrag",
|
|
44
|
+
"Taxes disabled": "Steuern deaktiviert",
|
|
45
|
+
"Gross price": "Bruttopreis",
|
|
46
|
+
"Net price": "Nettopreis",
|
|
47
|
+
"Gross price (tax included)": "Bruttopreis (inkl. MwSt.)",
|
|
48
|
+
"Net price (before tax)": "Nettopreis (exkl. MwSt.)",
|
|
49
|
+
"Hide prices": "Preise ausblenden",
|
|
50
|
+
} as const;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"Create Delivery Note": "Crear albarán",
|
|
3
|
+
Details: "Detalles",
|
|
4
|
+
Number: "Número",
|
|
5
|
+
Date: "Fecha",
|
|
6
|
+
Recipient: "Destinatario",
|
|
7
|
+
"Search or create customer...": "Buscar o crear cliente...",
|
|
8
|
+
Clear: "Limpiar",
|
|
9
|
+
Name: "Nombre",
|
|
10
|
+
Address: "Dirección",
|
|
11
|
+
"Address 2": "Dirección 2",
|
|
12
|
+
"Post Code": "Código postal",
|
|
13
|
+
City: "Ciudad",
|
|
14
|
+
State: "Provincia",
|
|
15
|
+
Country: "País",
|
|
16
|
+
"Tax Number": "Número fiscal",
|
|
17
|
+
Items: "Artículos",
|
|
18
|
+
"Add item": "Añadir artículo",
|
|
19
|
+
Tax: "Impuesto",
|
|
20
|
+
"Tax rate": "Tasa de impuesto",
|
|
21
|
+
"Add tax": "Añadir impuesto",
|
|
22
|
+
"Select tax...": "Seleccionar impuesto...",
|
|
23
|
+
"Loading...": "Cargando...",
|
|
24
|
+
"No taxes found": "No se encontraron impuestos",
|
|
25
|
+
"Add new tax...": "Añadir nuevo impuesto...",
|
|
26
|
+
Note: "Nota",
|
|
27
|
+
"Insert variable": "Insertar variable",
|
|
28
|
+
"Add payment instructions, terms, or other notes...": "Añada instrucciones de pago, condiciones u otras notas...",
|
|
29
|
+
Quantity: "Cantidad",
|
|
30
|
+
Price: "Precio",
|
|
31
|
+
Unit: "Unidad",
|
|
32
|
+
Discount: "Descuento",
|
|
33
|
+
Description: "Descripción",
|
|
34
|
+
Save: "Guardar",
|
|
35
|
+
"Save as Draft": "Guardar como borrador",
|
|
36
|
+
"Pick a date": "Seleccionar una fecha",
|
|
37
|
+
Currency: "Moneda",
|
|
38
|
+
"Select currency": "Seleccionar moneda",
|
|
39
|
+
"Percentage discount": "Descuento porcentual",
|
|
40
|
+
"Fixed amount discount": "Descuento fijo",
|
|
41
|
+
Percentage: "Porcentaje",
|
|
42
|
+
"Fixed amount": "Importe fijo",
|
|
43
|
+
"Taxes disabled": "Impuestos desactivados",
|
|
44
|
+
"Gross price": "Precio bruto",
|
|
45
|
+
"Net price": "Precio neto",
|
|
46
|
+
"Gross price (tax included)": "Precio bruto (impuestos incluidos)",
|
|
47
|
+
"Net price (before tax)": "Precio neto (antes de impuestos)",
|
|
48
|
+
"Hide prices": "Ocultar precios",
|
|
49
|
+
} as const;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"Create Delivery Note": "Créer un bon de livraison",
|
|
3
|
+
Details: "Détails",
|
|
4
|
+
Number: "Numéro",
|
|
5
|
+
Date: "Date",
|
|
6
|
+
Recipient: "Destinataire",
|
|
7
|
+
"Search or create customer...": "Rechercher ou créer un client...",
|
|
8
|
+
Clear: "Effacer",
|
|
9
|
+
Name: "Nom",
|
|
10
|
+
Address: "Adresse",
|
|
11
|
+
"Address 2": "Adresse 2",
|
|
12
|
+
"Post Code": "Code postal",
|
|
13
|
+
City: "Ville",
|
|
14
|
+
State: "Région",
|
|
15
|
+
Country: "Pays",
|
|
16
|
+
"Tax Number": "Numéro de TVA",
|
|
17
|
+
Items: "Articles",
|
|
18
|
+
"Add item": "Ajouter un article",
|
|
19
|
+
Tax: "Taxe",
|
|
20
|
+
"Tax rate": "Taux de taxe",
|
|
21
|
+
"Add tax": "Ajouter une taxe",
|
|
22
|
+
"Select tax...": "Sélectionner une taxe...",
|
|
23
|
+
"Loading...": "Chargement...",
|
|
24
|
+
"No taxes found": "Aucune taxe trouvée",
|
|
25
|
+
"Add new tax...": "Ajouter une nouvelle taxe...",
|
|
26
|
+
Note: "Note",
|
|
27
|
+
"Insert variable": "Insérer une variable",
|
|
28
|
+
"Add payment instructions, terms, or other notes...":
|
|
29
|
+
"Ajoutez des instructions de paiement, des conditions ou d'autres notes...",
|
|
30
|
+
Quantity: "Quantité",
|
|
31
|
+
Price: "Prix",
|
|
32
|
+
Unit: "Unité",
|
|
33
|
+
Discount: "Remise",
|
|
34
|
+
Description: "Description",
|
|
35
|
+
Save: "Enregistrer",
|
|
36
|
+
"Save as Draft": "Enregistrer comme brouillon",
|
|
37
|
+
"Pick a date": "Choisir une date",
|
|
38
|
+
Currency: "Devise",
|
|
39
|
+
"Select currency": "Sélectionner la devise",
|
|
40
|
+
"Percentage discount": "Remise en pourcentage",
|
|
41
|
+
"Fixed amount discount": "Remise fixe",
|
|
42
|
+
Percentage: "Pourcentage",
|
|
43
|
+
"Fixed amount": "Montant fixe",
|
|
44
|
+
"Taxes disabled": "Taxes désactivées",
|
|
45
|
+
"Gross price": "Prix brut",
|
|
46
|
+
"Net price": "Prix net",
|
|
47
|
+
"Gross price (tax included)": "Prix brut (taxes incluses)",
|
|
48
|
+
"Net price (before tax)": "Prix net (avant taxes)",
|
|
49
|
+
"Hide prices": "Masquer les prix",
|
|
50
|
+
} as const;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"Create Delivery Note": "Kreiraj otpremnicu",
|
|
3
|
+
Details: "Pojedinosti",
|
|
4
|
+
Number: "Broj",
|
|
5
|
+
Date: "Datum",
|
|
6
|
+
Recipient: "Primatelj",
|
|
7
|
+
"Search or create customer...": "Pretraži ili kreiraj kupca...",
|
|
8
|
+
Clear: "Očisti",
|
|
9
|
+
Name: "Naziv",
|
|
10
|
+
Address: "Adresa",
|
|
11
|
+
"Address 2": "Adresa 2",
|
|
12
|
+
"Post Code": "Poštanski broj",
|
|
13
|
+
City: "Grad",
|
|
14
|
+
State: "Županija",
|
|
15
|
+
Country: "Država",
|
|
16
|
+
"Tax Number": "OIB",
|
|
17
|
+
Items: "Stavke",
|
|
18
|
+
"Add item": "Dodaj stavku",
|
|
19
|
+
Tax: "Porez",
|
|
20
|
+
"Tax rate": "Porezna stopa",
|
|
21
|
+
"Add tax": "Dodaj porez",
|
|
22
|
+
"Select tax...": "Odaberi porez...",
|
|
23
|
+
"Loading...": "Učitavanje...",
|
|
24
|
+
"No taxes found": "Nisu pronađeni porezi",
|
|
25
|
+
"Add new tax...": "Dodaj novi porez...",
|
|
26
|
+
Note: "Napomena",
|
|
27
|
+
"Insert variable": "Umetni varijablu",
|
|
28
|
+
"Add payment instructions, terms, or other notes...": "Dodajte upute za plaćanje, uvjete ili druge napomene...",
|
|
29
|
+
Quantity: "Količina",
|
|
30
|
+
Price: "Cijena",
|
|
31
|
+
Unit: "Jedinica",
|
|
32
|
+
Discount: "Popust",
|
|
33
|
+
Description: "Opis",
|
|
34
|
+
Save: "Spremi",
|
|
35
|
+
"Save as Draft": "Spremi kao skicu",
|
|
36
|
+
"Pick a date": "Odaberite datum",
|
|
37
|
+
Currency: "Valuta",
|
|
38
|
+
"Select currency": "Odaberi valutu",
|
|
39
|
+
"Percentage discount": "Postotni popust",
|
|
40
|
+
"Fixed amount discount": "Fiksni popust",
|
|
41
|
+
Percentage: "Postotak",
|
|
42
|
+
"Fixed amount": "Fiksni iznos",
|
|
43
|
+
"Taxes disabled": "Porezi onemogućeni",
|
|
44
|
+
"Gross price": "Bruto cijena",
|
|
45
|
+
"Net price": "Neto cijena",
|
|
46
|
+
"Gross price (tax included)": "Bruto cijena (s porezom)",
|
|
47
|
+
"Net price (before tax)": "Neto cijena (prije poreza)",
|
|
48
|
+
"Hide prices": "Sakrij cijene",
|
|
49
|
+
} as const;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"Create Delivery Note": "Crea bolla di consegna",
|
|
3
|
+
Details: "Dettagli",
|
|
4
|
+
Number: "Numero",
|
|
5
|
+
Date: "Data",
|
|
6
|
+
Recipient: "Destinatario",
|
|
7
|
+
"Search or create customer...": "Cerca o crea cliente...",
|
|
8
|
+
Clear: "Cancella",
|
|
9
|
+
Name: "Nome",
|
|
10
|
+
Address: "Indirizzo",
|
|
11
|
+
"Address 2": "Indirizzo 2",
|
|
12
|
+
"Post Code": "CAP",
|
|
13
|
+
City: "Città",
|
|
14
|
+
State: "Provincia",
|
|
15
|
+
Country: "Paese",
|
|
16
|
+
"Tax Number": "Partita IVA",
|
|
17
|
+
Items: "Voci",
|
|
18
|
+
"Add item": "Aggiungi voce",
|
|
19
|
+
Tax: "Imposta",
|
|
20
|
+
"Tax rate": "Aliquota fiscale",
|
|
21
|
+
"Add tax": "Aggiungi imposta",
|
|
22
|
+
"Select tax...": "Seleziona imposta...",
|
|
23
|
+
"Loading...": "Caricamento...",
|
|
24
|
+
"No taxes found": "Nessuna imposta trovata",
|
|
25
|
+
"Add new tax...": "Aggiungi nuova imposta...",
|
|
26
|
+
Note: "Nota",
|
|
27
|
+
"Insert variable": "Inserisci variabile",
|
|
28
|
+
"Add payment instructions, terms, or other notes...": "Aggiungi istruzioni di pagamento, condizioni o altre note...",
|
|
29
|
+
Quantity: "Quantità",
|
|
30
|
+
Price: "Prezzo",
|
|
31
|
+
Unit: "Unità",
|
|
32
|
+
Discount: "Sconto",
|
|
33
|
+
Description: "Descrizione",
|
|
34
|
+
Save: "Salva",
|
|
35
|
+
"Save as Draft": "Salva come bozza",
|
|
36
|
+
"Pick a date": "Seleziona una data",
|
|
37
|
+
Currency: "Valuta",
|
|
38
|
+
"Select currency": "Seleziona valuta",
|
|
39
|
+
"Percentage discount": "Sconto percentuale",
|
|
40
|
+
"Fixed amount discount": "Sconto fisso",
|
|
41
|
+
Percentage: "Percentuale",
|
|
42
|
+
"Fixed amount": "Importo fisso",
|
|
43
|
+
"Taxes disabled": "Imposte disabilitate",
|
|
44
|
+
"Gross price": "Prezzo lordo",
|
|
45
|
+
"Net price": "Prezzo netto",
|
|
46
|
+
"Gross price (tax included)": "Prezzo lordo (imposte incluse)",
|
|
47
|
+
"Net price (before tax)": "Prezzo netto (prima delle imposte)",
|
|
48
|
+
"Hide prices": "Nascondi prezzi",
|
|
49
|
+
} as const;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"Create Delivery Note": "Pakbon aanmaken",
|
|
3
|
+
Details: "Details",
|
|
4
|
+
Number: "Nummer",
|
|
5
|
+
Date: "Datum",
|
|
6
|
+
Recipient: "Ontvanger",
|
|
7
|
+
"Search or create customer...": "Klant zoeken of aanmaken...",
|
|
8
|
+
Clear: "Wissen",
|
|
9
|
+
Name: "Naam",
|
|
10
|
+
Address: "Adres",
|
|
11
|
+
"Address 2": "Adres 2",
|
|
12
|
+
"Post Code": "Postcode",
|
|
13
|
+
City: "Stad",
|
|
14
|
+
State: "Provincie",
|
|
15
|
+
Country: "Land",
|
|
16
|
+
"Tax Number": "BTW-nummer",
|
|
17
|
+
Items: "Artikelen",
|
|
18
|
+
"Add item": "Artikel toevoegen",
|
|
19
|
+
Tax: "Belasting",
|
|
20
|
+
"Tax rate": "Belastingtarief",
|
|
21
|
+
"Add tax": "Belasting toevoegen",
|
|
22
|
+
"Select tax...": "Belasting selecteren...",
|
|
23
|
+
"Loading...": "Laden...",
|
|
24
|
+
"No taxes found": "Geen belastingen gevonden",
|
|
25
|
+
"Add new tax...": "Nieuwe belasting toevoegen...",
|
|
26
|
+
Note: "Notitie",
|
|
27
|
+
"Insert variable": "Variabele invoegen",
|
|
28
|
+
"Add payment instructions, terms, or other notes...":
|
|
29
|
+
"Voeg betalingsinstructies, voorwaarden of andere notities toe...",
|
|
30
|
+
Quantity: "Aantal",
|
|
31
|
+
Price: "Prijs",
|
|
32
|
+
Unit: "Eenheid",
|
|
33
|
+
Discount: "Korting",
|
|
34
|
+
Description: "Beschrijving",
|
|
35
|
+
Save: "Opslaan",
|
|
36
|
+
"Save as Draft": "Opslaan als concept",
|
|
37
|
+
"Pick a date": "Kies een datum",
|
|
38
|
+
Currency: "Valuta",
|
|
39
|
+
"Select currency": "Valuta selecteren",
|
|
40
|
+
"Percentage discount": "Percentuele korting",
|
|
41
|
+
"Fixed amount discount": "Vaste korting",
|
|
42
|
+
Percentage: "Percentage",
|
|
43
|
+
"Fixed amount": "Vast bedrag",
|
|
44
|
+
"Taxes disabled": "Belastingen uitgeschakeld",
|
|
45
|
+
"Gross price": "Brutoprijs",
|
|
46
|
+
"Net price": "Nettoprijs",
|
|
47
|
+
"Gross price (tax included)": "Brutoprijs (inclusief belasting)",
|
|
48
|
+
"Net price (before tax)": "Nettoprijs (exclusief belasting)",
|
|
49
|
+
"Hide prices": "Prijzen verbergen",
|
|
50
|
+
} as const;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
"Create Delivery Note": "Utwórz list przewozowy",
|
|
3
|
+
Details: "Szczegóły",
|
|
4
|
+
Number: "Numer",
|
|
5
|
+
Date: "Data",
|
|
6
|
+
Recipient: "Odbiorca",
|
|
7
|
+
"Search or create customer...": "Szukaj lub utwórz klienta...",
|
|
8
|
+
Clear: "Wyczyść",
|
|
9
|
+
Name: "Nazwa",
|
|
10
|
+
Address: "Adres",
|
|
11
|
+
"Address 2": "Adres 2",
|
|
12
|
+
"Post Code": "Kod pocztowy",
|
|
13
|
+
City: "Miasto",
|
|
14
|
+
State: "Województwo",
|
|
15
|
+
Country: "Kraj",
|
|
16
|
+
"Tax Number": "NIP",
|
|
17
|
+
Items: "Pozycje",
|
|
18
|
+
"Add item": "Dodaj pozycję",
|
|
19
|
+
Tax: "Podatek",
|
|
20
|
+
"Tax rate": "Stawka podatkowa",
|
|
21
|
+
"Add tax": "Dodaj podatek",
|
|
22
|
+
"Select tax...": "Wybierz podatek...",
|
|
23
|
+
"Loading...": "Ładowanie...",
|
|
24
|
+
"No taxes found": "Nie znaleziono podatków",
|
|
25
|
+
"Add new tax...": "Dodaj nowy podatek...",
|
|
26
|
+
Note: "Uwaga",
|
|
27
|
+
"Insert variable": "Wstaw zmienną",
|
|
28
|
+
"Add payment instructions, terms, or other notes...": "Dodaj instrukcje płatności, warunki lub inne uwagi...",
|
|
29
|
+
Quantity: "Ilość",
|
|
30
|
+
Price: "Cena",
|
|
31
|
+
Unit: "Jednostka",
|
|
32
|
+
Discount: "Rabat",
|
|
33
|
+
Description: "Opis",
|
|
34
|
+
Save: "Zapisz",
|
|
35
|
+
"Save as Draft": "Zapisz jako szkic",
|
|
36
|
+
"Pick a date": "Wybierz datę",
|
|
37
|
+
Currency: "Waluta",
|
|
38
|
+
"Select currency": "Wybierz walutę",
|
|
39
|
+
"Percentage discount": "Rabat procentowy",
|
|
40
|
+
"Fixed amount discount": "Rabat kwotowy",
|
|
41
|
+
Percentage: "Procent",
|
|
42
|
+
"Fixed amount": "Kwota stała",
|
|
43
|
+
"Taxes disabled": "Podatki wyłączone",
|
|
44
|
+
"Gross price": "Cena brutto",
|
|
45
|
+
"Net price": "Cena netto",
|
|
46
|
+
"Gross price (tax included)": "Cena brutto (z podatkiem)",
|
|
47
|
+
"Net price (before tax)": "Cena netto (przed podatkiem)",
|
|
48
|
+
"Hide prices": "Ukryj ceny",
|
|
49
|
+
} as const;
|