Adding and Saving Multiple items to the Invoice at Once

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
dennisans
Posts: 11
Joined: 2021-06-13 20:02

Adding and Saving Multiple items to the Invoice at Once

Post by dennisans » 2021-07-03 08:11

Hello Gini users. Has anyone implemented the addition and saving of multiple items to the invoice at once ?
Appgini invoice app has two parts, the invoices part and the invoice items part. Normally as it is, you create the invoice, and add items to it from the child invoice_items table one item at a time. Is there a way this can implemented perhaps with JavaScript helper library so that when the Add New button on the child invoice_items table is clicked the opened window allows to add all items there with their quantities and calculated price and then saved into the invoice_items table all at once ?

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Adding and Saving Multiple items to the Invoice at Once

Post by pbottcher » 2021-07-03 11:55

Hi,

I think this is available out of the box. Just uncheck the
modal.PNG
modal.PNG (1.47 KiB) Viewed 2070 times
in the parent/child settings
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

dennisans
Posts: 11
Joined: 2021-06-13 20:02

Re: Adding and Saving Multiple items to the Invoice at Once

Post by dennisans » 2021-07-05 07:34

@pböttcher thanks for your response. Not what I meant. I would like to be able to add all invoice items at once in stead of clicking the Add New button multiple times.

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Adding and Saving Multiple items to the Invoice at Once

Post by pbottcher » 2021-07-05 16:50

Hi again,

so if I get it right you want to have one form where you enter multiple items at one time bevor saving it.

This is not possbible with the standard setting. All you can have is save one item at a time, but without having to re-open the input page over and over again.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

dennisans
Posts: 11
Joined: 2021-06-13 20:02

Re: Adding and Saving Multiple items to the Invoice at Once

Post by dennisans » 2021-07-06 09:55

@pböttcher. You got exactly what I mean. It's tiresome and time consuming. Was wondering if anyone here has implemented this or I could have some advice on the work-around for this.

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Adding and Saving Multiple items to the Invoice at Once

Post by pbottcher » 2021-07-06 18:08

Hi,

just as an idea. Create an input table for your items to add to the invoice. Link one field to the invoice and create multiple other fields where each field will contain one item.
Upon save, (in the bevor_insert hook) you check the data and insert each of the items to your correct child table.

Requires some coding, but would allow what you need to a certain extend. Of course you need to identify how many items shall be availble to add (this is the limiting factor).

Hope you get the idea.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

dennisans
Posts: 11
Joined: 2021-06-13 20:02

Re: Adding and Saving Multiple items to the Invoice at Once

Post by dennisans » 2021-07-12 05:42

Thanks @pböttcher. I will give it a try

Post Reply