Subject Re: SQL or Array Rowset ?
From Akshat Kapoor <akshat.kapoor@kapoorsons.in>
Date Tue, 6 Apr 2021 19:35:49 +0530
Newsgroups dbase.getting-started

Good Evening Mervyn,

> Robbie's problem is a bit more complicated but this is a good starting
> point.  Although there's a school of thought that holds that one should
> never save a value which can be calculated there are cases, such as this
> one, where keeping a running total can save time in presenting results.
>
> There are so many unknown factors to take into account not the least of
> which is how long does it take to get stock.

It will take some time to process and this time which seems
insignificant at start will keep on increasing with increase in data.
My personal preference is to store 2 columns
1 - Opening stock so that I can check what was the starting figure.
2- Current stock for easy requery.

> If you have 15 items in stock you can issue a quotation for, say 10, for
> immediate delivery.   Unless you can replace stock immediately you can't
> sell the 10 items or issue another quotation for more than 5 items
> during the validity of the quotation.  Your list would, therefore, also
> need a column for reserved items.

>
> If it takes, say, a month to replace stock you can now only issue a
> quotation for 10 items for delivery in a month's time provided you place
> an order on your supplier for 10 units assuming you need a minimum of 5
> items in stock for "walk in" customers.  If neither quotation is
> accepted you sit with 25 items in stock.  Can you afford to have so much
> cash tied up in stock?
>
> The alternative is to issue the second quotation valid for a month but
> only delivered a month after acceptance with the possibility of earlier
> delivery if the initial quote is not accepted.  Great if the customer
> will accept those terms.  It is, of course, quite likely that the
> customer will shop elsewhere.

How much to invest in stock is a damn difficult question and can never
be answered in black and white.

And a lot of it depends on the trade also.

A person dealing in steel bars has limited sku's and the same sku's keep
on repeating. You only have to consider seasonal variations.

In the apparel business fashion design sku's change every quarter. So
practically not possible to predict which design will be the best seller.

In the late 90's I used to have a column of minimum stock. So that just
checking what item is below that quantity can easily be ordered. But it
was a PITA maintaining the column with seasonal variations AND

(this is managers point of view) I have 2 products A & B which are
almost equivalent.

For some reason B is running low in stock but have more than ample stock
of A. If I run the report of just short Items I will order B but if I
view complete stock I will not order B as I know till B is in stock A
will not sell AND I know I need to clear stock of A before reordering B.
And this happens quiet often when companies bring out a better version
or reduce rates of new version.

So I cannot say to Robbie that you DO introduce this column in your
tables. It is his decision to implement or not depending upon requirement.

Regards
Akshat