    while true
      vunloadif("X_cshrcd.vws")
      remove(X_path|"X_cshrcd.*")
      data query execute "not_del.dfq" Smart4 X_path|"X_cshrcd" fields "[Customer_Code|Br_KA]"
      vunloadif("X_cshrcd.vws")
      _SWIP_Crystal(Xreppath|"cshrcvd1","P",0,1,"") ' draft report

'       p1 = "totcashd.dfr"              ' draft version
'       p6 = 1    ' p6 = nr of copies 'message " nr of copies"
'       PrintReport(p1,p2,p3,p4,p5,p6)   ' draft version

      vloadif(dpath|"cshrcvd1.vw")
      messbox(" Has the Cash Summary printed correctly? (y/n) ",1,1,1)
      if ptstr == "y"                      '  store file & exit
        for i = 1 to records
          lock-record                        ' update record with inv nr & date
            [Banked]=today
          write-record
          data goto record next
        end for

'         p6 = 1    ' p6 = nr of copies
'         p1 = "totcashb.dfr"              ' banking version
'         PrintReport(p1,p2,p3,p4,p5,p6) ' banking version
'         PrintReport(p1,p2,p3,p4,p5,p6) ' banking version

        _SWIP_Crystal(Xreppath|"cshrcvd2","P",0,2,"")  ' banking report

        p1 = "totcashb.dfr"              ' banking version - message "p1) is:"&str(p1)
        repdate = left(sum_date,2)|mid(sum_date,4,2)|right(sum_date,2) 'message "repdate) is:"&str(repdate)
        br_dir=case br_name ("Sheen","SHEEN")("Fulham","FULHAM")("Putney","PUTNEY")("Head˙Office","HEAD") 'message "br_dir is:"&str(br_dir)
'         cashrep = $drive|":\REPORTS\BANKINGS\"|br_dir|"\"|repdate|".BNK" 'message "cashrep) is:"&str(cashrep)
        cashrep = $drive|"REPORTS\BANKINGS\"|br_dir|"\"|repdate|".BNK" 'message "cashrep) is:"&str(cashrep)
 '         p6 = 1    ' p6 = nr of copies 'message " nr of copies"
        print report execute p1 disk cashrep detail start 1 end 0 copies 1
        exit while
      else
        messbox(" Abandon and print later? (y/n) ",1,1,1)
        if ptstr == "y"                      '  store file & exit
          return (-1)
        else
          continue while
        end if
      end if
    end while
