@orchestree/accounting
v1.2.0
Published
Accounting module — Invoices, expenses, banking sync, payroll, financial reports
Downloads
115
Maintainers
Readme
@orchestree/accounting
Accounting and financial management for Orchestree. Create invoices, track expenses, manage payroll, and generate financial reports.
Installation
npm install @orchestree/accountingQuick Start
const { AccountingClient } = require('@orchestree/accounting');
const client = new AccountingClient({
apiKey: 'your-api-key',
});
// Create invoice
const invoice = await client.createInvoice({
invoiceNumber: 'INV-001',
clientId: 'client-123',
amount: 5000,
items: [{ description: 'Services', quantity: 1, unitPrice: 5000 }],
});
// Track expense
await client.trackExpense({
date: new Date().toISOString(),
category: 'supplies',
amount: 250,
});
// Get financial summary
const summary = await client.getFinancialSummary('2024-Q1');API Reference
AccountingClient
createInvoice(invoiceDef)
Create a new invoice.
const invoice = await client.createInvoice({
invoiceNumber: 'INV-002',
clientId: 'client-456',
dueDate: '2024-05-15',
items: [
{ description: 'Consulting', quantity: 10, unitPrice: 150 }
],
});trackExpense(expenseDef)
Track a business expense.
await client.trackExpense({
date: '2024-04-10',
category: 'travel',
amount: 500,
description: 'Client meeting travel',
});syncBanking(bankConnection)
Sync banking data.
await client.syncBanking({
bank: 'chase',
accountId: 'acc-123',
});runPayroll(payrollDef)
Run payroll processing.
const payroll = await client.runPayroll({
period: '2024-04',
employees: ['emp-1', 'emp-2'],
});License
MIT
