@inbridge/oif-ts
Version:
TypeScript integration for the Open Invoice Format (OIF) schema. Easily create OIF-compliant PDFs and parse/validate JSON.
60 lines (57 loc) • 1.42 kB
TypeScript
import { DiscountType } from '../enums/discount.enum.js';
import { InvoiceItemUnit } from '../enums/invoice-item-unit.enum.js';
import { Currency } from '../enums/currency.enum.js';
declare class InvoiceItemWithoutDiscount {
/**
* Unique identifier of the item
*/
id: string;
/**
* Description of the item
*/
description: string;
/**
* The quantity of the item
*/
quantity: number;
/**
* The unit of the item
* @see InvoiceItemUnit
*/
unit: InvoiceItemUnit;
/**
* The price of the item
*/
price: number;
/**
* The currency of the item
* @see Currency
*/
currency: Currency;
/**
* The tax rate of the item
*/
taxRate: number;
constructor(id: string, price: number, unit?: InvoiceItemUnit, description?: string);
/**
* The net price of the item
*/
get netPrice(): number;
/**
* The tax of the item
*/
get tax(): number;
/**
* The gross price of the item
*/
get grossPrice(): number;
/**
* Adds a discount to the item and mutates the object to an InvoiceItemWithDiscount
* @param discount The amount of the discount
* @param type The type of the discount
* @see DiscountType
* @returns void
*/
addDiscount(discount: number, type: DiscountType): void;
}
export { InvoiceItemWithoutDiscount };