[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 07/10: Task #448 : currency improve detail of
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 07/10: Task #448 : currency improve detail of operation |
Date: |
Sat, 21 Jul 2018 07:47:17 -0400 (EDT) |
sparkyx pushed a commit to annotated tag r700-currency-002
in repository noalyss.
commit e2b25ac32d07b0907dc8e292b12c6bf16aeecab3
Author: Dany De Bontridder <address@hidden>
Date: 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] annotated tag r700-currency-002 created (now 9025a3b), Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 03/10: Task #448 : Currency : purchase, fix bug for autoreverse VAT, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 02/10: Task #448 : correct bug if VAT Rate = 0 , amount was reset, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 08/10: integrate fix for bug in insert_quant_purchase which cannot save private fee, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 07/10: Task #448 : currency improve detail of operation,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 04/10: Task #448 : correct bug when saving into quant_purchase, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 05/10: Bug in QUANT_PURCHASE , dp_dep_priv is not saved, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 01/10: Task #448 : SQL integrated into upgrade128, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 09/10: Fix bug quant_purchase , private fee not saved, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 06/10: comment, Dany De Bontridder, 2018/07/21
- [Noalyss-commit] [noalyss] 10/10: Fix bug quant_purchase , private fee not saved, Dany De Bontridder, 2018/07/21