[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 38/162: Task #448 : currency improve detail o
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 38/162: Task #448 : currency improve detail of operation |
Date: |
Sat, 11 Jul 2020 13:23:29 -0400 (EDT) |
sparkyx pushed a commit to annotated tag E-4
in repository noalyss.
commit e2b25ac32d07b0907dc8e292b12c6bf16aeecab3
Author: Dany De Bontridder <danydb@noalyss.eu>
AuthorDate: Sat May 12 13:53:16 2018 +0200
Task #448 : currency improve detail of operation
---
include/template/ledger_detail_ach.php | 27 ++++++++++++++++++++++-----
include/template/ledger_detail_ven.php | 27 +++++++++++++++++++++++++--
2 files changed, 47 insertions(+), 7 deletions(-)
diff --git a/include/template/ledger_detail_ach.php
b/include/template/ledger_detail_ach.php
index 9878335..ac239d8 100644
--- a/include/template/ledger_detail_ach.php
+++ b/include/template/ledger_detail_ach.php
@@ -7,6 +7,7 @@ $str_anc="";
<?php
require_once NOALYSS_INCLUDE.'/class/noalyss_parameter_folder.class.php';
$owner = new Noalyss_Parameter_Folder($cn);
+ var_dump($obj);
?>
<?php if ($access == 'W') : ?>
@@ -135,7 +136,11 @@ $str_anc="";
echo th(_('TVAC'), 'style="text-align:right"');
} else
echo th(_('Total'), 'style="text-align:right"');
-
+ if ( $obj->det->currency_id != 0 ) {
+ $currency=$obj->db->get_value("select cr_code_iso from
currency where id=$1",
+ [$obj->det->currency_id]);
+ echo th($currency, 'style="text-align:right"');
+ }
if ($owner->MY_ANALYTIC != 'nu' )
{
$anc = new Anc_Plan($cn);
@@ -239,12 +244,17 @@ $str_anc="";
$str_anc.=td($poste);
$str_anc.=td(nbm($htva)." {$side}");
$str_anc.=$anc_op->display_table(1, $htva, $div);
- } else
- {
- $row.=td('');
- }
+ }
}
$class=($e%2==0)?' class="even"':'class="odd"';
+ /*
+ * Display Currency in a column, if invoice not recorded
in EUR
+ */
+ if ( $obj->det->currency_id != 0 ) {
+ $value=$obj->db->get_value("select
oc_amount+oc_vat_amount from operation_currency where j_id=$1",[$q['j_id']]);
+ $row.=td(nbm($value,4),' class="num"');
+
+ }
echo tr($row,$class);
}
if ($owner->MY_TVA_USE == 'Y')
@@ -254,6 +264,13 @@ $str_anc="";
$row.=td(nbm($total_htva), 'class="num"
style="font-style:italic;font-weight: bolder;"');
if ($owner->MY_TVA_USE == 'Y')
$row.=td("") . td("").td(nbm($total_tvac), 'class="num"
style="font-style:italic;font-weight: bolder;"');
+
+ //Display total in currency
+ if ( $obj->det->currency_id != "" && $obj->det->currency_id >
0)
+ {
+ $currency=new Acc_Currency($obj->db,
$obj->det->currency_id);
+ $row.= td(nbm($currency->sum_amount($obj->jr_id),4),'
class="num" style="font-style:italic;font-weight: bolder;"');
+ }
echo tr($row);
?>
diff --git a/include/template/ledger_detail_ven.php
b/include/template/ledger_detail_ven.php
index 6080f57..6ff9719 100644
--- a/include/template/ledger_detail_ven.php
+++ b/include/template/ledger_detail_ven.php
@@ -137,7 +137,14 @@ echo $ipaid->input();
echo th(_('TVAC'), 'style="text-align:right"');
} else
echo th(_('Total'), 'style="text-align:right"');
-
+ /*
+ * If not in EUR
+ */
+ if ( $obj->det->currency_id != 0 ) {
+ $currency=$obj->db->get_value("select cr_code_iso from
currency where id=$1",
+ [$obj->det->currency_id]);
+ echo th($currency, 'style="text-align:right"');
+ }
if ($owner->MY_ANALYTIC != 'nu' /*&& $div == 'popup'*/)
{
$anc = new Anc_Plan($cn);
@@ -244,7 +251,15 @@ echo $ipaid->input();
}
}
$class=($e%2==0)?' class="even"':'class="odd"';
- echo tr($row,$class);
+ /*
+ * Display Currency in a column, if invoice not recorded
in EUR
+ */
+ if ( $obj->det->currency_id != 0 ) {
+ $value=$obj->db->get_value("select
oc_amount+oc_vat_amount from operation_currency where j_id=$1",[$q['j_id']]);
+ $row.=td(nbm($value,4),' class="num"');
+
+ }
+ echo tr($row,$class);
}
if ($owner->MY_TVA_USE == 'Y')
$row = td(_('Total'), '
style="font-style:italic;text-align:right;font-weight: bolder;" colspan="5"');
@@ -253,6 +268,14 @@ echo $ipaid->input();
$row.=td(nbm($total_htva), 'class="num"
style="font-style:italic;font-weight: bolder;"');
if ($owner->MY_TVA_USE == 'Y')
$row.=td("") . td(nbm($total_tvac), 'class="num"
style="font-style:italic;font-weight: bolder;"');
+
+
+ //Display total in currency
+ if ( $obj->det->currency_id != "" && $obj->det->currency_id >
0)
+ {
+ $currency=new Acc_Currency($obj->db,
$obj->det->currency_id);
+ $row.= td(nbm($currency->sum_amount($obj->jr_id),4),'
class="num" style="font-style:italic;font-weight: bolder;"');
+ }
echo tr($row);
?>
</table>
- [Noalyss-commit] [noalyss] 48/162: Protect function nb , return the string if the parameter is not a float, (continued)
- [Noalyss-commit] [noalyss] 48/162: Protect function nb , return the string if the parameter is not a float, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 34/162: Task #448 : Currency : purchase, fix bug for autoreverse VAT, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 37/162: comment, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 46/162: Task #448 : add currency to card -> history + export CSV, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 50/162: Create invoice : New version of libreoffice use the numeric in another way, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 55/162: Security : direct injection, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 52/162: Bug 1600 : alphanumeric accounting must be case insensitive, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 56/162: Fix : security fixes see rapport exakat (Damien Seguy), Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 57/162: Security fix : f_id is a number, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 62/162: Merge master, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 38/162: Task #448 : currency improve detail of operation,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 40/162: Fix bug quant_purchase , private fee not saved, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 44/162: Task #448 : add info about currency into History of cards and accounting, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 47/162: Update documentation, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 54/162: Fix todo_list : if list empty , gets an error in php 7.2, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 49/162: New version of libreoffice use the numeric in another way, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 51/162: Missing class : missing class for acc_ledger, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 53/162: integrate fix for bug in insert_quant_purchase which cannot save private fee Conflicts: include/sql/patch/upgrade128.sql, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 58/162: Security fix : f_id is a number, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 60/162: translation, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 61/162: CFGLED : security fix : remove $_REQUEST, Dany De Bontridder, 2020/07/11