From dc0b610fd57847f2970e9d00182237b0ea7fa332 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 10 Nov 2020 11:07:10 +0100 Subject: [PATCH 1/4] fix : display vat_tx instead of Array text --- htdocs/accountancy/journal/sellsjournal.php | 24 ++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index debe1fa8cb0..8665ee061a9 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -621,18 +621,18 @@ if ($action == 'exportcsv') { // ISO and not UTF8 ! foreach ($arrayofvat[$key] as $k => $mt) { if ($mt) { - print '"'.$key.'"'.$sep; - print '"'.$date.'"'.$sep; - print '"'.$val["ref"].'"'.$sep; - print '"'.utf8_decode(dol_trunc($companystatic->name, 32)).'"'.$sep; - print '"'.length_accountg(html_entity_decode($k)).'"'.$sep; - print '"'.length_accountg(html_entity_decode($k)).'"'.$sep; - print '""'.$sep; - print '"'.$langs->trans("VAT").' - '.$def_tva[$key].' %"'.$sep; - print '"'.utf8_decode(dol_trunc($companystatic->name, 16)).' - '.$invoicestatic->ref.' - '.$langs->trans("VAT").join(', ', $def_tva[$key][$k]).' %'.($numtax ? ' - Localtax '.$numtax : '').'"'.$sep; - print '"'.($mt < 0 ? price(-$mt) : '').'"'.$sep; - print '"'.($mt >= 0 ? price($mt) : '').'"'.$sep; - print '"'.$journal.'"'; + print '"' . $key . '"' . $sep; + print '"' . $date . '"' . $sep; + print '"' . $val["ref"] . '"' . $sep; + print '"' . utf8_decode(dol_trunc($companystatic->name, 32)) . '"' . $sep; + print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep; + print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep; + print '""' . $sep; + print '"' . $langs->trans("VAT") . ' - ' . join(', ', $def_tva[$key][$k]) . ' %' . '"' . $sep; + print '"' . utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("VAT") . join(', ', $def_tva[$key][$k]) . ' %' . ($numtax ? ' - Localtax ' . $numtax : '') . '"' . $sep; + print '"' . ($mt < 0 ? price(-$mt) : '') . '"' . $sep; + print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep; + print '"' . $journal . '"'; print "\n"; } } From 51141883d47c5a6ba32517b3a072636f6c38032e Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Tue, 10 Nov 2020 11:42:07 +0100 Subject: [PATCH 2/4] fix : display vat_tx instead of Array% --- htdocs/accountancy/journal/purchasesjournal.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index a656643be57..ba4d27893cf 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -669,7 +669,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 ! print '"'.length_accountg(html_entity_decode($k)).'"'.$sep; print '"'.length_accountg(html_entity_decode($k)).'"'.$sep; print '""'.$sep; - print '"'.$langs->trans("VAT").' - '.$def_tva[$key].'"'.$sep; + print '"'.$langs->trans("VAT").' - '.join(', ', $def_tva[$key][$k]).' %'.'"'.$sep; print '"'.utf8_decode(dol_trunc($companystatic->name, 16)).' - '.$val["refsuppliersologest"].' - '.$langs->trans("VAT").join(', ', $def_tva[$key][$k]).' %'.($numtax ? ' - Localtax '.$numtax : '').'"'.$sep; print '"'.($mt >= 0 ? price($mt) : '').'"'.$sep; print '"'.($mt < 0 ? price(-$mt) : '').'"'.$sep; From bebdf12f8c34e7a71b63d5390b17dc7090ce1d7f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 10 Nov 2020 14:37:00 +0100 Subject: [PATCH 3/4] Update purchasesjournal.php --- htdocs/accountancy/journal/purchasesjournal.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index ba4d27893cf..94f878527dd 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -669,7 +669,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 ! print '"'.length_accountg(html_entity_decode($k)).'"'.$sep; print '"'.length_accountg(html_entity_decode($k)).'"'.$sep; print '""'.$sep; - print '"'.$langs->trans("VAT").' - '.join(', ', $def_tva[$key][$k]).' %'.'"'.$sep; + print '"'.$langs->trans("VAT").' - '.join(', ', $def_tva[$key][$k]).' %"'.$sep; print '"'.utf8_decode(dol_trunc($companystatic->name, 16)).' - '.$val["refsuppliersologest"].' - '.$langs->trans("VAT").join(', ', $def_tva[$key][$k]).' %'.($numtax ? ' - Localtax '.$numtax : '').'"'.$sep; print '"'.($mt >= 0 ? price($mt) : '').'"'.$sep; print '"'.($mt < 0 ? price(-$mt) : '').'"'.$sep; From ecaf7328815579beae3e6e20cf86af9bbe2eb1e5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 10 Nov 2020 14:37:33 +0100 Subject: [PATCH 4/4] Update sellsjournal.php --- htdocs/accountancy/journal/sellsjournal.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 8665ee061a9..b1331cd1dc7 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -628,7 +628,7 @@ if ($action == 'exportcsv') { // ISO and not UTF8 ! print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep; print '"' . length_accountg(html_entity_decode($k)) . '"' . $sep; print '""' . $sep; - print '"' . $langs->trans("VAT") . ' - ' . join(', ', $def_tva[$key][$k]) . ' %' . '"' . $sep; + print '"' . $langs->trans("VAT") . ' - ' . join(', ', $def_tva[$key][$k]) . ' %"' . $sep; print '"' . utf8_decode(dol_trunc($companystatic->name, 16)) . ' - ' . $invoicestatic->ref . ' - ' . $langs->trans("VAT") . join(', ', $def_tva[$key][$k]) . ' %' . ($numtax ? ' - Localtax ' . $numtax : '') . '"' . $sep; print '"' . ($mt < 0 ? price(-$mt) : '') . '"' . $sep; print '"' . ($mt >= 0 ? price($mt) : '') . '"' . $sep;