Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions countries/countries.intent
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Country nomenclature (ISO 3166)
icon: globe
entities:
- name: Country
kind: setting
function: Setting
icon: globe
fields:
# Matches codbex-countries.model. Intent has no fixed-width CHAR type, so CHAR(n) is
Expand All @@ -16,7 +16,7 @@ entities:
# Cities per country - the Depends-On cascade target: a consumer's City dropdown is narrowed to
# the chosen Country (City.Country == Country.id). Seeded with a few well-known cities.
- name: City
kind: setting
function: Setting
icon: building
fields:
- { name: id, type: integer, primaryKey: true, generated: true }
Expand Down
4 changes: 2 additions & 2 deletions currencies/currencies.intent
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Currency nomenclature and exchange rates
icon: money-bill
entities:
- name: Currency
kind: setting
function: Setting
icon: money-bill
audit: true
fields:
Expand All @@ -17,7 +17,7 @@ entities:
- { name: base, type: boolean }
- { name: rate, type: decimal, precision: 18, scale: 6 }
- name: CurrencyRate
kind: setting
function: Setting
fields:
- { name: id, type: integer, primaryKey: true, generated: true }
- { name: name, type: string, length: 100 }
Expand Down
2 changes: 1 addition & 1 deletion numbers/numbers.intent
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ entities:
# e.g. type "Sales Invoice" (prefix SI, length 10) -> "SI00000001". Other projects (sales-invoices,
# orders, ...) call that generator from their own document delegates - see the sales-invoices process.
- name: Number
kind: setting
function: Setting
group: settings
icon: hash
fields:
Expand Down
12 changes: 7 additions & 5 deletions sales-invoices/sales-invoices.intent
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,25 @@ entities:
# (SalesInvoiceNumberAction) and the real sequential SI-number just after Issue (the generateNumber
# serviceTask -> DocumentNumberGeneratorDelegate). See SalesInvoice.imports + number below.
- name: SalesInvoiceStatus
kind: setting
function: Setting
group: settings
fields:
- { name: id, type: integer, primaryKey: true, generated: true }
- { name: name, type: string, required: true, length: 100 }
- name: PaymentMethod
kind: setting
function: Setting
group: settings
fields:
- { name: id, type: integer, primaryKey: true, generated: true }
- { name: name, type: string, required: true, length: 100 }
- name: SentMethod
kind: setting
function: Setting
group: settings
fields:
- { name: id, type: integer, primaryKey: true, generated: true }
- { name: name, type: string, required: true, length: 100 }
- name: SalesInvoice
function: Document # header + line items + status pill + totals footer
icon: receipt
audit: true
group: sales
Expand All @@ -42,7 +43,7 @@ entities:
- { name: id, type: integer, primaryKey: true, generated: true }
# number is computed server-side by the SalesInvoiceNumberAction CalculatedField (imported above),
# invoked as Beans.get(SalesInvoiceNumberAction.class).calculate(entity) on create.
- { name: number, type: string, length: 100, calculatedActionOnCreate: SalesInvoiceNumberAction, documentTitle: true }
- { name: number, type: string, length: 100, calculatedActionOnCreate: SalesInvoiceNumberAction, function: DocumentTitle }
- { name: date, type: date, required: true }
- { name: due, type: date }
# Document totals: aggregate fields shown read-only in the footer. Net/Vat/Discount/Total are kept
Expand All @@ -63,10 +64,11 @@ entities:
# target seed id), applied on insert when left unset - so a new invoice starts as DRAFT, Bank
# transfer, E-mail without a process step (race-free vs the trigger).
- { name: Currency, kind: manyToOne, to: Currency, model: currencies, size: 4 }
- { name: Status, kind: manyToOne, to: SalesInvoiceStatus, documentStatus: true, init: 1 } # 1 = DRAFT
- { name: Status, kind: manyToOne, to: SalesInvoiceStatus, function: DocumentStatus, init: 1 } # 1 = DRAFT
- { name: PaymentMethod, kind: manyToOne, to: PaymentMethod, init: 2, size: 4 } # 2 = Bank transfer
- { name: SentMethod, kind: manyToOne, to: SentMethod, init: 1, size: 4 } # 1 = E-mail
- name: SalesInvoiceItem
function: DocumentItem # the document's line items (rendered inline under SalesInvoice)
fields:
- { name: id, type: integer, primaryKey: true, generated: true }
- { name: name, type: string, length: 200 }
Expand Down
2 changes: 1 addition & 1 deletion uoms/uoms.intent
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ icon: ruler
languages: [en, bg]
entities:
- name: UoM
kind: setting
function: Setting
icon: ruler
# UoM names carry per-language values in UOMS_UOM_LANG (generated by the schema layer); every
# read overlays the caller's language. Translations are the uoms-bg seed below.
Expand Down