Subversion Repositories SmartDukaan

Rev

Rev 34143 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 34143 Rev 35995
Line 1... Line 1...
1
package com.spice.profitmandi.common.model;
1
package com.spice.profitmandi.common.model;
2
 
2
 
3
import java.text.DecimalFormat;
-
 
4
 
-
 
5
public class LineItemModel {
3
public class LineItemModel {
6
    private int itemId;
4
    private int itemId;
7
    private String itemName;
5
    private String itemName;
8
    private int itemQuantity;
6
    private int itemQuantity;
9
    private double sellingPrice;
7
    private double sellingPrice;
10
    private double dp;
8
    private double dp;
-
 
9
    private int availableStock;
11
 
10
 
12
    public double getDifference() {
11
    public double getDifference() {
13
        return (itemQuantity * dp) - (itemQuantity * sellingPrice);
12
        return (itemQuantity * dp) - (itemQuantity * sellingPrice);
14
    }
13
    }
15
 
14
 
Line 29... Line 28...
29
    }
28
    }
30
    public String getFormattedTotalDp() {
29
    public String getFormattedTotalDp() {
31
        return String.format("%,.2f", getTotalDp());
30
        return String.format("%,.2f", getTotalDp());
32
    }
31
    }
33
 
32
 
-
 
33
    public String getFormattedDp() {
-
 
34
        return String.format("%,.2f", dp);
-
 
35
    }
-
 
36
 
-
 
37
    public String getFormattedSellingPrice() {
-
 
38
        return String.format("%,.2f", sellingPrice);
-
 
39
    }
-
 
40
 
34
    public int getItemId() {
41
    public int getItemId() {
35
        return itemId;
42
        return itemId;
36
    }
43
    }
37
 
44
 
38
    public void setItemId(int itemId) {
45
    public void setItemId(int itemId) {
Line 68... Line 75...
68
    }
75
    }
69
 
76
 
70
    public void setDp(double dp) {
77
    public void setDp(double dp) {
71
        this.dp = dp;
78
        this.dp = dp;
72
    }
79
    }
-
 
80
 
-
 
81
    public int getAvailableStock() {
-
 
82
        return availableStock;
-
 
83
    }
-
 
84
 
-
 
85
    public void setAvailableStock(int availableStock) {
-
 
86
        this.availableStock = availableStock;
-
 
87
    }
73
}
88
}