473,806 Members | 2,771 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Single item inventory?

Hi,
Stupid question, but here goes.

Someone wants me to design a database to keep track of fuel deliveries
and orders/shipments. Essentially, he'll purchase fuel from some
supplier and then resell it. I'm assuming this is a generic product, so
I would have something like a debit/credit system. Deliveries increase
stock and decrease cash, and sales do the opposite. So is this as
simple as,,,

tblStockChange
----------------------
TransactionID
TransactionType (Purchase/Sale/WriteOff) --- writeoff for lost fuel or
something like that(?)
TransactionDate
FuelAmount
PricePerUnit
ClientID

Or would it be better to have one table for sales and another for
purchases? (Probably so).
If I did that, how would I get a running total of fuel on hand by date?
(see Allen's website for his QuantityOnHand demo?) Thinking about it,
I should probably just make the Sales and Purchases tables union
compatible and then do something like a report doing a running total of
the union query. Of course, I'd have to multiply stock by -1 for
outflows.

Am I on the right track or completely clueless?
(Umm... we don't know... what have you tried so far? has it worked? If
not, what's not working that you expect to be? Where's your code? Your
report design?)

thanks,
Pieter

Nov 30 '05 #1
14 1715
rkc
pi********@hotm ail.com wrote:

<snip>
Am I on the right track or completely clueless?
(Umm... we don't know... what have you tried so far? has it worked? If
not, what's not working that you expect to be? Where's your code? Your
report design?)


I think where's your report design is the right question to ask. I don't
know how you can possibly know what data you need to store or in what
form you need to store it if someone hasn't thought about what you need
to see on a page as an end result.
Nov 30 '05 #2
I can't see any reason to have separate tables for sales and purchases. With
what you've said, the fields will be pretty much the same for both, so there
won't be any wasted space or anything. It seems a lot easier to separate the
data with queries than to put together different tables.
my 2 cents
<pi********@hot mail.com> wrote in message
news:11******** **************@ g43g2000cwa.goo glegroups.com.. .
Hi,
Stupid question, but here goes.

Someone wants me to design a database to keep track of fuel deliveries
and orders/shipments. Essentially, he'll purchase fuel from some
supplier and then resell it. I'm assuming this is a generic product, so
I would have something like a debit/credit system. Deliveries increase
stock and decrease cash, and sales do the opposite. So is this as
simple as,,,

tblStockChange
----------------------
TransactionID
TransactionType (Purchase/Sale/WriteOff) --- writeoff for lost fuel or
something like that(?)
TransactionDate
FuelAmount
PricePerUnit
ClientID

Or would it be better to have one table for sales and another for
purchases? (Probably so).
If I did that, how would I get a running total of fuel on hand by date?
(see Allen's website for his QuantityOnHand demo?) Thinking about it,
I should probably just make the Sales and Purchases tables union
compatible and then do something like a report doing a running total of
the union query. Of course, I'd have to multiply stock by -1 for
outflows.

Am I on the right track or completely clueless?
(Umm... we don't know... what have you tried so far? has it worked? If
not, what's not working that you expect to be? Where's your code? Your
report design?)

thanks,
Pieter

Nov 30 '05 #3
that's what I was thinking. Then I'd have a report that did a running
sum, which would tell me the balance in my cash account and in my fuel
"account".

Nov 30 '05 #4
Pieter,

I used to work for a large oil company. You say single item inventory; are
you sure??

Look at a gas station. There are usually three different octane gasolines.
Each is a different product. Then there is Kerosene and it comes in
different grades. There is Diesel Fuel for the big trucks in different
grades and there is home heating oil in different grades. There is aviation
fuel and the list goes on. Just suggesting that maybe you do not have a
single item inventory after all.
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdata sheet.com
www.pcdatasheet.com

Over 1000 Access users have come to me for help. My fees are very
reasonable.

<pi********@hot mail.com> wrote in message
news:11******** **************@ g43g2000cwa.goo glegroups.com.. .
Hi,
Stupid question, but here goes.

Someone wants me to design a database to keep track of fuel deliveries
and orders/shipments. Essentially, he'll purchase fuel from some
supplier and then resell it. I'm assuming this is a generic product, so
I would have something like a debit/credit system. Deliveries increase
stock and decrease cash, and sales do the opposite. So is this as
simple as,,,

tblStockChange
----------------------
TransactionID
TransactionType (Purchase/Sale/WriteOff) --- writeoff for lost fuel or
something like that(?)
TransactionDate
FuelAmount
PricePerUnit
ClientID

Or would it be better to have one table for sales and another for
purchases? (Probably so).
If I did that, how would I get a running total of fuel on hand by date?
(see Allen's website for his QuantityOnHand demo?) Thinking about it,
I should probably just make the Sales and Purchases tables union
compatible and then do something like a report doing a running total of
the union query. Of course, I'd have to multiply stock by -1 for
outflows.

Am I on the right track or completely clueless?
(Umm... we don't know... what have you tried so far? has it worked? If
not, what's not working that you expect to be? Where's your code? Your
report design?)

thanks,
Pieter

Nov 30 '05 #5
Good point. But then the design would just become more like a normal
DB.

The more I think about it, the more I think I should make separate
"sale" and "purchase" tables and just make them union-compatible. Then
in the query, just do the math to adjust the sales to be "plus cash,
minus fuel" and the purchases to be the reverse. Then I need to just
add a field for fuel type, because as you say, diesel fuel and airplane
fuel are not interchangeable .

Bear with me - I'm still teasing the complexity of this thing out. So
this represents my somewhat simple understanding of the whole thing.

Maybe I'm better off splitting the two tables and then I can have
normal "Supplier" and "Customer" tables and their related "Purchase
Order" and "Invoice" tables. Then everything follows a pretty much
standard design.

Purchased [X] qty/volume of [product] on [date] from [vendor] at
[price]

Sold [X] qty/volume of [product] on [date] to [Customer] at [price]

Then as long as my tables are reasonably union compatible, I can get a
normal running sum.

Thanks for the input!
Pieter

Nov 30 '05 #6

"PC Datasheet" <no****@nospam. spam> schreef in bericht news:u_******** ******@newsread 3.news.atl.eart hlink.net...
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdata sheet.com
www.pcdatasheet.com

Over 1000 Access users have come to me for help. My fees are very
reasonable.


Steve is a notorious job hunter here, always trying to sell his services.
But before you intend to do business with him look at:
http://home.tiscali.nl/arracom/whoissteve.html

Arno R
Nov 30 '05 #7
Why don't you take Salad's advise and grow up and get a life and quit
sending emails to my office.

"If you have anything to contribute to the group, contribute. Your war
with Datasheet is simply pissing and moaning in the wind for the sake of
nothing. Grow up and get a life."

Salad

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdata sheet.com
www.pcdatasheet.com

Over 1000 Access users have come to me for help. My fees are very
reasonable.

"StopThisAdvert ising" <StopThisAdvert ising@DataShit> wrote in message
news:43******** **************@ text.nova.plane t.nl...

"PC Datasheet" <no****@nospam. spam> schreef in bericht
news:u_******** ******@newsread 3.news.atl.eart hlink.net...
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdata sheet.com
www.pcdatasheet.com

Over 1000 Access users have come to me for help. My fees are very
reasonable.


Steve is a notorious job hunter here, always trying to sell his services.
But before you intend to do business with him look at:
http://home.tiscali.nl/arracom/whoissteve.html

Arno R
Nov 30 '05 #8
get ready for the storm
"PC Datasheet" <no****@nospam. spam> wrote in message
news:jO******** ********@newsre ad3.news.atl.ea rthlink.net...
Nov 30 '05 #9
pi********@hotm ail.com wrote:
The more I think about it, the more I think I should make separate
"sale" and "purchase" tables and just make them union-compatible. Then


I wouldn't. The question is, what is the data entity here? It's the
inventory. As Steve says, that inventory is not likely one item, but
regardless, whether or not it is one generic fuel or various types, the
nature of the types of inventory has no real bearing on the nature of
the data entity you're considering.

A sale takes from the inventory, a purchase adds to the inventory, ie,
they are both the same, just one positive, the other negative.

I think it's silly to have two separate tables for this and I'm
perplexed why someone like you who has contributed a lot to the group
would even consider it. 8) Maybe this is a new area for you? Perhaps
there's more to it than I see?

One table to rule them all, one table to find them... etc, etc.

--
Tim http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me
Nov 30 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
5142
by: Zhang Le | last post by:
Hello, Is there a quick way to replace the content of a single item in tkinter's listbox? Currently my solution is to first delete the item, then insert a new item at the same position. I think there may be better way. Zhang Le
12
5130
by: Dennis Plöger | last post by:
Hi all! I'm currently having some problems parsing a char array in c++. (And yes, I'm a half-newbie ;-)) Perhaps you can help me with this: #include <iostream> using std::cout; void outchar(char *outcharstring)
7
44250
by: Bob | last post by:
I've done this before, but can't find the simple code that allows this. I have a multiple item drop down created in a form with FrontPage 2002. I want to highlight or bold selected items, but not ALL the items. The simple <b>BOLD</b> doesn't cut it. There is another simple code that allows for this, highlighting, etc. Anyone know it?
2
1057
by: Gary Brown | last post by:
Hi, I am populating a sorted listbox. If there is a single item it is not displayed. Set the "sorted" property to false and the item shows. Is this a bug or an obscure feature? Is there a fix or workaround? MS DE 7.1.3088 MS .NET Framework 1.1.4322 XPsp1
0
1090
by: Steve Teeples | last post by:
I have a sorted listbox. When just one item is in the collection the item will not appear in my displayed list. If I remove the sort option then the item is displayed correctly. If I have multiple items in the collection then sorted works as expected. I have the latest service pack installed for .NET Frameworks 1.1. I am using Windows XP SP2. Do you have any idea why this would happen? -- Steve
1
1645
by: TPK | last post by:
Here is what I want to do with javascript. On a page with text place a javascript link that: 1) When a user clicks the link (onClick) a new browser window opens (the easy part) NewWindow = window.open("windowpage.html","newWin","width=100,height=100") 2) Once the window is open I want to pull a specific item from a list of items (array) and populate the open window with only that item. The
5
1832
by: yancheng.cheok | last post by:
hello, may i know how i can determine whether a pointer is pointing to an array or a single item during runtime? this is because in certain situation, i need to determine whether to use delete or delete to deallocate the item(s) ponting by the pointer. also, is there any way to determine whether the allocated memory pointed by the pointer is allocated through new or c version calloc/ malloc?
0
9598
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10623
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10371
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10373
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6877
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5546
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5683
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3852
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3010
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.