[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 111/238: Currency : sales in listing mode
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 111/238: Currency : sales in listing mode |
Date: |
Sat, 26 Oct 2019 04:40:47 -0400 (EDT) |
sparkyx pushed a commit to annotated tag rel7110
in repository noalyss.
commit 4deb34a059cce19e75891055efb29f7bd6a7324f
Author: Dany De Bontridder <address@hidden>
Date: Wed Dec 5 09:27:52 2018 +0100
Currency : sales in listing mode
---
include/class/acc_ledger_history_sale.class.php | 34 ++++++++++++++++++++--
.../template/acc_ledger_history_sale_oneline.php | 14 +++++++--
2 files changed, 42 insertions(+), 6 deletions(-)
diff --git a/include/class/acc_ledger_history_sale.class.php
b/include/class/acc_ledger_history_sale.class.php
index 400de99..ffb8104 100644
--- a/include/class/acc_ledger_history_sale.class.php
+++ b/include/class/acc_ledger_history_sale.class.php
@@ -126,7 +126,14 @@ class Acc_Ledger_History_Sale extends Acc_Ledger_History
(select ad_value from fiche_detail where ad_id=32 and
f_id=x.f_id) as first_name,
(select ad_value from fiche_detail where ad_id=23 and
f_id=x.f_id) as qcode
from
- fiche as x)
+ fiche as x),
+ row_currency as (
+ select sum(oc_amount) as sum_oc_amount,sum(oc_vat_amount) as
sum_oc_vat_amount,jrnx.j_grpt
+ from
+ operation_currency
+ join jrnx using (j_id)
+ group by j_grpt
+ )
select
name,
first_name,
@@ -142,11 +149,19 @@ class Acc_Ledger_History_Sale extends Acc_Ledger_History
vat,
tva_sided,
novat,
- novat+vat-tva_sided as tvac
+ novat+vat-tva_sided as tvac,
+ jrn.currency_id,
+ jrn.currency_rate,
+ jrn.currency_rate_ref,
+ sum_oc_amount,
+ sum_oc_vat_amount,
+ cr_code_iso
from
jrn
join row_sale on (qs_internal=jr_internal)
join client_detail on (qs_client=f_id)
+ left join row_currency as rc on (rc.j_grpt = jrn.jr_grpt_id)
+ left join currency as c on (c.id=jrn.currency_id)
where
jr_def_id in ({$ledger_list})
and {$periode}
@@ -249,7 +264,6 @@ class Acc_Ledger_History_Sale extends Acc_Ledger_History
$title[]=_("HTVA");
$title[]=_("TVA");
$title[]=_("TVA annulée");
-
if ( $own->MY_TVA_USE=='Y')
{
@@ -260,6 +274,11 @@ class Acc_Ledger_History_Sale extends Acc_Ledger_History
}
}
$title[]=_("TVAC/TTC");
+ $title[]=_("Devise");
+ $title[]=_("Devise HTVA");
+ $title[]=_("Devise TVA");
+ $title[]=_("Taux ref");
+ $title[]=_("Taux utilisé");
$title[]=_("opérations liées");
$export->write_header($title);
@@ -299,6 +318,15 @@ class Acc_Ledger_History_Sale extends Acc_Ledger_History
}
$export->add($line['tvac'],"number");
/**
+ * Add currency info
+ */
+ $export->add($line['cr_code_iso']);
+ $export->add($line['sum_oc_amount'],'number');
+ $export->add($line['sum_oc_vat_amount'],'number');
+ $export->add($line['currency_rate'],'number');
+ $export->add($line['currency_rate_ref'],'number');
+
+ /**
* Retrieve payment if any
*/
$ret_reconcile=$this->db->execute('reconcile_date',array($line['jr_id']));
diff --git a/include/template/acc_ledger_history_sale_oneline.php
b/include/template/acc_ledger_history_sale_oneline.php
index a24b9ee..439c25c 100644
--- a/include/template/acc_ledger_history_sale_oneline.php
+++ b/include/template/acc_ledger_history_sale_oneline.php
@@ -46,15 +46,18 @@
<th>
<?=_('Description')?>
</th>
- <th>
+ <th class="num">
<?=_('HTVA')?>
</th>
- <th>
+ <th class="num">
<?=_('TVA')?>
</th>
- <th>
+ <th class="num">
<?=_('TVAC')?>
</th>
+ <th class="num">
+ <?=_('Devise')?>
+ </th>
</tr>
<?php
$nb_data=count($this->data);
@@ -96,6 +99,10 @@ for ($i=0;$i<$nb_data;$i++):
<td class="num">
<?=nbm($this->data[$i]['tvac'])?>
</td>
+ <td class="num">
+ <?=nbm (
bcadd($this->data[$i]['sum_oc_amount'],$this->data[$i]['sum_oc_vat_amount']),4)?>
+ <?=$this->data[$i]['cr_code_iso']?>
+ </td>
<td>
<?php
@@ -110,6 +117,7 @@ for ($i=0;$i<$nb_data;$i++):
}
} ?>
</td>
+
</tr>
<?php
endfor;
- [Noalyss-commit] [noalyss] 201/238: Merge branch 'dev7109' into entreprise, (continued)
- [Noalyss-commit] [noalyss] 201/238: Merge branch 'dev7109' into entreprise, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 93/238: translate, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 98/238: Fin currency : detail operation show currency , rate and amount, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 104/238: Reverse for Currency, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 101/238: Currency : SQL quant_fin is adapted, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 100/238: Currency : financial use the rate depending of the operation date, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 108/238: acc_ledger_fin . translation, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 99/238: Modify quant_fin , we add a column j_id to have a fk to jrnx and operation_currency, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 109/238: Indentation, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 116/238: Database upgrade 131, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 111/238: Currency : sales in listing mode,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 115/238: Currency : ledger printing for FIN + detail operation, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 127/238: Merge commit '3f53de417dd89e9a90a386404f93f8648155e046' into r700-currency, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 118/238: Currency : export CSV history for card and accounting, fix bug with unneeded oc_vat_amount + add the currency rate, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 114/238: Currency : purchase oneline + extended html and csv, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 121/238: Currency : error when displaying, add 4 due to a mistype instruction, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 128/238: Missing bracket, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 136/238: Translation, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 131/238: Translation + use of httpInput, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 148/238: remove commented code, Dany De Bontridder, 2019/10/26
- [Noalyss-commit] [noalyss] 125/238: Merge branch 'master' into r700-currency, Dany De Bontridder, 2019/10/26