Subversion Repositories SmartDukaan

Rev

Rev 35995 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
33213 tejus.loha 1
package com.spice.profitmandi.common.model;
2
 
36001 amit 3
import com.spice.profitmandi.common.util.FormattingUtils;
4
 
33213 tejus.loha 5
public class LineItemModel {
6
    private int itemId;
7
    private String itemName;
8
    private int itemQuantity;
9
    private double sellingPrice;
10
    private double dp;
35995 aman 11
    private int availableStock;
33213 tejus.loha 12
 
13
    public double getDifference() {
14
        return (itemQuantity * dp) - (itemQuantity * sellingPrice);
15
    }
16
 
17
    public double getTotalSellingPrice() {
18
        return itemQuantity * sellingPrice;
19
    }
20
 
21
    public double getTotalDp() {
22
        return itemQuantity * dp;
23
    }
34143 tejus.loha 24
    public String getFormattedTotalSellingPrice() {
36001 amit 25
        return FormattingUtils.formatDecimal(getTotalSellingPrice());
34143 tejus.loha 26
    }
33213 tejus.loha 27
 
34143 tejus.loha 28
    public String getFormattedDifference() {
36001 amit 29
        return FormattingUtils.formatDecimal(getDifference());
34143 tejus.loha 30
    }
36001 amit 31
 
34143 tejus.loha 32
    public String getFormattedTotalDp() {
36001 amit 33
        return FormattingUtils.formatDecimal(getTotalDp());
34143 tejus.loha 34
    }
35
 
35995 aman 36
    public String getFormattedDp() {
36001 amit 37
        return FormattingUtils.formatDecimal(dp);
35995 aman 38
    }
39
 
40
    public String getFormattedSellingPrice() {
36001 amit 41
        return FormattingUtils.formatDecimal(sellingPrice);
35995 aman 42
    }
43
 
33213 tejus.loha 44
    public int getItemId() {
45
        return itemId;
46
    }
47
 
48
    public void setItemId(int itemId) {
49
        this.itemId = itemId;
50
    }
51
 
52
    public String getItemName() {
53
        return itemName;
54
    }
55
 
56
    public void setItemName(String itemName) {
57
        this.itemName = itemName;
58
    }
59
 
60
    public int getItemQuantity() {
61
        return itemQuantity;
62
    }
63
 
64
    public void setItemQuantity(int itemQuantity) {
65
        this.itemQuantity = itemQuantity;
66
    }
67
 
68
    public double getSellingPrice() {
69
        return sellingPrice;
70
    }
71
 
72
    public void setSellingPrice(double sellingPrice) {
73
        this.sellingPrice = sellingPrice;
74
    }
75
 
76
    public double getDp() {
77
        return dp;
78
    }
79
 
80
    public void setDp(double dp) {
81
        this.dp = dp;
82
    }
35995 aman 83
 
84
    public int getAvailableStock() {
85
        return availableStock;
86
    }
87
 
88
    public void setAvailableStock(int availableStock) {
89
        this.availableStock = availableStock;
90
    }
33213 tejus.loha 91
}