Skip to content

ivek81cro/Accounting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Accounting Management System

A comprehensive accounting management system built with .NET, featuring a modular WPF desktop application and RESTful API backend. This system provides complete accounting functionality including journal entries, payroll management, VAT handling, asset tracking, and financial reporting.

πŸ—οΈ Architecture

The solution follows a modular architecture with clear separation of concerns:

  • AccountingUI.WPF - Main WPF desktop application
  • Accounting.Api - RESTful API backend service (.NET 8)
  • Accounting.DataManager - Data access layer with repository pattern
  • AccountingUI.Core - Core business logic and services (.NET 5)
  • Module Projects - Feature-specific modules for modularity

πŸš€ Features

Accounting & Journal

  • Journal Management - Create, edit, and process accounting journal entries
  • General Ledger - Complete ledger with filtering and balance tracking
  • Account Cards - Detailed account history and balance information
  • Book Accounts - Chart of accounts management
  • Balance Sheet - Financial statements and balance sheet generation

Business Operations

  • Purchase Orders (URA) - Incoming goods and purchase invoice processing
    • Retail purchases (Primke)
    • Wholesale operations (Repro)
    • Other operations (Rest)
  • Sales Operations (IRA) - Sales invoice management
    • Retail sales
    • HZZO (Health insurance) operations
  • VAT Management - VAT tracking and reporting
  • Cash Register - Daily cash operations

Human Resources

  • Payroll Module - Complete payroll processing
    • Employee salary calculation
    • Supplements and deductions
    • Payroll archives
    • JOPPD reporting (Croatian tax reporting)
  • Employee Management - Employee records and information
  • Travel Orders - Business travel expense management

Other Modules

  • Partners Module - Customer and supplier management
  • Company Module - Company information and settings
  • Bank Reports - Bank statement processing and reconciliation
  • Assets Module - Fixed asset tracking and depreciation
  • Cities Module - Location and address management
  • Database Backup - Automated backup functionality

πŸ› οΈ Technology Stack

Backend

  • .NET 8 - API backend
  • ASP.NET Core - Web API framework
  • Entity Framework Core - ORM for database access
  • SQL Server - Database
  • Dapper - Micro-ORM for data access layer
  • JWT Authentication - Secure API authentication
  • Swagger/OpenAPI - API documentation

Frontend

  • .NET 5/8 - Desktop application
  • WPF - Windows Presentation Foundation
  • Prism - MVVM framework with DryIoc container
  • AutoMapper - Object-to-object mapping

Additional Libraries

  • ExcelDataReader - Excel file processing
  • Newtonsoft.Json - JSON serialization

πŸ“‹ Prerequisites

  • Visual Studio 2022 or later
  • .NET 8.0 SDK
  • .NET 5.0 SDK
  • SQL Server 2019 or later
  • Windows 10/11 (for WPF application)

βš™οΈ Installation

1. Clone the Repository

git clone https://github.com/ivek81cro/Accounting.git
cd Accounting

2. Database Setup

  1. Create a SQL Server database
  2. Update connection strings in:
    • Accounting.Api/appsettings.json
    • AccountingUI.WPF/appsettings.json
"ConnectionStrings": {
  "AccountingConnStr": "Server=YOUR_SERVER;Database=YOUR_DATABASE;Trusted_Connection=True;"
}
  1. Run Entity Framework migrations:
cd Accounting.Api
dotnet ef database update

3. Configure API Settings

Update appsettings.json in the API project:

{
  "Secret": {
    "SecurityKey": "YOUR_SECURE_KEY_HERE"
  }
}

4. Build the Solution

dotnet restore
dotnet build

πŸš€ Running the Application

Start the API Backend

cd Accounting.Api
dotnet run

The API will be available at http://localhost:5050

Start the WPF Application

  1. Set AccountingUI.WPF as the startup project in Visual Studio
  2. Press F5 or click Start

Alternatively, from command line:

cd AccountingUI.WPF
dotnet run

As Windows Service

The API can be deployed as a Windows Service:

sc create AccountingApiService binPath="C:\path\to\Accounting.Api.exe"
sc start AccountingApiService

πŸ“ Project Structure

