DXBLouie
Posts: 21
|
| Posted: 05/19/2011, 4:12 PM |
|
Hello everyone,
i'm trying to write an invoicing module to an application i'm developing for my business.
at the moment i have the following tables
customers (customer id, name, etc)
products (product id, part number, price, etc)
invoice (invoice id, customer id, date, etc)
invoice_detail (invoice_id, item_id, item_price)
basically in order to create an invoice, data has to go in two tables
invoice (with the header info, i.e: the customer and order information) and invoice_detail (where the individual items are listed)
now the only way i've managed to get this done is with a record builder, that creates the invoice number with the basic information, then forwards to another page with an editable grid where i can add the items to the invoice already created..
while this works, i can't help but wonder how to clean this up a bit.
i'd like to do the whole thing in one form.. i.e: select the customer from a drop down, fill the date, order details, then proceed to add the items (with automatically added rows) till it's all done..
does anybody have any ideas?
|
 |
 |
damian
Posts: 838
|
| Posted: 05/20/2011, 1:08 AM |
|
plenty of ideas - maybe some are even good ones... or not...
can you post screen shot(s)
_________________
if you found this post useful take the time to help someone else.... :)
|
 |
 |
mamboBROWN
Posts: 1713
|
| Posted: 05/20/2011, 4:12 AM |
|
DXBLouie,
There are tons of ideas already available to you through the Code Charge Studio Example pack ( http://examples.codecharge.com/ ). All you need to do is to integrate it into your application.
|
 |
 |
DXBLouie
Posts: 21
|
| Posted: 05/20/2011, 5:02 AM |
|

( full screenshot: http://i.imgur.com/QTffF.png )
the idea is that the top form creates the invoice, and when you click add the data is inserted into the DB (invoice_header) , and the invoice ID is generated and passed to the form below.
the form below works on auto-complete as you type the part number (i may need to refine that somehow)
and more rows will be added automatically to the bottom of the editable grid form.
ideally i'd like to have this done in one step (everything created in one go, then one submittion would create the invoice header, generate the ID to be used by the detail items below, and insert those in their table)
|
 |
 |
datadoit
|
| Posted: 05/20/2011, 7:53 AM |
|
Good time to learn about the wonderful world of AJAX. CodeCharge will
build your framework, but you'll have to make it 'go'.
AJAX is built for precisely what you're looking for - interface to
database back to interface interactivity without the need for user
intervention.
|
|
|
 |
DXBLouie
Posts: 21
|
| Posted: 05/20/2011, 8:02 AM |
|
i've built a few ajax related components (dependent dropdown lists and autofill.. both are found on this form), but being new to the concept, i don't even know what to start googling for (i see how ajax works with the autocompletion and dependent dropdowns, i just don't see how it would work for the main requirement i have with merging two forms, etc)
|
 |
 |
Stanj
Posts: 166
|
| Posted: 05/22/2011, 10:44 PM |
|
Are the invoices to be printed or for web presentation?
If printed to give customers paper invoices the data entry forms you have are not good for the final output. Use the forms you have and create a report for the header info and another for the detail of items, and format the print page so it looks like the printed invoice you wish.
The order entry form, using an update panel containing both forms will work. If you want the order entry form to look more like an invoice, use a Style that formats the grid and record without background, and row line suppressed. Eliminate the form titles, make the customer/order form the same width as the grid and remove any line breaks or " " code between the two forms so they appear as one. If you want to visually separate them, put each form in a single cell table with its border set to "1" or more depending on the width of the line you wish.
You can do a lot more if you get rid of the tables that CodeCharge Studio creates and use CSS to format the page exactly how you want it. There is no reason why you can't create final invoices that look as clean and well formated as any printed invoice you have seen.
I use a lot of business forms, reports and on-line ordering in my business and they are all created in CCS. They create printed tour tickets, assemble immigration details in Cyrillic for passport control, creates security data for the entrance gate to the secure port, creates two sided photo id's for the guides, drivers and support staff, all the normal invoices, reports and documents any business needs, prints out full descriptive itineraries with photos and background info on each sight or venue to be visited, assigns guides and vehicles, applies for port access permits for the vehicles, and assembles highly customized tours based on a database of available activities, 254 museums, keeping track of 1800 or more port calls of ships each summer in the Baltic region, creating vouchers for hundreds of museums, and sends the voucher details to the booking offices of the museums, plus a full shopping cart that is used for placing orders, collecting passport details, secure credit card processing, managing an affiliate program for agencies and agents, calculating accumulated commissions for agents etc....all in CCS and I am not even a programmer.
Most of the staff is used to simply answer emails, and greeting passengers but the programs created with CCS make the complex task of creating customized shore excursions, documentation, sales, billing and accounting a very simple process easily handled by anyone in the office, mostly with one or two button clicks, So I KNOW CCS is capable of doing exactly whatever you want if you are a little creative. Every single day, the value of CCS is recouped several times over.
Good luck
_________________
Stan
St Petersburg Russia |
 |
 |
DXBLouie
Posts: 21
|
| Posted: 05/23/2011, 1:58 AM |
|
Thanks for the reply stanj,
what you're looking at is the invoice data entry form.. the printed invoice will be generated by another page, and that's an easy one.
the issues i have at the moment is the following:
1. getting autofill to work in the editable grid (seems like a bug here) so when i enter the part number, the description, cost and SRP are automatically filled (but editable)
2. get the same invoice ID for both the top and bottom form.. i think i'll make the top form submission return to the same page with the inserted invoice ID, which will then be used in the detail form below
3. part number selection.. i need to maybe add a lookup popup that allows the user to search by manufacturer, or description.. click on the PN which in turn will get transferred to the detail form
|
 |
 |
DXBLouie
Posts: 21
|
| Posted: 06/02/2011, 1:06 PM |
|
i've solved 99% of my issues, albeit with an old-fashioned popup lookup, rather than a modal.
i posted most of it here if anyone is interested http://forums.yessoftware.com/posts.php?post_id=115780
thanks for the time and help!
|
 |
 |
|