122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
$db->exec('PRAGMA foreign_keys = OFF; BEGIN;');
// Mise à jour base de données
$db->exec(file_get_contents(ROOT . '/include/data/0.6.0.sql'));
$id_cat_cotisation = $db->querySingle('SELECT id FROM compta_categories WHERE compte = 756 LIMIT 1;');
// Conversion des cotisations de catégories en transactions
foreach ($list as $cat)
{
$db->simpleInsert('cotisations', [
'id_categorie_compta' => null,
'intitule' => $cat['nom'],
'montant' => (float) $cat['montant_cotisation'],
// Convertir un nombre de mois en nombre de jours
|
|
|
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
$db->exec('PRAGMA foreign_keys = OFF; BEGIN;');
// Mise à jour base de données
$db->exec(file_get_contents(ROOT . '/include/data/0.6.0.sql'));
$id_cat_cotisation = $db->querySingle('SELECT id FROM compta_categories WHERE compte = 756 LIMIT 1;');
// Conversion des cotisations de catégories en cotisations indépendantes
foreach ($list as $cat)
{
$db->simpleInsert('cotisations', [
'id_categorie_compta' => null,
'intitule' => $cat['nom'],
'montant' => (float) $cat['montant_cotisation'],
// Convertir un nombre de mois en nombre de jours
|