|
|
|
@ -10,6 +10,7 @@ import '../Models/Permission.dart'; |
|
|
|
import '../Models/client.dart'; |
|
|
|
import '../Models/produit.dart'; |
|
|
|
import '../config/DatabaseConfig.dart'; |
|
|
|
import 'package:intl/intl.dart'; |
|
|
|
|
|
|
|
class AppDatabase { |
|
|
|
static final AppDatabase instance = AppDatabase._init(); |
|
|
|
@ -749,6 +750,8 @@ class AppDatabase { |
|
|
|
final db = await database; |
|
|
|
final commandeMap = commande.toMap(); |
|
|
|
final id = commandeMap.remove('id'); |
|
|
|
final date = DateTime.parse(commandeMap['dateCommande']); |
|
|
|
commandeMap['dateCommande'] = DateFormat('yyyy-MM-dd HH:mm:ss').format(date); |
|
|
|
|
|
|
|
final setClause = commandeMap.keys.map((key) => '$key = ?').join(', '); |
|
|
|
final values = [...commandeMap.values, id]; |
|
|
|
|