Adding items to an invoice

Hi everyone!

This is my first post so first let me say that Yii is really a great framework!

Now to my problem:

I am working on a very simple application for creating invoices. I need to find a way to dynamically (propably with ajax) find a way to add items on an invoice.

Does anyone did this before?

Please guide me.

Regards

Here you are a wiki, take first a look at this related extension.

You can first do with links as in the example in the extension, for take confident with the tabular input system, is not as easy as it looks like.

After that you can di with pure js, without any submission (even without ajax submission).

Ps: welcome to the forum!

Hi,

Thanks for the tutorial.

I have tried with no success get it to work.

The problem is that I have 3 tables instead of 2 like the guide.

I have:

invoice_table - stores invoice information only, like client, due date, discount

invoice_items - stores the items for later use

invoice_items_table - this one stores the items foreach invoice

How would I change the code for that?

Thanks for any help

Hi zaccaria,

I have been trying to get your module to work with no success.

Can you please send to me a complete source code and sql tables as a sample?

Regards

anyway is a one entry table.

For each invoice (like the class of my example) you have many invoice_items_table (like the students).

In each invoice_items_table you will have a ddl for choosing the invoice_item.

Follow the example in the wiki, tell me where you have problem and I will suggest you how to move forward.

For now you have to create a InvoiceItemTableManager, following the guide of the wiki.

That’s absolutely not an easy task, be patient. Aready many users tried this extension with success, it works, belive it! :)