Subversion Repositories SmartDukaan

Rev

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

Rev 22684 Rev 22858
Line 1... Line 1...
1
package com.spice.profitmandi.common.model;
1
package com.spice.profitmandi.common.model;
2
 
2
 
-
 
3
import java.util.Set;
-
 
4
 
3
public class CustomFofoOrderItem {
5
public class CustomFofoOrderItem {
4
	private String description;
6
	private int itemId;
5
	private int quantity;
7
	private int quantity;
6
	private float rate;
-
 
7
	private float discount;
-
 
8
	private float amount;
-
 
9
	private float netAmount;
-
 
10
	private float igstRate;
8
	private float sellingPrice;
11
	private float igstAmount;
-
 
12
	private float cgstRate;
-
 
13
	private float cgstAmount;
9
	private float discountAmount;
14
	private float sgstRate;
-
 
15
	private float sgstAmount;
10
	private Set<SerialNumberDetail> serialNumberDetails;
16
	private String hsnCode;
-
 
17
	
-
 
18
	public String getDescription() {
11
	public int getItemId() {
19
		return description;
12
		return itemId;
20
	}
13
	}
21
	public void setDescription(String description) {
14
	public void setItemId(int itemId) {
22
		this.description = description;
15
		this.itemId = itemId;
23
	}
16
	}
24
	public int getQuantity() {
17
	public int getQuantity() {
25
		return quantity;
18
		return quantity;
26
	}
19
	}
27
	public void setQuantity(int quantity) {
20
	public void setQuantity(int quantity) {
28
		this.quantity = quantity;
21
		this.quantity = quantity;
29
	}
22
	}
30
	public float getRate() {
-
 
31
		return rate;
-
 
32
	}
-
 
33
	public void setRate(float rate) {
-
 
34
		this.rate = rate;
-
 
35
	}
-
 
36
	public float getAmount() {
-
 
37
		return amount;
-
 
38
	}
-
 
39
	public void setAmount(float amount) {
-
 
40
		this.amount = amount;
-
 
41
	}
-
 
42
	public float getIgstRate() {
-
 
43
		return igstRate;
-
 
44
	}
-
 
45
	public void setIgstRate(float igstRate) {
-
 
46
		this.igstRate = igstRate;
-
 
47
	}
-
 
48
	public float getIgstAmount() {
-
 
49
		return igstAmount;
-
 
50
	}
-
 
51
	public void setIgstAmount(float igstAmount) {
-
 
52
		this.igstAmount = igstAmount;
-
 
53
	}
-
 
54
	public float getCgstRate() {
-
 
55
		return cgstRate;
-
 
56
	}
-
 
57
	public void setCgstRate(float cgstRate) {
-
 
58
		this.cgstRate = cgstRate;
-
 
59
	}
-
 
60
	public float getCgstAmount() {
-
 
61
		return cgstAmount;
-
 
62
	}
-
 
63
	public void setCgstAmount(float cgstAmount) {
-
 
64
		this.cgstAmount = cgstAmount;
-
 
65
	}
-
 
66
	public float getSgstRate() {
23
	public float getSellingPrice() {
67
		return sgstRate;
24
		return sellingPrice;
68
	}
25
	}
69
	public void setSgstRate(float sgstRate) {
26
	public void setSellingPrice(float sellingPrice) {
70
		this.sgstRate = sgstRate;
27
		this.sellingPrice = sellingPrice;
71
	}
28
	}
72
	public float getSgstAmount() {
29
	public float getDiscountAmount() {
73
		return sgstAmount;
30
		return discountAmount;
74
	}
31
	}
75
	public void setSgstAmount(float sgstAmount) {
32
	public void setDiscountAmount(float discountAmount) {
76
		this.sgstAmount = sgstAmount;
33
		this.discountAmount = discountAmount;
77
	}
34
	}
78
	public String getHsnCode() {
35
	public Set<SerialNumberDetail> getSerialNumberDetails() {
79
		return hsnCode;
36
		return serialNumberDetails;
80
	}
37
	}
81
	public void setHsnCode(String hsnCode) {
38
	public void setSerialNumberDetails(Set<SerialNumberDetail> serialNumberDetails) {
82
		this.hsnCode = hsnCode;
39
		this.serialNumberDetails = serialNumberDetails;
83
	}
40
	}
84
	
41
	
-
 
42
	
85
	@Override
43
	@Override
86
	public int hashCode() {
44
	public int hashCode() {
87
		final int prime = 31;
45
		final int prime = 31;
88
		int result = 1;
46
		int result = 1;
89
		result = prime * result + Float.floatToIntBits(amount);
47
		result = prime * result + itemId;
90
		result = prime * result + Float.floatToIntBits(cgstAmount);
-
 
91
		result = prime * result + Float.floatToIntBits(cgstRate);
-
 
92
		result = prime * result + ((description == null) ? 0 : description.hashCode());
-
 
93
		result = prime * result + ((hsnCode == null) ? 0 : hsnCode.hashCode());
-
 
94
		result = prime * result + Float.floatToIntBits(igstAmount);
-
 
95
		result = prime * result + Float.floatToIntBits(igstRate);
-
 
96
		//result = prime * result + Float.floatToIntBits(itemTotal);
-
 
97
		result = prime * result + quantity;
48
		result = prime * result + quantity;
98
		result = prime * result + Float.floatToIntBits(rate);
49
		result = prime * result + Float.floatToIntBits(sellingPrice);
99
		result = prime * result + Float.floatToIntBits(sgstAmount);
-
 
100
		result = prime * result + Float.floatToIntBits(sgstRate);
50
		result = prime * result + ((serialNumberDetails == null) ? 0 : serialNumberDetails.hashCode());
101
		return result;
51
		return result;
102
	}
52
	}
103
	@Override
53
	@Override
104
	public boolean equals(Object obj) {
54
	public boolean equals(Object obj) {
105
		if (this == obj)
55
		if (this == obj)
Line 107... Line 57...
107
		if (obj == null)
57
		if (obj == null)
108
			return false;
58
			return false;
109
		if (getClass() != obj.getClass())
59
		if (getClass() != obj.getClass())
110
			return false;
60
			return false;
111
		CustomFofoOrderItem other = (CustomFofoOrderItem) obj;
61
		CustomFofoOrderItem other = (CustomFofoOrderItem) obj;
112
		if (Float.floatToIntBits(amount) != Float.floatToIntBits(other.amount))
-
 
113
			return false;
-
 
114
		if (Float.floatToIntBits(cgstAmount) != Float.floatToIntBits(other.cgstAmount))
-
 
115
			return false;
-
 
116
		if (Float.floatToIntBits(cgstRate) != Float.floatToIntBits(other.cgstRate))
-
 
117
			return false;
-
 
118
		if (description == null) {
-
 
119
			if (other.description != null)
-
 
120
				return false;
-
 
121
		} else if (!description.equals(other.description))
-
 
122
			return false;
-
 
123
		if (hsnCode == null) {
-
 
124
			if (other.hsnCode != null)
62
		if (itemId != other.itemId)
125
				return false;
-
 
126
		} else if (!hsnCode.equals(other.hsnCode))
-
 
127
			return false;
-
 
128
		if (Float.floatToIntBits(igstAmount) != Float.floatToIntBits(other.igstAmount))
-
 
129
			return false;
-
 
130
		if (Float.floatToIntBits(igstRate) != Float.floatToIntBits(other.igstRate))
-
 
131
			return false;
63
			return false;
132
		if (quantity != other.quantity)
64
		if (quantity != other.quantity)
133
			return false;
65
			return false;
134
		if (Float.floatToIntBits(rate) != Float.floatToIntBits(other.rate))
66
		if (Float.floatToIntBits(sellingPrice) != Float.floatToIntBits(other.sellingPrice))
135
			return false;
67
			return false;
-
 
68
		if (serialNumberDetails == null) {
136
		if (Float.floatToIntBits(sgstAmount) != Float.floatToIntBits(other.sgstAmount))
69
			if (other.serialNumberDetails != null)
137
			return false;
70
				return false;
138
		if (Float.floatToIntBits(sgstRate) != Float.floatToIntBits(other.sgstRate))
71
		} else if (!serialNumberDetails.equals(other.serialNumberDetails))
139
			return false;
72
			return false;
140
		return true;
73
		return true;
141
	}
74
	}
142
	@Override
75
	@Override
143
	public String toString() {
76
	public String toString() {
144
		return "CustomFofoOrderItem [description=" + description + ", quantity=" + quantity + ", rate=" + rate
77
		return "CustomFofoOrderItem [itemId=" + itemId + ", quantity=" + quantity + ", sellingPrice=" + sellingPrice
145
				+ ", amount=" + amount + ", igstRate=" + igstRate + ", igstAmount=" + igstAmount + ", cgstRate="
-
 
146
				+ cgstRate + ", cgstAmount=" + cgstAmount + ", sgstRate=" + sgstRate + ", sgstAmount=" + sgstAmount
-
 
147
				+ ", hsnCode=" + hsnCode + "]";
78
				+ ", serialNumberDetails=" + serialNumberDetails + "]";
148
	}
-
 
149
	public float getDiscount() {
-
 
150
		return discount;
-
 
151
	}
-
 
152
	public void setDiscount(float discount) {
-
 
153
		this.discount = discount;
-
 
154
	}
-
 
155
	public float getNetAmount() {
-
 
156
		return netAmount;
-
 
157
	}
-
 
158
	public void setNetAmount(float netAmount) {
-
 
159
		this.netAmount = netAmount;
-
 
160
	}
79
	}
161
	
80
	
162
	
81
	
163
}
82
}