Print Page | Close Window

simple stock card

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=1649
Printed Date: 28 March 2026 at 11:14pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: simple stock card
Posted By: ngaisteve1
Subject: simple stock card
Date Posted: 07 April 2003 at 12:20am

Once again this is about my inventory system.

Date              IN        OUT       Balance

                                            20

2003/04/01     5                      25

2003/04/04                 5          20

2003/04/20                 10        10

2003/04/29     3                      13



So, I got 2 recordset

1. rs_stock_receiving (for IN column)
2. rs_stock_issue (for OUT colum)

The sort is from the beginning of the month until end of the month.

I got the first balance column field right but total up the all the same stock code plus all stock receiving minus stock issue

Balance = (addition of all stock which received before the selected month) - (addition of all stock which issued out before the selected month

Problem is to get the first record which is the earliest and loop the 2 tables until end.

So, in this situation, what is the best to do? Many thanks




Replies:
Posted By: Auritania
Date Posted: 10 April 2003 at 2:15pm
Can you make a single new recordset based on a query of the joined tables?


Posted By: Auritania
Date Posted: 10 April 2003 at 2:30pm
Is it possible to restructure your tables? It would seem that 1 table would be able to accomplish your inventory fairly well.


Posted By: ngaisteve1
Date Posted: 10 April 2003 at 7:49pm

I think it is fine already Auritania. Right now, I managed to get all the records displayed correctly except the last record.

Code is in http://www.htmlforums.com/attachment.php?s=&postid=149347 - http://www.htmlforums.com/attachment.php?s=&postid=149347




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net