MCPcopy Create free account
hub / github.com/devxnshsharma/UnMessify / createExpenseEntry

Function createExpenseEntry

app.js:55–65  ·  view source on GitHub ↗

* Create a new expense entry * @param {Object} data - Expense data * @returns {Object} Expense entry with generated ID

(data)

Source from the content-addressed store, hash-verified

53 * @returns {Object} Expense entry with generated ID
54 */
55function createExpenseEntry(data) {
56 return {
57 id: generateUUID(),
58 date: data.date,
59 mealType: data.mealType || 'lunch',
60 itemType: data.itemType || 'veg',
61 quantity: parseInt(data.quantity) || 1,
62 cost: parseFloat(data.cost) || 0,
63 notes: data.notes || null
64 };
65}
66
67/**
68 * Compute derived data from profile and expenses

Callers 1

handleExpenseSubmitMethod · 0.85

Calls 1

generateUUIDFunction · 0.85

Tested by

no test coverage detected