Fix: Guardar concepto en finanzas y acción save_all_concept_payments

- Improved error handling in CollectionConcept::update
- Added save_all_concept_payments action for concept_view page
- Added logs directory to Dockerfile
This commit is contained in:
2026-02-21 22:49:20 -06:00
parent 9850f1a85e
commit ada8a7548c
3 changed files with 87 additions and 22 deletions

View File

@@ -46,21 +46,27 @@ class CollectionConcept {
public static function update($id, $data) {
$db = Database::getInstance();
return $db->execute(
"UPDATE finance_collection_concepts
SET name = ?, description = ?, total_amount = ?, amount_per_house = ?, concept_date = ?, due_date = ?, category = ?
WHERE id = ?",
[
$data['name'],
$data['description'] ?? null,
$data['total_amount'] ?? null,
$data['amount_per_house'],
$data['concept_date'],
$data['due_date'] ?? null,
$data['category'] ?? null,
$id
]
);
try {
$result = $db->execute(
"UPDATE finance_collection_concepts
SET name = ?, description = ?, total_amount = ?, amount_per_house = ?, concept_date = ?, due_date = ?, category = ?
WHERE id = ?",
[
$data['name'],
$data['description'] ?? null,
$data['total_amount'] ?? null,
$data['amount_per_house'],
$data['concept_date'],
$data['due_date'] ?? null,
$data['category'] ?? null,
$id
]
);
return $result;
} catch (Exception $e) {
error_log("Error updating CollectionConcept ID $id: " . $e->getMessage());
throw $e;
}
}
public static function save($data, $userId) {