@riocrypto/common-server 1.0.1381 → 1.0.1382
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -26,11 +26,16 @@ class InvopopClient {
|
|
|
26
26
|
var _a, _b;
|
|
27
27
|
return __awaiter(this, void 0, void 0, function* () {
|
|
28
28
|
const uuid = (0, uuid_1.v1)();
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
const
|
|
29
|
+
const operationDate = new Date(order.createdAt);
|
|
30
|
+
const operationYear = operationDate.getFullYear();
|
|
31
|
+
const operationMonth = String(operationDate.getMonth() + 1).padStart(2, "0"); // Month is zero-indexed
|
|
32
|
+
const operationDay = String(operationDate.getDate()).padStart(2, "0");
|
|
33
|
+
const operationDateFormatted = `${operationYear}-${operationMonth}-${operationDay}`;
|
|
34
|
+
const issueDate = new Date();
|
|
35
|
+
const issueYear = issueDate.getFullYear();
|
|
36
|
+
const issueMonth = String(issueDate.getMonth() + 1).padStart(2, "0"); // Month is zero-indexed
|
|
37
|
+
const issueDay = String(issueDate.getDate()).padStart(2, "0");
|
|
38
|
+
const issueDateFormatted = `${issueYear}-${issueMonth}-${issueDay}`;
|
|
34
39
|
const { data } = yield axios_1.default.put(`${this.baseUrl}/transform/v1/jobs/${uuid}`, {
|
|
35
40
|
workflow_id: "5b123900-1035-4c8c-a97a-36b940d7a21e",
|
|
36
41
|
data: {
|
|
@@ -38,7 +43,8 @@ class InvopopClient {
|
|
|
38
43
|
code: "",
|
|
39
44
|
type: "standard",
|
|
40
45
|
currency: order.fiat,
|
|
41
|
-
issue_date:
|
|
46
|
+
issue_date: issueDateFormatted,
|
|
47
|
+
op_date: operationDateFormatted,
|
|
42
48
|
supplier: {
|
|
43
49
|
name: "RAMPA BLOCKCHAIN",
|
|
44
50
|
tax_id: {
|