web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

SQL Scripts–Invoices Coming Due Next Week

Ron Wilson Profile Picture Ron Wilson 6,010

The following SQL View shows you all invoices that are coming due next week.  We use this view in conjunction with Task Centre to send out a list (fax or email) to our customers of invoices will be due next week.  This has really helped our aging process and past due invoices.  Our customers have expressed an appreciation for this friendly reminder.

***SQL Script***

select * from
(select custnmbr, docnumbr, duedate, cspornbr, docdate, ortrxamt, curtrxam from rm20101
    where duedate >= dateadd(wk, datediff(wk, 0, getdate())+1,0)-1
    and duedate < dateadd(wk, datediff(wk, 0, getdate())+2,0)-1) A
left join
(select custnmbr, custname, cntcprsn, stmtname, adrscode, address1, address2, address3, city, state, zip, phone1, phone2, phone3, fax, slprsnid, pymtrmid from rm00101) B
on a.custnmbr = b.custnmbr
left join
(select customer_num, invoiceStatementTo from spvcustomer) C
on a.custnmbr = c.customer_num
order by a.custnmbr asc, a.docnumbr asc


This was originally posted here.

Comments

*This post is locked for comments