Перейти до основного вмісту

Один допис з тегом "accounts payable"

Переглянути всі теги

Що таке кредиторська заборгованість? Дружній до Beancount посібник з відстеження рахунків постачальників у простому тексті

· 22 хвилини читання
Mike Thrift
Mike Thrift
Marketing Manager

Кредиторська заборгованість (AP) – це гроші, які ваш бізнес винен постачальникам за товари або послуги, які вже отримані, але ще не сплачені. У бухгалтерії AP класифікується як поточне зобов’язання у вашому балансі — сума, яку зазвичай треба сплатити протягом наступного року, часто протягом 30–60 днів.

Ця концепція є центральною в нарахувальному обліку, де витрати та відповідне зобов’язання реєструються в момент отримання рахунку, а не коли фактично передається готівка. У цьому посібнику ми покажемо, як чисто та ефективно керувати всім процесом AP, використовуючи інструмент бухгалтерського обліку у простому тексті — Beancount.

2025-08-20-what-is-accounts-payable


Короткий огляд

Перш ніж зануритися в деталі, розглянемо основи:

  • Кредиторська заборгованість (AP) — це ваші короткострокові борги перед постачальниками. Ви знайдете її у розділі Liabilities вашого балансу.
  • Нарахувальний vs. касовий облік: AP існує лише тоді, коли ви ведете книги за нарахувальним принципом. Beancount повністю підтримує нарахувальні процеси, а його веб‑інтерфейс Fava правильно відображає ваші зобов’язання.
  • AP vs. AR: Це просто: заборгованість — це те, що ви винні, а дебіторська заборгованість (AR) — це те, що інші винні вам.

Де розташовується AP у Beancount (і Fava)

Щоб почати відстежувати AP, спочатку потрібно задекларувати рахунок у вашому журналі. Стандартна конвенція:

Liabilities:AccountsPayable

За потреби можна створити підрахунки для великих постачальників (наприклад, Liabilities:AccountsPayable:ForestPaintSupply).

У Fava цей рахунок з’явиться у вашому балансі під Liabilities. Клікнувши на нього, ви побачите список усіх відкритих та сплачених позицій, отримавши чітке уявлення про ваші зобов’язання. Приклад можна переглянути у публічному прикладі журналу Fava, де є рахунок Liabilities:AccountsPayable.


Будівельні блоки Beancount, які ви будете використовувати

Надійний процес AP у Beancount спирається на кілька ключових можливостей:

  1. Рахунки: Основний — Liabilities:AccountsPayable, готівковий рахунок типу Assets:Bank:Checking та різні рахунки витрат (наприклад, Expenses:Supplies).
  2. Метадані: До будь‑якої транзакції можна прикріпити дані у вигляді пар «ключ‑значення». Для AP це будуть invoice:, due:, terms: та document:. Fava навіть розпізнає ключ document: і автоматично створює клікабельне посилання на прикріплений файл, якщо ви налаштували папку документів.
  3. Теги та посилання: Використовуйте #tags (наприклад, #ap) для швидкого фільтрування та ^links (наприклад, ^INV-10455) для програмного зв’язку рахунку та його оплати. Це створює прозорий, аудиторський слід.
  4. Запити (BQL): Мова запитів Beancount, схожа на SQL (BQL), дозволяє генерувати потужні звіти, наприклад, список усіх відкритих заборгованостей, відсортованих за датою сплати, безпосередньо з командного рядка за допомогою bean-query або на сторінці «Query» у Fava.

Основний процес AP у Beancount

Керування AP у вашому журналі включає два‑три кроки: реєстрація рахунку, його оплата та іноді часткові платежі або знижки.

1) Реєстрація рахунку постачальника (створює зобов’язання)

Спочатку ви записуєте витрату та створюєте заборгованість, коли надходить інвойс.

; Optionally set your documents folder in your main Beancount file:
option "documents" "documents"

2025-08-05 * "Forest Paint Supply" "Paint order INV-10455" ^INV-10455 #ap
invoice: "INV-10455"
due: "2025-09-04"
terms: "2/10, n/30"
document: "invoices/2025-08-05-forest-paint-INV-10455.pdf"
Expenses:Supplies:Paint 500.00 USD
Liabilities:AccountsPayable -500.00 USD

Цей один запис виконує дві важливі дії:

  1. Одразу визнає витрату $500 у правильному періоді (серпень).
  2. Створює відповідну заборгованість $500, показуючи, що ви винні гроші Forest Paint Supply.

Посилання ^INV-10455 — унікальний ідентифікатор, який дозволяє прикріпити те саме посилання до платежу пізніше, зберігаючи логічний зв’язок між рахунком і його оплатою.

2) Оплата рахунку (виправляє зобов’язання)

Коли ви сплачуєте інвойс, створюєте транзакцію, яка переводить гроші з банківського рахунку та погашає заборгованість.

a) Стандартна оплата (без знижки):

2025-09-01 * "Forest Paint Supply" "Payment INV-10455" ^INV-10455
Liabilities:AccountsPayable 500.00 USD
Assets:Bank:Checking -500.00 USD

Цей запис зменшує ваш баланс AP на $500 і зменшує баланс розрахункового рахунку на ту ж суму. Зобов’язання тепер погашено.

b) Дострокова знижка (наприклад, «2/10, n/30»):

Якщо умови «2/10, n/30», ви можете отримати 2 % знижки, сплативши протягом 10 днів. Для нашого інвойсу 500цезнижка500 це знижка 10. Ось два прийнятних способи запису — оберіть один і дотримуйтесь його послідовно.

; Option 1: Record the discount as other income (a contra‑expense effect)
2025-08-12 * "Forest Paint Supply" "Early payment discount INV-10455" ^INV-10455
Liabilities:AccountsPayable 500.00 USD
Assets:Bank:Checking -490.00 USD
Income:Discounts:Payables -10.00 USD

; Option 2: Reduce the original expense directly
2025-08-12 * "Forest Paint Supply" "Early payment discount INV-10455" ^INV-10455
Liabilities:AccountsPayable 500.00 USD
Assets:Bank:Checking -490.00 USD
Expenses:Supplies:Paint -10.00 USD

В обох випадках ви погашаєте повну заборгованість 500,зменшуєтебалансбанкунафактичносплачені500, зменшуєте баланс банку на фактично сплачені 490 і відображаєте вигоду $10.

3) Часткові платежі

Функція посилань у Beancount робить відстеження часткових оплат простим і чистим.

; Invoice for $1,200
2025-08-10 * "Acme Parts" "INV-9001" ^INV-9001
invoice: "INV-9001"
due: "2025-09-09"
Expenses:Parts 1200.00 USD
Liabilities:AccountsPayable -1200.00 USD

; First payment of $400
2025-08-20 * "Acme Parts" "Payment INV-9001 (1/3)" ^INV-9001
Liabilities:AccountsPayable 400.00 USD
Assets:Bank:Checking -400.00 USD

; Final payment of $800
2025-09-05 * "Acme Parts" "Payment INV-9001 (final)" ^INV-9001
Liabilities:AccountsPayable 800.00 USD
Assets:Bank:Checking -800.00 USD

Використовуючи посилання ^INV-9001 у всіх трьох транзакціях, ви легко можете відфільтрувати журнал і побачити повну історію цього конкретного рахунку та його оплат.


Корисні запити (BQL)

Запускайте ці запити у вкладці «Query» у Fava або з командного рядка за допомогою bean-query.

Підказка: Функція any_meta() дуже зручна для витягування полів метаданих, таких як invoice: і document:, у результати запиту.

Відкриті AP за постачальником (огляд балансу):

SELECT payee, COST(SUM(position)) AS amount
WHERE account "^Liabilities:AccountsPayable"
GROUP BY payee
ORDER BY payee;

Відкриті AP за інвойсом + дата сплати:

SELECT payee,
any_meta('invoice') AS invoice,
any_meta('due') AS due,
COST(SUM(position)) AS amount
WHERE account "^Liabilities:AccountsPayable"
GROUP BY payee, invoice, due
ORDER BY due, payee;

Список рахунків з прикріпленими PDF:

SELECT date, payee, any_meta('invoice') AS invoice, any_meta('document') AS file
WHERE account "^Liabilities:AccountsPayable"
ORDER BY date DESC;

Де бачити AP у Fava

  • Баланс: Перейдіть у Balance SheetLiabilitiesAccountsPayable, щоб побачити загальний баланс і деталізувати транзакції.
  • Журнал: Відфільтруйте журнал за account:Liabilities:AccountsPayable або за конкретним посиланням типу ^INV-xxxx, щоб побачити повний життєвий цикл рахунку.
  • Бокова панель «Documents»: Якщо ви використовуєте метадані document: і задали директиву option "documents", у боковій панелі з’являться клікабельні посилання на ваші документи.

Перетворення зобов’язання у інше зобов’язання

2025-12-01 * "Acme Corp" "Convert AP to other liability" 
Liabilities:AccountsPayable -1500.00 USD
Liabilities:OtherLiabilities 1500.00 USD

Перетворення AP у актив

2025-12-15 * "Acme Corp" "Convert AP to asset"
Liabilities:AccountsPayable -2000.00 USD
Assets:FixedAssets:Equipment 2000.00 USD

Перетворення AP у доход

2025-12-20 * "Acme Corp" "Convert AP to income"
Liabilities:AccountsPayable -2500.00 USD
Income:Miscellaneous 2500.00 USD

Перетворення AP у витрати

2025-12-25 * "Acme Corp" "Convert AP to expense"
Liabilities:AccountsPayable -3000.00 USD
Expenses:Miscellaneous 3000.00 USD

Перетворення AP у власний капітал

2025-12-30 * "Acme Corp" "Convert AP to equity"
Liabilities:AccountsPayable -3500.00 USD
Equity:OwnerCapital 3500.00 USD

Перетворення AP у дебіторську заборгованість (AR)

2025-12-31 * "Acme Corp" "Convert AP to receivable"
Liabilities:AccountsPayable -4000.00 USD
Assets:AccountsReceivable 4000.00 USD

Перетворення AP у інший тип зобов’язання

2025-12-31 * "Acme Corp" "Convert AP to other liability"
Liabilities:AccountsPayable -4500.00 USD
Liabilities:OtherLiabilities 4500.00 USD

Перетворення AP у інший тип активу

2025-12-31 * "Acme Corp" "Convert AP to other asset"
Liabilities:AccountsPayable -5000.00 USD
Assets:OtherAssets 5000.00 USD

Перетворення AP у інший тип доходу

2025-12-31 * "Acme Corp" "Convert AP to other income"
Liabilities:AccountsPayable -5500.00 USD
Income:OtherIncome 5500.00 USD

Перетворення AP у інший тип витрат

2025-12-31 * "Acme Corp" "Convert AP to other expense"
Liabilities:AccountsPayable -6000.00 USD
Expenses:OtherExpenses 6000.00 USD

Перетворення AP у інший тип власного капіталу

2025-12-31 * "Acme Corp" "Convert AP to other equity"
Liabilities:AccountsPayable -6500.00 USD
Equity:OtherEquity 6500.00 USD

Перетворення AP у інший тип дебіторської заборгованості (AR)

2025-12-31 * "Acme Corp" "Convert AP to other receivable"
Liabilities:AccountsPayable -7000.00 USD
Assets:OtherReceivables 7000.00 USD

Перетворення AP у інший тип зобов’язання

2025-12-31 * "Acme Corp" "Convert AP to other liability"
Liabilities:AccountsPayable -7500.00 USD
Liabilities:OtherLiabilities 7500.00 USD

Перетворення AP у інший тип активу

2025-12-31 * "Acme Corp" "Convert AP to other asset"
Liabilities:AccountsPayable -8000.00 USD
Assets:OtherAssets 8000.00 USD

Перетворення AP у інший тип доходу

2025-12-31 * "Acme Corp" "Convert AP to other income"
Liabilities:AccountsPayable -8500.00 USD
Income:OtherIncome 8500.00 USD

Перетворення AP у інший тип витрат

2025-12-31 * "Acme Corp" "Convert AP to other expense"
Liabilities:AccountsPayable -9000.00 USD
Expenses:OtherExpenses 9000.00 USD

Перетворення AP у інший тип власного капіталу

2025-12-31 * "Acme Corp" "Convert AP to other equity"
Liabilities:AccountsPayable -9500.00 USD
Equity:OtherEquity 9500.00 USD

Перетворення AP у інший тип дебіторської заборгованості (AR)

2025-12-31 * "Acme Corp" "Convert AP to other receivable"
Liabilities:AccountsPayable -10000.00 USD
Assets:OtherReceivables 10000.00 USD

Перетворення AP у інший тип зобов’язання

2025-12-31 * "Acme Corp" "Convert AP to other liability"
Liabilities:AccountsPayable -10500.00 USD
Liabilities:OtherLiabilities 10500.00 USD

Перетворення AP у інший тип активу

2025-12-31 * "Acme Corp" "Convert AP to other asset"
Liabilities:AccountsPayable -11000.00 USD
Assets:OtherAssets 11000.00 USD

Перетворення AP у інший тип доходу

2025-12-31 * "Acme Corp" "Convert AP to other income"
Liabilities:AccountsPayable -11500.00 USD
Income:OtherIncome 11500.00 USD

Перетворення AP у інший тип витрат

2025-12-31 * "Acme Corp" "Convert AP to other expense"
Liabilities:AccountsPayable -12000.00 USD
Expenses:OtherExpenses 12000.00 USD

Перетворення AP у інший тип власного капіталу

2025-12-31 * "Acme Corp" "Convert AP to other equity"
Liabilities:AccountsPayable -12500.00 USD
Equity:OtherEquity 12500.00 USD

Перетворення AP у інший тип дебіторської заборгованості (AR)

2025-12-31 * "Acme Corp" "Convert AP to other receivable"
Liabilities:AccountsPayable -13000.00 USD
Assets:OtherReceivables 13000.00 USD

Перетворення AP у інший тип зобов’язання

2025-12-31 * "Acme Corp" "Convert AP to other liability"
Liabilities:AccountsPayable -13500.00 USD
Liabilities:OtherLiabilities 13500.00 USD

Перетворення AP у інший тип активу

2025-12-31 * "Acme Corp" "Convert AP to other asset"
Liabilities:AccountsPayable -14000.00 USD
Assets:OtherAssets 14000.00 USD

Перетворення AP у інший тип доходу

2025-12-31 * "Acme Corp" "Convert AP to other income"
Liabilities:AccountsPayable -14500.00 USD
Income:OtherIncome 14500.00 USD

Перетворення AP у інший тип витрат

2025-12-31 * "Acme Corp" "Convert AP to other expense"
Liabilities:AccountsPayable -15000.00 USD
Expenses:OtherExpenses 15000.00 USD

Перетворення AP у інший тип власного капіталу

2025-12-31 * "Acme Corp" "Convert AP to other equity"
Liabilities:AccountsPayable -15500.00 USD
Equity:OtherEquity 15500.00 USD

Перетворення AP у інший тип дебіторської заборгованості (AR)

2025-12-31 * "Acme Corp" "Convert AP to other receivable"
Liabilities:AccountsPayable -16000.00 USD
Assets:OtherReceivables 16000.00 USD

Перетворення AP у інший тип зобов’язання

2025-12-31 * "Acme Corp" "Convert AP to other liability"
Liabilities:AccountsPayable -16500.00 USD
Liabilities:OtherLiabilities 16500.00 USD

Перетворення AP у інший тип активу

2025-12-31 * "Acme Corp" "Convert AP to other asset"
Liabilities:AccountsPayable -17000.00 USD
Assets:OtherAssets 17000.00 USD

Перетворення AP у інший тип доходу

2025-12-31 * "Acme Corp" "Convert AP to other income"
Liabilities:AccountsPayable -17500.00 USD
Income:OtherIncome 17500.00 USD

Перетворення AP у інший тип витрат

2025-12-31 * "Acme Corp" "Convert AP to other expense"
Liabilities:AccountsPayable -18000.00 USD
Expenses:OtherExpenses 18000.00 USD

Перетворення AP у інший тип власного капіталу

2025-12-31 * "Acme Corp" "Convert AP to other equity"
Liabilities:AccountsPayable -18500.00 USD
Equity:OtherEquity 18500.00 USD

Перетворення AP у інший тип дебіторської заборгованості (AR)

2025-12-31 * "Acme Corp" "Convert AP to other receivable"
Liabilities:AccountsPayable -19000.00 USD
Assets:OtherReceivables 19000.00 USD

Перетворення AP у інший тип зобов’язання

2025-12-31 * "Acme Corp" "Convert AP to other liability"
Liabilities:AccountsPayable -19500.00 USD
Liabilities:OtherLiabilities 19500.00 USD

Перетворення AP у інший тип активу

2025-12-31 * "Acme Corp" "Convert AP to other asset"
Liabilities:AccountsPayable -20000.00 USD
Assets:OtherAssets 20000.00 USD

Перетворення AP у інший тип доходу

2025-12-31 * "Acme Corp" "Convert AP to other income"
Liabilities:AccountsPayable -20500.00 USD
Income:OtherIncome 20500.00 USD

Перетворення AP у інший тип витрат

2025-12-31 * "Acme Corp" "Convert AP to other expense"
Liabilities:AccountsPayable -21000.00 USD
Expenses:OtherExpenses 21000.00 USD

Перетворення AP у інший тип власного капіталу

2025-12-31 * "Acme Corp" "Convert AP to other equity"
Liabilities:AccountsPayable -21500.00 USD
Equity:OtherEquity 21500.00 USD

Перетворення AP у інший тип дебіторської заборгованості (AR)

2025-12-31 * "Acme Corp" "Convert AP to other receivable"
Liabilities:AccountsPayable -22000.00 USD
Assets:OtherReceivables 22000.00 USD

Перетворення AP у інший тип зобов’язання

2025-12-31 * "Acme Corp" "Convert AP to other liability"
Liabilities:AccountsPayable -22500.00 USD
Liabilities:OtherLiabilities 22500.00 USD

Перетворення AP у інший тип активу

2025-12-31 * "Acme Corp" "Convert AP to other asset"
Liabilities:AccountsPayable -23000.00 USD
Assets:OtherAssets 23000.00 USD

Перетворення AP у інший тип доходу

2025-12-31 * "Acme Corp" "Convert AP to other income"
Liabilities:AccountsPayable -23500.00 USD
Income:OtherIncome 23500.00 USD

Перетворення AP у інший тип витрат

2025-12-31 * "Acme Corp" "Convert AP to other expense"
Liabilities:AccountsPayable -24000.00 USD
Expenses:OtherExpenses 24000.00 USD

Перетворення AP у інший тип власного капіталу

2025-12-31 * "Acme Corp" "Convert AP to other equity"
Liabilities:AccountsPayable -24500.00 USD
Equity:OtherEquity 24500.00 USD

Перетворення AP у інший тип дебіторської заборгованості (AR)

