Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addSubItem has no tax in tax calculation #278

Closed
dennisoderwald opened this issue Apr 25, 2021 · 2 comments
Closed

addSubItem has no tax in tax calculation #278

dennisoderwald opened this issue Apr 25, 2021 · 2 comments

Comments

@dennisoderwald
Copy link
Collaborator

As it seems I can't set a tax to an addSubItem but also the tax from the original item is not taken into account, so all sub items are calculated without tax.

    $item = LaraCart::add(2, 'Product Name', 1, 1.00, [
        'tax' => '0.19'
    ]);

    $item->addSubItem([
        'price' => '1.00',
        'qty' => 1
    ]);

Expected result:

Sub Total: 2.00
Tax Total: 0.38
Total: 2.38

Output result:

Sub Total: 2.00
Tax Total: 0.19
Total: 2.19

The variables 'taxable' and 'tax' cannot be set in the sub-item either.

@dennisoderwald
Copy link
Collaborator Author

The problem probably occurs in connection with tax_by_item => true.

@lukepolo
Copy link
Owner

lukepolo commented Jul 8, 2021

this has been fixed in the newer branch.

@lukepolo lukepolo closed this as completed Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants