@disruptive-learning/n8n-nodes-gigstack 1.1.6 → 1.1.7
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.
|
@@ -512,6 +512,18 @@ class Gigstack {
|
|
|
512
512
|
if (additionalFields.metadata) {
|
|
513
513
|
body.metadata = JSON.parse(additionalFields.metadata);
|
|
514
514
|
}
|
|
515
|
+
// Handle invoice_config
|
|
516
|
+
const invoiceConfig = this.getNodeParameter('invoiceConfig', i, {});
|
|
517
|
+
if (invoiceConfig && Object.keys(invoiceConfig).length > 0) {
|
|
518
|
+
const config = {};
|
|
519
|
+
if (invoiceConfig.serie)
|
|
520
|
+
config.serie = invoiceConfig.serie;
|
|
521
|
+
if (invoiceConfig.folio && invoiceConfig.folio !== 0)
|
|
522
|
+
config.folio = invoiceConfig.folio;
|
|
523
|
+
if (Object.keys(config).length > 0) {
|
|
524
|
+
body.invoice_config = config;
|
|
525
|
+
}
|
|
526
|
+
}
|
|
515
527
|
responseData = await GenericFunctions_1.gigstackApiRequest.call(this, 'POST', '/payments/register', body, qs);
|
|
516
528
|
responseData = (0, GenericFunctions_1.simplifyResponse)(responseData);
|
|
517
529
|
}
|
|
@@ -250,6 +250,36 @@ exports.paymentFields = [
|
|
|
250
250
|
},
|
|
251
251
|
description: 'SAT payment form code',
|
|
252
252
|
},
|
|
253
|
+
{
|
|
254
|
+
displayName: 'Invoice Config',
|
|
255
|
+
name: 'invoiceConfig',
|
|
256
|
+
type: 'collection',
|
|
257
|
+
placeholder: 'Add Invoice Config',
|
|
258
|
+
default: {},
|
|
259
|
+
displayOptions: {
|
|
260
|
+
show: {
|
|
261
|
+
resource: ['payment'],
|
|
262
|
+
operation: ['register'],
|
|
263
|
+
},
|
|
264
|
+
},
|
|
265
|
+
description: 'Configure invoice serie and folio for the generated invoice',
|
|
266
|
+
options: [
|
|
267
|
+
{
|
|
268
|
+
displayName: 'Serie',
|
|
269
|
+
name: 'serie',
|
|
270
|
+
type: 'string',
|
|
271
|
+
default: '',
|
|
272
|
+
description: 'Invoice serie (e.g., "A", "B"). Leave empty for default.',
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
displayName: 'Folio',
|
|
276
|
+
name: 'folio',
|
|
277
|
+
type: 'number',
|
|
278
|
+
default: 0,
|
|
279
|
+
description: 'Invoice folio number. Leave 0 for automatic increment.',
|
|
280
|
+
},
|
|
281
|
+
],
|
|
282
|
+
},
|
|
253
283
|
// ----------------------------------
|
|
254
284
|
// payment: get, cancel, markAsPaid, refund
|
|
255
285
|
// ----------------------------------
|
package/package.json
CHANGED