Utplukk
Utplukket fra FS skal hente summerte data fra fakturareskontropostering, med f?lgende valgte parametre:
- Buntnr
- Datointervall
- Status-f?rt-hovedbok (J/N)
- Oppdater FS (J/N)
Eksempel p? SQL:
SELECT bilagsnr, artnr, stednr, tiltaknr, dato, tekst, nvl(sum(belop_debet),0) - nvl(sum(belop_kredit),0) as belop, status_fort_hovedbok from fs.fakturareskontropostering where buntnr='F20201005' and to_char(dato,'yyyy-mm-dd')='2020-09-04' group by bilagsnr, artnr, stednr, tiltaknr, dato, tekst, status_fort_hovedbok order by 1,2,3;
Resultat
Svaret m? komme i json-format slik som andre FSWS-tjenester, men her er en tabell-versjon av dette som eksempel:
BILAGSNR ARTNR STEDNR TILTAKNR DATO TEKST BELOP STATUS_FORT_HOVEDBOK ---------- ---------- ---------- ---------- ---------- ---------------------------------- ---------- -------------------- 13168 1952 0 0 04.09.2020 31744218 Studentinnbet. ref. 840 J 13168 2998 366010 0 04.09.2020 31744218 Studentkrav ref. -600 J 13168 2999 366010 0 04.09.2020 31744218 Studentkrav ref. -40 J 13168 3208 366010 900141 04.09.2020 31744218 Studentkrav ref. -200 J 13170 1952 0 0 04.09.2020 31753887 Studentinnbet. ref. 840 J 13170 2998 366010 0 04.09.2020 31753887 Studentkrav ref. -600 J 13170 2999 366010 0 04.09.2020 31753887 Studentkrav ref. -40 J 13170 3208 366010 900141 04.09.2020 31753887 Studentkrav ref. -200 J 13193 1952 0 0 04.09.2020 8004122525 Studentinnbet. ref. 50480 J 13193 2998 366010 0 04.09.2020 8004122525 Studentkrav ref. -1200 J 13193 2999 366010 0 04.09.2020 8004122525 Studentkrav ref. -80 J 13193 3208 366010 900141 04.09.2020 8004122525 Studentkrav ref. -200 J 13193 3236 500000 990000 04.09.2020 8004122525 Studentkrav ref. -49000 J 13194 1952 0 0 04.09.2020 8004905277 Studentinnbet. ref. 49000 J 13194 3236 500000 990000 04.09.2020 8004905277 Studentkrav ref. -49000 J 13195 1502 366010 0 04.09.2020 8004990450 Ikke-plasserte bel?p -720 J 13195 1502 366010 0 04.09.2020 8004990450 Studentinnbet. ref. 100 J 13195 1952 0 0 04.09.2020 8004990450 Studentinnbet. ref. 1500 J 13195 2998 366010 0 04.09.2020 8004990450 Studentkrav ref. -600 J 13195 2999 366010 0 04.09.2020 8004990450 Studentkrav ref. -80 J 13195 3208 366010 900141 04.09.2020 8004990450 Studentkrav ref. -200 J
Oppdatering
Det m? v?re mulig ? oppdatere FS slik det er om n?r man kj?rer rutinen i klienten. Man b?r nok f? buntnr tilbake n?r dette gj?res.
Tillegg januar 2021:
- Vi trenger at flere felt fra tabellen leveres ut:
- kdim0
- kdim1
- kdim2
- kdim3
- kdim4
- kdim5
- kdim6
- Det er ogs? ?nskelig med mekanismer som validerer innholdet, som kan leveres som en del av svar/resultat. I prioritert rekkef?lge:
-
Summere negative bel?p i bunten/bunken og summere positive bel?p i bunten/bunken
- Telling av antall linjer i bunten.
- Summere bel?p i bunten p? kontoniv?.
-
Eksempel-json (levert til testing)
{ "buntnr": "F20201005", "bilagliste": [ { "bilagsnr": "1952", "artnr": 13168, "stednr": 0, "tiltaknr": 0, "dato": "04092020", "tekst": "31744218 Studentinnbet. ref.", "belop": 840, "statusforthovedbok": "J", "kdim0": null, "kdim1": null, "kdim2": null, "kdim3": null, "kdim4": null, "kdim5": null, "kdim6": null }, { "bilagsnr": "2998", "artnr": 13168, "stednr": 366010, "tiltaknr": 0, "dato": "04092020", "tekst": "31744218 Studentkrav ref.", "belop": -600, "statusforthovedbok": "J", "kdim0": null, "kdim1": null, "kdim2": null, "kdim3": null, "kdim4": null, "kdim5": null, "kdim6": null }, { "bilagsnr": "2999", "artnr": 13168, "stednr": 366010, "tiltaknr": 0, "dato": "04092020", "tekst": "31744218 Studentkrav ref.", "belop": -40, "statusforthovedbok": "J", "kdim0": null, "kdim1": null, "kdim2": null, "kdim3": null, "kdim4": null, "kdim5": null, "kdim6": null }, { "bilagsnr": "3208", "artnr": 13168, "stednr": 366010, "tiltaknr": 900141, "dato": "04092020", "tekst": "31744218 Studentkrav ref.", "belop": -200, "statusforthovedbok": "J", "kdim0": null, "kdim1": null, "kdim2": null, "kdim3": null, "kdim4": null, "kdim5": null, "kdim6": null }, { "bilagsnr": "1952", "artnr": 13170, "stednr": 0, "tiltaknr": 0, "dato": "04092020", "tekst": "31753887 Studentinnbet. ref.", "belop": 840, "statusforthovedbok": "J", "kdim0": null, "kdim1": null, "kdim2": null, "kdim3": null, "kdim4": null, "kdim5": null, "kdim6": null }, { "bilagsnr": "2998", "artnr": 13170, "stednr": 366010, "tiltaknr": 0, "dato": "04092020", "tekst": "31753887 Studentkrav ref.", "belop": -600, "statusforthovedbok": "J", "kdim0": null, "kdim1": null, "kdim2": null, "kdim3": null, "kdim4": null, "kdim5": null, "kdim6": null }, { "bilagsnr": "2999", "artnr": 13170, "stednr": 366010, "tiltaknr": 0, "dato": "04092020", "tekst": "31753887 Studentkrav ref.", "belop": -40, "statusforthovedbok": "J", "kdim0": null, "kdim1": null, "kdim2": null, "kdim3": null, "kdim4": null, "kdim5": null, "kdim6": null }, { "bilagsnr": "3208", "artnr": 13170, "stednr": 366010, "tiltaknr": 900141, "dato": "04092020", "tekst": "31753887 Studentkrav ref.", "belop": -200, "statusforthovedbok": "J", "kdim0": null, "kdim1": null, "kdim2": null, "kdim3": null, "kdim4": null, "kdim5": null, "kdim6": null }, { "bilagsnr": "1952", "artnr": 13193, "stednr": 0, "tiltaknr": 0, "dato": "04092020", "tekst": "8004122525 Studentinnbet. ref.", "belop": 50480, "statusforthovedbok": "J", "kdim0": null, "kdim1": null, "kdim2": null, "kdim3": null, "kdim4": null, "kdim5": null, "kdim6": null }, { "bilagsnr": "2998", "artnr": 13193, "stednr": 366010, "tiltaknr": 0, "dato": "04092020", "tekst": "8004122525 Studentkrav ref.", "belop": -1200, "statusforthovedbok": "J", "kdim0": null, "kdim1": null, "kdim2": null, "kdim3": null, "kdim4": null, "kdim5": null, "kdim6": null }, { "bilagsnr": "2999", "artnr": 13193, "stednr": 366010, "tiltaknr": 0, "dato": "04092020", "tekst": "8004122525 Studentkrav ref.", "belop": -80, "statusforthovedbok": "J", "kdim0": null, "kdim1": null, "kdim2": null, "kdim3": null, "kdim4": null, "kdim5": null, "kdim6": null }, { "bilagsnr": "3208", "artnr": 13193, "stednr": 366010, "tiltaknr": 900141, "dato": "04092020", "tekst": "8004122525 Studentkrav ref.", "belop": -200, "statusforthovedbok": "J", "kdim0": null, "kdim1": null, "kdim2": null, "kdim3": null, "kdim4": null, "kdim5": null, "kdim6": null }, { "bilagsnr": "3236", "artnr": 13193, "stednr": 500000, "tiltaknr": 990000, "dato": "04092020", "tekst": "8004122525 Studentkrav ref.", "belop": -49000, "statusforthovedbok": "J", "kdim0": null, "kdim1": null, "kdim2": null, "kdim3": null, "kdim4": null, "kdim5": null, "kdim6": null }, { "bilagsnr": "1952", "artnr": 13194, "stednr": 0, "tiltaknr": 0, "dato": "04092020", "tekst": "8004905277 Studentinnbet. ref.", "belop": 49000, "statusforthovedbok": "J", "kdim0": null, "kdim1": null, "kdim2": null, "kdim3": null, "kdim4": null, "kdim5": null, "kdim6": null }, { "bilagsnr": "3236", "artnr": 13194, "stednr": 500000, "tiltaknr": 990000, "dato": "04092020", "tekst": "8004905277 Studentkrav ref.", "belop": -49000, "statusforthovedbok": "J", "kdim0": null, "kdim1": null, "kdim2": null, "kdim3": null, "kdim4": null, "kdim5": null, "kdim6": null }, { "bilagsnr": "1502", "artnr": 13195, "stednr": 366010, "tiltaknr": 0, "dato": "04092020", "tekst": "8004990450 Ikke-plasserte bel?p", "belop": -720, "statusforthovedbok": "J", "kdim0": null, "kdim1": null, "kdim2": null, "kdim3": null, "kdim4": null, "kdim5": null, "kdim6": null }, { "bilagsnr": "1502", "artnr": 13195, "stednr": 366010, "tiltaknr": 0, "dato": "04092020", "tekst": "8004990450 Studentinnbet. ref.", "belop": 100, "statusforthovedbok": "J", "kdim0": null, "kdim1": null, "kdim2": null, "kdim3": null, "kdim4": null, "kdim5": null, "kdim6": null }, { "bilagsnr": "1952", "artnr": 13195, "stednr": 0, "tiltaknr": 0, "dato": "04092020", "tekst": "8004990450 Studentinnbet. ref.", "belop": 1500, "statusforthovedbok": "J", "kdim0": null, "kdim1": null, "kdim2": null, "kdim3": null, "kdim4": null, "kdim5": null, "kdim6": null }, { "bilagsnr": "2998", "artnr": 13195, "stednr": 366010, "tiltaknr": 0, "dato": "04092020", "tekst": "8004990450 Studentkrav ref.", "belop": -600, "statusforthovedbok": "J", "kdim0": null, "kdim1": null, "kdim2": null, "kdim3": null, "kdim4": null, "kdim5": null, "kdim6": null }, { "bilagsnr": "2999", "artnr": 13195, "stednr": 366010, "tiltaknr": 0, "dato": "04092020", "tekst": "8004990450 Studentkrav ref.", "belop": -80, "statusforthovedbok": "J", "kdim0": null, "kdim1": null, "kdim2": null, "kdim3": null, "kdim4": null, "kdim5": null, "kdim6": null }, { "bilagsnr": "3208", "artnr": 13195, "stednr": 366010, "tiltaknr": 900141, "dato": "04092020", "tekst": "8004990450 Studentkrav ref.", "belop": -200, "statusforthovedbok": "J", "kdim0": null, "kdim1": null, "kdim2": null, "kdim3": null, "kdim4": null, "kdim5": null, "kdim6": null } ] }