2026-08-05 21:35:22 +03:30
|
|
|
import { Prisma } from '@prisma/client';
|
|
|
|
|
import { PrismaService } from '../prisma/prisma.service';
|
|
|
|
|
import { AdminCreateOrderDto, SubmitOrderDto, UpdateOrderChecksDto, UpdateOrderPricingDto, UpdateOrderStatusDto } from './dto/order.dto';
|
|
|
|
|
declare const orderInclude: {
|
|
|
|
|
items: true;
|
|
|
|
|
checks: {
|
|
|
|
|
orderBy: {
|
|
|
|
|
row: "asc";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
cashReceipt: true;
|
|
|
|
|
statusHistory: {
|
|
|
|
|
orderBy: {
|
|
|
|
|
changedAt: "asc";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
shipment: true;
|
|
|
|
|
user: true;
|
|
|
|
|
company: true;
|
|
|
|
|
};
|
|
|
|
|
type OrderFull = Prisma.OrderGetPayload<{
|
|
|
|
|
include: typeof orderInclude;
|
|
|
|
|
}>;
|
|
|
|
|
export declare class OrdersService {
|
|
|
|
|
private readonly prisma;
|
|
|
|
|
constructor(prisma: PrismaService);
|
|
|
|
|
findMyOrders(userId: string): Promise<{
|
|
|
|
|
id: string;
|
|
|
|
|
orderNumber: string;
|
|
|
|
|
userId: string;
|
|
|
|
|
companyId: string;
|
|
|
|
|
companyName: string;
|
|
|
|
|
settlementType: import("@prisma/client").$Enums.SettlementType;
|
|
|
|
|
settlementMethod: import("@prisma/client").$Enums.SettlementType;
|
|
|
|
|
checkMode: import("@prisma/client").$Enums.CheckRegistrationMode | undefined;
|
|
|
|
|
status: import("@prisma/client").$Enums.OrderStatus;
|
|
|
|
|
adminStatus: string;
|
|
|
|
|
totalMeterage: number;
|
|
|
|
|
meterage: number;
|
|
|
|
|
totalAmount: number | null;
|
|
|
|
|
shippingCost: number | null;
|
|
|
|
|
totalDiscount: number | null;
|
|
|
|
|
finalAmount: number | null;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
checkRassDays: number | undefined;
|
|
|
|
|
checkRassDate: string | undefined;
|
|
|
|
|
cashInvoiceExpiresAt: string | undefined;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
updatedAt: string;
|
|
|
|
|
customerName: string;
|
|
|
|
|
customerPhone: string;
|
|
|
|
|
customerNationalId: string | undefined;
|
|
|
|
|
customerType: import("@prisma/client").$Enums.CustomerType;
|
|
|
|
|
items: {
|
|
|
|
|
id: string;
|
|
|
|
|
productId: string | undefined;
|
|
|
|
|
catalogCode: string;
|
|
|
|
|
productName: string;
|
|
|
|
|
productCode: string | undefined;
|
|
|
|
|
color: string;
|
|
|
|
|
requestedMeterage: number;
|
|
|
|
|
confirmedMeterage: number | null;
|
|
|
|
|
unitPrice: number | null;
|
|
|
|
|
supplyPrice: number | null;
|
|
|
|
|
unitDiscount: number;
|
|
|
|
|
discount: number;
|
|
|
|
|
lineTotal: number | null;
|
|
|
|
|
totalAmount: number | null;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
}[];
|
|
|
|
|
checks: {
|
|
|
|
|
id: string;
|
|
|
|
|
orderId: string;
|
|
|
|
|
row: number;
|
|
|
|
|
amount: number;
|
|
|
|
|
dueDate: string;
|
|
|
|
|
sayadId: string | undefined;
|
|
|
|
|
checkNumber: string | undefined;
|
|
|
|
|
ownerNationalId: string | undefined;
|
|
|
|
|
ownerFirstName: string | undefined;
|
|
|
|
|
ownerLastName: string | undefined;
|
|
|
|
|
bankName: string;
|
|
|
|
|
branchName: string | undefined;
|
|
|
|
|
frontImage: string | undefined;
|
|
|
|
|
backImage: string | undefined;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
mode: import("@prisma/client").$Enums.CheckRegistrationMode;
|
|
|
|
|
status: import("@prisma/client").$Enums.CheckStatus;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
updatedAt: string;
|
|
|
|
|
}[];
|
|
|
|
|
cashReceipt: {
|
|
|
|
|
id: string;
|
|
|
|
|
amount: number;
|
|
|
|
|
paidAmount: number | null;
|
|
|
|
|
transferDate: string | null;
|
|
|
|
|
transferTime: string | undefined;
|
|
|
|
|
trackingNumber: string | undefined;
|
|
|
|
|
trackingCode: string | undefined;
|
|
|
|
|
destinationAccountId: string | undefined;
|
|
|
|
|
receiptImage: string | undefined;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
expiresAt: string | undefined;
|
|
|
|
|
status: import("@prisma/client").$Enums.CashPaymentStatus;
|
|
|
|
|
submittedAt: string | undefined;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
} | undefined;
|
|
|
|
|
shipment: {
|
|
|
|
|
id: string;
|
|
|
|
|
orderId: string;
|
|
|
|
|
carrier: string;
|
|
|
|
|
trackingNumber: string;
|
|
|
|
|
meterage: number;
|
|
|
|
|
status: import("@prisma/client").$Enums.ShipmentStatus;
|
|
|
|
|
shippedAt: string | null;
|
|
|
|
|
deliveredAt: string | null;
|
|
|
|
|
} | undefined;
|
|
|
|
|
statusHistory: {
|
|
|
|
|
id: string;
|
|
|
|
|
fromStatus: import("@prisma/client").$Enums.OrderStatus | null;
|
|
|
|
|
toStatus: import("@prisma/client").$Enums.OrderStatus;
|
|
|
|
|
changedBy: string;
|
|
|
|
|
note: string | undefined;
|
|
|
|
|
reason: string | undefined;
|
|
|
|
|
changedAt: string;
|
|
|
|
|
}[];
|
|
|
|
|
}[]>;
|
|
|
|
|
findMyOrder(userId: string, id: string): Promise<{
|
|
|
|
|
id: string;
|
|
|
|
|
orderNumber: string;
|
|
|
|
|
userId: string;
|
|
|
|
|
companyId: string;
|
|
|
|
|
companyName: string;
|
|
|
|
|
settlementType: import("@prisma/client").$Enums.SettlementType;
|
|
|
|
|
settlementMethod: import("@prisma/client").$Enums.SettlementType;
|
|
|
|
|
checkMode: import("@prisma/client").$Enums.CheckRegistrationMode | undefined;
|
|
|
|
|
status: import("@prisma/client").$Enums.OrderStatus;
|
|
|
|
|
adminStatus: string;
|
|
|
|
|
totalMeterage: number;
|
|
|
|
|
meterage: number;
|
|
|
|
|
totalAmount: number | null;
|
|
|
|
|
shippingCost: number | null;
|
|
|
|
|
totalDiscount: number | null;
|
|
|
|
|
finalAmount: number | null;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
checkRassDays: number | undefined;
|
|
|
|
|
checkRassDate: string | undefined;
|
|
|
|
|
cashInvoiceExpiresAt: string | undefined;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
updatedAt: string;
|
|
|
|
|
customerName: string;
|
|
|
|
|
customerPhone: string;
|
|
|
|
|
customerNationalId: string | undefined;
|
|
|
|
|
customerType: import("@prisma/client").$Enums.CustomerType;
|
|
|
|
|
items: {
|
|
|
|
|
id: string;
|
|
|
|
|
productId: string | undefined;
|
|
|
|
|
catalogCode: string;
|
|
|
|
|
productName: string;
|
|
|
|
|
productCode: string | undefined;
|
|
|
|
|
color: string;
|
|
|
|
|
requestedMeterage: number;
|
|
|
|
|
confirmedMeterage: number | null;
|
|
|
|
|
unitPrice: number | null;
|
|
|
|
|
supplyPrice: number | null;
|
|
|
|
|
unitDiscount: number;
|
|
|
|
|
discount: number;
|
|
|
|
|
lineTotal: number | null;
|
|
|
|
|
totalAmount: number | null;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
}[];
|
|
|
|
|
checks: {
|
|
|
|
|
id: string;
|
|
|
|
|
orderId: string;
|
|
|
|
|
row: number;
|
|
|
|
|
amount: number;
|
|
|
|
|
dueDate: string;
|
|
|
|
|
sayadId: string | undefined;
|
|
|
|
|
checkNumber: string | undefined;
|
|
|
|
|
ownerNationalId: string | undefined;
|
|
|
|
|
ownerFirstName: string | undefined;
|
|
|
|
|
ownerLastName: string | undefined;
|
|
|
|
|
bankName: string;
|
|
|
|
|
branchName: string | undefined;
|
|
|
|
|
frontImage: string | undefined;
|
|
|
|
|
backImage: string | undefined;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
mode: import("@prisma/client").$Enums.CheckRegistrationMode;
|
|
|
|
|
status: import("@prisma/client").$Enums.CheckStatus;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
updatedAt: string;
|
|
|
|
|
}[];
|
|
|
|
|
cashReceipt: {
|
|
|
|
|
id: string;
|
|
|
|
|
amount: number;
|
|
|
|
|
paidAmount: number | null;
|
|
|
|
|
transferDate: string | null;
|
|
|
|
|
transferTime: string | undefined;
|
|
|
|
|
trackingNumber: string | undefined;
|
|
|
|
|
trackingCode: string | undefined;
|
|
|
|
|
destinationAccountId: string | undefined;
|
|
|
|
|
receiptImage: string | undefined;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
expiresAt: string | undefined;
|
|
|
|
|
status: import("@prisma/client").$Enums.CashPaymentStatus;
|
|
|
|
|
submittedAt: string | undefined;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
} | undefined;
|
|
|
|
|
shipment: {
|
|
|
|
|
id: string;
|
|
|
|
|
orderId: string;
|
|
|
|
|
carrier: string;
|
|
|
|
|
trackingNumber: string;
|
|
|
|
|
meterage: number;
|
|
|
|
|
status: import("@prisma/client").$Enums.ShipmentStatus;
|
|
|
|
|
shippedAt: string | null;
|
|
|
|
|
deliveredAt: string | null;
|
|
|
|
|
} | undefined;
|
|
|
|
|
statusHistory: {
|
|
|
|
|
id: string;
|
|
|
|
|
fromStatus: import("@prisma/client").$Enums.OrderStatus | null;
|
|
|
|
|
toStatus: import("@prisma/client").$Enums.OrderStatus;
|
|
|
|
|
changedBy: string;
|
|
|
|
|
note: string | undefined;
|
|
|
|
|
reason: string | undefined;
|
|
|
|
|
changedAt: string;
|
|
|
|
|
}[];
|
|
|
|
|
}>;
|
|
|
|
|
findAdminOrders(filters: {
|
|
|
|
|
status?: string;
|
|
|
|
|
q?: string;
|
|
|
|
|
}): Promise<{
|
|
|
|
|
id: string;
|
|
|
|
|
orderNumber: string;
|
|
|
|
|
userId: string;
|
|
|
|
|
companyId: string;
|
|
|
|
|
companyName: string;
|
|
|
|
|
settlementType: import("@prisma/client").$Enums.SettlementType;
|
|
|
|
|
settlementMethod: import("@prisma/client").$Enums.SettlementType;
|
|
|
|
|
checkMode: import("@prisma/client").$Enums.CheckRegistrationMode | undefined;
|
|
|
|
|
status: import("@prisma/client").$Enums.OrderStatus;
|
|
|
|
|
adminStatus: string;
|
|
|
|
|
totalMeterage: number;
|
|
|
|
|
meterage: number;
|
|
|
|
|
totalAmount: number | null;
|
|
|
|
|
shippingCost: number | null;
|
|
|
|
|
totalDiscount: number | null;
|
|
|
|
|
finalAmount: number | null;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
checkRassDays: number | undefined;
|
|
|
|
|
checkRassDate: string | undefined;
|
|
|
|
|
cashInvoiceExpiresAt: string | undefined;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
updatedAt: string;
|
|
|
|
|
customerName: string;
|
|
|
|
|
customerPhone: string;
|
|
|
|
|
customerNationalId: string | undefined;
|
|
|
|
|
customerType: import("@prisma/client").$Enums.CustomerType;
|
|
|
|
|
items: {
|
|
|
|
|
id: string;
|
|
|
|
|
productId: string | undefined;
|
|
|
|
|
catalogCode: string;
|
|
|
|
|
productName: string;
|
|
|
|
|
productCode: string | undefined;
|
|
|
|
|
color: string;
|
|
|
|
|
requestedMeterage: number;
|
|
|
|
|
confirmedMeterage: number | null;
|
|
|
|
|
unitPrice: number | null;
|
|
|
|
|
supplyPrice: number | null;
|
|
|
|
|
unitDiscount: number;
|
|
|
|
|
discount: number;
|
|
|
|
|
lineTotal: number | null;
|
|
|
|
|
totalAmount: number | null;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
}[];
|
|
|
|
|
checks: {
|
|
|
|
|
id: string;
|
|
|
|
|
orderId: string;
|
|
|
|
|
row: number;
|
|
|
|
|
amount: number;
|
|
|
|
|
dueDate: string;
|
|
|
|
|
sayadId: string | undefined;
|
|
|
|
|
checkNumber: string | undefined;
|
|
|
|
|
ownerNationalId: string | undefined;
|
|
|
|
|
ownerFirstName: string | undefined;
|
|
|
|
|
ownerLastName: string | undefined;
|
|
|
|
|
bankName: string;
|
|
|
|
|
branchName: string | undefined;
|
|
|
|
|
frontImage: string | undefined;
|
|
|
|
|
backImage: string | undefined;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
mode: import("@prisma/client").$Enums.CheckRegistrationMode;
|
|
|
|
|
status: import("@prisma/client").$Enums.CheckStatus;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
updatedAt: string;
|
|
|
|
|
}[];
|
|
|
|
|
cashReceipt: {
|
|
|
|
|
id: string;
|
|
|
|
|
amount: number;
|
|
|
|
|
paidAmount: number | null;
|
|
|
|
|
transferDate: string | null;
|
|
|
|
|
transferTime: string | undefined;
|
|
|
|
|
trackingNumber: string | undefined;
|
|
|
|
|
trackingCode: string | undefined;
|
|
|
|
|
destinationAccountId: string | undefined;
|
|
|
|
|
receiptImage: string | undefined;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
expiresAt: string | undefined;
|
|
|
|
|
status: import("@prisma/client").$Enums.CashPaymentStatus;
|
|
|
|
|
submittedAt: string | undefined;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
} | undefined;
|
|
|
|
|
shipment: {
|
|
|
|
|
id: string;
|
|
|
|
|
orderId: string;
|
|
|
|
|
carrier: string;
|
|
|
|
|
trackingNumber: string;
|
|
|
|
|
meterage: number;
|
|
|
|
|
status: import("@prisma/client").$Enums.ShipmentStatus;
|
|
|
|
|
shippedAt: string | null;
|
|
|
|
|
deliveredAt: string | null;
|
|
|
|
|
} | undefined;
|
|
|
|
|
statusHistory: {
|
|
|
|
|
id: string;
|
|
|
|
|
fromStatus: import("@prisma/client").$Enums.OrderStatus | null;
|
|
|
|
|
toStatus: import("@prisma/client").$Enums.OrderStatus;
|
|
|
|
|
changedBy: string;
|
|
|
|
|
note: string | undefined;
|
|
|
|
|
reason: string | undefined;
|
|
|
|
|
changedAt: string;
|
|
|
|
|
}[];
|
|
|
|
|
}[]>;
|
|
|
|
|
findAdminOrder(id: string): Promise<{
|
|
|
|
|
id: string;
|
|
|
|
|
orderNumber: string;
|
|
|
|
|
userId: string;
|
|
|
|
|
companyId: string;
|
|
|
|
|
companyName: string;
|
|
|
|
|
settlementType: import("@prisma/client").$Enums.SettlementType;
|
|
|
|
|
settlementMethod: import("@prisma/client").$Enums.SettlementType;
|
|
|
|
|
checkMode: import("@prisma/client").$Enums.CheckRegistrationMode | undefined;
|
|
|
|
|
status: import("@prisma/client").$Enums.OrderStatus;
|
|
|
|
|
adminStatus: string;
|
|
|
|
|
totalMeterage: number;
|
|
|
|
|
meterage: number;
|
|
|
|
|
totalAmount: number | null;
|
|
|
|
|
shippingCost: number | null;
|
|
|
|
|
totalDiscount: number | null;
|
|
|
|
|
finalAmount: number | null;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
checkRassDays: number | undefined;
|
|
|
|
|
checkRassDate: string | undefined;
|
|
|
|
|
cashInvoiceExpiresAt: string | undefined;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
updatedAt: string;
|
|
|
|
|
customerName: string;
|
|
|
|
|
customerPhone: string;
|
|
|
|
|
customerNationalId: string | undefined;
|
|
|
|
|
customerType: import("@prisma/client").$Enums.CustomerType;
|
|
|
|
|
items: {
|
|
|
|
|
id: string;
|
|
|
|
|
productId: string | undefined;
|
|
|
|
|
catalogCode: string;
|
|
|
|
|
productName: string;
|
|
|
|
|
productCode: string | undefined;
|
|
|
|
|
color: string;
|
|
|
|
|
requestedMeterage: number;
|
|
|
|
|
confirmedMeterage: number | null;
|
|
|
|
|
unitPrice: number | null;
|
|
|
|
|
supplyPrice: number | null;
|
|
|
|
|
unitDiscount: number;
|
|
|
|
|
discount: number;
|
|
|
|
|
lineTotal: number | null;
|
|
|
|
|
totalAmount: number | null;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
}[];
|
|
|
|
|
checks: {
|
|
|
|
|
id: string;
|
|
|
|
|
orderId: string;
|
|
|
|
|
row: number;
|
|
|
|
|
amount: number;
|
|
|
|
|
dueDate: string;
|
|
|
|
|
sayadId: string | undefined;
|
|
|
|
|
checkNumber: string | undefined;
|
|
|
|
|
ownerNationalId: string | undefined;
|
|
|
|
|
ownerFirstName: string | undefined;
|
|
|
|
|
ownerLastName: string | undefined;
|
|
|
|
|
bankName: string;
|
|
|
|
|
branchName: string | undefined;
|
|
|
|
|
frontImage: string | undefined;
|
|
|
|
|
backImage: string | undefined;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
mode: import("@prisma/client").$Enums.CheckRegistrationMode;
|
|
|
|
|
status: import("@prisma/client").$Enums.CheckStatus;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
updatedAt: string;
|
|
|
|
|
}[];
|
|
|
|
|
cashReceipt: {
|
|
|
|
|
id: string;
|
|
|
|
|
amount: number;
|
|
|
|
|
paidAmount: number | null;
|
|
|
|
|
transferDate: string | null;
|
|
|
|
|
transferTime: string | undefined;
|
|
|
|
|
trackingNumber: string | undefined;
|
|
|
|
|
trackingCode: string | undefined;
|
|
|
|
|
destinationAccountId: string | undefined;
|
|
|
|
|
receiptImage: string | undefined;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
expiresAt: string | undefined;
|
|
|
|
|
status: import("@prisma/client").$Enums.CashPaymentStatus;
|
|
|
|
|
submittedAt: string | undefined;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
} | undefined;
|
|
|
|
|
shipment: {
|
|
|
|
|
id: string;
|
|
|
|
|
orderId: string;
|
|
|
|
|
carrier: string;
|
|
|
|
|
trackingNumber: string;
|
|
|
|
|
meterage: number;
|
|
|
|
|
status: import("@prisma/client").$Enums.ShipmentStatus;
|
|
|
|
|
shippedAt: string | null;
|
|
|
|
|
deliveredAt: string | null;
|
|
|
|
|
} | undefined;
|
|
|
|
|
statusHistory: {
|
|
|
|
|
id: string;
|
|
|
|
|
fromStatus: import("@prisma/client").$Enums.OrderStatus | null;
|
|
|
|
|
toStatus: import("@prisma/client").$Enums.OrderStatus;
|
|
|
|
|
changedBy: string;
|
|
|
|
|
note: string | undefined;
|
|
|
|
|
reason: string | undefined;
|
|
|
|
|
changedAt: string;
|
|
|
|
|
}[];
|
|
|
|
|
}>;
|
|
|
|
|
submitOrder(userId: string, dto: SubmitOrderDto): Promise<{
|
|
|
|
|
id: string;
|
|
|
|
|
orderNumber: string;
|
|
|
|
|
userId: string;
|
|
|
|
|
companyId: string;
|
|
|
|
|
companyName: string;
|
|
|
|
|
settlementType: import("@prisma/client").$Enums.SettlementType;
|
|
|
|
|
settlementMethod: import("@prisma/client").$Enums.SettlementType;
|
|
|
|
|
checkMode: import("@prisma/client").$Enums.CheckRegistrationMode | undefined;
|
|
|
|
|
status: import("@prisma/client").$Enums.OrderStatus;
|
|
|
|
|
adminStatus: string;
|
|
|
|
|
totalMeterage: number;
|
|
|
|
|
meterage: number;
|
|
|
|
|
totalAmount: number | null;
|
|
|
|
|
shippingCost: number | null;
|
|
|
|
|
totalDiscount: number | null;
|
|
|
|
|
finalAmount: number | null;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
checkRassDays: number | undefined;
|
|
|
|
|
checkRassDate: string | undefined;
|
|
|
|
|
cashInvoiceExpiresAt: string | undefined;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
updatedAt: string;
|
|
|
|
|
customerName: string;
|
|
|
|
|
customerPhone: string;
|
|
|
|
|
customerNationalId: string | undefined;
|
|
|
|
|
customerType: import("@prisma/client").$Enums.CustomerType;
|
|
|
|
|
items: {
|
|
|
|
|
id: string;
|
|
|
|
|
productId: string | undefined;
|
|
|
|
|
catalogCode: string;
|
|
|
|
|
productName: string;
|
|
|
|
|
productCode: string | undefined;
|
|
|
|
|
color: string;
|
|
|
|
|
requestedMeterage: number;
|
|
|
|
|
confirmedMeterage: number | null;
|
|
|
|
|
unitPrice: number | null;
|
|
|
|
|
supplyPrice: number | null;
|
|
|
|
|
unitDiscount: number;
|
|
|
|
|
discount: number;
|
|
|
|
|
lineTotal: number | null;
|
|
|
|
|
totalAmount: number | null;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
}[];
|
|
|
|
|
checks: {
|
|
|
|
|
id: string;
|
|
|
|
|
orderId: string;
|
|
|
|
|
row: number;
|
|
|
|
|
amount: number;
|
|
|
|
|
dueDate: string;
|
|
|
|
|
sayadId: string | undefined;
|
|
|
|
|
checkNumber: string | undefined;
|
|
|
|
|
ownerNationalId: string | undefined;
|
|
|
|
|
ownerFirstName: string | undefined;
|
|
|
|
|
ownerLastName: string | undefined;
|
|
|
|
|
bankName: string;
|
|
|
|
|
branchName: string | undefined;
|
|
|
|
|
frontImage: string | undefined;
|
|
|
|
|
backImage: string | undefined;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
mode: import("@prisma/client").$Enums.CheckRegistrationMode;
|
|
|
|
|
status: import("@prisma/client").$Enums.CheckStatus;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
updatedAt: string;
|
|
|
|
|
}[];
|
|
|
|
|
cashReceipt: {
|
|
|
|
|
id: string;
|
|
|
|
|
amount: number;
|
|
|
|
|
paidAmount: number | null;
|
|
|
|
|
transferDate: string | null;
|
|
|
|
|
transferTime: string | undefined;
|
|
|
|
|
trackingNumber: string | undefined;
|
|
|
|
|
trackingCode: string | undefined;
|
|
|
|
|
destinationAccountId: string | undefined;
|
|
|
|
|
receiptImage: string | undefined;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
expiresAt: string | undefined;
|
|
|
|
|
status: import("@prisma/client").$Enums.CashPaymentStatus;
|
|
|
|
|
submittedAt: string | undefined;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
} | undefined;
|
|
|
|
|
shipment: {
|
|
|
|
|
id: string;
|
|
|
|
|
orderId: string;
|
|
|
|
|
carrier: string;
|
|
|
|
|
trackingNumber: string;
|
|
|
|
|
meterage: number;
|
|
|
|
|
status: import("@prisma/client").$Enums.ShipmentStatus;
|
|
|
|
|
shippedAt: string | null;
|
|
|
|
|
deliveredAt: string | null;
|
|
|
|
|
} | undefined;
|
|
|
|
|
statusHistory: {
|
|
|
|
|
id: string;
|
|
|
|
|
fromStatus: import("@prisma/client").$Enums.OrderStatus | null;
|
|
|
|
|
toStatus: import("@prisma/client").$Enums.OrderStatus;
|
|
|
|
|
changedBy: string;
|
|
|
|
|
note: string | undefined;
|
|
|
|
|
reason: string | undefined;
|
|
|
|
|
changedAt: string;
|
|
|
|
|
}[];
|
|
|
|
|
}>;
|
|
|
|
|
adminCreate(adminId: string, dto: AdminCreateOrderDto): Promise<{
|
|
|
|
|
id: string;
|
|
|
|
|
orderNumber: string;
|
|
|
|
|
userId: string;
|
|
|
|
|
companyId: string;
|
|
|
|
|
companyName: string;
|
|
|
|
|
settlementType: import("@prisma/client").$Enums.SettlementType;
|
|
|
|
|
settlementMethod: import("@prisma/client").$Enums.SettlementType;
|
|
|
|
|
checkMode: import("@prisma/client").$Enums.CheckRegistrationMode | undefined;
|
|
|
|
|
status: import("@prisma/client").$Enums.OrderStatus;
|
|
|
|
|
adminStatus: string;
|
|
|
|
|
totalMeterage: number;
|
|
|
|
|
meterage: number;
|
|
|
|
|
totalAmount: number | null;
|
|
|
|
|
shippingCost: number | null;
|
|
|
|
|
totalDiscount: number | null;
|
|
|
|
|
finalAmount: number | null;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
checkRassDays: number | undefined;
|
|
|
|
|
checkRassDate: string | undefined;
|
|
|
|
|
cashInvoiceExpiresAt: string | undefined;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
updatedAt: string;
|
|
|
|
|
customerName: string;
|
|
|
|
|
customerPhone: string;
|
|
|
|
|
customerNationalId: string | undefined;
|
|
|
|
|
customerType: import("@prisma/client").$Enums.CustomerType;
|
|
|
|
|
items: {
|
|
|
|
|
id: string;
|
|
|
|
|
productId: string | undefined;
|
|
|
|
|
catalogCode: string;
|
|
|
|
|
productName: string;
|
|
|
|
|
productCode: string | undefined;
|
|
|
|
|
color: string;
|
|
|
|
|
requestedMeterage: number;
|
|
|
|
|
confirmedMeterage: number | null;
|
|
|
|
|
unitPrice: number | null;
|
|
|
|
|
supplyPrice: number | null;
|
|
|
|
|
unitDiscount: number;
|
|
|
|
|
discount: number;
|
|
|
|
|
lineTotal: number | null;
|
|
|
|
|
totalAmount: number | null;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
}[];
|
|
|
|
|
checks: {
|
|
|
|
|
id: string;
|
|
|
|
|
orderId: string;
|
|
|
|
|
row: number;
|
|
|
|
|
amount: number;
|
|
|
|
|
dueDate: string;
|
|
|
|
|
sayadId: string | undefined;
|
|
|
|
|
checkNumber: string | undefined;
|
|
|
|
|
ownerNationalId: string | undefined;
|
|
|
|
|
ownerFirstName: string | undefined;
|
|
|
|
|
ownerLastName: string | undefined;
|
|
|
|
|
bankName: string;
|
|
|
|
|
branchName: string | undefined;
|
|
|
|
|
frontImage: string | undefined;
|
|
|
|
|
backImage: string | undefined;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
mode: import("@prisma/client").$Enums.CheckRegistrationMode;
|
|
|
|
|
status: import("@prisma/client").$Enums.CheckStatus;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
updatedAt: string;
|
|
|
|
|
}[];
|
|
|
|
|
cashReceipt: {
|
|
|
|
|
id: string;
|
|
|
|
|
amount: number;
|
|
|
|
|
paidAmount: number | null;
|
|
|
|
|
transferDate: string | null;
|
|
|
|
|
transferTime: string | undefined;
|
|
|
|
|
trackingNumber: string | undefined;
|
|
|
|
|
trackingCode: string | undefined;
|
|
|
|
|
destinationAccountId: string | undefined;
|
|
|
|
|
receiptImage: string | undefined;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
expiresAt: string | undefined;
|
|
|
|
|
status: import("@prisma/client").$Enums.CashPaymentStatus;
|
|
|
|
|
submittedAt: string | undefined;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
} | undefined;
|
|
|
|
|
shipment: {
|
|
|
|
|
id: string;
|
|
|
|
|
orderId: string;
|
|
|
|
|
carrier: string;
|
|
|
|
|
trackingNumber: string;
|
|
|
|
|
meterage: number;
|
|
|
|
|
status: import("@prisma/client").$Enums.ShipmentStatus;
|
|
|
|
|
shippedAt: string | null;
|
|
|
|
|
deliveredAt: string | null;
|
|
|
|
|
} | undefined;
|
|
|
|
|
statusHistory: {
|
|
|
|
|
id: string;
|
|
|
|
|
fromStatus: import("@prisma/client").$Enums.OrderStatus | null;
|
|
|
|
|
toStatus: import("@prisma/client").$Enums.OrderStatus;
|
|
|
|
|
changedBy: string;
|
|
|
|
|
note: string | undefined;
|
|
|
|
|
reason: string | undefined;
|
|
|
|
|
changedAt: string;
|
|
|
|
|
}[];
|
|
|
|
|
}>;
|
|
|
|
|
updatePricing(id: string, adminId: string, dto: UpdateOrderPricingDto): Promise<{
|
|
|
|
|
id: string;
|
|
|
|
|
orderNumber: string;
|
|
|
|
|
userId: string;
|
|
|
|
|
companyId: string;
|
|
|
|
|
companyName: string;
|
|
|
|
|
settlementType: import("@prisma/client").$Enums.SettlementType;
|
|
|
|
|
settlementMethod: import("@prisma/client").$Enums.SettlementType;
|
|
|
|
|
checkMode: import("@prisma/client").$Enums.CheckRegistrationMode | undefined;
|
|
|
|
|
status: import("@prisma/client").$Enums.OrderStatus;
|
|
|
|
|
adminStatus: string;
|
|
|
|
|
totalMeterage: number;
|
|
|
|
|
meterage: number;
|
|
|
|
|
totalAmount: number | null;
|
|
|
|
|
shippingCost: number | null;
|
|
|
|
|
totalDiscount: number | null;
|
|
|
|
|
finalAmount: number | null;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
checkRassDays: number | undefined;
|
|
|
|
|
checkRassDate: string | undefined;
|
|
|
|
|
cashInvoiceExpiresAt: string | undefined;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
updatedAt: string;
|
|
|
|
|
customerName: string;
|
|
|
|
|
customerPhone: string;
|
|
|
|
|
customerNationalId: string | undefined;
|
|
|
|
|
customerType: import("@prisma/client").$Enums.CustomerType;
|
|
|
|
|
items: {
|
|
|
|
|
id: string;
|
|
|
|
|
productId: string | undefined;
|
|
|
|
|
catalogCode: string;
|
|
|
|
|
productName: string;
|
|
|
|
|
productCode: string | undefined;
|
|
|
|
|
color: string;
|
|
|
|
|
requestedMeterage: number;
|
|
|
|
|
confirmedMeterage: number | null;
|
|
|
|
|
unitPrice: number | null;
|
|
|
|
|
supplyPrice: number | null;
|
|
|
|
|
unitDiscount: number;
|
|
|
|
|
discount: number;
|
|
|
|
|
lineTotal: number | null;
|
|
|
|
|
totalAmount: number | null;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
}[];
|
|
|
|
|
checks: {
|
|
|
|
|
id: string;
|
|
|
|
|
orderId: string;
|
|
|
|
|
row: number;
|
|
|
|
|
amount: number;
|
|
|
|
|
dueDate: string;
|
|
|
|
|
sayadId: string | undefined;
|
|
|
|
|
checkNumber: string | undefined;
|
|
|
|
|
ownerNationalId: string | undefined;
|
|
|
|
|
ownerFirstName: string | undefined;
|
|
|
|
|
ownerLastName: string | undefined;
|
|
|
|
|
bankName: string;
|
|
|
|
|
branchName: string | undefined;
|
|
|
|
|
frontImage: string | undefined;
|
|
|
|
|
backImage: string | undefined;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
mode: import("@prisma/client").$Enums.CheckRegistrationMode;
|
|
|
|
|
status: import("@prisma/client").$Enums.CheckStatus;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
updatedAt: string;
|
|
|
|
|
}[];
|
|
|
|
|
cashReceipt: {
|
|
|
|
|
id: string;
|
|
|
|
|
amount: number;
|
|
|
|
|
paidAmount: number | null;
|
|
|
|
|
transferDate: string | null;
|
|
|
|
|
transferTime: string | undefined;
|
|
|
|
|
trackingNumber: string | undefined;
|
|
|
|
|
trackingCode: string | undefined;
|
|
|
|
|
destinationAccountId: string | undefined;
|
|
|
|
|
receiptImage: string | undefined;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
expiresAt: string | undefined;
|
|
|
|
|
status: import("@prisma/client").$Enums.CashPaymentStatus;
|
|
|
|
|
submittedAt: string | undefined;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
} | undefined;
|
|
|
|
|
shipment: {
|
|
|
|
|
id: string;
|
|
|
|
|
orderId: string;
|
|
|
|
|
carrier: string;
|
|
|
|
|
trackingNumber: string;
|
|
|
|
|
meterage: number;
|
|
|
|
|
status: import("@prisma/client").$Enums.ShipmentStatus;
|
|
|
|
|
shippedAt: string | null;
|
|
|
|
|
deliveredAt: string | null;
|
|
|
|
|
} | undefined;
|
|
|
|
|
statusHistory: {
|
|
|
|
|
id: string;
|
|
|
|
|
fromStatus: import("@prisma/client").$Enums.OrderStatus | null;
|
|
|
|
|
toStatus: import("@prisma/client").$Enums.OrderStatus;
|
|
|
|
|
changedBy: string;
|
|
|
|
|
note: string | undefined;
|
|
|
|
|
reason: string | undefined;
|
|
|
|
|
changedAt: string;
|
|
|
|
|
}[];
|
|
|
|
|
}>;
|
|
|
|
|
updateStatus(id: string, adminId: string, dto: UpdateOrderStatusDto): Promise<{
|
|
|
|
|
id: string;
|
|
|
|
|
orderNumber: string;
|
|
|
|
|
userId: string;
|
|
|
|
|
companyId: string;
|
|
|
|
|
companyName: string;
|
|
|
|
|
settlementType: import("@prisma/client").$Enums.SettlementType;
|
|
|
|
|
settlementMethod: import("@prisma/client").$Enums.SettlementType;
|
|
|
|
|
checkMode: import("@prisma/client").$Enums.CheckRegistrationMode | undefined;
|
|
|
|
|
status: import("@prisma/client").$Enums.OrderStatus;
|
|
|
|
|
adminStatus: string;
|
|
|
|
|
totalMeterage: number;
|
|
|
|
|
meterage: number;
|
|
|
|
|
totalAmount: number | null;
|
|
|
|
|
shippingCost: number | null;
|
|
|
|
|
totalDiscount: number | null;
|
|
|
|
|
finalAmount: number | null;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
checkRassDays: number | undefined;
|
|
|
|
|
checkRassDate: string | undefined;
|
|
|
|
|
cashInvoiceExpiresAt: string | undefined;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
updatedAt: string;
|
|
|
|
|
customerName: string;
|
|
|
|
|
customerPhone: string;
|
|
|
|
|
customerNationalId: string | undefined;
|
|
|
|
|
customerType: import("@prisma/client").$Enums.CustomerType;
|
|
|
|
|
items: {
|
|
|
|
|
id: string;
|
|
|
|
|
productId: string | undefined;
|
|
|
|
|
catalogCode: string;
|
|
|
|
|
productName: string;
|
|
|
|
|
productCode: string | undefined;
|
|
|
|
|
color: string;
|
|
|
|
|
requestedMeterage: number;
|
|
|
|
|
confirmedMeterage: number | null;
|
|
|
|
|
unitPrice: number | null;
|
|
|
|
|
supplyPrice: number | null;
|
|
|
|
|
unitDiscount: number;
|
|
|
|
|
discount: number;
|
|
|
|
|
lineTotal: number | null;
|
|
|
|
|
totalAmount: number | null;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
}[];
|
|
|
|
|
checks: {
|
|
|
|
|
id: string;
|
|
|
|
|
orderId: string;
|
|
|
|
|
row: number;
|
|
|
|
|
amount: number;
|
|
|
|
|
dueDate: string;
|
|
|
|
|
sayadId: string | undefined;
|
|
|
|
|
checkNumber: string | undefined;
|
|
|
|
|
ownerNationalId: string | undefined;
|
|
|
|
|
ownerFirstName: string | undefined;
|
|
|
|
|
ownerLastName: string | undefined;
|
|
|
|
|
bankName: string;
|
|
|
|
|
branchName: string | undefined;
|
|
|
|
|
frontImage: string | undefined;
|
|
|
|
|
backImage: string | undefined;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
mode: import("@prisma/client").$Enums.CheckRegistrationMode;
|
|
|
|
|
status: import("@prisma/client").$Enums.CheckStatus;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
updatedAt: string;
|
|
|
|
|
}[];
|
|
|
|
|
cashReceipt: {
|
|
|
|
|
id: string;
|
|
|
|
|
amount: number;
|
|
|
|
|
paidAmount: number | null;
|
|
|
|
|
transferDate: string | null;
|
|
|
|
|
transferTime: string | undefined;
|
|
|
|
|
trackingNumber: string | undefined;
|
|
|
|
|
trackingCode: string | undefined;
|
|
|
|
|
destinationAccountId: string | undefined;
|
|
|
|
|
receiptImage: string | undefined;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
expiresAt: string | undefined;
|
|
|
|
|
status: import("@prisma/client").$Enums.CashPaymentStatus;
|
|
|
|
|
submittedAt: string | undefined;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
} | undefined;
|
|
|
|
|
shipment: {
|
|
|
|
|
id: string;
|
|
|
|
|
orderId: string;
|
|
|
|
|
carrier: string;
|
|
|
|
|
trackingNumber: string;
|
|
|
|
|
meterage: number;
|
|
|
|
|
status: import("@prisma/client").$Enums.ShipmentStatus;
|
|
|
|
|
shippedAt: string | null;
|
|
|
|
|
deliveredAt: string | null;
|
|
|
|
|
} | undefined;
|
|
|
|
|
statusHistory: {
|
|
|
|
|
id: string;
|
|
|
|
|
fromStatus: import("@prisma/client").$Enums.OrderStatus | null;
|
|
|
|
|
toStatus: import("@prisma/client").$Enums.OrderStatus;
|
|
|
|
|
changedBy: string;
|
|
|
|
|
note: string | undefined;
|
|
|
|
|
reason: string | undefined;
|
|
|
|
|
changedAt: string;
|
|
|
|
|
}[];
|
|
|
|
|
}>;
|
|
|
|
|
updateChecks(userId: string, id: string, dto: UpdateOrderChecksDto): Promise<{
|
|
|
|
|
id: string;
|
|
|
|
|
orderNumber: string;
|
|
|
|
|
userId: string;
|
|
|
|
|
companyId: string;
|
|
|
|
|
companyName: string;
|
|
|
|
|
settlementType: import("@prisma/client").$Enums.SettlementType;
|
|
|
|
|
settlementMethod: import("@prisma/client").$Enums.SettlementType;
|
|
|
|
|
checkMode: import("@prisma/client").$Enums.CheckRegistrationMode | undefined;
|
|
|
|
|
status: import("@prisma/client").$Enums.OrderStatus;
|
|
|
|
|
adminStatus: string;
|
|
|
|
|
totalMeterage: number;
|
|
|
|
|
meterage: number;
|
|
|
|
|
totalAmount: number | null;
|
|
|
|
|
shippingCost: number | null;
|
|
|
|
|
totalDiscount: number | null;
|
|
|
|
|
finalAmount: number | null;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
checkRassDays: number | undefined;
|
|
|
|
|
checkRassDate: string | undefined;
|
|
|
|
|
cashInvoiceExpiresAt: string | undefined;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
updatedAt: string;
|
|
|
|
|
customerName: string;
|
|
|
|
|
customerPhone: string;
|
|
|
|
|
customerNationalId: string | undefined;
|
|
|
|
|
customerType: import("@prisma/client").$Enums.CustomerType;
|
|
|
|
|
items: {
|
|
|
|
|
id: string;
|
|
|
|
|
productId: string | undefined;
|
|
|
|
|
catalogCode: string;
|
|
|
|
|
productName: string;
|
|
|
|
|
productCode: string | undefined;
|
|
|
|
|
color: string;
|
|
|
|
|
requestedMeterage: number;
|
|
|
|
|
confirmedMeterage: number | null;
|
|
|
|
|
unitPrice: number | null;
|
|
|
|
|
supplyPrice: number | null;
|
|
|
|
|
unitDiscount: number;
|
|
|
|
|
discount: number;
|
|
|
|
|
lineTotal: number | null;
|
|
|
|
|
totalAmount: number | null;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
}[];
|
|
|
|
|
checks: {
|
|
|
|
|
id: string;
|
|
|
|
|
orderId: string;
|
|
|
|
|
row: number;
|
|
|
|
|
amount: number;
|
|
|
|
|
dueDate: string;
|
|
|
|
|
sayadId: string | undefined;
|
|
|
|
|
checkNumber: string | undefined;
|
|
|
|
|
ownerNationalId: string | undefined;
|
|
|
|
|
ownerFirstName: string | undefined;
|
|
|
|
|
ownerLastName: string | undefined;
|
|
|
|
|
bankName: string;
|
|
|
|
|
branchName: string | undefined;
|
|
|
|
|
frontImage: string | undefined;
|
|
|
|
|
backImage: string | undefined;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
mode: import("@prisma/client").$Enums.CheckRegistrationMode;
|
|
|
|
|
status: import("@prisma/client").$Enums.CheckStatus;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
updatedAt: string;
|
|
|
|
|
}[];
|
|
|
|
|
cashReceipt: {
|
|
|
|
|
id: string;
|
|
|
|
|
amount: number;
|
|
|
|
|
paidAmount: number | null;
|
|
|
|
|
transferDate: string | null;
|
|
|
|
|
transferTime: string | undefined;
|
|
|
|
|
trackingNumber: string | undefined;
|
|
|
|
|
trackingCode: string | undefined;
|
|
|
|
|
destinationAccountId: string | undefined;
|
|
|
|
|
receiptImage: string | undefined;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
expiresAt: string | undefined;
|
|
|
|
|
status: import("@prisma/client").$Enums.CashPaymentStatus;
|
|
|
|
|
submittedAt: string | undefined;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
} | undefined;
|
|
|
|
|
shipment: {
|
|
|
|
|
id: string;
|
|
|
|
|
orderId: string;
|
|
|
|
|
carrier: string;
|
|
|
|
|
trackingNumber: string;
|
|
|
|
|
meterage: number;
|
|
|
|
|
status: import("@prisma/client").$Enums.ShipmentStatus;
|
|
|
|
|
shippedAt: string | null;
|
|
|
|
|
deliveredAt: string | null;
|
|
|
|
|
} | undefined;
|
|
|
|
|
statusHistory: {
|
|
|
|
|
id: string;
|
|
|
|
|
fromStatus: import("@prisma/client").$Enums.OrderStatus | null;
|
|
|
|
|
toStatus: import("@prisma/client").$Enums.OrderStatus;
|
|
|
|
|
changedBy: string;
|
|
|
|
|
note: string | undefined;
|
|
|
|
|
reason: string | undefined;
|
|
|
|
|
changedAt: string;
|
|
|
|
|
}[];
|
|
|
|
|
}>;
|
|
|
|
|
private mapCheckCreate;
|
|
|
|
|
private nextOrderNumber;
|
2026-08-08 14:55:26 +03:30
|
|
|
private createWithUniqueOrderNumber;
|
2026-08-05 21:35:22 +03:30
|
|
|
private getOrder;
|
|
|
|
|
mapOrder(order: OrderFull, adminView?: boolean): {
|
|
|
|
|
id: string;
|
|
|
|
|
orderNumber: string;
|
|
|
|
|
userId: string;
|
|
|
|
|
companyId: string;
|
|
|
|
|
companyName: string;
|
|
|
|
|
settlementType: import("@prisma/client").$Enums.SettlementType;
|
|
|
|
|
settlementMethod: import("@prisma/client").$Enums.SettlementType;
|
|
|
|
|
checkMode: import("@prisma/client").$Enums.CheckRegistrationMode | undefined;
|
|
|
|
|
status: import("@prisma/client").$Enums.OrderStatus;
|
|
|
|
|
adminStatus: string;
|
|
|
|
|
totalMeterage: number;
|
|
|
|
|
meterage: number;
|
|
|
|
|
totalAmount: number | null;
|
|
|
|
|
shippingCost: number | null;
|
|
|
|
|
totalDiscount: number | null;
|
|
|
|
|
finalAmount: number | null;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
checkRassDays: number | undefined;
|
|
|
|
|
checkRassDate: string | undefined;
|
|
|
|
|
cashInvoiceExpiresAt: string | undefined;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
updatedAt: string;
|
|
|
|
|
customerName: string;
|
|
|
|
|
customerPhone: string;
|
|
|
|
|
customerNationalId: string | undefined;
|
|
|
|
|
customerType: import("@prisma/client").$Enums.CustomerType;
|
|
|
|
|
items: {
|
|
|
|
|
id: string;
|
|
|
|
|
productId: string | undefined;
|
|
|
|
|
catalogCode: string;
|
|
|
|
|
productName: string;
|
|
|
|
|
productCode: string | undefined;
|
|
|
|
|
color: string;
|
|
|
|
|
requestedMeterage: number;
|
|
|
|
|
confirmedMeterage: number | null;
|
|
|
|
|
unitPrice: number | null;
|
|
|
|
|
supplyPrice: number | null;
|
|
|
|
|
unitDiscount: number;
|
|
|
|
|
discount: number;
|
|
|
|
|
lineTotal: number | null;
|
|
|
|
|
totalAmount: number | null;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
}[];
|
|
|
|
|
checks: {
|
|
|
|
|
id: string;
|
|
|
|
|
orderId: string;
|
|
|
|
|
row: number;
|
|
|
|
|
amount: number;
|
|
|
|
|
dueDate: string;
|
|
|
|
|
sayadId: string | undefined;
|
|
|
|
|
checkNumber: string | undefined;
|
|
|
|
|
ownerNationalId: string | undefined;
|
|
|
|
|
ownerFirstName: string | undefined;
|
|
|
|
|
ownerLastName: string | undefined;
|
|
|
|
|
bankName: string;
|
|
|
|
|
branchName: string | undefined;
|
|
|
|
|
frontImage: string | undefined;
|
|
|
|
|
backImage: string | undefined;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
mode: import("@prisma/client").$Enums.CheckRegistrationMode;
|
|
|
|
|
status: import("@prisma/client").$Enums.CheckStatus;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
updatedAt: string;
|
|
|
|
|
}[];
|
|
|
|
|
cashReceipt: {
|
|
|
|
|
id: string;
|
|
|
|
|
amount: number;
|
|
|
|
|
paidAmount: number | null;
|
|
|
|
|
transferDate: string | null;
|
|
|
|
|
transferTime: string | undefined;
|
|
|
|
|
trackingNumber: string | undefined;
|
|
|
|
|
trackingCode: string | undefined;
|
|
|
|
|
destinationAccountId: string | undefined;
|
|
|
|
|
receiptImage: string | undefined;
|
|
|
|
|
notes: string | undefined;
|
|
|
|
|
expiresAt: string | undefined;
|
|
|
|
|
status: import("@prisma/client").$Enums.CashPaymentStatus;
|
|
|
|
|
submittedAt: string | undefined;
|
|
|
|
|
createdAt: string;
|
|
|
|
|
} | undefined;
|
|
|
|
|
shipment: {
|
|
|
|
|
id: string;
|
|
|
|
|
orderId: string;
|
|
|
|
|
carrier: string;
|
|
|
|
|
trackingNumber: string;
|
|
|
|
|
meterage: number;
|
|
|
|
|
status: import("@prisma/client").$Enums.ShipmentStatus;
|
|
|
|
|
shippedAt: string | null;
|
|
|
|
|
deliveredAt: string | null;
|
|
|
|
|
} | undefined;
|
|
|
|
|
statusHistory: {
|
|
|
|
|
id: string;
|
|
|
|
|
fromStatus: import("@prisma/client").$Enums.OrderStatus | null;
|
|
|
|
|
toStatus: import("@prisma/client").$Enums.OrderStatus;
|
|
|
|
|
changedBy: string;
|
|
|
|
|
note: string | undefined;
|
|
|
|
|
reason: string | undefined;
|
|
|
|
|
changedAt: string;
|
|
|
|
|
}[];
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
export {};
|