Subversion Repositories SmartDukaan

Rev

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

Rev 35995 Rev 36001
Line 1... Line 1...
1
package com.spice.profitmandi.common.model;
1
package com.spice.profitmandi.common.model;
2
 
2
 
-
 
3
import com.spice.profitmandi.common.util.FormattingUtils;
-
 
4
 
3
public class LineItemModel {
5
public class LineItemModel {
4
    private int itemId;
6
    private int itemId;
5
    private String itemName;
7
    private String itemName;
6
    private int itemQuantity;
8
    private int itemQuantity;
7
    private double sellingPrice;
9
    private double sellingPrice;
Line 18... Line 20...
18
 
20
 
19
    public double getTotalDp() {
21
    public double getTotalDp() {
20
        return itemQuantity * dp;
22
        return itemQuantity * dp;
21
    }
23
    }
22
    public String getFormattedTotalSellingPrice() {
24
    public String getFormattedTotalSellingPrice() {
23
        return String.format("%, .2f", getTotalSellingPrice());
25
        return FormattingUtils.formatDecimal(getTotalSellingPrice());
24
    }
26
    }
25
 
27
 
26
    public String getFormattedDifference() {
28
    public String getFormattedDifference() {
27
        return String.format("%, .2f", getDifference());
29
        return FormattingUtils.formatDecimal(getDifference());
28
    }
30
    }
-
 
31
 
29
    public String getFormattedTotalDp() {
32
    public String getFormattedTotalDp() {
30
        return String.format("%,.2f", getTotalDp());
33
        return FormattingUtils.formatDecimal(getTotalDp());
31
    }
34
    }
32
 
35
 
33
    public String getFormattedDp() {
36
    public String getFormattedDp() {
34
        return String.format("%,.2f", dp);
37
        return FormattingUtils.formatDecimal(dp);
35
    }
38
    }
36
 
39
 
37
    public String getFormattedSellingPrice() {
40
    public String getFormattedSellingPrice() {
38
        return String.format("%,.2f", sellingPrice);
41
        return FormattingUtils.formatDecimal(sellingPrice);
39
    }
42
    }
40
 
43
 
41
    public int getItemId() {
44
    public int getItemId() {
42
        return itemId;
45
        return itemId;
43
    }
46
    }