Overview
Comment:Fix deux bugs reportés par garradin.eu
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | stable | 0.8.0
Files: files | file ages | folders
SHA1: a2f33e872585cb68ec761c195cccbd650b8c5bbc
User & Date: bohwaz on 2017-10-18 12:56:52
Other Links: manifest | tags
Context
2017-10-18
13:00
Fix: espaces au lieu de tab check-in: 84fc33ad79 user: bohwaz tags: trunk
12:56
Fix deux bugs reportés par garradin.eu check-in: a2f33e8725 user: bohwaz tags: trunk, stable, 0.8.0
11:42
Séparer process publication et release check-in: b1b55d429c user: bohwaz tags: trunk
Changes

Modified src/include/lib/Garradin/Compta/Exercices.php from [f4ee66c0c1] to [169c931f52].

227
228
229
230
231
232
233

234
235
236
237
238
239
240
241
        else if (!$comptes->isActive($resultat_debiteur))
        {
            throw new UserException('Impossible de solder l\'exercice : le compte de résultat débiteur ' . $resultat_debiteur . ' n\'existe pas ou est désactivé.');
        }

        unset($comptes);


        $resultat = $this->getCompteResultat($exercice);
        $resultat = $resultat['resultat'];

        if ($resultat != 0)
        {
            $journal = new Journal;
            $journal->add([
                'libelle'   =>  'Résultat de l\'exercice précédent',







>
|







227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
        else if (!$comptes->isActive($resultat_debiteur))
        {
            throw new UserException('Impossible de solder l\'exercice : le compte de résultat débiteur ' . $resultat_debiteur . ' n\'existe pas ou est désactivé.');
        }

        unset($comptes);

        $rapports = new Rapports;
        $resultat = $rapports->getCompteResultat($exercice);
        $resultat = $resultat['resultat'];

        if ($resultat != 0)
        {
            $journal = new Journal;
            $journal->add([
                'libelle'   =>  'Résultat de l\'exercice précédent',

Modified src/www/admin/membres/recherche.php from [f1f8cf4472] to [5fde7c59ec].

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58

// On détermine magiquement quel champ on recherche
if (!$champ)
{
    $auto = true;

    if (is_numeric(trim($recherche))) {
        $champ = 'id';
    }
    elseif (strpos($recherche, '@') !== false) {
        $champ = 'email';
    }
    else {
        $champ = $config->get('champ_identite');
    }
}
else
{
    if ($champ != 'id' && !$champs->get($champ))
    {
        throw new UserException('Le champ demandé n\'existe pas.');
    }
}

if ($recherche != '')
{
    $result = $membres->search($champ, $recherche);

    if (count($result) == 1 && $auto)
    {
        Utils::redirect('/admin/membres/fiche.php?id=' . (int)$result[0]->id);
    }
}

$champs_liste = $champs->getList();

$champs_liste->id = (object) ['title' => 'Numéro unique', 'type' => 'number'];

$champs_entete = $champs->getListedFields();

if (!isset($champs_entete->$champ))
{
    $champs_entete = array_merge(
        [$champ => $champs_liste->$champ],
        (array)$champs_entete







|










|
















<
<
<







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48



49
50
51
52
53
54
55

// On détermine magiquement quel champ on recherche
if (!$champ)
{
    $auto = true;

    if (is_numeric(trim($recherche))) {
        $champ = 'numero';
    }
    elseif (strpos($recherche, '@') !== false) {
        $champ = 'email';
    }
    else {
        $champ = $config->get('champ_identite');
    }
}
else
{
    if ($champ != 'numero' && !$champs->get($champ))
    {
        throw new UserException('Le champ demandé n\'existe pas.');
    }
}

if ($recherche != '')
{
    $result = $membres->search($champ, $recherche);

    if (count($result) == 1 && $auto)
    {
        Utils::redirect('/admin/membres/fiche.php?id=' . (int)$result[0]->id);
    }
}

$champs_liste = $champs->getList();



$champs_entete = $champs->getListedFields();

if (!isset($champs_entete->$champ))
{
    $champs_entete = array_merge(
        [$champ => $champs_liste->$champ],
        (array)$champs_entete