<% if type([user_pmntadd])=[U] user_pmntadd=.t. endif if type([user_pmntedit])=[U] user_pmntedit=.t. endif if type([user_pmntview])=[U] user_pmntview=.t. endif if type([user_pmntdelete])=[U] user_pmntdelete=.t. endif if type([logedin])=[U] logedin=[Admin] endif %> <% *RETURN dbclocation crlf=CHR(13)+CHR(10) SET DATE ymd set mark to '-' SET CENTURY ON SELECT TOP 1 *, VAL(transid) as vtr FROM (dbclocation+'billpay') ORDER BY date desc, vtr desc, transid DESC INTO CURSOR x SCATTER NAME SearchResults if empty(date) thedatestring=transform(date()) else thedatestring=transform(date) endif openingbalance=[] if BETWEEN(val(left(SearchResults.vendor,2)),1,8) select sum(debit-credit) as dayopening from (dbclocation+[acctran]) where ; accountid=SearchResults.vendor and dateSearchResults.date INTO CURSOR opening select sum(debit-credit) as allclosing from (dbclocation+[acctran]) where ; accountid=SearchResults.vendor INTO CURSOR allclosing openingbalance=[On ]+transform(DAY(SearchResults.date))+[ ]+LEFT(CMONTH(SearchResults.date),3)+[ ]+ALLTRIM(TRANSFORM(YEAR(SearchResults.date))) openingbalance=openingbalance+[ Opening: ]+allt(transform(nvl(opening.dayopening,0)))+[ add debits: ]+allt(transform(closing.debits))+[ less credits: ]+; ALLTRIM(transform(closing.credits))+[ closing: ]+ALLTRIM(TRANSFORM(nvl(opening.dayopening,0)+closing.debits-closing.credits)) overallclosing=[Overall closing balance: ]+transform(nvl(allclosing.allclosing,0)) openingbalance=openingbalance+[
]+overallclosing ENDIF USE (dbclocation+[accounts]) IN SELECT([accounts]) =SEEK(SearchResults.vendor,[accounts],[accountid]) ccreditor=[] =SEEK(SearchResults.depositid,[accounts],[accountid]) cdebitor=[] CLOSE TABLES CLOSE DATABASES %> SSSoft™ Payment
Credit
Debit
Date
Amount
Cheaque Number
Cheaque Date
Receiver Information
Remarks
<% set deleted on select recno() as therecord, date, cvtype,invoiceid,total,paid,(total-paid) as balance,; credit, descp,allt(cvtype)+[-]+allt(invoiceid) as thetrid ; from (dbclocation+[jcredits]) where ACCOUNTID+VTYPE+TRANSID=SearchResults.vendor+Padr("Payment",10)+SearchResults.transid ; into cursor thedetails TemporaryGrid='' set date british select [thedetails] go top do while not eof() TemporaryGrid=TemporaryGrid+[]+crlf TemporaryGrid=TemporaryGrid+[]+dtoc(date)+[] TemporaryGrid=TemporaryGrid+[]+cvtype+[] TemporaryGrid=TemporaryGrid+[]+invoiceid+[] TemporaryGrid=TemporaryGrid+[]+transform(total)+[] TemporaryGrid=TemporaryGrid+[]+transform(paid)+[] TemporaryGrid=TemporaryGrid+[]+transform(balance)+[] TemporaryGrid=TemporaryGrid+[] TemporaryGrid=TemporaryGrid+[] TemporaryGrid=TemporaryGrid+[]+transform(descp)+[] TemporaryGrid=TemporaryGrid+[]+crlf skip enddo go top close tables close DATABASES %> <%=TemporaryGrid%>
Date Voucher Number Total Paid Balance Amount Details