-
Notifications
You must be signed in to change notification settings - Fork 2
/
Puchases.java
36 lines (27 loc) · 894 Bytes
/
Puchases.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package application;
import java.util.Date;
public class Puchases extends AccountManeger {
private double prePaiedTax;
public Puchases() {
super();
}
public Puchases(Date Date, String name, String voucher, String item, long quantity, double value,String type) {
super(Date,value,name,voucher,type,item,quantity);
setPrePaiedTax();
}
public double getPrePaiedTax() {
return prePaiedTax;
}
public void setPrePaiedTax() {
this.prePaiedTax = getFinalTotal() - getTotal();
}
public void setPrePaiedTax(double prePaiedTax) {
this.prePaiedTax = prePaiedTax;
}
@Override
public String toString() {
return getDate() + "," + getName() + "," + getVoucher() +
"," + getItem() + "," + getQuantity() + "," + getValue() + "," + getType()+
"," + prePaiedTax + "," + getTotal()+ "," + getFinalTotal() + "," + getVat();
}
}