Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. select all records from staffingtable between startDate and endDate
  2.  
  3. for each distinct staffid:
  4. Create invoice header:
  5. InvoiceRef = autonumber
  6. InvoiceDate = today()
  7. StaffID = distinct staffid from staffingtable
  8. InvoicePayDate = supplied_date_parameter
  9. InvoiceSortCode = value from staff table
  10. InvoiceAccount = value from staff table
  11.  
  12. Insert into InvoiceLineItem
  13. LineID = autonumber
  14. InvoiceRef = invoiceheader that was just created
  15. JobType = PTS/EVENT based on populated ID field or lookup to event header table
  16. JobDate = date of job from staffing table
  17. JobName = value from event header table
  18. JobPaid (currency amount) = job hours * payrate from staffgrade table
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement