This topic is locked

Inventory System

10/30/2008 12:06:19 PM
PHPRunner General questions
Z
zebex author

Hi,
Im developing an Inventory System for our supply office. The current db structure of my system is as follows:
Table 1 ---- Inventories

Field Names: InvID (Primary key and autoincrement)

Invt_type

Article

Description
Table 2 ---- Inventories Details

Field Names: InvdetID

Date

Location

Status

Unit

Qty

Value

Total Value
Table 3 ----- Inventories Level

Field Names: InvLvlID

StockLevel
Master & Child link is hooked up between TABLE1 and TABLE 2 via InvID.
Here is my problem, I want to store all qty values entered from Table 2 to save in Stocklevel field of Table 3. As a way of tracking the stock level of Table 2. I've been browsing some examples of SUM, Calculations topics in this forum, but not

were closed to my situation.
Kinda stuck with this. Hope you can help.
If I need to post it to the demo acct, pls advise so.
Thnks

Sergey Kornilov admin 10/30/2008

You need to implement the following events for Table2: BeforeDelete, BeforeEdit and BeforeAdd.
Each event basically does the same job calculating sum(qty) for the current InvID and storing this value in Table 3. Tables 2 and 3 must be related some way probably using the same InvID.

Z
zebex author 10/31/2008

You need to implement the following events for Table2: BeforeDelete, BeforeEdit and BeforeAdd.

Each event basically does the same job calculating sum(qty) for the current InvID and storing this value in Table 3. Tables 2 and 3 must be related some way probably using the same InvID.


Table 2 and 3 are related thru InvID. I got a parse error, when I inserted the code in BeforeDelete, BeforeEdit, BeforeAdd.
Here is my code snippet:
;
Kinda new to php.

Sergey Kornilov admin 10/31/2008

It's more complicated than that.
You need to execute SQL query that pulls sum of quantities from table2. Once you have the sum you need to update table3 with this sum.
You can post your application to Demo Account (last screen in PHPRunner) and send the URL to support@xlinesoft.com.

Z
zebex author 10/31/2008

It's more complicated than that.

You need to execute SQL query that pulls sum of quantities from table2. Once you have the sum you need to update table3 with this sum.
You can post your application to Demo Account (last screen in PHPRunner) and send the URL to support@xlinesoft.com.


Done. The url is has been send to support@xlinesoft.com.
Hope you can help me with this.