Subject Re: SQL or Array Rowset ?
From Mervyn Bick <invalid@invalid.invalid>
Date Tue, 6 Apr 2021 10:49:23 +0200
Newsgroups dbase.getting-started

On 2021/04/06 09:21, Akshat Kapoor wrote:

> Sorry Robbie Have not been able to devote time to this issue as busy
> with some other non computer work.
>
> But as Bruce has mentioned making calculations and displaying data at
> the same time could be an issue.
>
> On a side note why not store current inventory in a table.
> My only app is a inventory and accounts control package.
>
> I store the current inventory info in a different column. All pieces
> sold are instantly deducted and purchased qty are updated.
>
> So when I have to view current inventroy I just have to view the
> required column data.

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.

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.

Mervyn.