Sales
Introduction
The Sales module is a lightweight CRM for lead management inside Damsy ERP. Business development teams record leads, track follow-ups, configure lead types and allowances, and run basic sales reports—all scoped to the logged-in company.
Purpose
Sales supports:
- Lead generation and detail maintenance
- Follow-up scheduling and history
- Lead type and allowance configuration
- Client master reference for sales context
- Sales registration and activity reports
When to Use
Use Sales when you:
- Capture inbound or outbound sales leads
- Document follow-up calls, meetings, or proposals
- Analyze lead pipeline through SalesReport
- Maintain client records tied to lead activity
Sales uses the older header-navbar layout (_SalesShared.cshtml), not the modern sidebar shell found in Payroll or Bills.
Overview / Architecture
The Sales Area (ZSales flag) routes through controllers in Areas/Sales/Controllers/ with DAL classes under DAL/Sales/ and legacy DAL/Sales_A/ duplicates for some lead operations.
Entry URL: /Sales/SalesDashboard/Index
PageID: Sales
Module flag: ZSales
Controllers
| Group | Controller | Primary responsibility |
|---|---|---|
| Dashboard | SalesDashboard | Module home |
| Leads | LeadGenration | New lead capture (spelling preserved) |
| Leads | LeadDetails | Lead detail editing |
| Leads | LeadFollowUp | Follow-up entries |
| Masters | LeadTypeMaster | Lead type catalog |
| Masters | LeadAllowanceDetails | Allowance configuration |
| Masters | ClientMaster | Client reference |
| Reports | SalesReport | Pipeline and activity reports |
Views / Layout
| Asset | Role |
|---|---|
_SalesShared.cshtml | Legacy top navigation shell |
header-navbar styling | Horizontal nav instead of sidebar |
| SalesDashboard views | Entry tiles and summaries |
When extending Sales UI, match the legacy navbar patterns to avoid layout breakage.
DAL
| DAL class | Role |
|---|---|
| SalesRegDash_DAL / SalesRegMaster_DAL | Dashboard and registration |
| LeadDetails_DAL | Lead detail CRUD |
| SalesFolloup_DAL | Follow-up persistence |
| LeadAccounts_DAL | Lead account linkage |
| LeadAllowance_DAL | Allowance rules |
Some lead DALs exist under both DAL/Sales/ and DAL/Sales_A/. Trace the controller using statement when debugging.
Business Objects
| Namespace / type | Role |
|---|---|
| BO.Sales.LeadAllowance_BO | Allowance rows |
| BO.Sales.SalesFollowUp | Follow-up records |
| BO.Sales.LeadAccounts | Lead account linkage |
| BO.Sales_A.* | Legacy parallel types |
Typical Workflow
Lead lifecycle from capture to conversion:
Data Flow
- User creates lead →
LeadDetails_DALinsert SP withCompID. - Follow-ups append timeline rows via
SalesFolloup_DAL. - Masters (type, allowance) constrain dropdowns on forms.
- SalesReport aggregates lead status for the selected period.
Reports
| Report | Controller |
|---|---|
| Sales activity / pipeline | SalesReport |
Crystal or grid output depends on the specific report action implementation.
Permissions
| Gate | Requirement |
|---|---|
| Module flag | dtVerifyUser.ZSales == true |
| Session | Valid CompID |
| Menu permissions | Database menu rows for each screen |
Common Issues
| Symptom | Likely cause |
|---|---|
| Layout CSS mismatch | Sales legacy navbar vs global shell CSS |
| Follow-up not listed | Wrong lead ID or company filter |
| Duplicate lead DAL behavior | Controller bound to Sales_A vs Sales namespace |
| Empty dashboard | No leads for CompID |
Related Pages
- Bills — client billing after conversion
- Registration — workforce onboarding
- Module Routing
Important Notes
LeadGenration is misspelled in the controller name — URLs must match the codebase exactly.
Common Mistakes
| Mistake | Consequence |
|---|---|
| Applying sidebar layout partials from Payroll | Broken Sales pages |
| Creating client only in Sales without Billing setup | Invoicing gaps |
| Skipping follow-up records | Inaccurate pipeline reports |
Next Steps
- Configure LeadTypeMaster and allowances.
- Enter test leads and follow-ups for one branch.
- Run SalesReport and validate counts against lead screens.