Skip to content

Commit

Permalink
Fix taxes totals mismatch at reports table (woocommerce#51218)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomalec authored Sep 22, 2024
1 parent 15bcbbd commit e4d0123
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
13 changes: 11 additions & 2 deletions plugins/woocommerce-admin/client/analytics/report/taxes/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class TaxesReportTable extends Component {
} );
}

getSummary( totals ) {
getSummary( totals, totalResults = 0 ) {
const {
tax_codes: taxesCodes = 0,
total_tax: totalTax = 0,
Expand All @@ -143,7 +143,16 @@ class TaxesReportTable extends Component {
const currency = getCurrencyConfig();
return [
{
label: _n( 'tax code', 'tax codes', taxesCodes, 'woocommerce' ),
label: _n( 'tax', 'taxes', totalResults, 'woocommerce' ),
value: formatValue( currency, 'number', totalResults ),
},
{
label: _n(
'distinct code',
'distinct codes',
taxesCodes,
'woocommerce'
),
value: formatValue( currency, 'number', taxesCodes ),
},
{
Expand Down
4 changes: 4 additions & 0 deletions plugins/woocommerce/changelog/fix-49635-tax-totals
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: tweak

Distinguish taxes and tax codes in the report table summary

0 comments on commit e4d0123

Please sign in to comment.