# ERPNext Integration Document: Asset & Journal Entry for Depreciation and Fixed Asset Tracking
## 1. Objective
This document outlines the technical and functional requirements for integrating an external Asset
Management System with ERPNext. The integration will enable automatic asset registration,
depreciation schedule management, and depreciation journal entries in ERPNext.
## 2. DocTypes Involved
| DocType | Purpose |
|--------------------|---------------------------------------------|
| Asset | Register and track fixed assets |
| Depreciation Schedule | Auto-generated from asset record |
| Journal Entry | Records depreciation accounting impact |
| Asset Movement | Optional: Track asset transfers |
## 3. Integration Overview
### 3.1 From External System to ERPNext
- Push asset creation data
- Trigger journal entries for depreciation
- Update asset status on disposal/sale
### 3.2 From ERPNext to External System (Optional)
- Fetch current book value
- Push depreciation posting status
## 4. API Endpoints and Payloads
### 4.1 Create Asset
**Endpoint:** POST /api/resource/Asset
**Required Fields:**
| Field | Description |
|---------------------------|-------------------------------------|
| asset_name | Unique asset name |
| asset_category | Category (e.g., Computers, Vehicles)|
| purchase_date | Date of acquisition |
| gross_purchase_amount | Purchase cost |
| location | Location/Warehouse |
| supplier | Vendor (optional) |
| expected_value_after_useful_life | Scrap value |
| useful_life_in_years | Useful life duration |
| depreciation_method | Straight Line / Declining Balance |
| company | Company name |
**Example Payload:**
```json
"asset_name": "Laptop-Dell-XPS15",
"asset_category": "Computers",
"purchase_date": "2025-01-10",
"gross_purchase_amount": 2500,
"location": "IT Department",
"supplier": "TechWorld Inc.",
"expected_value_after_useful_life": 300,
"useful_life_in_years": 3,
"depreciation_method": "Straight Line",
"company": "Guba Technology PLC"
```
### 4.2 Trigger Depreciation Journal Entry (Optional)
**Endpoint:** POST /api/resource/Journal Entry
**Required Fields:**
| Field | Description |
|--------------------|-----------------------------------------|
| posting_date | Date of depreciation |
| company | Company name |
| accounts | Array of debit/credit entries |
| reference_type | "Asset" |
| reference_name | Asset Name |
**Example Payload:**
```json
"posting_date": "2025-06-30",
"company": "Guba Technology PLC",
"accounts": [
"account": "Depreciation Expense - GT",
"debit": 200,
"reference_type": "Asset",
"reference_name": "Laptop-Dell-XPS15"
},
"account": "Accumulated Depreciation - GT",
"credit": 200,
"reference_type": "Asset",
"reference_name": "Laptop-Dell-XPS15"
```
### 4.3 Update Asset Disposal Status
**Endpoint:** PUT /api/resource/Asset/{asset_name}
**Required Fields:**
| Field | Description |
|---------------|---------------------------------|
| status | Set to "Disposed" |
| disposal_date | Date of disposal |
| sale_amount | Resale value (optional) |
**Example Payload:**
```json
"status": "Disposed",
"disposal_date": "2028-06-01",
"sale_amount": 300
```
## 5. Validation Rules
| Validation Item | Type |
|-------------------------------------------|------------------|
| Unique asset_name | Mandatory |
| asset_category must exist in master data | Master Data Rule |
| Accounts must exist in Chart of Accounts | Validation Rule |
| Posting date within fiscal year | Fiscal Check |
| Required fields for capitalized assets | Compliance |
## 6. Security & Authentication
- Use Token or OAuth 2.0 based authentication.
- Role-based access control:
- Asset
- Journal Entry
- Asset Movement
## 7. Reporting & Outcome in ERPNext
- Fixed Asset Register
- Depreciation Schedule
- Journal Entry Listing
- Asset Disposal Log
## 8. Recommendations
- Sync asset data daily via cron or scheduler.
- Use ERPNext webhooks to notify other systems upon disposal or posting.
- Maintain audit logs for all integration transactions.
## 9. Optional Enhancements
- Enable QR code tagging on assets.
- Integrate asset images and documents.
- Implement middleware for error handling and queuing.
Prepared By: ERPNext Integration Team
Date: June 3, 2025
Client: Guba Technology PLC