Data model and states of the offer
The table, field rules, numbering and document template of purchase and lease offers, the decision endpoints and the state transitions.
The offer is the offer kind of the contract/contractaction module, linked to an accepted registration row (contract_registration_advert).
Data model
Table names carry the installation's own prefix in the database. Table: contract_offer — contract_id, contract_registration_id, contract_registration_advert_id, offer_no (contractno/AJ-n), offer_type (purchase, lease), amount, currency, monthly_rent, term_months, payment_schedule, financing_* (own, bank_loan, other + text), coverage_text, valid_until, date_offer, decision, decision_*, template_id, language_id, body, doc_id, status.
Validation
- Only on an accepted, non-deleted registration row; the kind follows the row's deal type:
purchasefor sale and business share,leasefor leases. - For a purchase the offered net price is required; for a lease the net monthly rent is required and the term is 0–1200 months (0 = indefinite).
- Currency from the currency master; the date is required; validity cannot precede the date.
- Document:
offertemplate (Hungarian, English, German), one-sided — signed by the offeror.
States and decision
Values of decision: submitted, accepted, rejected, withdrawn, expired. A decision is only possible from submitted: offeraccept, offerreject, offerwithdraw (permission keys of the same name). On acceptance the row must still be accepted, have no other accepted offer, and the offer must not have expired — an expired offer becomes expired and this is reported as an error. Of a decided offer only the document text can be saved. From an accepted offer the deal form opens prefilled with amount and currency.
Permissions
The form and saving require add / edit, the PDF requires the module's own generate key on contract/contractaction; content scope is the contract's client.