# Introduction

An introduction to Principal Plan.

## Overview

Principal Plan is a desktop personal finance application built around envelope budgeting.
Instead of only reviewing spending after the fact, you assign income to virtual Envelopes
as it arrives, giving every dollar a job before you spend it.

The application runs entirely on your computer. Your data is stored locally in a single
file, and there is no cloud account to create. Your financial data never leaves your
machine unless you pair the mobile app.

Principal Plan is available for Windows (via the Microsoft Store) and macOS (via the Mac App
Store).

A companion app for iPhone and Android shows the Envelope balances of one paired file on your
phone. See [Mobile app](Mobile_App.html) for the app and [Mobile pairing](Mobile_Pairing.html) for pairing it with
the desktop.

## Main window

The main window has three main areas: a left panel, a central workspace, and a menu bar
along the top.

### Left panel

The left panel contains three sections, shown either as tabs or stacked vertically:

- **Accounts** -- A tree view showing your financial Accounts. Each Account
  optionally displays its current balance and cleared balance. Accounts can be organized
  into groups and reordered by dragging.

- **Envelopes** -- A tree view showing your spending categories. Each Envelope
  optionally displays its current balance and cleared balance. Envelopes can be nested
  inside other Envelopes for hierarchical organization.

- **Templates** -- A list of reusable Transaction blueprints. Templates capture
  recurring patterns like monthly bills or regular income and feed into the
  [Allocation Plan](Allocation_Plan.html).

### Central content area

The central workspace uses tabs. Double-click an Account or Envelope in the left panel to
open a Ledger tab for that item's Transactions. You can keep multiple Ledgers open while
moving between Accounts and Envelopes.

Each Ledger tab includes a filter toolbar for narrowing the displayed Transactions by date,
clearing status, or custom criteria.

### Menu bar

The menu bar contains three menus:

**File** -- File operations and application settings:

- **New** -- Create a new Principal Plan file.
- **Open** -- Open an existing file.
- **Save** / **Save as** -- Save the current file.
- **Revert to original** -- Revert the file to the state it was in when first opened this session.
- **Import Transactions** -- Import Transactions from CSV, OFX/QFX, or QIF files.
- **Create checkpoint** / **Restore checkpoint** -- Save a snapshot of your data
  and restore the last one.
- **Mobile pairing** -- Pair a mobile device with the open file.
- **Settings** -- Open the settings dialog.
- **Exit application** -- Close Principal Plan.

**View** -- Open Ledger views and the budgeting tool:

- **Account Ledger** -- Choose an Account and open its Ledger in a tab.
- **Envelope Ledger** -- Choose an Envelope and open its Ledger in a tab.
- **Allocation Plan** -- Open the budget allocation dialog.

**Help** -- Help, registration, and licensing:

- **Help contents** -- Open the help website.
- **Website** -- Open the Principal Plan website.
- **License** -- Check your license status or purchase a license.
- **Registration** -- Open the registration and telemetry dialog.
- **About Principal Plan** -- View version information.

## Key features

### Envelope budgeting

The core workflow is simple: income arrives, you distribute it across Envelopes, and
spending draws from those Envelopes. This encourages a plan-before-you-spend habit.
Envelopes also support spending limits and Watchdog alerts for low balances.

### Allocation Plan

The [Allocation Plan](Allocation_Plan.html) is a forward-looking budget view. It uses your Templates to
project expected income and expenses, then shows how each deposit should be divided across
your Envelopes. You can view the plan by day, week, month, or year.

### Importing

Principal Plan imports Transaction data from bank downloads in CSV, OFX/QFX, and QIF
formats. The import system includes automatic Transaction matching to avoid duplicates,
payee and memo filtering, and a file watch feature that can monitor a download path and
trigger an import automatically.

### Search and replace

The [Search and replace](Search_Replace.html) tool operates on the visible Transactions in the current
Ledger. It can search in payee, memo, and code fields with options for case sensitivity and
exact matching.

### Reports

Three report dialogs provide financial summaries:

- [Account balance report](Account_Activity_Report.html) -- Current and cleared balances for selected Accounts
  as of a chosen date.
- [Envelope summary report](Envelope_Summary_Report.html) -- Envelope balances with Allocation Plan integration.
- [Envelope activity report](Envelope_Activity_Report.html) -- Allocation, expenses, and Transfers per Envelope
  over a date range.

Each report supports printing, print preview, copy to clipboard, and CSV export.

### Printing

Print preview renders Account and Envelope Ledgers before they are sent to the printer.
Ledger and report dialogs can print, preview, export, or copy their output where those
options are available.

### Backup and recovery

Automatic backups are created once per session when you save a changed file. If you open a
file and close it without making changes, no backup is created. The backup depth setting
controls how many backup copies are retained. A checkpoint saves a snapshot of your data
that you can restore later.

## Account types

Principal Plan supports twenty Account types:

| Type             | Description                                                                                       |
| ---------------- | ------------------------------------------------------------------------------------------------- |
| **Checking**     | A standard checking account.                                                                      |
| **Savings**      | A savings account.                                                                                |
| **Credit card**  | A credit card account. The balance represents the amount owed.                                    |
| **Cash**         | Physical cash on hand.                                                                            |
| **E-cash**       | Electronic cash accounts such as PayPal or Venmo.                                                 |
| **Investment**   | General investment accounts.                                                                      |
| **Group**        | An organizational container that holds other Accounts. Groups do not have their own Transactions. |
| **Loan**         | A personal or auto loan.                                                                          |
| **Mortgage**     | A home mortgage.                                                                                  |
| **Retirement**   | Retirement accounts such as 401(k) or IRA.                                                        |
| **Brokerage**    | A brokerage or trading account.                                                                   |
| **HSA**          | A Health Savings Account.                                                                         |
| **Crypto**       | Cryptocurrency wallets and exchanges.                                                             |
| **Prepaid**      | Prepaid debit cards.                                                                              |
| **Money market** | A money market account.                                                                           |
| **CD**           | A certificate of deposit.                                                                         |
| **Business**     | A business or commercial account.                                                                 |
| **Property**     | Real estate or other property assets.                                                             |
| **Insurance**    | Insurance policies with a cash value.                                                             |
| **Gift card**    | Gift cards and store credit.                                                                      |

## Transaction types

The Transaction editor exposes four Transaction types:

| Type                           | Description                                                                                                                                                                             |
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Simple**                     | A single deposit or payment in one Account assigned to one Envelope.                                                                                                                    |
| **Transfer**                   | Moves money between Accounts, between Envelopes, or both.                                                                                                                               |
| **Regular multiple**           | Splits one deposit or payment across multiple Envelope allocations. With **Enable Account Transfers in multiples** enabled, it can also transfer part of the amount to another Account. |
| **Multiple Envelope Transfer** | Moves budget amounts among multiple Envelopes in one Transaction.                                                                                                                       |

Each Transaction carries a date, amount, payee, memo, check code, and clearing status (none,
pending, or cleared).

## Languages

Principal Plan is available in six languages: English, German, Spanish, French, Italian,
and Portuguese. The language can be changed in the [Settings](Settings.html) dialog.

## Getting started

When you launch Principal Plan for the first time, the [Start Wizard](Start_Wizard.html) walks you
through creating your initial Accounts, setting up income Templates, and building a basic
Allocation Plan.

# Start Wizard

Create your first Principal Plan file.

![Start Wizard](images/Start_Wizard.png)

## Overview

The **Start Wizard** appears automatically when you launch Principal Plan for the
first time or create a new file. It walks through three setup steps: creating Accounts,
defining income Templates, and building an initial Allocation Plan (budget).

The wizard is modal. You must either complete it or click **Quit wizard** to dismiss
it. Every page includes a **Help** button that opens this help topic.

## Welcome page

The first page is an introduction. It explains the three steps the wizard will walk you
through:

1. Create Accounts.
2. Create Templates for income sources.
3. Create a simple Allocation Plan (budget).

Click **Next** to continue.

## Accounts page

The Accounts page asks you to create at least one Account record. Click **Add Account**
to open the [Account properties](Account_Properties.html) dialog where you enter the Account name and type.
You can add as many Accounts as you like by clicking **Add Account** again.

After you finish the wizard, open each Account Ledger and enter an opening Transaction if
you need to set an opening balance. That opening Transaction should usually match the
ending balance on your most recent bank statement. You can adjust Account properties and
balances later, so an estimate is enough to start.

At least one Account is required. If you try to advance without adding an Account, a warning
appears and you must go back and add one.

Click **Next** to continue.

## Income page

The income page asks you to create income Templates. Templates are reusable Transaction
blueprints. In this step you define your regular income sources so the Allocation Plan knows
how much money is available to budget.

Click **Add income** to open the [Create income Template](New_Allocation_Plan_Template.html) dialog. For each
income source, enter the payee or source in **Payable to** (for example, "Paycheck"), a
frequency (such as once every month), and an amount. The
Template is automatically included in the Allocation Plan.

You can add multiple income Templates by clicking **Add income** again. This step is
optional -- you can skip it and add income Templates later.

Click **Next** to continue. The wizard creates a default set of Envelopes and opens the
[Allocation Plan](Allocation_Plan.html) dialog so you can review and customize the budget before finishing.

## Default Envelopes

When the wizard advances past the income page, it creates eleven starter Envelopes with
default budget percentages:

| Envelope       | Percentage |
| -------------- | ---------- |
| Charity        | 10%        |
| Food           | 9%         |
| Housing        | 25%        |
| Insurance      | 8%         |
| Medical        | 8%         |
| Miscellaneous  | 5%         |
| Personal       | 5%         |
| Recreation     | 5%         |
| Savings        | 10%        |
| Transportation | 8%         |
| Utilities      | 7%         |

Each Envelope's allocation amount is calculated as its percentage of the total income defined
by your Templates. These Envelopes and their allocations can be renamed, reorganized, or
deleted after the wizard finishes.

## Allocation Plan review

After the default Envelopes are created, the [Allocation Plan](Allocation_Plan.html) dialog opens
automatically. This shows how each income deposit will be divided across your Envelopes. You
can adjust amounts, add Envelopes, or remove Envelopes here. When you close the Allocation
Plan dialog, the wizard advances to the final page.

## Final page

The final page confirms that setup is complete. The **Quit wizard** button is hidden on
this page because there is nothing left to cancel.

Click **Finish** to close the wizard and start using Principal Plan.

## Quitting the wizard

If you click **Quit wizard** on any page before the final page, the wizard closes and
creates a minimal default setup:

- If no Accounts were added, a single Account named "New Account" is created.
- If no Envelopes were added, the eleven default Envelopes listed above are created.

This ensures the application always has at least one Account and a set of Envelopes, even
if you skip the wizard entirely.

# Registration

Stay in touch and share anonymous usage data.

![Registration](images/Registration.png)

## Overview

The **Registration** dialog optionally records your contact information and controls
anonymous usage data sharing. Both options are completely voluntary and are off by default.

The dialog appears once automatically after the [Start Wizard](Start_Wizard.html) completes on first
launch. You can reopen it at any time from **Help** > **Registration**.

## Dialog controls

The dialog contains a checkable **Keep me informed** contact group and a separate
**Share anonymous usage data** checkbox.

### Keep me informed

The **Keep me informed** group enables contact registration. When checked, the
contact fields within the group become active:

- **Email** -- Your email address.
- **First name** -- Your first name.
- **Last name** -- Your last name.

At least one name (first or last) and a valid email address are required. The **OK**
button is disabled until these requirements are met. When unchecked, the contact fields are
grayed out and no registration data is sent.

When you click **OK** with this option checked, your contact information is sent to the
Principal Plan registration server. If you reopen the dialog later and click **OK**
again, the registration is re-sent with your current information, allowing you to update your
name or email.

### Share anonymous usage data

The **Share anonymous usage data** checkbox enables anonymous telemetry. When checked,
Principal Plan periodically sends basic usage statistics including the application version,
platform, session count, and language setting.

Telemetry does not begin immediately. When you first enable this option, a random delay of
7 to 30 days is set before the first transmission. This delay is applied only once; if you
later disable and re-enable telemetry, it resumes without a new delay.

### OK and Help

Click **OK** to save your choices and close the dialog. Click **Help** to open
this help topic.

## Privacy

Principal Plan uses two separate, unrelated identifiers to keep contact data and usage data
completely independent:

- **Contact identifier** -- Generated when the application is first installed. Sent only
  with registration data (your name and email). Never included in telemetry.

- **Telemetry identifier** -- A separate, anonymous identifier also generated on first
  install. Sent only with usage statistics. Never associated with your contact information.

Because these identifiers are independent, there is no way to link your anonymous usage data
to your contact registration, even if you opt into both.

### What is sent

|                     | Registration | Telemetry    |
| ------------------- | ------------ | ------------ |
| Name and email      | Yes          | No           |
| Application version | Yes          | Yes          |
| Platform            | Yes          | Yes          |
| Session count       | No           | Yes          |
| Language            | No           | Yes          |
| Personal identifier | Contact ID   | Anonymous ID |

### What is not sent

No financial data, file contents, Transaction details, Account names, Envelope names, or
balances are ever sent with registration or telemetry. Financial data leaves your computer
only if you pair the mobile app, which receives the Envelope names and balances you choose.

# License

Purchase or upgrade your Principal Plan license.

![License](images/License.png)

## Overview

The **License** dialog shows your current license status and provides purchase and
upgrade options. Open it from **Help** > **License...**.

## License options

The dialog presents three purchase options:

- **Monthly** -- A recurring monthly subscription.
- **Annual** -- A recurring annual subscription.
- **Forever** -- A one-time purchase that never expires.

Each button displays its price as retrieved from the Microsoft Store (Windows) or App Store
(macOS). If prices cannot be loaded (for example, when offline), the buttons show a
placeholder.

Clicking a purchase button launches the store purchase flow. When the purchase completes,
the dialog updates to show your active license.

Below the purchase options, links to the **Privacy Policy** and **Terms of Use** open the
corresponding pages in your web browser.

## Upgrading

If you already hold a license, the dialog shows which tier is active. You can upgrade or
switch tiers:

- **Monthly held** -- The **Monthly** button is disabled. You can switch to
  **Annual** or upgrade to **Forever**.
- **Annual held** -- The **Annual** button is disabled. You can switch to
  **Monthly** or upgrade to **Forever**.
- **Forever held** -- All purchase buttons are disabled. There is nothing further
  to purchase.

## Offline behavior

License verification normally requires a connection to the store. If the store is
unreachable, Principal Plan uses the file's saved license and trial state to decide access.

Files previously saved while licensed continue to open with full access. Files that are
still within their trial period continue to open with trial access. If the file is not
licensed and the trial has expired, the file is closed and a new file is created until the
license can be verified or a license is purchased.

# Envelope budgeting

The budgeting philosophy behind Principal Plan.

## Overview

Envelope budgeting assigns every dollar of income to a job as soon as it arrives. The name
comes from the old practice of dividing cash into physical envelopes labeled with spending
categories -- groceries, rent, entertainment, and so on. When an envelope is empty,
spending in that category stops until new income refills it.

