如何在插入发票时生成发票号

编程入门 行业动态 更新时间:2024-10-28 02:32:24
本文介绍了如何在插入发票时生成发票号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好, 我为发票创建了一个asp页面, 我必须在之前生成发票#插入。 例如,创建发票表格:

Hi guys, I have created one asp page for invoice, where i have to generate invoice no# before insertion. for eg, creating invoice form:

Date:__________ Invoice# 10012 Item:__________ Description:__________ Qty:__________Remarks:__________ 'Save'

每个新发票,我必须自动增加'发票#'。 怎么做, plzzz帮助/建议我。 谢谢。

on every new invoice, i have to auto increment the 'invoice#'. how to do that, plzzz help/suggest me. thanks.

推荐答案

解决方案: 如果您的表名是InvoiceTbl 就像这样做 1.使InvioceNo列与身份相同(1,1) 2.运行此查询以获取下一个号码: Solution: Like if your table name is InvoiceTbl than do this 1. Make InvioceNo column identical like identity(1, 1) 2. Run this query to get next number: SELECT Max(InvoiceNo) FROM InvoiceTbl

这将返回最大发票号码。 2.在返回的号码上加一(+1)。 3. ave新记录

This will return you max invoice number. 2. Add One (+1) to the returned number. 3. ave the new record

定义字段对于发票中没有作为自动增量的SQL: www.w3schools /sql/sql_autoincrement.asp [ ^ ] Define the field for invoice no in the SQL as auto-increment: www.w3schools/sql/sql_autoincrement.asp[^]

为您的发票表单添加发票号,您可以将其添加到表单的左上角或右上角(例如)。为新发票生成新发票否,您可以创建一个字符串,其中包含数字和字母,每次点击创建发票按钮,您都可以生成新发票,其中包含显示发票类型(买入,卖出或其他)的字母和可以随机创建或订购的数字。 for adding a invoice no for your invoice form you can add it to top-left or top-right of your form(for example). for generating new invoice no for your new invoice you can create a string that has numbers and letters that with every click on create invoice button you can generate new invoice no that has a letter that show invoice type(buy,sell or other) and a number that can created randomly or with order.

更多推荐

如何在插入发票时生成发票号

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

发布评论

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

>www.elefans.com

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