Jump to content
Server Maintenance This Week. ×

Adding items to invoice by clicking on pictures shown a Grid


docasar

This topic is 3171 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi,

I am trying to develop a simple POS but I am struggling with getting the standard layout for this kind of developments.

Basically would I would like to achieve is to create a panel that would show the pictures of all products available, and when clicking on any of the pictures, the related item will go into the invoice_line_item.

I have seen this functionality not only for POSs, but also to show all attachments related to one account. There were a button that says "add new attachment" and when added into the container, it will show in order in grid style panel situated just above.

I have been able to create such a panel with individual buttons created from 1:1 portal which shows only one specific id_product related picture. However, since each button should have its own script I am finding it challenging when trying to do it for more than 100 products.

So my question would be if there is any build-in feature that would show the content of a container on a clickable grid panel. The importan thing here should be that if a new product /record is created, its picture (container field) should be added to that panel, in oder words, the panel is feed automatically each time I add a new product.

Any ideas how to do this? I am attaching a picture of someone else work that shows something similar to what I would like to learn how to do.

Thanks a lot!!!

docasar.

Screen Shot 2015-08-21 at 08.04.06.png

Link to comment
Share on other sites

There are two separate questions here:

  1. How to show all products and let the user select which one to add to the invoice;
  2. How to show them in a 5 x 5 (for example) grid.

For the first question: you need to add a relationship to (another occurrence of the) products table, that would show all products (or all products in a selected category). Then show these in a portal and make a button in the portal run a script that creates a new line item with the clicked product's ID).

For the second question, place 5 instances of the portal on the layout, side-by-side. Make each of these 5 rows tall, and set the initial rows to 1, 6, 11, 16 and 21 respectively.

For your next question, I need to find a demo of paged portal I posted some time ago - and that is currently a big problem.

 

 

Edited by comment
Link to comment
Share on other sites

This topic is 3171 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.