cry-klikvet-logic 0.10.287 → 0.10.288

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 (585) hide show
  1. package/dist/q-promet.js +26 -27
  2. package/dist/q-promet.js.map +1 -1
  3. package/package.json +1 -1
  4. package/tsconfig.tsbuildinfo +1 -1
  5. package/dist/IPV.d.ts +0 -4
  6. package/dist/IPV.d.ts.map +0 -1
  7. package/dist/IPV.js +0 -7
  8. package/dist/IPV.js.map +0 -1
  9. package/dist/ObjectId.d.ts +0 -4
  10. package/dist/ObjectId.d.ts.map +0 -1
  11. package/dist/ObjectId.js +0 -4
  12. package/dist/ObjectId.js.map +0 -1
  13. package/dist/besediloKarence.d.ts +0 -51
  14. package/dist/besediloKarence.d.ts.map +0 -1
  15. package/dist/besediloKarence.js +0 -210
  16. package/dist/besediloKarence.js.map +0 -1
  17. package/dist/calcTimeQuery.d.ts +0 -2
  18. package/dist/calcTimeQuery.d.ts.map +0 -1
  19. package/dist/calcTimeQuery.js +0 -14
  20. package/dist/calcTimeQuery.js.map +0 -1
  21. package/dist/certs.d.ts +0 -14
  22. package/dist/certs.d.ts.map +0 -1
  23. package/dist/certs.js +0 -31
  24. package/dist/certs.js.map +0 -1
  25. package/dist/collectionZalogeNaDan.d.ts +0 -2
  26. package/dist/collectionZalogeNaDan.d.ts.map +0 -1
  27. package/dist/collectionZalogeNaDan.js +0 -4
  28. package/dist/collectionZalogeNaDan.js.map +0 -1
  29. package/dist/davki.d.ts +0 -7
  30. package/dist/davki.d.ts.map +0 -1
  31. package/dist/davki.js +0 -15
  32. package/dist/davki.js.map +0 -1
  33. package/dist/davkiRacuna.d.ts +0 -3
  34. package/dist/davkiRacuna.d.ts.map +0 -1
  35. package/dist/davkiRacuna.js +0 -23
  36. package/dist/davkiRacuna.js.map +0 -1
  37. package/dist/dayjs.d.ts +0 -3
  38. package/dist/dayjs.d.ts.map +0 -1
  39. package/dist/dayjs.js +0 -5
  40. package/dist/dayjs.js.map +0 -1
  41. package/dist/ensureIndexes.d.ts +0 -4
  42. package/dist/ensureIndexes.d.ts.map +0 -1
  43. package/dist/ensureIndexes.js +0 -152
  44. package/dist/ensureIndexes.js.map +0 -1
  45. package/dist/idjiArtiklovKiImajoLahkoZalogo.d.ts +0 -2
  46. package/dist/idjiArtiklovKiImajoLahkoZalogo.d.ts.map +0 -1
  47. package/dist/idjiArtiklovKiImajoLahkoZalogo.js +0 -16
  48. package/dist/idjiArtiklovKiImajoLahkoZalogo.js.map +0 -1
  49. package/dist/index.d.ts +0 -114
  50. package/dist/index.d.ts.map +0 -1
  51. package/dist/index.js +0 -75
  52. package/dist/index.js.map +0 -1
  53. package/dist/isSIVAT.d.ts +0 -2
  54. package/dist/isSIVAT.d.ts.map +0 -1
  55. package/dist/isSIVAT.js +0 -31
  56. package/dist/isSIVAT.js.map +0 -1
  57. package/dist/izracunajNovoMaloprodajnoCeno.d.ts +0 -5
  58. package/dist/izracunajNovoMaloprodajnoCeno.d.ts.map +0 -1
  59. package/dist/izracunajNovoMaloprodajnoCeno.js +0 -24
  60. package/dist/izracunajNovoMaloprodajnoCeno.js.map +0 -1
  61. package/dist/karticaArtikla.d.ts +0 -24
  62. package/dist/karticaArtikla.d.ts.map +0 -1
  63. package/dist/karticaArtikla.js +0 -197
  64. package/dist/karticaArtikla.js.map +0 -1
  65. package/dist/koledar.d.ts +0 -13
  66. package/dist/koledar.d.ts.map +0 -1
  67. package/dist/koledar.js +0 -34
  68. package/dist/koledar.js.map +0 -1
  69. package/dist/lahkoImaZalogo.d.ts +0 -4
  70. package/dist/lahkoImaZalogo.d.ts.map +0 -1
  71. package/dist/lahkoImaZalogo.js +0 -16
  72. package/dist/lahkoImaZalogo.js.map +0 -1
  73. package/dist/maint/nastaviNbcArtiklomIzMpc.d.ts +0 -3
  74. package/dist/maint/nastaviNbcArtiklomIzMpc.d.ts.map +0 -1
  75. package/dist/maint/nastaviNbcArtiklomIzMpc.js +0 -39
  76. package/dist/maint/nastaviNbcArtiklomIzMpc.js.map +0 -1
  77. package/dist/maint/poisciNapakeVSpremembiZaloge.d.ts +0 -2
  78. package/dist/maint/poisciNapakeVSpremembiZaloge.d.ts.map +0 -1
  79. package/dist/maint/poisciNapakeVSpremembiZaloge.js +0 -62
  80. package/dist/maint/poisciNapakeVSpremembiZaloge.js.map +0 -1
  81. package/dist/maint/poknjiziVsoZgodovino.d.ts +0 -55
  82. package/dist/maint/poknjiziVsoZgodovino.d.ts.map +0 -1
  83. package/dist/maint/poknjiziVsoZgodovino.js +0 -254
  84. package/dist/maint/poknjiziVsoZgodovino.js.map +0 -1
  85. package/dist/maint/popraviNabaveCeneNaRacunih.d.ts +0 -6
  86. package/dist/maint/popraviNabaveCeneNaRacunih.d.ts.map +0 -1
  87. package/dist/maint/popraviNabaveCeneNaRacunih.js +0 -42
  88. package/dist/maint/popraviNabaveCeneNaRacunih.js.map +0 -1
  89. package/dist/maint/popraviNabavneCeneNaInventurah.d.ts +0 -3
  90. package/dist/maint/popraviNabavneCeneNaInventurah.d.ts.map +0 -1
  91. package/dist/maint/popraviNabavneCeneNaInventurah.js +0 -26
  92. package/dist/maint/popraviNabavneCeneNaInventurah.js.map +0 -1
  93. package/dist/models/PmzKategorijeZivali.d.ts +0 -90
  94. package/dist/models/PmzKategorijeZivali.d.ts.map +0 -1
  95. package/dist/models/PmzKategorijeZivali.js +0 -44
  96. package/dist/models/PmzKategorijeZivali.js.map +0 -1
  97. package/dist/models/PmzZaZivali.d.ts +0 -90
  98. package/dist/models/PmzZaZivali.d.ts.map +0 -1
  99. package/dist/models/PmzZaZivali.js +0 -44
  100. package/dist/models/PmzZaZivali.js.map +0 -1
  101. package/dist/models/Serijske.d.ts +0 -21
  102. package/dist/models/Serijske.d.ts.map +0 -1
  103. package/dist/models/Serijske.js +0 -3
  104. package/dist/models/Serijske.js.map +0 -1
  105. package/dist/models/SmsOddaja.d.ts +0 -15
  106. package/dist/models/SmsOddaja.d.ts.map +0 -1
  107. package/dist/models/SmsOddaja.js +0 -2
  108. package/dist/models/SmsOddaja.js.map +0 -1
  109. package/dist/models/kodaPopusta.d.ts +0 -9
  110. package/dist/models/kodaPopusta.d.ts.map +0 -1
  111. package/dist/models/kodaPopusta.js +0 -2
  112. package/dist/models/kodaPopusta.js.map +0 -1
  113. package/dist/nazivStranke.d.ts +0 -4
  114. package/dist/nazivStranke.d.ts.map +0 -1
  115. package/dist/nazivStranke.js +0 -11
  116. package/dist/nazivStranke.js.map +0 -1
  117. package/dist/neuporabljeno.d.ts +0 -5
  118. package/dist/neuporabljeno.d.ts.map +0 -1
  119. package/dist/neuporabljeno.js +0 -35
  120. package/dist/neuporabljeno.js.map +0 -1
  121. package/dist/pobrisiZgodovinoNaDan.d.ts +0 -3
  122. package/dist/pobrisiZgodovinoNaDan.d.ts.map +0 -1
  123. package/dist/pobrisiZgodovinoNaDan.js +0 -19
  124. package/dist/pobrisiZgodovinoNaDan.js.map +0 -1
  125. package/dist/podatkiRejca.d.ts +0 -56
  126. package/dist/podatkiRejca.d.ts.map +0 -1
  127. package/dist/podatkiRejca.js +0 -116
  128. package/dist/podatkiRejca.js.map +0 -1
  129. package/dist/polnaInventura.d.ts +0 -5
  130. package/dist/polnaInventura.d.ts.map +0 -1
  131. package/dist/polnaInventura.js +0 -124
  132. package/dist/polnaInventura.js.map +0 -1
  133. package/dist/porabaZaDobavnico.d.ts +0 -13
  134. package/dist/porabaZaDobavnico.d.ts.map +0 -1
  135. package/dist/porabaZaDobavnico.js +0 -91
  136. package/dist/porabaZaDobavnico.js.map +0 -1
  137. package/dist/preracunajPostavkoBlagovnice.d.ts +0 -25
  138. package/dist/preracunajPostavkoBlagovnice.d.ts.map +0 -1
  139. package/dist/preracunajPostavkoBlagovnice.js +0 -46
  140. package/dist/preracunajPostavkoBlagovnice.js.map +0 -1
  141. package/dist/preracunajZalogo.d.ts +0 -117
  142. package/dist/preracunajZalogo.d.ts.map +0 -1
  143. package/dist/preracunajZalogo.js +0 -104
  144. package/dist/preracunajZalogo.js.map +0 -1
  145. package/dist/prisotnostOsebe.d.ts +0 -13
  146. package/dist/prisotnostOsebe.d.ts.map +0 -1
  147. package/dist/prisotnostOsebe.js +0 -2
  148. package/dist/prisotnostOsebe.js.map +0 -1
  149. package/dist/q-blagovnice.d.ts +0 -10
  150. package/dist/q-blagovnice.d.ts.map +0 -1
  151. package/dist/q-blagovnice.js +0 -25
  152. package/dist/q-blagovnice.js.map +0 -1
  153. package/dist/q-isciPoObravnavah.d.ts +0 -35
  154. package/dist/q-isciPoObravnavah.d.ts.map +0 -1
  155. package/dist/q-isciPoObravnavah.js +0 -130
  156. package/dist/q-isciPoObravnavah.js.map +0 -1
  157. package/dist/q-isciPoRacunih.d.ts +0 -165
  158. package/dist/q-isciPoRacunih.d.ts.map +0 -1
  159. package/dist/q-isciPoRacunih.js +0 -153
  160. package/dist/q-isciPoRacunih.js.map +0 -1
  161. package/dist/q-mojPromet.d.ts +0 -26
  162. package/dist/q-mojPromet.d.ts.map +0 -1
  163. package/dist/q-mojPromet.js +0 -163
  164. package/dist/q-mojPromet.js.map +0 -1
  165. package/dist/q-porabaZdravil.d.ts +0 -33
  166. package/dist/q-porabaZdravil.d.ts.map +0 -1
  167. package/dist/q-porabaZdravil.js +0 -180
  168. package/dist/q-porabaZdravil.js.map +0 -1
  169. package/dist/q-prodano.d.ts +0 -27
  170. package/dist/q-prodano.d.ts.map +0 -1
  171. package/dist/q-prodano.js +0 -116
  172. package/dist/q-prodano.js.map +0 -1
  173. package/dist/q-prodanoPorabljeno.d.ts +0 -13
  174. package/dist/q-prodanoPorabljeno.d.ts.map +0 -1
  175. package/dist/q-prodanoPorabljeno.js +0 -70
  176. package/dist/q-prodanoPorabljeno.js.map +0 -1
  177. package/dist/q-promet.d.ts +0 -92
  178. package/dist/q-racunovodji.d.ts +0 -34
  179. package/dist/q-racunovodji.d.ts.map +0 -1
  180. package/dist/q-racunovodji.js +0 -276
  181. package/dist/q-racunovodji.js.map +0 -1
  182. package/dist/q-skupineIzdelkov.d.ts +0 -12
  183. package/dist/q-skupineIzdelkov.d.ts.map +0 -1
  184. package/dist/q-skupineIzdelkov.js +0 -55
  185. package/dist/q-skupineIzdelkov.js.map +0 -1
  186. package/dist/q-skupineStrank.d.ts +0 -12
  187. package/dist/q-skupineStrank.d.ts.map +0 -1
  188. package/dist/q-skupineStrank.js +0 -55
  189. package/dist/q-skupineStrank.js.map +0 -1
  190. package/dist/q-strankeKlasificiraj.d.ts +0 -7
  191. package/dist/q-strankeKlasificiraj.d.ts.map +0 -1
  192. package/dist/q-strankeKlasificiraj.js +0 -74
  193. package/dist/q-strankeKlasificiraj.js.map +0 -1
  194. package/dist/q-strankeZadnjiObiski.d.ts +0 -6
  195. package/dist/q-strankeZadnjiObiski.d.ts.map +0 -1
  196. package/dist/q-strankeZadnjiObiski.js +0 -35
  197. package/dist/q-strankeZadnjiObiski.js.map +0 -1
  198. package/dist/q-zakljucek-blagajne.d.ts +0 -35
  199. package/dist/q-zakljucek-blagajne.d.ts.map +0 -1
  200. package/dist/q-zakljucek-blagajne.js +0 -107
  201. package/dist/q-zakljucek-blagajne.js.map +0 -1
  202. package/dist/razknjiziBlagovnico.d.ts +0 -3
  203. package/dist/razknjiziBlagovnico.d.ts.map +0 -1
  204. package/dist/razknjiziBlagovnico.js +0 -41
  205. package/dist/razknjiziBlagovnico.js.map +0 -1
  206. package/dist/razknjiziDobavnico.d.ts +0 -4
  207. package/dist/razknjiziDobavnico.d.ts.map +0 -1
  208. package/dist/razknjiziDobavnico.js +0 -51
  209. package/dist/razknjiziDobavnico.js.map +0 -1
  210. package/dist/razpisiDatum.d.ts +0 -17
  211. package/dist/razpisiDatum.d.ts.map +0 -1
  212. package/dist/razpisiDatum.js +0 -52
  213. package/dist/razpisiDatum.js.map +0 -1
  214. package/dist/round.d.ts +0 -3
  215. package/dist/round.d.ts.map +0 -1
  216. package/dist/round.js +0 -3
  217. package/dist/round.js.map +0 -1
  218. package/dist/serije.d.ts +0 -91
  219. package/dist/serije.d.ts.map +0 -1
  220. package/dist/serije.js +0 -186
  221. package/dist/serije.js.map +0 -1
  222. package/dist/sestaviNaslov.d.ts +0 -4
  223. package/dist/sestaviNaslov.d.ts.map +0 -1
  224. package/dist/sestaviNaslov.js +0 -17
  225. package/dist/sestaviNaslov.js.map +0 -1
  226. package/dist/smsCepljen.d.ts +0 -25
  227. package/dist/smsCepljen.d.ts.map +0 -1
  228. package/dist/smsCepljen.js +0 -27
  229. package/dist/smsCepljen.js.map +0 -1
  230. package/dist/smsCepljenjaNaDan.d.ts +0 -24
  231. package/dist/smsCepljenjaNaDan.d.ts.map +0 -1
  232. package/dist/smsCepljenjaNaDan.js +0 -83
  233. package/dist/smsCepljenjaNaDan.js.map +0 -1
  234. package/dist/smsCepljenjeBesedilo.d.ts +0 -18
  235. package/dist/smsCepljenjeBesedilo.d.ts.map +0 -1
  236. package/dist/smsCepljenjeBesedilo.js +0 -11
  237. package/dist/smsCepljenjeBesedilo.js.map +0 -1
  238. package/dist/smsMenjave.d.ts +0 -11
  239. package/dist/smsMenjave.d.ts.map +0 -1
  240. package/dist/smsMenjave.js +0 -15
  241. package/dist/smsMenjave.js.map +0 -1
  242. package/dist/smsNarocen.d.ts +0 -24
  243. package/dist/smsNarocen.d.ts.map +0 -1
  244. package/dist/smsNarocen.js +0 -26
  245. package/dist/smsNarocen.js.map +0 -1
  246. package/dist/smsNarocenBesedilo.d.ts +0 -18
  247. package/dist/smsNarocenBesedilo.d.ts.map +0 -1
  248. package/dist/smsNarocenBesedilo.js +0 -13
  249. package/dist/smsNarocenBesedilo.js.map +0 -1
  250. package/dist/smsNaroceniNaDan.d.ts +0 -22
  251. package/dist/smsNaroceniNaDan.d.ts.map +0 -1
  252. package/dist/smsNaroceniNaDan.js +0 -60
  253. package/dist/smsNaroceniNaDan.js.map +0 -1
  254. package/dist/spremembaZalogeZaObdobje.d.ts +0 -18
  255. package/dist/spremembaZalogeZaObdobje.d.ts.map +0 -1
  256. package/dist/spremembaZalogeZaObdobje.js +0 -97
  257. package/dist/spremembaZalogeZaObdobje.js.map +0 -1
  258. package/dist/spremeniZalogo.d.ts +0 -44
  259. package/dist/spremeniZalogo.d.ts.map +0 -1
  260. package/dist/spremeniZalogo.js +0 -148
  261. package/dist/spremeniZalogo.js.map +0 -1
  262. package/dist/spremeniZalogoNaPodlagiRacuna.d.ts +0 -5
  263. package/dist/spremeniZalogoNaPodlagiRacuna.d.ts.map +0 -1
  264. package/dist/spremeniZalogoNaPodlagiRacuna.js +0 -119
  265. package/dist/spremeniZalogoNaPodlagiRacuna.js.map +0 -1
  266. package/dist/spremeniZalogoZaDobavo.d.ts +0 -5
  267. package/dist/spremeniZalogoZaDobavo.d.ts.map +0 -1
  268. package/dist/spremeniZalogoZaDobavo.js +0 -227
  269. package/dist/spremeniZalogoZaDobavo.js.map +0 -1
  270. package/dist/spremeniZalogoZaInventuro.d.ts +0 -5
  271. package/dist/spremeniZalogoZaInventuro.d.ts.map +0 -1
  272. package/dist/spremeniZalogoZaInventuro.js +0 -112
  273. package/dist/spremeniZalogoZaInventuro.js.map +0 -1
  274. package/dist/spremeniZalogoZaPorabo.d.ts +0 -6
  275. package/dist/spremeniZalogoZaPorabo.d.ts.map +0 -1
  276. package/dist/spremeniZalogoZaPorabo.js +0 -64
  277. package/dist/spremeniZalogoZaPorabo.js.map +0 -1
  278. package/dist/spremeniZalogoZaPrenos.d.ts +0 -5
  279. package/dist/spremeniZalogoZaPrenos.d.ts.map +0 -1
  280. package/dist/spremeniZalogoZaPrenos.js +0 -90
  281. package/dist/spremeniZalogoZaPrenos.js.map +0 -1
  282. package/dist/statusReprodukcije.d.ts +0 -3
  283. package/dist/statusReprodukcije.d.ts.map +0 -1
  284. package/dist/statusReprodukcije.js +0 -14
  285. package/dist/statusReprodukcije.js.map +0 -1
  286. package/dist/strankaInfo.d.ts +0 -11
  287. package/dist/strankaInfo.d.ts.map +0 -1
  288. package/dist/strankaInfo.js +0 -21
  289. package/dist/strankaInfo.js.map +0 -1
  290. package/dist/strankaRacuna.d.ts +0 -33
  291. package/dist/strankaRacuna.d.ts.map +0 -1
  292. package/dist/strankaRacuna.js +0 -22
  293. package/dist/strankaRacuna.js.map +0 -1
  294. package/dist/support/poisciSpremembeMpc.d.ts +0 -11
  295. package/dist/support/poisciSpremembeMpc.d.ts.map +0 -1
  296. package/dist/support/poisciSpremembeMpc.js +0 -50
  297. package/dist/support/poisciSpremembeMpc.js.map +0 -1
  298. package/dist/test/dvojne-dobave.d.ts +0 -2
  299. package/dist/test/dvojne-dobave.d.ts.map +0 -1
  300. package/dist/test/dvojne-dobave.js +0 -156
  301. package/dist/test/dvojne-dobave.js.map +0 -1
  302. package/dist/test/memdb.d.ts +0 -2
  303. package/dist/test/memdb.d.ts.map +0 -1
  304. package/dist/test/memdb.js +0 -36
  305. package/dist/test/memdb.js.map +0 -1
  306. package/dist/test/mesane-enote.d.ts +0 -2
  307. package/dist/test/mesane-enote.d.ts.map +0 -1
  308. package/dist/test/mesane-enote.js +0 -65
  309. package/dist/test/mesane-enote.js.map +0 -1
  310. package/dist/test/prestavitev.d.ts +0 -2
  311. package/dist/test/prestavitev.d.ts.map +0 -1
  312. package/dist/test/prestavitev.js +0 -122
  313. package/dist/test/prestavitev.js.map +0 -1
  314. package/dist/test/serijske.d.ts +0 -2
  315. package/dist/test/serijske.d.ts.map +0 -1
  316. package/dist/test/serijske.js +0 -315
  317. package/dist/test/serijske.js.map +0 -1
  318. package/dist/test/sprememba-cene.d.ts +0 -2
  319. package/dist/test/sprememba-cene.d.ts.map +0 -1
  320. package/dist/test/sprememba-cene.js +0 -218
  321. package/dist/test/sprememba-cene.js.map +0 -1
  322. package/dist/test/sprememba-cene2.d.ts +0 -2
  323. package/dist/test/sprememba-cene2.d.ts.map +0 -1
  324. package/dist/test/sprememba-cene2.js +0 -144
  325. package/dist/test/sprememba-cene2.js.map +0 -1
  326. package/dist/test/sprememba-cene3.d.ts +0 -2
  327. package/dist/test/sprememba-cene3.d.ts.map +0 -1
  328. package/dist/test/sprememba-cene3.js +0 -145
  329. package/dist/test/sprememba-cene3.js.map +0 -1
  330. package/dist/test/sprememba-cene4.d.ts +0 -2
  331. package/dist/test/sprememba-cene4.d.ts.map +0 -1
  332. package/dist/test/sprememba-cene4.js +0 -108
  333. package/dist/test/sprememba-cene4.js.map +0 -1
  334. package/dist/test/sprememba-cene5.d.ts +0 -2
  335. package/dist/test/sprememba-cene5.d.ts.map +0 -1
  336. package/dist/test/sprememba-cene5.js +0 -115
  337. package/dist/test/sprememba-cene5.js.map +0 -1
  338. package/dist/test/sprememba-cene6.d.ts +0 -2
  339. package/dist/test/sprememba-cene6.d.ts.map +0 -1
  340. package/dist/test/sprememba-cene6.js +0 -148
  341. package/dist/test/sprememba-cene6.js.map +0 -1
  342. package/dist/test/tuja-zaloga.d.ts +0 -2
  343. package/dist/test/tuja-zaloga.d.ts.map +0 -1
  344. package/dist/test/tuja-zaloga.js +0 -124
  345. package/dist/test/tuja-zaloga.js.map +0 -1
  346. package/dist/test/zaloge.d.ts +0 -2
  347. package/dist/test/zaloge.d.ts.map +0 -1
  348. package/dist/test/zaloge.js +0 -160
  349. package/dist/test/zaloge.js.map +0 -1
  350. package/dist/test/zaloge2.d.ts +0 -2
  351. package/dist/test/zaloge2.d.ts.map +0 -1
  352. package/dist/test/zaloge2.js +0 -177
  353. package/dist/test/zaloge2.js.map +0 -1
  354. package/dist/types/CommandForDevice.d.ts +0 -14
  355. package/dist/types/CommandForDevice.d.ts.map +0 -1
  356. package/dist/types/CommandForDevice.js +0 -2
  357. package/dist/types/CommandForDevice.js.map +0 -1
  358. package/dist/types/Dobavnica.d.ts +0 -47
  359. package/dist/types/Dobavnica.d.ts.map +0 -1
  360. package/dist/types/Dobavnica.js +0 -2
  361. package/dist/types/Dobavnica.js.map +0 -1
  362. package/dist/types/GlavaDokumenta.d.ts +0 -9
  363. package/dist/types/GlavaDokumenta.d.ts.map +0 -1
  364. package/dist/types/GlavaDokumenta.js +0 -2
  365. package/dist/types/GlavaDokumenta.js.map +0 -1
  366. package/dist/types/Obvestilo.d.ts +0 -35
  367. package/dist/types/Obvestilo.d.ts.map +0 -1
  368. package/dist/types/Obvestilo.js +0 -2
  369. package/dist/types/Obvestilo.js.map +0 -1
  370. package/dist/types/SpecifikacijaNeuporabljenega.d.ts +0 -8
  371. package/dist/types/SpecifikacijaNeuporabljenega.d.ts.map +0 -1
  372. package/dist/types/SpecifikacijaNeuporabljenega.js +0 -2
  373. package/dist/types/SpecifikacijaNeuporabljenega.js.map +0 -1
  374. package/dist/types/SpecifikacijaPolneInventure.d.ts +0 -13
  375. package/dist/types/SpecifikacijaPolneInventure.d.ts.map +0 -1
  376. package/dist/types/SpecifikacijaPolneInventure.js +0 -2
  377. package/dist/types/SpecifikacijaPolneInventure.js.map +0 -1
  378. package/dist/types/SpremembaCene.d.ts +0 -15
  379. package/dist/types/SpremembaCene.d.ts.map +0 -1
  380. package/dist/types/SpremembaCene.js +0 -2
  381. package/dist/types/SpremembaCene.js.map +0 -1
  382. package/dist/types/VrstaRazknjizbeZdravila.d.ts +0 -2
  383. package/dist/types/VrstaRazknjizbeZdravila.d.ts.map +0 -1
  384. package/dist/types/VrstaRazknjizbeZdravila.js +0 -2
  385. package/dist/types/VrstaRazknjizbeZdravila.js.map +0 -1
  386. package/dist/types/VrstaSpremembeZaloge.d.ts +0 -6
  387. package/dist/types/VrstaSpremembeZaloge.d.ts.map +0 -1
  388. package/dist/types/VrstaSpremembeZaloge.js +0 -2
  389. package/dist/types/VrstaSpremembeZaloge.js.map +0 -1
  390. package/dist/types/VrsteDokumentov.d.ts +0 -9
  391. package/dist/types/VrsteDokumentov.d.ts.map +0 -1
  392. package/dist/types/VrsteDokumentov.js +0 -3
  393. package/dist/types/VrsteDokumentov.js.map +0 -1
  394. package/dist/types/ZalogaDbAccessor.d.ts +0 -20
  395. package/dist/types/ZalogaDbAccessor.d.ts.map +0 -1
  396. package/dist/types/ZalogaDbAccessor.js +0 -2
  397. package/dist/types/ZalogaDbAccessor.js.map +0 -1
  398. package/dist/types/artikel.d.ts +0 -86
  399. package/dist/types/artikel.d.ts.map +0 -1
  400. package/dist/types/artikel.js +0 -34
  401. package/dist/types/artikel.js.map +0 -1
  402. package/dist/types/blagajna.d.ts +0 -19
  403. package/dist/types/blagajna.d.ts.map +0 -1
  404. package/dist/types/blagajna.js +0 -2
  405. package/dist/types/blagajna.js.map +0 -1
  406. package/dist/types/blagovnica.d.ts +0 -120
  407. package/dist/types/blagovnica.d.ts.map +0 -1
  408. package/dist/types/blagovnica.js +0 -2
  409. package/dist/types/blagovnica.js.map +0 -1
  410. package/dist/types/cepljenje.d.ts +0 -40
  411. package/dist/types/cepljenje.d.ts.map +0 -1
  412. package/dist/types/cepljenje.js +0 -2
  413. package/dist/types/cepljenje.js.map +0 -1
  414. package/dist/types/diagnoza.d.ts +0 -6
  415. package/dist/types/diagnoza.d.ts.map +0 -1
  416. package/dist/types/diagnoza.js +0 -2
  417. package/dist/types/diagnoza.js.map +0 -1
  418. package/dist/types/enota.d.ts +0 -14
  419. package/dist/types/enota.d.ts.map +0 -1
  420. package/dist/types/enota.js +0 -9
  421. package/dist/types/enota.js.map +0 -1
  422. package/dist/types/karence.d.ts +0 -26
  423. package/dist/types/karence.d.ts.map +0 -1
  424. package/dist/types/karence.js +0 -13
  425. package/dist/types/karence.js.map +0 -1
  426. package/dist/types/lokacija.d.ts +0 -12
  427. package/dist/types/lokacija.d.ts.map +0 -1
  428. package/dist/types/lokacija.js +0 -2
  429. package/dist/types/lokacija.js.map +0 -1
  430. package/dist/types/nalepka.d.ts +0 -22
  431. package/dist/types/nalepka.d.ts.map +0 -1
  432. package/dist/types/nalepka.js +0 -2
  433. package/dist/types/nalepka.js.map +0 -1
  434. package/dist/types/naprava.d.ts +0 -24
  435. package/dist/types/naprava.d.ts.map +0 -1
  436. package/dist/types/naprava.js +0 -2
  437. package/dist/types/naprava.js.map +0 -1
  438. package/dist/types/narocen.d.ts +0 -28
  439. package/dist/types/narocen.d.ts.map +0 -1
  440. package/dist/types/narocen.js +0 -2
  441. package/dist/types/narocen.js.map +0 -1
  442. package/dist/types/naslov.d.ts +0 -11
  443. package/dist/types/naslov.d.ts.map +0 -1
  444. package/dist/types/naslov.js +0 -2
  445. package/dist/types/naslov.js.map +0 -1
  446. package/dist/types/nastavitve.d.ts +0 -115
  447. package/dist/types/nastavitve.d.ts.map +0 -1
  448. package/dist/types/nastavitve.js +0 -2
  449. package/dist/types/nastavitve.js.map +0 -1
  450. package/dist/types/obravnava.d.ts +0 -80
  451. package/dist/types/obravnava.d.ts.map +0 -1
  452. package/dist/types/obravnava.js +0 -10
  453. package/dist/types/obravnava.js.map +0 -1
  454. package/dist/types/pacient.d.ts +0 -30
  455. package/dist/types/pacient.d.ts.map +0 -1
  456. package/dist/types/pacient.js +0 -2
  457. package/dist/types/pacient.js.map +0 -1
  458. package/dist/types/partnerji.d.ts +0 -14
  459. package/dist/types/partnerji.d.ts.map +0 -1
  460. package/dist/types/partnerji.js +0 -3
  461. package/dist/types/partnerji.js.map +0 -1
  462. package/dist/types/pasma.d.ts +0 -6
  463. package/dist/types/pasma.d.ts.map +0 -1
  464. package/dist/types/pasma.js +0 -2
  465. package/dist/types/pasma.js.map +0 -1
  466. package/dist/types/podpis.d.ts +0 -8
  467. package/dist/types/podpis.d.ts.map +0 -1
  468. package/dist/types/podpis.js +0 -2
  469. package/dist/types/podpis.js.map +0 -1
  470. package/dist/types/poslovalnica.d.ts +0 -20
  471. package/dist/types/poslovalnica.d.ts.map +0 -1
  472. package/dist/types/poslovalnica.js +0 -2
  473. package/dist/types/poslovalnica.js.map +0 -1
  474. package/dist/types/protokol.d.ts +0 -15
  475. package/dist/types/protokol.d.ts.map +0 -1
  476. package/dist/types/protokol.js +0 -2
  477. package/dist/types/protokol.js.map +0 -1
  478. package/dist/types/racun.d.ts +0 -232
  479. package/dist/types/racun.d.ts.map +0 -1
  480. package/dist/types/racun.js +0 -2
  481. package/dist/types/racun.js.map +0 -1
  482. package/dist/types/shared.d.ts +0 -24
  483. package/dist/types/shared.d.ts.map +0 -1
  484. package/dist/types/shared.js +0 -2
  485. package/dist/types/shared.js.map +0 -1
  486. package/dist/types/skladisce.d.ts +0 -10
  487. package/dist/types/skladisce.d.ts.map +0 -1
  488. package/dist/types/skladisce.js +0 -2
  489. package/dist/types/skladisce.js.map +0 -1
  490. package/dist/types/stranka.d.ts +0 -64
  491. package/dist/types/stranka.d.ts.map +0 -1
  492. package/dist/types/stranka.js +0 -2
  493. package/dist/types/stranka.js.map +0 -1
  494. package/dist/types/teren.d.ts +0 -350
  495. package/dist/types/teren.d.ts.map +0 -1
  496. package/dist/types/teren.js +0 -84
  497. package/dist/types/teren.js.map +0 -1
  498. package/dist/types/uporabnik.d.ts +0 -27
  499. package/dist/types/uporabnik.d.ts.map +0 -1
  500. package/dist/types/uporabnik.js +0 -2
  501. package/dist/types/uporabnik.js.map +0 -1
  502. package/dist/types/vrsta.d.ts +0 -10
  503. package/dist/types/vrsta.d.ts.map +0 -1
  504. package/dist/types/vrsta.js +0 -2
  505. package/dist/types/vrsta.js.map +0 -1
  506. package/dist/types/vrstaObravnave.d.ts +0 -10
  507. package/dist/types/vrstaObravnave.d.ts.map +0 -1
  508. package/dist/types/vrstaObravnave.js +0 -2
  509. package/dist/types/vrstaObravnave.js.map +0 -1
  510. package/dist/types/zaloga.d.ts +0 -53
  511. package/dist/types/zaloga.d.ts.map +0 -1
  512. package/dist/types/zaloga.js +0 -2
  513. package/dist/types/zaloga.js.map +0 -1
  514. package/dist/types/zaracunajDobavnice.d.ts +0 -11
  515. package/dist/types/zaracunajDobavnice.d.ts.map +0 -1
  516. package/dist/types/zaracunajDobavnice.js +0 -2
  517. package/dist/types/zaracunajDobavnice.js.map +0 -1
  518. package/dist/updateOpombeRejca.d.ts +0 -3
  519. package/dist/updateOpombeRejca.d.ts.map +0 -1
  520. package/dist/updateOpombeRejca.js +0 -10
  521. package/dist/updateOpombeRejca.js.map +0 -1
  522. package/dist/updatePotrditevBrejosti.d.ts +0 -3
  523. package/dist/updatePotrditevBrejosti.d.ts.map +0 -1
  524. package/dist/updatePotrditevBrejosti.js +0 -13
  525. package/dist/updatePotrditevBrejosti.js.map +0 -1
  526. package/dist/updatePresusitve.d.ts +0 -3
  527. package/dist/updatePresusitve.d.ts.map +0 -1
  528. package/dist/updatePresusitve.js +0 -12
  529. package/dist/updatePresusitve.js.map +0 -1
  530. package/dist/updateStatusOsemenitve.d.ts +0 -3
  531. package/dist/updateStatusOsemenitve.d.ts.map +0 -1
  532. package/dist/updateStatusOsemenitve.js +0 -12
  533. package/dist/updateStatusOsemenitve.js.map +0 -1
  534. package/dist/vrsteDokumentov.d.ts +0 -9
  535. package/dist/vrsteDokumentov.d.ts.map +0 -1
  536. package/dist/vrsteDokumentov.js +0 -29
  537. package/dist/vrsteDokumentov.js.map +0 -1
  538. package/dist/vsotaDobavZaObdobje.d.ts +0 -10
  539. package/dist/vsotaDobavZaObdobje.d.ts.map +0 -1
  540. package/dist/vsotaDobavZaObdobje.js +0 -49
  541. package/dist/vsotaDobavZaObdobje.js.map +0 -1
  542. package/dist/zakljuciBlagovnico.d.ts +0 -4
  543. package/dist/zakljuciBlagovnico.d.ts.map +0 -1
  544. package/dist/zakljuciBlagovnico.js +0 -61
  545. package/dist/zakljuciBlagovnico.js.map +0 -1
  546. package/dist/zalogaDbAccessorInMem.d.ts +0 -8
  547. package/dist/zalogaDbAccessorInMem.d.ts.map +0 -1
  548. package/dist/zalogaDbAccessorInMem.js +0 -124
  549. package/dist/zalogaDbAccessorInMem.js.map +0 -1
  550. package/dist/zalogaNaDan.d.ts +0 -9
  551. package/dist/zalogaNaDan.d.ts.map +0 -1
  552. package/dist/zalogaNaDan.js +0 -38
  553. package/dist/zalogaNaDan.js.map +0 -1
  554. package/dist/zalogaNaDanIzracunana.d.ts +0 -7
  555. package/dist/zalogaNaDanIzracunana.d.ts.map +0 -1
  556. package/dist/zalogaNaDanIzracunana.js +0 -59
  557. package/dist/zalogaNaDanIzracunana.js.map +0 -1
  558. package/dist/zalogaPoDnevih.d.ts +0 -9
  559. package/dist/zalogaPoDnevih.d.ts.map +0 -1
  560. package/dist/zalogaPoDnevih.js +0 -52
  561. package/dist/zalogaPoDnevih.js.map +0 -1
  562. package/dist/zapisiZalogoPoDnevih.d.ts +0 -7
  563. package/dist/zapisiZalogoPoDnevih.d.ts.map +0 -1
  564. package/dist/zapisiZalogoPoDnevih.js +0 -88
  565. package/dist/zapisiZalogoPoDnevih.js.map +0 -1
  566. package/dist/zapisiZalogoPoDnevih_old.d.ts +0 -6
  567. package/dist/zapisiZalogoPoDnevih_old.d.ts.map +0 -1
  568. package/dist/zapisiZalogoPoDnevih_old.js +0 -102
  569. package/dist/zapisiZalogoPoDnevih_old.js.map +0 -1
  570. package/dist/zaracunajDobavnice.d.ts +0 -9
  571. package/dist/zaracunajDobavnice.d.ts.map +0 -1
  572. package/dist/zaracunajDobavnice.js +0 -168
  573. package/dist/zaracunajDobavnice.js.map +0 -1
  574. package/dist/zavarovanje.d.ts +0 -3
  575. package/dist/zavarovanje.d.ts.map +0 -1
  576. package/dist/zavarovanje.js +0 -11
  577. package/dist/zavarovanje.js.map +0 -1
  578. package/dist/zbrisiZalogoArtiklovKiJeNeMorejoImeti.d.ts +0 -2
  579. package/dist/zbrisiZalogoArtiklovKiJeNeMorejoImeti.d.ts.map +0 -1
  580. package/dist/zbrisiZalogoArtiklovKiJeNeMorejoImeti.js +0 -28
  581. package/dist/zbrisiZalogoArtiklovKiJeNeMorejoImeti.js.map +0 -1
  582. package/dist/zeleniPribitek.d.ts +0 -6
  583. package/dist/zeleniPribitek.d.ts.map +0 -1
  584. package/dist/zeleniPribitek.js +0 -8
  585. package/dist/zeleniPribitek.js.map +0 -1
