import { PaymentServiceProvider, PaymentType, ReceiptStatusType, CloseType } from '../../enums'; import { CursorPaginationEnabled, Filterable, QueryOptions } from './common'; import { ClosingSalesProductDetail, Expenditure, Operator, Order, Transaction } from '../../models'; import { SummarizeClosingResponse } from '../response'; export interface AggregateShiftClosingRequest { storeId: string; accountId: string; status: ReceiptStatusType; issuedAt: number; paymentServiceProvider: PaymentServiceProvider; paymentType: PaymentType; customName?: string; mixPayments?: Transaction[]; amount: number; order: Order; voidedInvoiceNumber?: string; } export interface AggregateDailyClosingRequest extends SummarizeClosingResponse { } export declare type AggregateClosingRequest = AggregateShiftClosingRequest | AggregateDailyClosingRequest; export interface GetClosingsRequest extends CursorPaginationEnabled, Filterable, QueryOptions { storeId: string; accountId: string; } export interface SummarizeClosingRequest { storeId: string; accountId: string; type: CloseType; resetSerialNumber?: boolean; operator?: Operator; } export interface SummarizeShiftClosingRequest extends SummarizeClosingRequest { type: CloseType.Shift; detail: ShiftClosingPaymentDetail[]; cancelledSales: CancelledSales; } export interface ShiftClosingPaymentDetail { paymentServiceProvider: PaymentServiceProvider; paymentType: PaymentType; /** 自定義支付名稱 */ customName?: string; disableInventory?: boolean; /** 實際金額 */ actualAmount?: number; /** 短溢原因 */ varianceReason?: string; } export interface ShiftClosingCashDetail extends ShiftClosingPaymentDetail { paymentServiceProvider: PaymentServiceProvider.none; paymentType: PaymentType.cash; /** 實際金額 */ actualAmount: number; /** 短溢原因 */ varianceReason: string; /** 現金臨時支出 */ expenditureDetails: Expenditure[]; /** 現金匯出金額 */ withdrawal: number; } export interface CancelledSales { cancelledSalesCount: number; cancelledSalesAmount: number; cancelledSalesDetails: ClosingSalesProductDetail[]; }