单品库存? [英] Single item inventory?

查看:57
本文介绍了单品库存?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



愚蠢的问题,但是这里有。


有人要我设计一个数据库来跟踪燃油交付

和订单/发货。基本上,他会从一些

供应商那里购买燃料,然后再转售。我假设这是一个通用产品,所以

我会有像借记/贷记系统。交货增加

库存并减少现金,销售则相反。这就是

简单如,,,


tblStockChange

------------ ----------

TransactionID

TransactionType(购买/销售/写作)---损失燃料的核销或

类似的东西(?)

TransactionDate

FuelAmount

PricePerUnit

ClientID

或者,或者购买另一张桌子,购买另一张桌子会更好吗? (可能是这样)。

如果我这样做了,到目前为止我如何得到总计燃料?

(参见Allen的网站上他的QuantityOnHand演示?)考虑一下,

我应该只是让销售和购买表联合

兼容,然后执行类似报告的运行总计

联合查询。当然,我必须将库存乘以-1才能获得

的流出量。


我是在正确的轨道上还是完全无能为力?

(嗯......我们都不知道......到目前为止你尝试了什么?它有用吗?如果没有b $ b,那么你工作的不行你的代码在哪里?你的

报告设计?)


谢谢,

Pieter

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

推荐答案

pi ****** **@hotmail.com 写道:


< snip>
pi********@hotmail.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.


我看不出有任何理由需要单独的销售表和购买。用你所说的

,两者的字段几乎相同,所以

不会浪费任何空间或任何东西。将

数据与查询分开似乎比将不同的表放在一起要容易得多。

我的2美分

< pi ** ******@hotmail.com>在消息中写道

news:11 ********************** @ g43g2000cwa.googlegr oups.com ...
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********@hotmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...

愚蠢的问题,但是这里有。

有人要我设计一个数据库来跟踪燃料交付和订单/货物。基本上,他会从一些供应商处购买燃料然后再转售。我假设这是一个通用产品,所以
我会有像借记/贷记系统。交货增加了库存并减少了现金,而销售却恰恰相反。所以这就像

tblStockChange
----------------------
TransactionID
TransactionType(购买/销售/写作)---丢失燃料的注销或
类似的东西(?)
TransactionDate
FuelAmount
PricePerUnit
ClientID

或者为销售提供一张桌子和购买另一张桌子会更好吗? (可能是这样)。
如果我这样做了,到目前为止我怎么能得到总计的燃料?
(参见Allen的网站上他的QuantityOnHand演示?)想一想,<我应该只是让Sales和Purchases表联合兼容,然后执行像报表一样运行联合查询的事情。当然,我必须将库存乘以-1才能流出。

我是在正确的轨道还是完全无能为力?
(嗯......我们不要不知道......到目前为止你尝试了什么?它有用吗?如果没有,那么你期望的是什么不起作用?你的代码在哪里?你的
报告设计?)

谢谢,
Pieter
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



这就是我的想法。然后我会有一份报告,它已经运行了

总和,这将告诉我现金账户和我的燃料中的余额

" account"。

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".


这篇关于单品库存?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