@@ -1,197 +0,0 @@
1
- import { Mongo } from "cry-db";
2
- import { smerPoslovnegaDogodka } from "./vrsteDokumentov.js";
3
- import { knjiziPoEnotiNabave } from "./spremeniZalogo.js";
4
- export async function karticaArtikla(_id, db, razknjizba, skladisca) {
5
- let zdruzeno = [];
6
- let vrstaRazknjizbe;
7
- let artikel;
8
- const mongo = new Mongo(db);
9
- try {
10
- artikel = await mongo.findById("artikli", _id);
11
- if (!artikel) {
12
- await mongo.close();
13
- return [];
14
- }
15
- vrstaRazknjizbe = artikel.zalogoRazknjizi || razknjizba;
16
- let racuni = await pridobiRacune(mongo, _id);
17
- let blagovnice = await pridobiBlagovnice(mongo, _id);
18
- zdruzeno = [
19
- ...racuni,
20
- ...blagovnice
21
- ];
22
- }
23
- catch (err) {
24
- await mongo.close();
25
- console.error(`karticaArtikla: ${err.message || err}`);
26
- return [];
27
- }
28
- await mongo.close();
29
- zdruzeno.sort((a, b) => a.datum.valueOf() - b.datum.valueOf());
30
- let zaloga = 0;
31
- let vrednostZaloge = 0;
32
- let nbc = 0;
33
- let mpc = 0;
34
- if (skladisca)
35
- zdruzeno = zdruzeno.filter(d => skladisca.includes(d.skladisce_id.toString()));
36
- for (let dokument of zdruzeno) {
37
- let smer = smerPoslovnegaDogodka[dokument.vrsta];
38
- dokument.enotaFaktor = dokument.enotaFaktor || 1;
39
- // NE SPREMINJAJ VRSTNEGA REDA VRSIC!
40
- nbc = dokument.nbc;
41
- if (knjiziPoEnotiNabave(dokument.vrsta)) {
42
- nbc = (dokument.nbc / dokument.enotaFaktor);
43
- }
44
- else {
45
- dokument.enotaFaktor = 1;
46
- }
47
- if (dokument.vrsta === "prodaja")
48
- mpc = dokument.mpc;
49
- let spremeniZalogo = spreminajZalogo(dokument, vrstaRazknjizbe, artikel);
50
- if (spremeniZalogo)
51
- vrednostZaloge += smer * dokument.kolicina * nbc * dokument.enotaFaktor;
52
- let staraZaloga = zaloga;
53
- if (spremeniZalogo)
54
- zaloga += smer * dokument.kolicina * dokument.enotaFaktor;
55
- if (dokument.vrsta === "dobava" && staraZaloga >= .1 && zaloga > .1 && vrednostZaloge > .1)
56
- nbc = vrednostZaloge / zaloga;
57
- if (dokument.vrsta === "dobava" && artikel.kategorija === "potrošni material")
58
- nbc = dokument.nbc;
59
- if (dokument.vrsta === "inventura") {
60
- zaloga = dokument.popisanaKolicina || 0;
61
- vrednostZaloge = zaloga * nbc;
62
- }
63
- dokument.nbc = nbc;
64
- dokument.mpc = mpc;
65
- dokument.smer = smer;
66
- dokument.zaloga = zaloga;
67
- dokument.vrednostZaloge = vrednostZaloge;
68
- }
69
- return zdruzeno.reverse();
70
- }
71
- function spreminajZalogo(dokument, vrstaRazknjizbe, artikel) {
72
- return ((artikel) => {
73
- if (artikel.kategorija === "izdelek")
74
- return true;
75
- if (artikel.kategorija !== "zdravilo")
76
- return false;
77
- switch (dokument.vrsta) {
78
- case "prodaja":
79
- return vrstaRazknjizbe === "ob prodaji";
80
- case "dobava":
81
- return true;
82
- return vrstaRazknjizbe === "ob dobavi";
83
- case "prevzem":
84
- return true;
85
- case "poraba":
86
- return true;
87
- case "inventura":
88
- case "izdaja":
89
- case "iznos":
90
- case "odpis":
91
- case "vnos":
92
- case "vračilo":
93
- return vrstaRazknjizbe !== "ob dobavi";
94
- }
95
- })(artikel);
96
- }
97
- async function pridobiRacune(mongo, _id) {
98
- return await mongo.aggregate("racuni", [
99
- {
100
- $match: {
101
- "postavke.artikel_id": Mongo.objectid(_id)
102
- }
103
- },
104
- {
105
- $unwind: "$postavke"
106
- },
107
- {
108
- $match: {
109
- "postavke.artikel_id": Mongo.objectid(_id),
110
- },
111
- },
112
- {
113
- $project: {
114
- dokument_id: "$_id",
115
- datum: 1,
116
- lokacija_id: 1,
117
- blagajna_id: 1,
118
- skladisce_id: 1,
119
- stevilka: 1,
120
- enota: "$postavke.enota",
121
- kolicina: "$postavke.kolicina",
122
- davek: "$postavke.tdav",
123
- nbc: "$postavke.nbc",
124
- mpc: "$postavke.mpc0",
125
- vrsta: "prodaja",
126
- }
127
- },
128
- ]);
129
- }
130
- async function pridobiBlagovnice(mongo, _id) {
131
- return await mongo.aggregate("blagovnice", [
132
- {
133
- $match: {
134
- "postavke.artikel_id": Mongo.objectid(_id),
135
- vrsta: { $ne: "naročilo" }
136
- },
137
- },
138
- {
139
- $unwind: "$postavke"
140
- },
141
- {
142
- $match: {
143
- "postavke.artikel_id": Mongo.objectid(_id),
144
- },
145
- },
146
- {
147
- $project: {
148
- dokument_id: "$_id",
149
- datum: 1,
150
- lokacija_id: 1,
151
- skladisce_id: 1,
152
- vrsta: 1,
153
- dobavitelj_id: 1,
154
- enota: "$postavke.enota",
155
- enotaFaktor: "$postavke.enotaFaktor",
156
- kolicina: "$postavke.kolicina",
157
- davek: "$postavke.tdav",
158
- nbcN: "$postavke.nbcN",
159
- nbc: "$postavke.nbc",
160
- popisanaKolicina: "$postavke.popisanaKolicina",
161
- stevilka: "$dokumentDobavitelja",
162
- }
163
- },
164
- ]);
165
- }
166
- // (async function() {
167
- // console.time("čas")
168
- // let _id = "5fe4883922c6e4a8ff30abb8"
169
- // // _id ="5fe4702bba26eea02e5229db"
170
- // //let a = ((await (new Mongo("vet")).findOne("artikli", { naziv: "ENROXIL TBL 150MG" }))) as any;
171
- // //let _id = a._id
172
- // //let a = ((await (new Mongo("vet")).findOne("artikli", { _id })) as any);
173
- // let res = await karticaArtikla(_id, "vet", "ob dobavi",)
174
- // let lines = createCsv(res, {
175
- // // keys: [
176
- // // "datum",
177
- // // "vrsta",
178
- // // "smer",
179
- // // "enotaFaktor",
180
- // // "kolicina",
181
- // // "zaloga",
182
- // // "nbc",
183
- // // "vrednostZaloge",
184
- // // "mpc",
185
- // // ],
186
- // dateFormat: "YYYY-MM-DD HH:mm",
187
- // reverseLines: true,
188
- // quoteWith: "",
189
- // exportIdField: false,
190
- // exportIdFields: false,
191
- // prettyPrint: true,
192
- // })
193
- // for(let line of lines) console.log(line)
194
- // //console.timeEnd("čas")
195
- // process.exit(0)
196
- // })()
197
- //# sourceMappingURL=karticaArtikla.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"karticaArtikla.js","sourceRoot":"","sources":["../src/karticaArtikla.ts"],"names":[],"mappings":"AAAA,OAAO,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ACJ;QACD;YACI,QAAQ,EAAE;gBACN,WAAW,EAAE,MAAM;gBACnB,KAAK,EAAE,CAAC;gBACR,WAAW,EAAE,CAAC;gBACd,YAAY,EAAE,CAAC;gBACf,KAAK,EAAE,CAAC;gBACR,aAAa,EAAE,CAAC;gBAChB,KAAK,EAAE,iBAAiB;gBACxB,WAAW,EAAE,uBAAuB;gBACpC,QAAQ,EAAE,oBAAoB;gBAC9B,KAAK,EAAE,gBAAgB;gBACvB,IAAI,EAAE,gBAAgB;gBACtB,GAAG,EAAE,eAAe;gBACpB,gBAAgB,EAAE,4BAA4B;gBAC9C,QAAQ,EAAE,sBAAsB;aACnC;SACJ;KACJ,CACmB,CAAA;AAE5B,CAAC;AAGD,sBAAsB;AAEtB,0BAA0B;AAE1B,2CAA2C;AAC3C,yCAAyC;AACzC,uGAAuG;AACvG,wBAAwB;AACxB,iFAAiF;AACjF,+DAA+D;AAE/D,mCAAmC;AACnC,qBAAqB;AACrB,0BAA0B;AAC1B,0BAA0B;AAC1B,yBAAyB;AACzB,gCAAgC;AAChC,6BAA6B;AAC7B,2BAA2B;AAC3B,wBAAwB;AACxB,mCAAmC;AACnC,wBAAwB;AACxB,gBAAgB;AAChB,0CAA0C;AAC1C,8BAA8B;AAC9B,yBAAyB;AACzB,gCAAgC;AAChC,iCAAiC;AACjC,6BAA6B;AAE7B,SAAS;AAET,+CAA+C;AAE/C,+BAA+B;AAC/B,sBAAsB;AAEtB,OAAO"}
package/dist/koledar.d.ts DELETED
@@ -1,13 +0,0 @@
1
- import { Lokacija } from "./types/lokacija.js";
2
- import { Narocen } from "./types/narocen.js";
3
- import { Pacient } from "./types/pacient.js";
4
- import { Stranka } from "./types/stranka.js";
5
- interface PostavkaKoledarja {
6
- narocen: Narocen;
7
- stranka: Stranka;
8
- pacient: Pacient;
9
- lokacija: Lokacija;
10
- }
11
- export declare function koledarVeterinarja(tenant: string, _id: string): Promise<PostavkaKoledarja[]>;
12
- export {};
13
- //# sourceMappingURL=koledar.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"koledar.d.ts","sourceRoot":"","sources":["../src/koledar.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAG7C,UAAU,iBAAiB;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;CACtB;AAED,wBAAsB,kBAAkB,CACpC,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,GACX,OAAO,CAAC,iBAAiB,EAAE,CAAC,CA8B/B"}
package/dist/koledar.js DELETED
@@ -1,34 +0,0 @@
1
- import { Mongo } from "cry-db";
2
- import { arrayToObject } from "cry-helpers";
3
- export async function koledarVeterinarja(tenant, _id) {
4
- let mongo = new Mongo(tenant);
5
- let user = await mongo.findById("users", _id);
6
- if (!user)
7
- return [];
8
- let dogodki = await mongo.find("naroceni", { veterinar: user.username, _deleted: { $exists: false } });
9
- if (!dogodki.length)
10
- return [];
11
- let stranke = arrayToObject(await mongo.find("stranke", {
12
- _id: { $in: dogodki.map(e => e.stranka_id) }
13
- }), "_id");
14
- let pacienti = arrayToObject(await mongo.find("pacienti", {
15
- _id: { $in: dogodki.map(e => e.pacient_id) }
16
- }), "_id");
17
- let lokacije = arrayToObject(await mongo.find("lokacije", {
18
- _id: { $in: dogodki.map(e => e.lokacija_id) }
19
- }), "_id");
20
- return dogodki.map(narocen => {
21
- return {
22
- narocen,
23
- stranka: stranke[narocen.stranka_id],
24
- pacient: pacienti[narocen.pacient_id],
25
- lokacija: lokacije[narocen.lokacija_id],
26
- };
27
- });
28
- }
29
- // (async function() {
30
- // let result = await koledarVeterinarja("zvitorepka", "6004dd5e7389194186d0ef33")
31
- // console.log('result',result);
32
- // process.exit(0)
33
- // })();
34
- //# sourceMappingURL=koledar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"koledar.js","sourceRoot":"","sources":["../src/koledar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAc5C,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACpC,MAAc,EACd,GAAW;IAGX,IAAI,KAAK,GAAG,IAAI,KAAK,CAAC,MAAM,CAAC,CAAC;IAE9B,IAAI,IAAI,GAAG,MAAM,KAAK,CAAC,QAAQ,CAAY,OAAO,EAAE,GAAG,CAAC,CAAC;IACzD,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAA;IAEpB,IAAI,OAAO,GAAG,MAAM,KAAK,CAAC,IAAI,CAAU,UAAU,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;IAChH,IAAI,CAAC,OAAO,CAAC,MAAM;QAAE,OAAO,EAAE,CAAA;IAE9B,IAAI,OAAO,GAAG,aAAa,CAAC,MAAM,KAAK,CAAC,IAAI,CAAU,SAAS,EAAE;QAC7D,GAAG,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,CAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,EAAE;KAC/C,CAAC,EAAE,KAAK,CAAC,CAAC;IAEZ,IAAI,QAAQ,GAAG,aAAa,CAAC,MAAM,KAAK,CAAC,IAAI,CAAU,UAAU,EAAE;QAC/D,GAAG,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,EAAE;KAC/C,CAAC,EAAE,KAAK,CAAC,CAAC;IAEX,IAAI,QAAQ,GAAG,aAAa,CAAC,MAAM,KAAK,CAAC,IAAI,CAAW,UAAU,EAAE;QAChE,GAAG,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE;KAChD,CAAC,EAAE,KAAK,CAAC,CAAC;IAEX,OAAO,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE;QACzB,OAAO;YACH,OAAO;YACP,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC;YACpC,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC;YACrC,QAAQ,EAAE,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC;SACrB,CAAA;IAC1B,CAAC,CAAC,CAAC;AACP,CAAC;AAED,sBAAsB;AAEtB,sFAAsF;AACtF,oCAAoC;AAEpC,sBAAsB;AACtB,QAAQ"}
@@ -1,4 +0,0 @@
1
- import { ArtikelKarkoli } from "./types/artikel.js";
2
- import { VrstaRazknjizbeZdravila } from './types/VrstaRazknjizbeZdravila.js';
3
- export declare function lahkoImaZalogo(a: Pick<ArtikelKarkoli, "kategorija" | "vodenjeZaloge" | "zalogoRazknjizi">, privzetaRazknjizbaZdravil: VrstaRazknjizbeZdravila, zaDobavo?: boolean): boolean;
4
- //# sourceMappingURL=lahkoImaZalogo.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lahkoImaZalogo.d.ts","sourceRoot":"","sources":["../src/lahkoImaZalogo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAI7E,wBAAgB,cAAc,CAAC,CAAC,EAAG,IAAI,CAAC,cAAc,EAAE,YAAY,GAAC,eAAe,GAAC,iBAAiB,CAAC,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,QAAQ,UAAM,GAAG,OAAO,CAmBpL"}
@@ -1,16 +0,0 @@
1
- export function lahkoImaZalogo(a, privzetaRazknjizbaZdravil, zaDobavo = false) {
2
- if (!a)
3
- return false;
4
- if (a.kategorija === "potrošni material" || a.kategorija === "storitev")
5
- return false;
6
- if (a.vodenjeZaloge && a.vodenjeZaloge !== "tu")
7
- return false;
8
- if (a.kategorija === "izdelek")
9
- return true;
10
- if (a.kategorija === "zdravilo" && !zaDobavo) {
11
- if ((a.zalogoRazknjizi || privzetaRazknjizbaZdravil) === "ob dobavi")
12
- return false;
13
- }
14
- return true;
15
- }
16
- //# sourceMappingURL=lahkoImaZalogo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lahkoImaZalogo.js","sourceRoot":"","sources":["../src/lahkoImaZalogo.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,cAAc,CAAC,CAAwE,EAAE,yBAAkD,EAAE,QAAQ,GAAC,KAAK;IAEvK,IAAI,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC;IAErB,IAAI,CAAC,CAAC,UAAU,KAAK,mBAAmB,IAAI,CAAC,CAAC,UAAU,KAAK,UAAU;QACnE,OAAO,KAAK,CAAC;IAEjB,IAAI,CAAC,CAAC,aAAa,IAAI,CAAC,CAAC,aAAa,KAAK,IAAI;QAC3C,OAAO,KAAK,CAAC;IAEjB,IAAI,CAAC,CAAC,UAAU,KAAK,SAAS;QAC1B,OAAO,IAAI,CAAC;IAEhB,IAAI,CAAC,CAAC,UAAU,KAAK,UAAU,IAAI,CAAC,QAAQ,EAAE;QAC1C,IAAI,CAAC,CAAC,CAAC,eAAe,IAAI,yBAAyB,CAAC,KAAK,WAAW;YAChE,OAAO,KAAK,CAAC;KACpB;IAED,OAAO,IAAI,CAAC;AAChB,CAAC"}
@@ -1,3 +0,0 @@
1
- import { Mongo } from "cry-db";
2
- export declare function nastaviNbcArtiklomIzMpc(mongo: Mongo): Promise<void>;
3
- //# sourceMappingURL=nastaviNbcArtiklomIzMpc.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"nastaviNbcArtiklomIzMpc.d.ts","sourceRoot":"","sources":["../../src/maint/nastaviNbcArtiklomIzMpc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAK/B,wBAAsB,uBAAuB,CACzC,KAAK,EAAE,KAAK,iBAgCf"}
@@ -1,39 +0,0 @@
1
- import { round4 } from "cry-helpers";
2
- export async function nastaviNbcArtiklomIzMpc(mongo) {
3
- let nastavitve = await mongo.findOne("nastavitve", {});
4
- let artikli = await mongo.find("artikli", {});
5
- for await (let a of artikli) {
6
- if (a.kategorija === "storitev")
7
- continue;
8
- a.nbc = a.nbc || a.zadnjaNbc;
9
- if (!a.nbc && a.mpc) {
10
- let mar = a.zeleniPribitek;
11
- if (!mar && a.kategorija === "izdelek")
12
- mar = nastavitve?.pribitekCeneNaIzdelke || 0;
13
- if (!mar && a.kategorija === "potrošni material")
14
- mar = nastavitve?.pribitekCeneNaIzdelke || 0;
15
- if (!mar && a.kategorija === "zdravilo")
16
- mar = nastavitve?.pribitekCeneNaZdravila || 0;
17
- a.nbc = round4(a.mpc / (1 + (mar || 0)) / (1 + (a.dst || 0)));
18
- }
19
- a.zadnjaNbc = a.zadnjaNbc || a.nbc;
20
- console.log(a.naziv);
21
- await mongo.upsert("artikli", { _id: a._id }, {
22
- $set: {
23
- nbc: a.nbc,
24
- zadnjaNbc: a.zadnjaNbc,
25
- },
26
- $inc: { _rev: 1 },
27
- $currentDate: { _ts: { $type: "timestamp" } }
28
- });
29
- }
30
- }
31
- // (async function go() {
32
- // let server =""
33
- // server = "mongodb://192.168.88.60:27017,192.168.88.61:27017,192.168.88.62:27017/?replicaSet=rs0"
34
- // await nastaviNbcArtiklomIzMpc(
35
- // new Mongo("etv", server)
36
- // );
37
- // process.exit(0)
38
- // })()
39
- //# sourceMappingURL=nastaviNbcArtiklomIzMpc.js.map
@@ -1 +0,0 @@
1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C,CAAC;SACjE;QAED,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,GAAG,CAAC;QAEnC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;QAEpB,MAAM,KAAK,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,GAAG,EAAE,EAAE;YAC1C,IAAI,EAAE;gBACF,GAAG,EAAE,CAAC,CAAC,GAAG;gBACV,SAAS,EAAE,CAAC,CAAC,SAAS;aACzB;YACD,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;YACjB,YAAY,EAAE,EAAE,GAAG,EAAE,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE;SAChD,CAAE,CAAC;KACP;AAEL,CAAC;AAGD,yBAAyB;AAEzB,qBAAqB;AACrB,uGAAuG;AAEvG,qCAAqC;AACrC,mCAAmC;AACnC,SAAS;AACT,sBAAsB;AACtB,OAAO"}
@@ -1,2 +0,0 @@
1
- export declare function poisciNapakeVSpremembiZaloge(db: string, server: string | undefined): Promise<void>;
2
- //# sourceMappingURL=poisciNapakeVSpremembiZaloge.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"poisciNapakeVSpremembiZaloge.d.ts","sourceRoot":"","sources":["../../src/maint/poisciNapakeVSpremembiZaloge.ts"],"names":[],"mappings":"AAKA,wBAAsB,4BAA4B,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,iBAmExF"}
@@ -1,62 +0,0 @@
1
- import { Mongo } from "cry-db";
2
- import { arrayToObject, round2 } from "cry-helpers";
3
- export async function poisciNapakeVSpremembiZaloge(db, server) {
4
- const mongo = new Mongo(db, server);
5
- let spremembe = await mongo.find("spremembaZaloge", {}, { sort: { artikel_id: 1, datum: 1 } });
6
- let zaloge = await mongo.find("zaloga", {});
7
- let artikli = await mongo.find("artikel", {});
8
- let artikliObj = arrayToObject(artikli, "_id");
9
- let tekoce = {};
10
- let sumSprememb = 0;
11
- for (let s of spremembe) {
12
- if (!s.artikel_id) {
13
- console.log('sprememba brez artikla', s);
14
- continue;
15
- }
16
- // if (s.artikel_id.toString() !== "63b3d4c6f3b4501b5cbc32be") continue;
17
- let prej = tekoce[s.artikel_id];
18
- let spr = s.vrednostZaloge.sprememba;
19
- let zdaj = (prej || 0) + spr;
20
- let nova = s.vrednostZaloge.stara + s.vrednostZaloge.sprememba;
21
- sumSprememb += spr;
22
- if (Math.abs(round2(zdaj - s.vrednostZaloge.nova)) > .1)
23
- console.log(s._id.toString(), s.vrstaDogodka, s.artikel_id, zdaj, s.vrednostZaloge.nova);
24
- if (Math.abs(round2(zdaj - nova)) > .1)
25
- console.log("r2", s.artikel_id, zdaj, nova);
26
- // else console.log('ok',s.vrstaDogodka,s._id.toString());
27
- tekoce[s.artikel_id] = zdaj;
28
- }
29
- let sumNapak = 0;
30
- let sporni = [];
31
- if (true) {
32
- for (let zaloga of zaloge) {
33
- let izr = tekoce[zaloga.artikel_id];
34
- if (izr === undefined || isNaN(izr)) {
35
- console.log('NI IZRAČUNA', zaloga.artikel_id);
36
- continue;
37
- }
38
- if (Math.abs(round2(zaloga.vrednost - izr)) > .1) {
39
- let a = artikliObj[zaloga.artikel_id.toString()];
40
- if (!a)
41
- console.log('ni artikla', sumNapak, zaloga.artikel_id);
42
- else
43
- sporni.push(a._id);
44
- console.error("delta", a?.kategorija || "?", a?.naziv || "?", zaloga.vrednost, tekoce[zaloga.artikel_id]);
45
- sumNapak += zaloga.vrednost - izr;
46
- }
47
- delete tekoce[zaloga.artikel_id];
48
- }
49
- if (Object.keys(tekoce).length)
50
- console.log("preveč izračuna", tekoce);
51
- console.log('tekoce', tekoce);
52
- }
53
- console.log('sumSprememb', sumSprememb);
54
- console.log('sumNapak', sumNapak);
55
- console.log('sporni', sporni);
56
- }
57
- // (async function go() {
58
- // await poisciNapakeVSpremembiZaloge("lax", "");
59
- // console.log('done');
60
- // process.exit(0);
61
- // })();
62
- //# sourceMappingURL=poisciNapakeVSpremembiZaloge.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"poisciNapakeVSpremembiZaloge.js","sourceRoot":"","sources":["../../src/maint/poisciNapakeVSpremembiZaloge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAC9B,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAIpD,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAAC,EAAU,EAAE,MAA0B;IAErF,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,EAAE,EAAE,MAAM,CAAC,CAAA;IACnC,IAAI,SAAS,GAAG,MAAM,KAAK,CAAC,IAAI,CAAkB,iBAAiB,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IAChH,IAAI,MAAM,GAAG,MAAM,KAAK,CAAC,IAAI,CAAS,QAAQ,EAAE,EAAE,CAAC,CAAC;IACpD,IAAI,OAAO,GAAG,MAAM,KAAK,CAAC,IAAI,CAAU,SAAS,EAAE,EAAE,CAAC,CAAC;IACvD,IAAI,UAAU,GAAG,aAAa,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAE/C,IAAI,MAAM,GAA2B,EAAE,CAAC;IACxC,IAAI,WAAW,GAAG,CAAC,CAAA;IAEnB,KAAK,IAAI,CAAC,IAAI,SAAS,EAAE;QAErB,IAAI,CAAC,CAAC,CAAC,UAAU,EAAE;YACf,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,CAAC,CAAC,CAAC;YACzC,SAAS;SACZ;QAED,wEAAwE;QAGxE,IAAI,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;QAChC,IAAI,GAAG,GAAG,CAAC,CAAC,cAAc,CAAC,SAAS,CAAC;QACrC,IAAI,IAAI,GAAG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,GAAG,UAAU,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAAC;gBACjD,IAAI,CAAC,CAAC;oBAAE,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,QAAQ,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;;oBAC1D,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;gBAExB,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,EAAE,UAAU,IAAE,GAAG,EAAE,CAAC,EAAE,KAAK,IAAE,GAAG,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAA;gBACrG,QAAQ,IAAI,MAAM,CAAC,QAAQ,GAAG,GAAG,CAAC;aACrC;YAED,OAAO,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAA;SACnC;QACD,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM;YAC1B,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAC,MAAM,CAAC,CAAA;QAEzC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAC,MAAM,CAAC,CAAC;KAEhC;IAED,OAAO,CAAC,GAAG,CAAC,aAAa,EAAC,WAAW,CAAC,CAAC;IACvC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAC,QAAQ,CAAC,CAAC;IACjC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAC,MAAM,CAAC,CAAC;AAGjC,CAAC;AAED,yBAAyB;AACzB,qDAAqD;AACrD,2BAA2B;AAC3B,uBAAuB;AACvB,QAAQ"}
@@ -1,55 +0,0 @@
1
- import { Blagovnica } from "../types/blagovnica.js";
2
- import { Racun } from "../types/racun.js";
3
- import { ArtikelZaRazknjizbo } from "../spremeniZalogo.js";
4
- import { Nastavitve } from "../types/nastavitve.js";
5
- import { ArtikelKarkoli } from "../types/artikel.js";
6
- import { Id } from "cry-db/dist/types.mjs";
7
- import { SpremembaZaloge, Zaloga } from "../types/zaloga.js";
8
- interface Opts {
9
- artikel?: Id;
10
- neRazknjizujObDobavi: boolean;
11
- neSpreminjajProdajnihCen: boolean;
12
- odDatuma?: Date;
13
- stevilkeRacunov?: RegExp;
14
- popraviDatumeBlagovnicaNaDatumeDokumentov?: boolean;
15
- }
16
- export interface ZalogaMemDb {
17
- zaloga: Record<string, Zaloga>;
18
- artikli: Record<string, ArtikelZaRazknjizbo>;
19
- spremembaZaloge: Record<string, SpremembaZaloge>;
20
- inserts: {
21
- spremembaZaloge: Record<string, SpremembaZaloge>;
22
- };
23
- updates: {
24
- zaloga: Record<string, Zaloga>;
25
- artikli: Record<string, Pick<ArtikelKarkoli, "_id" | "nbc" | "zadnjaDobava" | "zadnjaProdaja" | "zadnjiDobavitelj">>;
26
- blagovnice: Record<string, Pick<Blagovnica, "_id" | "razknjizena">>;
27
- racuni: Record<string, Pick<Racun, "_id" | "razknjizen">>;
28
- };
29
- }
30
- /**
31
- * Poknjiži vso zgodovino računov in blagovnic.
32
- * Vrns objekt takole (polja in primer)
33
- *
34
-
35
- inserts.spremembaZaloge : _id,datum,artikel_id,skladisce_id,dokument_id,vrstaSpremembe,vrstaDogodka,partner_id,zaloga,vrednostZaloge,nbc
36
- inserts.spremembaZaloge example:
37
- {"_id":"5fc2e6bacc4c891c9ee1890a","datum":"2008-06-04T00:00:00.000Z","artikel_id":"5fc2e02e364409171dd4fcdc","skladisce_id":"5fbec4984692f458bb067f30","dokument_id":"5fc2e042364409171dd7b4cb","vrstaSpremembe":1,"vrstaDogodka":"dobava","partner_id":"5fc2e042364409171dd7b4cb","zaloga":{"stara":0,"nova":6,"sprememba":6},"vrednostZaloge":{"nova":19.206,"stara":0,"sprememba":19.206},"nbc":{"stara":3.201,"nova":3.201,"sprememba":0}}
38
-
39
- updates.zaloga : artikel_id,skladisce_id,nbc,zaloga,vrednost
40
- updates.zaloga example: {"artikel_id":"5fc2e02e364409171dd4fcdc","skladisce_id":"5fbec4984692f458bb067f30","nbc":3.201,"zaloga":0,"vrednost":0}
41
-
42
- updates.artikli : _id,nbc,zadnjaDobava,zadnjiDobavitelj,zadnjaProdaja
43
- updates.artikli example: {"_id":"5fc2e02e364409171dd4fcdc","nbc":3.201,"zadnjaDobava":"2008-06-04T00:00:00.000Z","zadnjiDobavitelj":"5fc2e041364409171dd7b446"}
44
-
45
- updates.blagovnice : _id,razknjizena
46
- updates.blagovnice example: {"_id":"5fc2e042364409171dd7b4cb","razknjizena":"2020-11-29T00:09:30.392Z"}
47
-
48
- updates.racuni : _id,razknjizen
49
- updates.racuni example: {"_id":"5fc2e033364409171dd54b3d","razknjizen":"2020-11-29T00:09:30.417Z"}
50
-
51
- */
52
- export declare function poknjiziVsoZgodovino(db: string, server: string | undefined, nastavitve: Nastavitve, opts?: Opts): Promise<ZalogaMemDb>;
53
- export declare function shraniZgodovinoVBazo(db: string, dbObj: ZalogaMemDb, server?: string | undefined): Promise<void>;
54
- export {};
55
- //# sourceMappingURL=poknjiziVsoZgodovino.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"poknjiziVsoZgodovino.d.ts","sourceRoot":"","sources":["../../src/maint/poknjiziVsoZgodovino.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAU,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,OAAO,EAAE,mBAAmB,EAAqC,MAAM,sBAAsB,CAAC;AAE9F,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,EAAE,EAAE,MAAM,uBAAuB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAW7D,UAAU,IAAI;IACV,OAAO,CAAC,EAAE,EAAE,CAAC;IACb,oBAAoB,EAAE,OAAO,CAAC;IAC9B,wBAAwB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