noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 15/73: Cosmetic and small bugs


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 15/73: Cosmetic and small bugs
Date: Fri, 28 May 2021 05:26:22 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit eb9654f40aa06a8946e85e11e212f45daaf89903
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sun Apr 11 09:11:03 2021 +0200

    Cosmetic and small bugs
---
 html/css/index.css                             |  4 +--
 html/css/style-classic7.css                    | 11 +++++++
 html/js/scripts.js                             |  2 +-
 include/ajax/ajax_template_cat_card.php        |  4 ++-
 include/class/acc_ledger.class.php             |  4 +--
 include/class/forecast_item_mtable.class.php   |  2 +-
 include/class/template_card_category.class.php | 41 ++++++++++++++++++++++++--
 include/operation_ods_confirm.inc.php          |  3 ++
 include/template/tax_summary_display.php       |  3 ++
 9 files changed, 64 insertions(+), 10 deletions(-)

diff --git a/html/css/index.css b/html/css/index.css
index c67076a..fbe1a9d 100644
--- a/html/css/index.css
+++ b/html/css/index.css
@@ -6,7 +6,7 @@
     position:absolute;
     top : 0px;
     left:0px;
-    width:40px;
+    width:60px;
      height:auto;
      margin-left:0px;
 }
@@ -15,7 +15,7 @@
     #logo_id {
      top : 10px;
     left:10px;
-       width: 60px;
+       width: 90px;
      margin-left:35px;
       
 
diff --git a/html/css/style-classic7.css b/html/css/style-classic7.css
index 5cdfa84..5c3760b 100644
--- a/html/css/style-classic7.css
+++ b/html/css/style-classic7.css
@@ -2859,3 +2859,14 @@ span.tagcell {
     padding: 2px;
     margin: 0px 1px 0px 1px;
 }
+
+.h3, h3 {
+       font-size: 1.4rem;
+}
+.content .h3, .content h3 {
+       font-size: 1.4rem;
+}
+
+#facturation_div_id {
+    margin-top:2rem;
+}
\ No newline at end of file
diff --git a/html/js/scripts.js b/html/js/scripts.js
index 781807c..5fd54e1 100644
--- a/html/js/scripts.js
+++ b/html/js/scripts.js
@@ -1119,7 +1119,7 @@ function show_calc()
     shtml += '<a class="icon" onclick="pin(\'calc1\')" 
id="pin_calc1">&#xf047;</a>     <a onclick="removeDiv(\'calc1\');" 
href="javascript:void(0)" title="" class="icon">&#10761;</a>';
     shtml += "</div>";
     shtml += '   <h2 class="title">' + content[66] + '</h2>';
-    shtml += '<form name="calc_line"  method="GET" onSubmit="cal();return 
false;" >' + content[68] + '<input class="input_text" type="text" size="30" 
id="inp" name="calculator"> <input type="button" value="Efface" class="button" 
onClick="Clean();return false;" > <input type="button" value="Efface 
historique" class="button" onClick="CleanHistory();return false;" > <input 
type="button" class="button" value="Fermer" onClick="removeDiv(\'calc1\')" >';
+    shtml += '<form name="calc_line"  method="GET" onSubmit="cal();return 
false;" >' + content[68] + '<input class="input_text" type="text" id="inp" 
name="calculator"> <input type="button" value="Efface" class="button" 
onClick="Clean();return false;" > <input type="button" value="Efface 
historique" class="button" onClick="CleanHistory();return false;" > <input 
type="button" class="button" value="Fermer" onClick="removeDiv(\'calc1\')" >';
     shtml += '</form><span class="highligth" style="display:block" 
