This topic is locked

Calculate total on the fly

10/3/2011 3:10:12 PM
PHPRunner General questions
C
CRBM author

Hi, I need to calculate multiple value on the fly. Here is the two tables I need to "merge"

_

tbl_rcv_commandes :

tbl_rcv_commandes.ID,

tbl_rcv_commandes.REQ, (refer to tbl_rcv_REQ.ID)

tbl_rcv_commandes.Quantite,

tbl_rcv_commandes.Prix,

(Quantite Prix) AS SousTotal,

(Quantite
Prix) 0.05 AS TPS,

(Quantite
Prix) 0.08925 AS TVQ,

(Quantite
Prix) 0.13925 + (Quantite Prix) AS GrandTotal,
tbl_rcv_REQ :

tbl_rcv_REQ.ID,

tbl_rcv_REQ.Transport,

tbl_rcvREQ.AutresFrais,


  • In the tbl_rcv_commandes table, I calculate on the fly the taxes on my item and calculate the quatity price on the fly too as the GrandTotal.
  • In the tbl_rcv_REQ, I put the Shipping Cost and Other Cost for the whole commande that contain the items assicated in the tbl_rcv_commandes table.
    What I want to do is to import the value of tbl_rcv_REQ.Transport and tbl_rcv_REQ.AutresFrais in the Printer-friendly page of the tbl_rcv_commandes table. After that, calculate the GrandTotal + tbl_rcv_REQ.Transport + tbl_rcv_REQ.AutresFrais and put the result on the same page as the last GrandTotal but for the whole commande and not by item.


I can send the project to the support if needed.

Thanks !

Sergey Kornilov admin 10/3/2011

It looks like you need to implement one of events (BeforeDisplay) where you can retrieve values from other related tables and calculate a grand total.
If you have a valid support contract post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.