From eb64bf1c8c31545108cd902f41ace575314ae07b Mon Sep 17 00:00:00 2001 From: sparkyx Date: Sun, 25 Apr 2021 13:49:45 +0200 Subject: [PATCH] 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 939c7afec..c46d972fa 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 1d8569cd4..5eefff80f 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=<< + $r=HtmlInput::filter_table("pcur01_tb", '0,1,2,3,4,5,6,7,8,9,10', 1); + $r.=<< {$date} {$accounting} @@ -136,10 +137,10 @@ class Print_Operation_Currency {$comment} {$internal} {$currency} - {$amount} - {$rate} - {$rate_ref} - {$amount_currency} + {$amount} + {$rate} + {$rate_ref} + {$amount_currency} EOF; diff --git a/include/print_currency01.inc.php b/include/print_currency01.inc.php index 734f516f4..3bc703ab7 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();