bug #6817
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@54705 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
27dc65408d
commit
9e2219921d
|
@ -0,0 +1,93 @@
|
||||||
|
package com.rjconsultores.ventaboletos.vo.impressaofiscal;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
public class TotalRelatorioVoucher {
|
||||||
|
|
||||||
|
private String status;
|
||||||
|
private BigDecimal tarifa;
|
||||||
|
private BigDecimal pedagio;
|
||||||
|
private BigDecimal embarque;
|
||||||
|
|
||||||
|
public TotalRelatorioVoucher() {
|
||||||
|
super();
|
||||||
|
this.tarifa = BigDecimal.ZERO;
|
||||||
|
this.pedagio = BigDecimal.ZERO;
|
||||||
|
this.embarque = BigDecimal.ZERO;
|
||||||
|
}
|
||||||
|
|
||||||
|
public TotalRelatorioVoucher(String status, BigDecimal tarifa, BigDecimal pedagio, BigDecimal embarque) {
|
||||||
|
this();
|
||||||
|
this.status = status;
|
||||||
|
this.tarifa = tarifa;
|
||||||
|
this.pedagio = pedagio;
|
||||||
|
this.embarque = embarque;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus() {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(String status) {
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getTarifa() {
|
||||||
|
return tarifa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTarifa(BigDecimal tarifa) {
|
||||||
|
this.tarifa = tarifa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPedagio() {
|
||||||
|
return pedagio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPedagio(BigDecimal pedagio) {
|
||||||
|
this.pedagio = pedagio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getEmbarque() {
|
||||||
|
return embarque;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEmbarque(BigDecimal embarque) {
|
||||||
|
this.embarque = embarque;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
final int prime = 31;
|
||||||
|
int result = 1;
|
||||||
|
result = prime * result + ((status == null) ? 0 : status.hashCode());
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object obj) {
|
||||||
|
if (this == obj)
|
||||||
|
return true;
|
||||||
|
if (obj == null)
|
||||||
|
return false;
|
||||||
|
if (getClass() != obj.getClass())
|
||||||
|
return false;
|
||||||
|
TotalRelatorioVoucher other = (TotalRelatorioVoucher) obj;
|
||||||
|
if (status == null) {
|
||||||
|
if (other.status != null)
|
||||||
|
return false;
|
||||||
|
} else if (!status.equals(other.status))
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getTotal() {
|
||||||
|
BigDecimal total = BigDecimal.ZERO;
|
||||||
|
total = total.add(getTarifa())
|
||||||
|
.add(getEmbarque())
|
||||||
|
.add(getPedagio());
|
||||||
|
|
||||||
|
return total;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue