收据/发票数据库 [英] Receipt/invoice database

查看:278
本文介绍了收据/发票数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在建立一个收据/发票数据库 - 我先从发票开始,然后是收据。

我有发票=父母和儿子+收据=父母和儿子表+一张客户表。

我想签发1张收据,包含12笔付款(每年一个月检查1张)然后,每次支票到货时,发票都会打印出来号码。


收据/发票表格之间的关系是什么?如何为每张发票制作相关的收据号码?


谢谢。

I''m building a receipt/invoice database - I''ve started with the invoice first, then the receipt.
I have invoice = parents and sons + receipt = parents and sons tables + a customer table.
I want to issue 1 receipt with 12 payments (1 check for each month of the year) and then, everytime a check comes to delivery, the invoice is printed out with the receipt number.

What would be the relation between the receipt/invoice tables and how do I make the relevant receipt number for each invoice please?

Thanks.

推荐答案

也许我的大脑是瘾的(尽管我最近没有庆祝!)但是


我有发票=父母和儿子+收据=父母和儿子表+客户表"


对我来说绝对没有意义!我认为你真的需要更好地描述你已经拥有的东西。发布元数据信息应该是以下顺序:

表1

FirstFieldName( DataType

SecondFieldName( DataType

ThirdFieldName( DataType

> 表2

FirstFieldName( DataType

SecondFieldName( DataType

ThirdFieldName( DataType


Linq ; 0)>
Perhaps my brain is addled (although I didn''t celebrate last nite!) but

"I have invoice = parents and sons + receipt = parents and sons tables + a customer table"

makes absolutely no sense to me! I think you''re really going to have to do a better job of describing what you already have in place. Posting of meta data info should be something on the order of:

Table1
FirstFieldName (DataType)
SecondFieldName (DataType)
ThirdFieldName (DataType)

Table2
FirstFieldName (DataType)
SecondFieldName (DataType)
ThirdFieldName (DataType)

Linq ;0)>


就像一般的数据库工作一样,我们的想法是你越清楚地提出一个问题,我们所有问题就越少。

并行是这样的接近数据库设计。做得好,整个项目都有好处。做得很邋and,你花费了大部分精力来消除由此产生的问题。

我不想过于苛刻,但正如Linq所说,你的问题可以多做一点思考仔细准备。
Like general database work, the idea is that the more effort you put into asking a question clearly, the less problems we all have over all.
The parallel is so close to database design. Do it properly and the whole project benefits. Do it sloppily and you spend most of your energy clearing up the resultant problems.
I don''t want to be overly harsh, but as Linq says, your question could do with a little more thought and careful preparation.


谢谢朋友,你是对的。

这是我数据库的基本布局:


TBL_CUSTOMER:

CustomerID自动编号主键

姓氏文本

FirstName文本

地址文本

城市文字

邮编文本


发票表:

发票ID自动编号主键

支付此发票的客户ID号

发票日期发票开具的日期/时间

描述文本(或备忘录)这是为了什么

AmountEx此发票的货币金额,不含税。

TaxRate Number(Double)要添加的税率百分比。


Invoice_sons_tbl:

InvoiceID自动编号主键

ID_Item号码谁支付这张发票

Item_description文本这是什么

price_per_unit数字每单位价值

折扣数

数量数字

总和数


TBL_SUB_RECEIPT:

发票ID号

付款文本

银行编号

分行编号

ACC文件

Payment_Date日期


收据表:

ReceiptID自动编号主键

支付此金额的客户ID号

收据日期/收到时间。

金额收到的货币金额。

评论备忘录描述的内容。


我加入了收据表以一对多的方式连接发票表,但是认为最好将两者都加入到客户手中?

谢谢大家。
Thanks friends, you''re right.
Here''s my basic layout of the database :

TBL_CUSTOMER :
CustomerID AutoNumber primary key
Surname Text
FirstName Text
Address Text
City Text
Zip Text

Invoice table:
InvoiceID AutoNumber primary key
CustomerID Number who is to pay this invoice
InvoiceDate Date/Time when the invoice was sent
Descrip Text (or memo) what this is for
AmountEx Currency amount of this invoice, without tax.
TaxRate Number (Double) Percent tax rate to add.

Invoice_sons_tbl:
InvoiceID AutoNumber primary key
ID_Item Number who is to pay this invoice
Item_description text what this is for
price_per_unit Number what each unit worth
Discount Number
Quantity Number
Sum Number

TBL_SUB_RECEIPT :
InvoiceID Number
Payment Text
Bank Number
Branch Number
ACC Text
Payment_Date date

Receipt table:
ReceiptID AutoNumber primary key
CustomerID Number who paid this amount
ReceiptDate Date/Time when received.
Amount Currency amount received.
Comment Memo description of what for.

I joined the receipt table to the invoice table in a one to many connection, but think it might be better to join both to customer perhaps?
Thanks guys.


这篇关于收据/发票数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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