Sales #customers #accounts #credit #terms #contacts #addresses #risk Raw .md

Customer Accounts

Manage customer profiles, credit limits, price scales, delivery addresses, and trading terms.

Routes: /customers /customers/:id

Customer Accounts

The Customers module manages commercial accounts, credit controls, pricing scales, payment terms, and delivery addresses.


Business Logic & Inheritance Cascades

1. Data Inheritance Hierarchy

When creating or updating customer orders, the system automatically resolves commercial defaults through a strict order of precedence:

Commercial SettingResolution Cascade (First Match Wins)Default / Fallback
Credit Limit1. Customer Record2. Customer Group0.00 (Cash Basis only)
Payment Terms1. Customer Record2. Customer Group3. System DefaultNone (Immediate / Cash)
Early Payment Discount1. Customer Record2. Customer Group0% (No discount)
Early Payment Days1. Customer Record2. Customer GroupNone
Price Scale (1–4)1. Customer Group Price ScaleScale 1 (Retail List Price)
flowchart TD
    A[Order Creation / Progression] --> B{Customer Setting Defined?}
    B -- Yes --> C[Use Customer Level Setting]
    B -- No --> D{Group Setting Defined?}
    D -- Yes --> E[Inherit Group Level Setting]
    D -- No --> F[Apply System Default / Cash Basis]

2. Credit Exposure & Assessment Formula

The system evaluates customer financial risk whenever an order is moved to Quoted or Confirmed:

Total Financial Exposure = Total Unpaid Invoice Balance + Additional Open Order Exposure
  • Unpaid Invoice Balance: Sum of all posted, non-cancelled Sales Invoices minus credited amounts and unallocated customer receipts.
  • Additional Open Order Exposure: Gross total value of open Sales Orders in Confirmed, Picking, or Shipped states that have not yet been fully invoiced.

3. Credit Hold Evaluation (Logical OR-Gate)

An account’s effective credit hold status is evaluated as a logical OR-gate:

Is Sales Blocked = (Customer is on Credit Hold) OR (Customer Group is on Credit Hold) OR (Overdue Balance > 0) OR (Total Exposure > Effective Credit Limit)
  • Active Override: If an authorized user has granted a Credit Hold Override, the block is bypassed until overrideCreditHoldUntil timestamp expires (overrideCreditHoldUntil > Current Time).
  • Hard vs. Soft Limit Behavior: Under hard limit configuration (default), exceeding credit limits strictly prevents confirming or quoting orders. Under soft limit mode, operators receive a non-blocking financial warning.

Step-by-Step Workflows

1. Creating a New Customer

  1. Go to SalesCustomers (/customers).
  2. Click New Customer.
  3. Enter the Company Name, Customer Group, and Currency.
  4. Select the Trading / Payment Terms and set the Credit Limit.
  5. Add the primary Billing Address and at least one Delivery Address.
  6. (Optional) Add primary and billing Contact Persons with email and phone details.
  7. Click Save Customer.

2. Managing Credit Holds & Overrides

  1. Open the customer details page (/customers/:id).
  2. In the Financial Standing section, review total outstanding receivables, open order exposure, and remaining credit headroom.
  3. To manually suspend ordering, toggle Credit Hold: ON.
  4. To authorize a temporary override for a blocked account:
    • Click Apply Credit Override.
    • Select an expiry date/time and enter a mandatory Business Justification Reason.
    • Confirm the override to allow order confirmation within the authorized window.

Field Reference

FieldDescription
Customer NameTrading business name.
Customer GroupClassification tier setting default price scale (1–4), terms, and group limits.
CurrencyTransaction currency for all sales orders and invoices.
Credit LimitMaximum approved exposure in customer currency (inherits from group if null).
Credit HoldManual or automated flag blocking new sales order confirmations.
Payment TermsStandard settlement timeline (e.g. Net 30, COD).
Early Payment DiscountDiscount percentage for early settlement before due date.
Early Payment DaysDays from invoice date eligible for early payment discount.
Tax PositionRelational link defining tax rules and exemptions.
Delivery AddressesDestination addresses for physical shipments.

Field Reference & Data Dictionary

Key database fields, input parameters, and definitions associated with this workflow screen:

Field / Parameter Display Name Description & Rules
name Customer Name Legal trade name of the customer company or individual.
customer_group_id Customer Group Assigns group defaults for Price Scale (1–4), default payment terms, group credit limit, and group discounts.
currency_code Operating Currency Transaction currency for sales orders and invoices (e.g. EUR, SGD, USD).
credit_limit Credit Limit Maximum allowable financial exposure. Inherits from Customer Group or defaults to 0.00 (Cash Basis) if unspecified.
is_on_credit_hold Credit Hold Blocks order progression to Quoted or Confirmed. Evaluated via an OR-gate across customer and group levels.
trading_terms_id Payment Terms Standard payment window (e.g. Net 30, COD, Prepayment) resolved via customer -> group -> system default.
early_payment_discount Early Payment Discount % Percentage discount eligible if settled within early discount window.
early_payment_discount_days Early Payment Window (Days) Number of calendar days from invoice date to qualify for early payment discount.
tax_position_id Tax Position Tax exemption and specialized rules handled relationally via Tax Positions.
delivery_addresses Delivery Addresses Multiple destination addresses selectable during sales order creation.