import { SpeakeasyBase } from "../../../internal/utils"; import { ItemReceiptLineItem } from "./itemreceiptlineitem"; import { ItemReceiptStatus } from "./itemreceiptstatus"; import { Metadata } from "./metadata"; import { PurchaseOrderRef } from "./purchaseorderref"; import { SupplementalData } from "./supplementaldata"; import { SupplierRef } from "./supplierref"; /** * An item receipt records the receipt of items into a SMBs inventory. It links to a [purchase order](https://docs.codat.io/codat-api#/schemas/AccountingPurchaseOrder) and acts as an acknowledgement of items received. * * @remarks * * > **Language tip:** Item receipts may also be referred to as **Purchase receipt**, or **PO receiver inventory** in various accounting platforms. * * ADD SOMETHING ABOUT USAGE. E.g. a use case. or an example situation of where it can be used. */ export declare class ItemReceipt extends SpeakeasyBase { /** * The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_. * * @remarks * * ## Unknown currencies * * In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction. * * There are only a very small number of edge cases where this currency code is returned by the Codat system. */ currency?: string; /** * Rate to convert the total amount of the payment into the base currency for the company at the time of the payment. * * @remarks * * Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit. * * It is not possible to perform the currency conversion with two or more non-base currencies participating in the transaction. For example, if a company's base currency is USD, and it has a bill issued in EUR, then the bill payment must happen in USD or EUR. * * Where the currency rate is provided by the underlying accounting platform, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). * * For accounting platforms which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places. * * ## Examples with base currency of GBP * * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (GBP) | * | :--------------- | :------------- | :------------ | :------------------------- | * | **USD** | $20 | 0.781 | £15.62 | * | **EUR** | €20 | 0.885 | £17.70 | * | **RUB** | ₽20 | 0.011 | £0.22 | * * ## Examples with base currency of USD * * | Foreign Currency | Foreign Amount | Currency Rate | Base Currency Amount (USD) | * | :--------------- | :------------- | :------------ | :------------------------- | * | **GBP** | £20 | 1.277 | $25.54 | * | **EUR** | €20 | 1.134 | $22.68 | * | **RUB** | ₽20 | 0.015 | $0.30 | * * * ### Integration-specific details * * | Integration | Scenario | System behavior | * |-------------------|-------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------| * | QuickBooks Online | Transaction currency differs from base currency | If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, include the required currency rate in the expense transaction. | */ currencyRate?: number; /** * Identifier for the item receipt, unique for the company in the accounting platform. */ id?: string; /** * Array of Item Receipt line items. */ lineItems?: ItemReceiptLineItem[]; metadata?: Metadata; modifiedDate?: string; /** * Any private, company notes about the item receipt, such as payment information. */ note?: string; purchaseOrderRefs?: PurchaseOrderRef[]; receivedDate?: string; /** * User-friendly reference for the item receipt. */ reference?: string; sourceModifiedDate?: string; /** * Current status of the item receipt. */ status?: ItemReceiptStatus; /** * Total amount of the item receipt, excluding any taxes. */ subTotal?: number; /** * Supplemental data is additional data you can include in our standard data types. * * @remarks * * It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. */ supplementalData?: SupplementalData; /** * Reference to the supplier the record relates to. */ supplierRef?: SupplierRef; /** * Amount of the item receipt, including tax. */ totalAmount?: number; }