Advertisement
Guest User

Untitled

a guest
May 8th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. USE invent.dbf
  2.  
  3.  
  4. @@CLOSE ALL         //why do you need to do this here?
  5. USE sale IN 1
  6. USE invent IN 2
  7. USE purchase IN 3
  8. SELECT invent
  9. DO WHILE .t.
  10. b=0
  11. c=0
  12. STORE item_code TO a
  13. @@SELECT purchase       //make sure this, and others like this, are correct names for their functions
  14.   DO WHILE NOT EOF()
  15.   IF item_code=a
  16.   c=c+quantity
  17.   ENDIF
  18.   SKIP
  19.   LOOP
  20.   ENDDO
  21. SELECT sale
  22.   DO WHILE NOT EOF()
  23.   IF item_code=a
  24.   b=b+quantity
  25.   ENDIF
  26.   SKIP
  27.   LOOP
  28.   ENDDO
  29. SELECT invent
  30.   IF item_code=a
  31.   replace stocks WITH c
  32.   replace sold WITH b
  33.   replace rem_stocks WITH stocks-sold
  34.   endif
  35. IF NOT EOF()
  36.     SKIP
  37.     LOOP
  38. else
  39.     EXIT
  40. endif
  41. ENDDO
  42.  
  43. REPORT FORM report1
  44.  
  45. //Dai ko po maintindihan an presentation kan code. Are you open to using a similar program that I made, instead? Baka mas madali pa.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement