Subversion Repositories SmartDukaan

Rev

Rev 2141 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2141 Rev 3126
Line 1... Line 1...
1
package in.shop2020.serving.utils;
1
package in.shop2020.serving.utils;
2
 
2
 
3
import in.shop2020.model.v1.user.Cart;
3
import in.shop2020.model.v1.user.Cart;
4
import in.shop2020.thrift.clients.UserContextServiceClient;
4
import in.shop2020.thrift.clients.UserClient;
5
 
5
 
6
import java.text.NumberFormat;
6
import java.text.NumberFormat;
7
import java.util.Locale;
7
import java.util.Locale;
8
 
8
 
9
public class FormattingUtils {
9
public class FormattingUtils {
Line 23... Line 23...
23
		return currencyFormat.format(amount);
23
		return currencyFormat.format(amount);
24
	}
24
	}
25
	
25
	
26
	public static void main(String[] args) throws Exception{
26
	public static void main(String[] args) throws Exception{
27
		FormattingUtils formattingUtils = new FormattingUtils();
27
		FormattingUtils formattingUtils = new FormattingUtils();
28
		UserContextServiceClient client = new UserContextServiceClient();
28
		UserClient client = new UserClient();
29
		Cart cart = client.getClient().getCart(93439);
29
		Cart cart = client.getClient().getCart(93439);
30
		double amount = cart.getTotalPrice();
30
		double amount = cart.getTotalPrice();
31
		System.out.println(amount);
31
		System.out.println(amount);
32
		System.out.println(formattingUtils.formatPrice(amount));
32
		System.out.println(formattingUtils.formatPrice(amount));
33
	}
33
	}