Files
PayrollManagementSystem/db/queries/tplus/materials/expenses.sql
T

4 lines
291 B
SQL
Raw Normal View History

SELECT TOP (201) d.idsaledelivery,d.idsaledeliverydetail,d.amount,
d.idSaleExpenseAllocationDTO,d.SourceVoucherCode
FROM dbo.SA_SaleExpenseAllocationDetail d JOIN dbo.SA_SaleDelivery h ON h.id=d.idsaledelivery
WHERE h.idcustomer=:customer_id AND h.voucherdate<:until ORDER BY h.id,d.id;