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

Make taxes work #86

Merged
merged 23 commits into from
Aug 1, 2024
Merged

Make taxes work #86

merged 23 commits into from
Aug 1, 2024

Conversation

talvasconcelos
Copy link
Collaborator

@talvasconcelos talvasconcelos commented May 10, 2024

First implementation of making taxes work for the tpos.

It's only implemented for the Items stuff, needs integration with normal TPoS usage, with the default tax value.

Big code overhaul (separate js from html) as files were getting massive. Added some components aswell!

There's now a new dropdown for tax related stuff:
image

Taxes can be set per product, if not set, it will take the default value. Tax can be included on price or added on top (inclusive or exclusive).

When not using the TPoS with a product list, the tax is assumed included on price. The cart will display the values of the subtotal / tax amount / total:

tax exclusive:
image

tax inclusive:
image

Test:

  1. Create a new TPoS, or edit an existing one
  2. Change tax settings
  3. Use TPoS with the products, pay invoice
  4. Switch between tax included or excluded
  5. Add different tax value for different products

Closes #69

@talvasconcelos talvasconcelos marked this pull request as ready for review May 14, 2024 09:15
migrations.py Outdated Show resolved Hide resolved
templates/tpos/tpos.html Outdated Show resolved Hide resolved
@motorina0

This comment was marked as off-topic.

@motorina0

This comment was marked as off-topic.

@talvasconcelos talvasconcelos requested a review from motorina0 July 30, 2024 11:05
await db.execute("ALTER TABLE tpos.pos ADD COLUMN withdrawtimeopt TEXT DEFAULT 'mins';")
await db.execute("ALTER TABLE tpos.pos ADD COLUMN withdrawpindisabled BOOL NOT NULL DEFAULT false;")
await db.execute(
"ALTER TABLE tpos.pos ADD COLUMN withdrawtimeopt TEXT DEFAULT 'mins';"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not use underscore for column names?

@motorina0
Copy link
Collaborator

Is Inclusive/Exclusive the English term that businesses use?

@talvasconcelos
Copy link
Collaborator Author

Is Inclusive/Exclusive the English term that businesses use?

Apparently ...

https://x-series-support.lightspeedhq.com/hc/en-us/articles/25533988515355-What-does-tax-inclusive-and-tax-exclusive-mean

@talvasconcelos
Copy link
Collaborator Author

Can I merge this one, @motorina0 ?

@dni @arcbtc ?

@motorina0
Copy link
Collaborator

Can I merge this one, @motorina0 ?

@dni @arcbtc ?

I approved, so yes.
But you should get one more ✅ approval before merging.

@dni dni merged commit e4156c1 into main Aug 1, 2024
@dni dni deleted the make_tax_work branch August 1, 2024 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request]
4 participants