-
-
-
+
+ Details
+ Books
+ Files
+ Warranties
+ Tasks
+ Notes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Template fields
+
+
+
+
+
+
-
-
+
+
+
+
+
+ Each book can carry its own cost, method, life, §179, bonus and convention. Leave cost blank to inherit the acquisition cost.
+
+
+
+
+
+
+ {{ book.book_type }}
+
+ {{ methodLabel(book.depreciation_method) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Attach file
+
+ Store invoices, photos, manuals, and insurance records here.
+
+
+ {{ file.file_name }}
+ {{ formatBytes(file.size) }} · {{ file.mime_type }}
+
+
+
+
+
+
+
+ Save the asset first, then attach files.
+
+
+
+
+
+
+
+ {{ w.provider || 'Warranty' }}
+
+ {{ w.start_date || '—' }} → {{ w.expiration_date || '—' }}
+ · {{ w.coverage_details }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Add warranty
+
+ Save the asset first, then add warranties.
+
+
+
+
+
+
+
+
+
+
+ {{ task.title }}
+ {{ task.type }} · due {{ task.due_date || '—' }}
+
+
+
+
+
+
+
+
+
+
+
+
+ Add task
+
+ Save the asset first, then add tasks.
+
+
+
+
+
+
+ Add note
+
+
+
+
+
{{ note.body }}
+
{{ note.author || 'Unknown' }} · {{ note.created_at }}
+
+
+
+
+
+
+ No notes yet.
+
+ Save the asset first, then keep running notes.
+
+
{{ drawerError }}
@@ -63,12 +224,25 @@
diff --git a/src/constants.js b/src/constants.js
index c426bb5..e6039ff 100644
--- a/src/constants.js
+++ b/src/constants.js
@@ -2,6 +2,23 @@ export const bookItems = ['GAAP', 'FEDERAL', 'STATE', 'AMT', 'ACE', 'USER'];
export const statusItems = ['in_service', 'cip', 'reserved', 'checked_out', 'disposed', 'retired'];
+export const conventionItems = [
+ { title: 'Half-year', value: 'half_year' },
+ { title: 'Mid-quarter', value: 'mid_quarter' },
+ { title: 'Mid-month', value: 'mid_month' },
+ { title: 'Full-month', value: 'full_month' },
+ { title: 'None', value: 'none' }
+];
+
+export const newUsedItems = [
+ { title: 'New', value: 'new' },
+ { title: 'Used', value: 'used' }
+];
+
+export const taskTypeItems = ['maintenance', 'inspection', 'calibration', 'renewal', 'compliance', 'other'];
+
+export const conditionItems = ['excellent', 'good', 'fair', 'poor', 'out_of_service'];
+
export const customFieldTypes = [
{ title: 'Text', value: 'text' },
{ title: 'Number', value: 'numeric' },
diff --git a/src/utils/assets.js b/src/utils/assets.js
index 5e32b38..bb65d29 100644
--- a/src/utils/assets.js
+++ b/src/utils/assets.js
@@ -1,6 +1,23 @@
+export const BOOK_TYPES = ['GAAP', 'FEDERAL', 'STATE', 'AMT', 'ACE', 'USER'];
+
+export function makeDefaultBooks(asset = {}) {
+ return BOOK_TYPES.map((bookType) => ({
+ book_type: bookType,
+ active: bookType === 'GAAP' || bookType === 'FEDERAL',
+ cost: null,
+ depreciation_method: asset.depreciation_method || 'straight_line',
+ convention: 'half_year',
+ useful_life_months: asset.useful_life_months || 60,
+ section_179_amount: 0,
+ bonus_percent: 0,
+ business_use_percent: 100,
+ investment_use_percent: 0
+ }));
+}
+
export function blankAsset() {
const today = new Date().toISOString().slice(0, 10);
- return {
+ const base = {
asset_id: '',
entity_id: null,
description: '',
@@ -11,18 +28,30 @@ export function blankAsset() {
in_service_date: today,
useful_life_months: 60,
salvage_value: 0,
+ land_value: 0,
+ prior_depreciation: 0,
depreciation_method: 'straight_line',
location: '',
department: '',
+ group_name: '',
custodian: '',
vendor: '',
serial_number: '',
invoice_number: '',
gl_asset_account: '',
gl_expense_account: '',
+ gl_accumulated_account: '',
+ barcode_value: '',
+ condition: '',
+ new_or_used: 'new',
+ listed_property: false,
+ business_use_percent: 100,
+ investment_use_percent: 0,
notes: '',
custom_fields: {}
};
+ base.books = makeDefaultBooks(base);
+ return base;
}
export function slugFieldKey(value) {