Skip to content

Sales Projects

Backlog fieldValue
Story IDAP-SAL-013
EpicSales
Story typeBusiness workflow
Review statusDraft - business analyst and business owner review required
Source evidenceAppsPortal.Apis controller, application command/query handlers, validators, domain entities, and matching MFE workflow where available
Last source review2026-07-10

User story

As project sales users, I want to maintain sales projects and issue project invoices so that project-based revenue and customer balances are traceable.

Acceptance criteria

  1. Only authorized users can view or execute the feature's actions.
  2. Required business data, active dependencies, tenant/branch scope, and current document state are validated.
  3. Invalid requests return actionable validation errors without applying a partial change.
  4. Search, list, view, print, and export operations use the same authorized business scope.
  5. Material create, edit, status, approval, posting, reversal, and integration actions are auditable where applicable.
  6. Financial or stock effects are applied atomically and no more than once.

Business rules

Required

Project code/name, customer, effective status/dates, and responsible scope are required; project invoices require eligible project and billing lines.

Optional or conditional

Budget, milestones, terms, team, attachments, and notes are optional/conditional.

Action behavior

Project Save creates no GL; Project Invoice Post follows Sales Invoice accounting, balances, tax, and credit rules.

Blocking rule or downstream effect

Closed/cancelled projects cannot accept new billing beyond policy.

Frontend page coverage

The following UI coverage is sourced from the pulled MFE route configuration. A Module-level supporting artifact mapping is evidence of a reachable screen, but requires BA confirmation that it belongs to this story rather than a more specific feature story.

Route/pageComponentModeRoute permission/guardMapping confidenceSource
(module default)ProjectInvoiceListComponentList/navigationPermission: AppSalesPermissions.ProjectInvoice_List; Guards: PolicyAuthGuardExplicit frontend feature ruleapps/sales/src/app/remote-entry/transaction/transaction.module.ts:347
add/:projectIdAddProjectInvoiceComponentAddPermission: AppSalesPermissions.ProjectInvoice_Add; Guards: PolicyAuthGuardExplicit frontend feature ruleapps/sales/src/app/remote-entry/transaction/transaction.module.ts:357
edit/:projectIdEditProjectInvoiceComponentEditPermission: AppSalesPermissions.ProjectInvoice_Edit; Guards: PolicyAuthGuard, preventPostedGuardExplicit frontend feature ruleapps/sales/src/app/remote-entry/transaction/transaction.module.ts:367
project-invoiceMainProjectInvoiceComponentList/navigationPermission: AppSalesPermissions.ProjectInvoice_List; Guards: PolicyAuthGuardExplicit frontend feature ruleapps/sales/src/app/remote-entry/transaction/transaction.module.ts:338
view/:idViewProjectInvoiceComponentView/detailPermission: AppSalesPermissions.ProjectInvoice_View; Guards: PolicyAuthGuardExplicit frontend feature ruleapps/sales/src/app/remote-entry/transaction/transaction.module.ts:378

Observed frontend fields and validation

ComponentControlObserved frontend ruleComponent source
EditInvoiceLinesTableComponentitemValueVisible control; optional or API-dependentapps/sales/src/app/remote-entry/transaction/pages/project-invoice/edit-project-invoice/edit-invoice-lines-table/edit-invoice-lines-table.component.ts
EditInvoiceMainInfoComponentdescriptionVisible control; optional or API-dependentapps/sales/src/app/remote-entry/transaction/pages/project-invoice/edit-project-invoice/edit-invoice-main-info/edit-invoice-main-info.component.ts
EditInvoiceMainInfoComponentinvoiceDateVisible control; optional or API-dependentapps/sales/src/app/remote-entry/transaction/pages/project-invoice/edit-project-invoice/edit-invoice-main-info/edit-invoice-main-info.component.ts
EditInvoiceMainInfoComponenttaxIdVisible control; optional or API-dependentapps/sales/src/app/remote-entry/transaction/pages/project-invoice/edit-project-invoice/edit-invoice-main-info/edit-invoice-main-info.component.ts
EditInvoiceMainInfoComponentvatPercentageVisible control; optional or API-dependentapps/sales/src/app/remote-entry/transaction/pages/project-invoice/edit-project-invoice/edit-invoice-main-info/edit-invoice-main-info.component.ts
InvoiceLinesTableComponentitemValueVisible control; optional or API-dependentapps/sales/src/app/remote-entry/transaction/pages/project-invoice/add-project-invoice/invoice-lines-table/invoice-lines-table.component.ts
InvoiceMainInfoComponentdescriptionVisible control; optional or API-dependentapps/sales/src/app/remote-entry/transaction/pages/project-invoice/add-project-invoice/invoice-main-info/invoice-main-info.component.ts
InvoiceMainInfoComponentinvoiceDateVisible control; optional or API-dependentapps/sales/src/app/remote-entry/transaction/pages/project-invoice/add-project-invoice/invoice-main-info/invoice-main-info.component.ts
InvoiceMainInfoComponenttaxIdVisible control; optional or API-dependentapps/sales/src/app/remote-entry/transaction/pages/project-invoice/add-project-invoice/invoice-main-info/invoice-main-info.component.ts
InvoiceMainInfoComponentvatPercentageVisible control; optional or API-dependentapps/sales/src/app/remote-entry/transaction/pages/project-invoice/add-project-invoice/invoice-main-info/invoice-main-info.component.ts

