Files
mini-erp/mini-frontend/src/config/crystalReports.ts
T

67 lines
1.8 KiB
TypeScript
Raw Normal View History

import type { F4Config } from "../types/reports";
export interface CrystalReportParameter {
name: string;
type: string;
label: string;
inputType: "text" | "number" | "date" | "f4-modal";
required?: boolean;
placeholder?: string;
defaultValue?: any;
f4Config?: F4Config;
}
export interface CrystalReportDefinition {
id: string;
title: string;
description?: string;
icon?: string;
parameters: CrystalReportParameter[];
}
export const crystalReportsConfig: Record<string, CrystalReportDefinition[]> = {
socios: [],
ventas: [],
compras: [],
inventario: [
{
id: "DLN20015",
title: "Impresión de Etiquetas",
icon: "chart",
parameters: [
{
name: "Dockey@",
type: "xsd:decimal",
label: "Documento",
inputType: "f4-modal",
required: true,
f4Config: {
endpoint: "DeliveryNotes",
fields: ["DocNum", "CardCode", "CardName", "DocDate", "DocEntry"],
columns: [
{ key: "DocNum", title: "Número", width: "100px" },
{ key: "CardCode", title: "Código", width: "100px" },
{ key: "CardName", title: "Cliente", width: "200px" },
{ key: "DocDate", title: "Fecha", width: "100px" },
{ key: "DocEntry", title: "Documento", width: "100px" },
],
baseFilter: "Cancelled eq 'tNO'",
orderby: "DocNum desc",
valueField: "DocEntry",
labelField: "DocNum",
selectionMode: "unica",
},
},
{
name: "CANTIDAD",
type: "xsd:decimal",
label: "Cantidad",
inputType: "number",
required: true,
placeholder: "0",
defaultValue: "1",
},
],
},
],
};