noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 42/46: Typo , debug information, jQuery avail


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 42/46: Typo , debug information, jQuery available
Date: Tue, 13 Jul 2021 05:02:03 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit d06f7a89d535321c36f5700f63c5ff6b30fcc79d
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Thu Jul 8 17:23:22 2021 +0200

    Typo , debug information, jQuery available
---
 include/class/acc_ledger_purchase.class.php |  6 +++---
 include/class/acc_ledger_sold.class.php     | 18 ++++++++++--------
 include/lib/function_javascript.php         |  4 ++++
 include/sql/patch/upgrade162.sql            |  8 +++++---
 4 files changed, 22 insertions(+), 14 deletions(-)

diff --git a/include/class/acc_ledger_purchase.class.php 
b/include/class/acc_ledger_purchase.class.php
index feca535..8859699 100644
--- a/include/class/acc_ledger_purchase.class.php
+++ b/include/class/acc_ledger_purchase.class.php
@@ -756,12 +756,12 @@ class  Acc_Ledger_Purchase extends Acc_Ledger
                 $operation_currency->insert();
                 
$tot_amount_cur=round(bcadd($tot_amount_cur,$acc_amount->amount_currency),2);
                 
$tot_amount_cur=round(bcadd($tot_amount_cur,$acc_amount->amount_vat_currency),2);
-                if ( DEBUGNOALYSS > 0 ) {
+                if ( DEBUGNOALYSS > 1 ) {
                     echo __LINE__." insert into operation currency 
oc_amount:{$acc_amount->amount_currency} oc_vat_amount 
{$acc_amount->amount_vat_currency} <br>";
                 }
             }       // end loop : save all items
             /*  save total customer */
-            if ( DEBUGNOALYSS > 0 ) { 
+            if ( DEBUGNOALYSS > 1 ) { 
                 echo __LINE__." tot_amount $tot_amount<br>"; 
                 echo __LINE__." tot_tva $tot_tva<br>"; 
             
@@ -844,7 +844,7 @@ class  Acc_Ledger_Purchase extends Acc_Ledger
             // Total DEB
             $acc_operation->amount=$this->db->get_value("select sum(j_montant) 
from jrnx where j_grpt = $1 and j_debit='t'",
                     array($seq));
-            if ( DEBUGNOALYSS > 0 ) { 
+            if ( DEBUGNOALYSS > 1 ) { 
                 echo __LINE__." amount ".$acc_operation->amount."<br>"; 
             
             }
diff --git a/include/class/acc_ledger_sold.class.php 
b/include/class/acc_ledger_sold.class.php
index 34c4d82..4c93c0d 100644
--- a/include/class/acc_ledger_sold.class.php
+++ b/include/class/acc_ledger_sold.class.php
@@ -299,7 +299,7 @@ class Acc_Ledger_Sold extends Acc_Ledger {
                 
                 $tot_amount = bcadd($tot_amount, $amount);
                 $tot_amount = round($tot_amount, 2);
-                if ( DEBUGNOALYSS > 0 ) { echo __LINE__." tot_amount 
$tot_amount<br>";}
+                if ( DEBUGNOALYSS > 1 ) { echo __LINE__." tot_amount 
$tot_amount<br>";}
                 $acc_operation = new Acc_Operation($this->db);
                 $acc_operation->date = $e_date;
                 $sposte = $fiche->strAttribut(ATTR_DEF_ACCOUNT);
@@ -448,7 +448,7 @@ class Acc_Ledger_Sold extends Acc_Ledger {
             /*  save total customer */
             $cust_amount = bcadd($tot_amount, $tot_tva);
             $cust_amount = round($cust_amount,2);
-            if ( DEBUGNOALYSS > 0 ) { 
+            if ( DEBUGNOALYSS > 1 ) { 
                 echo __LINE__." cust_amount $cust_amount<br>"; 
                 echo __LINE__." tot_amount $tot_amount<br>"; 
                 echo __LINE__." tot_tva $tot_tva<br>"; 
@@ -485,7 +485,7 @@ class Acc_Ledger_Sold extends Acc_Ledger {
              * if if ($g_parameter->MY_TVA_USE == 'Y' )
              */
             if ($g_parameter->MY_TVA_USE == 'Y') {
-                if ( DEBUGNOALYSS > 0 ) {
+                if ( DEBUGNOALYSS > 1 ) {
                     var_dump($tva);
                 }
                 foreach ($tva as $i => $value) {
@@ -510,7 +510,7 @@ class Acc_Ledger_Sold extends Acc_Ledger {
                         $tot_debit=round($tot_debit, 2);
                     }
                     $acc_operation->insert_jrnx();
-                    if ( DEBUGNOALYSS > 0 ) { 
+                    if ( DEBUGNOALYSS > 1 ) { 
                                     echo __LINE__." tot_tva $tot_tva<br>"; 
 
                     }
@@ -539,7 +539,7 @@ class Acc_Ledger_Sold extends Acc_Ledger {
              */
             
             /* insert into jrn */
-            if ( DEBUGNOALYSS > 0 ) { echo __LINE__." tot_debit 
".round($tot_debit,2)."<br>"; }
+            if ( DEBUGNOALYSS > 1 ) { echo __LINE__." tot_debit 
".round($tot_debit,2)."<br>"; }
             $acc_operation = new Acc_Operation($this->db);
             $acc_operation->date = $e_date;
             $acc_operation->echeance = $e_ech;
@@ -566,11 +566,13 @@ class Acc_Ledger_Sold extends Acc_Ledger {
                 $this->inc_seq_pj();
             }
 
-            $this->db->exec_sql("update jrn set jr_internal='" . $internal . 
"' where " .
-                    " jr_grpt_id = " . $seq);
+            $this->db->exec_sql("update jrn set jr_internal=$1  where 
jr_grpt_id =  $2" ,[$internal,$seq]);
+            
 
             /* update quant_sold */
-            $this->db->exec_sql('update quant_sold set qs_internal = $1 where 
j_id in (select j_id from jrnx where j_grpt=$2)', array($internal, $seq));
+            $this->db->exec_sql('update quant_sold set qs_internal = $1 
+                    where j_id in (select j_id from jrnx where j_grpt=$2)'
+                    , array($internal, $seq));
 
             /* Save the attachment or generate doc */
             if (isset($_FILES['pj'])) {
diff --git a/include/lib/function_javascript.php 
b/include/lib/function_javascript.php
index 70500db..fbc6e53 100644
--- a/include/lib/function_javascript.php
+++ b/include/lib/function_javascript.php
@@ -2758,6 +2758,10 @@ function load_all_script()
     
     include_once NOALYSS_INCLUDE."/lib/message_javascript.php";
     echo JS_INFOBULLE;
+    echo js_include("jquery-3.6.0.min.js");
+    echo <<<EOF
+    <script>jQuery.noConflict();</script>
+EOF;    
     echo js_include('smoke.js');
     echo js_include('prototype.js');
     echo js_include('scriptaculous.js');
diff --git a/include/sql/patch/upgrade162.sql b/include/sql/patch/upgrade162.sql
index d90d220..19b205f 100644
--- a/include/sql/patch/upgrade162.sql
+++ b/include/sql/patch/upgrade162.sql
@@ -1,7 +1,9 @@
 begin;
-update menu_ref set me_menu='Profil' , me_description_etendue='Configuration 
des profils des utilisateurs, permet de fixer les journaux, profils dans les 
documents et stock que  ce profil peut utiliser. Cela limite les utilisateurs 
puisque ceux-ci ont un profil',
-me_description='Configuration profil' where me_code='CFGPRO';
+update menu_ref set me_menu='Profil' , me_description_etendue='Configuration 
des profils des utilisateurs, permet de fixer les journaux, profils dans les 
documents et stock que  ce profil peut utiliser. Cela limite les utilisateurs 
puisque ceux-ci ont un profil', me_description='Configuration profil' where 
me_code='CFGPRO';
 
 
+update menu_ref set me_menu='Financier' , me_description_etendue='journaux 
financier, trésorerie, caisse', me_description='saisies de relevés bancaires, 
d''extraits de compte ' where me_code='MENUFIN';
+
+COMMENT ON TABLE public.jrn_rapt IS 'links between operations';
 insert into version (val,v_description) values (163,'typo in menu');
-commit ;
\ No newline at end of file
+commit ;



reply via email to

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