> ## Documentation Index
> Fetch the complete documentation index at: https://help.agatabo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Editing Deposits

> Correct deposit errors and handle deposit modifications

## Overview

Editing deposits allows you to correct errors in recorded transactions. This guide covers when deposits can be edited, how corrections work, and handling deposits in closed periods.

## When Can Deposits Be Edited?

<Tabs>
  <Tab title="Open Period">
    ✅ **Can edit if**:

    * Deposit transaction date is in the current open period
    * You have `savings:write` permission
    * Period has not been closed

    **Editable fields**:

    * Amount
    * Date (must stay within open period)
    * Bank Account
    * Documents (attachments)
  </Tab>

  <Tab title="Closed Period">
    ❌ **Cannot edit**

    **Instead**:

    * Record adjusting entry in current period
    * Document the correction clearly
    * Consult accountant for proper handling

    [Learn about period closing →](/tontines/advanced/period-closing)
  </Tab>
</Tabs>

## How Editing Works

When you edit a deposit, Agatabo uses a **reverse and repost** strategy:

1. **Reverses the original journal entry**: Creates a reversal with negative amounts
2. **Creates new journal entry**: Posts corrected transaction with new values
3. **Updates member balance**: Reflects the net change
4. **Logs in audit trail**: Records the edit operation

<Note>
  **Important**: Editing doesn't modify the original transaction. Instead, it reverses the old entry and creates a new one. This maintains a complete audit trail of all changes.
</Note>

## Editing a Deposit

<Steps>
  <Step title="Navigate to Savings → Deposit History">
    Opens deposit history page
  </Step>

  <Step title="Find the deposit">
    Use filters or search to locate the deposit
  </Step>

  <Step title="Click on deposit row">
    Opens deposit details
  </Step>

  <Step title="Click 'Edit' button">
    Opens edit dialog
  </Step>

  <Step title="Modify fields">
    Change amount, date, bank account, or update documents
  </Step>

  <Step title="Click 'Save Changes'">
    System reverses original and creates corrected entry
  </Step>

  <Step title="Verify the change">
    Check member's balance and journal entries
  </Step>
</Steps>

## Common Edit Scenarios

### Wrong Amount

**Example**: Recorded 10,000 instead of 100,000

<Steps>
  <Step title="Open deposit for editing">
    Find and click Edit
  </Step>

  <Step title="Change amount">
    Update from 10,000 to 100,000
  </Step>

  <Step title="Save">
    System reverses 10,000 entry and posts 100,000 entry
  </Step>

  <Step title="Verify balance">
    Member balance increases by net difference (+90,000)
  </Step>
</Steps>

### Wrong Date

**Example**: Recorded today but actually deposited yesterday

<Steps>
  <Step title="Edit deposit">
    Open edit dialog
  </Step>

  <Step title="Change date">
    Select correct date
  </Step>

  <Step title="Verify period">
    New date must be in open period
  </Step>

  <Step title="Save">
    Deposit moves to correct date in records
  </Step>
</Steps>

<Warning>
  **Period restriction**: The new date must be in an open accounting period. You cannot move deposits into closed periods.
</Warning>

### Wrong Bank Account

**Example**: Recorded to "Cash - Main Office" but should be "KCB Bank Account"

<Steps>
  <Step title="Edit deposit">
    Open edit dialog
  </Step>

  <Step title="Change bank account">
    Select correct account from dropdown
  </Step>

  <Step title="Save">
    Journal entry updates to reflect correct bank account
  </Step>
</Steps>

This helps with bank reconciliation by ensuring deposits are recorded to the correct accounts.

### Wrong Member

<Warning>
  **Cannot change member assignment**

  You cannot edit which member a deposit is credited to. If a deposit was credited to the wrong member:

  1. **Delete (reverse) the incorrect deposit**
  2. **Record new deposit for correct member**
  3. **Document the correction**

  Or contact your accountant for guidance.
</Warning>

## Deleting (Reversing) Deposits

<Warning>
  **Use with extreme caution**

  Deleting deposits:

  * Creates a reversal journal entry
  * Decreases member's savings balance
  * Cannot be undone if period is closed
  * Requires accounting review
</Warning>

### When to Delete

Use deletion for:

* Duplicate deposit recorded by error
* Test deposit in production system
* Completely incorrect transaction that needs removal

### Deletion Process

<Steps>
  <Step title="Verify deletion is necessary">
    Confirm this isn't just an amount/date error that can be edited
  </Step>

  <Step title="Note member's current balance">
    Balance will decrease after deletion
  </Step>

  <Step title="Navigate to Savings → Deposit History">
    Opens deposit history page
  </Step>

  <Step title="Find the deposit">
    Use filters or search to locate the deposit
  </Step>

  <Step title="Click on deposit row">
    Opens deposit details
  </Step>

  <Step title="Click 'Delete' button">
    Located in the deposit details page header
  </Step>

  <Step title="Confirm deletion">
    Confirmation dialog appears - click to confirm
  </Step>

  <Step title="Verify">
    * Reversal entry appears in journal
    * Member balance decreased correctly
  </Step>
</Steps>

**What happens**:

* Original deposit remains in records
* A reversal entry is created (negative amounts)
* Net effect: deposit is cancelled out
* Full audit trail is preserved

## Corrections in Closed Periods

If you need to correct a deposit in a closed period, you **cannot edit or delete it**. Use an adjusting entry instead:

### Adjusting Entry Process

<Steps>
  <Step title="Identify the error">
    Document what was wrong and what it should be
  </Step>

  <Step title="Consult accountant">
    Explain the error and get guidance on proper correction
  </Step>

  <Step title="Record adjusting entry">
    Create manual journal entry in current open period
  </Step>

  <Step title="Document thoroughly">
    Reference original deposit date and explain the correction
  </Step>
</Steps>

**Example**: Deposit dated 2026-05-15 was recorded as 50,000 but should have been 60,000

Manual journal entry in current period (June 2026):

```
Description: Correction for deposit dated 2026-05-15
             Originally 50,000, should be 60,000

DEBIT:  Cash (Bank Account)        10,000
CREDIT: Member Savings              10,000
```

Attach documentation explaining the correction.

## Best Practices

<Note>
  **Editing deposits safely:**

  * Double-check amount before saving correction
  * Verify the member's name is correct before editing
  * Check that new date is in open period
  * Review member balance after editing to confirm correct change
  * Prefer editing over delete + re-record when possible
  * Consult accountant for significant corrections (large amounts, old dates)
  * Document corrections if they're unusual or complex
</Note>

## Permissions Required

| Action                  | Permission      | Scope |
| ----------------------- | --------------- | ----- |
| View deposits           | `savings:read`  | ANY   |
| Edit deposits           | `savings:write` | ANY   |
| Delete/reverse deposits | `savings:write` | ANY   |

<Note>
  The same permission (`savings:write`) is required for both editing and deleting deposits. Access is typically restricted to treasurers, accountants, and administrators.
</Note>

## Related Operations

<CardGroup cols={2}>
  <Card title="Recording Deposits" icon="plus" href="/tontines/deposits/recording-deposits">
    How to record deposits correctly
  </Card>

  <Card title="Viewing Deposit History" icon="clock-rotate-left" href="/tontines/deposits/viewing-deposit-history">
    Find deposits to edit
  </Card>

  <Card title="Period Closing" icon="lock" href="/tontines/advanced/period-closing">
    Understanding closed periods
  </Card>

  <Card title="Viewing User Details" icon="address-card" href="/tontines/organization-users/viewing-member-details">
    Check member balances after corrections
  </Card>
</CardGroup>
