多个订单发票?

编程入门 行业动态 更新时间:2024-10-28 20:18:57
本文介绍了多个订单发票?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我需要一种方法来每月从多个订单创建发票?

在tbl_order表中,我有一个订单列表来自客户。

tbl_order表 OrderID(PK) ShopID(FK) CustomerID(FK) Statu 总计 OrderDate

让我们说,我想创建一个发票,期限为:从$ code> tbl_order.ShopID = 2

发票应该有发票号和发票日期,在发票中会有多个OrderID。

我需要创建发票表,如果是这样的表设计应该是什么?

解决方案

您将需要2张表。

发票表。

InvoiceID(PK) InvoiceDate InvoicePrice InvoiceBtw ect。

订单和发票之间的链接表。 所以你可以跟踪在哪个发票处理哪个订单。

InvoiceID(FK to tbl_invoices.InvoiceID) OrderID(FK to tbl_orders.OrderID)

I need a way to create an invoice from multiple orders every month?

In the tbl_order table, I have a list of orders from the customer.

tbl_order table OrderID (PK) ShopID (FK) CustomerID (FK) Statu Total OrderDate

Let say I want to create an invoice for period: 1 to 31 May from tbl_order.ShopID = 2

(From there, I can an invoice report to a Shop/Company of Commission they owe me, etc. When I do recieved commission from them - I need a way to update invoice status)

The invoice should have Invoice Number and Invoice Date, in the invoice there will be multiple OrderID.

Do I need to create an invoice table, if so what the table design should be?

解决方案

You would need 2 tables.

The invoice table.

InvoiceID (PK) InvoiceDate InvoicePrice InvoiceBtw ect. etc.

An link table between orders and invoices. So you can keep track which order is processed in which invoice.

InvoiceID (FK to tbl_invoices.InvoiceID) OrderID (FK to tbl_orders.OrderID)

更多推荐

多个订单发票?

本文发布于:2023-10-30 12:35:18,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1542863.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:多个   发票   订单

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!