Change DA to MGA
This commit is contained in:
parent
0b2512d24e
commit
da03076411
@ -221,7 +221,8 @@ class _NouvelleCommandePageState extends State<NouvelleCommandePage> {
|
||||
if (value == null || value.isEmpty) {
|
||||
return 'Veuillez entrer un email';
|
||||
}
|
||||
if (!RegExp(r'^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$').hasMatch(value)) {
|
||||
if (!RegExp(r'^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$')
|
||||
.hasMatch(value)) {
|
||||
return 'Veuillez entrer un email valide';
|
||||
}
|
||||
return null;
|
||||
@ -328,7 +329,7 @@ class _NouvelleCommandePageState extends State<NouvelleCommandePage> {
|
||||
children: [
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
'${product.price.toStringAsFixed(2)} DA',
|
||||
'${product.price.toStringAsFixed(2)} MGA',
|
||||
style: TextStyle(
|
||||
color: Colors.green.shade700,
|
||||
fontWeight: FontWeight.w600,
|
||||
@ -364,12 +365,14 @@ class _NouvelleCommandePageState extends State<NouvelleCommandePage> {
|
||||
),
|
||||
Text(
|
||||
quantity.toString(),
|
||||
style: const TextStyle(fontWeight: FontWeight.bold),
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.bold),
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.add, size: 18),
|
||||
onPressed: () {
|
||||
if (product.stock == null || quantity < product.stock!) {
|
||||
if (product.stock == null ||
|
||||
quantity < product.stock!) {
|
||||
setState(() {
|
||||
_quantites[product.id!] = quantity + 1;
|
||||
});
|
||||
@ -454,9 +457,10 @@ class _NouvelleCommandePageState extends State<NouvelleCommandePage> {
|
||||
child: const Icon(Icons.shopping_bag, size: 20),
|
||||
),
|
||||
title: Text(product.name),
|
||||
subtitle: Text('${entry.value} x ${product.price.toStringAsFixed(2)} DA'),
|
||||
subtitle: Text(
|
||||
'${entry.value} x ${product.price.toStringAsFixed(2)} MGA'),
|
||||
trailing: Text(
|
||||
'${(entry.value * product.price).toStringAsFixed(2)} DA',
|
||||
'${(entry.value * product.price).toStringAsFixed(2)} MGA',
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.blue.shade800,
|
||||
@ -499,7 +503,7 @@ class _NouvelleCommandePageState extends State<NouvelleCommandePage> {
|
||||
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
|
||||
),
|
||||
Text(
|
||||
'${total.toStringAsFixed(2)} DA',
|
||||
'${total.toStringAsFixed(2)} MGA',
|
||||
style: const TextStyle(
|
||||
fontSize: 18,
|
||||
fontWeight: FontWeight.bold,
|
||||
@ -599,7 +603,6 @@ class _NouvelleCommandePageState extends State<NouvelleCommandePage> {
|
||||
setState(() {
|
||||
_quantites.clear();
|
||||
});
|
||||
|
||||
} catch (e) {
|
||||
Get.snackbar(
|
||||
'Erreur',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user