Partners (PAR)

The par submodule of com owns every external party the ERP transacts with — partners and the role-specific projections of those partners as customers, suppliers, and clients. It also owns each partner’s addresses (postal and delivery), contacts, departments, bank accounts, status history, and the reference data that classifies them (partner type, partner status, salutation, contact position, line of business, sales channel, purchase channel). It depends on sys.loc for country/currency, com.org for the company a customer/supplier is scoped to, com.fin for the default financial terms and credit rating, com.log for terms of delivery, com.cal for the partner’s working calendar, and sys.usr for representative users.

Concepts

Partner

A legal entity the ERP transacts with — independent of role. Carries the master data (name, country, registration numbers, language, default terms, calendar). Customers, suppliers, and clients all point at the same partner.

Partner Type

A reference type for partners (e.g. "manufacturer", "logistics service provider"). Carries the legal-type and status defaults applied to new partner records and the default financial terms for that type.

Partner Status

A reference type that says whether the partner is allowed to transact. The blocked flag short-circuits new orders.

Partner Status Event

An immutable timestamped record of a status change with optional notes — the audit trail of partner status transitions.

Customer / Supplier / Client

Role projections of a partner inside a finance company. Each role assigns the partner-as-X relationship to one company; the same partner may be a customer in one company and a supplier in another.

Partner Address

A named address of a partner. Two specializations exist: a PostalAddress adds postbox/zip/city for invoicing; a DeliveryAddress adds transport mode, geo-coordinates, and a calendar plus opening-hours slots for goods receipt.

Delivery Address Slot

A weekday/opening-hours window on a delivery address — used by the calendar moveBusinessDays service to skip days the address is closed.

Partner Contact

A named person at the partner with their own contact details, language, salutation, position, and (optionally) the partner department they belong to.

Partner Bank Account

A bank account that belongs to a partner; carries the IBAN/SWIFT plus the bank’s address.

Sales Channel / Purchase Channel

Reference types that classify the route through which a sales or purchase relationship is conducted.

Entities

PAR entities

Partner (Partner)

The master record for an external party. Aggregates every address, contact, status event, and bank account.

FieldDescription

code

Business key (up to 12 characters).

name

Display name.

country

Country of registration.

partnerType

Classification of the partner.

partnerLegalType

Legal classification — see Partner Legal Types below. Default B.

website

Optional website URL.

telephone

Optional phone number.

_email

Optional email address.

chamberOfCommerce

Optional Chamber-of-Commerce registration.

vatNumber

Optional VAT registration.

partnerStatus

Current status (active/blocked/…​).

partnerNotes

Optional free-form notes.

language

Preferred language for outbound communication.

lineOfBusiness

Optional industry classification.

termsOfPayment

Optional default terms of payment.

termsOfDelivery

Optional default terms of delivery.

termsOfInvoice

Optional default terms of invoice.

currency

Default trading currency.

calendar

Optional working calendar used for date arithmetic involving this partner.

externalCode

Optional code from an external system (operational field).

CodeNameMeaning

B

Business

Commercial entity (default).

N

Non-governmental

NGO.

G

Governmental

Public-sector entity.

P

Natural Person

Private individual.

Partner Type (PartnerType)

A classification of partners with the defaults applied to new partner records of this type.

FieldDescription

code

Business key (up to 10 characters).

description

Human-readable name.

defaultPartnerLegalType

Legal type assigned to new partners. Default B.

defaultPartnerStatus

Status assigned to new partners.

defaultTermsOfPayment

Optional default terms of payment.

defaultTermsOfDelivery

Optional default terms of delivery.

defaultTermsOfInvoice

Optional default terms of invoice.

Partner Status (PartnerStatus)

A status code that may block transactions.

FieldDescription

code

Business key (up to 12 characters).

description

Human-readable name.

partnerBlocked

Whether partners with this status are blocked from transacting.

Partner Status Event (PartnerStatusEvent)

An immutable timestamped record of a status change.

FieldDescription

partner

The partner whose status changed.

createdDateTime

When the change happened (composite business key with partner).

partnerStatus

The new status.

notes

Optional free-form notes.

Partner Address (PartnerAddress)

A named address of a partner.

FieldDescription

partner

Owning partner (composite business key with code).

code

Address code (up to 6 characters).

name1 / name2

Display names.

street, area, zipcode, city, state, country

Address lines.

partnerNotes

Optional free-form notes.

Postal Address (PostalAddress)

The invoicing/postbox specialization of a partner address. One per partner address at most.

FieldDescription

partnerAddress

The partner address being specialized (one-to-one).

postbox

Optional postbox identifier.

postboxZipCode

Optional postbox zip code.

postboxCity

Optional postbox city.

Delivery Address (DeliveryAddress)

The goods-receipt specialization of a partner address. One per partner address at most.

FieldDescription

partnerAddress

The partner address being specialized (one-to-one).

transportMode

Optional transport mode used for deliveries to this address.

defaultDeliveryDay

Optional default day-of-week for deliveries.

longitude

Optional longitude.

latitude

Optional latitude.

deliveryNotes

Optional free-form delivery instructions.

calendar

Optional calendar (e.g. closures) for this address.

Delivery Address Slot (DeliveryAddressSlot)