id="sub_total">  ' + content[67] + '  </span><span style="display:block"  
id="listing"> </span>';
 
     var obj = {id: sid, html: shtml,
diff --git a/include/ajax/ajax_template_cat_card.php 
b/include/ajax/ajax_template_cat_card.php
index 155bd2d..b5bd8e4 100644
--- a/include/ajax/ajax_template_cat_card.php
+++ b/include/ajax/ajax_template_cat_card.php
@@ -59,8 +59,10 @@ switch ($action)
     case "save":
         header('Content-type: text/xml; charset=UTF-8');
         echo $cat->ajax_save()->saveXML();
-        if ( $p_id == -1 )
+        if ( $p_id == -1 && $cat->get_table()->getp("frd_id")!=-1)
+        {
             $cat->add_mandatory_attr();
+        }
         return;
         break;
     case "delete":
diff --git a/include/class/acc_ledger.class.php 
b/include/class/acc_ledger.class.php
index 185f2eb..6a2dee0 100644
--- a/include/class/acc_ledger.class.php
+++ b/include/class/acc_ledger.class.php
@@ -1094,13 +1094,13 @@ class Acc_Ledger  extends jrn_def_sql
         $currency_code=$http->extract($p_array,"p_currency_code","number");
         $currency=new Acc_Currency($this->db,$currency_code);
 
-        if ( $currency->get_code() == -1 )
+        if ( $p_currency_code == -1 )
         {
             throw new Exception(_('Devise inconnue'), 3);
         }
         
         /* -- check the accounting for error of exchange -*/
-        if ( $currency->get_code() == 0 )
+        if ($p_currency_code >  0 )
         {
             $poste=new 
Acc_Account($this->db,$g_parameter->MY_DEFAULT_ROUND_ERROR_DEB);
             if ($poste->get_parameter("id") == -1 )
diff --git a/include/class/forecast_item_mtable.class.php 
b/include/class/forecast_item_mtable.class.php
index 8915401..aaa3fbd 100644
--- a/include/class/forecast_item_mtable.class.php
+++ b/include/class/forecast_item_mtable.class.php
@@ -75,7 +75,7 @@ class Forecast_Item_MTable extends Manage_Table_SQL
     /**
      * @param int $forecast_id
      */
-    public function set_forecast_id(int $forecast_id): void
+    public function set_forecast_id(int $forecast_id)
     {
         $this->forecast_id = $forecast_id;
         $this->add_json_param("forecast_id", $forecast_id);
diff --git a/include/class/template_card_category.class.php 
b/include/class/template_card_category.class.php
index fc8be4d..0645d7d 100644
--- a/include/class/template_card_category.class.php
+++ b/include/class/template_card_category.class.php
@@ -104,8 +104,42 @@ class Template_Card_Category extends Manage_Table_SQL
         echo hi(_("par exemple ne pas changer Client par fournisseur"))."<br>";
         echo _("sinon le programme fonctionnera mal, ".
                 "utiliser uniquement des chiffres pour la classe de base ou 
rien")."</font>";
-        parent::input();
-
+        $error_name=$this->get_error("frd_text");
+        $error_account=$this->get_error("frd_class_base");
+        $error_name=($error_name=="")?"":HtmlInput::errorbulle($error_name);
+        
$error_account=($error_account=="")?"":HtmlInput::errorbulle($error_account);
+        
+        $frd_id=HtmlInput::hidden("frd_id",$this->get_table()->getp("frd_id"));
+        $name=new IText("frd_text",$this->get_table()->getp("frd_text"));
+        $account=new 
IPoste("frd_class_base",$this->get_table()->getp("frd_class_base"));
+        $account->set_attribute('gDossier',Dossier::id());
+        $account->set_attribute('jrn',0);
+        $account->set_attribute('account','frd_class_base');
+        $name_label=_("Nom");
+        $account_label=_("Poste comptable de base");
+       echo <<<EOF
+        <table>
+            <tbody>
+                <tr>
+                    <td> ID  </td>
+                        <td>{$frd_id}{$this->get_table()->getp("frd_id")}</td>
+                </tr>
+                <tr>
+                    <td> {$name_label}  {$error_name}</td>
+                    <td>
+                    {$name->input()}
+                    </td>
+                </tr>
+                <tr>
+                    <td> {$account_label} {$error_account}</td>
+                        <td>
+                            {$account->input()}
+                    </td>
+                </tr>
+            </tbody>
+        </table>
+EOF;
+       echo HtmlInput::get_to_hidden(["gDossier","op","p_id"]);
         /**
          * Add / Remove attribut Minimum
          */
@@ -161,6 +195,7 @@ class Template_Card_Category extends Manage_Table_SQL
                 echo Icon_Action::icon_add(uniqid(), $js_script);
             }
         }
+     
     }
 
     /**
@@ -170,7 +205,7 @@ class Template_Card_Category extends Manage_Table_SQL
     function add_mandatory_attr()
     {
         $cn=Dossier::connect();
-        $frd_id=$this->table->frd_id;
+        $frd_id=$this->get_table()->getp("frd_id");
         $cn->exec_sql("insert into attr_min (frd_id,ad_id) values ($1,$2)",
                 [$frd_id, ATTR_DEF_NAME]);
         $cn->exec_sql("insert into attr_min (frd_id,ad_id) values ($1,$2)",
diff --git a/include/operation_ods_confirm.inc.php 
b/include/operation_ods_confirm.inc.php
index af443ea..34f3ba1 100644
--- a/include/operation_ods_confirm.inc.php
+++ b/include/operation_ods_confirm.inc.php
@@ -53,6 +53,8 @@ echo $ledger->confirm($_POST,false);
     <li class="tabs" style="float: none"> <a href="javascript:void(0)" 
title="<?php echo _("Extourne")?>"  
onclick="unselect_other_tab(this.parentNode.parentNode);this.parentNode.className='tabs_selected';show_tabs(a_tab,'reverse_div_id')">
 <?php echo _('Extourne')?> </a></li>
     <li class="tabs" style="float: none"> <a href="javascript:void(0)" 
title="<?php echo _("Type opération")?>"  
onclick="unselect_other_tab(this.parentNode.parentNode);this.parentNode.className='tabs_selected';show_tabs(a_tab,'operationtype_div_id')">
 <?php echo _('Type opération')?> </a></li>
 </ul>
+</div>
+<div id="facturation_div_id">
     <div id="modele_div_id">
         <?php echo Pre_operation::save_propose(); ?>
     </div>
@@ -86,6 +88,7 @@ echo $ledger->confirm($_POST,false);
         ?>
     </div>
 </div>
+
 <?php
 echo HtmlInput::submit("save",_("Confirmer"));
 echo HtmlInput::submit("correct",_("Corriger"));
diff --git a/include/template/tax_summary_display.php 
b/include/template/tax_summary_display.php
index 84bb1b5..4f7bcdb 100644
--- a/include/template/tax_summary_display.php
+++ b/include/template/tax_summary_display.php
@@ -26,6 +26,7 @@
  * @see Tax_Summary
  *
  */?>
+<div class="content">
 <h2><?php echo _("Vente")?></h2>
 
 <?php
@@ -173,6 +174,7 @@ $array =    $this->get_summary_sale();
 
 
 ?>
+<hr>
 <h2><?php echo _("Achat")?></h2>
 <?php
 $array=$this->get_row_purchase();
@@ -373,3 +375,4 @@ $a_sum=$this->get_summary_purchase();
         echo '</tr>';
         ?>
 </table>
+</div>
\ No newline at end of file



reply via email to

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