feat(medusa,core-flows,types): add cart <> tax integration workflows + steps (#6580)
what: - adds tax lines to cart when item operations take place RESOLVES CORE-1821 RESOLVES CORE-1822 RESOLVES CORE-1823 RESOLVES CORE-1824
This commit is contained in:
@@ -20,6 +20,7 @@ export default class SystemTaxService implements ITaxProvider {
|
||||
name: r.name,
|
||||
code: r.code,
|
||||
line_item_id: l.line_item.id,
|
||||
provider_id: this.getIdentifier(),
|
||||
}))
|
||||
})
|
||||
|
||||
@@ -31,6 +32,7 @@ export default class SystemTaxService implements ITaxProvider {
|
||||
name: r.name,
|
||||
code: r.code,
|
||||
shipping_line_id: l.shipping_line.id,
|
||||
provider_id: this.getIdentifier(),
|
||||
}))
|
||||
})
|
||||
)
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
InternalModuleDeclaration,
|
||||
ModuleJoinerConfig,
|
||||
ModulesSdkTypes,
|
||||
TaxRegionDTO,
|
||||
TaxTypes,
|
||||
} from "@medusajs/types"
|
||||
import {
|
||||
@@ -14,16 +15,14 @@ import {
|
||||
MedusaContext,
|
||||
MedusaError,
|
||||
ModulesSdkUtils,
|
||||
arrayDifference,
|
||||
isDefined,
|
||||
isString,
|
||||
promiseAll,
|
||||
} from "@medusajs/utils"
|
||||
import { TaxProvider, TaxRate, TaxRegion, TaxRateRule } from "@models"
|
||||
import { TaxProvider, TaxRate, TaxRateRule, TaxRegion } from "@models"
|
||||
import { entityNameToLinkableKeysMap, joinerConfig } from "../joiner-config"
|
||||
import { TaxRegionDTO } from "@medusajs/types"
|
||||
import { uniqueRateReferenceIndexName } from "../models/tax-rate-rule"
|
||||
import { singleDefaultRegionIndexName } from "../models/tax-rate"
|
||||
import { uniqueRateReferenceIndexName } from "../models/tax-rate-rule"
|
||||
import { countryCodeProvinceIndexName } from "../models/tax-region"
|
||||
|
||||
type InjectedDependencies = {
|
||||
|
||||
Reference in New Issue
Block a user