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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user