Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select all records from staffingtable between startDate and endDate
- for each distinct staffid:
- Create invoice header:
- InvoiceRef = autonumber
- InvoiceDate = today()
- StaffID = distinct staffid from staffingtable
- InvoicePayDate = supplied_date_parameter
- InvoiceSortCode = value from staff table
- InvoiceAccount = value from staff table
- Insert into InvoiceLineItem
- LineID = autonumber
- InvoiceRef = invoiceheader that was just created
- JobType = PTS/EVENT based on populated ID field or lookup to event header table
- JobDate = date of job from staffing table
- JobName = value from event header table
- JobPaid (currency amount) = job hours * payrate from staffgrade table
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement