fix(utils,core-flows): subtotal calculation and returns location (#13497)
* fix(utils,core-flows): subtotal calculation and returns location * changeset * fix test * var * rm extra field from test * fix original total * fix partial refunds and pending difference * fix test * fix test * test * extract to util * original total and update payment when receive return * original_subtotal * default fields * test * calculate pending difference * revert claims test * pending difference * creadit line fix * if
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
AdminStockLocation,
|
||||
MedusaContainer,
|
||||
} from "@medusajs/types"
|
||||
import { ContainerRegistrationKeys, Modules } from "@medusajs/utils"
|
||||
import {
|
||||
adminHeaders,
|
||||
generatePublishableKey,
|
||||
@@ -175,6 +176,26 @@ export async function createOrderSeeder({
|
||||
adminHeaders
|
||||
)
|
||||
|
||||
const remoteLink = container.resolve(ContainerRegistrationKeys.LINK)
|
||||
await remoteLink.create([
|
||||
{
|
||||
[Modules.SALES_CHANNEL]: {
|
||||
sales_channel_id: salesChannel.id,
|
||||
},
|
||||
[Modules.STOCK_LOCATION]: {
|
||||
stock_location_id: stockLocation.id,
|
||||
},
|
||||
},
|
||||
{
|
||||
[Modules.PRODUCT]: {
|
||||
variant_id: product.variants[0].id,
|
||||
},
|
||||
[Modules.INVENTORY]: {
|
||||
inventory_item_id: inventoryItem.id,
|
||||
},
|
||||
},
|
||||
])
|
||||
|
||||
/**
|
||||
* Create shipping options for each shipping profile provided
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user