You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sims-hq/packages/domain/src/masters.ts

41 lines
1.0 KiB
TypeScript

import type { Paise } from './money'
export interface Unit {
code: string // PCS, KG, BOX…
/** Decimal places allowed in a quantity of this unit (KG → 3, PCS → 0). */
decimals: number
}
export interface Item {
id: string
tenantId: string
code: string
name: string
/** Optional regional-script secondary name, shown under the primary on POS. */
nameSecondary?: string
hsn: string
taxClassCode: string
unit: Unit
mrpPaise?: Paise
salePricePaise: Paise
/** Sale price semantics; Indian B2C retail is normally tax-inclusive. */
priceIncludesTax: boolean
barcodes: string[]
batchTracked: boolean
/** Draft items come from the POS unknown-barcode quick-add, pending completion. */
status: 'active' | 'draft' | 'inactive'
}
export interface Party {
id: string
tenantId: string
code: string
name: string
kind: 'customer' | 'supplier'
phone?: string
gstin?: string
/** 2-digit GST state code; drives place-of-supply on B2B documents. */
stateCode?: string
creditLimitPaise?: Paise
}