feat(frontend): module Ventes complet (commandes, livraison, stock)
- Modèles Client, SalesOrder, SalesOrderLine - ClientService + SalesOrderService (create, deliver) - VentesProvider : chargement parallèle commandes + clients - VentesScreen : liste avec badges statut colorés - SalesOrderFormScreen : lignes dynamiques, calcul HT/TVA/TTC temps réel - SalesOrderDetailScreen : détail + bouton livrer + confirmation - Rapport PFE : section 5.7 module Ventes (cycle, statuts, UI) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
class Client {
|
||||
final int? id;
|
||||
final String raisonSociale;
|
||||
final String? matriculeFiscal;
|
||||
final String? telephone;
|
||||
final String? email;
|
||||
final String? adresse;
|
||||
final String? ville;
|
||||
final String? typeClient;
|
||||
final bool actif;
|
||||
|
||||
Client({
|
||||
this.id,
|
||||
required this.raisonSociale,
|
||||
this.matriculeFiscal,
|
||||
this.telephone,
|
||||
this.email,
|
||||
this.adresse,
|
||||
this.ville,
|
||||
this.typeClient,
|
||||
this.actif = true,
|
||||
});
|
||||
|
||||
factory Client.fromJson(Map<String, dynamic> json) => Client(
|
||||
id: json['id'],
|
||||
raisonSociale: json['raisonSociale'] ?? '',
|
||||
matriculeFiscal: json['matriculeFiscal'],
|
||||
telephone: json['telephone'],
|
||||
email: json['email'],
|
||||
adresse: json['adresse'],
|
||||
ville: json['ville'],
|
||||
typeClient: json['typeClient'],
|
||||
actif: json['actif'] ?? true,
|
||||
);
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
if (id != null) 'id': id,
|
||||
'raisonSociale': raisonSociale,
|
||||
if (matriculeFiscal != null) 'matriculeFiscal': matriculeFiscal,
|
||||
if (telephone != null) 'telephone': telephone,
|
||||
if (email != null) 'email': email,
|
||||
if (adresse != null) 'adresse': adresse,
|
||||
if (ville != null) 'ville': ville,
|
||||
if (typeClient != null) 'typeClient': typeClient,
|
||||
'actif': actif,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user