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