There are a couple of different methods in filemaker that you can use to do this. Assuming the same fields are available in both tables, you can:
1) Script to export an order record to a temp file, go to invoices table, import temp file
2) Script to set all the fields as variables on an order record, go to invoices table, create new record, set fields based on variables.
3) Similar to #2, but only using a single variable as a virtual list of order values, go to invoices table, create new record, set fields based on values from that virtual list
4) relate the invoices table to the orders table in a 1-to-1 relationship. Script to create new related invoice record, copy all values from order through relationship.
Of the above, I would say #1 is the easiest to do. #3 is the coolest, #2 and #4 have the most overhead, but are also easy to troubleshoot if something is wrong.
1 of 1 people found this helpful
Why copy the data to an invoice? I'm assuming the order already has all of the relevant information needed to print an invoice. Create your invoice printout layout using the fields from the order. Create a button on the order layout that goes to the invoice layout, prints the invloice and then returns to the order. You might want to add a status field to the order layout to keep track of the order.
1 of 1 people found this helpful
To rgordon's point, you could use that status field to lock editing of a record if that is your concern. This would be accomplished through priviledge sets. So basically if someone marked a record status field as "invoiced", you can set the "user" privilege set to deny editing, but have an "admin" or the full-access default be allowed to edit.
I'd imagine the desire for two separate tables was for either separating those transactions somehow, for either security or reporting purposes. But also, if Robby above is using the bonsai template, he's most likely going through FTS right now, and is probably interested in learning new ways to do things in filemaker.
Greatly Appreciate the advise. I actually just loaded my database onto our Server this weekend and am really excited about the potenial uses now around our facility using file maker GO on ios devises.
Filemaker is really awesome!
Yes. I am new and trying to get used to, and understand Filemaker. The Bonsai template does not allow you to mark an order paid and use it as an accounting system too.
FileMaker GO is a wonderful tool to have in a work environment. Good luck with your FileMaker development.
Robby, you should be able to modify the template. You can add your own fields, scripts and layouts to accomplish what you need. BTW, I have a copy of the .fp7 Bonsai file. It has a button to print an invoice on the Orders layout.
Is there a way to mark an order paid, on that Template?
What you finally do should, I think, depend more upon the business rules in place rather than what it is possible to do with FM.
To my way of thinking, an order is a request which may or may not get filled. It may even be modified in the process of meeting that Customer's request. By comparison an invoice has a contractual aspect that requires a payment of some sort. Hence there's a need to have your invoicing module linked in some way with your accounting and banking activity. For a Sales Order, that's not necessarily a requirement.
That's why I'd recommend you follow Mike's advice in the post you've marked as "Correct."
I hope this helps,
Thanks John. It does.