[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 38/218: Task #448 : currency improve detail o
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 38/218: Task #448 : currency improve detail of operation |
Date: |
Thu, 12 Sep 2019 15:58:36 -0400 (EDT) |
sparkyx pushed a commit to branch entreprise
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] 10/218: Currency : add SQL constraint + doc, (continued)
- [Noalyss-commit] [noalyss] 10/218: Currency : add SQL constraint + doc, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 05/218: html_page_start : protect query, improve code, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 08/218: Currency = add a mode currency, possible to work without, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 04/218: Currency : add test file + database file + mtable, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 21/218: Task #448 : issue with reconciliation amount, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 22/218: Task #448 : identical operation with currency, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 24/218: Task #448 : rounded value for VEN, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 27/218: Task #448 : delete unused currency, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 28/218: Task #448 : currency , EUR cannot be changed and not display, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 31/218: task #448 : currency always used and remove parameter 'use_currency' from parameters, add SQL script, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 38/218: Task #448 : currency improve detail of operation,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 09/218: Currency : add security for setting, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 13/218: indent, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 17/218: Currency : fix rounded bugs in detail operation, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 18/218: task #448 : Currency : display currency info into operation detail, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 20/218: Task #448 : check currency rate > 0 and payment in eur, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 23/218: Display the balance difference, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 25/218: Task #448 : payment method VEN, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 30/218: remove debug info, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 32/218: Task #448 : SQL integrated into upgrade128, Dany De Bontridder, 2019/09/12
- [Noalyss-commit] [noalyss] 35/218: Task #448 : correct bug when saving into quant_purchase, Dany De Bontridder, 2019/09/12