"Reset daily report counts to 0 when no departments are selected"
- Added logic to set all daily report count values (transactions, products sold, earnings, washes, water usage) to 0 when no department is selected.
This commit is contained in:
+6
@@ -64,6 +64,12 @@ const updateCountTransactions = async () => {
|
||||
: (parseInt(selected_department_id.value) > 0 ? [parseInt(selected_department_id.value)] : []);
|
||||
|
||||
if (ids.length === 0) {
|
||||
// If no departments are selected, set the count to 0
|
||||
count_transactions.value = 0;
|
||||
count_products_sold.value = 0;
|
||||
count_earnings.value = 0;
|
||||
count_washes.value = 0;
|
||||
count_water_usage.value = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user