$id_operation = $journal->add([
'libelle' => $data['libelle'],
- 'montant' => $data['montant'],
'date' => $data['date'],
+ 'fluxs' =>
+ [ ['compte'=>$credit, 'montant' => - $data['montant'] ]
+ , ['compte'=>$debit, 'montant' => $data['montant'] ] ],
'moyen_paiement'=> $data['moyen_paiement'],
'numero_cheque' => isset($data['numero_cheque']) ? $data['numero_cheque'] : null,
- 'compte_debit' => $debit,
- 'compte_credit' => $credit,
'id_categorie' => (int)$data['id_categorie'],
'id_auteur' => (int)$data['id_auteur'],
]);
return $db->simpleQuerySingle('SELECT COUNT(DISTINCT id_cotisation) FROM cotisations_membres
WHERE id_membre = ?;', false, (int)$id);
}
-}
\ No newline at end of file
+}