Subversion Repositories SmartDukaan

Rev

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

Rev 19015 Rev 19017
Line 23... Line 23...
23
import java.io.FileNotFoundException;
23
import java.io.FileNotFoundException;
24
import java.io.FileOutputStream;
24
import java.io.FileOutputStream;
25
import java.io.IOException;
25
import java.io.IOException;
26
import java.text.DecimalFormat;
26
import java.text.DecimalFormat;
27
import java.text.NumberFormat;
27
import java.text.NumberFormat;
28
import java.text.SimpleDateFormat;
-
 
29
import java.util.ArrayList;
28
import java.util.ArrayList;
30
import java.util.Calendar;
29
import java.util.Calendar;
31
import java.util.Collections;
30
import java.util.Collections;
32
import java.util.Date;
31
import java.util.Date;
33
import java.util.GregorianCalendar;
32
import java.util.GregorianCalendar;
Line 37... Line 36...
37
import java.util.Map.Entry;
36
import java.util.Map.Entry;
38
 
37
 
39
import org.slf4j.Logger;
38
import org.slf4j.Logger;
40
import org.slf4j.LoggerFactory;
39
import org.slf4j.LoggerFactory;
41
 
40
 
-
 
41
import com.google.gwt.i18n.client.DateTimeFormat;
-
 
42
 
42
/**
43
/**
43
 * This class is a facade to the Transaction service and should be used to
44
 * This class is a facade to the Transaction service and should be used to
44
 * access all order specific data which requires some kind of transformation.
45
 * access all order specific data which requires some kind of transformation.
45
 * 
46
 * 
46
 * @author Chandranshu
47
 * @author Chandranshu
Line 290... Line 291...
290
					inventoryClient = new InventoryClient().getClient();
291
					inventoryClient = new InventoryClient().getClient();
291
				}
292
				}
292
				Warehouse fulfillmentWarehouse = inventoryClient.getWarehouse(t_order.getFulfilmentWarehouseId());
293
				Warehouse fulfillmentWarehouse = inventoryClient.getWarehouse(t_order.getFulfilmentWarehouseId());
293
				warehouseType = fulfillmentWarehouse.getWarehouseType().toString();
294
				warehouseType = fulfillmentWarehouse.getWarehouseType().toString();
294
				orderValuesMap.put("WarehouseType", fulfillmentWarehouse.getWarehouseType().toString());
295
				orderValuesMap.put("WarehouseType", fulfillmentWarehouse.getWarehouseType().toString());
295
				SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd HH:mm:ss yyyy");
296
				DateTimeFormat sdf = DateTimeFormat.getFormat("EEE MMM dd HH:mm:ss yyyy");
296
				orderValuesMap.put("Promised_Shipping", sdf.format(new Date(t_order.getPromised_shipping_time())));
297
				orderValuesMap.put("Promised_Shipping", sdf.format(new Date(t_order.getPromised_shipping_time())));
297
				NumberFormat formatter = new DecimalFormat("#0.000");     
298
				NumberFormat formatter = new DecimalFormat("#0.000");     
298
				orderValuesMap.put("Weight", formatter.format(t_order.getLineitems().get(0).getUnit_weight()));
299
				orderValuesMap.put("Weight", formatter.format(t_order.getLineitems().get(0).getUnit_weight()));
299
				formatter = new DecimalFormat("#0.00");   
300
				formatter = new DecimalFormat("#0.00");   
300
				orderValuesMap.put("UnitPrice", formatter.format(t_order.getLineitems().get(0).getUnit_price()));
301
				orderValuesMap.put("UnitPrice", formatter.format(t_order.getLineitems().get(0).getUnit_price()));