phpcompta-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpcompta-dev] r5156 - in phpcompta/tags/rel650: html/js include sql


From: phpcompta-dev
Subject: [Phpcompta-dev] r5156 - in phpcompta/tags/rel650: html/js include sql
Date: Thu, 29 Nov 2012 23:17:33 +0100 (CET)

Author: danydb
Date: 2012-11-29 23:17:33 +0100 (Thu, 29 Nov 2012)
New Revision: 5156

Modified:
   phpcompta/tags/rel650/html/js/infobulle.js
   phpcompta/tags/rel650/include/class_acc_compute.php
   phpcompta/tags/rel650/include/class_fiche.php
   phpcompta/tags/rel650/sql/upgrade.sql
Log:
#738: Attribut en pourcent doit ?\195?\170tre compris entre 0 et 100 au lieu de 
0 et 1

Modified: phpcompta/tags/rel650/html/js/infobulle.js
===================================================================
--- phpcompta/tags/rel650/html/js/infobulle.js  2012-11-22 20:50:27 UTC (rev 
5155)
+++ phpcompta/tags/rel650/html/js/infobulle.js  2012-11-29 22:17:33 UTC (rev 
5156)
@@ -45,9 +45,10 @@
 content[15]="Laissez à 0 pour ne rien changer";
 content[16]="Vous devez donner la date par opération";
 content[17]="Cliquez sur le titre d'une colonne pour trier";
-content[18]="Donner une partie du nom, prénom, de la description, du poste 
comptable, du n° de TVA ou quick code";
-content[19]="Donner une partie du nom, de la description,  du n° de TVA ou 
quick code";
+content[18]="Donnez une partie du nom, prénom, de la description, du poste 
comptable, du n° de TVA ou quick code";
+content[19]="Donnez une partie du nom, de la description,  du n° de TVA ou 
quick code";
 content[20]="Les menus ne peuvent dépendre que dans d'un menu principal ou 
d'un menu, si cette liste est vide, ajouter des modules ou menu principal sans 
donner de dépendance";
+content[21]="Donnez un nombre entre 0 & 100";
 function showBulle(p_ctl)
 {
     d=document.getElementById('bulle');

Modified: phpcompta/tags/rel650/include/class_acc_compute.php
===================================================================
--- phpcompta/tags/rel650/include/class_acc_compute.php 2012-11-22 20:50:27 UTC 
(rev 5155)
+++ phpcompta/tags/rel650/include/class_acc_compute.php 2012-11-29 22:17:33 UTC 
(rev 5156)
@@ -49,7 +49,7 @@
                  'nd_vat_rate'=>'nd_vat_rate',
                  'amount_perso'=>'amount_perso',
                  'amount_perso_rate'=>'amount_perso_rate'                      
          );
- 
+
  */
 
 
@@ -126,9 +126,11 @@
         if ( $this->check && $this->order > 2 )  throw new Exception ('ORDER 
NOT RESPECTED');
 
         $this->amount_nd=bcmul($this->amount,$this->amount_nd_rate);
+        $this->amount_nd=bcdiv($this->amount_nd,100);
         $this->amount_nd=round($this->amount_nd,2);
         // the nd part for the vat
         $nd_vat=bcmul($this->amount_vat,$this->amount_nd_rate);
+        $nd_vat=bcdiv($nd_vat,100);
         $nd_vat=round($nd_vat,2);
 
     }
@@ -139,6 +141,7 @@
 
         if ($this->amount_vat == 0 ) $this->compute_vat();
         $this->nd_vat=bcmul($this->amount_vat,$this->nd_vat_rate);
+        $this->nd_vat=bcdiv($this->nd_vat,100);
         $this->nd_vat=round($this->nd_vat,2);
     }
 
@@ -149,6 +152,7 @@
 
         if ($this->amount_vat == 0 ) $this->compute_vat();
         $this->nd_ded_vat=bcmul($this->amount_vat,$this->nd_ded_vat_rate);
+        $this->nd_ded_vat=bcdiv($this->nd_ded_vat,100);
         $this->nd_ded_vat=round($this->nd_ded_vat,2);
     }
 
@@ -158,6 +162,7 @@
         $this->order=2;
         if ( $this->amount == 0 ) return;
         $this->amount_perso=bcmul($this->amount,$this->amount_perso_rate);
+        $this->amount_perso=bcdiv($this->amount_perso,100);
         $this->amount_perso=round($this->amount_perso,2);
 
 

Modified: phpcompta/tags/rel650/include/class_fiche.php
===================================================================
--- phpcompta/tags/rel650/include/class_fiche.php       2012-11-22 20:50:27 UTC 
(rev 5155)
+++ phpcompta/tags/rel650/include/class_fiche.php       2012-11-29 22:17:33 UTC 
(rev 5156)
@@ -428,7 +428,7 @@
         foreach ($array as $attr)
         {
             $table=0;
-            $msg="";
+            $msg="";$bulle='';
             if ( $attr->ad_id == ATTR_DEF_ACCOUNT)
             {
                 $w=new IPoste("av_text".$attr->ad_id);
@@ -521,8 +521,11 @@
                        $w->table = $table;
                        $w->label = $attr->ad_text;
                        $w->name = "av_text" . $attr->ad_id;
-
-                       $r.="<TR>" . td($w->label, ' class="input_text" ') . 
td($w->input()." $msg")." </TR>";
+                       if ($attr->ad_id == 21 || 
$attr->ad_id==22||$attr->ad_id==20||$attr->ad_id==31)
+                       {
+                               $bulle=HtmlInput::infobulle(21);
+                       }
+                       $r.="<TR>" . td($w->label." $bulle", ' 
class="input_text" ') . td($w->input()." $msg")." </TR>";
                }
                $r.= '</table>';
         return $r;
@@ -690,7 +693,10 @@
                        $w->name = "av_text" . $r->ad_id;
                        $w->readOnly = $p_readonly;
 
-
+                       if ($r->ad_id == 21 || 
$r->ad_id==22||$r->ad_id==20||$r->ad_id==31)
+                       {
+                               $bulle=HtmlInput::infobulle(21);
+                       }
                        $ret.="<TR>" . td($r->ad_text . $bulle) . 
td($w->input()." ". $msg) . " </TR>";
                }
 

Modified: phpcompta/tags/rel650/sql/upgrade.sql
===================================================================
--- phpcompta/tags/rel650/sql/upgrade.sql       2012-11-22 20:50:27 UTC (rev 
5155)
+++ phpcompta/tags/rel650/sql/upgrade.sql       2012-11-29 22:17:33 UTC (rev 
5156)
@@ -0,0 +1,33 @@
+CREATE OR REPLACE FUNCTION comptaproc.format_account(p_account account_type)
+  RETURNS account_type AS
+$BODY$
+
+declare
+
+sResult account_type;
+
+begin
+sResult := lower(p_account);
+
+sResult := translate(sResult,E'éèêëàâäïîüûùöôç','eeeeaaaiiuuuooc');
+sResult := translate(sResult,E' $€µ£%.+-/\\!(){}(),;_&|"#''^<>*','');
+
+return upper(sResult);
+
+end;
+$BODY$
+  LANGUAGE plpgsql ;
+
+COMMENT ON FUNCTION comptaproc.format_account(account_type) IS 'format the 
accounting :
+- upper case
+- remove space and special char.
+';
+
+update tmp_pcmn  set pcm_val_parent  = '62' where pcm_val='6202';
+
+update fiche_detail set ad_value = to_number(ad_value,'9.99')*100 where ad_id 
in  (21,22,20,31) and ad_value is not null and ad_value <> '';
+
+update menu_ref set me_code='ACHISTO' WHERE me_code='ACHIMP';
+update menu_ref set me_code='VEHISTO' WHERE me_code='VENIMP';
+update menu_ref set me_code='FIHISTO' WHERE me_code='FIMP';
+update menu_ref set me_code='ODHISTO' WHERE me_code='ODSIMP';



---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu



reply via email to

[Prev in Thread] Current Thread [Next in Thread]