Good evening friends I have a small problem and I do not know how to solve it, the problem is the following I have a table called transaction which is responsible for recording all transactions that occur in my application is this:
where by means of the transaccion_tipo_id field it tells me if it is a purchase or sale that table is this:
well up there all my problem lies in how I do so that a single view is responsible for registering a transaction is the type that is if I do not have a model of purchase or a sale and therefore no driver to send information to that view, the purpose of the transaction table is precisely to avoid having a table for each type of transaction.
So far I have only created the transaction model but I have no idea how to solve the proposed problem thanks in advance.