cry-klikvet-logic 1.0.190 → 1.0.192

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.
Files changed (658) hide show
  1. package/dist/CRP_VAKCINE.d.mts +7 -0
  2. package/dist/CRP_VAKCINE.d.mts.map +1 -0
  3. package/dist/CRP_VAKCINE.mjs +15 -0
  4. package/dist/CRP_VAKCINE.mjs.map +1 -0
  5. package/dist/IPV.d.mts +4 -0
  6. package/dist/IPV.d.mts.map +1 -0
  7. package/dist/IPV.mjs +7 -0
  8. package/dist/IPV.mjs.map +1 -0
  9. package/dist/ObjectId.d.mts +4 -0
  10. package/dist/ObjectId.d.mts.map +1 -0
  11. package/dist/ObjectId.mjs +4 -0
  12. package/dist/ObjectId.mjs.map +1 -0
  13. package/dist/aliRazknjizujemoNaLokaciji.d.mts +9 -0
  14. package/dist/aliRazknjizujemoNaLokaciji.d.mts.map +1 -0
  15. package/dist/aliRazknjizujemoNaLokaciji.mjs +22 -0
  16. package/dist/aliRazknjizujemoNaLokaciji.mjs.map +1 -0
  17. package/dist/anonimizirajPodatke.d.mts +6 -0
  18. package/dist/anonimizirajPodatke.d.mts.map +1 -0
  19. package/dist/anonimizirajPodatke.mjs +510 -0
  20. package/dist/anonimizirajPodatke.mjs.map +1 -0
  21. package/dist/besediloKarence.d.mts +51 -0
  22. package/dist/besediloKarence.d.mts.map +1 -0
  23. package/dist/besediloKarence.mjs +210 -0
  24. package/dist/besediloKarence.mjs.map +1 -0
  25. package/dist/calcTimeQuery.d.mts +2 -0
  26. package/dist/calcTimeQuery.d.mts.map +1 -0
  27. package/dist/calcTimeQuery.mjs +14 -0
  28. package/dist/calcTimeQuery.mjs.map +1 -0
  29. package/dist/certs.d.mts +13 -0
  30. package/dist/certs.d.mts.map +1 -0
  31. package/dist/certs.mjs +31 -0
  32. package/dist/certs.mjs.map +1 -0
  33. package/dist/collectionZalogeNaDan.d.mts +2 -0
  34. package/dist/collectionZalogeNaDan.d.mts.map +1 -0
  35. package/dist/collectionZalogeNaDan.mjs +4 -0
  36. package/dist/collectionZalogeNaDan.mjs.map +1 -0
  37. package/dist/davki.d.mts +7 -0
  38. package/dist/davki.d.mts.map +1 -0
  39. package/dist/davki.mjs +15 -0
  40. package/dist/davki.mjs.map +1 -0
  41. package/dist/davkiRacuna.d.mts +3 -0
  42. package/dist/davkiRacuna.d.mts.map +1 -0
  43. package/dist/davkiRacuna.mjs +23 -0
  44. package/dist/davkiRacuna.mjs.map +1 -0
  45. package/dist/dayjs.d.mts +3 -0
  46. package/dist/dayjs.d.mts.map +1 -0
  47. package/dist/dayjs.mjs +5 -0
  48. package/dist/dayjs.mjs.map +1 -0
  49. package/dist/ensureIndexes.d.mts +4 -0
  50. package/dist/ensureIndexes.d.mts.map +1 -0
  51. package/dist/ensureIndexes.mjs +164 -0
  52. package/dist/ensureIndexes.mjs.map +1 -0
  53. package/dist/idjiArtiklovKiImajoLahkoZalogo.d.mts +2 -0
  54. package/dist/idjiArtiklovKiImajoLahkoZalogo.d.mts.map +1 -0
  55. package/dist/idjiArtiklovKiImajoLahkoZalogo.mjs +16 -0
  56. package/dist/idjiArtiklovKiImajoLahkoZalogo.mjs.map +1 -0
  57. package/dist/index.d.mts +138 -0
  58. package/dist/index.d.mts.map +1 -0
  59. package/dist/index.mjs +105 -0
  60. package/dist/index.mjs.map +1 -0
  61. package/dist/isEmso.d.mts +2 -0
  62. package/dist/isEmso.d.mts.map +1 -0
  63. package/dist/isEmso.mjs +15 -0
  64. package/dist/isEmso.mjs.map +1 -0
  65. package/dist/isSIVAT.d.mts +2 -0
  66. package/dist/isSIVAT.d.mts.map +1 -0
  67. package/dist/isSIVAT.mjs +31 -0
  68. package/dist/isSIVAT.mjs.map +1 -0
  69. package/dist/izracunajNovoMaloprodajnoCeno.d.mts +5 -0
  70. package/dist/izracunajNovoMaloprodajnoCeno.d.mts.map +1 -0
  71. package/dist/izracunajNovoMaloprodajnoCeno.mjs +24 -0
  72. package/dist/izracunajNovoMaloprodajnoCeno.mjs.map +1 -0
  73. package/dist/karticaArtikla.d.mts +24 -0
  74. package/dist/karticaArtikla.d.mts.map +1 -0
  75. package/dist/karticaArtikla.mjs +195 -0
  76. package/dist/karticaArtikla.mjs.map +1 -0
  77. package/dist/koledar.d.mts +13 -0
  78. package/dist/koledar.d.mts.map +1 -0
  79. package/dist/koledar.mjs +34 -0
  80. package/dist/koledar.mjs.map +1 -0
  81. package/dist/lahkoImaZalogo.d.mts +4 -0
  82. package/dist/lahkoImaZalogo.d.mts.map +1 -0
  83. package/dist/lahkoImaZalogo.mjs +20 -0
  84. package/dist/lahkoImaZalogo.mjs.map +1 -0
  85. package/dist/maint/nastaviNbcArtiklomIzMpc.d.mts +3 -0
  86. package/dist/maint/nastaviNbcArtiklomIzMpc.d.mts.map +1 -0
  87. package/dist/maint/nastaviNbcArtiklomIzMpc.mjs +39 -0
  88. package/dist/maint/nastaviNbcArtiklomIzMpc.mjs.map +1 -0
  89. package/dist/maint/poisciNapakeVSpremembiZaloge.d.mts +2 -0
  90. package/dist/maint/poisciNapakeVSpremembiZaloge.d.mts.map +1 -0
  91. package/dist/maint/poisciNapakeVSpremembiZaloge.mjs +62 -0
  92. package/dist/maint/poisciNapakeVSpremembiZaloge.mjs.map +1 -0
  93. package/dist/maint/poknjiziVsoZgodovino.d.mts +55 -0
  94. package/dist/maint/poknjiziVsoZgodovino.d.mts.map +1 -0
  95. package/dist/maint/poknjiziVsoZgodovino.mjs +271 -0
  96. package/dist/maint/poknjiziVsoZgodovino.mjs.map +1 -0
  97. package/dist/maint/popraviNabaveCeneNaRacunih.d.mts +6 -0
  98. package/dist/maint/popraviNabaveCeneNaRacunih.d.mts.map +1 -0
  99. package/dist/maint/popraviNabaveCeneNaRacunih.mjs +42 -0
  100. package/dist/maint/popraviNabaveCeneNaRacunih.mjs.map +1 -0
  101. package/dist/maint/popraviNabavneCeneNaInventurah.d.mts +3 -0
  102. package/dist/maint/popraviNabavneCeneNaInventurah.d.mts.map +1 -0
  103. package/dist/maint/popraviNabavneCeneNaInventurah.mjs +26 -0
  104. package/dist/maint/popraviNabavneCeneNaInventurah.mjs.map +1 -0
  105. package/dist/models/Serijske.d.mts +22 -0
  106. package/dist/models/Serijske.d.mts.map +1 -0
  107. package/dist/models/Serijske.mjs +3 -0
  108. package/dist/models/Serijske.mjs.map +1 -0
  109. package/dist/models/SmsOddaja.d.mts +15 -0
  110. package/dist/models/SmsOddaja.d.mts.map +1 -0
  111. package/dist/models/SmsOddaja.mjs +2 -0
  112. package/dist/models/SmsOddaja.mjs.map +1 -0
  113. package/dist/models/kodaPopusta.d.mts +9 -0
  114. package/dist/models/kodaPopusta.d.mts.map +1 -0
  115. package/dist/models/kodaPopusta.mjs +2 -0
  116. package/dist/models/kodaPopusta.mjs.map +1 -0
  117. package/dist/naslednjaCepljenjaPacientaPoVrstah.d.mts +8 -0
  118. package/dist/naslednjaCepljenjaPacientaPoVrstah.d.mts.map +1 -0
  119. package/dist/naslednjaCepljenjaPacientaPoVrstah.mjs +28 -0
  120. package/dist/naslednjaCepljenjaPacientaPoVrstah.mjs.map +1 -0
  121. package/dist/nazivStranke.d.mts +4 -0
  122. package/dist/nazivStranke.d.mts.map +1 -0
  123. package/dist/nazivStranke.mjs +11 -0
  124. package/dist/nazivStranke.mjs.map +1 -0
  125. package/dist/neuporabljeno.d.mts +5 -0
  126. package/dist/neuporabljeno.d.mts.map +1 -0
  127. package/dist/neuporabljeno.mjs +35 -0
  128. package/dist/neuporabljeno.mjs.map +1 -0
  129. package/dist/pobrisiZgodovinoNaDan.d.mts +3 -0
  130. package/dist/pobrisiZgodovinoNaDan.d.mts.map +1 -0
  131. package/dist/pobrisiZgodovinoNaDan.mjs +19 -0
  132. package/dist/pobrisiZgodovinoNaDan.mjs.map +1 -0
  133. package/dist/podatkiRejca.d.mts +67 -0
  134. package/dist/podatkiRejca.d.mts.map +1 -0
  135. package/dist/podatkiRejca.mjs +139 -0
  136. package/dist/podatkiRejca.mjs.map +1 -0
  137. package/dist/polnaInventura.d.mts +5 -0
  138. package/dist/polnaInventura.d.mts.map +1 -0
  139. package/dist/polnaInventura.mjs +135 -0
  140. package/dist/polnaInventura.mjs.map +1 -0
  141. package/dist/porabaZaDobavnico.d.mts +26 -0
  142. package/dist/porabaZaDobavnico.d.mts.map +1 -0
  143. package/dist/porabaZaDobavnico.mjs +122 -0
  144. package/dist/porabaZaDobavnico.mjs.map +1 -0
  145. package/dist/porabaZaObravnavo.d.mts +11 -0
  146. package/dist/porabaZaObravnavo.d.mts.map +1 -0
  147. package/dist/porabaZaObravnavo.mjs +98 -0
  148. package/dist/porabaZaObravnavo.mjs.map +1 -0
  149. package/dist/preracunajPostavkoBlagovnice.d.mts +25 -0
  150. package/dist/preracunajPostavkoBlagovnice.d.mts.map +1 -0
  151. package/dist/preracunajPostavkoBlagovnice.mjs +46 -0
  152. package/dist/preracunajPostavkoBlagovnice.mjs.map +1 -0
  153. package/dist/preracunajZalogo.d.mts +117 -0
  154. package/dist/preracunajZalogo.d.mts.map +1 -0
  155. package/dist/preracunajZalogo.mjs +104 -0
  156. package/dist/preracunajZalogo.mjs.map +1 -0
  157. package/dist/preveriKnjizenjeZalogeArtikla.d.mts +42 -0
  158. package/dist/preveriKnjizenjeZalogeArtikla.d.mts.map +1 -0
  159. package/dist/preveriKnjizenjeZalogeArtikla.mjs +130 -0
  160. package/dist/preveriKnjizenjeZalogeArtikla.mjs.map +1 -0
  161. package/dist/prisotnostOsebe.d.mts +14 -0
  162. package/dist/prisotnostOsebe.d.mts.map +1 -0
  163. package/dist/prisotnostOsebe.mjs +2 -0
  164. package/dist/prisotnostOsebe.mjs.map +1 -0
  165. package/dist/q-blagovnice.d.mts +10 -0
  166. package/dist/q-blagovnice.d.mts.map +1 -0
  167. package/dist/q-blagovnice.mjs +25 -0
  168. package/dist/q-blagovnice.mjs.map +1 -0
  169. package/dist/q-isciPoObravnavah.d.mts +35 -0
  170. package/dist/q-isciPoObravnavah.d.mts.map +1 -0
  171. package/dist/q-isciPoObravnavah.mjs +130 -0
  172. package/dist/q-isciPoObravnavah.mjs.map +1 -0
  173. package/dist/q-isciPoRacunih.d.mts +165 -0
  174. package/dist/q-isciPoRacunih.d.mts.map +1 -0
  175. package/dist/q-isciPoRacunih.mjs +153 -0
  176. package/dist/q-isciPoRacunih.mjs.map +1 -0
  177. package/dist/q-mojPromet.d.mts +26 -0
  178. package/dist/q-mojPromet.d.mts.map +1 -0
  179. package/dist/q-mojPromet.mjs +163 -0
  180. package/dist/q-mojPromet.mjs.map +1 -0
  181. package/dist/q-porabaZdravil.d.mts +33 -0
  182. package/dist/q-porabaZdravil.d.mts.map +1 -0
  183. package/dist/q-porabaZdravil.mjs +180 -0
  184. package/dist/q-porabaZdravil.mjs.map +1 -0
  185. package/dist/q-prodano.d.mts +27 -0
  186. package/dist/q-prodano.d.mts.map +1 -0
  187. package/dist/q-prodano.mjs +116 -0
  188. package/dist/q-prodano.mjs.map +1 -0
  189. package/dist/q-prodanoPorabljeno.d.mts +13 -0
  190. package/dist/q-prodanoPorabljeno.d.mts.map +1 -0
  191. package/dist/q-prodanoPorabljeno.mjs +70 -0
  192. package/dist/q-prodanoPorabljeno.mjs.map +1 -0
  193. package/dist/q-promet.d.mts +93 -0
  194. package/dist/q-promet.d.mts.map +1 -0
  195. package/dist/q-promet.mjs +374 -0
  196. package/dist/q-promet.mjs.map +1 -0
  197. package/dist/q-racunovodji.d.mts +37 -0
  198. package/dist/q-racunovodji.d.mts.map +1 -0
  199. package/dist/q-racunovodji.mjs +288 -0
  200. package/dist/q-racunovodji.mjs.map +1 -0
  201. package/dist/q-skupineIzdelkov.d.mts +12 -0
  202. package/dist/q-skupineIzdelkov.d.mts.map +1 -0
  203. package/dist/q-skupineIzdelkov.mjs +55 -0
  204. package/dist/q-skupineIzdelkov.mjs.map +1 -0
  205. package/dist/q-skupineStrank.d.mts +12 -0
  206. package/dist/q-skupineStrank.d.mts.map +1 -0
  207. package/dist/q-skupineStrank.mjs +55 -0
  208. package/dist/q-skupineStrank.mjs.map +1 -0
  209. package/dist/q-strankeKlasificiraj.d.mts +7 -0
  210. package/dist/q-strankeKlasificiraj.d.mts.map +1 -0
  211. package/dist/q-strankeKlasificiraj.mjs +74 -0
  212. package/dist/q-strankeKlasificiraj.mjs.map +1 -0
  213. package/dist/q-strankeZadnjiObiski.d.mts +6 -0
  214. package/dist/q-strankeZadnjiObiski.d.mts.map +1 -0
  215. package/dist/q-strankeZadnjiObiski.mjs +35 -0
  216. package/dist/q-strankeZadnjiObiski.mjs.map +1 -0
  217. package/dist/q-zakljucek-blagajne.d.mts +50 -0
  218. package/dist/q-zakljucek-blagajne.d.mts.map +1 -0
  219. package/dist/q-zakljucek-blagajne.mjs +278 -0
  220. package/dist/q-zakljucek-blagajne.mjs.map +1 -0
  221. package/dist/razknjiziBlagovnico.d.mts +4 -0
  222. package/dist/razknjiziBlagovnico.d.mts.map +1 -0
  223. package/dist/razknjiziBlagovnico.mjs +64 -0
  224. package/dist/razknjiziBlagovnico.mjs.map +1 -0
  225. package/dist/razknjiziDobavnico.d.mts +4 -0
  226. package/dist/razknjiziDobavnico.d.mts.map +1 -0
  227. package/dist/razknjiziDobavnico.mjs +64 -0
  228. package/dist/razknjiziDobavnico.mjs.map +1 -0
  229. package/dist/razpisiDatum.d.mts +17 -0
  230. package/dist/razpisiDatum.d.mts.map +1 -0
  231. package/dist/razpisiDatum.mjs +52 -0
  232. package/dist/razpisiDatum.mjs.map +1 -0
  233. package/dist/round.d.mts +3 -0
  234. package/dist/round.d.mts.map +1 -0
  235. package/dist/round.mjs +3 -0
  236. package/dist/round.mjs.map +1 -0
  237. package/dist/serije.d.mts +101 -0
  238. package/dist/serije.d.mts.map +1 -0
  239. package/dist/serije.mjs +212 -0
  240. package/dist/serije.mjs.map +1 -0
  241. package/dist/sestaviNaslov.d.mts +4 -0
  242. package/dist/sestaviNaslov.d.mts.map +1 -0
  243. package/dist/sestaviNaslov.mjs +17 -0
  244. package/dist/sestaviNaslov.mjs.map +1 -0
  245. package/dist/sestevkiBlagovniceRazenDobave.d.ts +9 -0
  246. package/dist/sestevkiBlagovniceRazenDobave.d.ts.map +1 -0
  247. package/dist/sestevkiBlagovniceRazenDobave.js +5 -0
  248. package/dist/sestevkiBlagovniceRazenDobave.js.map +1 -0
  249. package/dist/skladisceLokacije.d.mts +4 -0
  250. package/dist/skladisceLokacije.d.mts.map +1 -0
  251. package/dist/skladisceLokacije.mjs +12 -0
  252. package/dist/skladisceLokacije.mjs.map +1 -0
  253. package/dist/smsCepljen.d.mts +25 -0
  254. package/dist/smsCepljen.d.mts.map +1 -0
  255. package/dist/smsCepljen.mjs +27 -0
  256. package/dist/smsCepljen.mjs.map +1 -0
  257. package/dist/smsCepljenjaNaDan.d.mts +25 -0
  258. package/dist/smsCepljenjaNaDan.d.mts.map +1 -0
  259. package/dist/smsCepljenjaNaDan.mjs +84 -0
  260. package/dist/smsCepljenjaNaDan.mjs.map +1 -0
  261. package/dist/smsCepljenjeBesedilo.d.mts +18 -0
  262. package/dist/smsCepljenjeBesedilo.d.mts.map +1 -0
  263. package/dist/smsCepljenjeBesedilo.mjs +11 -0
  264. package/dist/smsCepljenjeBesedilo.mjs.map +1 -0
  265. package/dist/smsMenjave.d.mts +12 -0
  266. package/dist/smsMenjave.d.mts.map +1 -0
  267. package/dist/smsMenjave.mjs +16 -0
  268. package/dist/smsMenjave.mjs.map +1 -0
  269. package/dist/smsNarocen.d.mts +24 -0
  270. package/dist/smsNarocen.d.mts.map +1 -0
  271. package/dist/smsNarocen.mjs +26 -0
  272. package/dist/smsNarocen.mjs.map +1 -0
  273. package/dist/smsNarocenBesedilo.d.mts +18 -0
  274. package/dist/smsNarocenBesedilo.d.mts.map +1 -0
  275. package/dist/smsNarocenBesedilo.mjs +13 -0
  276. package/dist/smsNarocenBesedilo.mjs.map +1 -0
  277. package/dist/smsNaroceniNaDan.d.mts +22 -0
  278. package/dist/smsNaroceniNaDan.d.mts.map +1 -0
  279. package/dist/smsNaroceniNaDan.mjs +60 -0
  280. package/dist/smsNaroceniNaDan.mjs.map +1 -0
  281. package/dist/spremembaZalogeZaObdobje.d.mts +19 -0
  282. package/dist/spremembaZalogeZaObdobje.d.mts.map +1 -0
  283. package/dist/spremembaZalogeZaObdobje.mjs +103 -0
  284. package/dist/spremembaZalogeZaObdobje.mjs.map +1 -0
  285. package/dist/spremeniZalogo.d.mts +45 -0
  286. package/dist/spremeniZalogo.d.mts.map +1 -0
  287. package/dist/spremeniZalogo.mjs +178 -0
  288. package/dist/spremeniZalogo.mjs.map +1 -0
  289. package/dist/spremeniZalogoNaPodlagiRacuna.d.mts +5 -0
  290. package/dist/spremeniZalogoNaPodlagiRacuna.d.mts.map +1 -0
  291. package/dist/spremeniZalogoNaPodlagiRacuna.mjs +151 -0
  292. package/dist/spremeniZalogoNaPodlagiRacuna.mjs.map +1 -0
  293. package/dist/spremeniZalogoZaDobavo.d.mts +5 -0
  294. package/dist/spremeniZalogoZaDobavo.d.mts.map +1 -0
  295. package/dist/spremeniZalogoZaDobavo.mjs +243 -0
  296. package/dist/spremeniZalogoZaDobavo.mjs.map +1 -0
  297. package/dist/spremeniZalogoZaInventuro.d.mts +5 -0
  298. package/dist/spremeniZalogoZaInventuro.d.mts.map +1 -0
  299. package/dist/spremeniZalogoZaInventuro.mjs +136 -0
  300. package/dist/spremeniZalogoZaInventuro.mjs.map +1 -0
  301. package/dist/spremeniZalogoZaPorabo.d.mts +6 -0
  302. package/dist/spremeniZalogoZaPorabo.d.mts.map +1 -0
  303. package/dist/spremeniZalogoZaPorabo.mjs +73 -0
  304. package/dist/spremeniZalogoZaPorabo.mjs.map +1 -0
  305. package/dist/spremeniZalogoZaPrenos.d.mts +5 -0
  306. package/dist/spremeniZalogoZaPrenos.d.mts.map +1 -0
  307. package/dist/spremeniZalogoZaPrenos.mjs +95 -0
  308. package/dist/spremeniZalogoZaPrenos.mjs.map +1 -0
  309. package/dist/statusReprodukcije.d.mts +3 -0
  310. package/dist/statusReprodukcije.d.mts.map +1 -0
  311. package/dist/statusReprodukcije.mjs +14 -0
  312. package/dist/statusReprodukcije.mjs.map +1 -0
  313. package/dist/strankaInfo.d.mts +11 -0
  314. package/dist/strankaInfo.d.mts.map +1 -0
  315. package/dist/strankaInfo.mjs +21 -0
  316. package/dist/strankaInfo.mjs.map +1 -0
  317. package/dist/strankaRacuna.d.mts +33 -0
  318. package/dist/strankaRacuna.d.mts.map +1 -0
  319. package/dist/strankaRacuna.mjs +22 -0
  320. package/dist/strankaRacuna.mjs.map +1 -0
  321. package/dist/support/poisciSpremembeMpc.d.ts +11 -0
  322. package/dist/support/poisciSpremembeMpc.d.ts.map +1 -0
  323. package/dist/support/poisciSpremembeMpc.js +50 -0
  324. package/dist/support/poisciSpremembeMpc.js.map +1 -0
  325. package/dist/test/dvojne-dobave.d.mts +2 -0
  326. package/dist/test/dvojne-dobave.d.mts.map +1 -0
  327. package/dist/test/dvojne-dobave.mjs +157 -0
  328. package/dist/test/dvojne-dobave.mjs.map +1 -0
  329. package/dist/test/memdb.d.mts +2 -0
  330. package/dist/test/memdb.d.mts.map +1 -0
  331. package/dist/test/memdb.mjs +36 -0
  332. package/dist/test/memdb.mjs.map +1 -0
  333. package/dist/test/mesane-enote.d.mts +2 -0
  334. package/dist/test/mesane-enote.d.mts.map +1 -0
  335. package/dist/test/mesane-enote.mjs +66 -0
  336. package/dist/test/mesane-enote.mjs.map +1 -0
  337. package/dist/test/prestavitev.d.mts +2 -0
  338. package/dist/test/prestavitev.d.mts.map +1 -0
  339. package/dist/test/prestavitev.mjs +125 -0
  340. package/dist/test/prestavitev.mjs.map +1 -0
  341. package/dist/test/serijske.d.mts +2 -0
  342. package/dist/test/serijske.d.mts.map +1 -0
  343. package/dist/test/serijske.mjs +323 -0
  344. package/dist/test/serijske.mjs.map +1 -0
  345. package/dist/test/sprememba-cene.d.mts +2 -0
  346. package/dist/test/sprememba-cene.d.mts.map +1 -0
  347. package/dist/test/sprememba-cene.mjs +223 -0
  348. package/dist/test/sprememba-cene.mjs.map +1 -0
  349. package/dist/test/sprememba-cene2.d.mts +2 -0
  350. package/dist/test/sprememba-cene2.d.mts.map +1 -0
  351. package/dist/test/sprememba-cene2.mjs +147 -0
  352. package/dist/test/sprememba-cene2.mjs.map +1 -0
  353. package/dist/test/sprememba-cene3.d.mts +2 -0
  354. package/dist/test/sprememba-cene3.d.mts.map +1 -0
  355. package/dist/test/sprememba-cene3.mjs +148 -0
  356. package/dist/test/sprememba-cene3.mjs.map +1 -0
  357. package/dist/test/sprememba-cene4.d.mts +2 -0
  358. package/dist/test/sprememba-cene4.d.mts.map +1 -0
  359. package/dist/test/sprememba-cene4.mjs +110 -0
  360. package/dist/test/sprememba-cene4.mjs.map +1 -0
  361. package/dist/test/sprememba-cene5.d.mts +2 -0
  362. package/dist/test/sprememba-cene5.d.mts.map +1 -0
  363. package/dist/test/sprememba-cene5.mjs +117 -0
  364. package/dist/test/sprememba-cene5.mjs.map +1 -0
  365. package/dist/test/sprememba-cene6.d.mts +2 -0
  366. package/dist/test/sprememba-cene6.d.mts.map +1 -0
  367. package/dist/test/sprememba-cene6.mjs +151 -0
  368. package/dist/test/sprememba-cene6.mjs.map +1 -0
  369. package/dist/test/tuja-zaloga.d.mts +2 -0
  370. package/dist/test/tuja-zaloga.d.mts.map +1 -0
  371. package/dist/test/tuja-zaloga.mjs +126 -0
  372. package/dist/test/tuja-zaloga.mjs.map +1 -0
  373. package/dist/test/zaloge.d.mts +2 -0
  374. package/dist/test/zaloge.d.mts.map +1 -0
  375. package/dist/test/zaloge.mjs +160 -0
  376. package/dist/test/zaloge.mjs.map +1 -0
  377. package/dist/test/zaloge2.d.mts +2 -0
  378. package/dist/test/zaloge2.d.mts.map +1 -0
  379. package/dist/test/zaloge2.mjs +179 -0
  380. package/dist/test/zaloge2.mjs.map +1 -0
  381. package/dist/types/CommandForDevice.d.mts +14 -0
  382. package/dist/types/CommandForDevice.d.mts.map +1 -0
  383. package/dist/types/CommandForDevice.mjs +2 -0
  384. package/dist/types/CommandForDevice.mjs.map +1 -0
  385. package/dist/types/Dobavnica.d.mts +61 -0
  386. package/dist/types/Dobavnica.d.mts.map +1 -0
  387. package/dist/types/Dobavnica.mjs +2 -0
  388. package/dist/types/Dobavnica.mjs.map +1 -0
  389. package/dist/types/GlavaDokumenta.d.mts +9 -0
  390. package/dist/types/GlavaDokumenta.d.mts.map +1 -0
  391. package/dist/types/GlavaDokumenta.mjs +2 -0
  392. package/dist/types/GlavaDokumenta.mjs.map +1 -0
  393. package/dist/types/MoznostiIzpisaObiska.d.ts +3 -0
  394. package/dist/types/MoznostiIzpisaObiska.d.ts.map +1 -0
  395. package/dist/types/MoznostiIzpisaObiska.js +2 -0
  396. package/dist/types/MoznostiIzpisaObiska.js.map +1 -0
  397. package/dist/types/NamenObravnave.d.mts +8 -0
  398. package/dist/types/NamenObravnave.d.mts.map +1 -0
  399. package/dist/types/NamenObravnave.mjs +2 -0
  400. package/dist/types/NamenObravnave.mjs.map +1 -0
  401. package/dist/types/Obvestilo.d.mts +35 -0
  402. package/dist/types/Obvestilo.d.mts.map +1 -0
  403. package/dist/types/Obvestilo.mjs +2 -0
  404. package/dist/types/Obvestilo.mjs.map +1 -0
  405. package/dist/types/SpecifikacijaNeuporabljenega.d.mts +8 -0
  406. package/dist/types/SpecifikacijaNeuporabljenega.d.mts.map +1 -0
  407. package/dist/types/SpecifikacijaNeuporabljenega.mjs +2 -0
  408. package/dist/types/SpecifikacijaNeuporabljenega.mjs.map +1 -0
  409. package/dist/types/SpecifikacijaPolneInventure.d.mts +12 -0
  410. package/dist/types/SpecifikacijaPolneInventure.d.mts.map +1 -0
  411. package/dist/types/SpecifikacijaPolneInventure.mjs +2 -0
  412. package/dist/types/SpecifikacijaPolneInventure.mjs.map +1 -0
  413. package/dist/types/SpremembaCene.d.mts +15 -0
  414. package/dist/types/SpremembaCene.d.mts.map +1 -0
  415. package/dist/types/SpremembaCene.mjs +2 -0
  416. package/dist/types/SpremembaCene.mjs.map +1 -0
  417. package/dist/types/VrstaRazknjizbeZdravila.d.mts +2 -0
  418. package/dist/types/VrstaRazknjizbeZdravila.d.mts.map +1 -0
  419. package/dist/types/VrstaRazknjizbeZdravila.mjs +2 -0
  420. package/dist/types/VrstaRazknjizbeZdravila.mjs.map +1 -0
  421. package/dist/types/VrstaSpremembeZaloge.d.mts +6 -0
  422. package/dist/types/VrstaSpremembeZaloge.d.mts.map +1 -0
  423. package/dist/types/VrstaSpremembeZaloge.mjs +2 -0
  424. package/dist/types/VrstaSpremembeZaloge.mjs.map +1 -0
  425. package/dist/types/VrsteDokumentov.d.mts +9 -0
  426. package/dist/types/VrsteDokumentov.d.mts.map +1 -0
  427. package/dist/types/VrsteDokumentov.mjs +3 -0
  428. package/dist/types/VrsteDokumentov.mjs.map +1 -0
  429. package/dist/types/ZalogaDbAccessor.d.mts +36 -0
  430. package/dist/types/ZalogaDbAccessor.d.mts.map +1 -0
  431. package/dist/types/ZalogaDbAccessor.mjs +2 -0
  432. package/dist/types/ZalogaDbAccessor.mjs.map +1 -0
  433. package/dist/types/artikel.d.mts +95 -0
  434. package/dist/types/artikel.d.mts.map +1 -0
  435. package/dist/types/artikel.mjs +34 -0
  436. package/dist/types/artikel.mjs.map +1 -0
  437. package/dist/types/blagajna.d.mts +24 -0
  438. package/dist/types/blagajna.d.mts.map +1 -0
  439. package/dist/types/blagajna.mjs +2 -0
  440. package/dist/types/blagajna.mjs.map +1 -0
  441. package/dist/types/blagovnica.d.mts +138 -0
  442. package/dist/types/blagovnica.d.mts.map +1 -0
  443. package/dist/types/blagovnica.mjs +2 -0
  444. package/dist/types/blagovnica.mjs.map +1 -0
  445. package/dist/types/cepljenje.d.mts +40 -0
  446. package/dist/types/cepljenje.d.mts.map +1 -0
  447. package/dist/types/cepljenje.mjs +2 -0
  448. package/dist/types/cepljenje.mjs.map +1 -0
  449. package/dist/types/diagnoza.d.mts +6 -0
  450. package/dist/types/diagnoza.d.mts.map +1 -0
  451. package/dist/types/diagnoza.mjs +2 -0
  452. package/dist/types/diagnoza.mjs.map +1 -0
  453. package/dist/types/enota.d.mts +14 -0
  454. package/dist/types/enota.d.mts.map +1 -0
  455. package/dist/types/enota.mjs +9 -0
  456. package/dist/types/enota.mjs.map +1 -0
  457. package/dist/types/karence.d.mts +26 -0
  458. package/dist/types/karence.d.mts.map +1 -0
  459. package/dist/types/karence.mjs +13 -0
  460. package/dist/types/karence.mjs.map +1 -0
  461. package/dist/types/lokacija.d.mts +17 -0
  462. package/dist/types/lokacija.d.mts.map +1 -0
  463. package/dist/types/lokacija.mjs +2 -0
  464. package/dist/types/lokacija.mjs.map +1 -0
  465. package/dist/types/nalepka.d.mts +24 -0
  466. package/dist/types/nalepka.d.mts.map +1 -0
  467. package/dist/types/nalepka.mjs +2 -0
  468. package/dist/types/nalepka.mjs.map +1 -0
  469. package/dist/types/naprava.d.mts +29 -0
  470. package/dist/types/naprava.d.mts.map +1 -0
  471. package/dist/types/naprava.mjs +2 -0
  472. package/dist/types/naprava.mjs.map +1 -0
  473. package/dist/types/narocen.d.mts +28 -0
  474. package/dist/types/narocen.d.mts.map +1 -0
  475. package/dist/types/narocen.mjs +2 -0
  476. package/dist/types/narocen.mjs.map +1 -0
  477. package/dist/types/naslov.d.mts +11 -0
  478. package/dist/types/naslov.d.mts.map +1 -0
  479. package/dist/types/naslov.mjs +2 -0
  480. package/dist/types/naslov.mjs.map +1 -0
  481. package/dist/types/nastavitve.d.mts +171 -0
  482. package/dist/types/nastavitve.d.mts.map +1 -0
  483. package/dist/types/nastavitve.mjs +2 -0
  484. package/dist/types/nastavitve.mjs.map +1 -0
  485. package/dist/types/obravnava.d.mts +95 -0
  486. package/dist/types/obravnava.d.mts.map +1 -0
  487. package/dist/types/obravnava.mjs +10 -0
  488. package/dist/types/obravnava.mjs.map +1 -0
  489. package/dist/types/oddajaGotovine.d.mts +21 -0
  490. package/dist/types/oddajaGotovine.d.mts.map +1 -0
  491. package/dist/types/oddajaGotovine.mjs +2 -0
  492. package/dist/types/oddajaGotovine.mjs.map +1 -0
  493. package/dist/types/pacient.d.mts +38 -0
  494. package/dist/types/pacient.d.mts.map +1 -0
  495. package/dist/types/pacient.mjs +2 -0
  496. package/dist/types/pacient.mjs.map +1 -0
  497. package/dist/types/partnerji.d.mts +14 -0
  498. package/dist/types/partnerji.d.mts.map +1 -0
  499. package/dist/types/partnerji.mjs +3 -0
  500. package/dist/types/partnerji.mjs.map +1 -0
  501. package/dist/types/pasma.d.mts +6 -0
  502. package/dist/types/pasma.d.mts.map +1 -0
  503. package/dist/types/pasma.mjs +2 -0
  504. package/dist/types/pasma.mjs.map +1 -0
  505. package/dist/types/podpis.d.mts +8 -0
  506. package/dist/types/podpis.d.mts.map +1 -0
  507. package/dist/types/podpis.mjs +2 -0
  508. package/dist/types/podpis.mjs.map +1 -0
  509. package/dist/types/poslovalnica.d.mts +20 -0
  510. package/dist/types/poslovalnica.d.mts.map +1 -0
  511. package/dist/types/poslovalnica.mjs +2 -0
  512. package/dist/types/poslovalnica.mjs.map +1 -0
  513. package/dist/types/protokol.d.mts +15 -0
  514. package/dist/types/protokol.d.mts.map +1 -0
  515. package/dist/types/protokol.mjs +2 -0
  516. package/dist/types/protokol.mjs.map +1 -0
  517. package/dist/types/racun.d.mts +257 -0
  518. package/dist/types/racun.d.mts.map +1 -0
  519. package/dist/types/racun.mjs +2 -0
  520. package/dist/types/racun.mjs.map +1 -0
  521. package/dist/types/rejnaZivalRazenGoveda.d.mts +8 -0
  522. package/dist/types/rejnaZivalRazenGoveda.d.mts.map +1 -0
  523. package/dist/types/rejnaZivalRazenGoveda.mjs +2 -0
  524. package/dist/types/rejnaZivalRazenGoveda.mjs.map +1 -0
  525. package/dist/types/shared.d.mts +24 -0
  526. package/dist/types/shared.d.mts.map +1 -0
  527. package/dist/types/shared.mjs +2 -0
  528. package/dist/types/shared.mjs.map +1 -0
  529. package/dist/types/skladisce.d.mts +10 -0
  530. package/dist/types/skladisce.d.mts.map +1 -0
  531. package/dist/types/skladisce.mjs +2 -0
  532. package/dist/types/skladisce.mjs.map +1 -0
  533. package/dist/types/stranka.d.mts +81 -0
  534. package/dist/types/stranka.d.mts.map +1 -0
  535. package/dist/types/stranka.mjs +2 -0
  536. package/dist/types/stranka.mjs.map +1 -0
  537. package/dist/types/teren.d.mts +368 -0
  538. package/dist/types/teren.d.mts.map +1 -0
  539. package/dist/types/teren.mjs +84 -0
  540. package/dist/types/teren.mjs.map +1 -0
  541. package/dist/types/uporabnik.d.mts +31 -0
  542. package/dist/types/uporabnik.d.mts.map +1 -0
  543. package/dist/types/uporabnik.mjs +2 -0
  544. package/dist/types/uporabnik.mjs.map +1 -0
  545. package/dist/types/vrsta.d.mts +13 -0
  546. package/dist/types/vrsta.d.mts.map +1 -0
  547. package/dist/types/vrsta.mjs +2 -0
  548. package/dist/types/vrsta.mjs.map +1 -0
  549. package/dist/types/vrstaObravnave.d.mts +10 -0
  550. package/dist/types/vrstaObravnave.d.mts.map +1 -0
  551. package/dist/types/vrstaObravnave.mjs +2 -0
  552. package/dist/types/vrstaObravnave.mjs.map +1 -0
  553. package/dist/types/zaloga.d.mts +54 -0
  554. package/dist/types/zaloga.d.mts.map +1 -0
  555. package/dist/types/zaloga.mjs +2 -0
  556. package/dist/types/zaloga.mjs.map +1 -0
  557. package/dist/types/zaracunajDobavnice.d.mts +13 -0
  558. package/dist/types/zaracunajDobavnice.d.mts.map +1 -0
  559. package/dist/types/zaracunajDobavnice.mjs +2 -0
  560. package/dist/types/zaracunajDobavnice.mjs.map +1 -0
  561. package/dist/updateOpombeRejca.d.mts +3 -0
  562. package/dist/updateOpombeRejca.d.mts.map +1 -0
  563. package/dist/updateOpombeRejca.mjs +10 -0
  564. package/dist/updateOpombeRejca.mjs.map +1 -0
  565. package/dist/updatePotrditevBrejosti.d.mts +3 -0
  566. package/dist/updatePotrditevBrejosti.d.mts.map +1 -0
  567. package/dist/updatePotrditevBrejosti.mjs +13 -0
  568. package/dist/updatePotrditevBrejosti.mjs.map +1 -0
  569. package/dist/updatePresusitve.d.mts +3 -0
  570. package/dist/updatePresusitve.d.mts.map +1 -0
  571. package/dist/updatePresusitve.mjs +12 -0
  572. package/dist/updatePresusitve.mjs.map +1 -0
  573. package/dist/updateStatusOsemenitve.d.mts +3 -0
  574. package/dist/updateStatusOsemenitve.d.mts.map +1 -0
  575. package/dist/updateStatusOsemenitve.mjs +12 -0
  576. package/dist/updateStatusOsemenitve.mjs.map +1 -0
  577. package/dist/vrsteDokumentov.d.mts +9 -0
  578. package/dist/vrsteDokumentov.d.mts.map +1 -0
  579. package/dist/vrsteDokumentov.mjs +29 -0
  580. package/dist/vrsteDokumentov.mjs.map +1 -0
  581. package/dist/vseSkladiscaLokacij.d.mts +2 -0
  582. package/dist/vseSkladiscaLokacij.d.mts.map +1 -0
  583. package/dist/vseSkladiscaLokacij.mjs +12 -0
  584. package/dist/vseSkladiscaLokacij.mjs.map +1 -0
  585. package/dist/vsotaDobavZaObdobje.d.mts +11 -0
  586. package/dist/vsotaDobavZaObdobje.d.mts.map +1 -0
  587. package/dist/vsotaDobavZaObdobje.mjs +54 -0
  588. package/dist/vsotaDobavZaObdobje.mjs.map +1 -0
  589. package/dist/zakljuciBlagovnico.d.mts +4 -0
  590. package/dist/zakljuciBlagovnico.d.mts.map +1 -0
  591. package/dist/zakljuciBlagovnico.mjs +61 -0
  592. package/dist/zakljuciBlagovnico.mjs.map +1 -0
  593. package/dist/zalogaDbAccessorInMem.d.mts +8 -0
  594. package/dist/zalogaDbAccessorInMem.d.mts.map +1 -0
  595. package/dist/zalogaDbAccessorInMem.mjs +125 -0
  596. package/dist/zalogaDbAccessorInMem.mjs.map +1 -0
  597. package/dist/zalogaNaDan.d.mts +9 -0
  598. package/dist/zalogaNaDan.d.mts.map +1 -0
  599. package/dist/zalogaNaDan.mjs +45 -0
  600. package/dist/zalogaNaDan.mjs.map +1 -0
  601. package/dist/zalogaNaDanIzracunana.d.mts +7 -0
  602. package/dist/zalogaNaDanIzracunana.d.mts.map +1 -0
  603. package/dist/zalogaNaDanIzracunana.mjs +59 -0
  604. package/dist/zalogaNaDanIzracunana.mjs.map +1 -0
  605. package/dist/zalogaPoDnevih.d.mts +9 -0
  606. package/dist/zalogaPoDnevih.d.mts.map +1 -0
  607. package/dist/zalogaPoDnevih.mjs +52 -0
  608. package/dist/zalogaPoDnevih.mjs.map +1 -0
  609. package/dist/zapisiPorabeZaDobavnice.d.mts +13 -0
  610. package/dist/zapisiPorabeZaDobavnice.d.mts.map +1 -0
  611. package/dist/zapisiPorabeZaDobavnice.mjs +71 -0
  612. package/dist/zapisiPorabeZaDobavnice.mjs.map +1 -0
  613. package/dist/zapisiPorabeZaObravnave.d.mts +13 -0
  614. package/dist/zapisiPorabeZaObravnave.d.mts.map +1 -0
  615. package/dist/zapisiPorabeZaObravnave.mjs +76 -0
  616. package/dist/zapisiPorabeZaObravnave.mjs.map +1 -0
  617. package/dist/zapisiPoraboZaObravnavo.d.mts +11 -0
  618. package/dist/zapisiPoraboZaObravnavo.d.mts.map +1 -0
  619. package/dist/zapisiPoraboZaObravnavo.mjs +75 -0
  620. package/dist/zapisiPoraboZaObravnavo.mjs.map +1 -0
  621. package/dist/zapisiZalogoPoDnevih.d.mts +7 -0
  622. package/dist/zapisiZalogoPoDnevih.d.mts.map +1 -0
  623. package/dist/zapisiZalogoPoDnevih.mjs +86 -0
  624. package/dist/zapisiZalogoPoDnevih.mjs.map +1 -0
  625. package/dist/zapisiZalogoPoDnevih_old.d.mts +6 -0
  626. package/dist/zapisiZalogoPoDnevih_old.d.mts.map +1 -0
  627. package/dist/zapisiZalogoPoDnevih_old.mjs +102 -0
  628. package/dist/zapisiZalogoPoDnevih_old.mjs.map +1 -0
  629. package/dist/zaracunajDobavnice.d.mts +9 -0
  630. package/dist/zaracunajDobavnice.d.mts.map +1 -0
  631. package/dist/zaracunajDobavnice.mjs +225 -0
  632. package/dist/zaracunajDobavnice.mjs.map +1 -0
  633. package/dist/zavarovanje.d.mts +3 -0
  634. package/dist/zavarovanje.d.mts.map +1 -0
  635. package/dist/zavarovanje.mjs +11 -0
  636. package/dist/zavarovanje.mjs.map +1 -0
  637. package/dist/zbrisiZalogoArtiklovKiJeNeMorejoImeti.d.mts +2 -0
  638. package/dist/zbrisiZalogoArtiklovKiJeNeMorejoImeti.d.mts.map +1 -0
  639. package/dist/zbrisiZalogoArtiklovKiJeNeMorejoImeti.mjs +28 -0
  640. package/dist/zbrisiZalogoArtiklovKiJeNeMorejoImeti.mjs.map +1 -0
  641. package/dist/zdruziOdprteRacune.d.mts +5 -0
  642. package/dist/zdruziOdprteRacune.d.mts.map +1 -0
  643. package/dist/zdruziOdprteRacune.mjs +49 -0
  644. package/dist/zdruziOdprteRacune.mjs.map +1 -0
  645. package/dist/zdruziPaciente.d.mts +8 -0
  646. package/dist/zdruziPaciente.d.mts.map +1 -0
  647. package/dist/zdruziPaciente.mjs +83 -0
  648. package/dist/zdruziPaciente.mjs.map +1 -0
  649. package/dist/zdruziStranke.d.mts +10 -0
  650. package/dist/zdruziStranke.d.mts.map +1 -0
  651. package/dist/zdruziStranke.mjs +215 -0
  652. package/dist/zdruziStranke.mjs.map +1 -0
  653. package/dist/zeleniPribitek.d.mts +6 -0
  654. package/dist/zeleniPribitek.d.mts.map +1 -0
  655. package/dist/zeleniPribitek.mjs +8 -0
  656. package/dist/zeleniPribitek.mjs.map +1 -0
  657. package/package.json +1 -1
  658. package/tsconfig.tsbuildinfo +1 -1
