• Consolidated billing query with AR_InvoiceHistoryDetail

    We are trying to write a query or stored procedure to identify the cash receipts for each of our franchises (warehouses) but ran into some trouble with consolidated billing. Since payments aren't applied to the line items we need to create a lookup table…