[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Noalyss-commit] [noalyss] 107/162: Currency : sales in listing mode
From: |
Dany De Bontridder |
Subject: |
[Noalyss-commit] [noalyss] 107/162: Currency : sales in listing mode |
Date: |
Sat, 11 Jul 2020 13:23:53 -0400 (EDT) |
sparkyx pushed a commit to annotated tag E-4
in repository noalyss.
commit 4deb34a059cce19e75891055efb29f7bd6a7324f
Author: Dany De Bontridder <danydb@noalyss.eu>
AuthorDate: 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] 106/162: Currency : All ledger's listing mode , html , csv and pdf, (continued)
- [Noalyss-commit] [noalyss] 106/162: Currency : All ledger's listing mode , html , csv and pdf, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 111/162: Currency : ledger printing for FIN + detail operation, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 105/162: Indentation, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 108/162: currency : sale extended html , csv, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 109/162: change background, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 113/162: Currency : cosmetic display history : show only the value of the card/accounting, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 114/162: Currency : export CSV history for card and accounting, fix bug with unneeded oc_vat_amount + add the currency rate, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 115/162: currency : adapt middle of payment, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 117/162: Currency : error when displaying, add 4 due to a mistype instruction, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 118/162: Currency : display correctly the saldo at the end / beginning operation, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 107/162: Currency : sales in listing mode,
Dany De Bontridder <=
- [Noalyss-commit] [noalyss] 122/162: Merge branch 'master' into r700-currency, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 112/162: Database upgrade 131, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 116/162: Currency : send the saldo for financial ledger, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 123/162: Merge commit '3f53de417dd89e9a90a386404f93f8648155e046' into r700-currency, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 110/162: Currency : purchase oneline + extended html and csv, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 119/162: Currency = payment automatic for Sales and Purchases, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 121/162: Merge branch 'master' into r700-currency, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 124/162: Missing bracket, Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 125/162: Esthetic with button "Add accounting", Dany De Bontridder, 2020/07/11
- [Noalyss-commit] [noalyss] 131/162: Translation, Dany De Bontridder, 2020/07/11