A simple ASP.NET Core MVC application for managing daily customer ledger entries, products, monthly bills, payments, PDF invoices, Excel reports, and monthly bill email sending.
- Admin login using ASP.NET Core Identity
- Customer management
- Product/item management
- Daily item entry for customers
- Monthly bill generation
- Invoice number generation
- Payment tracking: unpaid, partial paid, paid
- PDF invoice download using QuestPDF
- Monthly bill email sending using SMTP/MailKit
- Email log tracking
- Excel report export using ClosedXML
- Business profile/settings page
- Background monthly billing job using Hangfire
- ASP.NET Core MVC (.NET 8)
- Entity Framework Core 8
- SQL Server
- ASP.NET Core Identity
- Hangfire + SQL Server storage
- QuestPDF
- MailKit / MimeKit
- ClosedXML
- Bootstrap / jQuery
DailyLedgerSystem/
├── Controllers/
│ ├── AccountController.cs
│ ├── CustomersController.cs
│ ├── DailyEntriesController.cs
│ ├── DashboardController.cs
│ ├── EmailLogsController.cs
│ ├── MonthlyBillsController.cs
│ ├── PaymentsController.cs
│ ├── ProductsController.cs
│ ├── ReportsController.cs
│ └── SettingsController.cs
├── Data/
│ ├── ApplicationDbContext.cs
│ └── DbInitializer.cs
├── Migrations/
├── Models/
│ ├── ApplicationUser.cs
│ ├── Customer.cs
│ ├── DailyEntry.cs
│ ├── EmailLog.cs
│ ├── MonthlyBill.cs
│ ├── Payment.cs
│ ├── Product.cs
│ └── Setting.cs
├── Services/
│ ├── AutoBillSchedulerService.cs
│ ├── EmailService.cs
│ ├── ExcelExportService.cs
│ ├── MonthlyBillService.cs
│ ├── PdfService.cs
│ └── SettingsService.cs
├── ViewModels/
├── Views/
├── wwwroot/
├── Program.cs
├── appsettings.json
└── DailyLedgerSystem.csproj
Install these before running the project:
- Visual Studio 2022 or later
- .NET 8 SDK
- SQL Server / SQL Server Express / LocalDB
- Git
git clone https://github.com/sonaniharshit/daily-ledger-system.git
cd daily-ledger-systemOpen appsettings.json and update the SQL Server connection string.
For LocalDB:
"ConnectionStrings": {
"DefaultConnection": "Server=(localdb)\\MSSQLLocalDB;Database=DailyLedgerDb;Trusted_Connection=True;TrustServerCertificate=True;"
}For SQL username/password:
"ConnectionStrings": {
"DefaultConnection": "Server=YOUR_SERVER;Database=DailyLedgerDb;User Id=YOUR_USER;Password=YOUR_PASSWORD;TrustServerCertificate=True;"
}Use Gmail App Password or your own SMTP provider.
"SmtpSettings": {
"Host": "smtp.gmail.com",
"Port": 587,
"Username": "your-email@gmail.com",
"Password": "your-app-password",
"FromEmail": "your-email@gmail.com",
"FromName": "Your Store Name"
}Run this from the project folder:
dotnet ef database updateIf EF CLI is not installed:
dotnet tool install --global dotnet-efdotnet runOpen the shown localhost URL in your browser.
The application seeds one admin user on startup.
Email: admin@ledger.com
Password: Admin@123
Change this default password immediately after first login.
## Main Application Flow
1. Login as admin.
2. Add business details from Settings.
3. Add customers.
4. Add products/items.
5. Create daily entries for customers.
6. Generate monthly bill for a customer.
7. Download PDF invoice or send invoice by email.
8. Update payment status.
9. View reports and export Excel.
## Useful Commands
Restore packages:
```bash
dotnet restore
Build project:
dotnet buildRun project:
dotnet runCreate migration:
dotnet ef migrations add MigrationNameUpdate database:
dotnet ef database updateThis project can be published under the MIT License.