repzo-sap-absjo 1.0.42 → 1.0.44
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.
- package/lib/commands/join.js +52 -23
- package/lib/commands/rep.js +1 -1
- package/package.json +1 -1
- package/src/commands/join.ts +8 -0
- package/src/commands/rep.ts +1 -1
package/lib/commands/join.js
CHANGED
|
@@ -21,7 +21,11 @@ export const join = async (commandEvent) => {
|
|
|
21
21
|
_u,
|
|
22
22
|
_v,
|
|
23
23
|
_w,
|
|
24
|
-
_x
|
|
24
|
+
_x,
|
|
25
|
+
_y,
|
|
26
|
+
_z,
|
|
27
|
+
_0,
|
|
28
|
+
_1;
|
|
25
29
|
const repzo = new Repzo(
|
|
26
30
|
(_a = commandEvent.app.formData) === null || _a === void 0
|
|
27
31
|
? void 0
|
|
@@ -67,7 +71,6 @@ export const join = async (commandEvent) => {
|
|
|
67
71
|
? void 0
|
|
68
72
|
: _e.createInvoiceHook) || false,
|
|
69
73
|
},
|
|
70
|
-
// return_invoice
|
|
71
74
|
{
|
|
72
75
|
app: "repzo-sap-absjo",
|
|
73
76
|
app_id:
|
|
@@ -77,8 +80,8 @@ export const join = async (commandEvent) => {
|
|
|
77
80
|
: commandEvent.app) === null || _f === void 0
|
|
78
81
|
? void 0
|
|
79
82
|
: _f._id,
|
|
80
|
-
action: "
|
|
81
|
-
event: "
|
|
83
|
+
action: "create_invoice",
|
|
84
|
+
event: "invoiceItems.report",
|
|
82
85
|
join:
|
|
83
86
|
((_j =
|
|
84
87
|
(_h =
|
|
@@ -91,9 +94,9 @@ export const join = async (commandEvent) => {
|
|
|
91
94
|
? void 0
|
|
92
95
|
: _h.invoices) === null || _j === void 0
|
|
93
96
|
? void 0
|
|
94
|
-
: _j.
|
|
97
|
+
: _j.createInvoiceHook) || false,
|
|
95
98
|
},
|
|
96
|
-
//
|
|
99
|
+
// return_invoice
|
|
97
100
|
{
|
|
98
101
|
app: "repzo-sap-absjo",
|
|
99
102
|
app_id:
|
|
@@ -103,8 +106,8 @@ export const join = async (commandEvent) => {
|
|
|
103
106
|
: commandEvent.app) === null || _k === void 0
|
|
104
107
|
? void 0
|
|
105
108
|
: _k._id,
|
|
106
|
-
action: "
|
|
107
|
-
event: "
|
|
109
|
+
action: "create_return_invoice",
|
|
110
|
+
event: "returnItems.create",
|
|
108
111
|
join:
|
|
109
112
|
((_o =
|
|
110
113
|
(_m =
|
|
@@ -115,11 +118,11 @@ export const join = async (commandEvent) => {
|
|
|
115
118
|
? void 0
|
|
116
119
|
: _l.formData) === null || _m === void 0
|
|
117
120
|
? void 0
|
|
118
|
-
: _m.
|
|
121
|
+
: _m.invoices) === null || _o === void 0
|
|
119
122
|
? void 0
|
|
120
|
-
: _o.
|
|
123
|
+
: _o.createReturnInvoiceHook) || false,
|
|
121
124
|
},
|
|
122
|
-
//
|
|
125
|
+
// payment
|
|
123
126
|
{
|
|
124
127
|
app: "repzo-sap-absjo",
|
|
125
128
|
app_id:
|
|
@@ -129,8 +132,8 @@ export const join = async (commandEvent) => {
|
|
|
129
132
|
: commandEvent.app) === null || _p === void 0
|
|
130
133
|
? void 0
|
|
131
134
|
: _p._id,
|
|
132
|
-
action: "
|
|
133
|
-
event: "
|
|
135
|
+
action: "create_payment",
|
|
136
|
+
event: "payment.create",
|
|
134
137
|
join:
|
|
135
138
|
((_s =
|
|
136
139
|
(_r =
|
|
@@ -141,11 +144,11 @@ export const join = async (commandEvent) => {
|
|
|
141
144
|
? void 0
|
|
142
145
|
: _q.formData) === null || _r === void 0
|
|
143
146
|
? void 0
|
|
144
|
-
: _r.
|
|
147
|
+
: _r.payments) === null || _s === void 0
|
|
145
148
|
? void 0
|
|
146
|
-
: _s.
|
|
149
|
+
: _s.createPaymentHook) || false,
|
|
147
150
|
},
|
|
148
|
-
//
|
|
151
|
+
// proforma
|
|
149
152
|
{
|
|
150
153
|
app: "repzo-sap-absjo",
|
|
151
154
|
app_id:
|
|
@@ -155,8 +158,8 @@ export const join = async (commandEvent) => {
|
|
|
155
158
|
: commandEvent.app) === null || _t === void 0
|
|
156
159
|
? void 0
|
|
157
160
|
: _t._id,
|
|
158
|
-
action: "
|
|
159
|
-
event: "
|
|
161
|
+
action: "create_proforma",
|
|
162
|
+
event: "salesorder.approve",
|
|
160
163
|
join:
|
|
161
164
|
((_w =
|
|
162
165
|
(_v =
|
|
@@ -167,9 +170,35 @@ export const join = async (commandEvent) => {
|
|
|
167
170
|
? void 0
|
|
168
171
|
: _u.formData) === null || _v === void 0
|
|
169
172
|
? void 0
|
|
170
|
-
: _v.
|
|
173
|
+
: _v.proformas) === null || _w === void 0
|
|
174
|
+
? void 0
|
|
175
|
+
: _w.createApprovedProformaHook) || false,
|
|
176
|
+
},
|
|
177
|
+
// transfer
|
|
178
|
+
{
|
|
179
|
+
app: "repzo-sap-absjo",
|
|
180
|
+
app_id:
|
|
181
|
+
(_x =
|
|
182
|
+
commandEvent === null || commandEvent === void 0
|
|
183
|
+
? void 0
|
|
184
|
+
: commandEvent.app) === null || _x === void 0
|
|
185
|
+
? void 0
|
|
186
|
+
: _x._id,
|
|
187
|
+
action: "create_transfer",
|
|
188
|
+
event: "transfer.approve",
|
|
189
|
+
join:
|
|
190
|
+
((_0 =
|
|
191
|
+
(_z =
|
|
192
|
+
(_y =
|
|
193
|
+
commandEvent === null || commandEvent === void 0
|
|
194
|
+
? void 0
|
|
195
|
+
: commandEvent.app) === null || _y === void 0
|
|
196
|
+
? void 0
|
|
197
|
+
: _y.formData) === null || _z === void 0
|
|
198
|
+
? void 0
|
|
199
|
+
: _z.transfers) === null || _0 === void 0
|
|
171
200
|
? void 0
|
|
172
|
-
:
|
|
201
|
+
: _0.createApprovedTransferHook) || false,
|
|
173
202
|
},
|
|
174
203
|
],
|
|
175
204
|
};
|
|
@@ -186,10 +215,10 @@ export const join = async (commandEvent) => {
|
|
|
186
215
|
} catch (e) {
|
|
187
216
|
//@ts-ignore
|
|
188
217
|
console.error(
|
|
189
|
-
((
|
|
190
|
-
|
|
218
|
+
((_1 = e === null || e === void 0 ? void 0 : e.response) === null ||
|
|
219
|
+
_1 === void 0
|
|
191
220
|
? void 0
|
|
192
|
-
:
|
|
221
|
+
: _1.data) || e
|
|
193
222
|
);
|
|
194
223
|
await commandLog.setStatus("fail", e).commit();
|
|
195
224
|
throw e;
|
package/lib/commands/rep.js
CHANGED
|
@@ -138,7 +138,7 @@ export const sync_rep = async (commandEvent) => {
|
|
|
138
138
|
assigned_warehouse: warehouse,
|
|
139
139
|
company_namespace: [nameSpace],
|
|
140
140
|
"settings.treating_invoice_as_proforma_for_etax":
|
|
141
|
-
sap_rep.INVOICESTATUS === "
|
|
141
|
+
sap_rep.INVOICESTATUS === "Y" ? true : false,
|
|
142
142
|
};
|
|
143
143
|
if (!repzo_rep) {
|
|
144
144
|
// Create
|
package/package.json
CHANGED
package/src/commands/join.ts
CHANGED
|
@@ -30,6 +30,14 @@ export const join = async (commandEvent: CommandEvent) => {
|
|
|
30
30
|
join:
|
|
31
31
|
commandEvent?.app?.formData?.invoices?.createInvoiceHook || false,
|
|
32
32
|
},
|
|
33
|
+
{
|
|
34
|
+
app: "repzo-sap-absjo",
|
|
35
|
+
app_id: commandEvent?.app?._id,
|
|
36
|
+
action: "create_invoice",
|
|
37
|
+
event: "invoiceItems.report",
|
|
38
|
+
join:
|
|
39
|
+
commandEvent?.app?.formData?.invoices?.createInvoiceHook || false,
|
|
40
|
+
},
|
|
33
41
|
// return_invoice
|
|
34
42
|
{
|
|
35
43
|
app: "repzo-sap-absjo",
|
package/src/commands/rep.ts
CHANGED
|
@@ -133,7 +133,7 @@ export const sync_rep = async (commandEvent: CommandEvent) => {
|
|
|
133
133
|
assigned_warehouse: warehouse,
|
|
134
134
|
company_namespace: [nameSpace],
|
|
135
135
|
"settings.treating_invoice_as_proforma_for_etax":
|
|
136
|
-
sap_rep.INVOICESTATUS === "
|
|
136
|
+
sap_rep.INVOICESTATUS === "Y" ? true : false,
|
|
137
137
|
};
|
|
138
138
|
|
|
139
139
|
if (!repzo_rep) {
|