[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 44/173: Currency Show currency info for MISC
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 44/173: Currency Show currency info for MISC |
Date: |
Mon, 22 Mar 2021 12:58:36 -0400 (EDT) |
sparkyx pushed a commit to branch master
in repository noalyss.
commit 51550b445677d735bc5e7039b978441a0f73da7a
Author: Dany De Bontridder <danydb@noalyss.eu>
AuthorDate: Sat Jan 12 14:56:14 2019 +0100
Currency Show currency info for MISC
---
include/template/ledger_detail_misc.php | 26 +++++++++++++++++++++++++-
1 file changed, 25 insertions(+), 1 deletion(-)
diff --git a/include/template/ledger_detail_misc.php
b/include/template/ledger_detail_misc.php
index 27ce898..fa82e72 100644
--- a/include/template/ledger_detail_misc.php
+++ b/include/template/ledger_detail_misc.php
@@ -112,7 +112,7 @@ echo th(_('Crédit'), 'style="text-align:right"');
$str_anc.= Anc_Plan::hidden($a_anc);
}
echo '</tr>';
-$amount_idx=0;
+$amount_idx=0; $sum_prod_currency=0;
for ($e=0;$e<count($obj->det->array);$e++) {
$row=''; $q=$obj->det->array;
$view_history = HtmlInput::history_account($q[$e]['j_poste'],
$q[$e]['j_poste'], "", $exercice);
@@ -159,6 +159,14 @@ $amount_idx=0;
$montant=td(nbm($q[$e]['j_montant']),'class="num"');
$row.=($q[$e]['j_debit']=='t')?$montant:td('');
$row.=($q[$e]['j_debit']=='f')?$montant:td('');
+ /*
+ * Compute total in currency if not default one
+ */
+ if ( $obj->det->currency_id != 0 && $q[$e]['j_debit']=='f' ) {
+ $value=$obj->db->get_value("select oc_amount+oc_vat_amount from
operation_currency where j_id=$1",[$q[$e]['j_id']]);
+ $sum_prod_currency=bcadd($sum_prod_currency,$value,2);
+
+ }
/* Analytic accountancy */
if ( $owner->MY_ANALYTIC != "nu" /*&& $div=='popup'*/){
if ( preg_match('/^(6|7)/',$q[$e]['j_poste'])) {
@@ -188,6 +196,22 @@ $amount_idx=0;
}
?>
</table>
+<?php
+/*
+ * Info about currency if not in euro
+ */
+ // Add a row with currency and amount
+ if ( $obj->det->currency_id != "" && $obj->det->currency_id > 0)
+ {
+ $currency=new Acc_Currency($obj->db, $obj->det->currency_id);
+ $four_space=" "." "." "." ";
+
+ echo $currency->get_code(),$four_space;
+ echo _("Taux utilisé")," ", $obj->det->currency_rate,$four_space;
+ echo _("Taux Réf"), " ",$obj->det->currency_rate_ref.$four_space;
+ echo _("Montant en devise"), " ",$sum_prod_currency,$four_space;
+ }
+?>
</div>
<?php
require_once NOALYSS_TEMPLATE.'/ledger_detail_bottom.php';
- [Noalyss-commit] [noalyss] 40/173: Protect parameters, (continued)
- [Noalyss-commit] [noalyss] 40/173: Protect parameters, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 43/173: PHP 7.2 mistyped command, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 47/173: Currency : set default accounting for change difference when using currency, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 16/173: Translation, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 17/173: Translation, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 23/173: Currency : precision 6, display default currency , protect used currency against delete, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 27/173: Currency : detail operation Purchase , the amount in currency were wrong in the summary, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 37/173: Merge branch 'r700-currency' of gitlab.noalyss.eu:noalyss/noalyss into r700-currency, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 38/173: Merge branch 'master' of gitlab.noalyss.eu:noalyss/noalyss into r700-currency, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 39/173: Currency : because of Misc Operation, the tiers must also be saved into operation_currency. Fix also PRINTJRN for currency, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 44/173: Currency Show currency info for MISC,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 46/173: Typo, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 48/173: translation, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 49/173: Mantis #0001688: Affichage centime dans l'écran de confirmation, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 50/173: Merge branch 'r700-currency' of gitlab.noalyss.eu:noalyss/noalyss into r700-currency, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 51/173: Mantis #0001666: Export CSV depuis histo ne filtre pas par journal, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 54/173: Merge branch 'r700-currency' of gitlab.noalyss.eu:noalyss/noalyss into r700-currency, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 55/173: mantis #1690: Bug : impossible d'utiliser < dans Inplace_Edit Use base64_decode to protect the string in serialize, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 57/173: Mantis #1643: Déplacement du "bouton" «retour en-haut/calculatrice», Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 60/173: Mantis #0001614: Problème bilans , changement pour bilan ASBL, Dany De Bontridder, 2021/03/22
- [Noalyss-commit] [noalyss] 61/173: Mantis #1611: Problème Plan comptable - mise en évidence poste utilisés, Dany De Bontridder, 2021/03/22