Hide prices until admin sends the invoice, enforce status transitions, add customer/admin SMS+in-app notifications, schedule cash invoice reminders, and ship updated dist/prisma-client/deploy-bundle for git-pull deploys. Co-authored-by: Cursor <cursoragent@cursor.com>
71 lines
2.5 KiB
TypeScript
71 lines
2.5 KiB
TypeScript
import { CashPaymentStatus } from '@prisma/client';
|
|
import { PrismaService } from '../prisma/prisma.service';
|
|
import { SubmitCashReceiptDto, UpdateCashPaymentStatusDto } from './dto/cash-payment.dto';
|
|
import { NotificationsService } from '../notifications/notifications.service';
|
|
export declare class CashPaymentsService {
|
|
private readonly prisma;
|
|
private readonly notifications;
|
|
constructor(prisma: PrismaService, notifications: NotificationsService);
|
|
submitReceipt(userId: string, orderId: string, dto: SubmitCashReceiptDto): Promise<{
|
|
id: string;
|
|
orderId: string;
|
|
orderNumber: string;
|
|
customerName: string;
|
|
amount: number;
|
|
paidAmount: number | null;
|
|
transferDate: string | null;
|
|
transferTime: string | undefined;
|
|
trackingNumber: string;
|
|
trackingCode: string;
|
|
destinationAccountId: string | undefined;
|
|
receiptImage: string | undefined;
|
|
notes: string | undefined;
|
|
expiresAt: string;
|
|
status: import("@prisma/client").$Enums.CashPaymentStatus;
|
|
submittedAt: string | undefined;
|
|
createdAt: string;
|
|
updatedAt: string;
|
|
}>;
|
|
findAll(status?: CashPaymentStatus): Promise<{
|
|
id: string;
|
|
orderId: string;
|
|
orderNumber: string;
|
|
customerName: string;
|
|
amount: number;
|
|
paidAmount: number | null;
|
|
transferDate: string | null;
|
|
transferTime: string | undefined;
|
|
trackingNumber: string;
|
|
trackingCode: string;
|
|
destinationAccountId: string | undefined;
|
|
receiptImage: string | undefined;
|
|
notes: string | undefined;
|
|
expiresAt: string;
|
|
status: import("@prisma/client").$Enums.CashPaymentStatus;
|
|
submittedAt: string | undefined;
|
|
createdAt: string;
|
|
updatedAt: string;
|
|
}[]>;
|
|
updateStatus(id: string, adminId: string, dto: UpdateCashPaymentStatusDto): Promise<{
|
|
id: string;
|
|
orderId: string;
|
|
orderNumber: string;
|
|
customerName: string;
|
|
amount: number;
|
|
paidAmount: number | null;
|
|
transferDate: string | null;
|
|
transferTime: string | undefined;
|
|
trackingNumber: string;
|
|
trackingCode: string;
|
|
destinationAccountId: string | undefined;
|
|
receiptImage: string | undefined;
|
|
notes: string | undefined;
|
|
expiresAt: string;
|
|
status: import("@prisma/client").$Enums.CashPaymentStatus;
|
|
submittedAt: string | undefined;
|
|
createdAt: string;
|
|
updatedAt: string;
|
|
}>;
|
|
private mapReceipt;
|
|
}
|