Enhanced discount input. It was possible to remove a discount that has not been saved yet.

This commit is contained in:
Dennis Nemec
2026-01-09 12:43:16 +01:00
parent 1d6c62a392
commit c2f574014a
2 changed files with 2 additions and 2 deletions

View File

@ -208,7 +208,7 @@ class _DeliveryDiscountState extends State<DeliveryDiscount> {
),
),
OutlinedButton(
onPressed: _discountValue > 0 ? _resetValues : null,
onPressed: _discountValue > 0 && widget.discount != null ? _resetValues : null,
child: const Text("Gutschrift entfernen"),
),
],