This pull request fixes an error when using the {{ sc:cart:raw_tax_total_split }} tag.
Previously, the raw_tax_total_split tag was getting the line items from the tag's ->items() method which meant it was getting the line items post-augmentation.
This would then cause an issue when trying to sum the tax totals because the tax amounts would be augmented as strings (eg. £12.50) instead of integers.
This refactors that implementation so we're dealing with the LineItem methods, rather than augmented arrays.
This pull request fixes an error when using the
{{ sc:cart:raw_tax_total_split }}
tag.Previously, the
raw_tax_total_split
tag was getting the line items from the tag's->items()
method which meant it was getting the line items post-augmentation.This would then cause an issue when trying to sum the tax totals because the tax amounts would be augmented as strings (eg. £12.50) instead of integers.
This refactors that implementation so we're dealing with the
LineItem
methods, rather than augmented arrays.Related: https://github.com/duncanmcclean/simple-commerce/issues/1035#issuecomment-2018270684