import { AptlyCurrency, AptlyQuantityUnitCode } from '../enums/index.js'; import { AptlyAddress } from './address.js'; import { AptlyAllowanceChargeSchema, AptlyLegalMonetaryTotal, AptlyPrice } from './algorithm.js'; import { AptlyCustomerDataSchema } from './customer.js'; import { AptlyItemSchema } from './item.js'; import { AptlyOrganizationSchema } from './organization.js'; export type AptlyPlanPayment = AptlyPlanPaymentSchema; export interface AptlyPlanPaymentSchema { _id: ID; organization: ID | AptlyOrganizationSchema; users: ID[]; orders: ID[]; ordersSigned: ID[]; offers: ID[]; from: DATE; to: DATE; total: AptlyLegalMonetaryTotal; allowanceCharges: AptlyAllowanceChargeSchema[]; customer: AptlyCustomerDataSchema; billing: AptlyAddress; lines: AptlyPlanPaymentLineSchema[]; createdAt: DATE; } export type AptlyPlanPaymentItem = AptlyPlanPaymentLineSchema; export interface AptlyPlanPaymentLineSchema { _id: ID; item: AptlyItemSchema; invoicedQuantity: number; quantityUnitCode: AptlyQuantityUnitCode; price: AptlyPrice; extensionAmount: number; extensionVatAmount: number; currency: AptlyCurrency; }