Subversion Repositories SmartDukaan

Rev

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

Rev 35378 Rev 36184
Line 142... Line 142...
142
                + " ii.fofoId, ii.sgstRate, ii.cgstRate, ii.igstRate," +
142
                + " ii.fofoId, ii.sgstRate, ii.cgstRate, ii.igstRate," +
143
                " cast(case when sio.creditTimestamp between :startDate and :endDate and sio.rolledBackTimestamp is null or sio.rolledBackTimestamp not between :startDate and :endDate then sio.amount " +
143
                " cast(case when sio.creditTimestamp between :startDate and :endDate and sio.rolledBackTimestamp is null or sio.rolledBackTimestamp not between :startDate and :endDate then sio.amount " +
144
                " 			when sio.creditTimestamp between :startDate and :endDate and sio.rolledBackTimestamp between :startDate and :endDate then 0" +
144
                " 			when sio.creditTimestamp between :startDate and :endDate and sio.rolledBackTimestamp between :startDate and :endDate then 0" +
145
                "			when sio.creditTimestamp is not null and sio.rolledBackTimestamp between :startDate and :endDate then -sio.amount" +
145
                "			when sio.creditTimestamp is not null and sio.rolledBackTimestamp between :startDate and :endDate then -sio.amount" +
146
                "			else 0 end as float), ii.id, ii.serialNumber, s.name, p.purchaseReference, " +
146
                "			else 0 end as float), ii.id, ii.serialNumber, s.name, p.purchaseReference, " +
147
                " case when sio.rolledBackTimestamp between :startDate and :endDate then sio.rolledBackTimestamp else sio.creditTimestamp end)  from "
147
                " case when sio.rolledBackTimestamp between :startDate and :endDate then sio.rolledBackTimestamp else sio.creditTimestamp end, ii.hsnCode)  from "
148
                + " 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
                + " 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"
149
                + " where sio.createTimestamp >= :cnDate and (:fofoId IS NULL OR ii.fofoId = :fofoId) and ((sio.creditTimestamp between :startDate and :endDate) or (sio.creditTimestamp is not null and sio.rolledBackTimestamp between :startDate and :endDate))")
149
                + " where sio.createTimestamp >= :cnDate and (:fofoId IS NULL OR ii.fofoId = :fofoId) and ((sio.creditTimestamp between :startDate and :endDate) or (sio.creditTimestamp is not null and sio.rolledBackTimestamp between :startDate and :endDate))")
150
})
150
})
151
public class SchemeInOut implements Serializable {
151
public class SchemeInOut implements Serializable {
152
 
152