Economic invoice booking finalized
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
"express": "^4.17.1",
|
||||
"medusa-core-utils": "^0.3.0",
|
||||
"medusa-interfaces": "^0.3.0",
|
||||
"medusa-test-utils": "^0.3.0"
|
||||
"medusa-test-utils": "^0.3.0",
|
||||
"moment": "^2.27.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import moment from "moment"
|
||||
import { BaseService } from "medusa-interfaces"
|
||||
import { MedusaError } from "medusa-core-utils"
|
||||
|
||||
ECONOMIC_BASE_URL = "https://restapi.e-conomic.com"
|
||||
const ECONOMIC_BASE_URL = "https://restapi.e-conomic.com"
|
||||
|
||||
class EconomicService extends BaseService {
|
||||
/**
|
||||
@@ -16,7 +16,6 @@ class EconomicService extends BaseService {
|
||||
* customer_number_world: 678,
|
||||
* unit_number: 42,
|
||||
* payment_terms_number: 42,
|
||||
* shipping_product_number: 42,
|
||||
* layout_number: 42,
|
||||
* vatzone_number_eu: 42,
|
||||
* vatzone_number_dk: 42,
|
||||
@@ -198,7 +197,7 @@ class EconomicService extends BaseService {
|
||||
async bookEconomicInvoice(orderId) {
|
||||
try {
|
||||
const order = await this.orderService_.retrieve(orderId)
|
||||
const { economicDraftId } = order.setMetadata
|
||||
const { economicDraftId } = order.metadata
|
||||
|
||||
if (!economicDraftId) {
|
||||
throw new MedusaError(
|
||||
|
||||
5588
packages/medusa-plugin-economic/yarn.lock
Normal file
5588
packages/medusa-plugin-economic/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
@@ -32,7 +32,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"start": "nodemon --watch plugins/ --watch src/ --exec babel-node src/app.js",
|
||||
"watch": "babel -w src --out-dir dist --ignore **/__tests__",
|
||||
"watch": "babel -w src --out-dir dist/ --ignore **/__tests__",
|
||||
"prepare": "cross-env NODE_ENV=production npm run build",
|
||||
"build": "babel src -d dist",
|
||||
"serve": "node dist/app.js",
|
||||
@@ -70,4 +70,4 @@
|
||||
"winston": "^3.2.1"
|
||||
},
|
||||
"gitHead": "35e0930650d5f4aedf2610749cd131ae8b7e17cc"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user