10.
CI/CD - ERP Distribution / Build & Deploy Frontend (pull_request) Failing after 13m39s
CI/CD - ERP Distribution / Build & Deploy Backend (pull_request) Failing after 15m1s

Implementation
A partner, not just software
HexDive Technologies' local team handles setup, data migration, training and ongoing support — in Sinhala, Tamil and English. [confirm]

1
Discovery
Map your network, products and processes.

2
Configuration
Set up depots, pricing, schemes, routes and users.

3
Migration & training
Move your data and train every team.

4
Go-live & support
Dedicated account manager and local support desk.
This commit is contained in:
Kalana B. Thilakarathna
2026-10-22 17:47:49 +05:30
parent 6e4bebb89b
commit c775146b64
52 changed files with 12003 additions and 53 deletions
@@ -0,0 +1,50 @@
using Distribution.Data;
using Distribution.Models;
using Microsoft.EntityFrameworkCore;
namespace Distribution.Features.Expense;
public class ExpenseRepository(AppDBContext context) : IExpenseRepository
{
private IQueryable<Models.Expense> Base() =>
context.Expenses
.Include(e => e.Category!).ThenInclude(c => c.Parent)
.Include(e => e.Warehouse)
.Include(e => e.Vendor)
.Include(e => e.ChequePage)
.Include(e => e.Attachments.Where(a => a.IsActive));
public async Task<Models.Expense?> GetByIdAsync(Guid id) =>
await Base().FirstOrDefaultAsync(e => e.Id == id && e.IsActive);
private IQueryable<Models.Expense> Filtered(
ExpenseStatus? status, Guid? categoryId, Guid? warehouseId, DateTime? from, DateTime? to) =>
Base()
.Where(e => e.IsActive)
.Where(e => !status.HasValue || e.Status == status)
.Where(e => !categoryId.HasValue
|| e.FK_CategoryId == categoryId
|| e.Category!.FK_ParentCategoryId == categoryId)
.Where(e => !warehouseId.HasValue || e.FK_WarehouseId == warehouseId)
.Where(e => !from.HasValue || e.BillDate >= from)
.Where(e => !to.HasValue || e.BillDate <= to);
public async Task<List<Models.Expense>> ListAsync(
ExpenseStatus? status, Guid? categoryId, Guid? warehouseId, DateTime? from, DateTime? to,
int page, int pageSize) =>
await Filtered(status, categoryId, warehouseId, from, to)
.OrderByDescending(e => e.BillDate)
.Skip((page - 1) * pageSize)
.Take(pageSize)
.ToListAsync();
public async Task<int> CountAsync(
ExpenseStatus? status, Guid? categoryId, Guid? warehouseId, DateTime? from, DateTime? to) =>
await Filtered(status, categoryId, warehouseId, from, to).CountAsync();
public async Task AddAsync(Models.Expense entity) =>
await context.Expenses.AddAsync(entity);
public void Update(Models.Expense entity) =>
context.Expenses.Update(entity);
}