Help with Point of Sale

I am designing a point of sale system, where i have an input with autocomplete to find the products that the customer will pay.

input image

I have a table where you should be placing the products that i selected with all its data (number, description, price).

Image of fields in the table

But I never made a point of sale system and do not know the logic of how this part of the system works so that the products loading to the table, if someone has done something similar could help me, I would be very grateful

Can you elaborate more? I am not quite understand your problem.

Usually a POS transaction consist of a header and details. In header, you can save information about name of the customer, date of transaction, operator, etc. In detail, you save information about product id (can be a foreign key to product table), quantity and unitPrice.

many ways you could develop the solutions based on your requirement. What I usually did, I create the header automatically and in header’s view I can add details. I used ajax form to add detatil and CGridView to display the details. When ajax form is submitted and the item is added to details I can just refresh the CGridView to display it.