forked from OriginProtocol/dshop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Discount on taxes (OriginProtocol#939)
* Modeled an 'Exclude Taxes' checkbox based on 'Exclude Shipping Fees'. Added tooltips for both to explain their functions * Frontend Changes: Added a button to make the already-existing 'Delete' option on the Edit Discount page visible. Fixed messaging error in tooltips for 'Exclude Shipping Fees' and 'Exclude Taxes' (see OriginProtocol#653). Backend change: the discount 'model' now has a field to recognize 'Exclude Taxes' * Backend changes. Reference: OriginProtocol#762 * Adjusted logic that calculates the total tax to be paid. Added comments * Added tests to discount.test.js, commented on the calculateCartTotal module, cleaned up files * Substituted the use of an external component for one found in the existing codebase. * file cleanup Co-authored-by: Rajath <>
- Loading branch information
Showing
14 changed files
with
304 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
'use strict' | ||
|
||
module.exports = { | ||
up: (queryInterface, Sequelize) => { | ||
return queryInterface.addColumn('discounts', 'exclude_taxes', { | ||
type: Sequelize.BOOLEAN | ||
}) | ||
}, | ||
down: (queryInterface) => { | ||
return queryInterface.removeColumn('discounts', 'exclude_taxes') | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.