Subversion Repositories SmartDukaan

Rev

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

Rev 33038 Rev 33043
Line 19... Line 19...
19
        "FROM FofoStore fs " +
19
        "FROM FofoStore fs " +
20
        "JOIN com.spice.profitmandi.dao.entity.user.User u ON (u.id = fs.id and fs.id = :fofoId) " +
20
        "JOIN com.spice.profitmandi.dao.entity.user.User u ON (u.id = fs.id and fs.id = :fofoId) " +
21
        "JOIN Address ua ON u.addressId = ua.id " +
21
        "JOIN Address ua ON u.addressId = ua.id " +
22
        "JOIN OfferPayout op ON op.fofoId = fs.id " +
22
        "JOIN OfferPayout op ON op.fofoId = fs.id " +
23
        "JOIN Offer o ON o.id = op.offerId " +
23
        "JOIN Offer o ON o.id = op.offerId " +
24
        "JOIN InventoryItem ii ON (ii.serialNumber = op.serialNumber and ii.fofoId=fs.id and ii.lastScanType not in (com.spice.profitmandi.dao.enumuration.fofo.ScanType.PURCHASE_RET, com.spice.profitmandi.dao.enumuration.fofo.ScanType.PURCHASE_RET_BAD))" +
24
        "JOIN InventoryItem ii ON (ii.serialNumber = op.serialNumber and ii.fofoId=fs.id)" +
25
        "LEFT JOIN Item i ON i.id = ii.itemId " +
25
        "LEFT JOIN Item i ON i.id = ii.itemId " +
26
        "WHERE (op.createTimestamp BETWEEN :startDate AND :endDate) " +
26
        "WHERE (op.createTimestamp BETWEEN :startDate AND :endDate) " +
27
        "OR (op.rejectTimestamp BETWEEN :startDate AND :endDate)")
27
        "OR (op.rejectTimestamp BETWEEN :startDate AND :endDate)")
28
 
28
 
29
 
29