• Building a feature
  • Clean architecture
  • Worfklows

    • Synchronization
    • Discarding a visit
  • Prices
  • Documents
  • Building a feature
  • Clean architecture
  • Worfklows

    • Synchronization
    • Discarding a visit
  • Prices
  • Documents
  • Engineering

    • Building a feature
    • Clean architecture
    • Worfklows

      • Synchronization
      • Discarding a visit
  • Specifications

    • Prices
    • Documents

Documents

This module manages all document-related data for sales, purchases, or any other master-detail transactional records. Each document includes a header with common properties, which are outlined below.

Documents Schema

Document Configuration

Document Header Schema

Document Configuration defines the functionality and behavior of all document types within the system. The properties specified here impact document creation and the overall app execution workflow.

Document Statuses

Defines the lifecycle states of a document, such as Open, InProgress, Hold, and Closed. These statuses control how a document progresses through the system.

Document Series

Represents a sequential numbering system for documents. Each document series is linked to a specific document type, allowing unique document IDs for each combination.

For instance:

  • A purchase order might use a document type of "PO" and a series of "2024", resulting in a document ID like PO-2024-001.
  • A sales invoice might use a type "SI" with a series "2024", producing an ID like SI-2024-001.

Document Series Types

  • Uniqueness Enforcement: The combination of document type and document series must be unique to prevent duplication. This ensures that every document is distinct within its type.

  • Sequence Format: Defines the format or "mask" applied to the document ID.

    For example, you can specify a mask like DOC-YYYY-XXXX, where DOC represents the document type, YYYY is the year, and XXXX is a sequence number that increments with each new document.

Document Header

Document Header Schema

The Document Header contains common properties that apply to all documents. Specific document types (like invoices, orders, or returns) inherit from this header and add their own type-specific properties.

Common Properties:

  • Document Date: The date when the document was created or issued.
  • Customer or Vendor Information: Depending on the document type, this section records the customer (for sales documents) or vendor (for purchase documents).
  • Total Amount: The sum total of all items listed in the document.
  • Document Status: Shows the current state (e.g., Open, Closed).

Each document type may also have specific fields. For instance:

  • A Sales Invoice will include customer-related data and tax information.
  • A Purchase Order will include vendor details and delivery dates.

Discounts and VAT:

  • Discounts: The module allows for defining different types of discounts at the header level.

    For example, a 10% overall discount might apply to all items listed on a sales invoice.

  • VAT Types: Value-added tax (VAT) can be applied based on the document type and the region's tax regulations.

    For example, VAT may be included or excluded based on local tax laws, or different VAT rates may apply depending on the type of transaction.

Last Updated:
Contributors: gabriels
Prev
Prices