From 28eabd96245d1669294bce3c67563fbbb95f5747 Mon Sep 17 00:00:00 2001 From: Vincent Danjean Date: Wed, 23 Jul 2014 23:47:24 +0200 Subject: [PATCH 1/6] Affiche la description des plans analytiques quand on en fait la liste --- include/anc_pa.inc.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/anc_pa.inc.php b/include/anc_pa.inc.php index f045a2910..71999a6b1 100644 --- a/include/anc_pa.inc.php +++ b/include/anc_pa.inc.php @@ -272,8 +272,10 @@ else ''. "Activités". ""; - - echo ''; + echo ''; + echo $line['description']; + echo ''; + echo "\n"; } echo ''; if ($obj->isAppend()==true ) From 12aeae979b76a5723a0124afbbea2452fe0a1230 Mon Sep 17 00:00:00 2001 From: Vincent Danjean Date: Wed, 23 Jul 2014 23:48:57 +0200 Subject: [PATCH 2/6] =?UTF-8?q?Fixe=20l'"over=20quoting"=20quand=20on=20cr?= =?UTF-8?q?=C3=A9e=20un=20poste=20analytique?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Quand on crée un poste analytique, le groupe était sur-quoté : - un groupe non vide était entourné des caractères "'" - un groupe vide était stocké avec le groupe "NULL" Il fallait ensuite modifier et resauver le poste analytique pour que le groupe soit correct (ie la méthode update était ok, pas la méthode add) --- include/class_anc_account.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/class_anc_account.php b/include/class_anc_account.php index 1acc35f71..fc9c0818a 100644 --- a/include/class_anc_account.php +++ b/include/class_anc_account.php @@ -101,9 +101,9 @@ class Anc_Account if ( strlen($this->name) == 0) return; if ( $this->ga_id == null || strlen(trim($this->ga_id)) == 0 ) - $ga_id="NULL"; + $ga_id=NULL; else - $ga_id="'".$this->ga_id."'"; + $ga_id=$this->ga_id; $sql="insert into poste_analytique ( po_name , pa_id, From 72cd601fb1adcb393e0d10a8a2f4058de942b2c3 Mon Sep 17 00:00:00 2001 From: Vincent Danjean Date: Thu, 24 Jul 2014 00:25:12 +0200 Subject: [PATCH 3/6] =?UTF-8?q?Fixe=20la=20pr=C3=A9cision=20des=20calculs?= =?UTF-8?q?=20dans=20le=20grand=20livre=20analytique?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit La précision n'était pas toujours fixée. En rechargeant la page du grand livre analytique, les totaux étaient parfois systématiquement entier, parfois avec deux décimales. Je n'ai pas compris/trouvé d'où venait le bcscale(2) quand ça marche. Maintenant, il est là en permanence. --- include/class_anc_grandlivre.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/class_anc_grandlivre.php b/include/class_anc_grandlivre.php index e37525d06..ba2e478b5 100644 --- a/include/class_anc_grandlivre.php +++ b/include/class_anc_grandlivre.php @@ -169,6 +169,7 @@ class Anc_GrandLivre extends Anc_Print $idx = 0; $tot_deb = $tot_cred = 0; + bcscale(2); foreach ($array as $row) { if ($prev != $row['po_name']) @@ -305,4 +306,4 @@ class Anc_GrandLivre extends Anc_Print $aheader[]=array("title"=>'Credit','type'=>'num'); Impress::array_to_csv($array, $aheader); } -} \ No newline at end of file +} From 9f43f5b3537e25daeef0799c8dd30eccd0aa001c Mon Sep 17 00:00:00 2001 From: Vincent Danjean Date: Thu, 24 Jul 2014 15:42:26 +0200 Subject: [PATCH 4/6] Fixe l'URL quand une MAJ est requise MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Quand l'URL n'a pas de sous composant (genre http://server/do.php...) alors dirname renvoie '/' qui générait l'URL //admin/setup.php => firefox (entre autres) considérait alors que la machine était admin... Maintenant, l'URL générée est /admin/setup.php que firefox interprète bien comme relatif à l'hôte courant. --- html/do.php | 4 +++- html/user_login.php | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/html/do.php b/html/do.php index b4a08330f..fda7e03e3 100644 --- a/html/do.php +++ b/html/do.php @@ -107,7 +107,9 @@ if (DBVERSION > dossier::get_version($cn)) { echo '

' . _("Votre base de données n'est pas à jour") . ' '; $a = _("cliquez ici pour appliquer le patch"); - $base = dirname($_SERVER['REQUEST_URI']) . '/admin/setup.php'; + $base = dirname($_SERVER['REQUEST_URI']); + if ($base == '/') { $base = ''; } + $base .= '/admin/setup.php'; echo '' . $a . '

'; } diff --git a/html/user_login.php b/html/user_login.php index 12dec1af3..56fe8c5f2 100644 --- a/html/user_login.php +++ b/html/user_login.php @@ -74,7 +74,9 @@ if ( $version < DBVERSIONREPO ) { echo '

'._("Votre base de données n'est pas à jour").' '; $a=_("cliquez ici pour appliquer le patch"); - $base=dirname($_SERVER['REQUEST_URI']).'/admin/setup.php'; + $base = dirname($_SERVER['REQUEST_URI']); + if ($base == '/') { $base = ''; } + $base .= '/admin/setup.php'; echo ''.$a.'

'; } From 017053336182eca6e5006083b517acacc17de434 Mon Sep 17 00:00:00 2001 From: Vincent Danjean Date: Thu, 24 Jul 2014 15:55:40 +0200 Subject: [PATCH 5/6] Correction mise en forme suite aux modif de la version 6.7.2.1 Il manquait les nouvelles colonnes dans les totaux du grand livre comptable analytique. --- include/class_anc_grandlivre.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/class_anc_grandlivre.php b/include/class_anc_grandlivre.php index ba2e478b5..449dcd0f9 100644 --- a/include/class_anc_grandlivre.php +++ b/include/class_anc_grandlivre.php @@ -179,6 +179,7 @@ class Anc_GrandLivre extends Anc_Print $r.=''; $tot_solde = bcsub($tot_cred, $tot_deb); $sign = ($tot_solde > 0) ? 'C' : 'D'; + $r.=td('') . td('') . td(''); $r.=td('') . td('') . td('') . td('') . td('') . td(nbm($tot_deb), ' class="num"') . td(nbm($tot_cred), ' class="num"') . td(nbm($tot_solde) . $sign, ' class="num"'); } $r.='' . '' . '

' . h($row['po_name'] . ' ' . $row['po_description']) . ''; @@ -245,6 +246,7 @@ class Anc_GrandLivre extends Anc_Print $r.=''; $tot_solde = bcsub($tot_cred, $tot_deb); $sign = ($tot_solde > 0) ? 'C' : 'D'; + $r.=td('') . td('') . td(''); $r.=td('') . td('') . td('') . td('') . td('') . td(nbm($tot_deb), ' class="num"') . td(nbm($tot_cred), ' class="num"') . td(nbm($tot_solde) . $sign, ' class="num"'); $r.= ''; From 14006ddc10f185e0ac10db61c345095c4f08a9e1 Mon Sep 17 00:00:00 2001 From: Vincent Danjean Date: Tue, 22 Jul 2014 14:17:23 +0200 Subject: [PATCH 6/6] =?UTF-8?q?Augmentation=20du=20nombre=20maximum=20de?= =?UTF-8?q?=20r=C3=A9partitions=20analytiques?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On passe de 5 à 15 dans un premier temps --- html/js/anc_script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/html/js/anc_script.js b/html/js/anc_script.js index ef5e3bb79..b7a3a94c0 100644 --- a/html/js/anc_script.js +++ b/html/js/anc_script.js @@ -37,9 +37,9 @@ function add_row(p_table,p_seq) var new_value=mytable.rows.length+1; - if ( mytable.rows.length > 5 ) + if ( mytable.rows.length > 15 ) { - alert("Maximum 5 lignes "); + alert("Maximum 15 lignes "); return; } amount=compute_total_table(p_table,p_seq);