home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a012 / 1.ddi / CHAP16.EXE / CHP1601.PRG < prev    next >
Encoding:
Text File  |  1991-04-30  |  803 b   |  31 lines

  1. /*
  2.    Listing 16.1  Record customer payment - version 1
  3.    Author: Joe Booth
  4.    Excerpted from "Clipper 5: A Developer's Guide"
  5.    Copyright (c) 1991 M&T Books
  6.                       501 Galveston Drive
  7.                       Redwood City, CA 94063-4728
  8.                       (415) 366-3600
  9. */
  10.  
  11. memvar chk_amount
  12. select CUSTOMER
  13. if rec_lock(15)          // Lock the current record
  14.    replace CUSTOMER->balance with ;
  15.            CUSTOMER->balance - chk_amount
  16.    unlock
  17. endif
  18. select INVOICE
  19. if rec_lock(15)          // Lock the current record
  20.    replace INVOICE->paid with ;
  21.            INVOICE->paid + chk_amount
  22.    unlock
  23. endif
  24. select PAYMENT
  25. if rec_lock(15)          // Lock the current record
  26.    replace PAYMENT->posted with .T.
  27.    unlock
  28. endif
  29.  
  30. // end of file CHP1601.PRG
  31.