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.
Adjustment Flow
When you change an allocation amount on the receipt page:
Edit Amount
Click the pencil icon next to any payment amount. Enter the new amount in property currency.
Adjustment Link Created
System creates a ReceiptAdjustmentLink storing: original amount, adjusted amount, and difference. One link per allocation (unique constraint).
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.
Auto-Cleanup
If adjusted amount = original amount (difference = 0), the adjustment link and provider adjustment are automatically deleted.
Confirmation & Editing Rules
Receipts use a two-way confirmation system that controls editing permissions:
Default. Neither party confirmed. Full editing available.
One party confirmed. The confirmed party can still revoke. The other party can still edit.
Both confirmed. Receipt is locked — no editing, no attaching/detaching payments, no document changes.
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.
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