noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 38/73: Task #1961 : Currency remove default c


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 38/73: Task #1961 : Currency remove default currency
Date: Fri, 28 May 2021 05:26:33 -0400 (EDT)

sparkyx pushed a commit to branch master
in repository noalyss.

commit eb64bf1c8c31545108cd902f41ace575314ae07b
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sun Apr 25 13:49:45 2021 +0200

    Task #1961 : Currency remove default currency
---
 include/class/data_currency_operation.class.php  |  4 ++--
 include/class/print_operation_currency.class.php | 13 +++++++------
 include/print_currency01.inc.php                 |  4 ++--
 3 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/include/class/data_currency_operation.class.php 
b/include/class/data_currency_operation.class.php
index 939c7af..c46d972 100644
--- a/include/class/data_currency_operation.class.php
+++ b/include/class/data_currency_operation.class.php
@@ -112,7 +112,7 @@ class Data_Currency_Operation
         $sql=" select jr_id,
             j_date,
             j_montant,
-            coalesce(oc_amount,j_montant) oc_amount,
+            coalesce(oc_amount,0) oc_amount,
             j_poste,
             jr_comment,
             jr_internal,
@@ -125,7 +125,7 @@ class Data_Currency_Operation
             (select ad_value from fiche_detail fd1 where fd1.f_id=jrnx.f_id 
and ad_id=23) as fiche_qcode
         from jrnx
             join jrn on (jr_grpt_id=jrnx.j_grpt)
-            left join operation_currency oc using (j_id)
+            join operation_currency oc using (j_id)
             join jrn_def on (jr_def_id=jrn_def.jrn_def_id) 
             ";
         $sql.=$this->SQL_Condition();
diff --git a/include/class/print_operation_currency.class.php 
b/include/class/print_operation_currency.class.php
index 1d8569c..5eefff8 100644
--- a/include/class/print_operation_currency.class.php
+++ b/include/class/print_operation_currency.class.php
@@ -126,8 +126,9 @@ class Print_Operation_Currency
         $rate_ref=_("Taux de référence");
         $rate=_("Taux utilisé");
         $currency=_("Devise");
-        $r=<<<EOF
-<table class="result">
+        $r=HtmlInput::filter_table("pcur01_tb", '0,1,2,3,4,5,6,7,8,9,10', 1);
+        $r.=<<<EOF
+<table id="pcur01_tb" class="result">
 <tr>
                 <th>{$date}</th>
                 <th>{$accounting}</th>
@@ -136,10 +137,10 @@ class Print_Operation_Currency
                 <th>{$comment}</th>
                 <th>{$internal}</th>
                 <th>{$currency}</th>
-                <th>{$amount}</th>
-                <th>{$rate}</th>
-                <th>{$rate_ref}</th>
-                <th>{$amount_currency}</th>
+                <th class="num">{$amount}</th>
+                <th class="num">{$rate}</th>
+                <th class="num">{$rate_ref}</th>
+                <th class="num">{$amount_currency}</th>
 </tr>    
 
 EOF;
diff --git a/include/print_currency01.inc.php b/include/print_currency01.inc.php
index 734f516..3bc703a 100644
--- a/include/print_currency01.inc.php
+++ b/include/print_currency01.inc.php
@@ -53,8 +53,8 @@ $to_account->set_attribute('gDossier',Dossier::id());
 $to_account->set_attribute('jrn',0);
 $to_account->set_attribute('account','to_account');
 
-$acc_currency=new Acc_Currency($cn);
-$selCurrency=$acc_currency->select_currency();
+$selCurrency=new ISelect("p_currency_code");
+$selCurrency->value=$cn->make_array("select id,cr_code_iso from currency where 
id >  0 order by cr_code_iso");
 
$selCurrency->selected=$print_operation_currency->getData_operation()->getCurrency_id();
 
 



reply via email to

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