Uecko_ERP/modules/customer-invoices/src/common/dto/response/get-customer-invoice-by-id.response.dto.ts

37 lines
833 B
TypeScript
Raw Normal View History

2025-09-03 18:04:09 +00:00
import { AmountSchema, MetadataSchema, PercentageSchema, QuantitySchema } from "@erp/core";
2025-06-26 11:32:55 +00:00
import * as z from "zod/v4";
2025-08-12 11:23:50 +00:00
export const GetCustomerInvoiceByIdResponseSchema = z.object({
2025-06-26 11:32:55 +00:00
id: z.uuid(),
2025-09-03 18:04:09 +00:00
company_id: z.uuid(),
2025-06-26 11:32:55 +00:00
invoice_number: z.string(),
2025-09-03 18:04:09 +00:00
status: z.string(),
series: z.string(),
issue_date: z.string(),
operation_date: z.string(),
notes: z.string(),
2025-06-26 11:32:55 +00:00
language_code: z.string(),
2025-09-03 18:04:09 +00:00
currency_code: z.string(),
items: z.array(
z.object({
position: z.string(),
description: z.string(),
quantity: QuantitySchema,
unit_price_amount: AmountSchema,
discount: PercentageSchema,
total_amount: AmountSchema,
})
),
2025-06-26 11:32:55 +00:00
metadata: MetadataSchema.optional(),
});
2025-08-12 11:23:50 +00:00
export type GetCustomerInvoiceByIdResponseDTO = z.infer<
typeof GetCustomerInvoiceByIdResponseSchema
2025-06-26 11:32:55 +00:00
>;