mirror of
https://github.com/R0m1k3/Regisflow.git
synced 2026-10-21 14:18:17 +02:00
Enable support for multiple products within a single sale
Implements multi-product sales functionality by adding a `sale_products` table, updating the sales form, and modifying server-side logic. Replit-Commit-Author: Agent Replit-Commit-Session-Id: e80fed01-7137-4997-b9af-dad57132d430 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/0715008c-7244-40f4-befc-26c014852236/e80fed01-7137-4997-b9af-dad57132d430/58t7aEc
This commit is contained in:
1 parent
54595e75df
commit
e91b8f1a8b
10 files changed
+1303
-50
No files matched your search
+17
-10
@@ -1,3 +1,11 @@
|
||||
export interface SaleProduct {
|
||||
id?: number;
|
||||
typeArticle: string;
|
||||
categorie: 'F2' | 'F3';
|
||||
quantite: number;
|
||||
gencode: string;
|
||||
}
|
||||
|
||||
export interface Sale {
|
||||
id: number;
|
||||
timestamp: string;
|
||||
@@ -5,12 +13,6 @@ export interface Sale {
|
||||
// Vendeur
|
||||
vendeur: string;
|
||||
|
||||
// Produit
|
||||
typeArticle: string;
|
||||
categorie: 'F2' | 'F3';
|
||||
quantite: number;
|
||||
gencode: string;
|
||||
|
||||
// Client
|
||||
nom: string;
|
||||
prenom: string;
|
||||
@@ -28,14 +30,19 @@ export interface Sale {
|
||||
photo_recto?: string;
|
||||
photo_verso?: string;
|
||||
photo_ticket?: string;
|
||||
|
||||
// Produits (nouveaux)
|
||||
products?: SaleProduct[];
|
||||
}
|
||||
|
||||
export interface FormData {
|
||||
vendeur: string;
|
||||
typeArticle: string;
|
||||
categorie: string;
|
||||
quantite: string;
|
||||
gencode: string;
|
||||
products: {
|
||||
typeArticle: string;
|
||||
categorie: string;
|
||||
quantite: string;
|
||||
gencode: string;
|
||||
}[];
|
||||
nom: string;
|
||||
prenom: string;
|
||||
dateNaissance: string;
|
||||
|
||||
Reference in new issue
Block a user