Observed frontend actions

ComponentClick action/handlerBusiness review requirementComponent source
EditInvoiceLinesTableComponentemitDocument the enabled state, permission, input context, resulting API or navigation effect, success refresh, and concrete failure behavior for this handler.apps/sales/src/app/remote-entry/transaction/pages/project-invoice/edit-project-invoice/edit-invoice-lines-table/edit-invoice-lines-table.component.ts
InvoiceLinesTableComponentemitDocument the enabled state, permission, input context, resulting API or navigation effect, success refresh, and concrete failure behavior for this handler.apps/sales/src/app/remote-entry/transaction/pages/project-invoice/add-project-invoice/invoice-lines-table/invoice-lines-table.component.ts
ProjectInvoiceListComponentonDeleteAvailable only in deletable states with Delete permission; identify the record in confirmation, call delete once, remove/refresh the list row on success, and retain the row with the API reason on failure.apps/sales/src/app/remote-entry/transaction/pages/project-invoice/project-invoice-list/project-invoice-list.component.ts
ProjectInvoiceListComponentonEditOpen the identified editable record only with Edit permission; posted/locked records remain blocked by route or action state and list context must be recoverable on return.apps/sales/src/app/remote-entry/transaction/pages/project-invoice/project-invoice-list/project-invoice-list.component.ts
ProjectInvoiceListComponentonPrintOutWithZatcaConfirmGenerate the printout for the selected record and authorized branch/tenant; use posted/current values and surface print, template, ZATCA/ETA, or popup failures without changing transaction state.apps/sales/src/app/remote-entry/transaction/pages/project-invoice/project-invoice-list/project-invoice-list.component.ts
ProjectInvoiceListComponentonViewOpen the authorized record in view mode with its status, totals, lines, source and generated-document links; handle deleted, forbidden, and missing records without exposing stale data.apps/sales/src/app/remote-entry/transaction/pages/project-invoice/project-invoice-list/project-invoice-list.component.ts

Page-specific frontend acceptance criteria

  1. (module default) - List/navigation: Load an authorized paged/searchable list or navigation page; preserve filters/sort/paging and expose only permitted row and bulk actions. Security observed: Permission: AppSalesPermissions.ProjectInvoice_List; Guards: PolicyAuthGuard
  2. add/:projectId - Add: Render permitted fields, required indicators, defaults, dependent lookups, validation, Save/Cancel, loading, success, and API-error states. Security observed: Permission: AppSalesPermissions.ProjectInvoice_Add; Guards: PolicyAuthGuard
  3. edit/:projectId - Edit: Load the identified record, enforce state/permission field locks, preserve concurrency identity, validate changes, and return without losing filters. Security observed: Permission: AppSalesPermissions.ProjectInvoice_Edit; Guards: PolicyAuthGuard, preventPostedGuard
  4. project-invoice - List/navigation: Load an authorized paged/searchable list or navigation page; preserve filters/sort/paging and expose only permitted row and bulk actions. Security observed: Permission: AppSalesPermissions.ProjectInvoice_List; Guards: PolicyAuthGuard
  5. view/:id - View/detail: Load an authorized immutable/detail representation with status-aware actions, linked records, print/export where exposed, and not-found/forbidden handling. Security observed: Permission: AppSalesPermissions.ProjectInvoice_View; Guards: PolicyAuthGuard

Internal Documentation — Microtec