• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

How to create an invoice system with fabrik?

tutux

Member
Hi the community,

all is in the title :)

I would like to create a invoice system with fabrik... not so easy for me :)

I explain, i need a "contact" list, an "articles" list and a "invoice list"

When i create a new invoice, (a new record in my "invoice" list), i would like to choice my contact in the "contact" list through a dropdown.

When the contact is selected, i would like to find with the same way the article or the articles to make the invoices..
The articles have previously recorded in the "articles" list.

example
"contact " list, with 4 fields : Name - Adress - CP - Country
"articles" list with 3 fields : Table - brown - 100 ?
Bed - white - 200?

I create a new "envoice" list record :
I select Name, and all the fields from "contact" list are selected
I select Bed, and all the fields from "Articles" list are selected
I can select more than 1 article.... for exemple 5 articles


When all is filled out , i have a list with 7 differents fields (4 from contact and 3 from articles)
After that, i create my custom CSS to show all field in an invoice CSS (i know just how to do this )

... any idea?

I tried a lot of ways but never found it :(

thank you in advance

Best regards
 
Hello.

I've done something similar to what you want.

I. - First you have to create three tables:
One for bills, one for catalog customers and one for your pructos.
- The main table is that of your bills.
-I recommend this table divided into 4 groups of fields to an array and give different treatment to each group. I'll explain:
1) The group primier add two fields: date and page (two columns)
2) In the second group insert fields concerning customer data, ie: name, address, Tax Number (in Mexico called RFC). Indicate that this group can be divided into three columns.
3) The third group is for your products: SKU, Quantity, Description, Unit Price, Amount. (This group would be a repeat in tabular form)
4) The fourth group is for the sums: Subtotal, Tax, Total. (You may indicate that this group is divided into three columns)

II. - Now the second part is to link and calculate.
1) In your first group there is so much trouble, they are two separate fields type date and incremental number (could be the ID field of the table)
2) In the second group (clients) is where you begin to build links with other tables. In your catalog customers and you must have created at least the same fields that you will use on the bill. In the bill the name field (which may be individual or company name) must be a search field databasejoin data hosted in the name field of the Customers table. The rest of the fields in this group would be an CascadingDropdown which observes the changes you make in the name field and search the catalog table corresponding to customers that same row, so the rest of the fields in the same group.
3) The third group (products) is somewhat similar to the above but as this is a repeating group, you can add more than one row as the number of products you will incuir ls same invoice. (eye, the amount would field a calculated field (calc) which multiplies the quantities of product for the price.
4) The last group is used for the final calculations of the subtotal (sum of the amounts of products) the value of taxes (in Mexico is 16% of subtotal) and total, that is, the sum of subtotal more taxes .Ejemplo.PNG
 
Forgot let you know that, bill printing is better if you use the detail view, you determine that what the options form.

Good luck, I hope this will serve you, any question, just ask.
 
hi everybody, please I need to make a field to increase the invoice number, example: from 1976 next invoice 1977 next invoice 1978... thenkyou
:)
 
you have several options :

You may use a calc field, you may use the id field or even an autofill plugin on the form. It all depend on what you have ( elements ) and what you want. Can you please be more specific ?
 
you have several options :

You may use a calc field, you may use the id field or even an autofill plugin on the form. It all depend on what you have ( elements ) and what you want. Can you please be more specific ?


Thenk you nusilmar, I am using the id field and works perfect.
 
Hi everybody, naw I have a question:
According with Tirso, in this foro line (II. - Now the second part is to link and calculate.)...
4) The last group is used for the final calculations of the subtotal (sum of the amounts of products) the value of taxes (in Mexico is 16% of subtotal) and total, that is, the sum of subtotal more taxes .

Please, how can I get the calculation of subtotal + %16 to get the total? cool if somebody share a php code.

Thenk your for all Fabrik comunity.
 
Hi Kinnorvi, for the total, you can do this in a calc plugin:

Code:
$subtotal = "{tblFoo___elementname}";
 
$total = $subtotal * .016;
 
return $total;
 
Hi, now i get a "css" problem, in all site the css don?t load, i was looking for a post in the forum but nothing.... can i post here???

Thenkyou!!
 
Create a new thread to avoid confusion, so others can go back to this thread within the topic that they are looking for to help them too.
 
Hi everyone, hi Tessa.
Hi Kinnorvi, for the total, you can do this in a calc plugin:
New question: I need to take an id from another table, please, could you share a php code?s example?

Thenk you!

:)
 
Great post, the only issue I'm having is getting a grand total.
2 groups, "1 repeating" "1 not repeating for sums"
In the repeating I have
I have a "dbjoin element - item | a ccdropdown - price | field - quantity | calc - subtotal.
"Seems to work perfectly."
However, the non repeating with only 1 element "Total" I can only get the first entry of the repeating group to calculate, can anyone suggest or point me in the right direction?
 
I am having the same issue here.
Two groups, 1 repeating 2 grand totals.
How do i sum the repeated amounts and show the sum, while processing the form before saving to mysql, in the the second group?
How do i reference each repeated element to sum them up?
Thanks.
 
Last edited:
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top