Subversion Repositories SmartDukaan

Rev

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

Rev 20643 Rev 20938
Line 5... Line 5...
5
import java.util.List;
5
import java.util.List;
6
 
6
 
7
public class ShipmentInfo {
7
public class ShipmentInfo {
8
	private double totalWeightInKg=0;
8
	private double totalWeightInKg=0;
9
	private double totalAmount=0;
9
	private double totalAmount=0;
-
 
10
	private double netPayable=0;
-
 
11
	private double shippingCharges=0;
10
 
12
 
11
	private double totalShippingAmount=0;
13
	private double totalShippingAmount=0;
12
	private  int totalPcs = 0;
14
	private  int totalPcs = 0;
13
	private Order order;
15
	private Order order;
14
	
16
	
15
	
17
	
16
	public ShipmentInfo(List<Order> orders) {
18
	public ShipmentInfo(List<Order> orders) {
17
		for(Order o : orders) {
19
		for(Order o : orders) {
18
			this.totalAmount += o.getTotal_amount();
20
			this.totalAmount += o.getTotal_amount();
19
			this.totalWeightInKg += o.getTotal_weight();
21
			this.totalWeightInKg += o.getTotal_weight();
-
 
22
			this.netPayable += o.getNet_payable_amount();
20
			this.totalShippingAmount += o.getShippingCost();
23
			this.shippingCharges += o.getShippingCost();
21
			this.totalPcs += o.getLineitems().get(0).getQuantity();
24
			this.totalPcs += o.getLineitems().get(0).getQuantity();
22
		}
25
		}
23
		this.order = orders.get(0);
26
		this.order = orders.get(0);
24
	}
27
	}
25
 
28
 
Line 40... Line 43...
40
	}
43
	}
41
 
44
 
42
	public Order getOrder() {
45
	public Order getOrder() {
43
		return order;
46
		return order;
44
	}
47
	}
-
 
48
	
-
 
49
	public double getNetPayable() {
-
 
50
		return netPayable;
-
 
51
	}
-
 
52
 
-
 
53
	public void setNetPayable(double netPayable) {
-
 
54
		this.netPayable = netPayable;
-
 
55
	}
45
}
56
}