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