Principal Plan implements this model digitally. You create virtual Envelopes for spending
and saving categories, then assign each non-Transfer Account Transaction to the appropriate
Envelope or Envelopes. Deposits and payments update the Account view and the Envelope view
at the same time.

## How it works

The envelope budgeting cycle in Principal Plan follows two steps:

### 1. Income arrives and is allocated

When you receive income -- a paycheck, a refund, or any other deposit -- it enters one of
your Accounts and is assigned to one or more Envelopes in the same Transaction. The
[Allocation Plan](Allocation_Plan.html) helps you decide how much of each deposit should go to each
Envelope based on the frequency and amount of your expected bills and savings goals.

For example, if your rent is $1,200 per month and you are paid twice a month, the plan
might allocate $600 from each paycheck to your "Rent" Envelope.

### 2. Spend from Envelopes

When you spend money, the Transaction draws from both an Account (where the money
physically leaves) and an Envelope (the category that funded the purchase). The Account
balance and the Envelope balance decrease at the same time.

If an Envelope runs low, the Watchdog system can alert you before you overspend. Each
Envelope can have a spending limit that triggers a **Watchdog alert** when the
balance drops below it.

## Why envelope budgeting

Traditional budgeting often looks backward: you review what you spent last month and try to
adjust. Envelope budgeting looks forward: you decide where money goes before you spend it.
This shift from reactive to proactive budgeting has several benefits:

- **No surprise shortfalls.** Bills are funded before discretionary spending happens.
- **Built-in spending limits.** Each Envelope acts as a natural cap on its category.
- **Clear trade-offs.** Moving money from one Envelope to another makes the cost of a
  decision visible.
- **Debt reduction.** By allocating money to debt payment Envelopes first, you ensure
  consistent payments regardless of other spending.

## Envelopes and Accounts

Principal Plan tracks every Transaction from two angles simultaneously: the Account it
affects and the Envelope it draws from. Accounts represent where your money physically
lives (a bank, a wallet, a credit card). Envelopes represent what your money is for (rent,
groceries, savings). See the [Principal Plan's Envelope model](PPlan_Envelope_Model.html) and
[Accounts vs. Envelopes](Accounts_vs_Envelopes.html) topics for more detail on how this dual tracking works.

## Templates and the Allocation Plan

Templates capture your recurring financial patterns -- a monthly rent payment, a biweekly
paycheck, a quarterly insurance bill. Each Template records the amount, frequency, Account,
and Envelope for a Transaction that happens on a regular schedule.

The [Allocation Plan](Allocation_Plan.html) uses your Templates to build a forward-looking budget view. It
shows how each income deposit should be divided across your Envelopes, normalized to a
common time frame (daily, weekly, monthly, or yearly). This is the core planning tool that
makes envelope budgeting work at scale.

## Getting started

If you are new to envelope budgeting, start with a small structure:

1. Create a few broad Envelopes -- housing, food, transportation, savings.
2. Set up income Templates for your regular deposits.
3. Use the [Allocation Plan](Allocation_Plan.html) to decide how income should be divided across Envelopes.
4. As the system becomes familiar, split broad Envelopes into more specific ones.

The [Start Wizard](Start_Wizard.html) walks you through this process when you first launch
Principal Plan.

# Principal Plan's Envelope model

How Principal Plan tracks money across Accounts and Envelopes simultaneously.

## Overview

Principal Plan tracks every dollar from two angles. Accounts show where money physically
lives -- which bank, wallet, or credit card. Envelopes show what the money is for -- the
budget category assigned to each dollar. Every Transaction is recorded in both systems at
the same time, and the two must always agree.

This dual-tracking model lets envelope budgeting work alongside traditional account
management.

## Dual balances

Every Account and every Envelope maintains two running balances:

| Balance     | Description                                                                                                                                                                                                                                |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Balance** | The total of all Transactions assigned to this Account or Envelope.                                                                                                                                                                        |
| **Cleared** | The total of Transactions marked as cleared on that side. For Accounts, this typically matches what the bank reports. For Envelopes, it reflects items you have marked settled for that budget purpose (for example, reimbursed expenses). |

The **Balance** column updates as Transactions are created, edited, or deleted. The
**Cleared** column updates as you clear Transactions -- during bank reconciliation on
the Account side, or as you mark items settled on the Envelope side.

## Every Transaction touches both sides

When you enter a Transaction -- say a $50 grocery purchase -- you assign it to both an
Account (your checking account, where the $50 leaves) and an Envelope (your groceries
Envelope, where the $50 is budgeted). The checking Account balance and the groceries
Envelope balance both decrease by $50.

The result is:

- The sum of all Account balances always equals the sum of all Envelope balances.
- You can answer "how much money do I have at First National?" (Account view) and "how
  much have I budgeted for groceries?" (Envelope view) from the same data.

## Independent clearing

Each Transaction carries two independent clearing states -- one for the Account side and one
for the Envelope side. A Transaction can be cleared in your Account (your bank confirms it)
without being cleared in your Envelope, and vice versa.

**Account clearing** is for reconciling against bank or credit card statements. Mark
Transactions as they appear on the statement; the Account cleared balance should match the
statement ending balance. See [Reconciling an Account](Reconciling.html).

**Envelope clearing** is optional bookkeeping by purpose. Use it when you want a cleared
balance for a budget category that is not the same as "what the bank has posted." Classic
examples are reimbursable medical or business expenses that may hit several Accounts over
time: leave those expenses uncleared in the Envelope until they are reimbursed, then clear
them when settlement arrives. The Envelope cleared balance then shows what is still
outstanding for that purpose, regardless of which Account paid for each item.

This independence lets you reconcile your bank statement without affecting Envelope
tracking, and track reimbursements or other category-level settlement without changing
Account reconciliation.

## Integrity

Principal Plan checks balance integrity every time a file is opened:

1. The total Account balance must equal the total Envelope balance.
2. Both stored balances must match a fresh calculation from all Transaction records.
3. Every Transaction must have both a valid Account and a valid Envelope assignment.

If any check fails, the file is reported as corrupt. These checks keep the dual-tracking
model consistent, so money cannot appear in one view without being accounted for in the
other.

## Transfers

Transfers move money between Accounts without affecting Envelopes. When you transfer $500
from checking to savings, the checking balance decreases and the savings balance increases,
but no Envelope balance changes. The money was already allocated to its Envelopes -- moving
it between Accounts does not change its purpose.

Envelope Transfers work the other way: they move money between Envelopes without affecting
Accounts. This lets you reallocate your budget without moving money between banks.

## Hierarchy

Both Accounts and Envelopes support hierarchical organization. Accounts can be grouped
into Account groups (for example, grouping all retirement Accounts together). Envelopes can
be nested inside other Envelopes (for example, a "Housing" parent with "Rent" and
"Utilities" children). Parent nodes show the combined balance of all their descendants.

# Accounts vs. Envelopes

Understanding the difference between Accounts and Envelopes.

## Overview

Accounts and Envelopes are the two fundamental organizing structures in Principal Plan.
They track different aspects of the same money. Understanding the difference makes the rest
of the application easier to use.

**Accounts** represent where your money physically lives -- a checking account, a credit
card, or cash in your wallet.

**Envelopes** represent what your money is for -- rent, groceries, savings, or
entertainment.

Most day-to-day Transactions appear in both views. Transfers can appear only in the Account
view or only in the Envelope view, depending on whether you are moving money between real
financial accounts or reallocating money between budget categories.

## Key differences

|                     | Accounts                                                                                                                                                                                                                                                                           | Envelopes                                                               |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| **Represents**      | A real-world financial container (bank, wallet, card)                                                                                                                                                                                                                              | A virtual budget category (purpose, goal)                               |
| **Types**           | 20 types: **Checking**, **Savings**, **Credit card**, **Cash**, **E-cash**, **Investment**, **Group**, **Loan**, **Mortgage**, **Retirement**, **Brokerage**, **HSA**, **Crypto**, **Prepaid**, **Money market**, **CD**, **Business**, **Property**, **Insurance**, **Gift card** | No types -- Envelopes are generic categories shaped by name and purpose |
| **Watchdog**        | No                                                                                                                                                                                                                                                                                 | Yes -- alerts when the balance drops below a limit                      |
| **Allocation Plan** | No                                                                                                                                                                                                                                                                                 | Yes -- Envelopes can be flagged for inclusion                           |
| **Web address**     | Yes -- links to the institution's website                                                                                                                                                                                                                                          | No                                                                      |
| **Opening balance** | Entered as an Account Transaction after creating the Account                                                                                                                                                                                                                       | No                                                                      |
| **Balance display** | Set for the whole list in Settings                                                                                                                                                                                                                                                 | Set for the whole list in Settings, and can be hidden per Envelope      |
| **Grouping**        | Account groups (a special type)                                                                                                                                                                                                                                                    | Nested parent/child Envelopes                                           |

## When to use each

Create an **Account** for each place where you hold money:

- Your checking account
- Your savings account
- Each credit card
- Cash on hand
- Investment or retirement accounts

Create an **Envelope** for each purpose you budget for:

- Fixed expenses: rent, utilities, insurance
- Variable expenses: groceries, dining, transportation
- Savings goals: emergency fund, vacation, new car
- Debt payments: credit card payoff, loan payments

## How they work together

When income arrives as a deposit into your checking account, the Account balance goes up.
You then allocate that income across your Envelopes using the [Allocation Plan](Allocation_Plan.html),
which raises the Envelope balances.

When you spend, the Transaction reduces both the Account balance (money left the bank) and
the Envelope balance (budget for that category was used). The money is gone from both views
at the same time.

When you transfer between Accounts (checking to savings), no Envelope is affected -- the
money still has the same purpose. When you transfer between Envelopes (moving budget from
dining to groceries), no Account is affected -- the money still lives in the same bank.

## Balance equality

Principal Plan keeps the Account view and Envelope view in balance. Day-to-day deposits and
spending usually change both views, while Account Transfers and Envelope Transfers move
money within one view without changing the total. The balance of each view is always the
same.

# Using credit cards

How credit cards work within the envelope budgeting model.

## Overview

Credit cards can be confusing in envelope budgeting because the purchase and the bill
payment happen at different times. Principal Plan handles this by debiting the Envelope
when you spend. Paying the credit card bill is an Account Transfer and does not touch any
Envelope.

## Setting up a credit card

Create a new Account and set its type to **Credit card**. The Account balance
represents the amount you owe. A new credit card with no charges starts at zero; as you
make purchases, the balance goes negative (reflecting debt).

## Making a purchase

A credit card purchase is recorded the same way as any other Transaction. You enter the
date, payee, and amount, then assign it to the credit card Account and the appropriate
Envelope.

For example, buying $40 of groceries on your credit card:

- The credit card Account balance decreases by $40 (you now owe $40 more).
- The groceries Envelope balance decreases by $40 (you spent $40 of your grocery budget).

The key point: **the Envelope is debited at the time of purchase, not at the time of
payment.** Your budget changes as soon as you make the purchase.

## Paying the bill

When you pay your credit card bill, you record an Account Transfer from your checking
Account to the credit card Account. For example, paying $500 toward the card:

- The checking Account balance decreases by $500.
- The credit card Account balance increases by $500 (you now owe $500 less).
- No Envelope balance changes.

No Envelope is affected because the money was already budgeted and deducted when each
purchase was entered. The payment only moves money between Accounts.

## Why this works

This approach keeps both views accurate:

- **Envelope balances** reflect how much budget remains in each category, regardless of
  which Account was used to pay. A $40 grocery charge reduces the grocery Envelope whether
  you used cash, debit, or credit.
- **Account balances** reflect your actual position with each financial institution. The
  credit card Account shows what you owe; checking shows what you have on hand.

## Reconciling a credit card

Reconciling a credit card works the same as any other Account. When your credit card
statement arrives, open the credit card's Account Ledger, view pending Transactions, and
mark each one as cleared as it appears on the statement. The cleared balance should match
the statement balance.

## Common mistakes

- **Do not wait until the bill arrives to enter purchases.** Enter each Transaction when it
  happens so your Envelope balances stay current.
- **Do not debit an Envelope when paying the bill.** The bill payment is just an Account
  Transfer. Debiting an Envelope would double-count the expense.
- **Do not use a "Credit Card Payment" Envelope.** The payment moves money between Accounts,
  not between budget categories. Creating a payment Envelope leads to confusing balances.

# Handling debt

Managing loans, mortgages, and other debt with envelope budgeting.

## Overview

Principal Plan provides three Account types for tracking debt: **Credit card**,
**Loan**, and **Mortgage**. All three work the same way: the Account carries a
negative balance that represents the amount you owe. Pair the debt Account with a debt
Envelope so the Account view and Envelope view track the same obligation.

For credit card spending, see the [Using credit cards](Using_Credit_Cards.html) topic.

## Setting up debt

1. Create a debt Envelope, such as "Car Loan," "Mortgage," or "Student Loan."
2. Create a new Account and choose **Loan**, **Mortgage**, or
   **Credit card** as the type.
3. In the new Account's Ledger, enter an opening Transaction for the current amount owed as
   a negative number (for example, -15,000 for a $15,000 car loan), and assign that
   Transaction to the matching debt Envelope.

After setup, the debt Account and debt Envelope show the same negative balance. You can use
one debt Envelope for multiple debt Accounts if you want to track them as a combined
obligation. Because a debt Envelope is intentionally negative, turn off its Watchdog.

## Budgeting for payments

Allocate income to the debt Envelope when you receive money. This sets money aside for the
payment and decreases the negative balance in the Envelope view.

For example, allocating $400 to a "Car Loan" Envelope changes the Envelope balance from
-15,000 to -14,600. The Account balance remains -15,000 until you actually pay the lender.

## Paying the bill

When the bill is due, record an Account Transfer from your payment source (typically
checking) to the debt Account:

- The checking Account balance decreases by the payment amount.
- The debt Account balance increases (moves closer to zero).
- The debt Envelope balance does not change, because you already allocated the payment
  money to that Envelope when the income arrived.

After the Transfer, the debt Account and debt Envelope match again. In the example above,
both show -14,600 after the $400 payment is recorded.

## Recurring payments with Templates

Most debt payments happen on a regular schedule. You can create a Transaction Template for
the payment Transfer from checking to the debt Account.

Use the [Allocation Plan](Allocation_Plan.html) to allocate income to the debt Envelope. Use a separate
payment Template to create the Account Transfer when the bill is due.

## Interest and fees

Interest charges and fees from the lender increase the debt. Record them as Account
Transactions in the debt Account. You can assign those Transactions to the matching debt
Envelope too, so both views continue to match. Some users create a separate "Interest"
Envelope to track how much they are paying in interest over time. If you track interest
separately, allocate income to that Envelope as well so it remains funded.

## Tracking progress

Open the debt Account's Ledger to see payments and charges. Open the debt Envelope's Ledger
to see the budget activity for the same obligation. As payments accumulate, both balances
move toward zero.

The **Envelope activity** report can show how much you have allocated and spent on
debt payments over any date range, helping you track progress against your payoff plan.

## Multiple debts

If you have multiple debts, consider organizing them in an Account group. Create a
**Group** Account called "Debt" and drag your loan, mortgage, and credit card Accounts
into it. The group's balance shows your total debt at a glance.

Similarly, you can nest debt Envelopes under a parent "Debt Payments" Envelope to see your
total debt obligation in one place.

# Transaction workflow

The lifecycle of a Transaction from creation through clearing.

## Overview

A Transaction records a financial event in Principal Plan: a purchase, a deposit, a
Transfer, or a split. Each Transaction moves from creation through optional clearing and
reconciliation.

## Transaction fields

Each Transaction carries the following information:

| Field          | Description                                                                    |
| -------------- | ------------------------------------------------------------------------------ |
| **Date**       | The date the Transaction occurred.                                             |
| **Payable to** | The payee or description of the Transaction.                                   |
| **Amount**     | The Transaction amount, entered as either a **Payment** or **Deposit**.        |
| **Code**       | An optional reference such as a check number.                                  |
| **Memo**       | An optional note.                                                              |
| **Account**    | The Account the Transaction affects.                                           |
| **Envelope**   | The Envelope the Transaction draws from or credits.                            |
| **Cleared**    | Two independent clearing states, one for the Account and one for the Envelope. |

## Transaction types

Principal Plan supports four Transaction types:

| Type                           | Description                                                                                                                                                                          |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Simple**                     | A single deposit or payment in one Account assigned to one Envelope.                                                                                                                 |
| **Transfer**                   | Moves money between Accounts, between Envelopes, or both. Use it when money changes location or budget category without creating new income or spending.                             |
| **Regular multiple**           | Splits one deposit or payment across multiple Envelope allocations. If **Enable Account Transfers in multiples** is enabled, it can also move part of the amount to another Account. |
| **Multiple Envelope Transfer** | Moves budget amounts among multiple Envelopes in one Transaction. Use it to redistribute money across several Envelope categories.                                                   |

## Creating a Transaction

Open an Account or Envelope Ledger by double-clicking an item in the left panel. In the
Ledger, use the **Add new Transaction** button or Ctrl+Insert to open the Transaction
editor. In the editor, use **Save & new** to save and start another Transaction, or
**Save & close** to save and return to the Ledger. The Transaction editor includes
fields for the Transaction information listed above.

Auto-complete is available for the **Payable to** and **Code** fields, drawing
from your Transaction history. When you select a payee from the auto-complete list, the
other fields are filled in from the most recent matching Transaction.

Templates can also pre-fill a new Transaction. Use **Create Transaction** from the
right-click menu in the **Templates** list, or apply a Template from within the
Transaction editor.

## Editing a Transaction

Double-click a Transaction in the Ledger to open it for editing. All fields can be changed.
Changing the amount of a cleared Transaction does not change its clearing state.

## Clearing states

Each Transaction has two independent clearing states -- one for the Account side and one for
the Envelope side. Account clearing supports bank reconciliation. Envelope clearing is
optional tracking by purpose (for example, unreimbursed medical or business expenses). See
[Principal Plan's Envelope model](PPlan_Envelope_Model.html). The three states are:

| State       | Display | Description                                                        |
| ----------- | ------- | ------------------------------------------------------------------ |
| Not cleared | (blank) | The Transaction has not been verified.                             |
| Pending     | \*      | The Transaction has been marked by the user during reconciliation. |
| Cleared     | X       | The Transaction has been confirmed and saved.                      |

Toggle a Transaction between not cleared and pending by clicking the cleared column or
selecting **Toggle cleared** from the right-click menu. In an Account Ledger this
toggles Account clearing; in an Envelope Ledger it toggles Envelope clearing. When a file is
saved, pending Transactions are promoted to cleared.

## Importing Transactions

When Transactions are imported from a bank download (CSV, OFX/QFX, or QIF), the import
system attempts to match them against existing records. Matched Transactions have their
clearing state promoted to pending, confirming that the bank has processed them. Unmatched
Transactions are created as new records.

Imported Transactions can be identified using the **Filter Ledger** option
**Freshly imported or synchronized**.

## Deleting a Transaction

Select a Transaction in the Ledger and delete it from the right-click menu. A confirmation
dialog appears before the Transaction is removed. Deleting a Transfer or split Transaction
also removes its related records (the buddy or child items).

# Reconciling an Account

Verifying your records against bank statements.

## Overview

Reconciling compares your Principal Plan records against a bank or credit card statement to
confirm that both sides agree. Principal Plan provides a cleared balance, clearing toggles,
and Ledger filters that together serve as the reconciliation workflow.

## How it works

When your bank statement arrives (paper or online), follow these steps:

1. **Open the Account Ledger.** Double-click the Account in the **Account list** to
   open its Ledger tab.

2. **Filter to uncleared Transactions.** Use the view menu or filter toolbar to show only
   pending items. The **View pending** option shows all uncleared Transactions. More
   specific filters like **View pending checks** and **View pending deposits**
   can help you work through the statement section by section.

3. **Mark each Transaction.** As you find each Transaction on the statement, click the
   cleared column or select **Toggle cleared** from the right-click menu. The
   Transaction changes from blank (not cleared) to a \* (pending).

4. **Compare balances.** The Ledger footer shows the running cleared balance. Compare this
   against the ending balance on your statement. When they match, reconciliation is
   complete.

5. **Investigate differences.** If the balances do not match, look for transactions that
   appear on the statement but not in your Ledger (missed entries), or Transactions in your
   Ledger that the bank has not yet processed (outstanding items).

## Clearing states

Each Transaction carries two independent clearing states -- one for the Account and one for
the Envelope. During Account reconciliation, only the Account-side clearing state changes.

Envelope clearing is separate. It does not follow bank statements; it lets you track
settlement by budget purpose. For example, medical or business expenses charged across
checking and credit cards can stay uncleared in a Medical or Business Envelope until
reimbursement arrives, then be cleared when they are paid back. The Envelope cleared balance
shows what is still outstanding for that category. Toggle Envelope clearing from the
[Envelope Ledger](Envelope_Ledger.html), not from the Account Ledger. See [Principal Plan's Envelope model](PPlan_Envelope_Model.html)
for more on independent clearing.

The three states are:

| State       | Indicator | Description                                                                |
| ----------- | --------- | -------------------------------------------------------------------------- |
| Not cleared | (blank)   | The Transaction has not been verified against a statement.                 |
| Pending     | \*        | You have marked the Transaction during the current reconciliation session. |
| Cleared     | X         | The Transaction has been confirmed and the file has been saved.            |

When you save the file, all pending Transactions are promoted to cleared. Pending is only a
working state for the current session, so you can see what you just marked separately from
Transactions cleared earlier.

## The cleared balance

The cleared balance is the sum of all Transactions that are not in the "Not cleared" state.
It appears in two places:

- **The Ledger footer** -- Shows the running cleared balance when the Ledger is in cleared
  balance mode.
- **The Account list** -- The **Cleared** column shows the cleared balance for each
  Account.

The cleared balance corresponds to what your bank knows about. Transactions you have entered
but the bank has not yet processed (outstanding checks, pending deposits) are excluded from
the cleared balance but included in the full balance.

## Ledger filters

Several built-in filters help during reconciliation:

| Filter                      | Description                                       |
| --------------------------- | ------------------------------------------------- |
| **View pending**            | Shows all Transactions that are not yet cleared.  |
| **View pending checks**     | Shows uncleared Transactions with a check code.   |
| **View pending deposits**   | Shows uncleared deposit Transactions.             |
| **View pending non-checks** | Shows uncleared Transactions that are not checks. |

The custom filter dialog also provides a **Filter by cleared state** option with
choices for any state, cleared only, not cleared only, or not cleared and pending.

# Main window

Overview of the Principal Plan main window.

![Main window](images/Main_Window.png)

## Overview

The main window is divided into two areas separated by a draggable splitter: a left panel
containing the **Accounts**, **Envelopes**, and **Templates** lists, and a
central content area that displays Ledger tabs.

## Left panel

The left panel can operate in two modes, selectable in [Settings](Settings.html):

- **Tab mode** -- The three lists appear as tabs. Click the **Accounts**,
  **Envelopes**, or **Templates** tab along the bottom to switch between them.
- **Splitter mode** -- All three lists are stacked vertically. Drag the dividers between them
  to adjust how much space each list receives.

Each list has its own toolbar with buttons for adding, deleting, and managing items. See the
individual help topics for details:

- **Account list** -- Managing your Accounts.
- **Envelope list** -- Managing your Envelopes.
- **Templates** -- Managing Transaction Templates.

## Central content area

The central area uses a tabbed interface for viewing Account and Envelope Ledgers. Tabs can
be opened in several ways:

- Double-click an Account or Envelope in the left panel.
- Select **View** > **Account Ledger** or **View** >
  **Envelope Ledger** from the menu bar.
- Use the keyboard shortcuts Ctrl+A (Account Ledger) or Ctrl+E (Envelope Ledger).

Multiple tabs can be open at the same time. Tabs can be reordered by dragging and closed
with the X button on each tab or by pressing Ctrl+W.

## Menu bar

The menu bar contains three menus:

- **File** -- Create, open, save, import, and configure.
- **View** -- Open Ledger views and the **Allocation Plan**.
- **Help** -- Access help, registration, licensing, and version information.

See [Introduction](Introduction.html) for a full listing of menu items.

## Window title

The window title shows the name of the currently open file followed by "Principal Plan"
and the version number.

## Splitter

The divider between the left panel and the central content area can be dragged to resize
either side. The splitter position is saved and restored between sessions.

# Account list

The Accounts tab in the main window.

![Account list](images/Account_List.png)

## Overview

The **Account list** is the first section of the left panel. It shows your financial
Accounts in a tree view, with groups acting as folders for other Accounts. The list can
show each Account's current balance and cleared balance, controlled by the
**Display balance** and **Display cleared balance** options in
[Settings — Accounts](Settings_Accounts.html).

Double-click an Account to open its Ledger in a new tab.

## Columns

The Account list can display three columns:

| Column      | Description                                                                                                                                            |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Account** | The Account name and type icon. Group Accounts display a folder icon. Always shown.                                                                    |
| **Balance** | The current balance of the Account, including all Transactions. Optional -- see [Settings — Accounts](Settings_Accounts.html).                         |
| **Cleared** | The balance considering only cleared Transactions. This matches what your bank reports. Optional -- see [Settings — Accounts](Settings_Accounts.html). |

Column widths can be adjusted by dragging the dividers in the header row.

## Toolbar

The toolbar along the top of the Account list provides quick access to common actions:

| Button   | Tooltip                               | Description                                                                                                                           |
| -------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| Add      | **Add new Account**                   | Adds a new Account or Account group. Clicking the button shows a menu with **Insert Account** and **Insert Account group** options.   |
| Delete   | **Delete selected Account**           | Deletes the selected Account. A confirmation dialog appears first.                                                                    |
| Import   | **Import Transactions**               | Opens the import dialog to bring in Transactions from a CSV, OFX/QFX, or QIF file.                                                    |
| Print    | **Print Account list**                | Prints the Account list.                                                                                                              |
| Website  | **Open website for selected Account** | Opens the web address associated with the selected Account in your default browser. The web address is set in **Account properties**. |
| Settings | **Account list settings**             | Opens a settings dialog for the Account list display options.                                                                         |
| Help     | **Account list help**                 | Opens this help topic.                                                                                                                |

## Right-click menu

Right-clicking in the Account list opens a context menu with the following actions:

- **Insert Account** -- Creates a new Account under the selected group.
- **Insert Account group** -- Creates a new Account group under the selected group.
- **Delete** -- Deletes the selected Account or Accounts.
- **Sort by _column_ ascending** / **Sort by _column_ descending** -- Shown only when you
  right-click an Account **group**. Sorts the Accounts within that group by the column you right-clicked, ascending or descending.
- **Open website** -- Opens the web address for the selected Account.
- **Edit properties** -- Opens the **Account properties** dialog for the
  selected Account.

## Organizing Accounts

Accounts can be organized into groups. A group is a special Account type that acts as a
folder and does not have its own Transactions. To create one, use the add button and select
**Insert Account group**.

Drag Accounts and groups to reorder them. You can drag an Account into a group to nest it,
or drag it out to move it to a different level.

## Selection

The Account list supports extended selection. Click to select a single Account, hold Ctrl
and click to add Accounts to the selection, or hold Shift and click to select a range. The
delete and properties actions work on the current selection.

## Editing Account names

Account names can be edited directly in the list by slowly double-clicking (click once to
select, then click again on the name). Press Enter to confirm the new name or Escape to
cancel.

## Deleting Accounts

When deleting an Account, a confirmation dialog warns that Envelope balances associated with
the Account will be affected and spending history may be lost. The dialog suggests creating
an Account group for old, unused Accounts rather than deleting them.

You cannot delete the last Account. At least one Account must exist at all times. You also
cannot delete an Account group that still contains other items -- move or delete the
contained items first.

# Envelope list

The Envelopes tab in the main window.

![Envelope list](images/Envelope_List.png)

## Overview

The **Envelope list** is the second section of the left panel. It shows your spending
categories as a tree of Envelopes. Each Envelope is a virtual container for part of your
funds, supporting the envelope budgeting model where every dollar has a purpose before it
is spent.

Envelopes can be nested inside other Envelopes for hierarchical organization. For example, a
"Housing" Envelope might contain child Envelopes for "Rent," "Utilities," and "Insurance."

Double-click an Envelope to open its Ledger in a new tab.

## Columns

The Envelope list can display four columns:

| Column       | Description                                                                                                                                                                                                                                                                |
| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Envelope** | The Envelope name. Nested Envelopes are indented under their parent. Always shown.                                                                                                                                                                                         |
| **!**        | The Watchdog indicator. Displays an alert icon when the Envelope balance has fallen below its Watchdog limit. Optional -- shown when **Display Watchdogs** is on in [Settings — Envelopes](Settings_Envelopes.html).                                                       |
| **Balance**  | The current balance of the Envelope, including all Transactions. Optional -- shown when **Display balance** is on in [Settings — Envelopes](Settings_Envelopes.html); each Envelope can also hide its own value in **Envelope properties**.                                |
| **Cleared**  | The cleared balance of the Envelope -- the total of its Transactions marked as cleared. Optional -- shown when **Display cleared balance** is on in [Settings — Envelopes](Settings_Envelopes.html); each Envelope can also hide its own value in **Envelope properties**. |

Column widths can be adjusted by dragging the dividers in the header row.

## Toolbar

The toolbar along the top of the Envelope list provides quick access to common actions:

| Button   | Tooltip                      | Description                                                                                        |
| -------- | ---------------------------- | -------------------------------------------------------------------------------------------------- |
| Add      | **Add new Envelope**         | Creates a new Envelope under the currently selected Envelope.                                      |
| Delete   | **Delete selected Envelope** | Deletes the selected Envelope. A confirmation dialog appears first.                                |
| Zero out | **Zero out**                 | Transfers the remaining balance of the selected Envelope to another Envelope, bringing it to zero. |
| Print    | **Print Envelope reports**   | Opens a drop-down menu with two report options: **Envelope activity** and **Envelope summary**.    |
| Settings | **Envelope list settings**   | Opens a settings dialog for the Envelope list display options.                                     |
| Help     | **Envelope list help**       | Opens this help topic.                                                                             |

## Right-click menu

Right-clicking in the Envelope list opens a context menu with the following actions:

- **Insert Envelope** -- Creates a new Envelope under the selected Envelope.
- **Delete Envelope** -- Deletes the selected Envelope.
- **Sort by _column_ ascending** / **Sort by _column_ descending** -- Sorts Envelopes
  within the selected parent by the column that was right-clicked.
- **Zero out** -- Transfers the remaining balance of the selected Envelope to another
  Envelope, bringing it to zero.
- **Edit properties** -- Opens the **Envelope properties** dialog for the
  selected Envelope.

## Watchdog alerts

The Watchdog system monitors Envelope balances and warns you when spending brings a balance
below a threshold you define. Each Envelope can have its own Watchdog limit, set in
**Envelope properties**.

When a Transaction causes an Envelope balance to drop below its limit, a
**Watchdog alert** dialog appears with the Envelope name and new balance. The
Watchdog column in the list shows an alert icon for any Envelope that is currently below its
limit.

Watchdog alerts can be disabled globally in [Settings — Miscellaneous](Settings_Miscellaneous.html).

## Zero out

The **Zero out** action transfers the remaining balance of one or more selected
Envelopes to a destination Envelope you choose. This is useful at the end of a budget period
when you want to sweep leftover funds into a savings or rollover Envelope.

Zero out takes two steps:

1. **Choose the date.** A dialog asks for the date to zero out as of. Each Envelope's balance
   on that date is transferred; Transactions dated after it are ignored. The date defaults to
   the last day of the previous month, or to today when today is the last day of a month.
2. **Choose the destination.** The [Select an Envelope](Select_Envelope.html) dialog asks for the Envelope that
   receives the transferred balances.

You cannot zero out an Envelope against itself or against one of its own descendants.

## Envelope properties

Each Envelope has the following configurable properties, accessible through
**Edit properties** in the right-click menu:

- **Name** -- The display name of the Envelope.
- **Limit** -- The Watchdog threshold amount. When the balance falls below this value, an
  alert is triggered.
- **Watchdog on/off** -- Enables or disables the Watchdog for this Envelope. When off, the
  limit field displays **Watchdog off**.
- **Display Envelope balance in Envelope list** -- Controls whether the balance column
  shows a value for this Envelope.
- **Include this Envelope in the Allocation Plan** -- Marks the Envelope for inclusion
  in the [Allocation Plan](Allocation_Plan.html).
- **Display Envelope cleared balance in Envelope list** -- Controls whether the
  cleared column shows a value for this Envelope.
- **Description** -- A free-text description of the Envelope's purpose.

## Organizing Envelopes

Drag Envelopes to reorder them. You can drag an Envelope into another Envelope to nest it,
or drag it out to change its position in the hierarchy.

## Deleting Envelopes

When deleting an Envelope that contains Transactions or child Envelopes, you must select a
new Envelope to receive the items being moved. You cannot move items into the Envelope being
deleted or into one of its descendants.

You cannot delete the root Envelope.

# Templates

The Templates tab in the main window.

![Templates](images/Templates.png)

## Overview

The **Templates** section is the third section of the left panel. Templates are
reusable Transaction blueprints for recurring patterns such as monthly bills, regular
income, or periodic Transfers. They help you create Transactions quickly and feed the
[Allocation Plan](Allocation_Plan.html) so it can project future income and expenses.

## Columns

The Template list displays three columns:

| Column       | Description                                                                                                          |
| ------------ | -------------------------------------------------------------------------------------------------------------------- |
| **Template** | The Template name.                                                                                                   |
| **In plan**  | Shows **Yes** or **No** to indicate whether the Template is included in the [Allocation Plan](Allocation_Plan.html). |
| **Amount**   | The Transaction amount defined in the Template.                                                                      |

Column widths can be adjusted by dragging the dividers in the header row. Click a column
header to sort the list by that column; click it again to reverse the order. The sort is
remembered between sessions.

## Toolbar

The toolbar along the top of the Template list provides quick access to common actions:

| Button          | Tooltip                      | Description                                                                                |
| --------------- | ---------------------------- | ------------------------------------------------------------------------------------------ |
| Add             | **Add new Template**         | Creates a new Template. The Template editor opens with a blank **Simple** Template.        |
| Delete          | **Delete selected Template** | Deletes the selected Template after confirmation.                                          |
| Allocation Plan | **Allocation Plan**          | Opens the **Allocation Plan** dialog, which uses in-plan Templates to project your budget. |
| Help            | **Templates help**           | Opens this help topic.                                                                     |

## Right-click menu

Right-clicking a Template in the list opens a context menu with the following actions:

- **Edit item** -- Opens the Template editor to modify the selected Template.
- **Clone item** -- Creates a duplicate of the selected Template. The clone opens in
  the editor so you can adjust it before saving.
- **Create Transaction** -- Creates a new Transaction in the Ledger using the
  Template's values. The Transaction editor opens with the Template's fields pre-filled.

## Template types

Each Template uses one of four types, selected from the **Type** drop-down in the Template
editor:

| Type                           | Description                                                                                                                                                                             |
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Simple**                     | A single Transaction in one Account with one Envelope. Covers basic deposits and payments.                                                                                              |
| **Transfer**                   | A movement of money between two Accounts, with corresponding Envelope assignments.                                                                                                      |
| **Regular multiple**           | A deposit or payment split across multiple Envelope allocations. If **Enable Account Transfers in multiples** is enabled, rows can also transfer part of the amount to another Account. |
| **Multiple Envelope Transfer** | A Transfer that splits across multiple Envelope assignments. Used for redistributing funds among Envelopes.                                                                             |

## Frequency

Every Template has a frequency that defines how often the Transaction occurs. The frequency
controls are available only when the Template is included in the [Allocation Plan](Allocation_Plan.html) and
consist of three parts:

- **Count** -- How many times the Transaction occurs within the period (for example, "2"
  for a paycheck paid twice a month).
- **Period** -- The number of time units between occurrences (for example, "1").
- **Span** -- The time unit: **Day**, **Week**, **Month**, or
  **Year**. Labels adjust to plural form (**Days**, **Weeks**,
  **Months**, **Years**) when the period is greater than one.

For example, a Template set to "1 time, every 1 Month" represents a monthly bill. A Template
set to "2 times, every 1 Month" represents something that occurs twice a month.

The [Allocation Plan](Allocation_Plan.html) uses these frequencies to normalize all Templates into a
common time frame (daily, weekly, monthly, or yearly) and calculate projected balances.

## In plan

The **In plan** flag controls whether the Template is included in the
[Allocation Plan](Allocation_Plan.html). When the flag is enabled, the Template's frequency becomes
relevant and the [Allocation Plan](Allocation_Plan.html) uses the Template to project future income and
expenses.

Templates that are not in the plan can still create Transactions manually. They do not
appear in allocation projections.

The flag can be toggled in the Template editor via the
**Include in Allocation Plan** checkbox.

## Template editor

The Template editor (**Edit Transaction Template**) provides fields for all
Transaction details:

- **Name** -- A unique name for the Template.
- **Type** -- The Template type (see above).
- **Payable to** -- The payee or description, with auto-complete from your Transaction
  history.
- **Code** -- An optional check number or reference code, with auto-complete.
- **Memo** -- An optional note.
- **Account** and **Envelope** -- The Account and Envelope assignments, which vary by
  Template type.
- **Payment** and **Deposit** -- The Transaction amount.

Transfer types add fields for the destination Account and Envelope. Multiple types add a
table where you can enter the split line items. For Regular multiple Templates, Account
Transfer line items are available only when **Enable Account Transfers in multiples**
is enabled. Those Account Transfer rows reduce the main Transaction amount and record the
transferred amount in the other Account.

## Creating Transactions from Templates

Templates can be applied to new Transactions in two ways:

- Right-click a Template and select **Create Transaction**. This opens the
  Transaction editor with all fields pre-filled from the Template.
- In the Transaction editor, use the **Apply or create Template** button to apply an
  existing Template to the current Transaction or save the current Transaction as a new
  Template.

# Select an Account

Pick an Account for the current operation.

![Select an Account](images/Select_Account.png)

## Overview

The **Select Account** dialog appears when Principal Plan needs you to choose an
Account before proceeding. It presents your full Account tree in a scrollable list. Select
an Account and press OK, or double-click the Account.

## When it appears

The dialog opens in two situations:

- **Opening an Account Ledger from the View menu.** When you choose **View** >
  **Account Ledger** (Ctrl+A), the dialog lists your Accounts so you can pick the
  Ledger to open.
- **Selecting an Account during an operation.** Some actions, such as choosing an Account
  within the Transaction editor or during import, use this dialog to let you browse and
  pick from the full Account list.

## Using the dialog

The dialog shows a tree view of all your Accounts, organized by group. Expand or collapse
groups by clicking the arrow next to each group name. Click an Account to highlight it,
then click **OK** to confirm your choice. You can also double-click an Account to
select it and close the dialog in one step.

A message below the tree explains what the selection is for. The text varies depending on
which operation triggered the dialog.

## Allowed Account choices

Some operations require a regular Account rather than an Account group. If a group Account is not allowed for the current operation, Principal Plan shows a warning and keeps the dialog open until you choose a regular Account or cancel.

## Buttons

| Button     | Description                                          |
| ---------- | ---------------------------------------------------- |
| **OK**     | Confirms the selected Account and closes the dialog. |
| **Cancel** | Closes the dialog without making a selection.        |
| **Help**   | Opens this help topic.                               |

# Account properties

Create or edit an Account.

![Account properties](images/Account_Properties.png)

## Overview

The **Account properties** dialog creates a new Account or edits an existing one.
Open it by right-clicking an Account in the **Account list** and selecting
**Edit properties**, or by using the add button to create a new Account.

## Details

The dialog contains Account details.

| Field           | Description                                                                                                                        |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| **Name**        | The display name of the Account. Must be unique and non-blank.                                                                     |
| **Type**        | The Account type, selected from a drop-down list. See the type list below.                                                         |
| **Description** | An optional free-text description of the Account.                                                                                  |
| **Web address** | An optional URL linking to the institution's website. This is used by the **Open website** button in the **Account list** toolbar. |

To enter an opening balance, create the Account first, then add an opening Transaction in
the Account Ledger.

## Account types

For regular Accounts, the **Type** drop-down offers 19 Account types:

| Type             | Description                                            |
| ---------------- | ------------------------------------------------------ |
| **Checking**     | A standard checking account.                           |
| **Savings**      | A savings account.                                     |
| **Credit card**  | A credit card. The balance represents the amount owed. |
| **Cash**         | Physical cash on hand.                                 |
| **E-cash**       | Electronic cash accounts such as PayPal or Venmo.      |
| **Investment**   | General investment accounts.                           |
| **Loan**         | A personal or auto loan.                               |
| **Mortgage**     | A home mortgage.                                       |
| **Retirement**   | Retirement accounts such as 401(k) or IRA.             |
| **Brokerage**    | A brokerage or trading account.                        |
| **HSA**          | A Health Savings Account.                              |
| **Crypto**       | Cryptocurrency wallets and exchanges.                  |
| **Prepaid**      | Prepaid debit cards.                                   |
| **Money market** | A money market account.                                |
| **CD**           | A certificate of deposit.                              |
| **Business**     | A business or commercial account.                      |
| **Property**     | Real estate or other property assets.                  |
| **Insurance**    | Insurance policies with a cash value.                  |
| **Gift card**    | Gift cards and store credit.                           |

Principal Plan treats all regular Account types the same internally. The selected type only
assigns the icon shown for the Account, and each type has its own icon in the Account list.

## Group Accounts

When creating or editing a **Group** Account, the dialog behaves differently:

- The **Type** drop-down shows only the **Group** option.
- The **Web address** field is hidden.

Group Accounts serve as organizational folders. They cannot be changed to a regular Account
type, and regular Accounts cannot be changed to groups.

## Allowed Account names

Account names must be filled in and unique. If the name is blank, or if another Account or group already uses the same name, Principal Plan shows a warning and asks you to enter a different name.

## Buttons

| Button     | Description                              |
| ---------- | ---------------------------------------- |
| **OK**     | Saves the changes and closes the dialog. |
| **Cancel** | Discards changes and closes the dialog.  |
| **Help**   | Opens this help topic.                   |

# Account balance report

Report on balances for selected Accounts.

![Account balance report](images/Account_Balance.png)

## Overview

The **Account balance** report shows the current balance and cleared balance for
selected Accounts as of a chosen date. Open it by clicking the print button in the
**Account list** toolbar.

## Account selection

The left side of the dialog shows a tree view of all your Accounts. Select the Accounts you
want to include in the report. Two selection buttons are available:

- **Select all Accounts** -- Selects every Account in the list.
- **Clear selection** -- Selects nothing.

Your selections are remembered between sessions.

## Date range

The date drop-down chooses the point in time for the report:

| Option                                 | Description                                       |
| -------------------------------------- | ------------------------------------------------- |
| **Everything**                         | Includes all Transactions regardless of date.     |
| **End of this month / quarter / year** | Balances as of the end of the current period.     |
| **End of last month / quarter / year** | Balances as of the end of the previous period.    |
| **End of 2--5 quarters ago**           | Balances as of the end of earlier quarters.       |
| **As of custom date**                  | Enables a text field where you can type any date. |

When you type a date directly into the date field, the drop-down automatically switches to
the custom date option. The date field is unavailable while **Everything** is selected.

## Columns

Two checkboxes control which columns appear in the report:

| Column      | Description                                                |
| ----------- | ---------------------------------------------------------- |
| **Balance** | The total balance of each Account as of the selected date. |
| **Cleared** | The balance considering cleared and pending Transactions.  |

You can show both columns together or either column by itself.

## Output options

Four buttons on the side provide output options:

| Button                | Description                                                                              |
| --------------------- | ---------------------------------------------------------------------------------------- |
| **Print**             | Sends the report to your printer.                                                        |
| **Preview**           | Opens a print preview window where you can review the report before printing.            |
| **Copy to clipboard** | Copies the report as tab-delimited text, suitable for pasting into a spreadsheet.        |
| **Export to file**    | Saves the report as a CSV file. A save dialog lets you choose the location and filename. |

The printed report uses a portrait layout with Account names on the left and amounts
right-aligned. The report title includes the selected date when a specific date is chosen.

# Account Ledger

The Transaction register for a single Account.

![Account Ledger](images/Account_Ledger.png)

## Overview

The Account Ledger is the workspace for viewing and managing Transactions in a single
Account. It opens as a tab when you double-click an Account in the **Account list**
or choose **View** >
**Account Ledger** from the menu bar.

The Ledger header shows the Account name and the current balance (or cleared balance in
reconcile mode). Negative balances appear in red.

## Columns

The Ledger displays the columns listed below. Column visibility and width are configurable
through the settings button.

| Column                | Description                                                                                                       |
| --------------------- | ----------------------------------------------------------------------------------------------------------------- |
| **Code**              | The check number or reference code.                                                                               |
| **Date**              | The Transaction date. Hovering shows the long date format as a tooltip.                                           |
| **Payable to**        | The payee or description.                                                                                         |
| **Memo**              | An optional note.                                                                                                 |
| **X** (Account)       | The Account clearing state: blank = not cleared, \* = pending, X = cleared.                                       |
| **Account**           | The Account name.                                                                                                 |
| **Envelope/Transfer** | Shows the linked Envelope name for simple Transactions or the Transfer target for Transfers.                      |
| **Payment**           | The payment amount. A dash indicates zero.                                                                        |
| **Deposit**           | The deposit amount. A dash indicates zero.                                                                        |
| **Balance**           | The running Account balance. Negative values appear in red. Future-dated Transactions appear in a distinct color. |

Most columns can be sorted by clicking the header. The Balance column cannot be sorted.

## Toolbar

The toolbar across the top of the Ledger provides these actions:

| Button                                  | Description                                                                                        |
| --------------------------------------- | -------------------------------------------------------------------------------------------------- |
| **Add new Transaction**                 | Opens the Transaction editor to create a new Transaction.                                          |
| **Delete selected Transaction**         | Deletes the selected Transaction after confirmation.                                               |
| **Filter Ledger**                       | Opens a drop-down with quick filter presets and an **Advanced** option for the full filter dialog. |
| **Refresh view (F5)**                   | Refreshes the Ledger display.                                                                      |
| **Quick filter**                        | A text box for live filtering as you type (Ctrl+Q to focus).                                       |
| **Search and replace values**           | Opens the search and replace dialog.                                                               |
| **Web lookup for selected Transaction** | Searches the web for the selected Transaction's payee.                                             |
| **Print Ledger**                        | A drop-down with **Print Ledger** and **Preview Ledger** options.                                  |
| **Export Ledger**                       | A drop-down with **Export Ledger** and **Copy Ledger to clipboard** options.                       |
| **Account Ledger settings**             | Opens the Ledger column and display settings.                                                      |
| **Help**                                | Opens this help topic.                                                                             |

## Right-click menu

Right-clicking a Transaction shows a context menu with these actions:

- **Delete** -- Deletes the selected Transaction.
- **Toggle cleared** -- Cycles the Account clearing state between not cleared and
  pending.
- **Search web** -- Searches the web for the Transaction's payee.
- **Insert new simple** -- Creates a new simple Transaction.
- **Insert new Transfer** -- Creates a new Transfer Transaction.
- **Insert new multiple** -- Creates a new multi-split Transaction.

## Keyboard shortcuts

| Shortcut    | Action                                                    |
| ----------- | --------------------------------------------------------- |
| F5          | Refresh the Ledger view.                                  |
| Ctrl+Enter  | Open the Transaction editor for the selected Transaction. |
| Ctrl+Insert | Create a new Transaction.                                 |
| Ctrl+Delete | Delete the selected Transaction.                          |
| Ctrl+X      | Toggle the cleared state of the selected Transaction.     |
| Ctrl+H      | Open the search and replace dialog.                       |
| Ctrl+Home   | Jump to the first Transaction.                            |
| Ctrl+End    | Jump to the last Transaction.                             |
| Ctrl+Q      | Focus the quick filter text box.                          |

## Filtering

The **Filter Ledger** button provides quick filter presets:

- **View all** -- Shows all Transactions.
- **View pending** -- Shows only uncleared Transactions.
- **View pending deposits** -- Shows uncleared deposits.
- **View pending checks** -- Shows uncleared Transactions with check codes.
- **View pending non-checks** -- Shows uncleared non-check Transactions.

The **Advanced** option opens the full **Transaction view filter and settings**
dialog with eight filter categories:

- **Filter by date** -- Any, specific date, or date range.
- **Filter by code** -- Any, checks only, non-numbers, or text search.
- **Filter by payable to** -- Any or text search.
- **Filter by other criteria** -- Transaction type, specific Envelope, or include
  descendants.
- **Filter by amount** -- Any, payments, deposits, specific amount, or range.
- **Filter by cleared state** -- Any, cleared, not cleared, or not cleared and
  pending.
- **Filter by memo** -- Any or text search.
- **Filter by import/synchronization** -- Any, freshly imported, or not freshly
  imported.

Text search filters support case-sensitive matching, exact matching, and regular
expressions.

## Creating and editing Transactions

Double-click a Transaction to open the Transaction editor. Use the toolbar button or
Ctrl+Insert to create a new Transaction. The editor supports all four Transaction types:
**Simple**, **Transfer**, **Regular multiple**, and
**Multiple Envelope Transfer**.

The **Payable to** field offers auto-complete from your Transaction history. Selecting
a match can fill other fields from the most recent matching Transaction.

See [Edit a Transaction](Edit_Transaction.html) for full details on the Transaction editor.

## Printing and exporting

The print button offers two options:

- **Print Ledger** -- Sends the Ledger to your printer in portrait layout.
- **Preview Ledger** -- Opens a print preview window.

The export button offers two options:

- **Export Ledger** -- Saves the visible Transactions as a CSV file.
- **Copy Ledger to clipboard** -- Copies the visible Transactions as tab-delimited
  text for pasting into a spreadsheet.

Both export options respect column visibility settings and offer an option to combine the
payment and deposit columns into a single amount column.

# Select an Envelope

Pick an Envelope for the current operation.

![Select an Envelope](images/Select_Envelope.png)

## Overview

The **Select Envelope** dialog appears when Principal Plan needs you to choose an
Envelope before proceeding. It presents your full Envelope tree in a scrollable list.
Select an Envelope and press OK, or double-click the Envelope.

## When it appears

The dialog opens in two situations:

- **Opening an Envelope Ledger from the View menu.** When you choose **View** >
  **Envelope Ledger** (Ctrl+E), the dialog lists your Envelopes so you can pick the
  Ledger to open.
- **Zero out Envelopes.** When you use the **Zero out** action from the Envelope
  list, after you choose the date to zero out as of, the dialog asks you to select a
  destination Envelope to receive the transferred balance. See [Envelope list](Envelope_List.html).

## Using the dialog

The dialog shows a tree view of all your Envelopes, organized by their parent-child
hierarchy. Expand or collapse parent Envelopes by clicking the arrow next to each name.
Click an Envelope to highlight it, then click **OK** to confirm your choice. You can
also double-click an Envelope to select it and close the dialog in one step.

A message below the tree explains what the selection is for. The text varies depending on
which operation triggered the dialog.

## Buttons

| Button     | Description                                           |
| ---------- | ----------------------------------------------------- |
| **OK**     | Confirms the selected Envelope and closes the dialog. |
| **Cancel** | Closes the dialog without making a selection.         |
| **Help**   | Opens this help topic.                                |

# Envelope properties

Create or edit an Envelope.

![Envelope properties](images/Envelope_Properties.png)

## Overview

The **Envelope properties** dialog creates a new Envelope or edits an existing one.
Open it by right-clicking an Envelope in the **Envelope list** and selecting
**Edit properties**, or by using the add button to create a new Envelope.

## Fields

The dialog contains these controls:

| Field                                                 | Description                                                                                                                                                                                           |
| ----------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Name**                                              | The display name of the Envelope. Must be unique and non-blank.                                                                                                                                       |
| **Limit**                                             | The Watchdog threshold amount. When the Envelope balance drops below this value, an alert is triggered. This field is only editable when the Watchdog is turned on.                                   |
| **Watchdog toggle**                                   | A button that enables or disables the Watchdog for this Envelope. When turned off, the limit field displays "**Watchdog off**" and is disabled. When turned on, the previous limit value is restored. |
| **Display Envelope balance in Envelope list**         | Controls whether the balance column in the Envelope list shows a value for this Envelope.                                                                                                             |
| **Include this Envelope in the Allocation Plan**      | Marks the Envelope for inclusion in the [Allocation Plan](Allocation_Plan.html).                                                                                                                      |
| **Display Envelope cleared balance in Envelope list** | Controls whether the cleared balance column in the Envelope list shows a value for this Envelope.                                                                                                     |
| **Description**                                       | An optional free-text description of the Envelope's purpose.                                                                                                                                          |

## Watchdog behavior

The Watchdog is a spending alert system. When enabled, Principal Plan monitors the
Envelope's balance and shows a **Watchdog alert** whenever a Transaction causes the
balance to drop below the limit.

- **Turning the Watchdog on** restores the limit field to its previous value, enables
  editing, and right-aligns the amount.
- **Turning the Watchdog off** saves the current limit value internally, displays
  "**Watchdog off**" in the field, disables editing, and centers the text.

An inline description below the toggle explains: "When the Watchdog is on, you will be
warned if the Envelope balance goes below the limit."

## Allowed Envelope values

Envelope names must be filled in and unique. If the name is blank, or if another Envelope already uses the same name, Principal Plan shows a warning and asks you to enter a different name.

The limit and description fields do not have additional restrictions.

## Buttons

| Button     | Description                              |
| ---------- | ---------------------------------------- |
| **OK**     | Saves the changes and closes the dialog. |
| **Cancel** | Discards changes and closes the dialog.  |
| **Help**   | Opens this help topic.                   |

# Envelope activity report

Detailed activity breakdown across Envelopes over a date range.

![Envelope activity report](images/Envelope_Activity.png)

## Overview

The **Envelope activity** report shows a breakdown of allocations, expenses, and
Transfers for selected Envelopes over a date range. Open it by clicking the print button in
the **Envelope list** toolbar and selecting **Envelope activity**.

## Envelope selection

The left side of the dialog shows a tree view of all your Envelopes. Select the Envelopes
you want to include in the report. Three toolbar buttons control selection:

- **Select all Envelopes** -- Selects every Envelope.
- **Clear selection** -- Selects nothing.
- **Select Allocation Plan** -- Selects only Envelopes that are included in the
  **Allocation Plan**.

Your selections are remembered between sessions.

## Date range

A drop-down offers preset date ranges:

- **Custom** -- Enables editable From and To date fields.
- **This week / This week to date / Last week**
- **This month / This month to date / Last month**
- **This quarter / This quarter to date / Last quarter**
- **This year / This year to date / Last year**

Selecting a preset fills in the From and To dates automatically. Editing the dates directly
switches the drop-down to Custom.

## Columns

Eight checkboxes control which data columns appear in the report:

| Column            | Description                                                                                      |
| ----------------- | ------------------------------------------------------------------------------------------------ |
| **Allocations**   | Positive non-Transfer Transactions (income allocated to the Envelope).                           |
| **Expenses**      | Negative non-Transfer Transactions (spending from the Envelope).                                 |
| **Transfers in**  | Transfer money moved into the Envelope.                                                          |
| **Transfers out** | Transfer money moved out of the Envelope.                                                        |
| **All in**        | Combined total of allocations and Transfers in.                                                  |
| **All out**       | Combined total of expenses and Transfers out.                                                    |
| **Start balance** | The Envelope balance at the start of the date range.                                             |
| **End balance**   | The Envelope balance at the end of the date range, computed as Start balance + All in - All out. |

## Extrapolate or average

A drop-down scales the reported values to a normalized rate:

- **None (gross)** -- Shows raw totals for the selected period.
- Per day, per week, per month, per quarter, or per year.

Start and end balances are not affected by scaling.

## Output options

| Button                | Description                              |
| --------------------- | ---------------------------------------- |
| **Print**             | Sends the report to your printer.        |
| **Preview**           | Opens a print preview window.            |
| **Copy to clipboard** | Copies the report as tab-delimited text. |
| **Export to file**    | Saves the report as a CSV file.          |

All settings are remembered between sessions.

# Envelope summary report

A summary of Envelope names and balances.

![Envelope summary report](images/Envelope_Summary.png)

## Overview

The **Envelope summary** report lists selected Envelopes with their current balances.
Open it by clicking the print button in the **Envelope list** toolbar and selecting
**Envelope summary**.

## Envelope selection

The left side of the dialog shows a tree view of all your Envelopes. Select the Envelopes
you want to include in the report. Three toolbar buttons control selection:

- **Select all Envelopes** -- Selects every Envelope.
- **Clear selection** -- Selects nothing.
- **Select Allocation Plan** -- Selects only Envelopes that are included in the
  **Allocation Plan**.

Your selections are remembered between sessions.

## Report size

A **Report size:** drop-down on the right side chooses the paper format:

| Format                     | Description                                                     |
| -------------------------- | --------------------------------------------------------------- |
| **Standard**               | Letter-size portrait with column headers and page numbers.      |
| **Business cards**         | Compact portrait cards, nine per page.                          |
| **Business cards (Avery)** | Landscape cards formatted for Avery label sheets, ten per page. |
| **Organizer 3.75 x 6.75**  | Small organizer pages in landscape.                             |
| **Organizer 4.25 x 6.75**  | Medium organizer pages in landscape.                            |
| **Organizer 5.50 x 8.50**  | Large organizer pages in landscape.                             |

The standard format includes a header row with "Envelope" and "Balance" column labels,
a report title, and a page/date footer. The compact card formats omit headers for a
more condensed layout.

Your format selection is remembered between sessions.

## Output options

| Button                | Description                                                          |
| --------------------- | -------------------------------------------------------------------- |
| **Print**             | Sends the report to your printer.                                    |
| **Preview**           | Opens a print preview window.                                        |
| **Copy to clipboard** | Copies the report as tab-delimited text (Envelope name and balance). |
| **Export to file**    | Saves the report as a CSV file.                                      |

# Envelope Ledger

The Transaction register for a single Envelope.

![Envelope Ledger](images/Envelope_Ledger.png)

## Overview

The Envelope Ledger shows all Transactions assigned to a single Envelope. It opens as a tab
when you double-click an Envelope in the **Envelope list** or choose **View** >
**Envelope Ledger** from the menu bar.

The Envelope Ledger shares the same layout and most of the same functionality as the Account
Ledger. This topic covers the differences. See the [Account Ledger](Account_Ledger.html) topic for full
details on columns, toolbar buttons, keyboard shortcuts, and filtering.

## Differences from the Account Ledger

### Column headers

The Ledger displays the columns listed in the [Account Ledger](Account_Ledger.html) topic, with the
header differences listed below. Column visibility and width are configurable through the
settings button.

| Account Ledger        | Envelope Ledger            |
| --------------------- | -------------------------- |
| **Payable to**        | **Payable to/description** |
| **Envelope/Transfer** | **Account/Transfer**       |

The details column shows the linked Account name (instead of the linked Envelope name) for
simple Transactions. For Transfers, it shows the Transfer target.

### Clearing

Clicking the cleared column or using **Toggle cleared** toggles the **Envelope**
clearing state rather than the Account clearing state. The two clearing states are
independent, so clearing a Transaction in the Envelope Ledger does not affect its Account
clearing state.

Use Envelope clearing when you want to track which items in this budget category are still
open -- for example, reimbursable medical or business expenses paid from several Accounts.
Uncleared items are still outstanding for that purpose; clear them when they are reimbursed
or otherwise settled. When enabled, the Envelope cleared balance in the
**Envelope list** reflects that tracking. See [Principal Plan's Envelope model](PPlan_Envelope_Model.html) and
[Reconciling an Account](Reconciling.html).

### Context menu

The right-click menu offers **Insert new multiple Transfer** instead of Insert new multiple.
This reflects that multi-split Transactions created from the Envelope Ledger are Envelope
splits rather than Account splits.

### Toolbar and appearance

The Ledger background uses a distinct color to visually differentiate it from the Account
Ledger.

## Everything else

All other features work identically to the Account Ledger:

- The same configurable columns appropriate to the Envelope Ledger (with the header
  differences noted above).
- The same toolbar buttons for creating, deleting, filtering, searching, printing, and
  exporting Transactions.
- The same keyboard shortcuts (F5, Ctrl+Enter, Ctrl+Insert, Ctrl+Delete, Ctrl+X, Ctrl+H,
  Ctrl+Q, Ctrl+Home, Ctrl+End).
- The same filter presets (**View all**, **View pending**, etc.) and the same
  advanced filter dialog with eight filter categories.
- The same print, preview, export, and copy-to-clipboard functionality.

# Delete an Envelope

Safely remove an Envelope from your file.

![Delete an Envelope](images/Delete_Envelope.png)

## Overview

When you delete an Envelope that contains Transactions or child Envelopes, Principal Plan
needs to know where to move those items. The **Delete Envelope** dialog asks you to
select a destination Envelope before the deletion proceeds.

## When it appears

The dialog appears only when the Envelope being deleted is not empty -- it has Transactions
assigned to it, or it has child Envelopes nested inside it. If the Envelope is empty (no
Transactions and no children), a simple confirmation prompt appears instead and no
destination is needed.

## Using the dialog

The dialog shows a tree view of your full Envelope hierarchy. Click an Envelope to select it
as the destination for the items being moved, then click **OK**. You can also
double-click an Envelope to select it and confirm in one step.

A note below the Envelope tree explains: "When deleting Envelopes that contain Transactions
or other Envelopes, you must select a new Envelope to move items into."

All Transactions currently assigned to the deleted Envelope will be reassigned to the
destination Envelope. Any child Envelopes will be moved under the destination Envelope.

## Allowed destination Envelopes

Choose a destination Envelope before clicking **OK**. The destination must be different from the Envelope being deleted, and it cannot be one of that Envelope's descendants.

The root Envelope cannot be deleted. If you try to delete it, Principal Plan shows a warning and cancels the operation before this dialog opens.

## Buttons

| Button     | Description                                                    |
| ---------- | -------------------------------------------------------------- |
| **OK**     | Moves items to the selected Envelope and deletes the original. |
| **Cancel** | Cancels the deletion.                                          |
| **Help**   | Opens this help topic.                                         |

# Edit a Transaction

Enter or edit a single Transaction.

![Edit a Transaction](images/Edit_Transaction.png)

## Overview

The **Edit Transaction** dialog creates and edits Transactions. It opens when you
double-click a Transaction in the Ledger, press Ctrl+Enter, or use the add button to create
a new Transaction.

## Common fields

Every Transaction type shares these fields at the top of the dialog:

| Field                | Description                                                                                                                                                           |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Transaction type** | A drop-down to select the Transaction type (see below).                                                                                                               |
| **Code**             | An optional check number or reference code. The **+** button fills in the next check number for the selected Account. Auto-complete suggests codes from your history. |
| **Date**             | The Transaction date. A calendar button opens a date picker.                                                                                                          |
| **Payable to**       | The payee or description. Auto-complete suggests matches from your Transaction history.                                                                               |
| **Payment**          | The payment amount. Entering a negative value moves it to the deposit side.                                                                                           |
| **Deposit**          | The deposit amount. Entering a negative value moves it to the payment side.                                                                                           |
| **Memo**             | An optional note.                                                                                                                                                     |

## Transaction types

The **Transaction type** drop-down switches the dialog between four layouts:

### Simple

The default type for everyday Transactions. Adds two fields:

- **Account** -- The Account the Transaction affects.
- **Envelope** -- The Envelope the Transaction draws from or credits.

### Transfer

A movement of money between Accounts, Envelopes, or both at the same time. Adds:

- **Account Transfer** -- Checkbox that enables the from and to Account fields.
- **Envelope Transfer** -- Checkbox that enables the from and to Envelope fields.
- A second set of Code, Date, Payable to, Payment, Deposit, and Memo fields for the
  counterpart side of the Transfer.

The Transfer arrows and section labels (**Transfer from** / **Transfer to**) adjust
automatically based on whether the payment or deposit side has a value.

### Regular multiple

A single Transaction split across multiple line items. Adds:

- **Account** -- The Account for the parent Transaction.
- A line item table where each row is an Envelope allocation or, when enabled, an Account
  Transfer with its own amount.
- Add and delete buttons for managing line items.
- A running total that updates as you add or change items.

By default, Regular multiple rows allocate the Transaction amount across Envelopes. Account
Transfer rows are available only when **Enable Account Transfers in multiples** is
enabled in Settings. An Account Transfer row moves that part of the Transaction to another
Account and reduces the main Transaction amount. For example, a $1,000 paycheck with a $100
Account Transfer row is recorded as a $900 deposit in the paycheck Account plus a $100
Transfer to the other Account.

### Multiple Envelope Transfer

A Transfer split across multiple Envelope assignments. Adds:

- **Envelope** -- The Envelope for the parent Transaction.
- A line item table for the split.
- Add and delete buttons.
- A running total.

## Toolbar buttons

A toolbar across the top of the dialog provides quick actions:

| Button                       | Description                                                                                                                                                                                                 |
| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Add new Transaction**      | Saves the current Transaction and starts a new blank one.                                                                                                                                                   |
| **Delete Transaction**       | Deletes the current Transaction after confirmation.                                                                                                                                                         |
| **Clone Transaction**        | Saves a copy of the current Transaction as a new record.                                                                                                                                                    |
| **Apply or create Template** | Opens a menu listing saved Templates. Selecting one fills the dialog with the Template's values. The menu also includes **Save Transaction as Template** to save the current Transaction as a new Template. |
| **Previous Transaction**     | Saves and navigates to the previous Transaction in the Ledger.                                                                                                                                              |
| **Next Transaction**         | Saves and navigates to the next Transaction in the Ledger.                                                                                                                                                  |

## Bottom buttons

| Button           | Description                                                             |
| ---------------- | ----------------------------------------------------------------------- |
| **Save & close** | Saves the Transaction and closes the dialog.                            |
| **Save & new**   | Saves the Transaction and opens a new blank Transaction.                |
| **Cancel**       | Closes the dialog without saving.                                       |
| **Revert**       | Restores the Transaction to the state it was in when the dialog opened. |
| **Help**         | Opens this help topic.                                                  |

## Auto-complete and auto-fill

The **Payable to** field provides context-aware auto-complete from your Transaction
history. When you select a match, the dialog can fill other fields from the most recent
matching Transaction. The auto-fill behavior is set in [Settings — Application](Settings_Application.html):

- **Auto-fill all details** -- Fills code, memo, Account, Envelope, and amounts.
- **Auto-fill all and scale the amounts** -- Same as above, but scales line item amounts
  proportionally to match the current total.
- **Auto-fill text fields only** -- Fills only code, payable to, and memo.

## Next check number

The **+** button next to the **Code** field inserts the next sequential check number
for the current Account. After filling the code, focus moves to the date field.

# Transaction filter

Filter the Transactions displayed in a Ledger.

![Transaction filter](images/Transaction_Filter.png)

## Overview

The **Transaction view filter and settings** dialog controls which Transactions are
visible in the Ledger. Open it by clicking the filter button in the Ledger toolbar and
selecting **Advanced**.

The dialog contains eight filter groups arranged in a grid. Each group is independent, so
you can combine filters from multiple groups to narrow the display precisely.

## Filter by date

- **Any value** -- Shows Transactions from all dates.
- **Specific date** -- Shows Transactions on a single date. A calendar button opens
  a date picker.
- **Date range** -- Shows Transactions within a From and To range. Both fields have
  calendar buttons.

## Filter by amount

- **Any value** -- Shows all amounts.
- **Any payment** -- Shows only payments (negative amounts).
- **Any deposit** -- Shows only deposits (positive amounts).
- **Specific amount** -- Shows Transactions matching an exact amount.
- **Amount range** -- Shows Transactions within a From and To amount range.

## Filter by code

- **Any value** -- Shows all codes.
- **Checks (numbers)** -- Shows only Transactions with numeric codes (check numbers).
- **Non-numbers** -- Shows Transactions with non-numeric or blank codes.
- **Search text** -- Shows Transactions where the code matches a search string.
- Match options: **Case sensitive**, **Exact text**, **Regex**.

## Filter by cleared state

- **Any value** -- Shows all clearing states.
- **Cleared** -- Shows only cleared Transactions.
- **Not cleared** -- Shows only uncleared Transactions.
- **Not cleared and pending** -- Shows uncleared and pending Transactions.

## Filter by payable to

- **Any value** -- Shows all payees.
- **Search text** -- Shows Transactions where the payee matches a search string.
- Match options: **Case sensitive**, **Exact text**, **Regex**.

## Filter by memo

- **Any value** -- Shows all memos.
- **Search text** -- Shows Transactions where the memo matches a search string.
- Match options: **Case sensitive**, **Exact text**, **Regex**.

## Filter by other criteria

- **Any Transaction type** -- Shows all Transaction types.
- **Multiples only** -- Shows only multi-split Transactions.
- **Transfers only** -- Shows only Transfer Transactions.
- **Envelope / Account** -- Shows Transactions assigned to a specific Envelope (in Account
  Ledgers) or Account (in Envelope Ledgers), selected from a drop-down.
- **Include descendant Envelopes** -- When filtering by Envelope, also includes
  Transactions in its descendant Envelopes (child Envelopes at every level below it).

## Filter by import/synchronization

- **Any value** -- Shows all Transactions.
- **Freshly imported or synchronized** -- Shows only recently imported Transactions.
- **Not freshly imported or synchronized** -- Hides recently imported Transactions.

## Text search options

The Code, Payable to, and Memo filters each support three matching options:

- **Case sensitive** -- Distinguishes between uppercase and lowercase letters.
- **Exact text** -- Requires the entire field to match, not just a substring.
- **Regex** -- Treats the search text as a regular expression.

Typing in any text field automatically selects the corresponding search option.

## Buttons

| Button     | Description                                        |
| ---------- | -------------------------------------------------- |
| **OK**     | Applies the filter settings and closes the dialog. |
| **Cancel** | Discards changes and closes the dialog.            |
| **Help**   | Opens this help topic.                             |

# Search and replace

Find and replace text across Transactions.

![Search and replace](images/Search_Replace.png)

## Overview

The **Search and replace** dialog finds and replaces text across all visible
Transactions in the current Ledger. Open it from the Ledger toolbar button or by pressing
Ctrl+H.

## Fields

| Field            | Description                                               |
| ---------------- | --------------------------------------------------------- |
| **Search text**  | The text to find.                                         |
| **Replace with** | The replacement text. Leave empty to delete matched text. |

## Search scope

Three checkboxes control which Transaction fields are searched:

| Checkbox                           | Description                                 |
| ---------------------------------- | ------------------------------------------- |
| **Include code**                   | Searches in the code field. Off by default. |
| **Include memo**                   | Searches in the memo field. Off by default. |
| **Include payable to/description** | Searches in the payee field. On by default. |

You can enable any combination of these to search across multiple fields at once.

## Match options

Three checkboxes refine how the search text is matched:

| Option             | Description                                                                                |
| ------------------ | ------------------------------------------------------------------------------------------ |
| **Case sensitive** | Distinguishes between uppercase and lowercase letters. Off by default.                     |
| **Entire text**    | Requires the entire field to match the search text, not just a substring. Off by default.  |
| **Regex**          | Treats the search text as a regular expression with capture group support. Off by default. |

## How it works

When you click **OK**, the operation runs immediately on all Transactions currently
visible in the Ledger. Each selected field in each Transaction is checked against the search
text, and matching text is replaced.

There is no preview or per-Transaction confirmation step. The replacement happens in one
pass across all visible Transactions.

After completion, a message reports how many Transactions were modified (for example,
"3 Transactions modified."). The Ledger updates in place to reflect the changes.

## Tips

- **Filter first.** Use the Ledger filter to narrow the visible Transactions before
  running a search and replace. The operation only affects Transactions that are currently
  displayed.
- **Use regex for complex patterns.** With the **Regex** option enabled, you can use
  regular expression syntax for advanced matching, including capture groups in the
  replacement text.
- **Combine with Entire text.** Enable both **Regex** and **Entire text** to
  anchor the pattern to the full field value.

## Buttons

| Button     | Description                               |
| ---------- | ----------------------------------------- |
| **OK**     | Runs the search and replace operation.    |
| **Cancel** | Closes the dialog without making changes. |
| **Help**   | Opens this help topic.                    |

# Allocation Plan

Automate how deposits are divided across Envelopes.

![Allocation Plan](images/Allocation_Plan.png)

## Overview

The **Allocation Plan** is a grid that maps your Envelopes to one or more income
Templates. Each cell holds the amount that should be allocated to a given Envelope when that
income arrives. Open the Allocation Plan from the View menu or by pressing the toolbar button.

## Layout

The left column lists every Envelope that has **Include this Envelope in the Allocation Plan** enabled in
its properties. Up to eight Template columns appear to the right, one for each income source
you have defined. Each cell in the grid holds a currency amount representing how much of
that Template's income goes to that Envelope.

A totals row at the bottom of each column shows the sum of all allocations for that Template.

The **Restore Envelope list sort order** toolbar button restores the Envelope rows to their original sort order.

## Span normalization

Each Template has a frequency (for example, twice per month). The plan converts every
Template to a common span so you can compare allocations across different pay schedules.
A drop-down switches the display span between four options:

- **View by day** -- Shows daily amounts.
- **View by week** -- Shows weekly amounts.
- **View by month** -- Shows monthly amounts.
- **View by year** -- Shows yearly amounts.

Changing the view span recalculates the displayed values for comparison. The underlying
per-occurrence amounts are preserved.

## Adding and removing Templates

- **Add** -- Click **Add or create Template** to open a drop-down menu. Existing Templates that are not
  already in the plan are listed for quick selection. Choose
  **Add new Template** to create a new income Template from scratch. The plan
  supports up to eight Template columns.
- **Remove** -- Click **Remove Template** and choose a Template from the drop-down menu to remove it from the plan, or choose **Remove all Templates** to remove them all. The Template itself is not deleted; it is only removed from the plan grid.

## Editing cells

Click any cell in the grid to type an amount.

## Output options

| Button                     | Description                                                                                                                        |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| **Print Allocation Plan**  | A drop-down with **Print Allocation Plan** and **Preview Allocation Plan** options.                                                |
| **Export Allocation Plan** | A drop-down with **Export Allocation Plan** (saves as CSV) and **Copy Allocation Plan to clipboard** (tab-delimited text) options. |

## Buttons

| Button     | Description                          |
| ---------- | ------------------------------------ |
| **OK**     | Saves changes and closes the dialog. |
| **Cancel** | Closes the dialog without saving.    |
| **Help**   | Opens this help topic.               |

# Edit a Template

Modify a saved Transaction Template.

![Edit a Template](images/Edit_Template.png)

## Overview

The **Edit Transaction Template** dialog creates and modifies Transaction Templates.
Templates store reusable Transaction fields that you can apply when entering new
Transactions. Open a Template for editing by double-clicking it in the Template list, or by
right-clicking it and choosing **Edit item**.

## Transaction type

A drop-down at the top of the dialog selects the Template type. The four types match the
Transaction types available in the [Edit a Transaction](Edit_Transaction.html) dialog:

| Type                           | Description                                            |
| ------------------------------ | ------------------------------------------------------ |
| **Simple**                     | A single Account and Envelope assignment.              |
| **Transfer**                   | A movement between Accounts, Envelopes, or both.       |
| **Regular multiple**           | A single Transaction split across multiple line items. |
| **Multiple Envelope Transfer** | A Transfer split across multiple Envelope assignments. |

The dialog layout changes to show the fields appropriate for the selected type.

## Common fields

Every Template type shares these fields:

| Field           | Description                                |
| --------------- | ------------------------------------------ |
| **Name:**       | The Template name.                         |
| **Payable to:** | The payee or description for the Template. |
| **Payment**     | The payment amount.                        |
| **Deposit**     | The deposit amount.                        |
| **Memo**        | An optional note.                          |

## Frequency

The frequency section controls how often the Template recurs:

- **Count** -- The number of occurrences per period (for example, 2).
- **Period** -- The interval between groups of occurrences (for example, 1).
- **Span** -- The time unit: Day, Week, Month, or Year.

Together these read as "N time(s), every M [span]." For example, "1 time, every 2 Weeks"
describes a biweekly Template. The span label switches between singular and plural
automatically.

## Allocation Plan

The **Include in Allocation Plan** checkbox adds this Template as a column in the
[Allocation Plan](Allocation_Plan.html). When enabled, the Template appears in the plan grid and its amount
is distributed across Envelopes according to the plan.

Only these Template types can be included in the Allocation Plan:

- **Regular multiple**
- **Multiple Envelope Transfer**

## Allowed Template names

The **Name:** field is the Template name. It must be filled in and unique across all Templates. If it is blank, or if another Template already uses the same name, Principal Plan shows a warning and asks you to enter a different name.

## Buttons

| Button     | Description                               |
| ---------- | ----------------------------------------- |
| **OK**     | Saves the Template and closes the dialog. |
| **Cancel** | Closes the dialog without saving.         |
| **Help**   | Opens this help topic.                    |

# Create income Template

Create a new income Template for the Allocation Plan.

![Create income Template](images/New_Allocation_Plan_Template.png)

## Overview

The **Create income Template** dialog creates a new Transaction Template and adds it
directly to the [Allocation Plan](Allocation_Plan.html) as a new column. It opens when you click
**Add new Template** from the add button menu in the Allocation Plan dialog.

## Fields

| Field           | Description                                                                                                                                                                                                                                    |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Payable to:** | The name of the Template. Pre-filled as "New Template". This name also becomes the Template's payee field and appears as the column header in the Allocation Plan.                                                                             |
| **Type**        | The Template type. Two options are available: **Regular multiple** (a deposit or payment split across Envelope allocations, with optional Account Transfer rows when enabled) and **Multiple Envelope Transfer** (an Envelope-based Transfer). |
| **Frequency:**  | How often the income recurs, expressed as a count, period, and span. For example, "1 time, every 1 Month" describes a monthly Template. The span label switches between singular and plural automatically.                                     |

## Allowed Template names

The **Payable to:** field is the Template name. It must be filled in and unique across all existing Templates, including Templates that are not currently in the Allocation Plan. If it is blank, or if another Template already uses the same name, Principal Plan shows a warning and asks you to enter a different name.

## Buttons

| Button     | Description                                              |
| ---------- | -------------------------------------------------------- |
| **OK**     | Creates the Template and adds it to the Allocation Plan. |
| **Cancel** | Cancels Template creation.                               |
| **Help**   | Opens this help topic.                                   |

# Import Transactions

Bring Transactions in from a bank file.

![Import Transactions](images/Import_Transactions.png)

## Overview

Principal Plan imports Transactions from files downloaded from your bank or financial
institution. Open the import dialog from File > **Import Transactions** and select a
file. Three file formats are supported:

| Format    | Extensions | Description                                                         |
| --------- | ---------- | ------------------------------------------------------------------- |
| CSV       | .csv       | Comma-separated values. Supports US and international date formats. |
| QIF       | .qif       | Quicken Interchange Format.                                         |
| OFX / QFX | .ofx, .qfx | Open Financial Exchange and Quicken Financial Exchange.             |

## The import dialog

The import dialog has two tabs:

- **Basic** -- Select the target Account, default Envelope, and file handling options.
  See [Import Transactions — Basic](Import_Transactions_Basic.html) for details.
- **Advanced** -- Configure duplicate detection, field transformations, and AI Envelope
  matching. See [Import Transactions — Advanced](Import_Transactions_Advanced.html) for details.

All settings are saved per Account and restored the next time you import into that Account.

## Import workflow

1. Select a file using the file picker (or let the file watch feature open the dialog
   automatically).
2. Choose the target Account on the Basic tab.
3. Adjust the default Envelope and any advanced settings as needed.
4. Click **OK** to run the import.

During import, Principal Plan parses the file and compares each Transaction with existing
records. When **Smart import** is enabled, matching Transactions are linked rather
than duplicated, and unmatched cleared Transactions within the matching window can be
uncleared. New Transactions are created with a pending status.

After import, the Account Ledger opens filtered to show the newly imported Transactions.
Because imported files usually come from your bank, this is a good time to reconcile the
Account balance. See [Reconciling an Account](Reconciling.html) for the reconciliation workflow.

## Checkpoint

If **Create checkpoint before import** is enabled in [Settings — Miscellaneous](Settings_Miscellaneous.html), a
checkpoint of your data file is saved before the import begins. This gives you a restore
point if the import produces unexpected results.

## File watch

When both **Delete file after import** and **Watch for this file** are enabled,
Principal Plan monitors the file path after import. If the file reappears (for example,
from an automated bank download), the import dialog opens automatically for that Account.
This supports recurring hands-free imports.

## Buttons

| Button     | Description                          |
| ---------- | ------------------------------------ |
| **OK**     | Runs the import.                     |
| **Cancel** | Closes the dialog without importing. |
| **Help**   | Opens this help topic.               |

# Import Transactions — Basic

The Basic tab of the import dialog.

![Import Transactions — Basic](images/Import_Transactions_Basic.png)

## Overview

The Basic tab of the Import Transactions dialog contains the essential settings for every
import: which Account to target, which Envelope to assign by default, and how to handle
the source file after import.

## Fields

| Field                        | Description                                                                                                                                                                                                                                |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Import file**              | A read-only field showing the full path of the file being imported.                                                                                                                                                                        |
| **Account**                  | A drop-down listing all Accounts. You must select an Account before the import can proceed. The remaining controls on this tab are disabled until an Account is chosen.                                                                    |
| **Default Envelope:**        | The Envelope assigned to imported Transactions that are not matched by AI Envelope matching or by an existing Transaction.                                                                                                                 |
| **Code +:**                  | The transaction type code that identifies deposits in the import file (default: "credit"). Used when the file has a single amount column with a type indicator rather than separate payment and deposit columns.                           |
| **Code -:**                  | The transaction type code that identifies payments in the import file (default: "debit").                                                                                                                                                  |
| **Delete file after import** | When checked, the source file is removed from disk after a successful import. Enabling this option makes **Watch for this file** available.                                                                                                |
| **Watch for this file**      | When checked, Principal Plan monitors the file path and automatically reopens the import dialog if the file reappears. Only available when **Delete file after import** is also checked. This supports recurring automated bank downloads. |

## Per-Account settings

All Basic tab settings are saved on the selected Account. The next time you import into the
same Account, the dialog restores your previous choices. Selecting a different Account
in the drop-down loads that Account's saved settings.

# Import Transactions — Advanced

The Advanced tab of the import dialog.

![Import Transactions — Advanced](images/Import_Transactions_Advanced.png)

## Overview

The Advanced tab of the Import Transactions dialog provides duplicate detection, field
transformations, and AI-powered Envelope matching. These settings fine-tune how imported
Transactions are processed and matched against your existing records.

## Smart import

The **Smart import** group is a toggleable section that enables automatic duplicate
detection. When enabled, imported Transactions are compared against existing records using
amount, date proximity, payee similarity, and optionally check number uniqueness.

| Setting                             | Description                                                                                                                                                                                                                                                                                                                                                   |
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Unclear missing Transactions**    | Unclears existing cleared Transactions within the matching window that have no corresponding imported Transaction. This helps flag Transactions that may have been removed by the bank.                                                                                                                                                                       |
| **Assume check numbers are unique** | Treats check numbers as unique identifiers when matching. Two Transactions with the same check number are considered the same record.                                                                                                                                                                                                                         |
| **Max valid check number**          | Sets the highest check number the importer treats as a real check. Numbers above this threshold are ignored during check-number matching.                                                                                                                                                                                                                     |
| **Matching threshold:**             | The largest difference, in days, between an imported Transaction's date and an existing Transaction's date for the two to be considered a match. It also sets the matching window: existing cleared Transactions more than this many days older than the oldest imported Transaction are not compared. A lower value requires closer dates. The default is 5. |

## Data transformation

The **Data transformation** group contains field-level corrections that adjust the
imported data before it is written to the Ledger.

| Setting                        | Description                                                                                                                                      |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Swap payable to and memo**   | Exchanges the payee and memo fields. Useful when a bank file stores the description in the memo column.                                          |
| **Swap payment and deposit**   | Exchanges the payment and deposit amounts. Useful when a bank file reverses the sign convention.                                                 |
| **Use dd/mm/yyyy date format** | Parses dates in day/month/year order instead of month/day/year. Enable this for international bank files.                                        |
| **AI Envelope matching**       | Automatically assigns Envelopes to imported Transactions based on payee similarity to past Transactions.                                         |
| **Score:**                     | The minimum similarity score an AI Envelope match must reach to be applied. Higher values require closer matches.                                |
| **Days:**                      | The number of days of Transaction history the AI examines when looking for payee matches.                                                        |
| **Payable regex filter:**      | A regular expression applied to the payee field before matching. Use this to strip bank-added prefixes or suffixes that interfere with matching. |
| **Memo regex filter:**         | A regular expression applied to the memo field before matching.                                                                                  |

## Per-Account settings

All Advanced tab settings are saved on the selected Account and restored when you next
import into the same Account.

# Print preview

Preview Transaction listings and reports before printing.

![Print preview](images/Print_Preview.png)

## Overview

The print preview window displays a rendered view of a report or Ledger listing before you
send it to the printer. It opens when you click **Preview** in any report dialog or
Ledger print option.

## Toolbar

The toolbar across the top of the window provides navigation and zoom controls:

| Button                     | Description                                                                                                |
| -------------------------- | ---------------------------------------------------------------------------------------------------------- |
| **Close**                  | Closes the preview window.                                                                                 |
| **Print**                  | Sends the previewed document to your printer.                                                              |
| **Go to first page**       | Jumps to the first page.                                                                                   |
| **Go to previous page**    | Moves back one page.                                                                                       |
| **Page number**            | A text field showing the current page number. Type a number and press Enter to jump directly to that page. |
| **Go to page**             | Jumps to the page number entered in the field.                                                             |
| **Go to next page**        | Moves forward one page.                                                                                    |
| **Go to last page**        | Jumps to the last page.                                                                                    |
| **Fit whole page in view** | Scales the view so the entire page is visible at once.                                                     |
| **Fit page width in view** | Scales the view so the page fills the window width.                                                        |
| **Zoom in**                | Increases the zoom level.                                                                                  |
| **Zoom out**               | Decreases the zoom level.                                                                                  |
| **Print preview help**     | Opens this help topic.                                                                                     |

## Keyboard shortcuts

- **Ctrl+scroll wheel** -- Zooms in and out of the preview.

# Settings

Application preferences.

![Settings](images/Settings.png)

## Overview

The Principal Plan settings dialog controls application-wide preferences. Open it from
File > Settings. The dialog contains five tabs:

| Tab               | Description                                                                                                                                                                                                                         |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Application**   | Language, file handling, Ledger behavior, export options, and list view layout. See [Settings — Application](Settings_Application.html).                                                                                            |
| **Accounts**      | Account list display and Account Ledger column visibility. See [Settings — Accounts](Settings_Accounts.html).                                                                                                                       |
| **Envelopes**     | Envelope list display, Watchdog indicators, and Envelope Ledger column visibility. See [Settings — Envelopes](Settings_Envelopes.html).                                                                                             |
| **Backup**        | Automatic backup toggle, retention depth, and backup directory. See [Settings — Backup](Settings_Backup.html).                                                                                                                      |
| **Miscellaneous** | Confirmation messages, import checkpoints, number formatting, Account Transfer behavior, new Transaction date, web search engine selection, and application text size. See [Settings — Miscellaneous](Settings_Miscellaneous.html). |

Each tab has its own help topic with full details on every setting.

## Buttons

| Button     | Description                                              |
| ---------- | -------------------------------------------------------- |
| **OK**     | Saves all changes across all tabs and closes the dialog. |
| **Cancel** | Closes the dialog without saving.                        |
| **Help**   | Opens this help topic.                                   |

# Settings — Application

General application preferences.

![Settings — Application](images/Settings_Application.png)

## Overview

The Application tab of the Settings dialog controls language, file handling, Ledger behavior,
export formatting, and list view layout.

## Language

| Setting      | Description                                                                                                                                                                 |
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Language** | Selects the display language. Available options are English, Deutsch, Español, Français, Italiano, and Português. The change takes effect after restarting the application. |

## File handling

| Setting                                       | Description                                                                                                                            |
| --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| **Automatically open last file**              | When enabled, Principal Plan reopens the most recently used file at startup.                                                           |
| **Automatically save file every** _N_ minutes | When enabled, the file is saved automatically at the specified interval. The minute field is only active when the checkbox is checked. |

## Transaction Ledgers

| Setting                                 | Description                                                                                                                                       |
| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Auto-fill all details**               | When entering a new Transaction, all fields are copied from the most recent matching payee Transaction.                                           |
| **Auto-fill text fields only**          | Only text fields (payee, memo, code) are auto-filled; amounts are not copied.                                                                     |
| **Auto-fill all and scale the amounts** | All fields are auto-filled and line item amounts are scaled proportionally to match the current total. This is the default.                       |
| **Lock Ledgers**                        | Turns off editing of Transaction fields directly in the Ledger cells of all Ledgers. Transactions can still be changed in the Transaction editor. |
| **Sort ascending**                      | Sorts Ledger Transactions in ascending date order.                                                                                                |

## Transaction Ledger export

| Setting                               | Description                                                                   |
| ------------------------------------- | ----------------------------------------------------------------------------- |
| **Include running balance**           | Adds a running balance column to exported Ledger files.                       |
| **Combine payment & deposit columns** | Merges the Payment and Deposit columns into a single Amount column on export. |

## List views

| Setting                   | Description                                                                                |
| ------------------------- | ------------------------------------------------------------------------------------------ |
| **Display lists in tabs** | The Account, Envelope, and Template lists are shown in separate tabs. This is the default. |
| **Display lists stacked** | The Account, Envelope, and Template lists are stacked vertically in a single pane.         |

A **Defaults** button resets all Application tab settings to their factory values.

# Settings — Accounts

Account list and Ledger display options.

![Settings — Accounts](images/Settings_Accounts.png)

## Overview

The Accounts tab of the Settings dialog controls what information is displayed in the
Account list in the left panel and which columns appear in the Account Ledger.

## Account list

These checkboxes control what is shown next to each Account in the Account list:

| Setting                     | Description                             |
| --------------------------- | --------------------------------------- |
| **Display balance**         | Shows the Account balance.              |
| **Display cleared balance** | Shows the cleared (reconciled) balance. |

## Account Ledger columns

Nine checkboxes control which columns are visible in the Account Ledger. The default state
is shown in the Default column:

| Column                | Default |
| --------------------- | ------- |
| **Code**              | On      |
| **Date**              | On      |
| **Memo**              | Off     |
| **Account**           | Off     |
| **Envelope/Transfer** | On      |
| **Account cleared**   | On      |
| **Payment**           | On      |
| **Deposit**           | On      |
| **Balance**           | On      |

A **Defaults** button resets all Accounts tab settings to their factory values.

# Settings — Envelopes

Envelope list and Ledger display options.

![Settings — Envelopes](images/Settings_Envelopes.png)

## Overview

The Envelopes tab of the Settings dialog controls what information is displayed in the
Envelope list in the left panel and which columns appear in the Envelope Ledger.

## Envelope list

These checkboxes control what is shown next to each Envelope in the Envelope list:

| Setting                                | Description                                                                                                                                               |
| -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Display balance**                    | Shows the Envelope balance.                                                                                                                               |
| **Display cleared balance**            | Shows the cleared (reconciled) balance.                                                                                                                   |
| **Display Watchdogs**                  | Shows Watchdog indicators next to Envelopes that have a Watchdog limit set.                                                                               |
| **Indicate Bundles with Transactions** | Marks Bundle (group) Envelopes that have Transactions assigned directly to them. Transactions on Bundle Envelopes can indicate a data organization issue. |

## Envelope Ledger columns

Nine checkboxes control which columns are visible in the Envelope Ledger. The default state
is shown in the Default column:

| Column               | Default |
| -------------------- | ------- |
| **Code**             | On      |
| **Date**             | On      |
| **Memo**             | Off     |
| **Envelope**         | Off     |
| **Account/Transfer** | On      |
| **Envelope cleared** | On      |
| **Payment**          | On      |
| **Deposit**          | On      |
| **Balance**          | On      |

A **Defaults** button resets all Envelopes tab settings to their factory values.

# Settings — Backup

Automatic backup settings.

![Settings — Backup](images/Settings_Backup.png)

## Overview

The Backup tab of the Settings dialog controls automatic file backup. When enabled,
Principal Plan creates a backup copy of your data file the first time you save it in each session.

## Settings

| Setting                          | Description                                                                                                                                                                                                         |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Automatically create backups** | The master toggle for the backup feature. When unchecked, no automatic backups are created and the remaining settings on this tab are disabled.                                                                     |
| **Backup depth:**                | The number of backup copies to keep (1--100). When a new backup is created and the count exceeds this limit, the oldest backup is discarded. The default is 5.                                                      |
| **Backup directory:**            | The folder where backup files are stored. Click the browse button to select a directory. If the backup directory is unavailable when saving, an error message appears and the save is aborted to protect your data. |

# Settings — Miscellaneous

Messages, import, formatting, Transfer, search, and text size options.

![Settings — Miscellaneous](images/Settings_Miscellaneous.png)

## Overview

The Miscellaneous tab of the Settings dialog collects settings that do not belong to a single Ledger or backup workflow.

## Message display

Unchecking a message suppresses that prompt. The underlying action still occurs, but without a confirmation or warning dialog.

| Setting                               | Description                                                                                      |
| ------------------------------------- | ------------------------------------------------------------------------------------------------ |
| **Envelope Watchdog alert**           | Shows a warning when an Envelope balance drops below its Watchdog limit.                         |
| **Altered amount in Allocation Plan** | Shows a notification when the Allocation Plan normalizes cell values after you change an amount. |
| **Import checkpoint confirmation**    | Shows a confirmation when a checkpoint is created before an import.                              |

## Other settings

| Setting                                   | Description                                                                                                                                                                                       |
| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Create checkpoint before import**       | Automatically saves a checkpoint of your data file before any import operation. This provides a restore point if the import produces unexpected results.                                          |
| **Enable Account Transfers in multiples** | Allows Regular multiple Transactions to include Account Transfer rows. Each Account Transfer row moves part of the Transaction amount to another Account and reduces the main Transaction amount. |
| **Show zero amounts as a dash (-)**       | Displays zero amounts as a dash instead of a numeric zero.                                                                                                                                        |
| **Use today's date for new Transactions** | Sets the date of a new Transaction to today's date. When off, a new Transaction uses the date of the last Transaction you entered.                                                                |

## Search engines

Select the web search engine used when Principal Plan opens a web search in your default browser.

| Engine         | Description                    |
| -------------- | ------------------------------ |
| **Bing**       | Searches using Microsoft Bing. |
| **DuckDuckGo** | Searches using DuckDuckGo.     |
| **Google**     | Searches using Google.         |
| **Yahoo**      | Searches using Yahoo.          |

## Text size

| Setting       | Description                                                                                                                                                                                     |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Text size** | Sets the font size used throughout the application. Drag the slider to adjust; the change is applied immediately as a preview. **OK** keeps the new size, **Cancel** restores the previous one. |

A **Defaults** button resets all Miscellaneous tab settings to their factory values.

# Mobile pairing

Pair a mobile device with the open file and choose what it sees.

![Mobile pairing](images/Mobile_Pairing.png)

## Overview

The **Mobile pairing** dialog links the Principal Plan mobile app to a data file, so the
app can display that file's Envelope balances. Open it from File > **Mobile pairing**.

One file is paired at a time, and syncing runs only while that file is open. Opening a
different file leaves the mobile app showing the data it last received. To sync a different
file, generate a new code and pair again.

The dialog has two tabs. **Envelopes** chooses what the mobile app sees.
**Pair device** creates and revokes the pairing.

## Pairing a device

On the **Pair device** tab, press **Generate code** and enter a passphrase of at
least 8 characters. The desktop displays a QR code. In the mobile app, open the menu with the
three-bar button at the top left, choose **Pair**, scan the code, and type the same passphrase.
The passphrase is never shown beside the QR code and never travels over the network, so a
photograph of the screen is not enough to read your data.

The passphrase cannot be recovered. If it is forgotten, unpair and generate a new code.

The file must be saved before it can be paired, and it must have no unsaved changes.
**Generate code** stays disabled until both are true.

Generating a code while a pairing already exists asks for confirmation first. Confirming unpairs
every device paired to the earlier file and erases that file's synced data from the server.

The frame around the code box reports the state of the pairing. Green means syncing is active
for the open file. Red means nothing is paired, or the pairing belongs to a file that is not
open, or to a file that can no longer be found. While nothing is paired the box reads
**Not set up**.

Opening the dialog on anything other than an active pairing brings up a message naming the next
step: save the file before pairing it, or, when the pairing belongs to another file, that
generating a new code pairs this file and deletes the old pairing.

The App Store and Google Play badges at the bottom of the tab open the mobile app's store
listing in your browser, so the app can be installed on the phone before pairing.

## Choosing Envelopes

![Envelopes](images/Mobile_Pairing_2.png)

The **Envelopes** tab decides which Envelopes reach the mobile app. The choice can be made
while nothing is paired, or while the pairing belongs to the open file. When the pairing belongs
to another file, the tab's controls stay disabled.

Pick Envelopes in the list with the mouse — hold Ctrl to add to the selection, or Shift to take a
range. Three buttons beneath the list fill the selection for you:

| Button                     | Description                                                |
| -------------------------- | ---------------------------------------------------------- |
| **Select all Envelopes**   | Selects every Envelope in the file.                        |
| **Clear selection**        | Selects nothing.                                           |
| **Select Allocation Plan** | Selects the Envelopes included in the **Allocation Plan**. |

Child Envelopes are not implied by their parent — select each Envelope you want published.

While pairing is active for the open file, at least one Envelope must be selected before the
dialog will close. Envelopes always reach the
mobile app in the order they appear in the Envelope list, whatever order they were selected in.

## Dialog controls

| Control           | Description                                                                                                                                                                                                         |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Generate code** | Creates a new pairing for the open file. Any existing pairing is revoked first, after a confirmation, and devices paired to it stop receiving data. Disabled until the file has been saved with no unsaved changes. |
| **Unpair**        | Revokes every paired device and erases the synced data from the server. This cannot be undone.                                                                                                                      |
| **Close**         | Closes the dialog. Every change takes effect immediately, so there is nothing to confirm.                                                                                                                           |

## On the mobile device

The three-bar button at the top left of the mobile app opens its menu.

| Command      | Description                                                                                                                                                                                                                                       |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Pair**     | Checks camera access, then opens the scanner so the device can read a code from the desktop. Shows a **Camera** message instead when the camera cannot be used; see [Mobile app](Mobile_App.html). Available only while the device is not paired. |
| **Unpair**   | Forgets the pairing on the device and clears the balances it is showing. The desktop keeps its own pairing, so the device can pair again with a new code. Available only while the device is paired.                                              |
| **Refresh**  | Reads the published data at once instead of waiting for the next check. Available only while the device is paired.                                                                                                                                |
| **Language** | Opens the language list. The app starts in English, changes language as soon as one is picked, and remembers the choice.                                                                                                                          |

**Pair**, **Unpair** and **Refresh** are also disabled while the app is talking to the server.

The app checks for new data every five minutes while it is on screen, and stops checking
while it is in the background. The bar at the bottom of the screen reads **Not paired** until a
code is scanned, then shows when the data on display was published.

## What the mobile app receives

The desktop publishes only data that is in the file. Unsaved edits are never sent, so the
balances on the phone always match the last save. Publishing happens when the file is opened or
saved, when the **Envelopes** choice is changed, and again every five minutes while the
desktop is running, which is what keeps the date shown on the phone current.

# Mobile app

See your Envelope balances on a paired phone.

![Mobile app](images/Mobile_App.png)

## Overview

Principal Plan Mobile is a companion app for iPhone and Android. It displays the Envelope
balances published by the desktop app for one paired file.

The app is a viewer. Nothing is entered or edited on the phone, no Account or Transaction
detail is sent to it, and it never reads your data file directly. It shows only the Envelope
names and balances the desktop chose to publish.

Install it from the App Store or Google Play. The badges at the bottom of the
**Pair device** tab in the desktop [Mobile pairing](Mobile_Pairing.html) dialog open the store
listings in your browser.

## Pairing with the desktop

Pairing is set up once, from the desktop, and takes a code and a passphrase.

1. On the desktop, open File > **Mobile pairing** and select the **Pair device**
   tab. Save the file first — **Generate code** stays disabled while the file is
   unsaved or has unsaved changes.
2. Press **Generate code** and enter a passphrase of at least 8 characters. A QR code
   appears in the box.
3. On the phone, open the menu with the three-bar button at the top left and choose
   **Pair**.
4. Point the camera at the QR code on the desktop screen. The scanner shows
   **Align the QR code within the frame** until it reads the code.
5. Type the same passphrase on the **Pair with desktop** page and press **Pair**.

Choosing **Pair** first checks the camera. The first time, the phone asks for permission to use
it. If permission is refused, or the phone has no camera, the app shows a **Camera** message
instead of the scanner, and pairing cannot continue. To allow the camera later, turn it on in
the phone's settings: on Android under Settings → Apps → PPlan → Permissions → Camera, and on
iPhone under Settings → PPlan → Camera.

The passphrase is never shown beside the QR code and never travels over the network, so a
photograph of the screen alone will not give anyone your balances. It cannot be recovered
either — if it is forgotten, generate a new code and pair again.

When pairing succeeds, the frame around the QR code on the desktop turns green and the
balances appear on the phone.

## The Envelope list

The main screen lists each Envelope with its balance, in the same order as the desktop
**Envelope list**. Which Envelopes appear is decided on the desktop, by selecting them on
the **Envelopes** tab of the [Mobile pairing](Mobile_Pairing.html) dialog. Buttons there select every
Envelope or the ones in the **Allocation Plan** in one step.

The bar at the bottom of the screen reports the data on display. It reads **Not paired**
until a code is scanned, then shows when the desktop last published, for example
**Posted 14 Aug 2026 09:15**.

## Menu commands

The three-bar button at the top left opens the menu.

| Command      | Description                                                                                                                                                     |
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Pair**     | Checks camera access, then opens the scanner. Shows a **Camera** message instead when the camera cannot be used. Available only while the device is not paired. |
| **Unpair**   | Forgets the pairing on this device and clears the balances. The desktop keeps its own pairing, so the device can pair again with a new code.                    |
| **Refresh**  | Reads the published data at once instead of waiting for the next check.                                                                                         |
| **Language** | Opens the language list. The app starts in English, switches as soon as a language is picked, and remembers the choice.                                         |

The three pairing commands are disabled while the app is talking to the server.

## Keeping up to date

The app checks for new data every five minutes while it is on screen, and stops checking
while it is in the background. **Refresh** fetches immediately.

The desktop publishes when the paired file is opened or saved, when the Envelope choice
changes, and every five minutes while it is running. Unsaved desktop edits are never
published, so the balances on the phone always match the last save of the paired file. If
the paired file is not open on the desktop, the phone keeps showing the data it last
received.

See [Mobile pairing](Mobile_Pairing.html) for the desktop side of pairing, including how to choose which
Envelopes are published and how to end the pairing.
