home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Misc / ACASH_1.DMS / in.adf / Rexx / Entry / DruckeEAddresse.acash next >
Encoding:
Text File  |  1994-09-05  |  1.1 KB  |  64 lines

  1. /*ACash pro Print Entry normal*/
  2.  
  3. OPTIONS RESULTS
  4. address ACASH_REXX
  5.  
  6. /*Nötige Daten besorgen: Empfängerliste, Projektinfo, aktives konto*/
  7.  
  8. GetAttrs '"CUSTOMERS"' '"CUST"'
  9.  
  10. getprtfile
  11. file=result
  12.  
  13. if Open('temp',file,'w') then do
  14.     setscrtitle '"Fetching data ..."'
  15.     getactiveENTRY '"entry"'
  16.     if (result=="1") then do
  17.         setscrtitle '"Rendering..."'
  18.  
  19.         i=0
  20.         x=-1
  21.         do while i<cust.count
  22.             namen=""
  23.             namen=cust.i.name||" "||cust.i.surename
  24.  
  25.             if (namen=entry.customer) then do
  26.                 x=i
  27.                 break
  28.                 end
  29.             if (x>-1) then break
  30.             i=i+1
  31.         end
  32.         if (x>-1) then do
  33.  
  34.             call writeln('temp',"")
  35.  
  36.             call writeln('temp',"  "||entry.customer)
  37.             call writeln('temp',"  "||cust.i.street)
  38.             call writeln('temp',"  "||cust.i.zip||" "||cust.i.city)
  39.  
  40.  
  41.             if (length(cust.i.tel)>0) then do
  42.                 call writeln('temp',"  "||"Tel1: "||cust.i.tel)
  43.                 end
  44.             else do
  45.                 call writeln('temp',"")
  46.                 end
  47.             if (length(cust.i.fax)>0) then do
  48.                 call writeln('temp',"  "||"Tel2: "||cust.i.fax)
  49.                 end
  50.             else do
  51.                 call writeln('temp',"")
  52.                 end
  53.  
  54.             call writeln('temp',"")
  55.  
  56.             end
  57.         
  58.     end
  59.     Call Close('temp')
  60. end
  61.  
  62. exit 0
  63.  
  64.