Page 1 of 1

Adding and Saving Multiple items to the Invoice at Once

Posted: 2021-07-03 08:11
by dennisans
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 ?

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

Posted: 2021-07-03 11:55
by pbottcher
Hi,

I think this is available out of the box. Just uncheck the
modal.PNG
modal.PNG (1.47 KiB) Viewed 3412 times
in the parent/child settings

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

Posted: 2021-07-05 07:34
by dennisans
@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.

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

Posted: 2021-07-05 16:50
by pbottcher
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.

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

Posted: 2021-07-06 09:55
by dennisans
@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.

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

Posted: 2021-07-06 18:08
by pbottcher
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.

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

Posted: 2021-07-12 05:42
by dennisans
Thanks @pböttcher. I will give it a try