Subversion Repositories SmartDukaan

Rev

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

Rev 35054 Rev 35102
Line 1... Line 1...
1
package com.spice.profitmandi.dao.model;
1
package com.spice.profitmandi.dao.model;
2
 
2
 
-
 
3
import com.spice.profitmandi.common.util.FileUtil;
-
 
4
import com.spice.profitmandi.common.util.FormattingUtils;
3
import com.spice.profitmandi.dao.enumuration.inventory.CatalogMovingEnum;
5
import com.spice.profitmandi.dao.enumuration.inventory.CatalogMovingEnum;
4
 
6
 
-
 
7
import java.io.Serializable;
5
import java.time.Duration;
8
import java.time.Duration;
6
import java.time.LocalDateTime;
9
import java.time.LocalDateTime;
-
 
10
import java.util.Arrays;
-
 
11
import java.util.List;
7
 
12
 
8
public class WarehouseItemAgeingModel {
13
public class WarehouseItemAgeingModel {
9
    private int itemId;
14
    private int itemId;
10
    private int purchaseId;
15
    private int purchaseId;
11
    private String brand;
16
    private String brand;
Line 92... Line 97...
92
    }
97
    }
93
 
98
 
94
    public int getAge() {
99
    public int getAge() {
95
        return (int) Duration.between(this.invoiceDate, LocalDateTime.now()).toDays();
100
        return (int) Duration.between(this.invoiceDate, LocalDateTime.now()).toDays();
96
    }
101
    }
-
 
102
    public List<? extends Serializable> toRow() {
-
 
103
        return Arrays.asList(this.getSupplierName(), this.getStatus(), this.getBrand(), this.getModelName() + " " + this.getModelNumber(), this.getColor(), this.getAge(),
-
 
104
                this.getWarehouseName(), FormattingUtils.formatDate(this.getCreated()), this.getCurrentQuantity());
-
 
105
    }
97
}
106
}