select r.ownerId, r.ownerType, rp.partnerId, rp.partnerType, r.requestId from tbl_TPM_Requests r inner join tbl_TPM_RequestPartners rp on rp.requestId = r.requestId and rp.ownerId = r.ownerId and rp.ownerType = r.ownerType and rp.primaryPartner = 'Y' and rp.partnerType = r.payableTo inner join tbl_TPM_RequestTypes rt on rt.requestTypeId = r.requestTypeId and rt.ownerId = r.ownerId and rt.ownerType = r.ownerType and rt.autoCreateOffInvoiceClaims = 'Y' where r.ownerId = and r.ownerType = and r.status = 'APPROVED' and r.paymentMethod = 'OI' order by partnerType, partnerId
#htmleditformat( qmd_offInvoiceDeal.primaryPartnerName )#: #htmleditformat( qmd_offInvoiceDeal.assignedContractNbr )# #htmleditformat( qmd_offInvoiceDeal.description )# (#lsdateformat( qmd_offInvoiceDeal.startDate, "MM/DD/YYYY" )# - #lsdateformat( qmd_offInvoiceDeal.endDate, "MM/DD/YYYY")#)
Invoice Date Invoice ## Reference ## Description Amount
#lsdateformat( claimDate, "MM/DD/YYYY" )# #claimInvoice# #claimRef# #claimDescription# #lscurrencyformat( claimAmount )#
Total Claim Amount for #qmd_claims.recordCount# Invoices: #lscurrencyformat( _totalClaimAmount )#

Total Claims #_totalClaims# Created