This topic is locked

Update field values on screen as records added

10/8/2008 7:01:29 AM
PHPRunner General questions
T
thesofa author

I know all these points may have been addressed elsewhere, but I cannot find them, so here is my shopping list of questions
I have a 4 tier structure for an orders database, as follows

1 Department places order

2 Order has supplier and shipping charges and lines of orders and calculated field of order total

3 Line has item code and price and calculated field of line total

4 Goods in has dates and quantities received, calculated field of balance of goods due.
If This were a spreadsheet, I could have the calculated fields auto calculate as the focus passes through them, and the Order Total on the master table can be calculated as the order is entered.

How can I do this?
Also, I would like to produce the order in its final form with the order details at the top, then the suppliers details, then the order line details in a central section, then the order totals and supplier contact details at the bottom ready either for printing or turning into a pdf for emailing to the supplier.
Do I have to custom code all of this, or is there an easy way to get the totals done at the end of each line..
Also..... I notice that if I click Inline Add 4 times, I will get 4 blank records to fill in, so I can fill 4 records at once and click Save All.

Now I want to give the order line a unique reference, in the form of 'ordernumber'/'linenumber'

but I want the line number to start at 1 for each order, so for order number PCS-235 I would like line numbers of PCS-235/01, PCS-235/02 etc
So I can set up a variable to count with and set it to 1 at the start of each new order, then Concat the order number and the variable to make the line number, but how will this work if I do multiple Inline Adds, saved with the Save All button?, do I need to find a different way of doing things?
Led Zeppelin had it right, Dazed and Confused is me ATM

Cheers for reading this, I hope you can all help me?

S
swanside 10/9/2008

I have been trying to do something similar.
Have a look here
http://demo.asprunner.net/pggrimes%5Fhotma...s_made_list.php
Enter an amount in the Amount field,

It will display the VAT and he NET
If you now enter something in STOCK the AUDIT AMOUNT will update, then if you enter something in MOTOR it will again update the AUDIT AMOUNT.
BUT, it wont work in reverse.
DOnt know if thats what you are after, but hope it helps.
By the way, I got alot of help from support on the code.
It does now, I changed the code to get it to work.

Paul.

T
thesofa author 10/10/2008

OK, but i have to say that as I do not understand the application, i cannot really see if it does what I want, except I want the Total for the master record to update as a child record is saved as well.

Thanks for the help, any pointers as to how I get it to work?