@pokash/n8n-nodes-optima-rest-api 1.8.0 → 1.10.0
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.
|
@@ -392,11 +392,23 @@ class OptimaRestApi {
|
|
|
392
392
|
description: 'Document data in JSON format. For corrections: include OryginalDocumentId and PrzyczynaKorekty.',
|
|
393
393
|
},
|
|
394
394
|
// ---- KSeF Update fields (operation: updateKSeF) ----
|
|
395
|
+
{
|
|
396
|
+
displayName: 'Numer Pełny',
|
|
397
|
+
name: 'numerPelny',
|
|
398
|
+
type: 'string',
|
|
399
|
+
default: '',
|
|
400
|
+
displayOptions: {
|
|
401
|
+
show: {
|
|
402
|
+
resource: ['document'],
|
|
403
|
+
operation: ['updateKSeF'],
|
|
404
|
+
},
|
|
405
|
+
},
|
|
406
|
+
description: 'Nasz numer dokumentu (np. FS/3/2026/DEV/07) — dla SPRZEDAŻY (unikalny w firmie). Ma pierwszeństwo nad Numer Obcy.',
|
|
407
|
+
},
|
|
395
408
|
{
|
|
396
409
|
displayName: 'Numer Obcy',
|
|
397
410
|
name: 'numerObcy',
|
|
398
411
|
type: 'string',
|
|
399
|
-
required: true,
|
|
400
412
|
default: '',
|
|
401
413
|
displayOptions: {
|
|
402
414
|
show: {
|
|
@@ -404,7 +416,7 @@ class OptimaRestApi {
|
|
|
404
416
|
operation: ['updateKSeF'],
|
|
405
417
|
},
|
|
406
418
|
},
|
|
407
|
-
description: 'Numer obcy
|
|
419
|
+
description: 'Numer obcy (sprzedawcy) — dla ZAKUPÓW; użyj razem z NIP. Dla sprzedaży użyj Numer Pełny.',
|
|
408
420
|
},
|
|
409
421
|
{
|
|
410
422
|
displayName: 'NIP (Sprzedawcy)',
|
|
@@ -432,6 +444,19 @@ class OptimaRestApi {
|
|
|
432
444
|
},
|
|
433
445
|
description: 'Numer KSeF dokumentu. Puste = bez zmian.',
|
|
434
446
|
},
|
|
447
|
+
{
|
|
448
|
+
displayName: 'Numer Sesji',
|
|
449
|
+
name: 'numerSesji',
|
|
450
|
+
type: 'string',
|
|
451
|
+
default: '',
|
|
452
|
+
displayOptions: {
|
|
453
|
+
show: {
|
|
454
|
+
resource: ['document'],
|
|
455
|
+
operation: ['updateKSeF'],
|
|
456
|
+
},
|
|
457
|
+
},
|
|
458
|
+
description: 'Numer referencyjny sesji KSeF. Puste = bez zmian.',
|
|
459
|
+
},
|
|
435
460
|
{
|
|
436
461
|
displayName: 'Data Przyjęcia',
|
|
437
462
|
name: 'dataPrzyjecia',
|
|
@@ -939,18 +964,26 @@ class OptimaRestApi {
|
|
|
939
964
|
if (operation === 'updateKSeF') {
|
|
940
965
|
// Aktualizacja danych KSeF nagłówka po NumerObcy (+ opcjonalnie NIP sprzedawcy).
|
|
941
966
|
// Partial update: dołączamy tylko niepuste pola (pusty string = "bez zmian").
|
|
942
|
-
const
|
|
967
|
+
const numerPelny = this.getNodeParameter('numerPelny', i, '');
|
|
968
|
+
const numerObcy = this.getNodeParameter('numerObcy', i, '');
|
|
943
969
|
const nip = this.getNodeParameter('nip', i, '');
|
|
944
970
|
const nrKsef = this.getNodeParameter('nrKsef', i, '');
|
|
971
|
+
const numerSesji = this.getNodeParameter('numerSesji', i, '');
|
|
945
972
|
const dataPrzyjecia = this.getNodeParameter('dataPrzyjecia', i, '');
|
|
946
973
|
const formaPlatnosci = this.getNodeParameter('formaPlatnosci', i, '');
|
|
947
974
|
const srodowisko = this.getNodeParameter('srodowisko', i, '');
|
|
948
975
|
const linkWeryfikacyjny = this.getNodeParameter('linkWeryfikacyjny', i, '');
|
|
949
|
-
const body = {
|
|
976
|
+
const body = {};
|
|
977
|
+
if (numerPelny)
|
|
978
|
+
body.NumerPelny = numerPelny;
|
|
979
|
+
if (numerObcy)
|
|
980
|
+
body.NumerObcy = numerObcy;
|
|
950
981
|
if (nip)
|
|
951
982
|
body.Nip = nip;
|
|
952
983
|
if (nrKsef)
|
|
953
984
|
body.NrKsef = nrKsef;
|
|
985
|
+
if (numerSesji)
|
|
986
|
+
body.NumerSesji = numerSesji;
|
|
954
987
|
if (dataPrzyjecia)
|
|
955
988
|
body.DataPrzyjecia = dataPrzyjecia;
|
|
956
989
|
if (formaPlatnosci)
|