Fix: estimates geo v2

This commit is contained in:
Arsen
2026-02-04 00:11:19 +05:00
commit 3f0086f88e
22567 changed files with 4348823 additions and 0 deletions

258
backend/dist/services/estimate.service.d.ts vendored Executable file
View File

@@ -0,0 +1,258 @@
import { PrismaClient, Prisma } from '@prisma/client';
export declare class EstimateService {
private prisma;
constructor(prisma: PrismaClient);
createEstimate(data: {
ownerId: string;
directionCode: string;
objectName: string;
customer: string;
executor?: string;
vatRate?: number;
}): Promise<{
direction: {
name: string;
id: string;
code: string;
shortName: string;
isActive: boolean;
};
} & {
number: string;
id: string;
createdAt: Date;
updatedAt: Date;
ownerId: string;
objectName: string;
customer: string;
executor: string;
totalFieldWorks: Prisma.Decimal | null;
totalOfficeWorks: Prisma.Decimal | null;
totalLaboratory: Prisma.Decimal | null;
subtotal: Prisma.Decimal | null;
regionalCoef: Prisma.Decimal | null;
inflationIndex: Prisma.Decimal | null;
inflationDocRef: string | null;
companyCoef: Prisma.Decimal | null;
executorCoef: Prisma.Decimal | null;
totalWithoutVat: Prisma.Decimal | null;
vatRate: Prisma.Decimal | null;
vatAmount: Prisma.Decimal | null;
totalWithVat: Prisma.Decimal | null;
status: string;
directionId: string;
}>;
updateEstimate(id: string, data: Partial<{
objectName: string;
customer: string;
executor: string;
regionalCoef: number;
inflationIndex: number;
inflationDocRef: string;
companyCoef: number;
executorCoef: number;
vatRate: number;
status: string;
}>): Promise<{
direction: {
name: string;
id: string;
code: string;
shortName: string;
isActive: boolean;
};
items: {
id: string;
createdAt: Date;
updatedAt: Date;
orderNumber: number;
estimateId: string;
sectionType: string;
priceItemId: string | null;
workName: string;
justification: string | null;
basePrice: Prisma.Decimal;
quantity: Prisma.Decimal;
unit: string | null;
coef1: Prisma.Decimal | null;
coef1Desc: string | null;
coef2: Prisma.Decimal | null;
coef2Desc: string | null;
coef3: Prisma.Decimal | null;
coef3Desc: string | null;
totalPrice: Prisma.Decimal;
}[];
totals: {
id: string;
createdAt: Date;
updatedAt: Date;
label: string;
orderNumber: number;
estimateId: string;
description: string | null;
baseValue: Prisma.Decimal | null;
coefficient: Prisma.Decimal | null;
resultValue: Prisma.Decimal;
}[];
} & {
number: string;
id: string;
createdAt: Date;
updatedAt: Date;
ownerId: string;
objectName: string;
customer: string;
executor: string;
totalFieldWorks: Prisma.Decimal | null;
totalOfficeWorks: Prisma.Decimal | null;
totalLaboratory: Prisma.Decimal | null;
subtotal: Prisma.Decimal | null;
regionalCoef: Prisma.Decimal | null;
inflationIndex: Prisma.Decimal | null;
inflationDocRef: string | null;
companyCoef: Prisma.Decimal | null;
executorCoef: Prisma.Decimal | null;
totalWithoutVat: Prisma.Decimal | null;
vatRate: Prisma.Decimal | null;
vatAmount: Prisma.Decimal | null;
totalWithVat: Prisma.Decimal | null;
status: string;
directionId: string;
}>;
addEstimateItem(estimateId: string, data: {
sectionType: string;
priceItemId?: string;
workName: string;
justification?: string;
basePrice: number;
quantity: number;
unit?: string;
coef1?: number;
coef1Desc?: string;
coef2?: number;
coef2Desc?: string;
coef3?: number;
coef3Desc?: string;
}): Promise<{
id: string;
createdAt: Date;
updatedAt: Date;
orderNumber: number;
estimateId: string;
sectionType: string;
priceItemId: string | null;
workName: string;
justification: string | null;
basePrice: Prisma.Decimal;
quantity: Prisma.Decimal;
unit: string | null;
coef1: Prisma.Decimal | null;
coef1Desc: string | null;
coef2: Prisma.Decimal | null;
coef2Desc: string | null;
coef3: Prisma.Decimal | null;
coef3Desc: string | null;
totalPrice: Prisma.Decimal;
}>;
updateEstimateItem(itemId: string, data: Partial<{
workName: string;
justification: string;
basePrice: number;
quantity: number;
unit: string;
coef1: number;
coef1Desc: string;
coef2: number;
coef2Desc: string;
coef3: number;
coef3Desc: string;
}>): Promise<{
id: string;
createdAt: Date;
updatedAt: Date;
orderNumber: number;
estimateId: string;
sectionType: string;
priceItemId: string | null;
workName: string;
justification: string | null;
basePrice: Prisma.Decimal;
quantity: Prisma.Decimal;
unit: string | null;
coef1: Prisma.Decimal | null;
coef1Desc: string | null;
coef2: Prisma.Decimal | null;
coef2Desc: string | null;
coef3: Prisma.Decimal | null;
coef3Desc: string | null;
totalPrice: Prisma.Decimal;
}>;
recalculateTotals(estimateId: string): Promise<{
direction: {
name: string;
id: string;
code: string;
shortName: string;
isActive: boolean;
};
items: {
id: string;
createdAt: Date;
updatedAt: Date;
orderNumber: number;
estimateId: string;
sectionType: string;
priceItemId: string | null;
workName: string;
justification: string | null;
basePrice: Prisma.Decimal;
quantity: Prisma.Decimal;
unit: string | null;
coef1: Prisma.Decimal | null;
coef1Desc: string | null;
coef2: Prisma.Decimal | null;
coef2Desc: string | null;
coef3: Prisma.Decimal | null;
coef3Desc: string | null;
totalPrice: Prisma.Decimal;
}[];
totals: {
id: string;
createdAt: Date;
updatedAt: Date;
label: string;
orderNumber: number;
estimateId: string;
description: string | null;
baseValue: Prisma.Decimal | null;
coefficient: Prisma.Decimal | null;
resultValue: Prisma.Decimal;
}[];
} & {
number: string;
id: string;
createdAt: Date;
updatedAt: Date;
ownerId: string;
objectName: string;
customer: string;
executor: string;
totalFieldWorks: Prisma.Decimal | null;
totalOfficeWorks: Prisma.Decimal | null;
totalLaboratory: Prisma.Decimal | null;
subtotal: Prisma.Decimal | null;
regionalCoef: Prisma.Decimal | null;
inflationIndex: Prisma.Decimal | null;
inflationDocRef: string | null;
companyCoef: Prisma.Decimal | null;
executorCoef: Prisma.Decimal | null;
totalWithoutVat: Prisma.Decimal | null;
vatRate: Prisma.Decimal | null;
vatAmount: Prisma.Decimal | null;
totalWithVat: Prisma.Decimal | null;
status: string;
directionId: string;
}>;
private updateTotalsSection;
}
//# sourceMappingURL=estimate.service.d.ts.map