I have model Quote and model Invoice. The database for each of these models have the columns: date, company, product and price. When a customer approves a quote I would like to turn that quote into a invoice with the same values but with the current date and its own invoice_id.
What code should I include in my Invoice model so that the record "duplicates" or "changes" state?
Thank you
In Quote you can use the following code