CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Need help please...Editable grid problem

Print topic Send  topic

Author Message
doxtor

Posts: 24
Posted: 09/09/2008, 1:53 AM

Hello all..
I have a problem with editable grid.
I make a page like order entry in example pack. The problem is, I need to insert the Total_price to other table. How can I do that? I have tried use before submit, after submit, before & after execute update, before & after execute insert, and no one work :(
I have search here before, and can not find problem like what I face now.
Please, really need suggestion..

Thank you so much
View profile  Send private message
wkempees


Posts: 1679
Posted: 09/09/2008, 4:00 AM

Quote :
I make a page like order entry in example pack
Which example is that ? Do you mean the shopping cart example?
Perhaps it is easier to understand if you describe more precise what you are doing.

For now:
The shopping cart example has a nice way to calculate the total, a separate record that selects and calculates the sum of all the shopping cart rows for the current cart_id. The good thing is that it will show the total for all rows, while you might only be displaying like 10 rows in the grid.

The same example has a purchase button, in which the cart rows are inserted into a order table.
In that you could move any data to any other table.

In Short, After Submit ServerSide for the Grid, you could select all the rows for the current order_id and sum (quantity*price).

Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message
doxtor

Posts: 24
Posted: 09/09/2008, 9:49 PM

Hi Walter..thanks for replying.
sorry not clear on information. I use this example :

http://examples.codecharge.com/ExamplePack/OrderEntry/OrderEntry.php

In that example(order entry), after add some order entry, there will be a total price, which labeled with Total.
In my case, is more like order entry example, but I add some components. They are : Total Price, discount, packaging cost, and grand total.

What I need to do is, after insert or update the order detail, then update other table( table account receivable), to fill total price, discount, packaging cost and grand total.
Table account receivable created when user add the order header. I use after insert event on add order header, use order header ID as foreign key on table account receivable. But of course I can not insert the total price, etc, at first time I make the record( because doesn't know the price yet). So, when user insert the items on order detail, it automatic update account receivable table, where tbl_accountReceivable.order_h_id = order header id.

That's what I mean. I have tried all event on e.grid, but no one work. Hope this explanation more clear that my first post
:-)

Thank you so much
View profile  Send private message
wkempees


Posts: 1679
Posted: 09/10/2008, 5:31 PM

:-)
Bumping you up for my own convenience.
Looking in to this, but pressed for time elswhere.

Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message
doxtor

Posts: 24
Posted: 09/10/2008, 8:16 PM

:-D
View profile  Send private message
doxtor

Posts: 24
Posted: 09/12/2008, 5:59 PM

This really make me crazy..
after few days, still can not found the answers. :-(
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.