123 lines
2.8 KiB
Java
123 lines
2.8 KiB
Java
package it.acxent.anag;
|
|
|
|
import it.acxent.db.DBAdapter;
|
|
import it.acxent.util.DoubleOperator;
|
|
import java.sql.Date;
|
|
|
|
public class PrezzoArticolo {
|
|
private double prezzoBase;
|
|
|
|
private double percSconto;
|
|
|
|
private double prezzoFinale;
|
|
|
|
private long id_clifor;
|
|
|
|
private boolean isOfferta;
|
|
|
|
private Date dataScadenzaOfferta;
|
|
|
|
private double percSconto1;
|
|
|
|
private double percSconto3;
|
|
|
|
private double percSconto2;
|
|
|
|
private double abbuono;
|
|
|
|
public PrezzoArticolo() {}
|
|
|
|
public PrezzoArticolo(double prezzoBase, double percSconto, double prezzoFinale, double percSconto1, double percSconto2, double percSconto3, double abbuono) {
|
|
this.prezzoBase = prezzoBase;
|
|
this.percSconto = percSconto;
|
|
this.percSconto1 = percSconto1;
|
|
this.percSconto2 = percSconto2;
|
|
this.percSconto3 = percSconto3;
|
|
this.prezzoFinale = prezzoFinale;
|
|
this.abbuono = abbuono;
|
|
}
|
|
|
|
public double getPercSconto() {
|
|
return this.percSconto;
|
|
}
|
|
|
|
public void setPercSconto(double percSconto) {
|
|
this.percSconto = percSconto;
|
|
}
|
|
|
|
public double getPrezzoFinale() {
|
|
return this.prezzoFinale;
|
|
}
|
|
|
|
public PrezzoArticolo conIva(double l_aliquota) {
|
|
DoubleOperator prezzoFinale = new DoubleOperator(DBAdapter.conIva(getPrezzoFinale(), l_aliquota));
|
|
if (getAbbuono() != 0.0D)
|
|
prezzoFinale.subtract(getAbbuono());
|
|
return new PrezzoArticolo(DBAdapter.conIva(getPrezzoBase(), l_aliquota), getPercSconto(), prezzoFinale.getResult(),
|
|
getPercSconto1(), getPercSconto2(), getPercSconto3(), getAbbuono());
|
|
}
|
|
|
|
public double getPrezzoBase() {
|
|
return this.prezzoBase;
|
|
}
|
|
|
|
public void setPrezzoBase(double prezzoBase) {
|
|
this.prezzoBase = prezzoBase;
|
|
}
|
|
|
|
public long getId_clifor() {
|
|
return this.id_clifor;
|
|
}
|
|
|
|
public void setId_clifor(long id_clifor) {
|
|
this.id_clifor = id_clifor;
|
|
}
|
|
|
|
public boolean isOfferta() {
|
|
return this.isOfferta;
|
|
}
|
|
|
|
public void setOfferta(boolean isOfferta) {
|
|
this.isOfferta = isOfferta;
|
|
}
|
|
|
|
public Date getDataScadenzaOfferta() {
|
|
return this.dataScadenzaOfferta;
|
|
}
|
|
|
|
public void setDataScadenzaOfferta(Date dataScadenzaOfferta) {
|
|
this.dataScadenzaOfferta = dataScadenzaOfferta;
|
|
}
|
|
|
|
public double getPercSconto1() {
|
|
return this.percSconto1;
|
|
}
|
|
|
|
public void setPercSconto1(double percSconto1) {
|
|
this.percSconto1 = percSconto1;
|
|
}
|
|
|
|
public double getPercSconto3() {
|
|
return this.percSconto3;
|
|
}
|
|
|
|
public void setPercSconto3(double percSconto3) {
|
|
this.percSconto3 = percSconto3;
|
|
}
|
|
|
|
public double getPercSconto2() {
|
|
return this.percSconto2;
|
|
}
|
|
|
|
public void setPercSconto2(double percSconto2) {
|
|
this.percSconto2 = percSconto2;
|
|
}
|
|
|
|
public double getAbbuono() {
|
|
return this.abbuono;
|
|
}
|
|
|
|
public void setAbbuono(double abbuono) {
|
|
this.abbuono = abbuono;
|
|
}
|
|
}
|