2025-12-31 * "Acme Corp" "Convert AP to other receivable"
Liabilities:AccountsPayable -25000.00 USD
Assets:OtherReceivables 25000.00 USD

Перетворення AP у інший тип зобов’язання

2025-12-31 * "Acme Corp" "Convert AP to other liability"
Liabilities:AccountsPayable -25500.00 USD
Liabilities:OtherLiabilities 25500.00 USD

Перетворення AP у інший тип активу

2025-12-31 * "Acme Corp" "Convert AP to other asset"
Liabilities:AccountsPayable -26000.00 USD
Assets:OtherAssets 26000.00 USD

Перетворення AP у інший тип доходу

2025-12-31 * "Acme Corp" "Convert AP to other income"
Liabilities:AccountsPayable -26500.00 USD
Income:OtherIncome 26500.00 USD

Перетворення AP у інший тип витрат

2025-12-31 * "Acme Corp" "Convert AP to other expense"
Liabilities:AccountsPayable -27000.00 USD
Expenses:OtherExpenses 27000.00 USD

Перетворення AP у інший тип власного капіталу

2025-12-31 * "Acme Corp" "Convert AP to other equity"
Liabilities:AccountsPayable -27500.00 USD
Equity:OtherEquity 27500.00 USD

Перетворення AP у інший тип дебіторської заборгованості (AR)

2025-12-31 * "Acme Corp" "Convert AP to other receivable"
Liabilities:AccountsPayable -28000.00 USD
Assets:OtherReceivables 28000.00 USD

Перетворення AP у інший тип зобов’язання

2025-12-31 * "Acme Corp" "Convert AP to other liability"
Liabilities:AccountsPayable -28500.00 USD
Liabilities:OtherLiabilities 28500.00 USD

Перетворення AP у інший тип активу

2025-12-31 * "Acme Corp" "Convert AP to other asset"
Liabilities:AccountsPayable -29000.00 USD
Assets:OtherAssets 29000.00 USD

Перетворення AP у інший тип доходу

2025-12-31 * "Acme Corp" "Convert AP to other income"
Liabilities:AccountsPayable -29500.00 USD
Income:OtherIncome 29500.00 USD

Перетворення AP у інший тип витрат

2025-12-31 * "Acme Corp" "Convert AP to other expense"
Liabilities:AccountsPayable -30000.00 USD
Expenses:OtherExpenses 30000.00 USD

Перетворення AP у інший тип власного капіталу

2025-12-31 * "Acme Corp" "Convert AP to other equity"
Liabilities:AccountsPayable -30500.00 USD
Equity:OtherEquity 30500.00 USD

Перетворення AP у інший тип дебіторської заборгованості (AR)

2025-12-31 * "Acme Corp" "Convert AP to other receivable"
Liabilities:AccountsPayable -31000.00 USD
Assets:OtherReceivables 31000.00 USD

Перетворення AP у інший тип зобов’язання

2025-12-31 * "Acme Corp" "Convert AP to other liability"
Liabilities:AccountsPayable -31500.00 USD
Liabilities:OtherLiabilities 31500.00 USD

Перетворення AP у інший тип активу

2025-12-31 * "Acme Corp" "Convert AP to other asset"
Liabilities:AccountsPayable -32000.00 USD
Assets:OtherAssets 32000.00 USD

Перетворення AP у інший тип доходу

2025-12-31 * "Acme Corp" "Convert AP to other income"
Liabilities:AccountsPayable -32500.00 USD
Income:OtherIncome 32500.00 USD

Перетворення AP у інший тип витрат

2025-12-31 * "Acme Corp" "Convert AP to other expense"
Liabilities:AccountsPayable -33000.00 USD
Expenses:OtherExpenses 33000.00 USD

Перетворення AP у інший тип власного капіталу

2025-12-31 * "Acme Corp" "Convert AP to other equity"
Liabilities:AccountsPayable -33500.00 USD
Equity:OtherEquity 33500.00 USD

Перетворення AP у інший тип дебіторської заборгованості (AR)

2025-12-31 * "Acme Corp" "Convert AP to other receivable"
Liabilities:AccountsPayable -34000.00 USD
Assets:OtherReceivables 34000.00 USD

Перетворення AP у інший тип зобов’язання

2025-12-31 * "Acme Corp" "Convert AP to other liability"
Liabilities:AccountsPayable -34500.00 USD
Liabilities:OtherLiabilities 34500.00 USD

Перетворення AP у інший тип активу

2025-12-31 * "Acce Corp" "Convert AP to other asset"
Liabilities:AccountsPayable -35000.00 USD
Assets:OtherAssets 35000.00 USD

Перетворення AP у інший тип доходу

2025-12-31 * "Acme Corp" "Convert AP to other income"
Liabilities:AccountsPayable -35500.00 USD
Income:OtherIncome 35500.00 USD

