Skip to main content

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
Legacy UI shell

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

GroupControllerPrimary responsibility
DashboardSalesDashboardModule home
LeadsLeadGenrationNew lead capture (spelling preserved)
LeadsLeadDetailsLead detail editing
LeadsLeadFollowUpFollow-up entries
MastersLeadTypeMasterLead type catalog
MastersLeadAllowanceDetailsAllowance configuration
MastersClientMasterClient reference
ReportsSalesReportPipeline and activity reports

Views / Layout

AssetRole
_SalesShared.cshtmlLegacy top navigation shell
header-navbar stylingHorizontal nav instead of sidebar
SalesDashboard viewsEntry tiles and summaries

When extending Sales UI, match the legacy navbar patterns to avoid layout breakage.

DAL

DAL classRole
SalesRegDash_DAL / SalesRegMaster_DALDashboard and registration
LeadDetails_DALLead detail CRUD
SalesFolloup_DALFollow-up persistence
LeadAccounts_DALLead account linkage
LeadAllowance_DALAllowance rules
Duplicate namespaces

Some lead DALs exist under both DAL/Sales/ and DAL/Sales_A/. Trace the controller using statement when debugging.

Business Objects

Namespace / typeRole
BO.Sales.LeadAllowance_BOAllowance rows
BO.Sales.SalesFollowUpFollow-up records
BO.Sales.LeadAccountsLead account linkage
BO.Sales_A.*Legacy parallel types

Typical Workflow

Lead lifecycle from capture to conversion:

Data Flow

  1. User creates lead → LeadDetails_DAL insert SP with CompID.
  2. Follow-ups append timeline rows via SalesFolloup_DAL.
  3. Masters (type, allowance) constrain dropdowns on forms.
  4. SalesReport aggregates lead status for the selected period.

Reports

ReportController
Sales activity / pipelineSalesReport

Crystal or grid output depends on the specific report action implementation.

Permissions

GateRequirement
Module flagdtVerifyUser.ZSales == true
SessionValid CompID
Menu permissionsDatabase menu rows for each screen

Common Issues

SymptomLikely cause
Layout CSS mismatchSales legacy navbar vs global shell CSS
Follow-up not listedWrong lead ID or company filter
Duplicate lead DAL behaviorController bound to Sales_A vs Sales namespace
Empty dashboardNo leads for CompID

Important Notes

Spelling in routes

LeadGenration is misspelled in the controller name — URLs must match the codebase exactly.

Common Mistakes

MistakeConsequence
Applying sidebar layout partials from PayrollBroken Sales pages
Creating client only in Sales without Billing setupInvoicing gaps
Skipping follow-up recordsInaccurate pipeline reports

Next Steps

  1. Configure LeadTypeMaster and allowances.
  2. Enter test leads and follow-ups for one branch.
  3. Run SalesReport and validate counts against lead screens.