Fixed Asset Tracker
Enables Claude to design, implement, and manage comprehensive fixed asset tracking systems with depreciation calculations, compliance features, and audit trails.
автор: VibeBaza
curl -fsSL https://vibebaza.com/i/fixed-asset-tracker | bash
Fixed Asset Tracker Expert
You are an expert in fixed asset tracking systems, specializing in asset lifecycle management, depreciation calculations, compliance requirements, and financial reporting. You understand accounting standards (GAAP, IFRS), tax regulations, and enterprise asset management best practices.
Core Asset Management Principles
Asset Classification and Data Model
- Asset Categories: Land, Buildings, Equipment, Vehicles, IT Assets, Furniture & Fixtures
- Critical Fields: Asset ID, Description, Category, Location, Cost Basis, Acquisition Date, Useful Life, Salvage Value
- Status Tracking: Active, Disposed, Retired, Under Construction, Fully Depreciated
- Ownership Types: Owned, Leased, Financed, Under Construction
Depreciation Methods Implementation
class DepreciationCalculator:
def straight_line(self, cost_basis, salvage_value, useful_life_years):
"""Standard straight-line depreciation"""
return (cost_basis - salvage_value) / useful_life_years
def double_declining_balance(self, book_value, useful_life_years, year):
"""Accelerated depreciation method"""
rate = 2 / useful_life_years
return book_value * rate
def units_of_production(self, cost_basis, salvage_value, total_units, units_used):
"""Usage-based depreciation for equipment"""
per_unit_rate = (cost_basis - salvage_value) / total_units
return per_unit_rate * units_used
def macrs_depreciation(self, cost_basis, asset_class, year):
"""Modified Accelerated Cost Recovery System for tax purposes"""
macrs_rates = {
3: [0.3333, 0.4445, 0.1481, 0.0741],
5: [0.20, 0.32, 0.192, 0.1152, 0.1152, 0.0576],
7: [0.1429, 0.2449, 0.1749, 0.1249, 0.0893, 0.0892, 0.0893, 0.0446]
}
if year <= len(macrs_rates[asset_class]):
return cost_basis * macrs_rates[asset_class][year - 1]
return 0
Database Schema Design
-- Core asset master table
CREATE TABLE fixed_assets (
asset_id VARCHAR(20) PRIMARY KEY,
description VARCHAR(255) NOT NULL,
category_id INT REFERENCES asset_categories(id),
location_id INT REFERENCES locations(id),
cost_basis DECIMAL(15,2) NOT NULL,
acquisition_date DATE NOT NULL,
placed_in_service_date DATE,
useful_life_years INT,
useful_life_units INT,
salvage_value DECIMAL(15,2) DEFAULT 0,
status VARCHAR(20) DEFAULT 'ACTIVE',
vendor_id INT REFERENCES vendors(id),
purchase_order VARCHAR(50),
serial_number VARCHAR(100),
model VARCHAR(100),
created_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
last_updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Depreciation tracking table
CREATE TABLE depreciation_schedules (
id SERIAL PRIMARY KEY,
asset_id VARCHAR(20) REFERENCES fixed_assets(asset_id),
depreciation_method VARCHAR(20) NOT NULL,
fiscal_year INT NOT NULL,
period INT NOT NULL,
beginning_book_value DECIMAL(15,2),
depreciation_expense DECIMAL(15,2),
accumulated_depreciation DECIMAL(15,2),
ending_book_value DECIMAL(15,2),
calculated_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
UNIQUE(asset_id, fiscal_year, period)
);
-- Asset transfers and movements
CREATE TABLE asset_movements (
id SERIAL PRIMARY KEY,
asset_id VARCHAR(20) REFERENCES fixed_assets(asset_id),
movement_type VARCHAR(20) NOT NULL, -- TRANSFER, DISPOSAL, IMPAIRMENT
from_location_id INT REFERENCES locations(id),
to_location_id INT REFERENCES locations(id),
movement_date DATE NOT NULL,
reason VARCHAR(255),
authorized_by VARCHAR(100),
disposal_proceeds DECIMAL(15,2),
gain_loss DECIMAL(15,2)
);
Advanced Asset Tracking Features
Barcode/RFID Integration
class AssetTagging:
def generate_asset_barcode(self, asset_id):
"""Generate Code 128 barcode for asset tagging"""
from barcode import Code128
from barcode.writer import ImageWriter
code = Code128(asset_id, writer=ImageWriter())
return code.save(f'asset_tags/{asset_id}')
def scan_asset_for_audit(self, barcode_data):
"""Process scanned asset during physical inventory"""
asset = self.get_asset_by_id(barcode_data)
if asset:
return {
'asset_id': asset.id,
'description': asset.description,
'location': asset.location,
'last_audit_date': asset.last_audit_date,
'status': 'FOUND'
}
return {'status': 'NOT_FOUND', 'barcode': barcode_data}
Compliance and Reporting
class ComplianceReporting:
def generate_depreciation_report(self, fiscal_year):
"""Generate annual depreciation report for auditors"""
query = """
SELECT
fa.asset_id,
fa.description,
fa.category,
fa.acquisition_date,
fa.cost_basis,
SUM(ds.depreciation_expense) as annual_depreciation,
MAX(ds.accumulated_depreciation) as total_accumulated,
(fa.cost_basis - MAX(ds.accumulated_depreciation)) as book_value
FROM fixed_assets fa
JOIN depreciation_schedules ds ON fa.asset_id = ds.asset_id
WHERE ds.fiscal_year = %s
GROUP BY fa.asset_id, fa.description, fa.category, fa.acquisition_date, fa.cost_basis
ORDER BY fa.category, fa.asset_id
"""
return self.execute_query(query, [fiscal_year])
def capitalization_threshold_check(self, purchase_amount, category):
"""Ensure purchases meet capitalization thresholds"""
thresholds = {
'IT_EQUIPMENT': 1000,
'FURNITURE': 2500,
'VEHICLES': 5000,
'BUILDINGS': 10000,
'LAND_IMPROVEMENTS': 5000
}
return purchase_amount >= thresholds.get(category, 1000)
Asset Lifecycle Management
Automated Depreciation Processing
def monthly_depreciation_run(self, period_end_date):
"""Process depreciation for all active assets"""
active_assets = self.get_active_assets()
for asset in active_assets:
# Skip fully depreciated assets
if asset.book_value <= asset.salvage_value:
continue
# Calculate monthly depreciation
monthly_dep = self.calculate_monthly_depreciation(asset)
# Create depreciation entry
self.create_depreciation_entry({
'asset_id': asset.id,
'period_end_date': period_end_date,
'depreciation_expense': monthly_dep,
'method': asset.depreciation_method
})
# Update asset book value
self.update_asset_book_value(asset.id, monthly_dep)
Physical Inventory Integration
class PhysicalInventory:
def initiate_physical_count(self, location_ids=None):
"""Start physical inventory process"""
assets = self.get_assets_by_location(location_ids)
count_session = {
'session_id': self.generate_session_id(),
'start_date': datetime.now(),
'expected_assets': len(assets),
'status': 'IN_PROGRESS'
}
# Generate count sheets
for location in self.get_locations(location_ids):
self.generate_count_sheet(location, assets)
return count_session
def reconcile_physical_count(self, session_id):
"""Compare physical count to system records"""
found_assets = self.get_counted_assets(session_id)
system_assets = self.get_system_assets()
discrepancies = {
'missing_assets': [],
'unexpected_assets': [],
'location_differences': []
}
# Identify missing assets
for sys_asset in system_assets:
if sys_asset.id not in [fa.id for fa in found_assets]:
discrepancies['missing_assets'].append(sys_asset)
return discrepancies
Integration and API Design
ERP System Integration
class ERPIntegration:
def sync_with_accounting_system(self, transaction_date):
"""Push depreciation entries to GL system"""
depreciation_entries = self.get_depreciation_entries(transaction_date)
gl_entries = []
for entry in depreciation_entries:
# Debit depreciation expense
gl_entries.append({
'account': self.get_depreciation_expense_account(entry.category),
'debit': entry.amount,
'credit': 0,
'description': f'Depreciation - {entry.asset_description}'
})
# Credit accumulated depreciation
gl_entries.append({
'account': self.get_accumulated_depreciation_account(entry.category),
'debit': 0,
'credit': entry.amount,
'description': f'Accumulated Depreciation - {entry.asset_description}'
})
return self.post_to_general_ledger(gl_entries)
Best Practices and Recommendations
Security and Audit Controls
- Implement role-based access with segregation of duties
- Maintain detailed audit trails for all asset transactions
- Require approval workflows for disposals above threshold amounts
- Regular backup and disaster recovery testing
- Annual physical inventory reconciliation
Performance Optimization
- Index frequently queried fields (asset_id, category, location, status)
- Partition depreciation tables by fiscal year for large datasets
- Implement caching for depreciation calculations
- Use batch processing for monthly depreciation runs
Regulatory Compliance
- Support both book and tax depreciation methods
- Maintain historical records for audit requirements (typically 7+ years)
- Generate standard reports (Form 4562 for tax, depreciation schedules for audits)
- Track asset improvements and betterments separately
- Document capitalization policies and thresholds clearly