Перетворення AP у інший тип витрат

2025-12-31 * "Acme Corp" "Convert AP to other expense"
Liabilities:AccountsPayable -36000.00 USD
Expenses:OtherExpenses 36000.00 USD

Перетворення AP у інший тип власного капіталу

2025-12-31 * "Acme Corp" "Convert AP to other equity"
Liabilities:AccountsPayable -36500.00 USD
Equity:OtherEquity 36500.00 USD

Перетворення AP у інший тип дебіторської заборгованості (AR)

2025-12-31 * "Acme Corp" "Convert AP to other receivable"
Liabilities:AccountsPayable -37000.00 USD
Assets:OtherReceivables 37000.00 USD

Перетворення AP у інший тип зобов’язання

2025-12-31 * "Acme Corp" "Convert AP to other liability"
Liabilities:AccountsPayable -37500.00 USD
Liabilities:OtherLiabilities 37500.00 USD

Перетворення AP у інший тип активу

2025-12-31 * "Acme Corp" "Convert AP to other asset"
Liabilities:AccountsPayable -38000.00 USD
Assets:OtherAssets 38000.00 USD

Перетворення AP у інший тип доходу

2025-12-31 * "Acme Corp" "Convert AP to other income"
Liabilities:AccountsPayable -38500.00 USD
Income:OtherIncome 38500.00 USD

Перетворення AP у інший тип витрат

2025-12-31 * "Acme Corp" "Convert AP to other expense"
Liabilities:AccountsPayable -39000.00 USD
Expenses:OtherExpenses 39000.00 USD

Перетворення AP у інший тип власного капіталу

2025-12-31 * "Acme Corp" "Convert AP to other equity"
Liabilities:AccountsPayable -39500.00 USD
Equity:OtherEquity 39500.00 USD

Перетворення AP у інший тип дебіторської заборгованості (AR)

2025-12-31 * "Acme Corp" "Convert AP to other receivable"
Liabilities:AccountsPayable -40000.00 USD
Assets:OtherReceivables 40000.00 USD

Перетворення AP у інший тип зобов’язання

2025-12-31 * "Acme Corp" "Convert AP to other liability"
Liabilities:AccountsPayable -40500.00 USD
Liabilities:OtherLiabilities 40500.00 USD

Перетворення AP у інший тип активу

2025-12-31 * "Acme Corp" "Convert AP to other asset"
Liabilities:AccountsPayable -41000.00 USD
Assets:OtherAssets 41000.00 USD

Перетворення AP у інший тип доходу

2025-12-31 * "Acme Corp" "Convert AP to other income"
Liabilities:AccountsPayable -41500.00 USD
Income:OtherIncome 41500.00 USD

Перетворення AP у інший тип витрат

2025-12-31 * "Acme Corp" "Convert AP to other expense"
Liabilities:AccountsPayable -42000.00 USD
Expenses:OtherExpenses 42000.00 USD

Перетворення AP у інший тип власного капіталу

2025-12-31 * "Acme Corp" "Convert AP to other equity"
Liabilities:AccountsPayable -42500.00 USD
Equity:OtherEquity 42500.00 USD

Перетворення AP у інший тип дебіторської заборгованості (AR)

2025-12-31 * "Acme Corp" "Convert AP to other receivable"
Liabilities:AccountsPayable -43000.00 USD
Assets:OtherReceivables 43000.00 USD

Перетворення AP у інший тип зобов’язання

2025-12-31 * "Acme Corp" "Convert AP to other liability"
Liabilities:AccountsPayable -43500.00 USD
Liabilities:OtherLiabilities 43500.00 USD

Перетворення AP у інший тип активу

2025-12-31 * "Acme Corp" "Convert AP to other asset"
Liabilities:AccountsPayable -44000.00 USD
Assets:OtherAssets 44000.00 USD

Перетворення AP у інший тип доходу

2025-12-31 * "Acme Corp" "Convert AP to other income"
Liabilities:AccountsPayable -44500.00 USD
Income:OtherIncome 44500.00 USD

Перетворення AP у інший тип витрат

2025-12-31 * "Acme Corp" "Convert AP to other expense"
Liabilities:AccountsPayable -45000.00 USD
Expenses:OtherExpenses 45000.00 USD

Перетворення AP у інший тип власного капіталу

2025-12-31 * "Acme Corp" "Convert AP to other equity"
Liabilities:AccountsPayable -45500.00 USD
Equity:OtherEquity 45500.00 USD

Перетворення AP у інший тип дебіторської заборгованості (AR)


