Use both values

This commit is contained in:
Tomek Wytrębowicz 2024-09-11 23:19:24 +02:00
parent deef367994
commit 3c15dd0045
1 changed files with 9 additions and 4 deletions

View File

@ -133,6 +133,7 @@ class TaxesReportTable extends Component {
getSummary( totals, totalResults = 0 ) {
const {
tax_codes: taxesCodes = 0,
total_tax: totalTax = 0,
order_tax: orderTax = 0,
shipping_tax: shippingTax = 0,
@ -141,14 +142,18 @@ class TaxesReportTable extends Component {
const { formatAmount, getCurrencyConfig } = this.context;
const currency = getCurrencyConfig();
return [
{
label: _n( 'tax', 'taxes', taxesCodes, 'woocommerce' ),
value: formatValue( currency, 'number', totalResults ),
},
{
label: _n(
'tax code',
'tax codes',
totalResults,
'distinct code',
'distinct codes',
taxesCodes,
'woocommerce'
),
value: formatValue( currency, 'number', totalResults ),
value: formatValue( currency, 'number', taxesCodes ),
},
{
label: __( 'total tax', 'woocommerce' ),