hvp-shared 6.15.0 → 6.16.0

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.
@@ -510,3 +510,80 @@ export interface QvetCollectionsQueryParams {
510
510
  page?: number;
511
511
  skip?: number;
512
512
  }
513
+ /**
514
+ * Single cash closing record from QVET
515
+ * Represents a cash register closing entry - one row per payment method per closing
516
+ *
517
+ * A single closing (closingNumber) has multiple rows, one for each payment method.
518
+ * To get the total for a closing, sum all rows with the same closingNumber.
519
+ */
520
+ export interface QvetCashClosingResponse {
521
+ id: string;
522
+ cashRegister: string;
523
+ closingNumber: number;
524
+ paymentMethod: string;
525
+ saleAmount: number;
526
+ closingTotal: number;
527
+ collectedAmount: number;
528
+ dayCollections: number;
529
+ cashOut: number;
530
+ closingDate: string;
531
+ previousClosingDate: string;
532
+ branch: string;
533
+ staffName: string;
534
+ syncedAt: string;
535
+ }
536
+ /**
537
+ * Cash closings summary statistics data.
538
+ * Backend wraps with: ApiSingleSuccessResponse<QvetCashClosingsSummaryData>
539
+ */
540
+ export interface QvetCashClosingsSummaryData {
541
+ totalRecords: number;
542
+ totalClosings: number;
543
+ totalSales: number;
544
+ totalCollected: number;
545
+ totalCashOut: number;
546
+ byPaymentMethod: {
547
+ method: string;
548
+ totalAmount: number;
549
+ count: number;
550
+ }[];
551
+ }
552
+ /**
553
+ * Cash closings grouped by cash register.
554
+ * Backend returns: ApiSingleSuccessResponse<QvetCashClosingsByCashRegisterItem[]>
555
+ */
556
+ export interface QvetCashClosingsByCashRegisterItem {
557
+ cashRegister: string;
558
+ totalSales: number;
559
+ totalClosings: number;
560
+ totalCashOut: number;
561
+ }
562
+ /**
563
+ * Cash closings grouped by staff member.
564
+ * Backend returns: ApiSingleSuccessResponse<QvetCashClosingsByStaffItem[]>
565
+ */
566
+ export interface QvetCashClosingsByStaffItem {
567
+ staffName: string;
568
+ totalClosings: number;
569
+ totalSales: number;
570
+ branches: string[];
571
+ }
572
+ /**
573
+ * Query parameters for cash closings endpoint
574
+ */
575
+ export interface QvetCashClosingsQueryParams {
576
+ startDate?: string;
577
+ endDate?: string;
578
+ year?: number;
579
+ month?: number;
580
+ halfMonth?: 1 | 2;
581
+ branch?: string;
582
+ cashRegister?: string;
583
+ paymentMethod?: string;
584
+ staffName?: string;
585
+ limit?: number;
586
+ page?: number;
587
+ skip?: number;
588
+ sort?: string;
589
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hvp-shared",
3
- "version": "6.15.0",
3
+ "version": "6.16.0",
4
4
  "description": "Shared types and utilities for HVP backend and frontend",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",