29 lines
760 B
TypeScript
29 lines
760 B
TypeScript
|
|
import { MoneySchema, PercentageSchema, QuantitySchema } from "@erp/core";
|
||
|
|
import { z } from "zod/v4";
|
||
|
|
|
||
|
|
import { ItemTaxesBreakdownSchema } from "../item-taxes-breakdown.dto";
|
||
|
|
|
||
|
|
export const IssuedInvoiceItemDetailSchema = z.object({
|
||
|
|
id: z.uuid(),
|
||
|
|
is_valued: z.boolean(),
|
||
|
|
position: z.number(),
|
||
|
|
description: z.string().nullable(),
|
||
|
|
|
||
|
|
quantity: QuantitySchema,
|
||
|
|
unit_amount: MoneySchema,
|
||
|
|
|
||
|
|
subtotal_amount: MoneySchema,
|
||
|
|
|
||
|
|
item_discount_percentage: PercentageSchema,
|
||
|
|
item_discount_amount: MoneySchema,
|
||
|
|
|
||
|
|
global_discount_percentage: PercentageSchema,
|
||
|
|
global_discount_amount: MoneySchema,
|
||
|
|
|
||
|
|
...ItemTaxesBreakdownSchema.shape,
|
||
|
|
|
||
|
|
total_amount: MoneySchema,
|
||
|
|
});
|
||
|
|
|
||
|
|
export type IssuedInvoiceItemDetailDTO = z.infer<typeof IssuedInvoiceItemDetailSchema>;
|