feat: Update finance operation description handling in API

This commit is contained in:
2026-02-14 21:31:53 +01:00
parent f3be8e1025
commit 6e7f452c08
2 changed files with 219 additions and 54 deletions

View File

@@ -9,12 +9,156 @@
}, },
"api.php": { "api.php": {
"type": "-", "type": "-",
"size": 3758, "size": 4261,
"lmtime": 0, "lmtime": 1771100526209,
"modified": true "modified": false
}, },
"autoload": { "autoload": {
"class.Cache.php": {
"type": "-",
"size": 1006,
"lmtime": 0,
"modified": false
},
"class.Chunk.php": {
"type": "-",
"size": 7304,
"lmtime": 0,
"modified": false
},
"class.Cron.php": {
"type": "-",
"size": 9391,
"lmtime": 1770937836455,
"modified": false
},
"class.DbModel.php": {
"type": "-",
"size": 1392,
"lmtime": 0,
"modified": false
},
"class.Excel.php": {
"type": "-",
"size": 4319,
"lmtime": 0,
"modified": false
},
"class.Html.php": {
"type": "-",
"size": 2105,
"lmtime": 0,
"modified": false
},
"class.S.php": {
"type": "-",
"size": 7575,
"lmtime": 0,
"modified": false
},
"class.Tpl.php": {
"type": "-",
"size": 1746,
"lmtime": 0,
"modified": false
},
"Controllers": {
"class.TasksController.php": {
"type": "-",
"size": 567,
"lmtime": 0,
"modified": false
},
"CrmController.php": {
"type": "-",
"size": 1940,
"lmtime": 1771099681826,
"modified": false
},
"TasksController.php": {
"type": "-",
"size": 3009,
"lmtime": 0,
"modified": false
},
"UsersController.php": {
"type": "-",
"size": 3914,
"lmtime": 1770653696575,
"modified": false
},
"FinancesController.php": {
"type": "-",
"size": 6828,
"lmtime": 1771100264230,
"modified": false
}
},
"controls": {
"class.BackendSites.php": {
"type": "-",
"size": 2940,
"lmtime": 0,
"modified": false
},
"class.Cron.php": {
"type": "-",
"size": 131,
"lmtime": 0,
"modified": false
},
"class.Finances.php": {
"type": "-",
"size": 6614,
"lmtime": 0,
"modified": false
},
"class.Projects.php": {
"type": "-",
"size": 9521,
"lmtime": 0,
"modified": false
},
"class.Site.php": {
"type": "-",
"size": 1298,
"lmtime": 1771099882500,
"modified": false
},
"class.Tasks.php": {
"type": "-",
"size": 22654,
"lmtime": 1770937828041,
"modified": false
},
"class.Users.php": {
"type": "-",
"size": 4242,
"lmtime": 0,
"modified": false
},
"class.Wiki.php": {
"type": "-",
"size": 1825,
"lmtime": 0,
"modified": false
},
"class.Crm.php": {
"type": "-",
"size": 247,
"lmtime": 1771099888168,
"modified": false
}
},
"Domain": { "Domain": {
"Crm": {
"ClientRepository.php": {
"type": "-",
"size": 1592,
"lmtime": 1771099662028,
"modified": false
}
},
"Tasks": { "Tasks": {
"class.WorkTimeRepository.php": { "class.WorkTimeRepository.php": {
"type": "-", "type": "-",
@@ -25,13 +169,13 @@
"MailToTaskImporter.php": { "MailToTaskImporter.php": {
"type": "-", "type": "-",
"size": 37982, "size": 37982,
"lmtime": 1770800891666, "lmtime": 1770937612534,
"modified": false "modified": false
}, },
"TaskAttachmentRepository.php": { "TaskAttachmentRepository.php": {
"type": "-", "type": "-",
"size": 8806, "size": 8806,
"lmtime": 1770731454505, "lmtime": 1770937612535,
"modified": false "modified": false
}, },
"WorkTimeRepository.php": { "WorkTimeRepository.php": {
@@ -48,6 +192,14 @@
"lmtime": 1770653480229, "lmtime": 1770653480229,
"modified": false "modified": false
} }
},
"Finances": {
"FinanceRepository.php": {
"type": "-",
"size": 16494,
"lmtime": 1771100224930,
"modified": false
}
} }
}, },
"factory": { "factory": {
@@ -59,8 +211,8 @@
}, },
"class.Crm.php": { "class.Crm.php": {
"type": "-", "type": "-",
"size": 1863, "size": 1434,
"lmtime": 0, "lmtime": 1771099700900,
"modified": false "modified": false
}, },
"class.Cron.php": { "class.Cron.php": {
@@ -71,8 +223,8 @@
}, },
"class.Finances.php": { "class.Finances.php": {
"type": "-", "type": "-",
"size": 16159, "size": 3450,
"lmtime": 0, "lmtime": 1771100409816,
"modified": false "modified": false
}, },
"class.Projects.php": { "class.Projects.php": {
@@ -83,8 +235,8 @@
}, },
"class.Tasks.php": { "class.Tasks.php": {
"type": "-", "type": "-",
"size": 20921, "size": 21447,
"lmtime": 0, "lmtime": 1770937810551,
"modified": false "modified": false
}, },
"class.Users.php": { "class.Users.php": {
@@ -100,34 +252,7 @@
"modified": false "modified": false
} }
}, },
"Controllers": { "view": {}
"class.TasksController.php": {
"type": "-",
"size": 567,
"lmtime": 0,
"modified": false
},
"TasksController.php": {
"type": "-",
"size": 3009,
"lmtime": 0,
"modified": false
},
"UsersController.php": {
"type": "-",
"size": 3914,
"lmtime": 1770653696575,
"modified": false
}
},
"controls": {
"class.Users.php": {
"type": "-",
"size": 4242,
"lmtime": 1770653518273,
"modified": false
}
}
}, },
"ceidg.php": { "ceidg.php": {
"type": "-", "type": "-",
@@ -138,8 +263,8 @@
".claude": { ".claude": {
"settings.local.json": { "settings.local.json": {
"type": "-", "type": "-",
"size": 265, "size": 287,
"lmtime": 1770734134148, "lmtime": 1771099575728,
"modified": false "modified": false
} }
}, },
@@ -151,9 +276,9 @@
}, },
"config.php": { "config.php": {
"type": "-", "type": "-",
"size": 1230, "size": 1232,
"lmtime": 1770587027872, "lmtime": 1770937612536,
"modified": true "modified": false
}, },
"cron.php": { "cron.php": {
"type": "-", "type": "-",
@@ -178,8 +303,8 @@
"logs.txt": { "logs.txt": {
"type": "-", "type": "-",
"size": 3048, "size": 3048,
"lmtime": 1770733260000, "lmtime": 0,
"modified": true "modified": false
}, },
"REFACTORING_PLAN.md": { "REFACTORING_PLAN.md": {
"type": "-", "type": "-",
@@ -217,13 +342,13 @@
"task_edit.php": { "task_edit.php": {
"type": "-", "type": "-",
"size": 10285, "size": 10285,
"lmtime": 1770733553999, "lmtime": 1770937612539,
"modified": false "modified": false
}, },
"task_popup.php": { "task_popup.php": {
"type": "-", "type": "-",
"size": 12356, "size": 16702,
"lmtime": 1770711646996, "lmtime": 1770937612540,
"modified": false "modified": false
}, },
"task_single.php": { "task_single.php": {
@@ -234,8 +359,8 @@
}, },
"work-time.php": { "work-time.php": {
"type": "-", "type": "-",
"size": 12396, "size": 12763,
"lmtime": 0, "lmtime": 1771098956366,
"modified": false "modified": false
} }
}, },
@@ -283,7 +408,7 @@
"textarea.php": { "textarea.php": {
"type": "-", "type": "-",
"size": 1383, "size": 1383,
"lmtime": 1770733546656, "lmtime": 1770937612537,
"modified": false "modified": false
} }
}, },
@@ -291,7 +416,47 @@
"task-edit.php": { "task-edit.php": {
"type": "-", "type": "-",
"size": 7739, "size": 7739,
"lmtime": 1770733570166, "lmtime": 1770937612538,
"modified": false
}
},
"crm": {
"client-edit.php": {
"type": "-",
"size": 1998,
"lmtime": 1771099489547,
"modified": false
},
"main-view.php": {
"type": "-",
"size": 2103,
"lmtime": 1771099477641,
"modified": false
}
},
"finances": {
"category-edit.php": {
"type": "-",
"size": 1965,
"lmtime": 0,
"modified": false
},
"main-view.php": {
"type": "-",
"size": 13340,
"lmtime": 1771100368424,
"modified": false
},
"operation-edit.php": {
"type": "-",
"size": 4351,
"lmtime": 1771100291581,
"modified": false
},
"operations-list.php": {
"type": "-",
"size": 4312,
"lmtime": 0,
"modified": false "modified": false
} }
} }

View File

@@ -127,7 +127,7 @@ if ( \S::get( 'action' ) == 'add_finance_operation' )
$data = [ $data = [
'date' => \S::get( 'operation_date' ), 'date' => \S::get( 'operation_date' ),
'amount' => str_replace( ',', '.', \S::get( 'net_value' ) ), 'amount' => str_replace( ',', '.', \S::get( 'net_value' ) ),
'description' => \S::get( 'product_name' ) . ( $recipient_name ? ' - ' . $recipient_name : '' ), 'description' => \S::get( 'product_name' ),
'category_id' => \S::get( 'category_id' ), 'category_id' => \S::get( 'category_id' ),
'client_id' => $client_id, 'client_id' => $client_id,
]; ];