picolisp

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/picolisp.git/
Log | Files | Refs | README | LICENSE

inventory.l (1938B)


      1 # 05jan12abu
      2 # (c) Software Lab. Alexander Burger
      3 
      4 (must "Inventory" Report)
      5 
      6 (menu ,"Inventory"
      7    (<h3> NIL ,"Inventory")
      8    (form NIL
      9       (<grid> "-.-"
     10          ,"Number" NIL
     11          (prog
     12             (gui '(+Var +NumField) '*InvFrom 10)
     13             (prin " - ")
     14             (gui '(+Var +NumField) '*InvTill 10) )
     15          ,"Description" NIL (gui '(+Var +TextField) '*InvNm 30)
     16          ,"Supplier" (choCuSu 0)
     17          (gui '(+Var +Obj +TextField) '*InvSup '(nm +CuSu) 30) )
     18       (--)
     19       (gui '(+ShowButton) NIL
     20          '(csv ,"Inventory"
     21             (<table> 'chart NIL
     22                (<!>
     23                   (quote
     24                      (align)
     25                      (NIL ,"Description")
     26                      (align ,"Inventory")
     27                      (NIL ,"Supplier")
     28                      NIL
     29                      (NIL ,"Zip")
     30                      (NIL ,"City")
     31                      (align ,"Price") ) )
     32                (catch NIL
     33                   (pilog
     34                      (quote
     35                         @Rng (cons *InvFrom (or *InvTill T))
     36                         @Nm *InvNm
     37                         @Sup *InvSup
     38                         (select (@Item)
     39                            ((nr +Item @Rng) (nm +Item @Nm) (sup +Item @Sup))
     40                            (range @Rng @Item nr)
     41                            (tolr @Nm @Item nm)
     42                            (same @Sup @Item sup) ) )
     43                      (with @Item
     44                         (<row> (alternating)
     45                            (<+> (: nr) This)
     46                            (<+> (: nm) This)
     47                            (<+> (cnt> This))
     48                            (<+> (: sup nm) (: sup))
     49                            (<+> (: sup nm2))
     50                            (<+> (: sup plz))
     51                            (<+> (: sup ort))
     52                            (<-> (money (: pr))) ) )
     53                      (at (0 . 10000) (or (flush) (throw))) ) ) ) ) ) ) )
     54 
     55 # vi:et:ts=3:sw=3