@@ -0,0 +1,98 @@
1
+ import { splitAndClean, deleteUndefinedOrNullFields, jc, js } from "cry-helpers";
2
+ import { lahkoImaZalogo, preracunajPostavkoBlagovniceRazenDobave } from "./index.mjs";
3
+ import { ObjectID } from "./ObjectId.mjs";
4
+ import { sestevkiBlagovniceRazenDobave } from "./sestevkiBlagovniceRazenDobave.js";
5
+ export function porabaZaObravnavo({ obravnava, nastavitve, stranka, pacient, skladisce_id, username, artikli, }) {
6
+ if (!nastavitve.obravnavaRazknjizujeZalogo) {
7
+ console.warn("porabaZaObravnavo: program ne razknjižuje na podlagi obravnave");
8
+ }
9
+ const _id = new ObjectID().toHexString();
10
+ function lahkoRazknjizimoArtikel(a) {
11
+ if (!a)
12
+ return false;
13
+ // if (a.kategorija === "izdelek") return true
14
+ if (a.kategorija === "izdelek" && ((a.zalogoRazknjizi || (nastavitve.razknjizbaIzdelkov || "ob prodaji")) === "ob prodaji"))
15
+ return true;
16
+ if (a.kategorija === "zdravilo" && ((a.zalogoRazknjizi || nastavitve.razknjizbaZdravil) === "ob prodaji"))
17
+ return true;
18
+ return false;
19
+ }
20
+ let zdaj = new Date();
21
+ const okZaRazknjizbo = (p) => !p.razknjizena
22
+ && (!p.razknjizenoNaObravnavi || (p.razknjizenoNaObravnavi?.toISOString() === zdaj?.toISOString()))
23
+ && lahkoImaZalogo(p, nastavitve.razknjizbaZdravil, nastavitve.razknjizbaIzdelkov)
24
+ && lahkoRazknjizimoArtikel(artikli[p.artikel_id])
25
+ && !p.domov;
26
+ let postavkeZaRazknjizbo = obravnava.koraki.filter(korak => korak.postavke?.filter(okZaRazknjizbo)).map(korak => {
27
+ korak.postavke.filter(okZaRazknjizbo).forEach(p => {
28
+ p.korakObravnave_id = p.korakObravnave_id || korak._id;
29
+ p.neRazknjiziObIzdajiRacuna = true;
30
+ p.razknjizenoNaObravnavi = zdaj;
31
+ });
32
+ return korak.postavke;
33
+ }).flat(5).filter(okZaRazknjizbo).map(p => {
34
+ let r = {
35
+ naziv: p.opis,
36
+ artikel_id: p.artikel_id,
37
+ kategorija: p.kategorija,
38
+ enota: p.enota,
39
+ kolicina: p.kolicina,
40
+ nbc: p.nbc,
41
+ dst: p.dst,
42
+ tnbc: p.tnbc,
43
+ tdav: p.tdav,
44
+ stevilkeZdravil: splitAndClean(p.stevilkaZdravila || ""),
45
+ enotaFaktor: 1,
46
+ enotaZaloge: p.enota,
47
+ domov: p.domov,
48
+ dodal: p.dodal,
49
+ _entered: p._entered,
50
+ obravnava_id: p.obravnava_id,
51
+ pacient_id: p.pacient_id,
52
+ pacientIme: p.pacientIme,
53
+ korakObravnave_id: p.korakObravnave_id,
54
+ namenObravnave: p.namenObravnave,
55
+ terenNamen: p.terenNamen,
56
+ poDokumentu: p.poDokumentu,
57
+ razknjiziZalogo: p.razknjiziZalogo,
58
+ faktorRazknjizbe: p.faktorRazknjizbe,
59
+ zaracunaj: p.zaracunaj,
60
+ zaracunano: p.zaracunano,
61
+ poljeObravnave: p.poljeObravnave,
62
+ izPredracuna_id: p.izPredracuna_id,
63
+ izPredracuna_st: p.izPredracuna_st,
64
+ izDobavnice_id: p.izDobavnice_id,
65
+ izDobavnice_st: p.izDobavnice_st,
66
+ osemenitev_ids: p.osemenitev_ids,
67
+ upostevaniPribitekDezurstva: p.upostevaniPribitekDezurstva,
68
+ razknjizenaNaId: p.razknjizenaNaId,
69
+ razknjizenaNaVrsta: p.razknjizenaNaVrsta,
70
+ razknjiziNaPorabo: _id,
71
+ neRazknjiziObIzdajiRacuna: true,
72
+ razknjizenoNaObravnavi: zdaj,
73
+ };
74
+ deleteUndefinedOrNullFields(r);
75
+ preracunajPostavkoBlagovniceRazenDobave(r);
76
+ return r;
77
+ });
78
+ if (postavkeZaRazknjizbo.length) {
79
+ return {
80
+ _id,
81
+ datum: obravnava.datum || new Date(),
82
+ skladisce_id: skladisce_id,
83
+ lokacija_id: obravnava.lokacija_id,
84
+ postavke: postavkeZaRazknjizbo,
85
+ vrsta: "poraba",
86
+ zapSt: "SEQ_NEXT",
87
+ opomba: `poraba za obravnavo`,
88
+ opis: `${jc(obravnava.namen, stranka?.firma, js(stranka?.ime, stranka?.priimek), pacient?.ime)}`,
89
+ izvedel: username,
90
+ za: username,
91
+ zaObravnavo: [obravnava._id],
92
+ ...sestevkiBlagovniceRazenDobave(postavkeZaRazknjizbo),
93
+ status: "odprta"
94
+ };
95
+ }
96
+ return false;
97
+ }
98
+ //# sourceMappingURL=porabaZaObravnavo.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"porabaZaObravnavo.mjs","sourceRoot":"","sources":["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OAAO;YACN,GAAG;YACH,KAAK,EAAE,SAAS,CAAC,KAAK,IAAI,IAAI,IAAI,EAAE;YACpC,YAAY,EAAE,YAAY;YAC1B,WAAW,EAAE,SAAS,CAAC,WAAW;YAClC,QAAQ,EAAE,oBAAoB;YAC9B,KAAK,EAAE,QAAQ;YACf,KAAK,EAAE,UAAiB;YACxB,MAAM,EAAE,qBAAqB;YAC7B,IAAI,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE;YAChG,OAAO,EAAE,QAAQ;YACjB,EAAE,EAAE,QAAQ;YACZ,WAAW,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC;YAC5B,GAAG,6BAA6B,CAAC,oBAAoB,CAAC;YACtD,MAAM,EAAE,QAAQ;SACN,CAAA;KACX;IAED,OAAO,KAAK,CAAA;AACb,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { KolicinskaPostavkaBlagovnice, VrednostnaPostavkaBlagovnice } from "./types/blagovnica.mjs";
2
+ import { Davek } from "./types/racun.mjs";
3
+ export declare function preracunajPostavkoDobave(postavka: VrednostnaPostavkaBlagovnice): void;
4
+ export declare function preracunajPostavkoBlagovniceRazenDobave(postavka: KolicinskaPostavkaBlagovnice): void;
5
+ export declare function izracunajDavkeBlagovnice(postavke: {
6
+ dst: number;
7
+ tdav: number;
8
+ tnbc: number;
9
+ }[]): Davek[];
10
+ export declare function izracunajSestevkeBlagovniceRazenDobave(postavke: KolicinskaPostavkaBlagovnice[]): {
11
+ nbc: number;
12
+ pop: number;
13
+ dav: number;
14
+ prc: number;
15
+ davki: Davek[];
16
+ };
17
+ export declare function izracunajSestevkeDobave(postavke: VrednostnaPostavkaBlagovnice[]): {
18
+ nbc0: number;
19
+ nbc: number;
20
+ pop: number;
21
+ dav: number;
22
+ prc: number;
23
+ davki: Davek[];
24
+ };
25
+ //# sourceMappingURL=preracunajPostavkoBlagovnice.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preracunajPostavkoBlagovnice.d.mts","sourceRoot":"","sources":["../src/preracunajPostavkoBlagovnice.mts"],"names":[],"mappings":"AACA,OAAO,EAAE,4BAA4B,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAC;AACpG,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,wBAAgB,wBAAwB,CACpC,QAAQ,EAAE,4BAA4B,GACvC,IAAI,CAON;AAED,wBAAgB,uCAAuC,CACnD,QAAQ,EAAE,4BAA4B,GACvC,IAAI,CAGN;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;CAAE,EAAE,GAC3F,KAAK,EAAE,CASZ;AAED,wBAAgB,sCAAsC,CAAC,QAAQ,EAAE,4BAA4B,EAAE,GACzF;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,KAAK,EAAE,CAAA;CAAE,CAW3E;AAED,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,4BAA4B,EAAE,GAC1E;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,KAAK,EAAE,CAAA;CAAE,CAYzF"}
@@ -0,0 +1,46 @@
1
+ import { round2 } from "cry-helpers";
2
+ export function preracunajPostavkoDobave(postavka) {
3
+ postavka.nbcN = postavka.rbt
4
+ ? (postavka.nbc0 * (1 - (postavka.rbt || 0)))
5
+ : postavka.nbc0;
6
+ postavka.nbc = postavka.nbcN;
7
+ postavka.tdav = postavka.nbcN * postavka.dst * postavka.kolicina;
8
+ postavka.tnbc = postavka.nbcN * postavka.kolicina;
9
+ }
10
+ export function preracunajPostavkoBlagovniceRazenDobave(postavka) {
11
+ postavka.tnbc = postavka.nbc * postavka.kolicina;
12
+ postavka.tdav = postavka.nbc * postavka.kolicina * postavka.dst;
13
+ }
14
+ export function izracunajDavkeBlagovnice(postavke) {
15
+ let d = [];
16
+ Object.values(postavke).forEach(p => {
17
+ d[p.dst] = d[p.dst] || { davek: 0, osnova: 0, dst: p.dst };
18
+ d[p.dst].osnova = round2(d[p.dst].osnova + round2(p.tnbc));
19
+ });
20
+ Object.values(d).forEach(x => x.davek = round2(x.osnova * x.dst));
21
+ return Object.values(d);
22
+ }
23
+ export function izracunajSestevkeBlagovniceRazenDobave(postavke) {
24
+ let d = { nbc: 0, pop: 0, dav: 0, prc: 0, davki: [] };
25
+ Object.values(postavke).forEach(p => {
26
+ d.pop = round2(d.pop || 0);
27
+ d.nbc = round2(d.nbc + round2(p.nbc * p.kolicina));
28
+ });
29
+ d.davki = izracunajDavkeBlagovnice(postavke);
30
+ d.dav = d.davki.reduce((p, c) => p + c.davek, 0);
31
+ d.prc = round2(d.nbc + d.dav);
32
+ return d;
33
+ }
34
+ export function izracunajSestevkeDobave(postavke) {
35
+ let d = { nbc0: 0, nbc: 0, pop: 0, dav: 0, prc: 0, davki: [] };
36
+ Object.values(postavke).forEach(p => {
37
+ d.nbc0 = round2(d.nbc0 + round2(p.nbc0 * p.kolicina));
38
+ d.nbc = round2(d.nbc + round2(p.nbcN * p.kolicina));
39
+ d.pop = round2(d.pop + round2(p.nbc0 * p.rbt * p.kolicina));
40
+ });
41
+ d.davki = izracunajDavkeBlagovnice(postavke);
42
+ d.dav = d.davki.reduce((p, c) => p + c.davek, 0);
43
+ d.prc = round2(d.nbc + d.dav);
44
+ return d;
45
+ }
46
+ //# sourceMapping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AAC,GAAG,CAAC,CAAA;IAC7B,OAAO,CAAC,CAAA;AACZ,CAAC"}
@@ -0,0 +1,117 @@
1
+ import { Zaloga } from "./types/zaloga.mjs";
2
+ import { VrstaSpremembeZaloge } from "./types/VrstaSpremembeZaloge.mjs";
3
+ export interface PodatkiPreracunaZaloge {
4
+ vrstaSpremembe: VrstaSpremembeZaloge;
5
+ }
6
+ export type PodatkiPreracunaZalogeBrezSpremembeCene = {
7
+ vrstaSpremembe: VrstaSpremembeZaloge;
8
+ zaloga: Zaloga;
9
+ /** vrednost spremebe, vedno v plus razen pri storanacijah */
10
+ kolicina: number;
11
+ /** mora priti iz artikla, ne iz zaloge same, ker / dokler imajo vsi artikli isto nbc */
12
+ stara_nbc: number;
13
+ };
14
+ export type PodatkiPreracunaZalogeSZprememboCene = PodatkiPreracunaZalogeBrezSpremembeCene & {
15
+ vrstaSpremembe: VrstaSpremembeZaloge.NABAVA;
16
+ nova_nbc: number;
17
+ };
18
+ export declare function preracunajPorabo(preracun: {
19
+ vrstaSpremembe?: VrstaSpremembeZaloge.PORABA | VrstaSpremembeZaloge.NABAVA;
20
+ zaloga: Zaloga;
21
+ kolicina: number;
22
+ stara_nbc: number;
23
+ }): {
24
+ vrstaSpremembe: VrstaSpremembeZaloge;
25
+ zaloga: {
26
+ stara: number;
27
+ nova: number;
28
+ sprememba: number;
29
+ };
30
+ vrednostZaloge: {
31
+ nova: number;
32
+ stara: number;
33
+ sprememba: number;
34
+ };
35
+ };
36
+ export declare function preracunajInventuro(preracun: {
37
+ vrstaSpremembe?: VrstaSpremembeZaloge.NASTAVI;
38
+ zaloga: Zaloga;
39
+ kolicina: number;
40
+ stara_nbc: number;
41
+ }): {
42
+ vrstaSpremembe: VrstaSpremembeZaloge;
43
+ zaloga: {
44
+ stara: number;
45
+ nova: number;
46
+ sprememba: number;
47
+ };
48
+ vrednostZaloge: {
49
+ nova: number;
50
+ stara: number;
51
+ sprememba: number;
52
+ };
53
+ };
54
+ export declare function preracunajNabavo(preracun: {
55
+ vrstaSpremembe?: VrstaSpremembeZaloge.NABAVA;
56
+ zaloga: Zaloga;
57
+ kolicina: number;
58
+ stara_nbc: number;
59
+ nova_nbc: number;
60
+ }): {
61
+ vrstaSpremembe: VrstaSpremembeZaloge.NABAVA;
62
+ nbc: {
63
+ stara: number;
64
+ nova: number;
65
+ sprememba: number;
66
+ };
67
+ zaloga: {
68
+ stara: number;
69
+ nova: number;
70
+ sprememba: number;
71
+ };
72
+ vrednostZaloge: {
73
+ nova: number;
74
+ stara: number;
75
+ sprememba: number;
76
+ };
77
+ };
78
+ declare function preracunajZalogoKolicinsko(preracun: {
79
+ vrstaSpremembe: VrstaSpremembeZaloge;
80
+ zaloga: Zaloga;
81
+ kolicina: number;
82
+ stara_nbc: number;
83
+ }): {
84
+ vrstaSpremembe: VrstaSpremembeZaloge;
85
+ zaloga: {
86
+ stara: number;
87
+ nova: number;
88
+ sprememba: number;
89
+ };
90
+ vrednostZaloge: {
91
+ nova: number;
92
+ stara: number;
93
+ sprememba: number;
94
+ };
95
+ };
96
+ declare function preracunajZalogoObNabavi(preracun: PodatkiPreracunaZalogeSZprememboCene): {
97
+ vrstaSpremembe: VrstaSpremembeZaloge.NABAVA;
98
+ nbc: {
99
+ stara: number;
100
+ nova: number;
101
+ sprememba: number;
102
+ };
103
+ zaloga: {
104
+ stara: number;
105
+ nova: number;
106
+ sprememba: number;
107
+ };
108
+ vrednostZaloge: {
109
+ nova: number;
110
+ stara: number;
111
+ sprememba: number;
112
+ };
113
+ };
114
+ export declare function vpisiSprememboZaloge(zaloga: Zaloga, sprememba: ReturnType<typeof preracunajZalogoKolicinsko>): Zaloga;
115
+ export declare function vpisiSprememboZalogePoNabavi(zaloga: Zaloga, sprememba: ReturnType<typeof preracunajZalogoObNabavi>): Zaloga;
116
+ export {};
117
+ //# sourceMappingURL=preracunajZalogo.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preracunajZalogo.d.mts","sourceRoot":"","sources":["../src/prerac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0BAA0B,CAAC,QAAQ,EAAE;IAC1C,cAAc,EAAE,oBAAoB,CAAC;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACrB;;;;;;;;;;;;EA6CA;AAED,iBAAS,wBAAwB,CAAC,QAAQ,EAAE,oCAAoC;;;;;;;;;;;;;;;;;EA4C/E;AAED,wBAAgB,oBAAoB,CAChC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,UAAU,CAAC,OAAO,0BAA0B,CAAC,UAK3D;AAED,wBAAgB,4BAA4B,CACxC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,UAAU,CAAC,OAAO,wBAAwB,CAAC,UAOzD"}
@@ -0,0 +1,104 @@
1
+ import { round2, round6 } from "cry-helpers";
2
+ export function preracunajPorabo(preracun) {
3
+ preracun.vrstaSpremembe = preracun.vrstaSpremembe || -1 /* VrstaSpremembeZaloge.PORABA */;
4
+ return preracunajZalogoKolicinsko(preracun);
5
+ }
6
+ export function preracunajInventuro(preracun) {
7
+ preracun.vrstaSpremembe = 0 /* VrstaSpremembeZaloge.NASTAVI */;
8
+ return preracunajZalogoKolicinsko(preracun);
9
+ }
10
+ export function preracunajNabavo(preracun) {
11
+ preracun.vrstaSpremembe = 1 /* VrstaSpremembeZaloge.NABAVA */;
12
+ return preracunajZalogoObNabavi(preracun);
13
+ }
14
+ function preracunajZalogoKolicinsko(preracun) {
15
+ let { vrstaSpremembe, zaloga, kolicina, stara_nbc } = preracun;
16
+ let stara_zaloga = zaloga.zaloga;
17
+ let nova_zaloga;
18
+ let spremeba_zaloge;
19
+ switch (vrstaSpremembe) {
20
+ case -1 /* VrstaSpremembeZaloge.PORABA */:
21
+ spremeba_zaloge = -kolicina;
22
+ nova_zaloga = stara_zaloga + spremeba_zaloge;
23
+ break;
24
+ case 1 /* VrstaSpremembeZaloge.NABAVA */:
25
+ spremeba_zaloge = kolicina;
26
+ nova_zaloga = stara_zaloga + spremeba_zaloge;
27
+ break;
28
+ case 0 /* VrstaSpremembeZaloge.NASTAVI */:
29
+ spremeba_zaloge = kolicina - stara_zaloga;
30
+ nova_zaloga = kolicina;
31
+ break;
32
+ }
33
+ let stara_vrednost_zaloge = round6(zaloga.vrednost || 0);
34
+ let sprememba_vrednosti_zaloge = round6(stara_nbc * spremeba_zaloge);
35
+ let nova_vrednost_zaloge = round6(zaloga.vrednost + sprememba_vrednosti_zaloge);
36
+ if (vrstaSpremembe === 0 /* VrstaSpremembeZaloge.NASTAVI */) {
37
+ nova_vrednost_zaloge = round6(nova_zaloga * stara_nbc);
38
+ sprememba_vrednosti_zaloge = round6(nova_vrednost_zaloge - stara_vrednost_zaloge);
39
+ }
40
+ return {
41
+ vrstaSpremembe,
42
+ zaloga: {
43
+ stara: round6(stara_zaloga) || 0,
44
+ nova: round6(nova_zaloga) || 0,
45
+ sprememba: round6(spremeba_zaloge) || 0,
46
+ },
47
+ vrednostZaloge: {
48
+ nova: nova_vrednost_zaloge || 0,
49
+ stara: stara_vrednost_zaloge || 0,
50
+ sprememba: sprememba_vrednosti_zaloge || 0,
51
+ }
52
+ };
53
+ }
54
+ function preracunajZalogoObNabavi(preracun) {
55
+ let { stara_nbc, zaloga, nova_nbc, vrstaSpremembe } = preracun;
56
+ let kolicinska_sprememba = preracunajZalogoKolicinsko(preracun);
57
+ let stara_vrednost_zaloge = kolicinska_sprememba.vrednostZaloge.stara || 0;
58
+ if (isNaN(zaloga.vrednost))
59
+ zaloga.vrednost = 0;
60
+ if (round2(stara_vrednost_zaloge) !== round2(zaloga.vrednost)) {
61
+ console.error(`vrednost stare zaloge se ne ujema: art ${zaloga.artikel_id} skl ${zaloga.skladisce_id}: ${stara_vrednost_zaloge} !== ${zaloga.vrednost}, razlika = ${round2(stara_vrednost_zaloge - zaloga.vrednost)}`);
62
+ }
63
+ let stara_zaloga = kolicinska_sprememba.zaloga.stara || 0;
64
+ let nova_zaloga = kolicinska_sprememba.zaloga.nova || 0;
65
+ let sprememba_zaloge = kolicinska_sprememba.zaloga.sprememba || 0;
66
+ let sprememba_vrednosti_zaloge = nova_nbc * sprememba_zaloge || 0;
67
+ let nova_vrednost_zaloge = stara_vrednost_zaloge + sprememba_vrednosti_zaloge || 0;
68
+ let preracunana_nova_nbc = stara_nbc || 0;
69
+ if (vrstaSpremembe === 1 /* VrstaSpremembeZaloge.NABAVA */) {
70
+ if (nova_vrednost_zaloge > .1 && nova_zaloga > .1 && stara_zaloga > .1) {
71
+ preracunana_nova_nbc = nova_vrednost_zaloge / nova_zaloga;
72
+ preracunana_nova_nbc = Math.abs(preracunana_nova_nbc);
73
+ }
74
+ else {
75
+ preracunana_nova_nbc = nova_nbc;
76
+ }
77
+ }
78
+ return {
79
+ vrstaSpremembe,
80
+ nbc: {
81
+ stara: stara_nbc,
82
+ nova: round6(preracunana_nova_nbc),
83
+ sprememba: round6(preracunana_nova_nbc - stara_nbc),
84
+ },
85
+ zaloga: kolicinska_sprememba.zaloga,
86
+ vrednostZaloge: {
87
+ nova: round6(nova_vrednost_zaloge),
88
+ stara: round6(stara_vrednost_zaloge),
89
+ sprememba: round6(sprememba_vrednosti_zaloge),
90
+ }
91
+ };
92
+ }
93
+ export function vpisiSprememboZaloge(zaloga, sprememba) {
94
+ zaloga.vrednost = sprememba.vrednostZaloge.nova || 0;
95
+ zaloga.zaloga = sprememba.zaloga.nova || 0;
96
+ return zaloga;
97
+ }
98
+ export function vpisiSprememboZalogePoNabavi(zaloga, sprememba) {
99
+ zaloga.vrednost = sprememba.vrednostZaloge.nova || 0;
100
+ zaloga.zaloga = sprememba.zaloga.nova || 0;
101
+ zaloga.nbc = sprememba.nbc.nova || 0;
102
+ return zaloga;
103
+ }
104
+ //# sourceMappingURL=preracunajZalogo.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preracunajZalogo.mjs","sourceRoot":"","sources":["../src/preracunajZalogo.mts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,EA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AAC,CAAA;IAC1C,OAAO,MAAM,CAAA;AACjB,CAAC;AAED,MAAM,UAAU,4BAA4B,CACxC,MAAc,EACd,SAAsD;IAEtD,MAAM,CAAC,QAAQ,GAAG,SAAS,CAAC,cAAc,CAAC,IAAI,IAAI,CAAC,CAAC;IACrD,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC;IAC3C,MAAM,CAAC,GAAG,GAAG,SAAS,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC;IAErC,OAAO,MAAM,CAAA;AACjB,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { KarticaArtikla, SpremembaZaloge, VrstaRazknjizbeZdravila } from "./index.mjs";
2
+ export type PODATKI_DNEVA = {
3
+ dan: string;
4
+ zaloga: number;
5
+ kartica: number;
6
+ razlika: number;
7
+ tZaloga: number;
8
+ tKartica: number;
9
+ tRazlika: number;
10
+ tekocaRazlika: number;
11
+ inventuraZ?: boolean;
12
+ inventuraK?: boolean;
13
+ };
14
+ export interface KarticaArtiklaSKontrolo extends KarticaArtikla {
15
+ id_spremembe_zaloge?: string;
16
+ datum_spremembe_zaloge?: string;
17
+ predInventuro?: boolean;
18
+ }
19
+ export interface SpremembaZalogeSKontrolo extends SpremembaZaloge {
20
+ id_kontrolne_kartice?: string;
21
+ datum_kontrolne_kartice?: string;
22
+ naDan?: string;
23
+ }
24
+ export declare function preveriKnjizenjeZalogeArtikla(opts: {
25
+ db: string;
26
+ artikel_id: string;
27
+ vrsta_razknjizbe: VrstaRazknjizbeZdravila;
28
+ skladisce_id: string;
29
+ vrsta?: string;
30
+ samoPoZadnjiInventuri?: boolean;
31
+ }): Promise<{
32
+ stanjeNaDan: Record<string, PODATKI_DNEVA>;
33
+ niKnjizbe: KarticaArtiklaSKontrolo[];
34
+ niKnjizbePoInventuri: KarticaArtiklaSKontrolo[];
35
+ skupaj: {
36
+ zaloga: number;
37
+ kartica: number;
38
+ razlika: number;
39
+ };
40
+ niKnjizbePoInventuriSkupaj: number;
41
+ }>;
42
+ //# sourceMappingURL=preveriKnjizenjeZalogeArtikla.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preveriKnjizenjeZalogeArtikla.d.mts","sourceRoot":"","sources":["../src/preveriKnjizenjeZalogeArtikla.mts"],"names":[],"mappings":"AACA,OAAO,EAAM,cAAc,EAAE,eAAe,EAAE,uBAAuB,EAAmB,MAAM,aAAa,CAAC;AAI5G,MAAM,MAAM,aAAa,GAAG;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;CACpB,CAAC;AAEF,MAAM,WAAW,uBAAwB,SAAQ,cAAc;IAC9D,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAA;CACvB;AACD,MAAM,WAAW,wBAAyB,SAAQ,eAAe;IAChE,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,uBAAuB,CAAC,EAAE,MAAM,CAAA;IAChC,KAAK,CAAC,EAAE,MAAM,CAAA;CACd;AAMD,wBAAsB,6BAA6B,CAAE,IAAI,EACxD;IACC,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,uBAAuB,CAAC;IAC1C,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qBAAqB,CAAC,EAAE,OAAO,CAAC;CAChC;;;;;;;;;;GAqGD"}
@@ -0,0 +1,130 @@
1
+ import { Mongo } from "cry-db";
2
+ import { karticaArtikla, } from "./index.mjs";
3
+ import dayjs from "./dayjs.mjs";
4
+ import { createCsv } from "cry-helpers";
5
+ function prazenDan(dan) {
6
+ return { dan, kartica: 0, zaloga: 0, razlika: 0, tekocaRazlika: 0, tZaloga: 0, tKartica: 0, tRazlika: 0 };
7
+ }
8
+ export async function preveriKnjizenjeZalogeArtikla(opts) {
9
+ let kartica = await karticaArtikla(opts.artikel_id, opts.db, opts.vrsta_razknjizbe, [opts.skladisce_id]);
10
+ kartica = kartica.reverse();
11
+ let zaloga = await naloziSpremembeZaloge(opts.db, opts.artikel_id, opts.skladisce_id);
12
+ const dan = (d) => dayjs(d).format("YYYY-MM-DD");
13
+ console.log('***');
14
+ console.log(kartica.filter(k => dan(k.datum) === "2024-05-09"));
15
+ console.log('***');
16
+ if (opts.vrsta === "dobava")
17
+ kartica = kartica.filter(z => z.vrsta === "dobava");
18
+ if (opts.vrsta === "dobava")
19
+ zaloga = zaloga.filter(z => z.vrstaDogodka === "dobava");
20
+ console.log('kartica.length', kartica.length);
21
+ console.log('zaloga.length', zaloga.length);
22
+ let stanjeNaDan = {};
23
+ let skupaj = { zaloga: 0, kartica: 0, razlika: 0 };
24
+ let niKnjizbePoInventuriSkupaj = 0;
25
+ let niKnjizbe = [];
26
+ // za vsako vrstico kontrolne kartice poišči ustrezno spremembo zaloge
27
+ let i = 0;
28
+ for (let zapis of kartica) {
29
+ let naDan = dan(zapis.datum);
30
+ let smer = zapis.vrsta === "dobava" ? 1 : -1;
31
+ let sprememba = (zapis.kolicina * (zapis.enotaFaktor || 1) * smer);
32
+ stanjeNaDan[naDan] ||= prazenDan(naDan);
33
+ let sz = zaloga.filter(z => z.dokument_id?.toString() === zapis.dokument_id?.toString());
34
+ if (zapis.vrsta === "inventura") {
35
+ stanjeNaDan[naDan].inventuraK = true;
36
+ stanjeNaDan[naDan].kartica = zapis.popisanaKolicina;
37
+ stanjeNaDan[naDan].tKartica = zapis.popisanaKolicina;
38
+ skupaj.kartica = zapis.popisanaKolicina;
39
+ niKnjizbe.forEach(z => z.predInventuro = true);
40
+ niKnjizbePoInventuriSkupaj = 0;
41
+ }
42
+ else {
43
+ if (stanjeNaDan[naDan].inventuraK)
44
+ console.log("KONTROLA PO INVENTURI", zapis.datum);
45
+ skupaj.kartica += sprememba;
46
+ stanjeNaDan[naDan].kartica += sprememba;
47
+ stanjeNaDan[naDan].tKartica = skupaj.kartica;
48
+ }
49
+ ;
50
+ if (sz.length >= 1) {
51
+ if (sz.length > 1)
52
+ console.log(`več kot ena spremembaZaloge za ${zapis.vrsta} ${naDan} ${zapis.dokument_id} ${zapis.kolicina}`);
53
+ zapis.id_spremembe_zaloge = sz[0]._id;
54
+ zapis.datum_spremembe_zaloge = naDan;
55
+ }
56
+ else if (sz.length === 0) {
57
+ console.log(`${++i} ni spremembaZaloge za ${zapis.vrsta} ${naDan} ${zapis.dokument_id} ${zapis.kolicina}`);
58
+ niKnjizbe.push(zapis);
59
+ niKnjizbePoInventuriSkupaj += sprememba;
60
+ }
61
+ stanjeNaDan[naDan].tekocaRazlika = niKnjizbePoInventuriSkupaj;
62
+ }
63
+ for (let zapis of zaloga) {
64
+ let naDan = dan(zapis.datum);
65
+ stanjeNaDan[naDan] ||= prazenDan(naDan);
66
+ let sz = kartica.filter(z => z.dokument_id?.toString() === zapis.dokument_id?.toString());
67
+ if (sz.length >= 1) {
68
+ if (sz.length > 1)
69
+ console.log(`več kot ena spremembaZaloge za ${zapis.vrstaDogodka} ${naDan} ${zapis.dokument_id} ${zapis.zaloga.sprememba}`);
70
+ zapis.id_kontrolne_kartice = sz[0].dokument_id?.toString();
71
+ zapis.datum_kontrolne_kartice = naDan;
72
+ }
73
+ else if (sz.length === 0) {
74
+ console.log(`${++i} ni karticeZaloge za ${zapis.vrstaDogodka} ${naDan} ${zapis.dokument_id} ${zapis.zaloga.sprememba}`);
75
+ }
76
+ if (zapis.vrstaDogodka === "inventura") {
77
+ stanjeNaDan[naDan].inventuraZ = true;
78
+ skupaj.zaloga = zapis.zaloga.nova;
79
+ stanjeNaDan[naDan].zaloga = zapis.zaloga.nova;
80
+ stanjeNaDan[naDan].tZaloga = skupaj.zaloga;
81
+ }
82
+ else {
83
+ if (stanjeNaDan[naDan].inventuraZ)
84
+ console.warn("ZALOGA PO INVENTURI", zapis.datum, zapis.zaloga);
85
+ skupaj.zaloga += zapis.zaloga.sprememba;
86
+ stanjeNaDan[naDan].zaloga += zapis.zaloga.sprememba;
87
+ stanjeNaDan[naDan].tZaloga = skupaj.zaloga;
88
+ }
89
+ }
90
+ if (opts.samoPoZadnjiInventuri) {
91
+ let zadnjiDanZInventuro = Object.values(stanjeNaDan).findLast(d => d.inventuraZ && d.inventuraK);
92
+ for (let key of Object.keys(stanjeNaDan).filter(k => k < zadnjiDanZInventuro?.dan))
93
+ delete stanjeNaDan[key];
94
+ }
95
+ Object.values(stanjeNaDan).forEach(v => { v.razlika = v.zaloga - v.kartica; v.tRazlika = v.tZaloga - v.tKartica; });
96
+ skupaj.razlika = skupaj.zaloga - skupaj.kartica;
97
+ return {
98
+ stanjeNaDan,
99
+ niKnjizbe,
100
+ niKnjizbePoInventuri: niKnjizbe.filter(a => !a.predInventuro),
101
+ skupaj,
102
+ niKnjizbePoInventuriSkupaj,
103
+ };
104
+ }
105
+ async function naloziSpremembeZaloge(db, artikel_id, skladisce_id) {
106
+ let mongo = new Mongo(db);
107
+ let data = await mongo.find("spremembaZaloge", { artikel_id, skladisce_id });
108
+ return data.sort((a, b) => a.datum.valueOf() - b.datum.valueOf());
109
+ }
110
+ (async function () {
111
+ let res = await preveriKnjizenjeZalogeArtikla({
112
+ db: "prvak",
113
+ // artikel_id: "61e4d79b9734b73d7d005a84", // convenia
114
+ artikel_id: "61e4d79b9734b73d7d005f73",
115
+ // artikel_id: "61e4d79b9734b73d7d005c68", // enroxil 50
116
+ vrsta_razknjizbe: "ob dobavi",
117
+ skladisce_id: "61e3f10180ff7ecca65e9a33",
118
+ // samoPoZadnjiInventuri: true,
119
+ // vrsta: "dobava",
120
+ });
121
+ let csv = createCsv(Object.values(res?.stanjeNaDan || {}), { prettyPrint: true });
122
+ for (let line of csv)
123
+ console.log(line);
124
+ console.log('res?.niKnjizbePoInventuriSkupaj', res?.niKnjizbePoInventuriSkupaj);
125
+ for (let niKnj of res?.niKnjizbePoInventuri || []) {
126
+ console.log("Ni razknjiženo: ", niKnj.datum, niKnj.kolicina * (niKnj.enotaFaktor || 1), niKnj.vrsta, niKnj.dokument_id);
127
+ }
128
+ process.exit(0);
129
+ })();
130
+ //# sourceMappingURL=preveriKnjizenjeZalogeArtikla.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preveriKnjizenjeZalogeArtikla.mjs","sourceRoot":"","sources":["../src/preveriKnjizenjeZalogeArtikla.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAgE,cAAc,GAAG,MAAM,aAAa,CAAC;AAC5G,OAAO,KAAK,MAAM,aAAa,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AA0BvC,SAAS,SAAS,CAAC,GAAW;IAC7B,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;AAC3G,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,6BAA6B,CAAE,IAQnD;IAED,IAAI,OAAO,GAAG,MAAM,cAAc,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,gBAAgB,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,CAA8B,CAAC;IAEtI,OAAO,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;I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AC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;AACnE,CAAC;AAED,CAAC,KAAK;IACL,IAAI,GAAG,GAAG,MAAM,6BAA6B,CAAC;QAC7C,EAAE,EAAE,OAAO;QACX,sDAAsD;QACtD,UAAU,EAAE,0BAA0B;QACtC,wDAAwD;QACxD,gBAAgB,EAAE,WAAW;QAC7B,YAAY,EAAE,0BAA0B;QACxC,+BAA+B;QAC/B,mBAAmB;KACnB,CAAC,CAAC;IAEH,IAAI,GAAG,GAAG,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,WAAW,IAAE,EAAE,CAAC,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;IAChF,KAAK,IAAI,IAAI,IAAI,GAAG;QAAE,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;IAEvC,OAAO,CAAC,GAAG,CAAC,iCAAiC,EAAE,GAAG,EAAE,0BAA0B,CAAC,CAAC;IAChF,KAAK,IAAI,KAAK,IAAI,GAAG,EAAE,oBAAoB,IAAI,EAAE,EAAE;QAClD,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,GAAC,CAAC,KAAK,CAAC,WAAW,IAAE,CAAC,CAAC,EAAE,KAAK,CAAC,KAAK,EAAG,KAAK,CAAC,WAAW,CAAC,CAAA;KACpH;IAED,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACjB,CAAC,CAAC,EAAE,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { Username } from "./types/shared.mjs";
2
+ export interface PrisotnostOsebe {
3
+ _id: string;
4
+ kdo: Username;
5
+ dan: string;
6
+ odUre: string;
7
+ doUre: string;
8
+ lokacija: string;
9
+ prisotnost: boolean;
10
+ razlogOdsotnosti?: string;
11
+ opomba?: string;
12
+ razpored?: string;
13
+ }
14
+ //# sourceMappingURL=prisotnostOsebe.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prisotnostOsebe.d.mts","sourceRoot":"","sources":["../src/prisotnostOsebe.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAG9C,MAAM,WAAW,eAAe;IAC5B,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,QAAQ,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=prisotnostOsebe.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prisotnostOsebe.mjs","sourceRoot":"","sources":["../src/prisotnostOsebe.mts"],"names":[],"mappings":""}