Take the price and units and calculate automatically the total price

[SIZE=3][FONT=Times New Roman]Hey everyone,[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]I would like to know if it is possible in flex to do the following actions.[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]I have made an HTTPService to a MySQL database, table: orders_open and it has columns[/FONT][/SIZE]
[FONT=Times New Roman][SIZE=3] [/SIZE][/FONT]
[SIZE=3][FONT=Times New Roman]Id | product | price | units | total_price | customer | waiter | printed | paid_cash | paid_card | date[/FONT][/SIZE]
[FONT=Times New Roman][SIZE=3] [/SIZE][/FONT]
[SIZE=3][FONT=Times New Roman]The datagrid is filtered by the customer column. Default value of | printed | paid_cash | paid_card is 0[/FONT][/SIZE]
[FONT=Times New Roman][SIZE=3] [/SIZE][/FONT]
[SIZE=3][FONT=Times New Roman]1)How can I make flex take the price and units and calculate automatically the total_price? In the datagrid and update the database lines when I save.[/FONT][/SIZE]
[FONT=Times New Roman][SIZE=3] [/SIZE][/FONT]
[SIZE=3][FONT=Times New Roman]2) Sum up all filtered total_price ‘s and give the bill_total in a text field[/FONT][/SIZE]
[FONT=Times New Roman][SIZE=3] [/SIZE][/FONT]
[SIZE=3][FONT=Times New Roman]3) When paid, print the ticket | product | price | units | total_price | and the bill_total [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]in a printer [/FONT][/SIZE]
[FONT=Times New Roman][SIZE=3] [/SIZE][/FONT]
[SIZE=3][FONT=Times New Roman]Can you help me on my way with a link or a code example?[/FONT][/SIZE]
[FONT=Times New Roman][SIZE=3] [/SIZE][/FONT]
[SIZE=3][FONT=Times New Roman]My code has been created by Flex (create application from database)[/FONT][/SIZE]