Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

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