Accounting/
β”œβ”€β”€ Accounting.Api/              # REST API backend
β”‚   β”œβ”€β”€ Controllers/             # API endpoints
β”‚   β”œβ”€β”€ Authentication/          # JWT authentication
β”‚   └── Data/                    # EF Core DbContext
β”œβ”€β”€ Accounting.DataManager/      # Data access layer
β”‚   β”œβ”€β”€ DataAccess/              # Repository implementations
β”‚   └── Models/                  # Data models
β”œβ”€β”€ AccountingUI.Core/           # Core business logic
β”‚   β”œβ”€β”€ Services/                # Business services
β”‚   └── Models/                  # Domain models
β”œβ”€β”€ AccountingUI.WPF/           # Main WPF application
β”‚   β”œβ”€β”€ Views/                   # XAML views
β”‚   β”œβ”€β”€ ViewModels/              # View models
β”‚   └── Dialogs/                 # Dialog windows
β”œβ”€β”€ AssetsModule/                # Asset management module
β”œβ”€β”€ BackupModule/                # Database backup module
β”œβ”€β”€ BalanceSheetModule/          # Balance sheet module
β”œβ”€β”€ BankReportsModule/           # Bank statement module
β”œβ”€β”€ BookAccountsModule/          # Chart of accounts module
β”œβ”€β”€ BookIraModule/               # Sales operations module
β”œβ”€β”€ BookJournalModule/           # Journal entry module
β”œβ”€β”€ BookUraModule/               # Purchase operations module
β”œβ”€β”€ CitiesModule/                # Location management module
β”œβ”€β”€ CompanyModule/               # Company settings module
β”œβ”€β”€ EmployeeModule/              # Employee management module
β”œβ”€β”€ LoginModule/                 # Authentication module
β”œβ”€β”€ PartnersModule/              # Partner management module
β”œβ”€β”€ PayrollModule/               # Payroll processing module
β”œβ”€β”€ TravelOrdersModule/          # Travel orders module
└── VATModule/                   # VAT management module

πŸ” Authentication

The system uses JWT (JSON Web Tokens) for API authentication:

  1. Login through the WPF application
  2. Token is automatically managed by the ApiService
  3. All API requests include the Bearer token in headers

πŸ“Š Key Workflows

Processing Purchase Invoices

  1. Import data from Excel file
  2. Review and validate entries
  3. Map accounts using account pairing
  4. Process to journal automatically or manually
  5. Verify double-entry bookkeeping (Dugovna = PotraΕΎna)

Payroll Processing

  1. Enter employee hours and supplements
  2. Calculate payroll with tax deductions
  3. Generate JOPPD reports
  4. Archive processed payroll
  5. Export to journal entries

Journal Entry Management

  1. Create manual or automated journal entries
  2. Review unprocessed journals
  3. Post to general ledger
  4. Generate reports and account cards

πŸ—ƒοΈ Database

The system uses SQL Server with stored procedures for data access. Key tables include:

  • AccountingJournal - Journal entries
  • BookAccounts - Chart of accounts
  • Employees - Employee records
  • Partners - Customers and suppliers
  • Payroll - Payroll transactions
  • VAT - VAT records
  • Assets - Fixed assets

πŸ”§ Configuration

Development vs Production

The application supports environment-specific configuration:

  • appsettings.Development.json - Development settings
  • appsettings.Production.json - Production settings

Localization

  • Default culture: Croatian (hr-HR)
  • Currency: HRK (Croatian Kuna)
  • Date format: dd.MM.yyyy

🀝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ API Documentation

When running in development mode, Swagger UI is available at:

http://localhost:5050/swagger

Key Endpoints

  • /api/Journal - Journal entry operations
  • /api/Payroll - Payroll management
  • /api/Partners - Partner management
  • /api/Employee - Employee management
  • /api/Vat - VAT operations
  • /api/Assets - Asset management
  • /api/Authentication - User authentication

πŸ› Troubleshooting

Connection Issues

  • Verify SQL Server is running
  • Check connection strings in appsettings.json
  • Ensure API service is running on port 5050

Build Errors

  • Restore NuGet packages: dotnet restore
  • Clean and rebuild: dotnet clean && dotnet build
  • Check that both .NET 5 and .NET 8 SDKs are installed

Login Issues

  • Verify user exists in AspNetUsers table
  • Check JWT secret key configuration
  • Ensure API authentication middleware is configured

πŸ“„ License

This project is available under the MIT License (if applicable - add your license file).

πŸ‘€ Author

ivek81cro

πŸ“§ Support

For issues, questions, or contributions, please open an issue on GitHub.


🎯 Future Enhancements

  • Multi-company support
  • Cloud deployment options
  • Mobile application
  • Advanced reporting with Power BI
  • Electronic invoice integration (e-Račun)
  • Advanced analytics dashboard
  • Multi-language support
  • Export to various accounting standards

Note: This is an accounting system primarily designed for Croatian accounting standards and regulations (HZZO, JOPPD, etc.). Adaptation may be required for other jurisdictions.

About

Learning WPF MVVM, API, EF via desktop application project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published