hvp-shared 6.6.0 → 6.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -99,3 +99,97 @@ export interface QvetSalesQueryParams {
|
|
|
99
99
|
skip?: number;
|
|
100
100
|
sort?: string;
|
|
101
101
|
}
|
|
102
|
+
/**
|
|
103
|
+
* Single purchase record from QVET
|
|
104
|
+
* Represents one line item in a purchase transaction
|
|
105
|
+
*/
|
|
106
|
+
export interface QvetPurchaseResponse {
|
|
107
|
+
_id: string;
|
|
108
|
+
qvetCode: number;
|
|
109
|
+
productName: string;
|
|
110
|
+
barcode: string;
|
|
111
|
+
section: string;
|
|
112
|
+
family: string;
|
|
113
|
+
subfamily: string;
|
|
114
|
+
purchaseDate: string;
|
|
115
|
+
invoiceSeries: string;
|
|
116
|
+
invoiceNumber: number;
|
|
117
|
+
supplierInvoice: string;
|
|
118
|
+
quantity: number;
|
|
119
|
+
unitPrice: number;
|
|
120
|
+
subtotal: number;
|
|
121
|
+
taxAmount: number;
|
|
122
|
+
discount: number;
|
|
123
|
+
total: number;
|
|
124
|
+
conversionFactor: number;
|
|
125
|
+
branch: string;
|
|
126
|
+
warehouse: string;
|
|
127
|
+
supplier: string;
|
|
128
|
+
orderDate: string | null;
|
|
129
|
+
orderNumber: number | null;
|
|
130
|
+
invoiceDate: string | null;
|
|
131
|
+
reference: string;
|
|
132
|
+
brand: string;
|
|
133
|
+
syncedAt: string;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Paginated list of purchases
|
|
137
|
+
*/
|
|
138
|
+
export interface QvetPurchasesListResponse {
|
|
139
|
+
ok: boolean;
|
|
140
|
+
data: QvetPurchaseResponse[];
|
|
141
|
+
pagination: {
|
|
142
|
+
total: number;
|
|
143
|
+
limit: number;
|
|
144
|
+
skip: number;
|
|
145
|
+
hasMore: boolean;
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Purchases summary statistics for a period
|
|
150
|
+
*/
|
|
151
|
+
export interface QvetPurchasesSummaryResponse {
|
|
152
|
+
ok: boolean;
|
|
153
|
+
data: {
|
|
154
|
+
totalRecords: number;
|
|
155
|
+
totalPurchases: number;
|
|
156
|
+
totalSubtotal: number;
|
|
157
|
+
totalTax: number;
|
|
158
|
+
totalDiscount: number;
|
|
159
|
+
totalQuantity: number;
|
|
160
|
+
avgPurchase: number;
|
|
161
|
+
uniqueSuppliers: number;
|
|
162
|
+
uniqueProducts: number;
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Purchases by supplier aggregation
|
|
167
|
+
*/
|
|
168
|
+
export interface QvetPurchasesBySupplierItem {
|
|
169
|
+
supplier: string;
|
|
170
|
+
totalPurchases: number;
|
|
171
|
+
totalQuantity: number;
|
|
172
|
+
recordCount: number;
|
|
173
|
+
}
|
|
174
|
+
export interface QvetPurchasesBySupplierResponse {
|
|
175
|
+
ok: boolean;
|
|
176
|
+
data: QvetPurchasesBySupplierItem[];
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Query parameters for purchases endpoint
|
|
180
|
+
*/
|
|
181
|
+
export interface QvetPurchasesQueryParams {
|
|
182
|
+
startDate?: string;
|
|
183
|
+
endDate?: string;
|
|
184
|
+
year?: number;
|
|
185
|
+
month?: number;
|
|
186
|
+
halfMonth?: 1 | 2;
|
|
187
|
+
warehouse?: string;
|
|
188
|
+
section?: string;
|
|
189
|
+
family?: string;
|
|
190
|
+
supplier?: string;
|
|
191
|
+
qvetCode?: number;
|
|
192
|
+
limit?: number;
|
|
193
|
+
skip?: number;
|
|
194
|
+
sort?: string;
|
|
195
|
+
}
|