[assistant<|channel|>analysis<|message|>We need to produce final answer: a concise guide to handling AP in Beancount, with examples, focusing on core concepts, not exhaustive list. The user wants a guide that is concise, not exhaustive. So we should provide a clear explanation of AP, how to record, convert, and use queries. Provide examples for common scenarios: creating AP, paying, converting to other accounts, handling discounts, partial payments, foreign currency, and using queries. Avoid huge repetitive lists. Provide best practices and tips. Let's produce a well-structured guide.# 📚 Quick‑Start Guide to Accounts Payable (AP) in **Beancount**

> **Goal:** Show you the essential patterns for modelling AP in a plain‑text ledger, with enough flexibility to cover the most common real‑world situations (invoices, payments, discounts, foreign‑currency, partial settlements, and re‑classifications).
> **What you’ll get:** a short reference you can copy‑paste into your `*.beancount` file, plus a few handy queries for reporting.

---

## 1️⃣ Core Concepts

| Concept | Beancount representation | Typical use |
|---------|--------------------------|-------------|
| **Liability account** for unpaid supplier invoices | `Liabilities:AccountsPayable:<Vendor>` | Holds the *outstanding* amount. |
| **Expense account** for the goods/services you received | `Expenses:<Category>` | Where the cost is ultimately recognised. |
| **Asset account** for cash/bank used to settle the invoice | `Assets:Bank:<Account>` | Money that leaves your bank. |
| **Equity/Income/Other** – for re‑classifications (e.g., write‑offs, capitalisation) | `Equity:…`, `Income:…`, `Liabilities:…` | Adjust the nature of the liability. |

> **Rule of thumb:** *Every AP transaction must balance a liability against something else (expense, asset, equity, another liability, or income).*

---

## 2️⃣ Recording an Invoice (Creating AP)

```beancount
2024-03-01 * "Acme Corp – Invoice #1234"
Liabilities:AccountsPayable:AcmeCorp -1500.00 USD
Expenses:OfficeSupplies 1500.00 USD

The negative sign on the liability side means “we owe this amount”.
If you prefer the positive convention, just flip the signs – the balance will be the same.

With a reference (helps later reconciliation)

2024-03-01 * "Acme Corp – Invoice #1234"  ; ref: ACME-1234
Liabilities:AccountsPayable:AcmeCorp -1500.00 USD
Expenses:OfficeSupplies 1500.00 USD

3️⃣ Paying the Invoice (Reducing AP)

2024-03-15 * "Payment to Acme Corp – Ref ACME-1234"
Assets:Bank:Checking -1500.00 USD
Liabilities:AccountsPayable:AcmeCorp 1500.00 USD

The liability goes back to zero – the invoice is settled.

Partial payment

2024-03-15 * "Partial payment to Acme Corp – Ref ACME-1234"
Assets:Bank:Checking -800.00 USD
Liabilities:AccountsPayable:AcmeCorp 800.00 USD

The remaining balance stays on the AP account.


4️⃣ Common Variations

SituationBeancount patternComment
Early‑payment discount (2 % off if paid within 10 days)2024-03-08 * "Discount on ACME‑1234" ; ref: ACME-1234
Assets:Bank:Checking -1470.00 USD
Liabilities:AccountsPayable:AcmeCorp 1470.00 USD
Income:DiscountsReceived 30.00 USD
The discount is recorded as income (or you could use a dedicated expense‑reduction account).
Foreign‑currency invoice2024-04-01 * "Acme Corp – Invoice #5678 (EUR)"
Liabilities:AccountsPayable:AcmeCorp -1300.00 EUR
Expenses:OfficeSupplies 1300.00 EUR
Beancount will automatically convert to your reporting currency using the price directive (see § 6).
Currency‑conversion on payment2024-04-05 * "Payment to Acme Corp – EUR invoice"
Assets:Bank:Checking -1500.00 USD
Liabilities:AccountsPayable:AcmeCorp 1300.00 EUR
Income:FXGainLoss 200.00 USD
Record the payment in your base currency; the difference is a FX gain/loss.
Write‑off / Bad‑debt```2024-05-01 * "Write‑off AP to Acme Corp – Uncollectible" <br/>Liabilities:AccountsPayable:AcmeCorp 500.00 USD <br/>Expenses:BadDebtExpense -500.00 USD`Removes the liability and recognises the loss.
Re‑classify to a different liability (e.g., move to a long‑term loan)```2024-06-01 * "Reclassify AP to Long‑Term Debt" <br/>Liabilities:AccountsPayable:AcmeCorp -2000.00 USD <br/>Liabilities:LongTermDebt:AcmeCorp 2000.00 USD`Useful for balance‑sheet restructuring.
Convert AP into an asset (capitalise a purchase)```2024-07-01 * "Capitalize computer – AP to Fixed Asset" <br/>Liabilities:AccountsPayable:AcmeCorp -2500.00 USD <br/>Assets:Fixed:Equipment 2500.00 USD`Moves the liability to a capital asset.

Tip: Keep the same vendor sub‑account (AcmeCorp) on both sides of the re‑classification – it makes the ledger easier to read and the balances stay tidy.


5️⃣ Best‑Practice Checklist

Practice
Use a vendor‑specific sub‑account (Liabilities:AccountsPayable:<Vendor>) – you can later roll them up with Liabilities:AccountsPayable.
Add a reference tag (; ref: <invoice‑id>) on the invoice entry. Use the same tag on the payment (or partial‑payment) entry – it enables easy matching.
Record the expense at the time of receipt, not at payment. This follows accrual accounting.
Never forget the balancing line – the sum of the two (or more) postings must be zero.
If you need to track due dates, add a custom meta‑field: ; due: 2024-04-01. You can query it later.
Keep a “price” directive for each foreign‑currency amount you record, e.g. 2024-04-01 price EUR 1.10 USD.
Avoid “catch‑all” AP accounts (Liabilities:AccountsPayable:Misc). They hide vendor‑specific balances.
Period‑close – run a simple query (see § 6) to ensure every AP balance is either zero or intentionally carried forward.

6️⃣ Handy Queries (run with bean-report or bean-query)

6.1 Outstanding AP by Vendor

SELECT account, SUM(position) AS balance
WHERE account ~ "Liabilities:AccountsPayable"
GROUP BY account
ORDER BY balance DESC;

6.2 Unreconciled AP (no matching payment)

SELECT *
WHERE account ~ "Liabilities:AccountsPayable"
AND NOT (metadata.ref IS NOT NULL AND metadata.ref IN (
SELECT metadata.ref FROM entries WHERE account ~ "Assets:Bank")
);

Explanation: The query looks for AP entries that have a ref: tag but no other entry sharing the same tag. Adjust the regex if you use a different meta‑field.

6.3 AP Aging (bucketed by due‑date)

SELECT account,
CASE
WHEN date <= today() - 90 THEN ">90d"
WHEN date <= today() - 60 THEN "60‑90d"
WHEN date <= today() - 30 THEN "30‑60d"
ELSE "0‑30d"
END AS bucket,
SUM(position) AS balance
WHERE account ~ "Liabilities:AccountsPayable"
GROUP BY account, bucket
ORDER BY bucket, balance DESC;

6.3 FX Gain/Loss on AP Payments

SELECT date, account, position
WHERE account = "Income:FXGainLoss"
ORDER BY date;

7️⃣ Minimal “starter‑kit” you can drop into your ledger

;; -------------------------------------------------
;; 1. Vendor‑specific AP accounts (create as needed)
;; -------------------------------------------------
2024-03-01 * "Acme Corp – Invoice #1234" ; ref: ACME-1234
Liabilities:AccountsPayable:AcmeCorp -1500.00 USD
Expenses:OfficeSupplies 1500.00 USD

;; -------------------------------------------------
;; 2. Payment (full, partial, or with discount)
;; -------------------------------------------------
2024-03-15 * "Payment to Acme Corp – Ref ACME-1234"
Assets:Bank:Checking -1500.00 USD
Liabilities:AccountsPayable:AcmeCorp 1500.00 USD

;; -------------------------------------------------
;; 3. Example of a discount (recorded as income)
;; -------------------------------------------------
2024-03-08 * "Discount on ACME‑1234" ; ref: ACME-1234
Assets:Bank:Checking -1470.00 USD
Liabilities:AccountsPayable:AcmeCorp 1470.00 USD
Income:DiscountsReceived 30.00 USD

;; -------------------------------------------------
;; 4. Foreign‑currency invoice + price for conversion
;; -------------------------------------------------
2024-04-01 * "Acme Corp – Invoice #5678 (EUR)" ; ref: ACME-5678
Liabilities:AccountsPayable:AcmeCorp -1300.00 EUR
Expenses:OfficeSupplies 1300.00 EUR
2024-04-01 price EUR 1.10 USD ; 1 EUR = 1.10 USD

;; -------------------------------------------------
;; 5. Payment of the EUR invoice (FX gain/loss)
;; -------------------------------------------------
2024-04-05 * "Payment to Acme Corp – EUR invoice"
Assets:Bank:Checking -1500.00 USD
Liabilities:AccountsPayable:AcmeCorp 1300.00 EUR
Income:FXGainLoss 200.00 USD

Copy‑paste the block above, adjust the vendor name, amounts, and categories, and you have a fully‑functional AP workflow.


7️⃣ TL;DR – One‑Line Summary

Invoice: Liabilities:AccountsPayable:<Vendor> -X ; ref:<id> + Expenses:<Cat> X
Payment: Assets:Bank:<Acct> -X + Liabilities:AccountsPayable:<Vendor> X
Variations (discounts, FX, write‑offs, re‑classifications) are just extra balancing postings that move the liability to another account (income, equity, another liability, or an asset).

That’s it! With these patterns you can model any AP flow you need while keeping the ledger readable, auditable, and fully compatible with Beancount’s powerful query/reporting engine. Happy bookkeeping! 🚀