Subversion Repositories SmartDukaan

Rev

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

Rev 34055 Rev 34056
Line 54... Line 54...
54
                        "      JOIN warehouse.purchase p ON p.id = ii2.purchaseId" +
54
                        "      JOIN warehouse.purchase p ON p.id = ii2.purchaseId" +
55
                        "      JOIN warehouse.purchaseorder po ON po.id = p.purchaseOrder_id" +
55
                        "      JOIN warehouse.purchaseorder po ON po.id = p.purchaseOrder_id" +
56
                        "      JOIN warehouse.invoice inv ON p.invoiceNumber = inv.invoiceNumber AND po.supplierId = inv.supplierId AND po.warehouseId = ii2.physicalWarehouseId" +
56
                        "      JOIN warehouse.invoice inv ON p.invoiceNumber = inv.invoiceNumber AND po.supplierId = inv.supplierId AND po.warehouseId = ii2.physicalWarehouseId" +
57
                        "      JOIN warehouse.supplier su ON su.id = inv.supplierId AND su.internal = 0" +
57
                        "      JOIN warehouse.supplier su ON su.id = inv.supplierId AND su.internal = 0" +
58
                        "" +
58
                        "" +
59
                        " where ((o.created_timestamp >= '2024-12-14' AND o.created_timestamp < '2024-12-15') AND (o.billing_timestamp >= '2024-12-14' AND o.billing_timestamp < '2024-12-15') AND o.refund_timestamp IS NULL)" +
59
                        " where ((o.created_timestamp >= :startDate AND o.created_timestamp < :endDate) AND (o.billing_timestamp >= :startDate AND o.billing_timestamp < :endDate) AND o.refund_timestamp IS NULL)" +
60
                        " and DATEDIFF(NOW(), inv.invoiceDate) > 15" +
60
                        " and DATEDIFF(NOW(), inv.invoiceDate) > 15" +
61
                        " GROUP BY a.auth_id, a.Rbm_Name",
61
                        " GROUP BY a.auth_id, a.Rbm_Name",
62
                resultSetMapping = "SoldAgingModel"),
62
                resultSetMapping = "SoldAgingModel"),
63
 
63
 
64
})
64
})