diff --git a/src/com/rjconsultores/ventaboletos/vo/impressaofiscal/TotalRelatorioVoucher.java b/src/com/rjconsultores/ventaboletos/vo/impressaofiscal/TotalRelatorioVoucher.java new file mode 100644 index 000000000..d8091541b --- /dev/null +++ b/src/com/rjconsultores/ventaboletos/vo/impressaofiscal/TotalRelatorioVoucher.java @@ -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; + } + +}