A weekday/opening-hours window for a delivery address. Implements IsWeekDaySlot so it can be passed into com.cal’s `moveBusinessDays.

FieldDescription

deliveryAddress

Owning delivery address (composite business key with dayOfWeek and openingTime).

dayOfWeek

Day of the week the slot is open.

openingTime

Opening time (minute precision).

closingTime

Closing time (minute precision).

Partner Contact (PartnerContact)

A named person at the partner.

FieldDescription

partner

Owning partner (composite business key with code).

code

Contact code (up to 6 characters).

partnerAddress

Optional address the contact is reached at; must belong to the same partner.

department

Optional partner department.

salutation

Salutation (Mr/Mrs/…​).

name1 / name2

First/last name.

_position

Optional position/title.

country

Country.

language

Preferred language.

contactNotes

Optional free-form notes.

telephone1 / telephone2, mobile1 / mobile2, email1 / email2

Contact channels.

Partner Department (PartnerDepartment)

A department within a partner organization (used to group contacts).

FieldDescription

code

Business key (up to 6 characters).

description

Human-readable name.

Partner Bank Account (PartnerBankAccount)

A bank account that belongs to a partner.

FieldDescription

partner

Owning partner (composite business key with bankAccountNumber).

bankAccountNumber

The IBAN.

name

Bank name.

street, zipcode, city, state, country

Bank address.

swiftCode

Optional SWIFT/BIC code.

bankReference

Optional bank reference.

telephone

Optional phone number.

Customer (Customer)

A partner acting as a customer inside a specific company.

FieldDescription

company

The company this customer relationship belongs to.

partner

The partner.

representativeInt

Optional internal sales representative (a User).

representativeExt

Optional external sales representative.

creditRating

Optional credit rating from com.fin.

Supplier (Supplier)

A partner acting as a supplier inside a specific company.

FieldDescription

company

The company this supplier relationship belongs to.

partner

The partner.

reliability

Supplier reliability classification — see Supplier Reliability below. Default U.

representativeInt

Optional internal purchasing representative.

representativeExt

Optional external purchasing representative.

Supplier Reliability (SupplierReliability)

CodeNameMeaning

U

Unknown

No assessment yet (default).

R

Reliable

Trusted supplier.

N

Not Reliable

Supplier flagged as unreliable.

Client (Client)

A partner acting as a client inside a specific company. Lighter than Customer — used when the relationship does not warrant the customer-specific fields.

FieldDescription

company

The company this client relationship belongs to.

partner

The partner.

Reference Types

LineOfBusiness

An industry classification attached to partners (code + description).

ContactPosition

A position/title used on contacts (code + description).

Salutation

A salutation prefix used on contacts (code + description).

SalesChannel

A classification of the route a sales relationship is conducted through (code + description).

PurchaseChannel

A classification of the route a purchase relationship is conducted through (code + description).

Functionality

Partner lookup

PartnerReaderService provides the canonical lookups: optional and mandatory by-code, plus retrieval of the default postal address (getDefaultInvoiceAddress) and default delivery address (getDefaultDeliveryAddress) for a partner. The mandatory variants raise a business exception when the partner does not exist.

Customer / Supplier resolution

The same service resolves the customer and supplier projections of a partner inside a given company (getCustomer / getCustomerMandatory, getSupplier / getSupplierMandatory). The mandatory variants raise a business exception when the partner is not registered as a customer/supplier in that company. The non-mandatory variants accept a null partner (and return null) so callers can short-circuit cleanly.

Address lookup

AddressReaderService.findByPartnerAndCodeMandatory returns the partner address whose code matches inside a given partner, raising a business exception when the address does not exist. COM_PAR_QueryApi also exposes the optional variant and direct lookups for a partner address’s postal- or delivery-address specialization.

Line-of-business lookup

LineOfBusinessReaderService.findByCodeMandatory returns a LineOfBusiness by code, raising a business exception when not found.

Delivery slot enumeration

COM_PAR_QueryApi.getAddressDeliverySlots returns every weekday/opening-hours slot of a delivery address. Used by transport-planning code that needs to feed slots into com.cal’s `moveBusinessDays.

Public API

COM_PAR_QueryApi

Read-side facade.

MethodDescription

findPartnerByCode(Code12) / findPartnerByCodeMandatory(…​)

Partner by code (optional or mandatory).

getDefaultInvoiceAddress(Partner)

The partner’s default postal address, or null.

getDefaultDeliveryAddress(Partner)

The partner’s default delivery address, or null.

findAllAddressesByPartner(Partner)

All PartnerAddress rows for a partner.

findAddressByPartnerAndCode(…​) / findAddressByPartnerAndCodeMandatory(…​)

Address by partner + code.

findDeliveryAddressByPartnerAddress(PartnerAddress)

The delivery-address specialization of a partner address.

findPostalAddressByPartnerAddress(PartnerAddress)

The postal-address specialization of a partner address.

getAddressDeliverySlots(DeliveryAddress)

Opening-hours slots of a delivery address.

getCustomer(…​) / getCustomerMandatory(…​)

Customer projection of a partner inside a company.

getSupplier(…​) / getSupplierMandatory(…​)

Supplier projection of a partner inside a company.

findCustomerByPartner(Company, Partner)

Customer row for the (company, partner) pair, or null.

findSupplierByPartner(Company, Partner)

Supplier row for the (company, partner) pair, or null.

findLineOfBusinessByCodeMandatory(HasTrace, Code8)

Line-of-business by code; raises when not found.

COM_PAR_CommandApi

This submodule does not provide a command API class. Partners and their related entities are maintained through their default CRUD pages.

IsWeekDaySlot extension

com.par.extension.IsWeekDaySlot is the seam that lets DeliveryAddressSlot rows be passed into the calendar moveBusinessDays service. Other modules with their own weekday-slot rows can implement the interface to participate in the same flow.

ViewModel actions

The submodule defines view models for every entity but does not declare any custom UI actions.