mirror of
https://github.com/Nezumi-2711/Foodify.git
synced 2026-09-22 20:00:50 +00:00
Auto update total price in basket
This commit is contained in:
@@ -2,9 +2,17 @@ package com.capstone.foodify;
|
||||
|
||||
import com.capstone.foodify.Model.Basket.Basket;
|
||||
|
||||
import java.text.NumberFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
public class Common {
|
||||
public static List<Basket> LIST_BASKET_FOOD = new ArrayList<>();
|
||||
|
||||
public static String changeCurrencyUnit(float price){
|
||||
Locale locale = new Locale("vi", "VN");
|
||||
NumberFormat fmt = NumberFormat.getCurrencyInstance(locale);
|
||||
return fmt.format(price);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user