Subversion Repositories SmartDukaan

Rev

Rev 36485 | Rev 36508 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 36485 Rev 36489
Line 144... Line 144...
144
                "			when sio.creditTimestamp is not null and sio.rolledBackTimestamp >= :startDate and sio.rolledBackTimestamp <= :endDate then -sio.amount" +
144
                "			when sio.creditTimestamp is not null and sio.rolledBackTimestamp >= :startDate and sio.rolledBackTimestamp <= :endDate then -sio.amount" +
145
                "			else 0 end as float), ii.id, ii.serialNumber, s.name, p.purchaseReference, " +
145
                "			else 0 end as float), ii.id, ii.serialNumber, s.name, p.purchaseReference, " +
146
                " case when sio.rolledBackTimestamp >= :startDate and sio.rolledBackTimestamp <= :endDate then sio.rolledBackTimestamp else sio.creditTimestamp end, ii.hsnCode)  from "
146
                " case when sio.rolledBackTimestamp >= :startDate and sio.rolledBackTimestamp <= :endDate then sio.rolledBackTimestamp else sio.creditTimestamp end, ii.hsnCode)  from "
147
                + " SchemeInOut sio join Scheme s on s.id=sio.schemeId join InventoryItem ii on sio.inventoryItemId=ii.id join com.spice.profitmandi.dao.entity.fofo.Purchase p on p.id=ii.purchaseId"
147
                + " SchemeInOut sio join Scheme s on s.id=sio.schemeId join InventoryItem ii on sio.inventoryItemId=ii.id join com.spice.profitmandi.dao.entity.fofo.Purchase p on p.id=ii.purchaseId"
148
                + " where sio.createTimestamp >= :cnDate and (:fofoId IS NULL OR ii.fofoId = :fofoId) and ((sio.creditTimestamp >= :startDate and sio.creditTimestamp <= :endDate) or (sio.creditTimestamp is not null and sio.rolledBackTimestamp >= :startDate and sio.rolledBackTimestamp <= :endDate))"
148
                + " where sio.createTimestamp >= :cnDate and (:fofoId IS NULL OR ii.fofoId = :fofoId) and ((sio.creditTimestamp >= :startDate and sio.creditTimestamp <= :endDate) or (sio.creditTimestamp is not null and sio.rolledBackTimestamp >= :startDate and sio.rolledBackTimestamp <= :endDate))"
149
                + " and not (sio.creditTimestamp >= :startDate and sio.creditTimestamp <= :endDate and sio.rolledBackTimestamp >= :startDate and sio.rolledBackTimestamp <= :endDate)")
149
                + " and not (sio.rolledBackTimestamp is not null and sio.creditTimestamp >= :startDate and sio.creditTimestamp <= :endDate and sio.rolledBackTimestamp >= :startDate and sio.rolledBackTimestamp <= :endDate)")
150
})
150
})
151
public class SchemeInOut implements Serializable {
151
public class SchemeInOut implements Serializable {
152
 
152
 
153
    private static final long serialVersionUID = 1L;
153
    private static final long serialVersionUID = 1L;
154
    @Id
154
    @Id