Closed arjun289 closed 5 years ago
Merging #465 into develop will increase coverage by
0.62%
. The diff coverage is95.94%
.
@@ Coverage Diff @@
## develop #465 +/- ##
===========================================
+ Coverage 78.4% 79.02% +0.62%
===========================================
Files 174 175 +1
Lines 2139 2198 +59
===========================================
+ Hits 1677 1737 +60
+ Misses 462 461 -1
Impacted Files | Coverage Δ | |
---|---|---|
apps/snitch_core/test/support/factory/factory.ex | 88.13% <ø> (+5.59%) |
:arrow_up: |
...s/snitch_core/lib/core/data/schema/package_item.ex | 88.88% <ø> (ø) |
:arrow_up: |
...b/core/domain/calculator/default_tax_calculator.ex | 100% <100%> (ø) |
:arrow_up: |
apps/snitch_core/lib/core/domain/package.ex | 81.25% <100%> (+1.25%) |
:arrow_up: |
apps/snitch_core/lib/core/domain/shipment.ex | 98.36% <100%> (+0.02%) |
:arrow_up: |
apps/snitch_core/lib/core/data/model/product.ex | 97.24% <100%> (+0.16%) |
:arrow_up: |
apps/snitch_core/lib/core/domain/package_item.ex | 100% <100%> (ø) |
:arrow_up: |
...s/snitch_core/lib/core/domain/order/transitions.ex | 42.39% <100%> (ø) |
:arrow_up: |
apps/snitch_core/lib/core/data/schema/product.ex | 87.5% <75%> (-2.16%) |
:arrow_down: |
apps/snitch_core/lib/core/domain/tax.ex | 96.22% <96.22%> (ø) |
|
... and 1 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update b300412...5c12b0f. Read the comment docs.
Why?
At present tax needs to be handled for product and shipping. The PR adds tax domain module which handles all the business logic and edge cases related to tax and is used in respective domain modules for package item and package to set taxes for product and shipping.
This change addresses the need by:
This relationship allows tax calculation for a product by findind respective values in a tax rate for that particular tax_class.
package_item
this was done so as to keep the actual price after tax calculation which is exclusive of the tax.[delivers #163283496]
Checklist
credo
and compile-time warnings.