Home Library Receipts

Receipts

Receipts are payment confirmations that link payments to documentary proof. They support auto-calculated amounts, inline adjustments, and two-way confirmation.

Overview

A receipt groups one or more payments and charges into a single confirmable document. The receipt amount is auto-calculated as the sum of all linked allocations. Each allocation amount can be adjusted inline, automatically creating provider adjustment records.

Auto-Calculated Amount

Receipt total = sum of all linked payments + charges + one-time expenses. No manual amount entry — everything is calculated automatically.

Inline Adjustments

Change any allocation amount directly on the receipt page. The system automatically creates a ServiceProviderAdjustment with the difference, linked to the expense provider.

One-Time Expenses

Add ad-hoc expenses (repairs, services) directly from the receipt. The system creates an ExpenseCharge + Payment + Allocation automatically.

Two-Way Confirmation

Both landlord and tenant must confirm the receipt independently for full validation.

Multi-Currency Support

Receipts automatically convert to property country currency when different from receipt currency.

Document Attachment

Attach a scan of bank confirmation or cash receipt document in PDF, JPG, PNG, or HEIC format.

Architecture

Receipts connect to payments through allocations. When an allocation amount differs from the original payment, an adjustment link and provider adjustment are created automatically.

Receipt Auto-calculated total, notes, confirmations
PaymentAllocation Links receipt ↔ payment with editable amount
Payment Original payment from tenant
AdjustmentLink original → adjusted amount, difference
ServiceProviderAdjustment Balance correction with expense provider

Adjustment Flow

When you change an allocation amount on the receipt page:

1

Edit Amount

Click the pencil icon next to any payment amount. Enter the new amount in property currency.

2

Adjustment Link Created

System creates a ReceiptAdjustmentLink storing: original amount, adjusted amount, and difference. One link per allocation (unique constraint).

3

Provider Adjustment

If payment is linked to an expense with a provider (Payment → ExpenseCharge → PropertyExpense → ExpenseProvider), a ServiceProviderAdjustment is created/updated automatically. Auto-confirmed from creator side.

4

Auto-Cleanup

If adjusted amount = original amount (difference = 0), the adjustment link and provider adjustment are automatically deleted.

No Provider Case: Rental charges and pure payments have no expense provider. In this case, only the AdjustmentLink is created (without ServiceProviderAdjustment).

Confirmation & Editing Rules

Receipts use a two-way confirmation system that controls editing permissions:

Not confirmed

Default. Neither party confirmed. Full editing available.

Confirmed

One party confirmed. The confirmed party can still revoke. The other party can still edit.

Fully Confirmed

Both confirmed. Receipt is locked — no editing, no attaching/detaching payments, no document changes.

Lock Rule: When the OTHER side confirms, editing is locked for you. Example: if tenant confirms, the landlord can no longer change amounts, attach payments, or upload documents. Only confirmation/revocation buttons remain active.

Link with Payments

On the receipt page you can attach existing payments or create new one-time expenses:

Attach Existing Payment

Select from available payments/charges in the dropdown. Amount is auto-filled in property currency. You can change it to create an adjustment.

Add One-Time Expense

Enter a name and amount. System creates: ExpenseCharge (type ONE_TIME) → Payment → Allocation. Requires both name and amount.

Detach Payment

Remove a payment from the receipt. This also deletes the associated adjustment link and provider adjustment automatically.

Learn More: For detailed information about payments, see the Payments.

Inline Editing

The receipt view page supports inline editing without navigating to a separate form:

Notes (WYSIWYG)

Click the pencil icon to open a rich text editor (Summernote). Supports bold, italic, lists, and links. Saves via AJAX without page reload.

Payment Amounts

Click the pencil icon next to any payment amount to change it. Saves via AJAX. Automatically creates/updates/removes adjustments.

Document Upload

Drag & drop or select a file. Supports JPG, PNG, PDF, HEIC (max 20 MB). Documents sync to Google Drive automatically.

Visibility Rules

Role Can See
LANDLORD / AGENT All receipts for owned properties
TENANT / AGENT Receipts related to their contracts and payments

REST API

Access receipts via REST API (requires JWT authentication):

GET    /api/v1/receipts                              - List my receipts
GET    /api/v1/properties/{id}/receipts              - List property receipts
GET    /api/v1/properties/{id}/receipts/{rid}        - Get receipt details

Full API documentation with interactive testing is available in Swagger UI: /api/v1/doc