Vb.net Billing Software Source Code Access

e.Graphics.DrawString("INVOICE", New Font("Arial", 16, FontStyle.Bold), Brushes.Black, e.MarginBounds.Left, y) y += 40 e.Graphics.DrawString("Bill No: " & billID, font, Brushes.Black, e.MarginBounds.Left, y) y += 20 ' Draw more lines – customer details, items grid, totals... End Sub

BillID (AutoNumber, PK) BillDate (Date/Time) CustomerID (Number) Subtotal (Currency) TaxAmount (Currency) DiscountAmount (Currency) GrandTotal (Currency) vb.net billing software source code

Private Sub PrintDocument1_PrintPage(sender As Object, e As PrintPageEventArgs) Handles PrintDocument1.PrintPage Dim font As New Font("Arial", 10) Dim y As Single = e.MarginBounds.Top totals... End Sub BillID (AutoNumber

Private Sub btnNewBill_Click(sender As Object, e As EventArgs) Handles btnNewBill.Click ResetBill() End Sub CDec(row.Cells("colTotal").Value)) End If Next

Dim taxRate As Decimal = 5.0 ' 5% GST Dim taxAmount As Decimal = subtotal * (taxRate / 100) Dim discount As Decimal = nudDiscount.Value Dim grandTotal As Decimal = subtotal + taxAmount - discount

dgvItems.Rows.Add(productID, productName, qty, price, total) CalculateTotals() End Sub

' Save Bill Items For Each row As DataGridViewRow In dgvItems.Rows If Not row.IsNewRow Then SaveBillItem(billID, CInt(row.Cells("colProductID").Value), CInt(row.Cells("colQty").Value), CDec(row.Cells("colPrice").Value), CDec(row.Cells("colTotal").Value)) End If Next