flexbiz-server 12.4.21 → 12.4.23

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 (1068) hide show
  1. package/package.json +2 -1
  2. package/server/app.js +1 -22
  3. package/server/auths/bearer.js +1 -3
  4. package/server/auths/facebook.js +1 -12
  5. package/server/auths/google.js +1 -13
  6. package/server/auths/local.js +1 -64
  7. package/server/cluster.js +1 -27
  8. package/server/controllers/controller.js +1 -107
  9. package/server/controllers/controllerRPT.js +1 -27
  10. package/server/controllers/controllerUtils.js +1 -76
  11. package/server/controllers/createHandler.js +1 -35
  12. package/server/controllers/createRouteHandler.js +1 -4
  13. package/server/controllers/deleteHandler.js +1 -11
  14. package/server/controllers/deleteManyHandler.js +1 -2
  15. package/server/controllers/exportHandler.js +1 -17
  16. package/server/controllers/findHandler.js +1 -53
  17. package/server/controllers/handlers.js +1 -3
  18. package/server/controllers/historyHandler.js +1 -5
  19. package/server/controllers/importFromExcelHandler.js +1 -14
  20. package/server/controllers/importFromGsHandler.js +1 -10
  21. package/server/controllers/importFromJsonHandler.js +1 -7
  22. package/server/controllers/importHandler.js +1 -21
  23. package/server/controllers/logHandler.js +1 -5
  24. package/server/controllers/rptCreateRouteHandler.js +1 -4
  25. package/server/controllers/rptExcelHandler.js +1 -32
  26. package/server/controllers/rptHandler.js +1 -13
  27. package/server/controllers/updateBookHandler.js +1 -10
  28. package/server/controllers/updateFieldHandler.js +1 -12
  29. package/server/controllers/updateHandler.js +1 -39
  30. package/server/controllers/updateKeyHandler.js +1 -14
  31. package/server/controllers/viewHandler.js +1 -13
  32. package/server/flow/FlowEngine.js +1 -64
  33. package/server/flow/WebhookManager.js +1 -26
  34. package/server/flow/handlers.js +1 -3
  35. package/server/flow/nodes/aiAnalysis.js +1 -9
  36. package/server/flow/nodes/customer.js +1 -15
  37. package/server/flow/nodes/data.js +1 -14
  38. package/server/flow/nodes/debug.js +1 -2
  39. package/server/flow/nodes/delay.js +1 -3
  40. package/server/flow/nodes/email.js +1 -9
  41. package/server/flow/nodes/event.js +1 -11
  42. package/server/flow/nodes/facebook.js +1 -3
  43. package/server/flow/nodes/facebookConversations.js +1 -5
  44. package/server/flow/nodes/facebookCreatePost.js +1 -10
  45. package/server/flow/nodes/facebookSendMessage.js +1 -12
  46. package/server/flow/nodes/forEachItem.js +1 -8
  47. package/server/flow/nodes/function.js +1 -4
  48. package/server/flow/nodes/httprequest.js +1 -7
  49. package/server/flow/nodes/inject.js +1 -12
  50. package/server/flow/nodes/pushNotification.js +1 -5
  51. package/server/flow/nodes/report.js +1 -6
  52. package/server/flow/nodes/saveData.js +1 -2
  53. package/server/flow/nodes/switch.js +1 -20
  54. package/server/flow/nodes/webhook.js +1 -1
  55. package/server/flow/nodes/zaloSendMessage.js +1 -4
  56. package/server/flow/utils.js +1 -2
  57. package/server/global.js +1 -23
  58. package/server/libs/BlockchainTransactionPool.js +1 -3
  59. package/server/libs/WorkerPool.js +1 -4
  60. package/server/libs/WorkerStaticPool.js +1 -16
  61. package/server/libs/WorkerStaticPool_v1.js +1 -5
  62. package/server/libs/assbonus.js +1 -7
  63. package/server/libs/backup.js +1 -2
  64. package/server/libs/blockchainconnect.js +1 -12
  65. package/server/libs/cdpsdiem.js +1 -5
  66. package/server/libs/cdpsdt.js +1 -7
  67. package/server/libs/cdpskh.js +1 -9
  68. package/server/libs/cdpsnphep.js +1 -6
  69. package/server/libs/cdpstk.js +1 -11
  70. package/server/libs/ckcn.js +1 -12
  71. package/server/libs/ckdiem.js +1 -5
  72. package/server/libs/ckdt.js +1 -6
  73. package/server/libs/cknphep.js +1 -6
  74. package/server/libs/cktk.js +1 -4
  75. package/server/libs/cktt.js +1 -9
  76. package/server/libs/ckvt.js +1 -12
  77. package/server/libs/ckvtcapphat.js +1 -6
  78. package/server/libs/ckvtnpp.js +1 -8
  79. package/server/libs/ckvttt.js +1 -11
  80. package/server/libs/createSocaitheongay.js +1 -9
  81. package/server/libs/ctdiem.js +1 -5
  82. package/server/libs/ctvt.js +1 -7
  83. package/server/libs/ctvtnpp.js +1 -7
  84. package/server/libs/ctvttt.js +1 -7
  85. package/server/libs/databanle.js +1 -17
  86. package/server/libs/databanlenpp.js +1 -8
  87. package/server/libs/databanletheongay.js +1 -27
  88. package/server/libs/dkcn.js +1 -10
  89. package/server/libs/dkdiem.js +1 -5
  90. package/server/libs/dkdt.js +1 -6
  91. package/server/libs/dknphep.js +1 -7
  92. package/server/libs/dktk.js +1 -4
  93. package/server/libs/dktt.js +1 -8
  94. package/server/libs/dkvt.js +1 -9
  95. package/server/libs/dkvtnpp.js +1 -7
  96. package/server/libs/dkvttt.js +1 -7
  97. package/server/libs/dncn.js +1 -6
  98. package/server/libs/dntk.js +1 -4
  99. package/server/libs/dntt.js +1 -6
  100. package/server/libs/docs.js +1 -452
  101. package/server/libs/dstkcn.js +1 -1
  102. package/server/libs/dstktt.js +1 -1
  103. package/server/libs/dtbanletheonpp.js +1 -17
  104. package/server/libs/dtbanletheosp.js +1 -15
  105. package/server/libs/dtbanletheospnpp.js +1 -15
  106. package/server/libs/email.js +1 -3
  107. package/server/libs/excel.js +1 -2
  108. package/server/libs/getGiaban.js +1 -67
  109. package/server/libs/getGiabanAsync.js +1 -1
  110. package/server/libs/getNotifies.js +1 -1
  111. package/server/libs/htmlReport.js +1 -9
  112. package/server/libs/initDatabase.js +1 -9
  113. package/server/libs/invoiceEasy.js +1 -109
  114. package/server/libs/invoiceViettel.js +1 -29
  115. package/server/libs/invoiceVnpt.js +1 -22
  116. package/server/libs/kpistatus.js +1 -32
  117. package/server/libs/load-template.js +1 -3
  118. package/server/libs/mailmanagement.js +1 -13
  119. package/server/libs/mongooseDeletePost.js +1 -6
  120. package/server/libs/mongooseLeanId.js +1 -1
  121. package/server/libs/mongoosePatch.js +1 -8
  122. package/server/libs/onepay-payment.js +1 -4
  123. package/server/libs/optimizeBookkeeping.js +1 -14
  124. package/server/libs/parse-template.js +1 -5
  125. package/server/libs/permission.js +1 -51
  126. package/server/libs/phanbokh.js +1 -3
  127. package/server/libs/post-book.js +1 -23
  128. package/server/libs/post-socai.js +1 -25
  129. package/server/libs/post-sokho.js +1 -27
  130. package/server/libs/prototypes.js +1 -29
  131. package/server/libs/psdt.js +1 -1
  132. package/server/libs/pskh.js +1 -1
  133. package/server/libs/pstk.js +1 -1
  134. package/server/libs/redis-cache.js +1 -17
  135. package/server/libs/restore.js +1 -1
  136. package/server/libs/schedule.js +1 -18
  137. package/server/libs/sessionContext.js +2 -14
  138. package/server/libs/textReport.js +1 -3
  139. package/server/libs/thnxt.js +1 -9
  140. package/server/libs/thnxtnpp.js +1 -9
  141. package/server/libs/thnxttt.js +1 -8
  142. package/server/libs/tinhGt.js +1 -7
  143. package/server/libs/tinhGtCapnhatPNK.js +1 -7
  144. package/server/libs/tinhGtPhanboHeSo.js +1 -12
  145. package/server/libs/tinhGtPhanboSltp.js +1 -10
  146. package/server/libs/tinhGtPhanboYtcp.js +1 -11
  147. package/server/libs/tinhGtSltk.js +1 -9
  148. package/server/libs/tinhGtThcppstk.js +1 -10
  149. package/server/libs/tinhGtTrucTiep.js +1 -7
  150. package/server/libs/tinhGtXoa.js +1 -3
  151. package/server/libs/tinhgiatb.js +1 -38
  152. package/server/libs/tinhgiatb1vt.js +1 -5
  153. package/server/libs/tinhhoahong.js +1 -64
  154. package/server/libs/tinhhoahongnpp.js +1 -46
  155. package/server/libs/tinhkhauhao1ts.js +1 -12
  156. package/server/libs/tinhkhauhaots.js +1 -8
  157. package/server/libs/tuoinophaithu.js +1 -10
  158. package/server/libs/tuoinophaitra.js +1 -11
  159. package/server/libs/utils.js +1 -78
  160. package/server/libs/validate.js +1 -4
  161. package/server/libs/validator-acc-cust.js +1 -1
  162. package/server/libs/validator-account.js +1 -4
  163. package/server/libs/validator-vt.js +1 -2
  164. package/server/libs/validator.js +1 -11
  165. package/server/libs/vsocai.js +1 -8
  166. package/server/models/account.js +1 -7
  167. package/server/models/afflink.js +1 -2
  168. package/server/models/app.js +1 -15
  169. package/server/models/approve.js +1 -93
  170. package/server/models/assabcihandler.js +1 -35
  171. package/server/models/assbank.js +1 -19
  172. package/server/models/assbooking.js +1 -4
  173. package/server/models/assbuy.js +1 -3
  174. package/server/models/asscashwithdraw.js +1 -4
  175. package/server/models/assfindhash.js +1 -2
  176. package/server/models/assinvestment.js +1 -13
  177. package/server/models/assissue.js +1 -2
  178. package/server/models/asskey.js +1 -15
  179. package/server/models/assneedtobuy.js +1 -6
  180. package/server/models/assperiod.js +1 -7
  181. package/server/models/assproduct.js +1 -13
  182. package/server/models/assprofitsharing.js +1 -4
  183. package/server/models/assreceiver.js +1 -2
  184. package/server/models/assrequest.js +1 -11
  185. package/server/models/asssell.js +1 -7
  186. package/server/models/asstransaction.js +1 -3
  187. package/server/models/asstransfer.js +1 -4
  188. package/server/models/assuser_identity.js +1 -4
  189. package/server/models/asswithdraw.js +1 -4
  190. package/server/models/attend.js +1 -2
  191. package/server/models/banggiaban.js +1 -8
  192. package/server/models/bangtinhluong.js +1 -6
  193. package/server/models/base.js +1 -1
  194. package/server/models/bds_area.js +1 -4
  195. package/server/models/bds_block.js +1 -3
  196. package/server/models/bds_building.js +1 -4
  197. package/server/models/bds_floor.js +1 -3
  198. package/server/models/bds_floordetail.js +1 -9
  199. package/server/models/bds_nhadat.js +1 -11
  200. package/server/models/bds_nhomnhadat.js +1 -4
  201. package/server/models/bds_phanloainhadat.js +1 -3
  202. package/server/models/bg1.js +1 -9
  203. package/server/models/bg2.js +1 -10
  204. package/server/models/cache.js +1 -3
  205. package/server/models/calllog.js +1 -4
  206. package/server/models/campaign.js +1 -6
  207. package/server/models/cart.js +1 -5
  208. package/server/models/cddiem.js +1 -2
  209. package/server/models/cddt.js +1 -3
  210. package/server/models/cdkh.js +1 -5
  211. package/server/models/cdkhtheongay.js +1 -5
  212. package/server/models/cdnphep.js +1 -2
  213. package/server/models/cdtk.js +1 -3
  214. package/server/models/cdtktheongay.js +1 -3
  215. package/server/models/cdvt.js +1 -5
  216. package/server/models/cdvtnpp.js +1 -6
  217. package/server/models/cdvttheongay.js +1 -5
  218. package/server/models/chamcong.js +1 -7
  219. package/server/models/checkin.js +1 -4
  220. package/server/models/checkinactivity.js +1 -3
  221. package/server/models/checkinkpi.js +1 -4
  222. package/server/models/checkinlocation.js +1 -2
  223. package/server/models/chitieukpi.js +1 -3
  224. package/server/models/chudethaoluan.js +1 -3
  225. package/server/models/ckgtluong.js +1 -2
  226. package/server/models/colleague.js +1 -2
  227. package/server/models/comment.js +1 -4
  228. package/server/models/congdoansx.js +1 -4
  229. package/server/models/congtacvien.js +1 -4
  230. package/server/models/congthuctinhgiaban.js +1 -8
  231. package/server/models/consultant.js +1 -4
  232. package/server/models/contract.js +1 -6
  233. package/server/models/counter.js +1 -2
  234. package/server/models/ctds.js +1 -5
  235. package/server/models/ctds2.js +1 -6
  236. package/server/models/currency.js +1 -3
  237. package/server/models/customer.js +1 -31
  238. package/server/models/databanle.js +1 -8
  239. package/server/models/datlich.js +1 -4
  240. package/server/models/department.js +1 -4
  241. package/server/models/dh2.js +1 -20
  242. package/server/models/diagram.js +1 -2
  243. package/server/models/dinhmucsx.js +1 -8
  244. package/server/models/dkhoc.js +1 -6
  245. package/server/models/dknphep.js +1 -2
  246. package/server/models/dmban.js +1 -4
  247. package/server/models/dmbp.js +1 -12
  248. package/server/models/dmca.js +1 -2
  249. package/server/models/dmchietkhau.js +1 -9
  250. package/server/models/dmchietkhauhd.js +1 -20
  251. package/server/models/dmcpmh.js +1 -2
  252. package/server/models/dmdiemthuong.js +1 -5
  253. package/server/models/dmdoi.js +1 -4
  254. package/server/models/dmdoituongdanhgia.js +1 -2
  255. package/server/models/dmdt.js +1 -8
  256. package/server/models/dmdvt.js +1 -3
  257. package/server/models/dmgiaban.js +1 -9
  258. package/server/models/dmgiamua.js +1 -5
  259. package/server/models/dmgiathitruong.js +1 -5
  260. package/server/models/dmgiathitruong_ngay.js +1 -2
  261. package/server/models/dmgiathitruong_theodoi.js +1 -2
  262. package/server/models/dmhoahonghd.js +1 -9
  263. package/server/models/dmhoahongnpp.js +1 -9
  264. package/server/models/dmkc.js +1 -3
  265. package/server/models/dmkho.js +1 -6
  266. package/server/models/dmkhuyenmai.js +1 -9
  267. package/server/models/dmkhuyenmaihd.js +1 -11
  268. package/server/models/dmletet.js +1 -2
  269. package/server/models/dmlo.js +1 -4
  270. package/server/models/dmloaicong.js +1 -4
  271. package/server/models/dmloaitask.js +1 -2
  272. package/server/models/dmloaits.js +1 -2
  273. package/server/models/dmnckkm.js +1 -4
  274. package/server/models/dmnghiepvu.js +1 -4
  275. package/server/models/dmnguonvon.js +1 -2
  276. package/server/models/dmnhnv.js +1 -4
  277. package/server/models/dmnv.js +1 -17
  278. package/server/models/dmnvt.js +1 -9
  279. package/server/models/dmphatdichvu.js +1 -5
  280. package/server/models/dmphi.js +1 -3
  281. package/server/models/dmqct.js +1 -3
  282. package/server/models/dmqddvt.js +1 -3
  283. package/server/models/dmtanggiamts.js +1 -3
  284. package/server/models/dmto.js +1 -4
  285. package/server/models/dmtt.js +1 -6
  286. package/server/models/dmvt.js +1 -17
  287. package/server/models/dmyt.js +1 -4
  288. package/server/models/dn0.js +1 -13
  289. package/server/models/dnm.js +1 -11
  290. package/server/models/dokho.js +1 -2
  291. package/server/models/domain.js +1 -2
  292. package/server/models/dvcs.js +1 -3
  293. package/server/models/ecomcategories.js +1 -3
  294. package/server/models/ecomcategories_cty.js +1 -3
  295. package/server/models/ecomproductlines.js +1 -2
  296. package/server/models/ecompromotion_flashsales.js +1 -2
  297. package/server/models/ecompromotion_freeships.js +1 -2
  298. package/server/models/email.js +1 -2
  299. package/server/models/endpoint.js +1 -1
  300. package/server/models/events.js +1 -3
  301. package/server/models/evoucher.js +1 -5
  302. package/server/models/experiencejourney.js +1 -2
  303. package/server/models/experiencejourneydata.js +1 -4
  304. package/server/models/experiencejourneypersona.js +1 -3
  305. package/server/models/experiencejourneystage.js +1 -2
  306. package/server/models/exportexceltemplate.js +1 -2
  307. package/server/models/fbconversation.js +1 -15
  308. package/server/models/fbmessage.js +1 -2
  309. package/server/models/fbpage.js +1 -2
  310. package/server/models/fbpost.js +1 -2
  311. package/server/models/fieldright.js +1 -2
  312. package/server/models/file.js +1 -4
  313. package/server/models/financialroadmap.js +1 -3
  314. package/server/models/flow.js +1 -2
  315. package/server/models/flowdata.js +1 -3
  316. package/server/models/folder.js +1 -4
  317. package/server/models/follow.js +1 -2
  318. package/server/models/form.js +1 -3
  319. package/server/models/forminfo.js +1 -5
  320. package/server/models/formvalue.js +1 -3
  321. package/server/models/giaoca.js +1 -4
  322. package/server/models/giatb.js +1 -3
  323. package/server/models/group.js +1 -11
  324. package/server/models/gt_ctgt.js +1 -4
  325. package/server/models/gt_hspb.js +1 -3
  326. package/server/models/gt_sltk.js +1 -3
  327. package/server/models/gt_thcppstk.js +1 -3
  328. package/server/models/hanmucton.js +1 -4
  329. package/server/models/hd1.js +1 -11
  330. package/server/models/hd2.js +1 -27
  331. package/server/models/hd3.js +1 -18
  332. package/server/models/hd4.js +1 -13
  333. package/server/models/hd7.js +1 -17
  334. package/server/models/hd8.js +1 -12
  335. package/server/models/hde.js +1 -11
  336. package/server/models/hlink.js +1 -2
  337. package/server/models/hlinkvalue.js +1 -2
  338. package/server/models/hmcn.js +1 -3
  339. package/server/models/hmcnct.js +1 -2
  340. package/server/models/hspbts.js +1 -4
  341. package/server/models/htl.js +1 -13
  342. package/server/models/importexceltemplate.js +1 -2
  343. package/server/models/introducebonus.js +1 -4
  344. package/server/models/introducecode.js +1 -3
  345. package/server/models/introducer.js +1 -4
  346. package/server/models/kbbtpb.js +1 -7
  347. package/server/models/kbmPttct.js +1 -4
  348. package/server/models/kbmTkgtgt.js +1 -5
  349. package/server/models/kbm_bcdkt.js +1 -4
  350. package/server/models/kbm_kqhdkd.js +1 -3
  351. package/server/models/kbm_lcttgt.js +1 -5
  352. package/server/models/kbm_lctttt.js +1 -4
  353. package/server/models/kbm_pttct.js +1 -4
  354. package/server/models/kbm_tkgtgt.js +1 -5
  355. package/server/models/kbmbcdkt.js +1 -4
  356. package/server/models/kbmbcqt.js +1 -4
  357. package/server/models/kbmkqhdkd.js +1 -3
  358. package/server/models/kbmlcttgt.js +1 -6
  359. package/server/models/kbmlctttt.js +1 -4
  360. package/server/models/kbmtmbctc.js +1 -4
  361. package/server/models/kehoachdtcp.js +1 -3
  362. package/server/models/kehoachmh.js +1 -8
  363. package/server/models/keyresult.js +1 -7
  364. package/server/models/khunghangthanhvien.js +1 -3
  365. package/server/models/label.js +1 -2
  366. package/server/models/labelinfo.js +1 -2
  367. package/server/models/lenhcapphat.js +1 -8
  368. package/server/models/lenhsx.js +1 -8
  369. package/server/models/lienhe.js +1 -4
  370. package/server/models/like_module.js +1 -2
  371. package/server/models/link.js +1 -2
  372. package/server/models/loaidiem.js +1 -2
  373. package/server/models/lock.js +1 -2
  374. package/server/models/log.js +1 -5
  375. package/server/models/mailaccount.js +1 -3
  376. package/server/models/mailgroup.js +1 -3
  377. package/server/models/mailreceived.js +1 -2
  378. package/server/models/mailschedule.js +1 -2
  379. package/server/models/mailsent.js +1 -2
  380. package/server/models/mailtemplate.js +1 -2
  381. package/server/models/maudanhgia.js +1 -2
  382. package/server/models/menuinfo.js +1 -2
  383. package/server/models/message.js +1 -8
  384. package/server/models/message2.js +1 -4
  385. package/server/models/message2setting.js +1 -3
  386. package/server/models/moduleinfo.js +1 -4
  387. package/server/models/momo.js +1 -17
  388. package/server/models/news.js +1 -3
  389. package/server/models/newsfeed.js +1 -4
  390. package/server/models/note.js +1 -2
  391. package/server/models/notification.js +1 -7
  392. package/server/models/okr.js +1 -4
  393. package/server/models/okrdiagram.js +1 -3
  394. package/server/models/onepay.js +1 -24
  395. package/server/models/opportunity.js +1 -4
  396. package/server/models/options.js +1 -2
  397. package/server/models/originimportid.js +1 -1
  398. package/server/models/otp.js +1 -1
  399. package/server/models/parameter.js +1 -2
  400. package/server/models/participant.js +1 -20
  401. package/server/models/partner.js +1 -1
  402. package/server/models/payload.js +1 -1
  403. package/server/models/pbl.js +1 -16
  404. package/server/models/pc0.js +1 -13
  405. package/server/models/pc1.js +1 -14
  406. package/server/models/pc2.js +1 -13
  407. package/server/models/pc3.js +1 -13
  408. package/server/models/pc5.js +1 -8
  409. package/server/models/pc6.js +1 -14
  410. package/server/models/pcl.js +1 -6
  411. package/server/models/pdn.js +1 -9
  412. package/server/models/pdx.js +1 -9
  413. package/server/models/pgh.js +1 -5
  414. package/server/models/phieudanhgia.js +1 -3
  415. package/server/models/pht.js +1 -8
  416. package/server/models/phucap.js +1 -4
  417. package/server/models/pkc.js +1 -6
  418. package/server/models/pkh.js +1 -6
  419. package/server/models/pkk.js +1 -10
  420. package/server/models/pkt.js +1 -12
  421. package/server/models/pn1.js +1 -17
  422. package/server/models/pn2.js +1 -11
  423. package/server/models/pn3.js +1 -13
  424. package/server/models/pn5.js +1 -14
  425. package/server/models/pn6.js +1 -14
  426. package/server/models/pn9.js +1 -17
  427. package/server/models/pnc.js +1 -10
  428. package/server/models/pnh.js +1 -12
  429. package/server/models/pnk.js +1 -10
  430. package/server/models/po1.js +1 -19
  431. package/server/models/ppb.js +1 -6
  432. package/server/models/profile.js +1 -4
  433. package/server/models/pt1.js +1 -12
  434. package/server/models/pt5.js +1 -8
  435. package/server/models/ptl.js +1 -6
  436. package/server/models/ptthanhtoan.js +1 -6
  437. package/server/models/purchase_contract.js +1 -17
  438. package/server/models/pxc.js +1 -9
  439. package/server/models/pxh.js +1 -12
  440. package/server/models/pxk.js +1 -10
  441. package/server/models/qts.js +1 -14
  442. package/server/models/qts_dieuchinh.js +1 -3
  443. package/server/models/qts_dieuchuyen.js +1 -4
  444. package/server/models/quanhuyen.js +1 -2
  445. package/server/models/reason.js +1 -2
  446. package/server/models/receivedinvoice.js +1 -2
  447. package/server/models/reportinfo.js +1 -5
  448. package/server/models/right.js +1 -4
  449. package/server/models/rpt.js +1 -2
  450. package/server/models/rptform.js +1 -5
  451. package/server/models/rptobject.js +1 -2
  452. package/server/models/sale_contract.js +1 -9
  453. package/server/models/schedule.js +1 -16
  454. package/server/models/schedule_log.js +1 -2
  455. package/server/models/service.js +1 -4
  456. package/server/models/shipbook.js +1 -12
  457. package/server/models/shortcut.js +1 -2
  458. package/server/models/smsaccount.js +1 -10
  459. package/server/models/smssend.js +1 -2
  460. package/server/models/so1.js +1 -22
  461. package/server/models/so2.js +1 -10
  462. package/server/models/so3.js +1 -9
  463. package/server/models/so5.js +1 -15
  464. package/server/models/so9.js +1 -19
  465. package/server/models/socai.js +1 -26
  466. package/server/models/socainpp.js +1 -18
  467. package/server/models/socaitc.js +1 -6
  468. package/server/models/socaitmp.js +1 -16
  469. package/server/models/socaitt.js +1 -4
  470. package/server/models/sodiemthuong.js +1 -4
  471. package/server/models/sokho.js +1 -28
  472. package/server/models/sokhocapphat.js +1 -18
  473. package/server/models/sokhokhongton.js +1 -19
  474. package/server/models/sokhonpp.js +1 -19
  475. package/server/models/sokhotc.js +1 -8
  476. package/server/models/sokhott.js +1 -18
  477. package/server/models/sophanbokh.js +1 -3
  478. package/server/models/sosanxuat.js +1 -5
  479. package/server/models/sotinhkh.js +1 -2
  480. package/server/models/spdd_ck.js +1 -3
  481. package/server/models/spdd_dk.js +1 -3
  482. package/server/models/step.js +1 -2
  483. package/server/models/strategicdiagram.js +1 -3
  484. package/server/models/strategicgoal.js +1 -4
  485. package/server/models/strategickpi.js +1 -6
  486. package/server/models/strategicobjective.js +1 -5
  487. package/server/models/strategicplan.js +1 -5
  488. package/server/models/subscribe.js +1 -2
  489. package/server/models/support.js +1 -2
  490. package/server/models/synctime.js +1 -2
  491. package/server/models/sysconfig.js +1 -2
  492. package/server/models/sysgroup.js +1 -2
  493. package/server/models/tableinfo.js +1 -3
  494. package/server/models/task.js +1 -9
  495. package/server/models/taskreg.js +1 -4
  496. package/server/models/tc.js +1 -2
  497. package/server/models/tdttco.js +1 -8
  498. package/server/models/tdttco_tt.js +1 -5
  499. package/server/models/tdttno.js +1 -8
  500. package/server/models/tdttno_tt.js +1 -5
  501. package/server/models/templaterpt.js +1 -2
  502. package/server/models/templatestore.js +1 -3
  503. package/server/models/templatevoucher.js +1 -3
  504. package/server/models/tinhthanh.js +1 -2
  505. package/server/models/tokens.js +1 -2
  506. package/server/models/tontucthoi.js +1 -9
  507. package/server/models/trangthai.js +1 -4
  508. package/server/models/trangthaiapp.js +1 -4
  509. package/server/models/transaction.js +1 -16
  510. package/server/models/trialinfo.js +1 -2
  511. package/server/models/user.js +1 -38
  512. package/server/models/usergroup.js +1 -7
  513. package/server/models/vanchuyen.js +1 -12
  514. package/server/models/vat.js +1 -3
  515. package/server/models/vatra.js +1 -6
  516. package/server/models/vatvao.js +1 -6
  517. package/server/models/versioninfo.js +1 -2
  518. package/server/models/vietqrbanks.js +1 -2
  519. package/server/models/vsocai.js +1 -6
  520. package/server/models/waitevent.js +1 -2
  521. package/server/models/wallet.js +1 -8
  522. package/server/models/warranty.js +1 -3
  523. package/server/models/warrantyclaim.js +1 -2
  524. package/server/models/warrantypolicy.js +1 -1
  525. package/server/models/xaphuong.js +1 -2
  526. package/server/models/xhd.js +1 -10
  527. package/server/models/ytdd_ck.js +1 -4
  528. package/server/models/ytdd_dk.js +1 -4
  529. package/server/models/zalo.js +1 -17
  530. package/server/modules/lists/bg-cddiem.js +1 -6
  531. package/server/modules/lists/bg-cddt.js +1 -7
  532. package/server/modules/lists/bg-cdkh.js +1 -11
  533. package/server/modules/lists/bg-cdnphep.js +1 -6
  534. package/server/modules/lists/bg-cdtk.js +1 -9
  535. package/server/modules/lists/bg-cdvt.js +1 -8
  536. package/server/modules/lists/bg-cdvtnpp.js +1 -8
  537. package/server/modules/lists/ls-account.js +1 -4
  538. package/server/modules/lists/ls-afflink.js +1 -3
  539. package/server/modules/lists/ls-approve.js +1 -4
  540. package/server/modules/lists/ls-assabcihandler.js +1 -3
  541. package/server/modules/lists/ls-assbank.js +1 -3
  542. package/server/modules/lists/ls-assbooking.js +1 -20
  543. package/server/modules/lists/ls-assbuy.js +1 -8
  544. package/server/modules/lists/ls-asscashwithdraw.js +1 -8
  545. package/server/modules/lists/ls-assinvestment.js +1 -31
  546. package/server/modules/lists/ls-assissue.js +1 -3
  547. package/server/modules/lists/ls-asskey.js +1 -41
  548. package/server/modules/lists/ls-assneedtobuy.js +1 -10
  549. package/server/modules/lists/ls-assperiod.js +1 -19
  550. package/server/modules/lists/ls-assproduct.js +1 -9
  551. package/server/modules/lists/ls-assprofitsharing.js +1 -8
  552. package/server/modules/lists/ls-assreceiver.js +1 -3
  553. package/server/modules/lists/ls-assrequest.js +1 -4
  554. package/server/modules/lists/ls-asssell.js +1 -13
  555. package/server/modules/lists/ls-asstransaction.js +1 -3
  556. package/server/modules/lists/ls-asstransfer.js +1 -3
  557. package/server/modules/lists/ls-assuser_identity.js +1 -1
  558. package/server/modules/lists/ls-asswithdraw.js +1 -12
  559. package/server/modules/lists/ls-bangtinhluong.js +1 -2
  560. package/server/modules/lists/ls-bds_area.js +1 -3
  561. package/server/modules/lists/ls-bds_block.js +1 -1
  562. package/server/modules/lists/ls-bds_building.js +1 -3
  563. package/server/modules/lists/ls-bds_dmnhbds.js +1 -6
  564. package/server/modules/lists/ls-bds_floor.js +1 -2
  565. package/server/modules/lists/ls-bds_floordetail.js +1 -19
  566. package/server/modules/lists/ls-bds_nhadat.js +1 -16
  567. package/server/modules/lists/ls-bds_nhomnhadat.js +1 -1
  568. package/server/modules/lists/ls-bds_phanloainhadat.js +1 -1
  569. package/server/modules/lists/ls-calllog.js +1 -4
  570. package/server/modules/lists/ls-campaign.js +1 -1
  571. package/server/modules/lists/ls-cart.js +1 -14
  572. package/server/modules/lists/ls-chamcong.js +1 -3
  573. package/server/modules/lists/ls-checkin.js +1 -12
  574. package/server/modules/lists/ls-checkinactivity.js +1 -8
  575. package/server/modules/lists/ls-checkinkpi.js +1 -3
  576. package/server/modules/lists/ls-checkinlocation.js +1 -1
  577. package/server/modules/lists/ls-chitieukpi.js +1 -1
  578. package/server/modules/lists/ls-chudethaoluan.js +1 -1
  579. package/server/modules/lists/ls-ckgtluong.js +1 -1
  580. package/server/modules/lists/ls-comment.js +1 -9
  581. package/server/modules/lists/ls-congdoansx.js +1 -3
  582. package/server/modules/lists/ls-congtacvien.js +1 -5
  583. package/server/modules/lists/ls-consultant.js +1 -2
  584. package/server/modules/lists/ls-contract.js +1 -7
  585. package/server/modules/lists/ls-ctds.js +1 -4
  586. package/server/modules/lists/ls-ctds2.js +1 -4
  587. package/server/modules/lists/ls-currency.js +1 -1
  588. package/server/modules/lists/ls-customer.js +1 -21
  589. package/server/modules/lists/ls-datlich.js +1 -9
  590. package/server/modules/lists/ls-dckhauhaots.js +1 -3
  591. package/server/modules/lists/ls-department.js +1 -3
  592. package/server/modules/lists/ls-diagram.js +1 -1
  593. package/server/modules/lists/ls-dkhoc.js +1 -6
  594. package/server/modules/lists/ls-dknphep.js +1 -1
  595. package/server/modules/lists/ls-dmban.js +1 -4
  596. package/server/modules/lists/ls-dmbp.js +1 -7
  597. package/server/modules/lists/ls-dmca.js +1 -1
  598. package/server/modules/lists/ls-dmchietkhau.js +1 -19
  599. package/server/modules/lists/ls-dmchietkhauhd.js +1 -4
  600. package/server/modules/lists/ls-dmchucvu.js +1 -2
  601. package/server/modules/lists/ls-dmcpmh.js +1 -1
  602. package/server/modules/lists/ls-dmdiemthuong.js +1 -4
  603. package/server/modules/lists/ls-dmdoi.js +1 -4
  604. package/server/modules/lists/ls-dmdoituongdanhgia.js +1 -1
  605. package/server/modules/lists/ls-dmdt.js +1 -11
  606. package/server/modules/lists/ls-dmdvt.js +1 -2
  607. package/server/modules/lists/ls-dmgiaban.js +1 -4
  608. package/server/modules/lists/ls-dmgiamua.js +1 -4
  609. package/server/modules/lists/ls-dmgiathitruong.js +1 -15
  610. package/server/modules/lists/ls-dmgiathitruong_ngay.js +1 -2
  611. package/server/modules/lists/ls-dmgiathitruong_theodoi.js +1 -1
  612. package/server/modules/lists/ls-dmhoahonghd.js +1 -1
  613. package/server/modules/lists/ls-dmhoahongnpp.js +1 -1
  614. package/server/modules/lists/ls-dmkc.js +1 -3
  615. package/server/modules/lists/ls-dmkho.js +1 -1
  616. package/server/modules/lists/ls-dmkhuyenmai.js +1 -5
  617. package/server/modules/lists/ls-dmkhuyenmaihd.js +1 -3
  618. package/server/modules/lists/ls-dmletet.js +1 -1
  619. package/server/modules/lists/ls-dmlo.js +1 -1
  620. package/server/modules/lists/ls-dmloaicong.js +1 -1
  621. package/server/modules/lists/ls-dmloaits.js +1 -1
  622. package/server/modules/lists/ls-dmnckkm.js +1 -7
  623. package/server/modules/lists/ls-dmnghiepvu.js +1 -1
  624. package/server/modules/lists/ls-dmnguonvon.js +1 -1
  625. package/server/modules/lists/ls-dmnhnv.js +1 -6
  626. package/server/modules/lists/ls-dmnhtask.js +1 -5
  627. package/server/modules/lists/ls-dmnkh.js +1 -6
  628. package/server/modules/lists/ls-dmntt.js +1 -6
  629. package/server/modules/lists/ls-dmnv.js +1 -17
  630. package/server/modules/lists/ls-dmnvt.js +1 -8
  631. package/server/modules/lists/ls-dmphatdichvu.js +1 -3
  632. package/server/modules/lists/ls-dmphi.js +1 -6
  633. package/server/modules/lists/ls-dmqct.js +1 -2
  634. package/server/modules/lists/ls-dmqddvt.js +1 -3
  635. package/server/modules/lists/ls-dmtanggiamts.js +1 -1
  636. package/server/modules/lists/ls-dmto.js +1 -5
  637. package/server/modules/lists/ls-dmtt.js +1 -7
  638. package/server/modules/lists/ls-dmvt.js +1 -68
  639. package/server/modules/lists/ls-dmyt.js +1 -1
  640. package/server/modules/lists/ls-dokho.js +1 -1
  641. package/server/modules/lists/ls-dvcs.js +1 -1
  642. package/server/modules/lists/ls-ecomcategories.js +1 -5
  643. package/server/modules/lists/ls-ecomcategories_cty.js +1 -5
  644. package/server/modules/lists/ls-email.js +1 -4
  645. package/server/modules/lists/ls-events.js +1 -3
  646. package/server/modules/lists/ls-evoucher.js +1 -3
  647. package/server/modules/lists/ls-experiencejourney.js +1 -1
  648. package/server/modules/lists/ls-experiencejourneydata.js +1 -3
  649. package/server/modules/lists/ls-experiencejourneypersona.js +1 -4
  650. package/server/modules/lists/ls-experiencejourneystage.js +1 -1
  651. package/server/modules/lists/ls-fbconversation.js +1 -2
  652. package/server/modules/lists/ls-fbmessage.js +1 -2
  653. package/server/modules/lists/ls-fbpage.js +1 -11
  654. package/server/modules/lists/ls-fbpost.js +1 -2
  655. package/server/modules/lists/ls-file.js +1 -31
  656. package/server/modules/lists/ls-financialroadmap.js +1 -3
  657. package/server/modules/lists/ls-flow.js +1 -6
  658. package/server/modules/lists/ls-flowdata.js +1 -1
  659. package/server/modules/lists/ls-folder.js +1 -1
  660. package/server/modules/lists/ls-form.js +1 -1
  661. package/server/modules/lists/ls-forminfo.js +1 -1
  662. package/server/modules/lists/ls-formvalue.js +1 -1
  663. package/server/modules/lists/ls-giaoca.js +1 -4
  664. package/server/modules/lists/ls-group.js +1 -5
  665. package/server/modules/lists/ls-hlink.js +1 -1
  666. package/server/modules/lists/ls-hlinkvalue.js +1 -1
  667. package/server/modules/lists/ls-hmcn.js +1 -2
  668. package/server/modules/lists/ls-hspbts.js +1 -3
  669. package/server/modules/lists/ls-introducebonus.js +1 -4
  670. package/server/modules/lists/ls-introducecode.js +1 -10
  671. package/server/modules/lists/ls-introducer.js +1 -20
  672. package/server/modules/lists/ls-kbm-bcdkt.js +1 -1
  673. package/server/modules/lists/ls-kbm-bcqt.js +1 -5
  674. package/server/modules/lists/ls-kbm-kqhdkd.js +1 -1
  675. package/server/modules/lists/ls-kbm-lcttgt.js +1 -1
  676. package/server/modules/lists/ls-kbm-lctttt.js +1 -1
  677. package/server/modules/lists/ls-kbm-pttct.js +1 -3
  678. package/server/modules/lists/ls-kbm-tkgtgt.js +1 -3
  679. package/server/modules/lists/ls-kbm-tmbctc.js +1 -3
  680. package/server/modules/lists/ls-kehoachdtcp.js +1 -4
  681. package/server/modules/lists/ls-keyresult.js +1 -7
  682. package/server/modules/lists/ls-khunghangthanhvien.js +1 -1
  683. package/server/modules/lists/ls-kygui.js +1 -19
  684. package/server/modules/lists/ls-label.js +1 -1
  685. package/server/modules/lists/ls-lienhe.js +1 -4
  686. package/server/modules/lists/ls-like-module.js +1 -1
  687. package/server/modules/lists/ls-link.js +1 -1
  688. package/server/modules/lists/ls-loaidiem.js +1 -1
  689. package/server/modules/lists/ls-lock.js +1 -1
  690. package/server/modules/lists/ls-log.js +1 -3
  691. package/server/modules/lists/ls-mailaccount.js +1 -5
  692. package/server/modules/lists/ls-mailreceived.js +1 -5
  693. package/server/modules/lists/ls-mailschedule.js +1 -7
  694. package/server/modules/lists/ls-mailsent.js +1 -4
  695. package/server/modules/lists/ls-mailtemplate.js +1 -4
  696. package/server/modules/lists/ls-maudanhgia.js +1 -3
  697. package/server/modules/lists/ls-message2.js +1 -8
  698. package/server/modules/lists/ls-message2setting.js +1 -5
  699. package/server/modules/lists/ls-news.js +1 -7
  700. package/server/modules/lists/ls-newsfeed.js +1 -4
  701. package/server/modules/lists/ls-note.js +1 -6
  702. package/server/modules/lists/ls-okr.js +1 -5
  703. package/server/modules/lists/ls-okrdiagram.js +1 -1
  704. package/server/modules/lists/ls-opportunity.js +1 -5
  705. package/server/modules/lists/ls-options.js +1 -4
  706. package/server/modules/lists/ls-parameter.js +1 -3
  707. package/server/modules/lists/ls-participant.js +1 -10
  708. package/server/modules/lists/ls-phieudanhgia.js +1 -7
  709. package/server/modules/lists/ls-phucap.js +1 -2
  710. package/server/modules/lists/ls-profile.js +1 -1
  711. package/server/modules/lists/ls-ptthanhtoan.js +1 -3
  712. package/server/modules/lists/ls-qts-dieuchinh.js +1 -2
  713. package/server/modules/lists/ls-qts-dieuchuyen.js +1 -8
  714. package/server/modules/lists/ls-reason.js +1 -1
  715. package/server/modules/lists/ls-rpt.js +1 -5
  716. package/server/modules/lists/ls-rptform.js +1 -4
  717. package/server/modules/lists/ls-service.js +1 -3
  718. package/server/modules/lists/ls-shortcut.js +1 -1
  719. package/server/modules/lists/ls-smsaccount.js +1 -1
  720. package/server/modules/lists/ls-smssend.js +1 -3
  721. package/server/modules/lists/ls-sosanxuat.js +1 -4
  722. package/server/modules/lists/ls-step.js +1 -1
  723. package/server/modules/lists/ls-strategicdiagram.js +1 -1
  724. package/server/modules/lists/ls-strategicgoal.js +1 -3
  725. package/server/modules/lists/ls-strategickpi.js +1 -7
  726. package/server/modules/lists/ls-strategicobjective.js +1 -3
  727. package/server/modules/lists/ls-strategicplan.js +1 -6
  728. package/server/modules/lists/ls-support.js +1 -3
  729. package/server/modules/lists/ls-task.js +1 -34
  730. package/server/modules/lists/ls-taskreg.js +1 -2
  731. package/server/modules/lists/ls-tc.js +1 -1
  732. package/server/modules/lists/ls-templaterpt.js +1 -5
  733. package/server/modules/lists/ls-templatevoucher.js +1 -1
  734. package/server/modules/lists/ls-tontucthoi.js +1 -3
  735. package/server/modules/lists/ls-trangthaiapp.js +1 -3
  736. package/server/modules/lists/ls-transaction.js +1 -4
  737. package/server/modules/lists/ls-usergroup.js +1 -7
  738. package/server/modules/lists/ls-vat.js +1 -1
  739. package/server/modules/lists/ls-vatra.js +1 -5
  740. package/server/modules/lists/ls-vatvao.js +1 -6
  741. package/server/modules/lists/ls-waitevent.js +1 -1
  742. package/server/modules/lists/ls-warranty.js +1 -4
  743. package/server/modules/lists/ls_hanmucton.js +1 -3
  744. package/server/modules/lists/ls_hspb.js +1 -4
  745. package/server/modules/lists/ls_spdd_ck.js +1 -3
  746. package/server/modules/lists/ls_spdd_dk.js +1 -3
  747. package/server/modules/lists/ls_ytdd_ck.js +1 -4
  748. package/server/modules/lists/ls_ytdd_dk.js +1 -4
  749. package/server/modules/lists/sys-attend.js +1 -4
  750. package/server/modules/lists/sys-follow.js +1 -4
  751. package/server/modules/lists/sys-right.js +1 -2
  752. package/server/modules/public/app.js +1 -4
  753. package/server/modules/public/approve.js +1 -37
  754. package/server/modules/public/callin.js +1 -7
  755. package/server/modules/public/comment.js +1 -5
  756. package/server/modules/public/dmnvt.js +1 -4
  757. package/server/modules/public/dmvt.js +1 -9
  758. package/server/modules/public/file.js +1 -11
  759. package/server/modules/public/form.js +1 -7
  760. package/server/modules/public/forminfo.js +1 -1
  761. package/server/modules/public/group.js +1 -4
  762. package/server/modules/public/hlink.js +1 -3
  763. package/server/modules/public/introducecode.js +1 -1
  764. package/server/modules/public/listinfo.js +1 -1
  765. package/server/modules/public/media-webhook.js +1 -1
  766. package/server/modules/public/partner.js +1 -1
  767. package/server/modules/public/paymentCallback.js +1 -32
  768. package/server/modules/public/province.js +1 -1
  769. package/server/modules/public/ptthanhtoan.js +1 -4
  770. package/server/modules/public/subscribe.js +1 -30
  771. package/server/modules/public/support.js +1 -3
  772. package/server/modules/public/tableinfo.js +1 -1
  773. package/server/modules/public/trialinfo.js +1 -4
  774. package/server/modules/public/versioninfo.js +1 -1
  775. package/server/modules/reports/calc-tinhgiatb.js +1 -6
  776. package/server/modules/reports/calc-tinhgiathanh.js +1 -6
  777. package/server/modules/reports/calc-tinhkhauhaots.js +1 -3
  778. package/server/modules/reports/calc-tinhluong.js +1 -37
  779. package/server/modules/reports/rp-analyzedata.js +1 -6
  780. package/server/modules/reports/rp-assbonus.js +1 -4
  781. package/server/modules/reports/rp-assinterest.js +1 -8
  782. package/server/modules/reports/rp-assproductowners.js +1 -3
  783. package/server/modules/reports/rp-asssupply.js +1 -1
  784. package/server/modules/reports/rp-asstransferlog.js +1 -10
  785. package/server/modules/reports/rp-banggiatb.js +1 -3
  786. package/server/modules/reports/rp-bangtinhkhauhao.js +1 -6
  787. package/server/modules/reports/rp-baocaokhachhang.js +1 -6
  788. package/server/modules/reports/rp-bcdkt.js +1 -11
  789. package/server/modules/reports/rp-bcintroducebonus.js +1 -4
  790. package/server/modules/reports/rp-bckhtiemnang.js +1 -3
  791. package/server/modules/reports/rp-bcqt.js +1 -85
  792. package/server/modules/reports/rp-bkct.js +1 -13
  793. package/server/modules/reports/rp-bkshipbook.js +1 -8
  794. package/server/modules/reports/rp-bkvanchuyen.js +1 -8
  795. package/server/modules/reports/rp-bkvatra.js +1 -7
  796. package/server/modules/reports/rp-bkvatvao.js +1 -7
  797. package/server/modules/reports/rp-capnhatsocaitc.js +1 -4
  798. package/server/modules/reports/rp-cdpsdiem.js +1 -4
  799. package/server/modules/reports/rp-cdpsdt.js +1 -5
  800. package/server/modules/reports/rp-cdpskh.js +1 -7
  801. package/server/modules/reports/rp-cdpsnphep.js +1 -3
  802. package/server/modules/reports/rp-cdpstk.js +1 -4
  803. package/server/modules/reports/rp-chitietchitientheohoadon.js +1 -12
  804. package/server/modules/reports/rp-chitiettaisan.js +1 -13
  805. package/server/modules/reports/rp-chitietthutientheohoadon.js +1 -13
  806. package/server/modules/reports/rp-ckcn.js +1 -3
  807. package/server/modules/reports/rp-ckdiem.js +1 -2
  808. package/server/modules/reports/rp-cktk.js +1 -3
  809. package/server/modules/reports/rp-ckvt.js +1 -10
  810. package/server/modules/reports/rp-ckvttheokho.js +1 -4
  811. package/server/modules/reports/rp-ckvttheotg.js +1 -4
  812. package/server/modules/reports/rp-ckvttt.js +1 -3
  813. package/server/modules/reports/rp-congnophaithutheotuoino.js +1 -3
  814. package/server/modules/reports/rp-congnophaitratheotuoino.js +1 -3
  815. package/server/modules/reports/rp-congnosapthu.js +1 -4
  816. package/server/modules/reports/rp-congnosaptra.js +1 -4
  817. package/server/modules/reports/rp-congviectheobp.js +1 -9
  818. package/server/modules/reports/rp-congviectheodt.js +1 -8
  819. package/server/modules/reports/rp-congviectheokh.js +1 -8
  820. package/server/modules/reports/rp-congviectheonv.js +1 -9
  821. package/server/modules/reports/rp-congviectheotimeline.js +1 -6
  822. package/server/modules/reports/rp-ctbanle.js +1 -15
  823. package/server/modules/reports/rp-ctbanle2.js +1 -20
  824. package/server/modules/reports/rp-ctbanlectv.js +1 -20
  825. package/server/modules/reports/rp-ctbanlenpp.js +1 -24
  826. package/server/modules/reports/rp-ctdanhgianhanvien.js +1 -8
  827. package/server/modules/reports/rp-cthangbanbitralai.js +1 -4
  828. package/server/modules/reports/rp-ctmuahang.js +1 -7
  829. package/server/modules/reports/rp-cttralaihang.js +1 -4
  830. package/server/modules/reports/rp-databanle.js +1 -10
  831. package/server/modules/reports/rp-diemthuong.js +1 -2
  832. package/server/modules/reports/rp-dkcn.js +1 -3
  833. package/server/modules/reports/rp-dktk.js +1 -2
  834. package/server/modules/reports/rp-dsnhanviencm.js +1 -9
  835. package/server/modules/reports/rp-dsnhanvientb.js +1 -9
  836. package/server/modules/reports/rp-dtbanlekempk.js +1 -9
  837. package/server/modules/reports/rp-dtbanletheoct.js +1 -23
  838. package/server/modules/reports/rp-dtbanletheoctkempk.js +1 -25
  839. package/server/modules/reports/rp-dtbanletheokh.js +1 -20
  840. package/server/modules/reports/rp-dtbanletheokhnpp.js +1 -19
  841. package/server/modules/reports/rp-dtbanletheokho.js +1 -18
  842. package/server/modules/reports/rp-dtbanletheonam.js +1 -3
  843. package/server/modules/reports/rp-dtbanletheongay.js +1 -1
  844. package/server/modules/reports/rp-dtbanletheonpp.js +1 -23
  845. package/server/modules/reports/rp-dtbanletheonv.js +1 -19
  846. package/server/modules/reports/rp-dtbanletheoquy.js +1 -3
  847. package/server/modules/reports/rp-dtbanletheosp.js +1 -8
  848. package/server/modules/reports/rp-dtbanletheospnpp.js +1 -6
  849. package/server/modules/reports/rp-dtbanletheothang.js +1 -3
  850. package/server/modules/reports/rp-dtbanletheothungan.js +1 -12
  851. package/server/modules/reports/rp-dtbanletheovt.js +1 -2
  852. package/server/modules/reports/rp-dtbanletheovtnpp.js +1 -2
  853. package/server/modules/reports/rp-dutoanthuchitheodt.js +1 -4
  854. package/server/modules/reports/rp-getPXC2PNC.js +1 -8
  855. package/server/modules/reports/rp-getariseofaccountsbymonth.js +1 -4
  856. package/server/modules/reports/rp-getbtpb.js +1 -6
  857. package/server/modules/reports/rp-getcashbycashier.js +1 -7
  858. package/server/modules/reports/rp-getcschietkhau.js +1 -5
  859. package/server/modules/reports/rp-getdinhmuc4lenhcp.js +1 -7
  860. package/server/modules/reports/rp-getdinhmuc4pxk.js +1 -9
  861. package/server/modules/reports/rp-getdk4pht.js +1 -8
  862. package/server/modules/reports/rp-getdk4pkc.js +1 -9
  863. package/server/modules/reports/rp-getdttheoca.js +1 -5
  864. package/server/modules/reports/rp-getinvoice2pay.js +1 -4
  865. package/server/modules/reports/rp-getinvoice2receive.js +1 -4
  866. package/server/modules/reports/rp-getinvoice2return.js +1 -5
  867. package/server/modules/reports/rp-getinvoice2return_bl.js +1 -6
  868. package/server/modules/reports/rp-getkehoachmh4lenhcp.js +1 -4
  869. package/server/modules/reports/rp-getkhauhao.js +1 -7
  870. package/server/modules/reports/rp-getluong.js +1 -8
  871. package/server/modules/reports/rp-getluongchuyen.js +1 -5
  872. package/server/modules/reports/rp-getpn2fee.js +1 -5
  873. package/server/modules/reports/rp-getpn2return.js +1 -5
  874. package/server/modules/reports/rp-getthanhpham4pnk.js +1 -7
  875. package/server/modules/reports/rp-getvc2xhd.js +1 -11
  876. package/server/modules/reports/rp-gt_cpnvltt.js +1 -6
  877. package/server/modules/reports/rp-hangbanbitralai.js +1 -5
  878. package/server/modules/reports/rp-hangthanhvien.js +1 -3
  879. package/server/modules/reports/rp-hoadonbanhangtheohantt.js +1 -5
  880. package/server/modules/reports/rp-hoadonmuahangtheohantt.js +1 -5
  881. package/server/modules/reports/rp-hoahong.js +1 -15
  882. package/server/modules/reports/rp-kcsns.js +1 -19
  883. package/server/modules/reports/rp-kgchamcong.js +1 -7
  884. package/server/modules/reports/rp-khoaso.js +1 -12
  885. package/server/modules/reports/rp-kiemtrasocaitcvssocai.js +1 -6
  886. package/server/modules/reports/rp-kqdanhgianhanvien.js +1 -5
  887. package/server/modules/reports/rp-kqhdkd.js +1 -7
  888. package/server/modules/reports/rp-lcttgt.js +1 -17
  889. package/server/modules/reports/rp-lctttt.js +1 -11
  890. package/server/modules/reports/rp-linkslist.js +1 -4
  891. package/server/modules/reports/rp-phanbochitienchohoadon.js +1 -11
  892. package/server/modules/reports/rp-phanbothutienchohoadon.js +1 -10
  893. package/server/modules/reports/rp-ptbitralai.js +1 -7
  894. package/server/modules/reports/rp-ptcttct.js +1 -22
  895. package/server/modules/reports/rp-ptdonhang.js +1 -8
  896. package/server/modules/reports/rp-pttct.js +1 -49
  897. package/server/modules/reports/rp-pttctkho.js +1 -32
  898. package/server/modules/reports/rp-pttctkho2.js +1 -29
  899. package/server/modules/reports/rp-referredusers.js +1 -1
  900. package/server/modules/reports/rp-sctbhxh.js +1 -4
  901. package/server/modules/reports/rp-sctcnkh.js +1 -17
  902. package/server/modules/reports/rp-sctdiem.js +1 -3
  903. package/server/modules/reports/rp-sctdt.js +1 -7
  904. package/server/modules/reports/rp-sctdtcp.js +1 -11
  905. package/server/modules/reports/rp-sctluong.js +1 -4
  906. package/server/modules/reports/rp-sctthuetncn.js +1 -4
  907. package/server/modules/reports/rp-scttk.js +1 -7
  908. package/server/modules/reports/rp-sctvt.js +1 -5
  909. package/server/modules/reports/rp-sctvt_sl.js +1 -5
  910. package/server/modules/reports/rp-sctvtnpp.js +1 -6
  911. package/server/modules/reports/rp-sctvttt.js +1 -5
  912. package/server/modules/reports/rp-search.js +1 -4
  913. package/server/modules/reports/rp-socai.js +1 -6
  914. package/server/modules/reports/rp-socaitk.js +1 -7
  915. package/server/modules/reports/rp-sochut.js +1 -7
  916. package/server/modules/reports/rp-sokho.js +1 -7
  917. package/server/modules/reports/rp-sokhott.js +1 -5
  918. package/server/modules/reports/rp-sonkbh.js +1 -5
  919. package/server/modules/reports/rp-sonkc.js +1 -6
  920. package/server/modules/reports/rp-sonkct.js +1 -5
  921. package/server/modules/reports/rp-sonkmh.js +1 -5
  922. package/server/modules/reports/rp-sonktt.js +1 -5
  923. package/server/modules/reports/rp-soquy.js +1 -11
  924. package/server/modules/reports/rp-sosanhkhvatt.js +1 -13
  925. package/server/modules/reports/rp-sosanhkhvatt2.js +1 -6
  926. package/server/modules/reports/rp-sotaisan.js +1 -13
  927. package/server/modules/reports/rp-sotiengui.js +1 -7
  928. package/server/modules/reports/rp-taodinhmuctudkhoc.js +1 -5
  929. package/server/modules/reports/rp-thbanhangkempk.js +1 -28
  930. package/server/modules/reports/rp-thdanhgianhanvien.js +1 -9
  931. package/server/modules/reports/rp-thgt.js +1 -6
  932. package/server/modules/reports/rp-thnxt.js +1 -12
  933. package/server/modules/reports/rp-thnxt_sl.js +1 -9
  934. package/server/modules/reports/rp-thnxtnpp.js +1 -10
  935. package/server/modules/reports/rp-thnxttt.js +1 -9
  936. package/server/modules/reports/rp-tkbanhangtheogioithieu.js +1 -9
  937. package/server/modules/reports/rp-tkgioithieukh.js +1 -4
  938. package/server/modules/reports/rp-tkgtgt.js +1 -7
  939. package/server/modules/reports/rp-tmbctc.js +1 -20
  940. package/server/modules/reports/rp-tonghopbanhang.js +1 -6
  941. package/server/modules/reports/rp-tonghopmuahang.js +1 -5
  942. package/server/modules/reports/rp-tonghoptralaihang.js +1 -5
  943. package/server/modules/reports/rp-tongquanbanle.js +1 -20
  944. package/server/modules/reports/rp-tongquanbds.js +1 -3
  945. package/server/modules/reports/rp-tongquancongty.js +1 -6
  946. package/server/modules/reports/rp-tongquanctvnpp.js +1 -12
  947. package/server/modules/reports/rp-tongquannvbh.js +1 -14
  948. package/server/modules/reports/rp-tongquannvnpp.js +1 -5
  949. package/server/modules/reports/rp-uoctinhnvl.js +1 -11
  950. package/server/modules/reports/rp-wallet.js +1 -3
  951. package/server/modules/reports/rpt-tkdiemtichluy.js +1 -9
  952. package/server/modules/systems/sys-app.js +1 -30
  953. package/server/modules/systems/sys-colleague.js +1 -11
  954. package/server/modules/systems/sys-domain.js +1 -4
  955. package/server/modules/systems/sys-ecomproductlines.js +1 -1
  956. package/server/modules/systems/sys-exportexceltemplate.js +1 -4
  957. package/server/modules/systems/sys-fieldright.js +1 -3
  958. package/server/modules/systems/sys-importexceltemplate.js +1 -4
  959. package/server/modules/systems/sys-labelinfo.js +1 -4
  960. package/server/modules/systems/sys-listinfo.js +1 -10
  961. package/server/modules/systems/sys-menuinfo.js +1 -4
  962. package/server/modules/systems/sys-message.js +1 -14
  963. package/server/modules/systems/sys-moduleinfo.js +1 -4
  964. package/server/modules/systems/sys-notification.js +1 -8
  965. package/server/modules/systems/sys-quanhuyen.js +1 -4
  966. package/server/modules/systems/sys-reportinfo.js +1 -4
  967. package/server/modules/systems/sys-rptobject.js +1 -3
  968. package/server/modules/systems/sys-schedule.js +1 -11
  969. package/server/modules/systems/sys-sysconfig.js +1 -3
  970. package/server/modules/systems/sys-sysgroup.js +1 -3
  971. package/server/modules/systems/sys-tableinfo.js +1 -3
  972. package/server/modules/systems/sys-templatestore.js +1 -5
  973. package/server/modules/systems/sys-tinhthanh.js +1 -4
  974. package/server/modules/systems/sys-token.js +1 -3
  975. package/server/modules/systems/sys-trangthai.js +1 -4
  976. package/server/modules/systems/sys-trialinfo.js +1 -3
  977. package/server/modules/systems/sys-user.js +1 -45
  978. package/server/modules/systems/sys-users.js +1 -10
  979. package/server/modules/systems/sys-versioninfo.js +1 -3
  980. package/server/modules/systems/sys-vietqrbanks.js +1 -4
  981. package/server/modules/systems/sys-xaphuong.js +1 -4
  982. package/server/modules/vouchers/vo-banggiaban.js +1 -5
  983. package/server/modules/vouchers/vo-bc1.js +1 -33
  984. package/server/modules/vouchers/vo-bc5.js +1 -15
  985. package/server/modules/vouchers/vo-bg1.js +1 -10
  986. package/server/modules/vouchers/vo-bg2.js +1 -12
  987. package/server/modules/vouchers/vo-bn1.js +1 -35
  988. package/server/modules/vouchers/vo-bn5.js +1 -15
  989. package/server/modules/vouchers/vo-dh2.js +1 -35
  990. package/server/modules/vouchers/vo-dinhmucsx.js +1 -6
  991. package/server/modules/vouchers/vo-dkb.js +1 -21
  992. package/server/modules/vouchers/vo-dn0.js +1 -9
  993. package/server/modules/vouchers/vo-dnm.js +1 -21
  994. package/server/modules/vouchers/vo-hd1.js +1 -36
  995. package/server/modules/vouchers/vo-hd2.js +1 -107
  996. package/server/modules/vouchers/vo-hd3.js +1 -44
  997. package/server/modules/vouchers/vo-hd4.js +1 -13
  998. package/server/modules/vouchers/vo-hd7.js +1 -29
  999. package/server/modules/vouchers/vo-hd8.js +1 -29
  1000. package/server/modules/vouchers/vo-hde.js +1 -40
  1001. package/server/modules/vouchers/vo-htl.js +1 -11
  1002. package/server/modules/vouchers/vo-kbbtpb.js +1 -6
  1003. package/server/modules/vouchers/vo-kehoachmh.js +1 -13
  1004. package/server/modules/vouchers/vo-lenhcapphat.js +1 -10
  1005. package/server/modules/vouchers/vo-lenhsx.js +1 -12
  1006. package/server/modules/vouchers/vo-pbl.js +1 -93
  1007. package/server/modules/vouchers/vo-pc0.js +1 -14
  1008. package/server/modules/vouchers/vo-pc1.js +1 -31
  1009. package/server/modules/vouchers/vo-pc2.js +1 -24
  1010. package/server/modules/vouchers/vo-pc3.js +1 -14
  1011. package/server/modules/vouchers/vo-pc5.js +1 -15
  1012. package/server/modules/vouchers/vo-pc6.js +1 -19
  1013. package/server/modules/vouchers/vo-pcl.js +1 -7
  1014. package/server/modules/vouchers/vo-pdn.js +1 -11
  1015. package/server/modules/vouchers/vo-pdx.js +1 -9
  1016. package/server/modules/vouchers/vo-pgh.js +1 -19
  1017. package/server/modules/vouchers/vo-pht.js +1 -7
  1018. package/server/modules/vouchers/vo-pkc.js +1 -7
  1019. package/server/modules/vouchers/vo-pkh.js +1 -10
  1020. package/server/modules/vouchers/vo-pkk.js +1 -12
  1021. package/server/modules/vouchers/vo-pkt.js +1 -13
  1022. package/server/modules/vouchers/vo-pn1.js +1 -33
  1023. package/server/modules/vouchers/vo-pn2.js +1 -16
  1024. package/server/modules/vouchers/vo-pn3.js +1 -18
  1025. package/server/modules/vouchers/vo-pn5.js +1 -19
  1026. package/server/modules/vouchers/vo-pn6.js +1 -18
  1027. package/server/modules/vouchers/vo-pn9.js +1 -22
  1028. package/server/modules/vouchers/vo-pnc.js +1 -20
  1029. package/server/modules/vouchers/vo-pnh.js +1 -20
  1030. package/server/modules/vouchers/vo-pnk.js +1 -14
  1031. package/server/modules/vouchers/vo-pnknpp.js +1 -12
  1032. package/server/modules/vouchers/vo-po1.js +1 -15
  1033. package/server/modules/vouchers/vo-ppb.js +1 -8
  1034. package/server/modules/vouchers/vo-pt1.js +1 -21
  1035. package/server/modules/vouchers/vo-pt5.js +1 -15
  1036. package/server/modules/vouchers/vo-ptl.js +1 -8
  1037. package/server/modules/vouchers/vo-purchase_contract.js +1 -9
  1038. package/server/modules/vouchers/vo-pxc.js +1 -22
  1039. package/server/modules/vouchers/vo-pxh.js +1 -28
  1040. package/server/modules/vouchers/vo-pxk.js +1 -15
  1041. package/server/modules/vouchers/vo-pxknpp.js +1 -14
  1042. package/server/modules/vouchers/vo-qts.js +1 -12
  1043. package/server/modules/vouchers/vo-sale_contract.js +1 -11
  1044. package/server/modules/vouchers/vo-shipbook.js +1 -17
  1045. package/server/modules/vouchers/vo-so1.js +1 -126
  1046. package/server/modules/vouchers/vo-so2.js +1 -37
  1047. package/server/modules/vouchers/vo-so3.js +1 -41
  1048. package/server/modules/vouchers/vo-so5.js +1 -57
  1049. package/server/modules/vouchers/vo-so7.js +1 -97
  1050. package/server/modules/vouchers/vo-so9.js +1 -119
  1051. package/server/modules/vouchers/vo-vanchuyen.js +1 -14
  1052. package/server/modules/vouchers/vo-xhd.js +1 -33
  1053. package/server/route.js +1 -51
  1054. package/server/services/invoiceFetcher.js +1 -15
  1055. package/server/sslConfig.js +1 -2
  1056. package/server/transactionMiddleware.js +1 -5
  1057. package/server/workers/backupApp.js +1 -9
  1058. package/server/workers/calcGrid.js +1 -9
  1059. package/server/workers/customerOnImport.js +1 -8
  1060. package/server/workers/dmvtOnImport.js +1 -9
  1061. package/server/workers/excelParser.js +1 -9
  1062. package/server/workers/inputWorker.js +1 -6
  1063. package/server/workers/pushNotify.js +1 -10
  1064. package/server/workers/reportWorker.js +1 -7
  1065. package/server/workers/restoreApp.js +1 -23
  1066. package/server/workers/runScript.js +1 -4
  1067. package/server/workers/sendEmail.js +1 -13
  1068. package/server/workers/webhook.js +1 -5
@@ -1,26 +1 @@
1
- const moment=require("moment"),{createSocaiTC}=require("../libs/utils"),socaiSchema=new Schema({id_app:{type:String,required:!0,maxlength:1024},ma_dvcs:{type:String,required:!0,maxlength:1024},id_ct:{type:String,required:!0,maxlength:1024,trim:!0},ma_ct:{type:String,required:!0,uppercase:!0,maxlength:32,trim:!0},ma_gd:{type:String,default:"0",maxlength:32,trim:!0},ngay_ct:{type:Date,required:!0},ngay_ct_full:{type:Date},so_ct:{type:String,required:!0,uppercase:!0,maxlength:32,trim:!0},ngay_hd:{type:Date},
2
- so_hd:{type:String,uppercase:!0,maxlength:32,trim:!0},tk_no:{type:String,required:!0,uppercase:!0,maxlength:32,trim:!0},tk_co:{type:String,required:!0,uppercase:!0,maxlength:32,trim:!0},ma_kh_no:{type:String,uppercase:!0,default:"",maxlength:32,trim:!0},ma_kh_co:{type:String,uppercase:!0,default:"",maxlength:32,trim:!0},ma_nt:{type:String,default:"VND",required:!0,uppercase:!0,maxlength:32,trim:!0},ty_gia:{type:Number,default:1},tien_nt:{type:Number,default:0},tien:{type:Number,default:0},dien_giai:{type:String,
3
- default:"",maxlength:1024},ong_ba:{type:String,default:"",maxlength:1024},ma_kho:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_bp:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_phi:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_hd:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_dt:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_nv:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_lo:{type:String,default:"",uppercase:!0,
4
- maxlength:32,trim:!0},han_sd:{type:Date},ma_tt1:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_tt2:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_tt3:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_ca:{type:String,uppercase:!0,maxlength:32,trim:!0},ma_cp:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_sp:{type:String,default:"",uppercase:!0,maxlength:1024,trim:!0},ma_vt:{type:String,default:"",uppercase:!0,maxlength:1024,trim:!0},ma_dvt_sp:{type:String,
5
- maxlength:32,trim:!0},ma_tt1_sp:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_tt2_sp:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_tt3_sp:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_cum_chi_tiet:{type:String,uppercase:!0,default:"",maxlength:32,trim:!0},ten_cum_chi_tiet:{type:String,default:"",maxlength:1024,trim:!0},ma_cong_doan:{type:String,uppercase:!0,default:"",maxlength:32,trim:!0},id_lenhsx:{type:String,maxlength:1024},id_cs:{type:String,maxlength:1024},
6
- id_cs_ck:{type:String,maxlength:1024},id_link:String,ma_ct_link:String,so_ct_link:String,id_ct_goc:String,ma_ct_goc:String,so_ct_goc:String,ngay_ct_goc:Date,pt_thanh_toan_goc:String,pt_thanh_toan:String,pt_thanh_toan2:String,trang_thai:{type:String,maxlength:32},nh_dk:{type:Number,default:0},id_kbbtpb:{type:String,maxlength:1024},exfields:Schema.Types.Mixed,exfields_detail:Schema.Types.Mixed,flag:{type:String,maxlength:1024},gio:Number,ngay:Number,thang:Number,quy:Number,nam:Number,ma_kenh:String,
7
- ma_td1:Schema.Types.Mixed,ma_td2:Schema.Types.Mixed,ma_td3:Schema.Types.Mixed,ma_td4:Schema.Types.Mixed,ma_td5:Schema.Types.Mixed,ma_td6:Schema.Types.Mixed,ma_td7:Schema.Types.Mixed,ma_td8:Schema.Types.Mixed,ma_td9:Schema.Types.Mixed,status:{type:Boolean,default:!0},date_created:{type:Date,default:Date.now},date_updated:{type:Date,default:Date.now},user_created:{type:String,default:""},user_updated:{type:String,default:""},id_client:String,listinfo_code:String},{toJSON:{virtuals:!0}});
8
- (global.configs||{}).createIndexes&&(socaiSchema.index({id_app:1}),socaiSchema.index({id_app:1,ma_dvcs:1}),socaiSchema.index({id_app:1,ma_ct:1,so_ct:1}),socaiSchema.index({id_app:1,ma_ct:1}),socaiSchema.index({id_app:1,ma_nt:1,ngay_ct:-1}),socaiSchema.index({id_app:1,so_ct:1,ngay_ct:-1}),socaiSchema.index({id_app:1,gio:1}),socaiSchema.index({id_app:1,ngay:1}),socaiSchema.index({id_app:1,thang:1}),socaiSchema.index({id_app:1,quy:1}),socaiSchema.index({id_app:1,nam:-1}),socaiSchema.index({id_ct:1}),
9
- socaiSchema.index({id_app:1,id_ct:1}),socaiSchema.index({id_app:1,ma_ct_goc:1,id_ct_goc:1}),socaiSchema.index({id_app:1,tk_no:1,tk_co:1,ma_bp:1,ngay_ct:-1}),socaiSchema.index({id_app:1,tk_no:1,tk_co:1,ma_phi:1,ngay_ct:-1}),socaiSchema.index({id_app:1,tk_no:1,tk_co:1,ma_hd:1,ngay_ct:-1}),socaiSchema.index({id_app:1,tk_no:1,tk_co:1,ma_dt:1,ngay_ct:-1}),socaiSchema.index({id_app:1,tk_no:1,tk_co:1,ma_nv:1,ngay_ct:-1}),socaiSchema.index({id_app:1,tk_no:1,tk_co:1,ma_sp:1,ngay_ct:-1}),socaiSchema.index({id_app:1,
10
- tk_no:1,tk_co:1,ma_kho:1,ma_vt:1,ngay_ct:-1}),socaiSchema.index({id_app:1,tk_no:1,tk_co:1,ma_kenh:1,ngay_ct:-1}),socaiSchema.index({id_app:1,tk_no:1,tk_co:1,ma_td1:1,ngay_ct:-1}),socaiSchema.index({id_app:1,tk_no:1,tk_co:1,ma_td2:1,ngay_ct:-1}),socaiSchema.index({id_app:1,tk_no:1,tk_co:1,ma_td3:1,ngay_ct:-1}),socaiSchema.index({id_app:1,tk_no:1,tk_co:1,ma_vt:1,ma_tt1:1,ma_tt2:1,ma_tt3:1,ma_lo:1,han_sd:-1,ngay_ct:-1}),socaiSchema.index({id_app:1,id_lenhsx:1}),socaiSchema.index({id_app:1,id_link:1}),
11
- socaiSchema.index({id_app:1,id_cs:1}),socaiSchema.index({id_app:1,id_cs_ck:1}),socaiSchema.index({id_app:1,id_ct:1,so_ct:-1,ma_kh_no:1,ma_kh_co:1,tk_no:1,tk_co:1,ngay_ct:-1}),socaiSchema.index({id_app:1,ma_kh_no:1,ma_kh_co:1,tk_no:1,tk_co:1,ngay_ct:-1}),socaiSchema.index({id_app:1,tk_no:1,ngay_ct:-1}),socaiSchema.index({id_app:1,tk_co:1,ngay_ct:-1}),socaiSchema.index({id_app:1,tk_no:1,ma_kho:1,ngay_ct_full:-1}),socaiSchema.index({id_app:1,tk_co:1,ma_kho:1,ngay_ct_full:-1}),socaiSchema.index({id_app:1,
12
- date_created:-1}));socaiSchema.pre("save",function($next$$){this.tien=this.ma_nt=="VND"?this.tien_nt=Math.roundBy(this.tien_nt,0):Math.roundBy(this.tien,0);this.ngay_ct_full=new Date(this.ngay_ct);let $ngay_ct$$=moment(this.ngay_ct);this.gio=$ngay_ct$$.get("hours");this.ngay=$ngay_ct$$.get("dates");this.quy=$ngay_ct$$.get("quarters");this.thang=$ngay_ct$$.get("months")+1;this.nam=$ngay_ct$$.get("year");this.ngay_ct=$ngay_ct$$.startOf("date").toDate();$next$$()});
13
- let socaiQueue=[],socaiIsHandling=!1;const handleCreateSocaiTc=async()=>{if(!socaiIsHandling){socaiQueue=[...(new Set(socaiQueue))];var $doc$$=socaiQueue.shift();if($doc$$){try{socaiIsHandling=!0,$doc$$=JSON.parse($doc$$),await createSocaiTC($doc$$.id_app,$doc$$.ngay_ct,$doc$$.ngay_ct)}catch($e$$){console.error("handleCreateSocaiTc",$doc$$,$e$$)}socaiIsHandling=!1;handleCreateSocaiTc()}}},{onAfterCommit,getCurrentSession,getCurrentStore}=require("../libs/sessionContext");
14
- socaiSchema.pre("save",function($next$$){const $session$$=getCurrentSession(),$store$$=getCurrentStore();$session$$&&$store$$&&(global.registerSessionStore($session$$,$store$$),this.$__sessionKey=$session$$._id||$session$$._debugId);$next$$()});
15
- socaiSchema.post("save",async function($doc$$){const $sessionKey$$=this.$__sessionKey,$capturedStore$$=global.SESSION_STORE_MAP.get($sessionKey$$),$handleSaveAfterCommit$$=async()=>{if(["SO1","HD2","HD1","PBL"].indexOf($doc$$.ma_ct)>=0){if($doc$$.ma_kh_no){var $dhgn_dhgn$$=await global.getModel("socai").findOne({ma_kh_no:$doc$$.ma_kh_no,id_app:$doc$$.id_app},{ngay_ct:1}).sort({ngay_ct:-1});if($dhgn_dhgn$$){var $so_ngay_da_mua_so_ngay_da_mua$$=moment().diff(moment($dhgn_dhgn$$.ngay_ct),"days");global.getModel("customer").updateOne({ma_kh:$doc$$.ma_kh_no,
16
- id_app:$doc$$.id_app},{ngay_mua_gan_nhat:$dhgn_dhgn$$.ngay_ct,so_ngay_da_mua:$so_ngay_da_mua_so_ngay_da_mua$$})}}$doc$$.ma_kh_co&&$doc$$.ma_kh_co!=$doc$$.ma_kh_no&&($dhgn_dhgn$$=await global.getModel("socai").findOne({ma_kh_co:$doc$$.ma_kh_co,id_app:$doc$$.id_app},{ngay_ct:1}).sort({ngay_ct:-1}))&&($so_ngay_da_mua_so_ngay_da_mua$$=moment().diff(moment($dhgn_dhgn$$.ngay_ct),"days"),global.getModel("customer").updateOne({ma_kh:$doc$$.ma_kh_co,id_app:$doc$$.id_app},{ngay_mua_gan_nhat:$dhgn_dhgn$$.ngay_ct,
17
- so_ngay_da_mua:$so_ngay_da_mua_so_ngay_da_mua$$}))}let $key$$=JSON.stringify({id_app:$doc$$.id_app,ngay_ct:$doc$$.ngay_ct});socaiQueue.find($d$$=>$d$$==$key$$)||(socaiQueue.push($key$$),socaiIsHandling||handleCreateSocaiTc())};if($sessionKey$$&&$capturedStore$$)onAfterCommit($handleSaveAfterCommit$$,"X\u1eed l\u00fd s\u1ef1 ki\u1ec7n sau khi l\u01b0u socai",$capturedStore$$.session,$capturedStore$$);else try{await $handleSaveAfterCommit$$()}catch($e$$){console.error("\u274c post save immediate error:",
18
- $e$$)}});
19
- socaiSchema.pre("deleteMany",async function($next$$){const $session$$=this.options.session||getCurrentSession(),$store$$=getCurrentStore(),$handleDeletionAfterCommit$$=async()=>{var $deletedDocs_query$$=this.getQuery();$deletedDocs_query$$=(await global.getModel("socai").find($deletedDocs_query$$,{id_app:1,ngay_ct:1}).lean()).map($r$$=>JSON.stringify({id_app:$r$$.id_app,ngay_ct:$r$$.ngay_ct}));$deletedDocs_query$$=[...(new Set($deletedDocs_query$$))];$deletedDocs_query$$.forEach($doc$$=>{socaiQueue.find($d$$=>
20
- $d$$==$doc$$)||socaiQueue.push($doc$$)});socaiIsHandling||handleCreateSocaiTc()};if($session$$)onAfterCommit($handleDeletionAfterCommit$$,"X\u1eed l\u00fd s\u1ef1 ki\u1ec7n sau khi xo\u00e1 socai",$session$$,$store$$),$next$$();else try{await $handleDeletionAfterCommit$$(),$next$$()}catch($e$$){$next$$($e$$)}});
21
- socaiSchema.pre("deleteOne",async function($next$$){const $session$$=this.options.session||getCurrentSession(),$store$$=getCurrentStore(),$handleDeletionAfterCommit$$=async()=>{var $deletedDocs$jscomp$1_query$$=this.getQuery();$deletedDocs$jscomp$1_query$$=(await global.getModel("socai").find($deletedDocs$jscomp$1_query$$,{id_app:1,ngay_ct:1}).lean()).map($r$$=>JSON.stringify({id_app:$r$$.id_app,ngay_ct:$r$$.ngay_ct}));$deletedDocs$jscomp$1_query$$=[...(new Set($deletedDocs$jscomp$1_query$$))];$deletedDocs$jscomp$1_query$$.forEach($doc$$=>
22
- {socaiQueue.find($d$$=>$d$$==$doc$$)||socaiQueue.push($doc$$)});socaiIsHandling||handleCreateSocaiTc()};if($session$$)onAfterCommit($handleDeletionAfterCommit$$,"X\u1eed l\u00fd s\u1ef1 ki\u1ec7n tr\u01b0\u1edbc khi xo\u00e1 socai",$session$$,$store$$),$next$$();else try{await $handleDeletionAfterCommit$$(),$next$$()}catch($e$$){$next$$($e$$)}});const model=mongoose.models.socai||mongoose.model("socai",socaiSchema);
23
- if((global.configs||{}).createIndexes)model.on("index",async function($err$$){$err$$?console.error("socai index error",$err$$):console.info("socai indexing complete")});
24
- model.getArise=async($query$$,$options$$={fields:void 0})=>{let $condition$$={ngay_ct:{$gte:$query$$.tu_ngay,$lte:$query$$.den_ngay},id_app:$query$$.id_app};$query$$.ma_dvcs&&($condition$$.ma_dvcs=$query$$.ma_dvcs);$query$$.ma_bp&&($condition$$.ma_bp=$query$$.ma_bp);$query$$.ma_hd&&($condition$$.ma_hd=$query$$.ma_hd);$query$$.ma_dt&&($condition$$.ma_dt=$query$$.ma_dt);$query$$.ma_sp&&($condition$$.ma_sp=$query$$.ma_sp);$query$$.ma_nv&&($condition$$.ma_nv=$query$$.ma_nv);$query$$.ma_phi&&($condition$$.ma_phi=
25
- $query$$.ma_phi);$query$$.ma_kho&&($condition$$.ma_kho=$query$$.ma_kho);if($query$$.tk_no&&Array.isArray($query$$.tk_no)){var $tk_co_tk_no$$=$query$$.tk_no.reg();$condition$$.tk_no=$query$$.giam_tru_no?{$not:new RegExp($tk_co_tk_no$$)}:{$regex:$tk_co_tk_no$$,$options:"i"}}$query$$.tk_co&&Array.isArray($query$$.tk_co)&&($tk_co_tk_no$$=$query$$.tk_co.reg(),$condition$$.tk_co=$query$$.giam_tru_co&&$tk_co_tk_no$$?{$not:new RegExp($tk_co_tk_no$$)}:{$regex:$tk_co_tk_no$$,$options:"i"});return await model.find($condition$$,
26
- $options$$.fields).lean()};module.exports=model;
1
+ const _0x35e3c1=_0x3b56;(function(_0x3efb60,_0x1aa3a5){const _0x33268a=_0x3b56,_0x324fde=_0x3efb60();while(!![]){try{const _0x14025a=parseInt(_0x33268a(0x222))/0x1*(-parseInt(_0x33268a(0x1b0))/0x2)+-parseInt(_0x33268a(0x195))/0x3+-parseInt(_0x33268a(0x1ce))/0x4+parseInt(_0x33268a(0x1d9))/0x5*(-parseInt(_0x33268a(0x1a9))/0x6)+parseInt(_0x33268a(0x236))/0x7+parseInt(_0x33268a(0x1f7))/0x8*(-parseInt(_0x33268a(0x22d))/0x9)+parseInt(_0x33268a(0x1e0))/0xa;if(_0x14025a===_0x1aa3a5)break;else _0x324fde['push'](_0x324fde['shift']());}catch(_0x3f1c43){_0x324fde['push'](_0x324fde['shift']());}}}(_0x399a,0x8ad5d));const moment=require(_0x35e3c1(0x23d)),{createSocaiTC}=require(_0x35e3c1(0x213)),socaiSchema=new Schema({'id_app':{'type':String,'required':!![],'maxlength':0x400},'ma_dvcs':{'type':String,'required':!![],'maxlength':0x400},'id_ct':{'type':String,'required':!![],'maxlength':0x400,'trim':!![]},'ma_ct':{'type':String,'required':!![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_gd':{'type':String,'default':'0','maxlength':0x20,'trim':!![]},'ngay_ct':{'type':Date,'required':!![]},'ngay_ct_full':{'type':Date},'so_ct':{'type':String,'required':!![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'ngay_hd':{'type':Date},'so_hd':{'type':String,'uppercase':!![],'maxlength':0x20,'trim':!![]},'tk_no':{'type':String,'required':!![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'tk_co':{'type':String,'required':!![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_kh_no':{'type':String,'uppercase':!![],'default':'','maxlength':0x20,'trim':!![]},'ma_kh_co':{'type':String,'uppercase':!![],'default':'','maxlength':0x20,'trim':!![]},'ma_nt':{'type':String,'default':_0x35e3c1(0x1b3),'required':!![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'ty_gia':{'type':Number,'default':0x1},'tien_nt':{'type':Number,'default':0x0},'tien':{'type':Number,'default':0x0},'dien_giai':{'type':String,'default':'','maxlength':0x400},'ong_ba':{'type':String,'default':'','maxlength':0x400},'ma_kho':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_bp':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_phi':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_hd':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_dt':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_nv':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_lo':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'han_sd':{'type':Date},'ma_tt1':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_tt2':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_tt3':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_ca':{'type':String,'uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_cp':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_sp':{'type':String,'default':'','uppercase':!![],'maxlength':0x400,'trim':!![]},'ma_vt':{'type':String,'default':'','uppercase':!![],'maxlength':0x400,'trim':!![]},'ma_dvt_sp':{'type':String,'maxlength':0x20,'trim':!![]},'ma_tt1_sp':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_tt2_sp':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_tt3_sp':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_cum_chi_tiet':{'type':String,'uppercase':!![],'default':'','maxlength':0x20,'trim':!![]},'ten_cum_chi_tiet':{'type':String,'default':'','maxlength':0x400,'trim':!![]},'ma_cong_doan':{'type':String,'uppercase':!![],'default':'','maxlength':0x20,'trim':!![]},'id_lenhsx':{'type':String,'maxlength':0x400},'id_cs':{'type':String,'maxlength':0x400},'id_cs_ck':{'type':String,'maxlength':0x400},'id_link':String,'ma_ct_link':String,'so_ct_link':String,'id_ct_goc':String,'ma_ct_goc':String,'so_ct_goc':String,'ngay_ct_goc':Date,'pt_thanh_toan_goc':String,'pt_thanh_toan':String,'pt_thanh_toan2':String,'trang_thai':{'type':String,'maxlength':0x20},'nh_dk':{'type':Number,'default':0x0},'id_kbbtpb':{'type':String,'maxlength':0x400},'exfields':Schema['Types'][_0x35e3c1(0x191)],'exfields_detail':Schema[_0x35e3c1(0x1bd)][_0x35e3c1(0x191)],'flag':{'type':String,'maxlength':0x400},'gio':Number,'ngay':Number,'thang':Number,'quy':Number,'nam':Number,'ma_kenh':String,'ma_td1':Schema[_0x35e3c1(0x1bd)][_0x35e3c1(0x191)],'ma_td2':Schema[_0x35e3c1(0x1bd)]['Mixed'],'ma_td3':Schema[_0x35e3c1(0x1bd)][_0x35e3c1(0x191)],'ma_td4':Schema[_0x35e3c1(0x1bd)][_0x35e3c1(0x191)],'ma_td5':Schema[_0x35e3c1(0x1bd)][_0x35e3c1(0x191)],'ma_td6':Schema[_0x35e3c1(0x1bd)][_0x35e3c1(0x191)],'ma_td7':Schema[_0x35e3c1(0x1bd)][_0x35e3c1(0x191)],'ma_td8':Schema['Types']['Mixed'],'ma_td9':Schema['Types'][_0x35e3c1(0x191)],'status':{'type':Boolean,'default':!![]},'date_created':{'type':Date,'default':Date['now']},'date_updated':{'type':Date,'default':Date['now']},'user_created':{'type':String,'default':''},'user_updated':{'type':String,'default':''},'id_client':String,'listinfo_code':String},{'toJSON':{'virtuals':!![]}});(global[_0x35e3c1(0x1e7)]||{})[_0x35e3c1(0x23b)]&&(socaiSchema[_0x35e3c1(0x219)]({'id_app':0x1}),socaiSchema[_0x35e3c1(0x219)]({'id_app':0x1,'ma_dvcs':0x1}),socaiSchema['index']({'id_app':0x1,'ma_ct':0x1,'so_ct':0x1}),socaiSchema[_0x35e3c1(0x219)]({'id_app':0x1,'ma_ct':0x1}),socaiSchema[_0x35e3c1(0x219)]({'id_app':0x1,'ma_nt':0x1,'ngay_ct':-0x1}),socaiSchema[_0x35e3c1(0x219)]({'id_app':0x1,'so_ct':0x1,'ngay_ct':-0x1}),socaiSchema[_0x35e3c1(0x219)]({'id_app':0x1,'gio':0x1}),socaiSchema[_0x35e3c1(0x219)]({'id_app':0x1,'ngay':0x1}),socaiSchema['index']({'id_app':0x1,'thang':0x1}),socaiSchema[_0x35e3c1(0x219)]({'id_app':0x1,'quy':0x1}),socaiSchema[_0x35e3c1(0x219)]({'id_app':0x1,'nam':-0x1}),socaiSchema['index']({'id_ct':0x1}),socaiSchema[_0x35e3c1(0x219)]({'id_app':0x1,'id_ct':0x1}),socaiSchema['index']({'id_app':0x1,'ma_ct_goc':0x1,'id_ct_goc':0x1}),socaiSchema[_0x35e3c1(0x219)]({'id_app':0x1,'tk_no':0x1,'tk_co':0x1,'ma_bp':0x1,'ngay_ct':-0x1}),socaiSchema[_0x35e3c1(0x219)]({'id_app':0x1,'tk_no':0x1,'tk_co':0x1,'ma_phi':0x1,'ngay_ct':-0x1}),socaiSchema[_0x35e3c1(0x219)]({'id_app':0x1,'tk_no':0x1,'tk_co':0x1,'ma_hd':0x1,'ngay_ct':-0x1}),socaiSchema[_0x35e3c1(0x219)]({'id_app':0x1,'tk_no':0x1,'tk_co':0x1,'ma_dt':0x1,'ngay_ct':-0x1}),socaiSchema[_0x35e3c1(0x219)]({'id_app':0x1,'tk_no':0x1,'tk_co':0x1,'ma_nv':0x1,'ngay_ct':-0x1}),socaiSchema[_0x35e3c1(0x219)]({'id_app':0x1,'tk_no':0x1,'tk_co':0x1,'ma_sp':0x1,'ngay_ct':-0x1}),socaiSchema[_0x35e3c1(0x219)]({'id_app':0x1,'tk_no':0x1,'tk_co':0x1,'ma_kho':0x1,'ma_vt':0x1,'ngay_ct':-0x1}),socaiSchema[_0x35e3c1(0x219)]({'id_app':0x1,'tk_no':0x1,'tk_co':0x1,'ma_kenh':0x1,'ngay_ct':-0x1}),socaiSchema[_0x35e3c1(0x219)]({'id_app':0x1,'tk_no':0x1,'tk_co':0x1,'ma_td1':0x1,'ngay_ct':-0x1}),socaiSchema[_0x35e3c1(0x219)]({'id_app':0x1,'tk_no':0x1,'tk_co':0x1,'ma_td2':0x1,'ngay_ct':-0x1}),socaiSchema[_0x35e3c1(0x219)]({'id_app':0x1,'tk_no':0x1,'tk_co':0x1,'ma_td3':0x1,'ngay_ct':-0x1}),socaiSchema[_0x35e3c1(0x219)]({'id_app':0x1,'tk_no':0x1,'tk_co':0x1,'ma_vt':0x1,'ma_tt1':0x1,'ma_tt2':0x1,'ma_tt3':0x1,'ma_lo':0x1,'han_sd':-0x1,'ngay_ct':-0x1}),socaiSchema[_0x35e3c1(0x219)]({'id_app':0x1,'id_lenhsx':0x1}),socaiSchema[_0x35e3c1(0x219)]({'id_app':0x1,'id_link':0x1}),socaiSchema[_0x35e3c1(0x219)]({'id_app':0x1,'id_cs':0x1}),socaiSchema[_0x35e3c1(0x219)]({'id_app':0x1,'id_cs_ck':0x1}),socaiSchema[_0x35e3c1(0x219)]({'id_app':0x1,'id_ct':0x1,'so_ct':-0x1,'ma_kh_no':0x1,'ma_kh_co':0x1,'tk_no':0x1,'tk_co':0x1,'ngay_ct':-0x1}),socaiSchema['index']({'id_app':0x1,'ma_kh_no':0x1,'ma_kh_co':0x1,'tk_no':0x1,'tk_co':0x1,'ngay_ct':-0x1}),socaiSchema['index']({'id_app':0x1,'tk_no':0x1,'ngay_ct':-0x1}),socaiSchema[_0x35e3c1(0x219)]({'id_app':0x1,'tk_co':0x1,'ngay_ct':-0x1}),socaiSchema[_0x35e3c1(0x219)]({'id_app':0x1,'tk_no':0x1,'ma_kho':0x1,'ngay_ct_full':-0x1}),socaiSchema[_0x35e3c1(0x219)]({'id_app':0x1,'tk_co':0x1,'ma_kho':0x1,'ngay_ct_full':-0x1}),socaiSchema[_0x35e3c1(0x219)]({'id_app':0x1,'date_created':-0x1}));socaiSchema[_0x35e3c1(0x1c2)](_0x35e3c1(0x248),function(_0xe6d0ee){const _0x393098=_0x35e3c1,_0x4457cd={'HLCyL':function(_0x57035c,_0x240c8d){return _0x57035c==_0x240c8d;},'BXXky':_0x393098(0x1b3),'WZdiE':_0x393098(0x234),'Lccaf':_0x393098(0x232),'rCKWB':_0x393098(0x1f1),'qKLDl':function(_0x4c8a86,_0x5219be){return _0x4c8a86+_0x5219be;},'KwNKp':'months','RuWYj':_0x393098(0x1e2),'lrryK':'date','dnZwR':function(_0x3edcd5){return _0x3edcd5();},'rlSqt':function(_0x103592,_0x3b6909){return _0x103592&&_0x3b6909;}},_0x5ef8e9=this;_0x4457cd[_0x393098(0x1c5)](_0x5ef8e9[_0x393098(0x1bb)],_0x4457cd['BXXky'])?(_0x5ef8e9[_0x393098(0x223)]=Math[_0x393098(0x1b5)](_0x5ef8e9[_0x393098(0x223)],0x0),_0x5ef8e9[_0x393098(0x21e)]=_0x5ef8e9['tien_nt']):_0x5ef8e9['tien']=Math[_0x393098(0x1b5)](_0x5ef8e9[_0x393098(0x21e)],0x0);_0x5ef8e9[_0x393098(0x1c6)]=new Date(_0x5ef8e9[_0x393098(0x1c0)]);let _0x10f39b=moment(_0x5ef8e9[_0x393098(0x1c0)]);_0x5ef8e9[_0x393098(0x226)]=_0x10f39b['get'](_0x4457cd[_0x393098(0x23c)]),_0x5ef8e9[_0x393098(0x1a8)]=_0x10f39b[_0x393098(0x22f)](_0x4457cd[_0x393098(0x24d)]),_0x5ef8e9[_0x393098(0x1a7)]=_0x10f39b['get'](_0x4457cd[_0x393098(0x20d)]),_0x5ef8e9[_0x393098(0x1c1)]=_0x4457cd[_0x393098(0x245)](_0x10f39b[_0x393098(0x22f)](_0x4457cd['KwNKp']),0x1),_0x5ef8e9[_0x393098(0x249)]=_0x10f39b[_0x393098(0x22f)](_0x4457cd[_0x393098(0x1c9)]),_0x5ef8e9['ngay_ct']=_0x10f39b[_0x393098(0x239)](_0x4457cd[_0x393098(0x19c)])[_0x393098(0x1d1)]();const _0x5f2199=_0x4457cd['dnZwR'](getCurrentSession),_0xef4dce=_0x4457cd[_0x393098(0x1b6)](getCurrentStore);_0x4457cd['rlSqt'](_0x5f2199,_0xef4dce)&&(global[_0x393098(0x198)](_0x5f2199,_0xef4dce),this[_0x393098(0x255)]=_0x5f2199[_0x393098(0x1ca)]||_0x5f2199[_0x393098(0x238)]),_0xe6d0ee();});let socaiQueue=[],socaiIsHandling=![];const handleCreateSocaiTc=async()=>{const _0x3051dd=_0x35e3c1,_0x5569d1={'pKHYC':function(_0x141b46,_0x4a89a5){return _0x141b46(_0x4a89a5);},'VbWiL':'days','rYplv':function(_0x38fd7d,_0x14b6b9){return _0x38fd7d!==_0x14b6b9;},'lMUOQ':_0x3051dd(0x240),'EQHaZ':_0x3051dd(0x1b1),'dUnIB':function(_0x4bcaa4,_0x172170,_0x2dfe80,_0x28a932){return _0x4bcaa4(_0x172170,_0x2dfe80,_0x28a932);},'daUCd':'handleCreateSocaiTc'};if(socaiIsHandling)return;socaiQueue=[...new Set(socaiQueue)];let _0x3aa57d=socaiQueue['shift']();if(_0x3aa57d){try{if(_0x5569d1[_0x3051dd(0x1c8)](_0x5569d1['lMUOQ'],_0x5569d1[_0x3051dd(0x228)]))socaiIsHandling=!![],_0x3aa57d=JSON['parse'](_0x3aa57d),await _0x5569d1[_0x3051dd(0x20b)](createSocaiTC,_0x3aa57d[_0x3051dd(0x24c)],_0x3aa57d['ngay_ct'],_0x3aa57d['ngay_ct']);else{const _0x52069d=_0x311ea8()[_0x3051dd(0x197)](_0x5569d1[_0x3051dd(0x24b)](_0x18c2a3,_0x4874aa[_0x3051dd(0x1c0)]),_0x5569d1[_0x3051dd(0x243)]);_0x19c3e8[_0x3051dd(0x1f4)]('customer')[_0x3051dd(0x1de)]({'ma_kh':_0x1c8955[_0x3051dd(0x193)],'id_app':_0x419bbd[_0x3051dd(0x24c)]},{'ngay_mua_gan_nhat':_0x3ceb14[_0x3051dd(0x1c0)],'so_ngay_da_mua':_0x52069d});}}catch(_0x36b158){console['error'](_0x5569d1[_0x3051dd(0x1f8)],_0x3aa57d,_0x36b158);}socaiIsHandling=![],handleCreateSocaiTc();}},{onAfterCommit,getCurrentSession,getCurrentStore}=require('../libs/sessionContext');socaiSchema[_0x35e3c1(0x215)](_0x35e3c1(0x248),async function(_0x1f9c6f){const _0x3df648=_0x35e3c1,_0x2c9252={'aKEUW':function(_0x5c9417,_0x3e10de){return _0x5c9417!==_0x3e10de;},'yQvGA':_0x3df648(0x259),'sPgQP':_0x3df648(0x247),'wnxWY':_0x3df648(0x203),'kgyrs':'HD2','hHOMm':'PBL','lKXTj':'socai','RtUzX':function(_0x504c6d){return _0x504c6d();},'VnJbe':_0x3df648(0x231),'kokMK':_0x3df648(0x190),'rXOEx':function(_0x51202d,_0x4cc9ae){return _0x51202d(_0x4cc9ae);},'RWYTF':_0x3df648(0x1fb),'DkRFG':function(_0x8a7c74,_0x283f27){return _0x8a7c74&&_0x283f27;},'btqtF':function(_0x1a6fa9,_0x524b09,_0x32ebea,_0xfddaa1,_0x10610e){return _0x1a6fa9(_0x524b09,_0x32ebea,_0xfddaa1,_0x10610e);},'wiiud':_0x3df648(0x22e),'vjmsU':function(_0x46624b,_0x185ef4){return _0x46624b===_0x185ef4;},'aLBYc':_0x3df648(0x1e5),'JChqv':'XZjRL','LpFRO':_0x3df648(0x212),'NLtVL':'❌\x20post\x20save\x20immediate\x20error:'},_0xc6b3d=this[_0x3df648(0x255)],_0x299ed9=global[_0x3df648(0x18e)][_0x3df648(0x22f)](_0xc6b3d),_0x5f144f=async()=>{const _0x30794e=_0x3df648;if(_0x2c9252[_0x30794e(0x1e3)](_0x2c9252[_0x30794e(0x20a)],_0x2c9252[_0x30794e(0x1b4)])){if([_0x2c9252[_0x30794e(0x21d)],_0x2c9252[_0x30794e(0x227)],_0x30794e(0x207),_0x2c9252[_0x30794e(0x208)]][_0x30794e(0x1d5)](_0x1f9c6f[_0x30794e(0x1f2)])>=0x0){if(_0x1f9c6f[_0x30794e(0x193)]){let _0x4daf68=await global[_0x30794e(0x1f4)](_0x2c9252[_0x30794e(0x216)])[_0x30794e(0x1bf)]({'ma_kh_no':_0x1f9c6f['ma_kh_no'],'id_app':_0x1f9c6f[_0x30794e(0x24c)]},{'ngay_ct':0x1})[_0x30794e(0x1df)]({'ngay_ct':-0x1});if(_0x4daf68){const _0x3d6ad3=_0x2c9252[_0x30794e(0x1c4)](moment)[_0x30794e(0x197)](moment(_0x4daf68[_0x30794e(0x1c0)]),_0x2c9252['VnJbe']);global[_0x30794e(0x1f4)](_0x2c9252['kokMK'])['updateOne']({'ma_kh':_0x1f9c6f[_0x30794e(0x193)],'id_app':_0x1f9c6f[_0x30794e(0x24c)]},{'ngay_mua_gan_nhat':_0x4daf68[_0x30794e(0x1c0)],'so_ngay_da_mua':_0x3d6ad3});}}if(_0x1f9c6f[_0x30794e(0x1cf)]&&_0x1f9c6f['ma_kh_co']!=_0x1f9c6f['ma_kh_no']){let _0x19d631=await global[_0x30794e(0x1f4)](_0x2c9252[_0x30794e(0x216)])[_0x30794e(0x1bf)]({'ma_kh_co':_0x1f9c6f[_0x30794e(0x1cf)],'id_app':_0x1f9c6f['id_app']},{'ngay_ct':0x1})[_0x30794e(0x1df)]({'ngay_ct':-0x1});if(_0x19d631){const _0x157694=moment()[_0x30794e(0x197)](_0x2c9252[_0x30794e(0x1dd)](moment,_0x19d631[_0x30794e(0x1c0)]),_0x2c9252['VnJbe']);global[_0x30794e(0x1f4)](_0x2c9252[_0x30794e(0x1b8)])[_0x30794e(0x1de)]({'ma_kh':_0x1f9c6f[_0x30794e(0x1cf)],'id_app':_0x1f9c6f[_0x30794e(0x24c)]},{'ngay_mua_gan_nhat':_0x19d631['ngay_ct'],'so_ngay_da_mua':_0x157694});}}}let _0x157285=JSON[_0x30794e(0x1e9)]({'id_app':_0x1f9c6f[_0x30794e(0x24c)],'ngay_ct':_0x1f9c6f[_0x30794e(0x1c0)]});!socaiQueue[_0x30794e(0x241)](_0x55e130=>_0x55e130==_0x157285)&&(_0x2c9252[_0x30794e(0x1ef)]===_0x30794e(0x23a)?_0x541ab1[_0x30794e(0x1e4)]=_0x33acab['ma_nv']:(socaiQueue[_0x30794e(0x1d2)](_0x157285),!socaiIsHandling&&handleCreateSocaiTc()));}else _0x32e01a['tien']=_0x4b9d9a[_0x30794e(0x1b5)](_0x122f61[_0x30794e(0x21e)],0x0);};if(_0x2c9252[_0x3df648(0x20e)](_0xc6b3d,_0x299ed9))_0x2c9252['btqtF'](onAfterCommit,_0x5f144f,_0x2c9252['wiiud'],_0x299ed9[_0x3df648(0x205)],_0x299ed9);else try{_0x2c9252[_0x3df648(0x19d)](_0x2c9252[_0x3df648(0x1bc)],_0x2c9252[_0x3df648(0x200)])?_0x3827b0():await _0x2c9252[_0x3df648(0x1c4)](_0x5f144f);}catch(_0x1e4228){_0x2c9252['LpFRO']!==_0x3df648(0x192)?console['error'](_0x2c9252[_0x3df648(0x1dc)],_0x1e4228):_0x309952[_0x3df648(0x1f0)]=_0x2afb15[_0x3df648(0x1f0)];}}),socaiSchema[_0x35e3c1(0x1c2)](_0x35e3c1(0x25a),async function(_0x424a6c){const _0x2ff53e=_0x35e3c1,_0x3cac2a={'EMMgz':function(_0x2813e6,_0x49ac3c){return _0x2813e6===_0x49ac3c;},'uxyGZ':'grwmr','ifZjw':function(_0x560506,_0x3f6576){return _0x560506!==_0x3f6576;},'bzRjZ':'vlzol','OoBXG':'socai','tFXGN':function(_0x3d5c43){return _0x3d5c43();},'aJYVR':_0x2ff53e(0x22b),'EbgtR':function(_0x37d3b8,_0x4739cb,_0x33c2ac,_0x5d9027,_0x5739cb){return _0x37d3b8(_0x4739cb,_0x33c2ac,_0x5d9027,_0x5739cb);},'IcHJB':_0x2ff53e(0x1ec),'usCCy':function(_0x569e7e,_0x5e2436){return _0x569e7e!==_0x5e2436;},'KRvLm':_0x2ff53e(0x18d),'YkPOj':_0x2ff53e(0x224),'DzfLn':_0x2ff53e(0x1cb),'pqBfq':function(_0x57913f,_0x5bd3f7){return _0x57913f(_0x5bd3f7);}},_0x253229=this[_0x2ff53e(0x1da)][_0x2ff53e(0x205)]||_0x3cac2a['tFXGN'](getCurrentSession),_0x251b5e=_0x3cac2a[_0x2ff53e(0x1ea)](getCurrentStore),_0x4c1ce9=async()=>{const _0x25fbe3=_0x2ff53e,_0x24236b={'UuVuL':function(_0x2891ab,_0x43f634){const _0x17a224=_0x3b56;return _0x3cac2a[_0x17a224(0x1aa)](_0x2891ab,_0x43f634);},'lJKRI':_0x3cac2a[_0x25fbe3(0x204)]};if(_0x3cac2a[_0x25fbe3(0x1d7)](_0x25fbe3(0x1c7),_0x3cac2a[_0x25fbe3(0x1db)]))_0x4d5a1a[_0x25fbe3(0x1eb)]={'$not':new _0x275c31(_0x1cad31)};else{let _0x4434ee=this[_0x25fbe3(0x1d3)](),_0x3b03d6=(await global[_0x25fbe3(0x1f4)](_0x3cac2a[_0x25fbe3(0x22c)])[_0x25fbe3(0x241)](_0x4434ee,{'id_app':0x1,'ngay_ct':0x1})[_0x25fbe3(0x21a)]())[_0x25fbe3(0x20c)](_0x17cd9a=>{const _0x3c1761=_0x25fbe3;if(_0x24236b[_0x3c1761(0x1ff)](_0x3c1761(0x23f),_0x3c1761(0x1f3)))_0x2cbac0['tk_no']={'$regex':_0x5326fb,'$options':'i'};else return JSON[_0x3c1761(0x1e9)]({'id_app':_0x17cd9a['id_app'],'ngay_ct':_0x17cd9a['ngay_ct']});});_0x3b03d6=[...new Set(_0x3b03d6)],_0x3b03d6[_0x25fbe3(0x25b)](_0x2ab0fc=>{const _0x381470=_0x25fbe3;_0x24236b[_0x381470(0x19e)]!==_0x381470(0x1b9)?!socaiQueue['find'](_0x63bec5=>_0x63bec5==_0x2ab0fc)&&socaiQueue['push'](_0x2ab0fc):_0x4d56d4[_0x381470(0x24f)]=_0x412142[_0x381470(0x24f)];}),!socaiIsHandling&&_0x3cac2a[_0x25fbe3(0x1ea)](handleCreateSocaiTc);}};if(_0x253229)_0x3cac2a['EbgtR'](onAfterCommit,_0x4c1ce9,_0x3cac2a[_0x2ff53e(0x24e)],_0x253229,_0x251b5e),_0x3cac2a[_0x2ff53e(0x1ea)](_0x424a6c);else{if(_0x3cac2a[_0x2ff53e(0x1a6)](_0x2ff53e(0x196),_0x3cac2a[_0x2ff53e(0x1fd)]))try{_0x3cac2a['YkPOj']===_0x3cac2a['DzfLn']?(_0x4eac27(_0x51e7be,_0x3cac2a[_0x2ff53e(0x211)],_0x20c87e,_0x978c59),_0x440317()):(await _0x4c1ce9(),_0x3cac2a[_0x2ff53e(0x1ea)](_0x424a6c));}catch(_0x23293c){_0x3cac2a[_0x2ff53e(0x1fe)](_0x424a6c,_0x23293c);}else{let _0x59b8e4=_0x2dd61e[_0x2ff53e(0x19f)]['reg']();_0x130219['giam_tru_no']?_0x2311c7[_0x2ff53e(0x19f)]={'$not':new _0x1d6bec(_0x59b8e4)}:_0x457b97[_0x2ff53e(0x19f)]={'$regex':_0x59b8e4,'$options':'i'};}}}),socaiSchema['pre'](_0x35e3c1(0x1c3),async function(_0x268d37){const _0x2ec426=_0x35e3c1,_0x251efc={'LMdsr':_0x2ec426(0x1f6),'CLDzX':function(_0x2c6a1d,_0x2055da){return _0x2c6a1d===_0x2055da;},'MewLW':_0x2ec426(0x1a0),'IJwVt':function(_0x3bba97){return _0x3bba97();},'gBIre':'socai\x20indexing\x20complete','TBZuU':_0x2ec426(0x219),'ZIZuz':function(_0x341557){return _0x341557();},'ARfeR':function(_0x4f783e,_0x338a9e,_0x385bea,_0x2bb66b,_0xecdda6){return _0x4f783e(_0x338a9e,_0x385bea,_0x2bb66b,_0xecdda6);},'GDaLU':_0x2ec426(0x22b),'tyzNc':function(_0x196afc,_0x31ec05){return _0x196afc===_0x31ec05;},'BCBXD':'jGreA','sDtJf':function(_0x4826a9,_0x4fe9ab){return _0x4826a9!==_0x4fe9ab;},'mONLi':function(_0x3ea8c7,_0x4f32e2){return _0x3ea8c7(_0x4f32e2);}},_0x3d1c3d=this[_0x2ec426(0x1da)]['session']||_0x251efc['ZIZuz'](getCurrentSession),_0x3c1b61=_0x251efc[_0x2ec426(0x1e6)](getCurrentStore),_0x18aedd=async()=>{const _0x3df4ff=_0x2ec426,_0xece3bc={'DgCVL':_0x251efc[_0x3df4ff(0x1d0)]};if(_0x251efc[_0x3df4ff(0x1ad)](_0x251efc[_0x3df4ff(0x258)],_0x3df4ff(0x201)))_0xbd69b5[_0x3df4ff(0x1ac)]=_0x111b3f[_0x3df4ff(0x1ac)];else{let _0x53e262=this[_0x3df4ff(0x1d3)](),_0x2c9d88=(await global[_0x3df4ff(0x1f4)]('socai')[_0x3df4ff(0x241)](_0x53e262,{'id_app':0x1,'ngay_ct':0x1})[_0x3df4ff(0x21a)]())['map'](_0x154157=>{const _0x35f92e=_0x3df4ff;return JSON[_0x35f92e(0x1e9)]({'id_app':_0x154157[_0x35f92e(0x24c)],'ngay_ct':_0x154157[_0x35f92e(0x1c0)]});});_0x2c9d88=[...new Set(_0x2c9d88)],_0x2c9d88[_0x3df4ff(0x25b)](_0x406f47=>{const _0x5af2bf=_0x3df4ff;!socaiQueue[_0x5af2bf(0x241)](_0xcc1f41=>_0xcc1f41==_0x406f47)&&(_0xece3bc[_0x5af2bf(0x253)]!==_0xece3bc[_0x5af2bf(0x253)]?_0x222fc9['ma_bp']=_0x5d0912['ma_bp']:socaiQueue['push'](_0x406f47));}),!socaiIsHandling&&_0x251efc[_0x3df4ff(0x1b7)](handleCreateSocaiTc);}};if(_0x3d1c3d)_0x251efc[_0x2ec426(0x220)](onAfterCommit,_0x18aedd,_0x251efc[_0x2ec426(0x22a)],_0x3d1c3d,_0x3c1b61),_0x251efc[_0x2ec426(0x1b7)](_0x268d37);else{if(_0x251efc[_0x2ec426(0x230)](_0x2ec426(0x1ee),_0x251efc[_0x2ec426(0x1a4)]))try{_0x251efc[_0x2ec426(0x244)](_0x2ec426(0x218),_0x2ec426(0x218))?_0x4717e7[_0x2ec426(0x21c)](_0x2ec426(0x202),_0x4cd8a8):(await _0x251efc['IJwVt'](_0x18aedd),_0x268d37());}catch(_0x1f8e5d){_0x251efc[_0x2ec426(0x23e)](_0x268d37,_0x1f8e5d);}else{const _0x1a6d8b={'DGwMF':_0x251efc['gBIre']};_0x26f6fe['on'](_0x251efc[_0x2ec426(0x225)],async function(_0x24ff3b){const _0x4ffe21=_0x2ec426;_0x24ff3b?_0x324edd[_0x4ffe21(0x21c)](_0x4ffe21(0x202),_0x24ff3b):_0x1a7fdc[_0x4ffe21(0x21f)](_0x1a6d8b[_0x4ffe21(0x250)]);});}}});const model=mongoose[_0x35e3c1(0x1e8)][_0x35e3c1(0x1e1)]||mongoose[_0x35e3c1(0x1d6)]('socai',socaiSchema);function _0x399a(){const _0x2c7afb=['BwXvEvG','nZq3mLfTyw1UrW','zgfvq2q','yKT0C24','zKvpu3C','uu53Bu4','uLbpvxG','s1j2tg0','ChfczNe','vxvwDuW','sKnOCxy','tuv4uxC','C29JywKGAw5KzxGGzxjYB3i','u08X','DxH5r1O','C2vZC2LVBG','zxHWB3j0CW','seqX','AeHptw0','vvPkuey','Evf2r0e','zfvUsui','BwfW','CKnlv0i','rgTsrKC','DhvFBMDHEq','zeTrDee','yuPzvLi','t1DYzLK','lI4VBgLICY91DgLSCW','ufDkq3a','Cg9ZDa','BeTyvgO','Cezotxm','t0Hvwvu','Aw5KzxG','BgvHBG','C29JywKGAw5KzxHPBMCGy29TCgXLDgu','zxjYB3i','D254v1K','DgLLBG','Aw5MBW','qvjMzvi','AxnbCNjHEq','mZG4ntf0y3fUs1a','DgLLBL9UDa','sLH6DKe','vejADvu','z2LV','A2D5CNm','rvfiyvO','yuzxtLq','r0rHtfu','wog7RsbSW70GC+g7SsbRAEg7H24GDhlgSog7M2mGA2HPihHVW6eGC29JywK','t29cweC','mJG4q1frq29s','wog7RsbSW70GC+g7SsbRAEg7H24GC2f1igTOAsbSXRb1ihnVy2fP','z2v0','DhL6tMm','zgf5CW','zgf0zxm','EK1fzM8','Ag91CNm','vhfSr1y','ndqWnte4nhfbr3bzBG','tePQww0','x2rLyNvNswq','C3rHCNrpzG','uhPvsK4','y3jLyxrLsw5KzxHLCW','v1PKAuu','Bw9Tzw50','Bu9otgK','qvvQB2e','vgvNBgm','zMLUza','BwfFC3a','vMjxAuW','C0r0sMy','CuTmrgW','ugPqEhG','ExHPEwe','C2f2zq','BMfT','seviqwC','CeTiwum','AwrFyxbW','tgnJywy','swnisKi','BwfFCgHP','reD3tuy','u0rzEwO','ywXNsNy','rgDdvKW','AfP6zxq','jf9FC2vZC2LVBKTLEq','z2LHBv90CNvFy28','ruzMwNC','twv3tfC','q2vjAwi','zgvSzxrLtwfUEq','zM9YrwfJAa','rvzHBvm','u0vtu0LptL9tve9srv9nqva','s1DIrK0','y3vZDg9Tzxi','twL4zwq','uu5gwNu','BwfFA2HFBM8','z2v0qxjPC2u','mtCWmtyZnMfdvu9ICa','tKzyuMy','zgLMzG','CMvNAxn0zxjtzxnZAw9Uu3rVCMu','uvLmELe','sK9ywMy','Eg5wtKy','BhjYEuS','DMPTC1u','BePluKK','DgTFBM8','txbkt3u','zgvUx25NyxK','BwfFA2HV','BwfFAgq','qKncweq','tvz2sgK','Dxndq3K','Cxv5','BMDHEq','ntqXofLrqvLgEG','ru1nz3O','yLzHueO','BwfFzhq','q0XeELG','CMvN','u2TXrgq','ndznB2n4u1u','u0Lcyxm','tMzYsMC','vK5e','C1bNuva','CM91BMrcEq','zg5AD1i','suP3vNq','A29RtuS','ve9nCvu','CKHTy2i','BwfFBNq','yuXcwwm','vhLWzxm','BwfFyNa','zMLUze9Uzq','BMDHEv9JDa','DgHHBMC','ChjL','zgvSzxrLt25L','uNrvELG','seXdEuW','BMDHEv9JDf9MDwXS','DMX6B2W','CLLWBhy','uNvxwwO','x2LK','zfzTDMe','DhzTzvi','z2LHBv90CNvFBM8','mZC5mZC0oezSuLv6va','BwfFA2HFy28','te1KC3i','Dg9eyxrL','ChvZAa','z2v0uxvLCNK','zuHUs2e','Aw5KzxHpzG','Bw9KzwW','AwzAANC','AKrAvw0','mZa1mhf4AM1bzq','B3b0Aw9UCW','yNPsALO','tKX0vKW','CLHprxG','DxbKyxrLt25L','C29YDa','mJKYoti5nZb6EMzOC1q','C29JywK','EwvHCG','yuTfvvC','BwfFBNy','BwzOD3O','wKLADxO','y29UzMLNCW','Bw9KzwXZ','C3rYAw5NAwz5','Dezyr04','DgTFy28','wog7RsbSW70GC+g7SsbRAEg7H24GC2f1igTOAsb4B8oHihnVy2fP','yvzLtxO','AKDYzue','uLDzvey','BwfFzhzJCW','CxvHCNrLCNm','BwfFy3q','zffQrNK','z2v0tw9KzwW','B2vwzeO'];_0x399a=function(){return _0x2c7afb;};return _0x399a();}(global['configs']||{})[_0x35e3c1(0x23b)]&&model['on'](_0x35e3c1(0x219),async function(_0x15ad11){const _0x31996b=_0x35e3c1,_0x288fbe={'dlioX':function(_0x4eb899,_0x3f9b71){return _0x4eb899(_0x3f9b71);},'JOXZf':_0x31996b(0x202),'rHmcb':function(_0x44b04d,_0xa28acc){return _0x44b04d!==_0xa28acc;},'algJv':_0x31996b(0x24a),'EFfZw':_0x31996b(0x21b)};_0x15ad11?console[_0x31996b(0x21c)](_0x288fbe[_0x31996b(0x19a)],_0x15ad11):_0x288fbe[_0x31996b(0x1ba)](_0x288fbe[_0x31996b(0x252)],_0x31996b(0x24a))?_0x288fbe['dlioX'](_0x53a6c4,_0x302680):console['info'](_0x288fbe[_0x31996b(0x257)]);});function _0x3b56(_0x21bd2c,_0x22d489){const _0x399a5a=_0x399a();return _0x3b56=function(_0x3b562f,_0x160589){_0x3b562f=_0x3b562f-0x18d;let _0x1b3f30=_0x399a5a[_0x3b562f];if(_0x3b56['mSyrOr']===undefined){var _0x19ae9e=function(_0x39c73f){const _0x289586='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3a9810='',_0x16838f='';for(let _0xb6ea21=0x0,_0x544450,_0x31b20a,_0x35db30=0x0;_0x31b20a=_0x39c73f['charAt'](_0x35db30++);~_0x31b20a&&(_0x544450=_0xb6ea21%0x4?_0x544450*0x40+_0x31b20a:_0x31b20a,_0xb6ea21++%0x4)?_0x3a9810+=String['fromCharCode'](0xff&_0x544450>>(-0x2*_0xb6ea21&0x6)):0x0){_0x31b20a=_0x289586['indexOf'](_0x31b20a);}for(let _0x4b6776=0x0,_0x1c1655=_0x3a9810['length'];_0x4b6776<_0x1c1655;_0x4b6776++){_0x16838f+='%'+('00'+_0x3a9810['charCodeAt'](_0x4b6776)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x16838f);};_0x3b56['YWBnTx']=_0x19ae9e,_0x21bd2c=arguments,_0x3b56['mSyrOr']=!![];}const _0x452a40=_0x399a5a[0x0],_0x388d46=_0x3b562f+_0x452a40,_0x5953f6=_0x21bd2c[_0x388d46];return!_0x5953f6?(_0x1b3f30=_0x3b56['YWBnTx'](_0x1b3f30),_0x21bd2c[_0x388d46]=_0x1b3f30):_0x1b3f30=_0x5953f6,_0x1b3f30;},_0x3b56(_0x21bd2c,_0x22d489);}model[_0x35e3c1(0x194)]=async(_0x183a3d,_0xa6250b={'fields':undefined})=>{const _0xbb2d30=_0x35e3c1,_0xe5a8df={'CUXNl':function(_0x26d412,_0x4c5ccc,_0x2ed5f6,_0x11c270,_0x521cf2){return _0x26d412(_0x4c5ccc,_0x2ed5f6,_0x11c270,_0x521cf2);},'bKtsn':'Xử\x20lý\x20sự\x20kiện\x20sau\x20khi\x20xoá\x20socai','zMEfo':function(_0x5a1425){return _0x5a1425();},'MVvHi':function(_0x4dc8ac){return _0x4dc8ac();},'PWJCp':function(_0x4bde4f){return _0x4bde4f();},'PjPxx':function(_0x5af9e9,_0x4e73e3){return _0x5af9e9(_0x4e73e3);},'LJjYm':_0xbb2d30(0x231),'aFWNT':_0xbb2d30(0x190),'oeVdJ':function(_0x41ced5,_0x41dd78){return _0x41ced5!==_0x41dd78;},'pFNMs':_0xbb2d30(0x1b2),'jDZUm':function(_0x38a47c,_0x39a6ef){return _0x38a47c===_0x39a6ef;},'UZJPF':_0xbb2d30(0x1fc),'tvmeR':function(_0x2b4f37,_0x1d5978){return _0x2b4f37===_0x1d5978;},'xZnaX':_0xbb2d30(0x1fa),'eHnKa':function(_0x5733cb,_0x3060e1){return _0x5733cb===_0x3060e1;},'UVTnm':_0xbb2d30(0x210),'HdmLP':_0xbb2d30(0x1af),'xnVNF':_0xbb2d30(0x254),'aVeMz':function(_0x54fabd,_0x26cb48){return _0x54fabd!==_0x26cb48;},'KWbFM':_0xbb2d30(0x235)};let _0x30eb42={'ngay_ct':{'$gte':_0x183a3d[_0xbb2d30(0x20f)],'$lte':_0x183a3d[_0xbb2d30(0x1a1)]},'id_app':_0x183a3d['id_app']};_0x183a3d[_0xbb2d30(0x1f0)]&&(_0xe5a8df[_0xbb2d30(0x1f5)](_0xe5a8df[_0xbb2d30(0x217)],_0xe5a8df[_0xbb2d30(0x217)])?(_0xe5a8df['CUXNl'](_0x566c90,_0x17d816,_0xe5a8df[_0xbb2d30(0x1f9)],_0x4f799e,_0x36bea5),_0xe5a8df[_0xbb2d30(0x233)](_0x2aed57)):_0x30eb42[_0xbb2d30(0x1f0)]=_0x183a3d['ma_dvcs']);_0x183a3d[_0xbb2d30(0x1be)]&&(_0x30eb42[_0xbb2d30(0x1be)]=_0x183a3d[_0xbb2d30(0x1be)]);_0x183a3d[_0xbb2d30(0x1a3)]&&(_0xe5a8df[_0xbb2d30(0x1f5)](_0xbb2d30(0x251),_0xbb2d30(0x1ab))?_0x30eb42['ma_hd']=_0x183a3d[_0xbb2d30(0x1a3)]:_0x45f2d7['tk_co']={'$regex':_0x383370,'$options':'i'});_0x183a3d[_0xbb2d30(0x1ac)]&&(_0x30eb42['ma_dt']=_0x183a3d['ma_dt']);_0x183a3d[_0xbb2d30(0x242)]&&(_0x30eb42[_0xbb2d30(0x242)]=_0x183a3d[_0xbb2d30(0x242)]);_0x183a3d[_0xbb2d30(0x1e4)]&&(_0xe5a8df[_0xbb2d30(0x1d8)](_0xe5a8df[_0xbb2d30(0x209)],_0xe5a8df[_0xbb2d30(0x209)])?_0x30eb42[_0xbb2d30(0x1e4)]=_0x183a3d[_0xbb2d30(0x1e4)]:_0xe5a8df[_0xbb2d30(0x1a5)](_0x45104c));_0x183a3d['ma_phi']&&(_0x30eb42['ma_phi']=_0x183a3d[_0xbb2d30(0x24f)]);_0x183a3d[_0xbb2d30(0x1a2)]&&(_0xe5a8df[_0xbb2d30(0x1cc)](_0xe5a8df['xZnaX'],'OLRxU')?_0x7ab180(_0x5b3874):_0x30eb42[_0xbb2d30(0x1a2)]=_0x183a3d[_0xbb2d30(0x1a2)]);if(_0x183a3d[_0xbb2d30(0x19f)]&&Array[_0xbb2d30(0x221)](_0x183a3d[_0xbb2d30(0x19f)])){if(_0xe5a8df[_0xbb2d30(0x1d4)](_0xe5a8df['UVTnm'],_0xe5a8df['HdmLP'])){const _0x145e8=_0xe5a8df[_0xbb2d30(0x214)](_0x4fe3d2)[_0xbb2d30(0x197)](_0xe5a8df[_0xbb2d30(0x246)](_0x2f5303,_0x15ab2d['ngay_ct']),_0xe5a8df[_0xbb2d30(0x237)]);_0x1ba673[_0xbb2d30(0x1f4)](_0xe5a8df[_0xbb2d30(0x229)])[_0xbb2d30(0x1de)]({'ma_kh':_0x59983c['ma_kh_co'],'id_app':_0x10156a[_0xbb2d30(0x24c)]},{'ngay_mua_gan_nhat':_0x16bc6d[_0xbb2d30(0x1c0)],'so_ngay_da_mua':_0x145e8});}else{let _0x48bed6=_0x183a3d['tk_no'][_0xbb2d30(0x1ae)]();if(_0x183a3d[_0xbb2d30(0x1cd)])_0x30eb42[_0xbb2d30(0x19f)]={'$not':new RegExp(_0x48bed6)};else{if(_0xbb2d30(0x199)===_0xe5a8df[_0xbb2d30(0x19b)])return _0x12d3bf[_0xbb2d30(0x1e9)]({'id_app':_0x3d8163[_0xbb2d30(0x24c)],'ngay_ct':_0x4dd291['ngay_ct']});else _0x30eb42['tk_no']={'$regex':_0x48bed6,'$options':'i'};}}}if(_0x183a3d[_0xbb2d30(0x1eb)]&&Array[_0xbb2d30(0x221)](_0x183a3d[_0xbb2d30(0x1eb)])){let _0x1241e9=_0x183a3d[_0xbb2d30(0x1eb)][_0xbb2d30(0x1ae)]();_0x183a3d[_0xbb2d30(0x256)]&&_0x1241e9?_0x30eb42['tk_co']={'$not':new RegExp(_0x1241e9)}:_0xe5a8df[_0xbb2d30(0x1ed)](_0xe5a8df['KWbFM'],_0xe5a8df[_0xbb2d30(0x18f)])?!_0x1fc961['find'](_0x4225e4=>_0x4225e4==_0x47b712)&&_0x5a183a[_0xbb2d30(0x1d2)](_0x28c971):_0x30eb42['tk_co']={'$regex':_0x1241e9,'$options':'i'};}return await model[_0xbb2d30(0x241)](_0x30eb42,_0xa6250b['fields'])[_0xbb2d30(0x21a)]();},module[_0x35e3c1(0x206)]=model;
@@ -1,18 +1 @@
1
- const moment=require("moment"),{onAfterCommit,getCurrentSession}=require("../libs/sessionContext"),socainppSchema=new Schema({id_app:{type:String,required:!0,maxlength:1024},ma_dvcs:{type:String,required:!0,maxlength:1024},id_ct:{type:String,required:!0,maxlength:1024,trim:!0},ma_ct:{type:String,required:!0,uppercase:!0,maxlength:32,trim:!0},ma_gd:{type:String,default:"0",maxlength:32,trim:!0},ngay_ct:{type:Date,required:!0},so_ct:{type:String,required:!0,uppercase:!0,maxlength:32,trim:!0},ngay_hd:{type:Date},
2
- so_hd:{type:String,uppercase:!0,maxlength:32,trim:!0},tk_no:{type:String,required:!0,uppercase:!0,maxlength:32,trim:!0},tk_co:{type:String,required:!0,uppercase:!0,maxlength:32,trim:!0},ma_kh_no:{type:String,uppercase:!0,default:"",maxlength:32,trim:!0},ma_kh_co:{type:String,uppercase:!0,default:"",maxlength:32,trim:!0},ma_nt:{type:String,default:"VND",required:!0,uppercase:!0,maxlength:32,trim:!0},ty_gia:{type:Number,default:1},tien_nt:{type:Number,default:0},tien:{type:Number,default:0},dien_giai:{type:String,
3
- default:"",maxlength:1024},ong_ba:{type:String,default:"",maxlength:1024},ma_kho:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_bp:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_phi:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_hd:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_dt:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_nv:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_lo:{type:String,default:"",uppercase:!0,
4
- maxlength:32,trim:!0},han_sd:{type:Date},ma_tt1:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_tt2:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_tt3:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_ca:{type:String,uppercase:!0,maxlength:32,trim:!0},ma_cp:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_sp:{type:String,default:"",uppercase:!0,maxlength:1024,trim:!0},ma_vt:{type:String,default:"",uppercase:!0,maxlength:1024,trim:!0},ma_dvt_sp:{type:String,
5
- maxlength:32,trim:!0},ma_tt1_sp:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_tt2_sp:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_tt3_sp:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_cum_chi_tiet:{type:String,uppercase:!0,default:"",maxlength:32,trim:!0},ten_cum_chi_tiet:{type:String,default:"",maxlength:1024,trim:!0},ma_cong_doan:{type:String,uppercase:!0,default:"",maxlength:32,trim:!0},id_lenhsx:{type:String,maxlength:1024},id_cs:{type:String,maxlength:1024},
6
- id_link:String,ma_ct_link:String,so_ct_link:String,id_ct_goc:String,ma_ct_goc:String,so_ct_goc:String,ngay_ct_goc:Date,pt_thanh_toan_goc:String,pt_thanh_toan:String,pt_thanh_toan2:String,trang_thai:{type:String,maxlength:32},nh_dk:{type:Number,default:0},id_kbbtpb:{type:String,maxlength:1024},exfields:Schema.Types.Mixed,exfields_detail:Schema.Types.Mixed,flag:{type:String,maxlength:1024},gio:Number,ngay:Number,thang:Number,quy:Number,nam:Number,ma_kenh:String,ma_td1:Schema.Types.Mixed,ma_td2:Schema.Types.Mixed,
7
- ma_td3:Schema.Types.Mixed,ma_td4:Schema.Types.Mixed,ma_td5:Schema.Types.Mixed,ma_td6:Schema.Types.Mixed,ma_td7:Schema.Types.Mixed,ma_td8:Schema.Types.Mixed,ma_td9:Schema.Types.Mixed,status:{type:Boolean,default:!0},date_created:{type:Date,default:Date.now},date_updated:{type:Date,default:Date.now},user_created:{type:String,default:""},user_updated:{type:String,default:""},id_client:String,listinfo_code:String},{toJSON:{virtuals:!0}});
8
- socainppSchema.pre("save",function($next$$){this.tien=this.ma_nt=="VND"?this.tien_nt=Math.roundBy(this.tien_nt,0):Math.roundBy(this.tien,0);let $ngay_ct$$=moment(this.ngay_ct);this.gio=$ngay_ct$$.get("hours");this.ngay=$ngay_ct$$.get("dates");this.quy=$ngay_ct$$.get("quarters");this.thang=$ngay_ct$$.get("months")+1;this.nam=$ngay_ct$$.get("year");this.ngay_ct=$ngay_ct$$.startOf("date").toDate();$next$$()});
9
- (global.configs||{}).createIndexes&&(socainppSchema.index({id_app:1}),socainppSchema.index({id_app:1,ma_dvcs:1}),socainppSchema.index({id_app:1,ma_ct:1,so_ct:1}),socainppSchema.index({id_app:1,ma_ct:1}),socainppSchema.index({id_app:1,ngay_ct:-1,ma_nt:1}),socainppSchema.index({id_app:1,so_ct:1,ngay_ct:-1}),socainppSchema.index({id_app:1,gio:1}),socainppSchema.index({id_app:1,ngay:1}),socainppSchema.index({id_app:1,thang:1}),socainppSchema.index({id_app:1,quy:1}),socainppSchema.index({id_app:1,nam:-1}),
10
- socainppSchema.index({id_ct:1}),socainppSchema.index({id_app:1,id_ct:1}),socainppSchema.index({id_app:1,ma_ct_goc:1,id_ct_goc:1}),socainppSchema.index({id_app:1,ngay_ct:-1,tk_no:1,tk_co:1,ma_bp:1}),socainppSchema.index({id_app:1,ngay_ct:-1,tk_no:1,tk_co:1,ma_phi:1}),socainppSchema.index({id_app:1,ngay_ct:-1,tk_no:1,tk_co:1,ma_hd:1}),socainppSchema.index({id_app:1,ngay_ct:-1,tk_no:1,tk_co:1,ma_dt:1}),socainppSchema.index({id_app:1,ngay_ct:-1,tk_no:1,tk_co:1,ma_nv:1}),socainppSchema.index({id_app:1,
11
- ngay_ct:-1,tk_no:1,tk_co:1,ma_sp:1}),socainppSchema.index({id_app:1,ngay_ct:-1,tk_no:1,tk_co:1,ma_kho:1,ma_vt:1}),socainppSchema.index({id_app:1,ngay_ct:-1,tk_no:1,tk_co:1,ma_kenh:1}),socainppSchema.index({id_app:1,ngay_ct:-1,tk_no:1,tk_co:1,ma_td1:1}),socainppSchema.index({id_app:1,ngay_ct:-1,tk_no:1,tk_co:1,ma_td2:1}),socainppSchema.index({id_app:1,ngay_ct:-1,tk_no:1,tk_co:1,ma_td3:1}),socainppSchema.index({id_app:1,ngay_ct:-1,tk_no:1,tk_co:1,ma_vt:1,ma_tt1:1,ma_tt2:1,ma_tt3:1,ma_lo:1,han_sd:-1}),
12
- socainppSchema.index({id_app:1,id_lenhsx:1}),socainppSchema.index({id_app:1,id_link:1}),socainppSchema.index({id_app:1,id_cs:1}),socainppSchema.index({id_app:1,id_cs_ck:1}),socainppSchema.index({id_app:1,id_ct:1,so_ct:-1,ngay_ct:-1,ma_kh_no:1,ma_kh_co:1,tk_no:1,tk_co:1}),socainppSchema.index({id_app:1,ngay_ct:-1,ma_kh_no:1,ma_kh_co:1,tk_no:1,tk_co:1}),socainppSchema.index({id_app:1,ngay_ct:-1,tk_no:1}),socainppSchema.index({id_app:1,ngay_ct:-1,tk_co:1}),socainppSchema.index({id_app:1,date_created:-1}));
13
- socainppSchema.post("save",async function($doc$$){const $session$$=$doc$$.$session()||getCurrentSession(),$handleSaveAfterCommit$$=async()=>{if(["SO1","HD2","HD1","PBL"].indexOf($doc$$.ma_ct)>=0){if($doc$$.ma_kh_no){var $dhgn_dhgn$$=await global.getModel("socainpp").findOne({ma_kh:$doc$$.ma_kh_no,id_app:$doc$$.id_app},{ngay_ct:1}).sort({ngay_ct:-1});if($dhgn_dhgn$$){var $so_ngay_da_mua_so_ngay_da_mua$$=moment().diff(moment($dhgn_dhgn$$.ngay_ct),"days");model.updateOne({ma_kh:$doc$$.ma_kh_no,id_app:$doc$$.id_app},
14
- {ngay_mua_gan_nhat:$dhgn_dhgn$$.ngay_ct,so_ngay_da_mua:$so_ngay_da_mua_so_ngay_da_mua$$})}}$doc$$.ma_kh_co&&$doc$$.ma_kh_co!=$doc$$.ma_kh_no&&($dhgn_dhgn$$=await global.getModel("socainpp").findOne({ma_kh:$doc$$.ma_kh_co,id_app:$doc$$.id_app},{ngay_ct:1}).sort({ngay_ct:-1}))&&($so_ngay_da_mua_so_ngay_da_mua$$=moment().diff(moment($dhgn_dhgn$$.ngay_ct),"days"),model.updateOne({ma_kh:$doc$$.ma_kh_co,id_app:$doc$$.id_app},{ngay_mua_gan_nhat:$dhgn_dhgn$$.ngay_ct,so_ngay_da_mua:$so_ngay_da_mua_so_ngay_da_mua$$}))}};
15
- if($session$$)onAfterCommit($handleSaveAfterCommit$$,"X\u1eed l\u00fd s\u1ef1 ki\u1ec7n sau khi l\u01b0u socainpp",$session$$);else try{await $handleSaveAfterCommit$$()}catch($e$$){console.error("\u274c post save immediate error:",$e$$)}});const model=mongoose.models.socainpp||mongoose.model("socainpp",socainppSchema);
16
- model.getArise=async($query$$,$options$$={fields:void 0})=>{let $condition$$={ngay_ct:{$gte:$query$$.tu_ngay,$lte:$query$$.den_ngay},id_app:$query$$.id_app};$query$$.ma_dvcs&&($condition$$.ma_dvcs=$query$$.ma_dvcs);$query$$.ma_bp&&($condition$$.ma_bp=$query$$.ma_bp);$query$$.ma_hd&&($condition$$.ma_hd=$query$$.ma_hd);$query$$.ma_dt&&($condition$$.ma_dt=$query$$.ma_dt);$query$$.ma_sp&&($condition$$.ma_sp=$query$$.ma_sp);$query$$.ma_nv&&($condition$$.ma_nv=$query$$.ma_nv);$query$$.ma_phi&&($condition$$.ma_phi=
17
- $query$$.ma_phi);$query$$.ma_kho&&($condition$$.ma_kho=$query$$.ma_kho);if($query$$.tk_no&&Array.isArray($query$$.tk_no)){var $tk_co_tk_no$$=$query$$.tk_no.reg();$condition$$.tk_no=$query$$.giam_tru_no?{$not:new RegExp($tk_co_tk_no$$)}:{$regex:$tk_co_tk_no$$,$options:"i"}}$query$$.tk_co&&Array.isArray($query$$.tk_co)&&($tk_co_tk_no$$=$query$$.tk_co.reg(),$condition$$.tk_co=$query$$.giam_tru_co&&$tk_co_tk_no$$?{$not:new RegExp($tk_co_tk_no$$)}:{$regex:$tk_co_tk_no$$,$options:"i"});return await model.find($condition$$,
18
- $options$$.fields).lean()};module.exports=model;
1
+ function _0x403a(){const _0x5f14ff=['rvLVq1a','zgLMzG','BxjUuu8','nti1nZq1mJjhyNLvz1C','zfrgyvK','zgf0zxm','CMvN','Aw5KzxG','mJfWsgz4r2m','z2LHBv90CNvFy28','zxjYB3i','C29JywLUCha','vhLWzxm','yvHKBeq','DgTFy28','mtr8mZf8mtz8mJj8mJH8mtv8mZj8m3W3Fde5Fde4FdH8mJv8nNWXFdmZFdi0Fdv8mtn8mZb8mJL8mZr8mtD8mtb8oxW0FdiZFdeXFdiXFdb8mJz8mJD8mJb8mNWXmG','uejm','BM93','zgf5CW','mtz8mxWYnhWYoxWYmhWZnhWXnxWYmxWXmNWXohWYohWWFdiYFdj8nhWYm3WYnNW2FdL8mtn8mtb8n3WZmxWYn3WXmxWXoxWZm3WZFdv8mtr8ohWYnxWZmhWXn3WZmG','C3rHCNrpzG','AxnbCNjHEq','rePAtLa','lI4VBgLICY9ZzxnZAw9Uq29UDgv4Da','BwfFzhq','EwvHCG','DxbKyxrLt25L','BMDHEq','y3HfzxC','zhjoqNG','mtuWnJi3nKDly0jXDG','zfHdyM8','yxzzu1K','s3jbuva','D3nnv3C','z2LHBv90CNvFBM8','nJeWuhzAuwvK','z2v0','Bw9KzwXZ','zMLUza','EejvyxK','BuvJC0q','CwDQAvm','BMfT','u29zBLy','odq1ntG2Bxvxzuz2','z2v0tw9KzwW','BwfFA2HFBM8','zgvUx25NyxK','C3bSAxq','u08X','BwfFy3q','zgf0zq','DgTFBM8','z2LV','vK5e','tNbnruC','C2f2zq','zMLUze9Uzq','BwfFBNy','zxHWB3j0CW','zKjquhy','CM1OzgS','AerAEei','BwfFBNq','AwrFyxbW','ndLYrNjVywy','DgLLBL9UDa','wMPwENe','CM91BMrcEq','Bw9UDgHZ','ywzArMu','ChjL','BwfFzhzJCW','BK1xCeW','vwL1rem','ExH4sKO','Ag91CNm','wenlyLG','BwfFA2HV','CfrJDg4','BwfFC3a','BwfFyNa','mtqWrNH0zgzV','z2PODfy','Bw9KzwW','BwfFA2HFy28','Cxv5','uxnOCMG','BgvHBG','BMDHEv9JDa','CxvHCNrLCNm','ndq5ntq4EePPzKvl','twL4zwq','v1HLqLO','y3jLyxrLsw5KzxHLCW','DgLLBG','DvDtAeW','seqX','mty5mtCZEMfLB0Lr','mJu2ntKZnNbnBwD1uq','mte2mZe1v1LrEhn6','C29YDa','zMLLBgrZ','CNPdrem','whjqsfO','EenYzg4','sNb1z3C','u0TPwM0','4P2mihbVC3qGC2f2zsbPBw1LzgLHDguGzxjYB3i6','rfLmA2S','Aw5KzxHpzG','wog7RsbSW70GC+g7SsbRAEg7H24GC2f1igTOAsbSXRb1ihnVy2fPBNbW','Dg9eyxrL','qxDVq0y','BwfFAgq','yK1yBxq'];_0x403a=function(){return _0x5f14ff;};return _0x403a();}const _0x3e3b75=_0x517a;(function(_0x1194a6,_0x53873d){const _0x57e75d=_0x517a,_0x32e43d=_0x1194a6();while(!![]){try{const _0x6647f=parseInt(_0x57e75d(0x1b1))/0x1+parseInt(_0x57e75d(0x1ef))/0x2*(parseInt(_0x57e75d(0x19b))/0x3)+-parseInt(_0x57e75d(0x1e6))/0x4*(-parseInt(_0x57e75d(0x183))/0x5)+-parseInt(_0x57e75d(0x1c0))/0x6*(-parseInt(_0x57e75d(0x1d5))/0x7)+-parseInt(_0x57e75d(0x182))/0x8+parseInt(_0x57e75d(0x181))/0x9*(parseInt(_0x57e75d(0x1b7))/0xa)+-parseInt(_0x57e75d(0x196))/0xb;if(_0x6647f===_0x53873d)break;else _0x32e43d['push'](_0x32e43d['shift']());}catch(_0x16e343){_0x32e43d['push'](_0x32e43d['shift']());}}}(_0x403a,0xe2445));const moment=require('moment'),{onAfterCommit,getCurrentSession}=require(_0x3e3b75(0x1aa)),socainppSchema=new Schema({'id_app':{'type':String,'required':!![],'maxlength':0x400},'ma_dvcs':{'type':String,'required':!![],'maxlength':0x400},'id_ct':{'type':String,'required':!![],'maxlength':0x400,'trim':!![]},'ma_ct':{'type':String,'required':!![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_gd':{'type':String,'default':'0','maxlength':0x20,'trim':!![]},'ngay_ct':{'type':Date,'required':!![]},'so_ct':{'type':String,'required':!![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'ngay_hd':{'type':Date},'so_hd':{'type':String,'uppercase':!![],'maxlength':0x20,'trim':!![]},'tk_no':{'type':String,'required':!![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'tk_co':{'type':String,'required':!![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_kh_no':{'type':String,'uppercase':!![],'default':'','maxlength':0x20,'trim':!![]},'ma_kh_co':{'type':String,'uppercase':!![],'default':'','maxlength':0x20,'trim':!![]},'ma_nt':{'type':String,'default':_0x3e3b75(0x1ca),'required':!![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'ty_gia':{'type':Number,'default':0x1},'tien_nt':{'type':Number,'default':0x0},'tien':{'type':Number,'default':0x0},'dien_giai':{'type':String,'default':'','maxlength':0x400},'ong_ba':{'type':String,'default':'','maxlength':0x400},'ma_kho':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_bp':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_phi':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_hd':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_dt':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_nv':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_lo':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'han_sd':{'type':Date},'ma_tt1':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_tt2':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_tt3':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_ca':{'type':String,'uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_cp':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_sp':{'type':String,'default':'','uppercase':!![],'maxlength':0x400,'trim':!![]},'ma_vt':{'type':String,'default':'','uppercase':!![],'maxlength':0x400,'trim':!![]},'ma_dvt_sp':{'type':String,'maxlength':0x20,'trim':!![]},'ma_tt1_sp':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_tt2_sp':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_tt3_sp':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_cum_chi_tiet':{'type':String,'uppercase':!![],'default':'','maxlength':0x20,'trim':!![]},'ten_cum_chi_tiet':{'type':String,'default':'','maxlength':0x400,'trim':!![]},'ma_cong_doan':{'type':String,'uppercase':!![],'default':'','maxlength':0x20,'trim':!![]},'id_lenhsx':{'type':String,'maxlength':0x400},'id_cs':{'type':String,'maxlength':0x400},'id_link':String,'ma_ct_link':String,'so_ct_link':String,'id_ct_goc':String,'ma_ct_goc':String,'so_ct_goc':String,'ngay_ct_goc':Date,'pt_thanh_toan_goc':String,'pt_thanh_toan':String,'pt_thanh_toan2':String,'trang_thai':{'type':String,'maxlength':0x20},'nh_dk':{'type':Number,'default':0x0},'id_kbbtpb':{'type':String,'maxlength':0x400},'exfields':Schema['Types'][_0x3e3b75(0x1f0)],'exfields_detail':Schema[_0x3e3b75(0x19f)]['Mixed'],'flag':{'type':String,'maxlength':0x400},'gio':Number,'ngay':Number,'thang':Number,'quy':Number,'nam':Number,'ma_kenh':String,'ma_td1':Schema[_0x3e3b75(0x19f)][_0x3e3b75(0x1f0)],'ma_td2':Schema['Types'][_0x3e3b75(0x1f0)],'ma_td3':Schema[_0x3e3b75(0x19f)][_0x3e3b75(0x1f0)],'ma_td4':Schema[_0x3e3b75(0x19f)][_0x3e3b75(0x1f0)],'ma_td5':Schema['Types']['Mixed'],'ma_td6':Schema[_0x3e3b75(0x19f)][_0x3e3b75(0x1f0)],'ma_td7':Schema[_0x3e3b75(0x19f)][_0x3e3b75(0x1f0)],'ma_td8':Schema['Types'][_0x3e3b75(0x1f0)],'ma_td9':Schema[_0x3e3b75(0x19f)]['Mixed'],'status':{'type':Boolean,'default':!![]},'date_created':{'type':Date,'default':Date[_0x3e3b75(0x1a4)]},'date_updated':{'type':Date,'default':Date[_0x3e3b75(0x1a4)]},'user_created':{'type':String,'default':''},'user_updated':{'type':String,'default':''},'id_client':String,'listinfo_code':String},{'toJSON':{'virtuals':!![]}});socainppSchema[_0x3e3b75(0x1db)]('save',function(_0x2be1d3){const _0x52a0ce=_0x3e3b75,_0x3bd5f8={'rzCDC':function(_0x5cf884,_0x42a38e){return _0x5cf884==_0x42a38e;},'UiuDC':_0x52a0ce(0x1ca),'mrnQO':function(_0x4ab9fc,_0x4781e8){return _0x4ab9fc(_0x4781e8);},'XCKbX':_0x52a0ce(0x198),'xBUay':_0x52a0ce(0x1ee),'avYSY':function(_0x581e3d,_0x505571){return _0x581e3d+_0x505571;},'pTctn':'months','bMXmt':_0x52a0ce(0x1c7),'FMRnp':function(_0x26f190){return _0x26f190();}},_0x361864=this;_0x3bd5f8[_0x52a0ce(0x186)](_0x361864[_0x52a0ce(0x1d3)],_0x3bd5f8[_0x52a0ce(0x1de)])?(_0x361864[_0x52a0ce(0x1d6)]=Math[_0x52a0ce(0x1d8)](_0x361864[_0x52a0ce(0x1d6)],0x0),_0x361864[_0x52a0ce(0x17e)]=_0x361864[_0x52a0ce(0x1d6)]):_0x361864[_0x52a0ce(0x17e)]=Math[_0x52a0ce(0x1d8)](_0x361864[_0x52a0ce(0x17e)],0x0);let _0x4d84d6=_0x3bd5f8[_0x52a0ce(0x195)](moment,_0x361864[_0x52a0ce(0x1ed)]);_0x361864['gio']=_0x4d84d6[_0x52a0ce(0x1b8)](_0x52a0ce(0x1e0)),_0x361864[_0x52a0ce(0x1ae)]=_0x4d84d6[_0x52a0ce(0x1b8)](_0x3bd5f8[_0x52a0ce(0x1e1)]),_0x361864['quy']=_0x4d84d6['get'](_0x3bd5f8[_0x52a0ce(0x1bb)]),_0x361864['thang']=_0x3bd5f8[_0x52a0ce(0x1b3)](_0x4d84d6['get'](_0x3bd5f8[_0x52a0ce(0x1e3)]),0x1),_0x361864[_0x52a0ce(0x1be)]=_0x4d84d6[_0x52a0ce(0x1b8)](_0x52a0ce(0x1ac)),_0x361864[_0x52a0ce(0x1ed)]=_0x4d84d6[_0x52a0ce(0x1a7)](_0x3bd5f8[_0x52a0ce(0x192)])[_0x52a0ce(0x18f)](),_0x3bd5f8['FMRnp'](_0x2be1d3);});if((global['configs']||{})[_0x3e3b75(0x1f2)]){const DmJYky=_0x3e3b75(0x1a2)[_0x3e3b75(0x1c4)]('|');let jLHWrb=0x0;while(!![]){switch(DmJYky[jLHWrb++]){case'0':socainppSchema[_0x3e3b75(0x19a)]({'id_app':0x1,'id_cs_ck':0x1});continue;case'1':socainppSchema['index']({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_bp':0x1});continue;case'2':socainppSchema['index']({'id_app':0x1,'ngay_ct':-0x1,'tk_co':0x1});continue;case'3':socainppSchema[_0x3e3b75(0x19a)]({'id_app':0x1,'ngay':0x1});continue;case'4':socainppSchema[_0x3e3b75(0x19a)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_vt':0x1,'ma_tt1':0x1,'ma_tt2':0x1,'ma_tt3':0x1,'ma_lo':0x1,'han_sd':-0x1});continue;case'5':socainppSchema[_0x3e3b75(0x19a)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_dt':0x1});continue;case'6':socainppSchema[_0x3e3b75(0x19a)]({'id_app':0x1,'ma_ct_goc':0x1,'id_ct_goc':0x1});continue;case'7':socainppSchema[_0x3e3b75(0x19a)]({'id_app':0x1,'thang':0x1});continue;case'8':socainppSchema[_0x3e3b75(0x19a)]({'id_ct':0x1});continue;case'9':socainppSchema[_0x3e3b75(0x19a)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_td3':0x1});continue;case'10':socainppSchema['index']({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_td2':0x1});continue;case'11':socainppSchema[_0x3e3b75(0x19a)]({'id_app':0x1,'id_link':0x1});continue;case'12':socainppSchema[_0x3e3b75(0x19a)]({'id_app':0x1,'date_created':-0x1});continue;case'13':socainppSchema[_0x3e3b75(0x19a)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_nv':0x1});continue;case'14':socainppSchema[_0x3e3b75(0x19a)]({'id_app':0x1});continue;case'15':socainppSchema[_0x3e3b75(0x19a)]({'id_app':0x1,'so_ct':0x1,'ngay_ct':-0x1});continue;case'16':socainppSchema[_0x3e3b75(0x19a)]({'id_app':0x1,'ma_ct':0x1,'so_ct':0x1});continue;case'17':socainppSchema[_0x3e3b75(0x19a)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_td1':0x1});continue;case'18':socainppSchema[_0x3e3b75(0x19a)]({'id_app':0x1,'nam':-0x1});continue;case'19':socainppSchema[_0x3e3b75(0x19a)]({'id_app':0x1,'quy':0x1});continue;case'20':socainppSchema['index']({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1});continue;case'21':socainppSchema[_0x3e3b75(0x19a)]({'id_app':0x1,'id_cs':0x1});continue;case'22':socainppSchema['index']({'id_app':0x1,'ma_ct':0x1});continue;case'23':socainppSchema['index']({'id_app':0x1,'id_lenhsx':0x1});continue;case'24':socainppSchema[_0x3e3b75(0x19a)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_hd':0x1});continue;case'25':socainppSchema[_0x3e3b75(0x19a)]({'id_app':0x1,'id_ct':0x1});continue;case'26':socainppSchema['index']({'id_app':0x1,'id_ct':0x1,'so_ct':-0x1,'ngay_ct':-0x1,'ma_kh_no':0x1,'ma_kh_co':0x1,'tk_no':0x1,'tk_co':0x1});continue;case'27':socainppSchema[_0x3e3b75(0x19a)]({'id_app':0x1,'ngay_ct':-0x1,'ma_kh_no':0x1,'ma_kh_co':0x1,'tk_no':0x1,'tk_co':0x1});continue;case'28':socainppSchema[_0x3e3b75(0x19a)]({'id_app':0x1,'ngay_ct':-0x1,'ma_nt':0x1});continue;case'29':socainppSchema[_0x3e3b75(0x19a)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_kho':0x1,'ma_vt':0x1});continue;case'30':socainppSchema[_0x3e3b75(0x19a)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_sp':0x1});continue;case'31':socainppSchema[_0x3e3b75(0x19a)]({'id_app':0x1,'ma_dvcs':0x1});continue;case'32':socainppSchema['index']({'id_app':0x1,'gio':0x1});continue;case'33':socainppSchema[_0x3e3b75(0x19a)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_phi':0x1});continue;case'34':socainppSchema[_0x3e3b75(0x19a)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_kenh':0x1});continue;}break;}}function _0x517a(_0x5d8e59,_0x388716){const _0x403afa=_0x403a();return _0x517a=function(_0x517aec,_0x4d17be){_0x517aec=_0x517aec-0x17e;let _0x2c1122=_0x403afa[_0x517aec];if(_0x517a['SyAkBu']===undefined){var _0x2d20f7=function(_0x195497){const _0x2da736='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x112b4d='',_0x8d9949='';for(let _0x274da=0x0,_0x4fddc4,_0x266ac6,_0xc93ca5=0x0;_0x266ac6=_0x195497['charAt'](_0xc93ca5++);~_0x266ac6&&(_0x4fddc4=_0x274da%0x4?_0x4fddc4*0x40+_0x266ac6:_0x266ac6,_0x274da++%0x4)?_0x112b4d+=String['fromCharCode'](0xff&_0x4fddc4>>(-0x2*_0x274da&0x6)):0x0){_0x266ac6=_0x2da736['indexOf'](_0x266ac6);}for(let _0x5bbcfa=0x0,_0x5c1787=_0x112b4d['length'];_0x5bbcfa<_0x5c1787;_0x5bbcfa++){_0x8d9949+='%'+('00'+_0x112b4d['charCodeAt'](_0x5bbcfa)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x8d9949);};_0x517a['VWQaSq']=_0x2d20f7,_0x5d8e59=arguments,_0x517a['SyAkBu']=!![];}const _0x454066=_0x403afa[0x0],_0x596e63=_0x517aec+_0x454066,_0x4981cb=_0x5d8e59[_0x596e63];return!_0x4981cb?(_0x2c1122=_0x517a['VWQaSq'](_0x2c1122),_0x5d8e59[_0x596e63]=_0x2c1122):_0x2c1122=_0x4981cb,_0x2c1122;},_0x517a(_0x5d8e59,_0x388716);}socainppSchema['post'](_0x3e3b75(0x1cc),async function(_0x1b10a3){const _0x2035f9=_0x3e3b75,_0x5f5971={'SKiZm':function(_0x3261f3,_0x400361){return _0x3261f3!==_0x400361;},'qgjiS':'rAZCy','Qshrh':function(_0x47469b,_0xc1393){return _0x47469b>=_0xc1393;},'rmhdk':_0x2035f9(0x1c5),'cxEew':'HD2','sPbqg':_0x2035f9(0x1a3),'yIcSx':_0x2035f9(0x19e),'EYoCP':function(_0x24c298){return _0x24c298();},'yxxJJ':_0x2035f9(0x1a5),'SoYnV':'yAZWU','ZjVzq':_0x2035f9(0x187),'uWShL':function(_0x10a401,_0x1e80d3){return _0x10a401(_0x1e80d3);},'fBPPv':function(_0x3273c7){return _0x3273c7();},'wNqmM':function(_0x24c403,_0x1dc0d8,_0x3108a9,_0x523ef6){return _0x24c403(_0x1dc0d8,_0x3108a9,_0x523ef6);},'Jpugw':function(_0x1972b5){return _0x1972b5();}},_0x416efb=_0x1b10a3['$session']()||_0x5f5971[_0x2035f9(0x1d0)](getCurrentSession),_0x3736e6=async()=>{const _0x41e3a0=_0x2035f9;if(_0x5f5971[_0x41e3a0(0x18a)](_0x5f5971[_0x41e3a0(0x1bd)],'QUNIK')){if(_0x5f5971[_0x41e3a0(0x1eb)]([_0x5f5971[_0x41e3a0(0x1d1)],_0x5f5971[_0x41e3a0(0x1af)],_0x41e3a0(0x180),_0x5f5971['sPbqg']][_0x41e3a0(0x18d)](_0x1b10a3[_0x41e3a0(0x1c6)]),0x0)){if(_0x1b10a3[_0x41e3a0(0x1c2)]){let _0x1e74e3=await global[_0x41e3a0(0x1c1)](_0x5f5971['yIcSx'])[_0x41e3a0(0x1cd)]({'ma_kh':_0x1b10a3[_0x41e3a0(0x1c2)],'id_app':_0x1b10a3[_0x41e3a0(0x1d4)]},{'ngay_ct':0x1})[_0x41e3a0(0x184)]({'ngay_ct':-0x1});if(_0x1e74e3){const _0x37be7c=_0x5f5971[_0x41e3a0(0x193)](moment)[_0x41e3a0(0x194)](moment(_0x1e74e3[_0x41e3a0(0x1ed)]),_0x5f5971[_0x41e3a0(0x1df)]);model[_0x41e3a0(0x1ad)]({'ma_kh':_0x1b10a3[_0x41e3a0(0x1c2)],'id_app':_0x1b10a3[_0x41e3a0(0x1d4)]},{'ngay_mua_gan_nhat':_0x1e74e3['ngay_ct'],'so_ngay_da_mua':_0x37be7c});}}if(_0x1b10a3[_0x41e3a0(0x1e9)]&&_0x1b10a3[_0x41e3a0(0x1e9)]!=_0x1b10a3[_0x41e3a0(0x1c2)]){if(_0x5f5971['SKiZm'](_0x5f5971[_0x41e3a0(0x1bf)],_0x5f5971[_0x41e3a0(0x1d7)])){let _0x4e778b=await global[_0x41e3a0(0x1c1)](_0x5f5971['yIcSx'])[_0x41e3a0(0x1cd)]({'ma_kh':_0x1b10a3[_0x41e3a0(0x1e9)],'id_app':_0x1b10a3[_0x41e3a0(0x1d4)]},{'ngay_ct':0x1})['sort']({'ngay_ct':-0x1});if(_0x4e778b){const _0x1595be=moment()[_0x41e3a0(0x194)](_0x5f5971[_0x41e3a0(0x17f)](moment,_0x4e778b[_0x41e3a0(0x1ed)]),_0x5f5971[_0x41e3a0(0x1df)]);model[_0x41e3a0(0x1ad)]({'ma_kh':_0x1b10a3[_0x41e3a0(0x1e9)],'id_app':_0x1b10a3[_0x41e3a0(0x1d4)]},{'ngay_mua_gan_nhat':_0x4e778b[_0x41e3a0(0x1ed)],'so_ngay_da_mua':_0x1595be});}}else _0x87dde6['ma_nv']=_0x266cd4['ma_nv'];}}}else _0xeb1f22['ma_dt']=_0xc79c1d[_0x41e3a0(0x1ab)];};if(_0x416efb)_0x5f5971['wNqmM'](onAfterCommit,_0x3736e6,_0x2035f9(0x18e),_0x416efb);else try{await _0x5f5971[_0x2035f9(0x189)](_0x3736e6);}catch(_0x7e6141){console[_0x2035f9(0x19d)](_0x2035f9(0x18b),_0x7e6141);}});const model=mongoose[_0x3e3b75(0x1b9)]['socainpp']||mongoose[_0x3e3b75(0x1e8)]('socainpp',socainppSchema);model['getArise']=async(_0x411099,_0x3ebaf1={'fields':undefined})=>{const _0xce5d2b=_0x3e3b75,_0x49c546={'dXCbo':_0xce5d2b(0x1a6),'WXeBZ':_0xce5d2b(0x1ca),'mSYJO':function(_0xa37b05,_0x22c342){return _0xa37b05(_0x22c342);},'GFWKk':'dates','TbaqY':_0xce5d2b(0x1ee),'MGgap':function(_0x4a6344,_0x2a87c7){return _0x4a6344+_0x2a87c7;},'xCrdn':'year','AwoCF':_0xce5d2b(0x1c7),'DYLkk':function(_0xfb042a,_0xefde77){return _0xfb042a===_0xefde77;},'wsMWw':_0xce5d2b(0x197),'gjhtV':function(_0x652c81,_0x122160){return _0x652c81===_0x122160;},'KrAQP':_0xce5d2b(0x1d2),'NpMEG':function(_0x3690fd,_0x19b169){return _0x3690fd===_0x19b169;},'XnhDf':_0xce5d2b(0x1b0),'aXdlD':function(_0x16c1d6,_0x4c9bf6){return _0x16c1d6!==_0x4c9bf6;},'afZFe':_0xce5d2b(0x1dd),'DwdLE':function(_0x5a2865,_0x13b4df){return _0x5a2865!==_0x13b4df;},'DJZNP':_0xce5d2b(0x1bc)};let _0x7a6651={'ngay_ct':{'$gte':_0x411099['tu_ngay'],'$lte':_0x411099[_0xce5d2b(0x1c3)]},'id_app':_0x411099[_0xce5d2b(0x1d4)]};_0x411099[_0xce5d2b(0x1dc)]&&(_0x7a6651[_0xce5d2b(0x1dc)]=_0x411099['ma_dvcs']);_0x411099[_0xce5d2b(0x1e5)]&&(_0x7a6651[_0xce5d2b(0x1e5)]=_0x411099[_0xce5d2b(0x1e5)]);_0x411099[_0xce5d2b(0x191)]&&(_0x7a6651[_0xce5d2b(0x191)]=_0x411099[_0xce5d2b(0x191)]);if(_0x411099['ma_dt']){if(_0x49c546[_0xce5d2b(0x18c)](_0x49c546[_0xce5d2b(0x1b5)],_0x49c546[_0xce5d2b(0x1b5)]))_0x7a6651[_0xce5d2b(0x1ab)]=_0x411099[_0xce5d2b(0x1ab)];else{const _0x461de6=_0x49c546[_0xce5d2b(0x1b2)][_0xce5d2b(0x1c4)]('|');let _0x1911af=0x0;while(!![]){switch(_0x461de6[_0x1911af++]){case'0':_0x59e768[_0xce5d2b(0x19a)]({'id_ct':0x1});continue;case'1':_0x5527bc[_0xce5d2b(0x19a)]({'id_app':0x1,'ma_dvcs':0x1});continue;case'2':_0x4e8af5[_0xce5d2b(0x19a)]({'id_app':0x1,'ma_ct_goc':0x1,'id_ct_goc':0x1});continue;case'3':_0x5af102['index']({'id_app':0x1,'id_link':0x1});continue;case'4':_0x10c229[_0xce5d2b(0x19a)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_bp':0x1});continue;case'5':_0x11932f[_0xce5d2b(0x19a)]({'id_app':0x1,'id_cs':0x1});continue;case'6':_0x4dc0ac['index']({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_dt':0x1});continue;case'7':_0x3d8233['index']({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_kenh':0x1});continue;case'8':_0x374bc5[_0xce5d2b(0x19a)]({'id_app':0x1,'id_ct':0x1,'so_ct':-0x1,'ngay_ct':-0x1,'ma_kh_no':0x1,'ma_kh_co':0x1,'tk_no':0x1,'tk_co':0x1});continue;case'9':_0x42b75c['index']({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_nv':0x1});continue;case'10':_0x407520[_0xce5d2b(0x19a)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_kho':0x1,'ma_vt':0x1});continue;case'11':_0x1dde77[_0xce5d2b(0x19a)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_td3':0x1});continue;case'12':_0x242b8d[_0xce5d2b(0x19a)]({'id_app':0x1,'thang':0x1});continue;case'13':_0x5329f6['index']({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_sp':0x1});continue;case'14':_0x199bad[_0xce5d2b(0x19a)]({'id_app':0x1,'id_cs_ck':0x1});continue;case'15':_0x4abad2[_0xce5d2b(0x19a)]({'id_app':0x1,'gio':0x1});continue;case'16':_0x1dcc3b[_0xce5d2b(0x19a)]({'id_app':0x1});continue;case'17':_0x48614e[_0xce5d2b(0x19a)]({'id_app':0x1,'ngay_ct':-0x1,'tk_co':0x1});continue;case'18':_0x309d1a[_0xce5d2b(0x19a)]({'id_app':0x1,'quy':0x1});continue;case'19':_0x223aa1['index']({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_vt':0x1,'ma_tt1':0x1,'ma_tt2':0x1,'ma_tt3':0x1,'ma_lo':0x1,'han_sd':-0x1});continue;case'20':_0x5fc0e3[_0xce5d2b(0x19a)]({'id_app':0x1,'ngay_ct':-0x1,'ma_nt':0x1});continue;case'21':_0x3845f0[_0xce5d2b(0x19a)]({'id_app':0x1,'ngay':0x1});continue;case'22':_0x61f934[_0xce5d2b(0x19a)]({'id_app':0x1,'id_ct':0x1});continue;case'23':_0x37b2fa[_0xce5d2b(0x19a)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_phi':0x1});continue;case'24':_0x2b3abb[_0xce5d2b(0x19a)]({'id_app':0x1,'ma_ct':0x1,'so_ct':0x1});continue;case'25':_0x1580da[_0xce5d2b(0x19a)]({'id_app':0x1,'ngay_ct':-0x1,'ma_kh_no':0x1,'ma_kh_co':0x1,'tk_no':0x1,'tk_co':0x1});continue;case'26':_0x361dbf[_0xce5d2b(0x19a)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_hd':0x1});continue;case'27':_0x180c5e['index']({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_td2':0x1});continue;case'28':_0x47d634[_0xce5d2b(0x19a)]({'id_app':0x1,'nam':-0x1});continue;case'29':_0x153d52[_0xce5d2b(0x19a)]({'id_app':0x1,'ma_ct':0x1});continue;case'30':_0x163834[_0xce5d2b(0x19a)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1});continue;case'31':_0x58d4d2['index']({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_td1':0x1});continue;case'32':_0x19639f[_0xce5d2b(0x19a)]({'id_app':0x1,'date_created':-0x1});continue;case'33':_0x101deb[_0xce5d2b(0x19a)]({'id_app':0x1,'id_lenhsx':0x1});continue;case'34':_0x4776f9[_0xce5d2b(0x19a)]({'id_app':0x1,'so_ct':0x1,'ngay_ct':-0x1});continue;}break;}}}_0x411099[_0xce5d2b(0x1e4)]&&(_0x49c546[_0xce5d2b(0x1e7)](_0x49c546[_0xce5d2b(0x1b4)],_0xce5d2b(0x1d2))?_0x7a6651['ma_sp']=_0x411099[_0xce5d2b(0x1e4)]:(_0xc7a058[_0xce5d2b(0x1d6)]=_0x3579fa[_0xce5d2b(0x1d8)](_0x1c3395['tien_nt'],0x0),_0x382461[_0xce5d2b(0x17e)]=_0x4cd297['tien_nt']));_0x411099[_0xce5d2b(0x1ce)]&&(_0x7a6651[_0xce5d2b(0x1ce)]=_0x411099[_0xce5d2b(0x1ce)]);_0x411099['ma_phi']&&(_0x7a6651['ma_phi']=_0x411099['ma_phi']);_0x411099['ma_kho']&&(_0x7a6651[_0xce5d2b(0x1e2)]=_0x411099[_0xce5d2b(0x1e2)]);if(_0x411099[_0xce5d2b(0x1c8)]&&Array['isArray'](_0x411099[_0xce5d2b(0x1c8)])){let _0xed6f8c=_0x411099[_0xce5d2b(0x1c8)][_0xce5d2b(0x199)]();if(_0x411099[_0xce5d2b(0x1b6)]){if(_0x49c546[_0xce5d2b(0x1cb)](_0x49c546['XnhDf'],_0x49c546['XnhDf']))_0x7a6651[_0xce5d2b(0x1c8)]={'$not':new RegExp(_0xed6f8c)};else{const _0x256f38=this;_0x256f38[_0xce5d2b(0x1d3)]==_0x49c546[_0xce5d2b(0x1f1)]?(_0x256f38['tien_nt']=_0x5bbcfa[_0xce5d2b(0x1d8)](_0x256f38[_0xce5d2b(0x1d6)],0x0),_0x256f38[_0xce5d2b(0x17e)]=_0x256f38[_0xce5d2b(0x1d6)]):_0x256f38[_0xce5d2b(0x17e)]=_0x5c1787[_0xce5d2b(0x1d8)](_0x256f38['tien'],0x0);let _0x143064=_0x49c546['mSYJO'](_0x266ac6,_0x256f38[_0xce5d2b(0x1ed)]);_0x256f38[_0xce5d2b(0x1c9)]=_0x143064[_0xce5d2b(0x1b8)]('hours'),_0x256f38['ngay']=_0x143064[_0xce5d2b(0x1b8)](_0x49c546['GFWKk']),_0x256f38[_0xce5d2b(0x1ea)]=_0x143064[_0xce5d2b(0x1b8)](_0x49c546['TbaqY']),_0x256f38['thang']=_0x49c546['MGgap'](_0x143064[_0xce5d2b(0x1b8)](_0xce5d2b(0x1d9)),0x1),_0x256f38['nam']=_0x143064[_0xce5d2b(0x1b8)](_0x49c546[_0xce5d2b(0x188)]),_0x256f38['ngay_ct']=_0x143064[_0xce5d2b(0x1a7)](_0x49c546[_0xce5d2b(0x190)])[_0xce5d2b(0x18f)](),_0xc93ca5();}}else _0x7a6651[_0xce5d2b(0x1c8)]={'$regex':_0xed6f8c,'$options':'i'};}if(_0x411099[_0xce5d2b(0x1a1)]&&Array[_0xce5d2b(0x1a8)](_0x411099[_0xce5d2b(0x1a1)])){if(_0x49c546[_0xce5d2b(0x1a0)](_0x49c546[_0xce5d2b(0x1da)],'YHHNU')){let _0x3bffd7=_0x411099[_0xce5d2b(0x1a1)][_0xce5d2b(0x199)]();_0x411099[_0xce5d2b(0x19c)]&&_0x3bffd7?_0x49c546['DwdLE'](_0x49c546[_0xce5d2b(0x1a9)],_0xce5d2b(0x1bc))?_0x2992e9['ma_dvcs']=_0xc62b58[_0xce5d2b(0x1dc)]:_0x7a6651[_0xce5d2b(0x1a1)]={'$not':new RegExp(_0x3bffd7)}:_0x7a6651[_0xce5d2b(0x1a1)]={'$regex':_0x3bffd7,'$options':'i'};}else _0x409185[_0xce5d2b(0x1c8)]={'$not':new _0x36ee3c(_0x36ff62)};}return await model[_0xce5d2b(0x1ba)](_0x7a6651,_0x3ebaf1[_0xce5d2b(0x185)])[_0xce5d2b(0x1ec)]();},module[_0x3e3b75(0x1cf)]=model;
@@ -1,6 +1 @@
1
- const socaitcSchema=new Schema({id_app:{type:String,required:!1,maxlength:1024},ma_dvcs:{type:String,required:!1,maxlength:1024},ma_ct:{type:String,required:!1,uppercase:!0,maxlength:32,trim:!0},ma_gd:{type:String,default:"0",maxlength:32,trim:!0},ngay_ct:{type:Date,required:!1},tk_no:{type:String,required:!1,uppercase:!0,maxlength:32,trim:!0},ma_kh_no:String,tk_co:{type:String,required:!1,uppercase:!0,maxlength:32,trim:!0},ma_kh_co:String,ma_nt:{type:String,default:"VND",required:!1,uppercase:!0,
2
- maxlength:32,trim:!0},ty_gia:{type:Number,default:1},tien_nt:{type:Number,default:0},tien:{type:Number,default:0},ma_bp:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_phi:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_hd:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_dt:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_nv:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_kenh:String,ma_cp:String,ma_kho:String,ma_sp:String,ma_cong_doan:String,
3
- id_client:String,listinfo_code:String},{toJSON:{virtuals:!0}});
4
- (global.configs||{}).createIndexes&&(socaitcSchema.index({id_app:1}),socaitcSchema.index({id_app:1,ma_dvcs:1}),socaitcSchema.index({id_app:1,ma_ct:1}),socaitcSchema.index({id_app:1,ngay_ct:-1,ma_nt:1}),socaitcSchema.index({id_app:1,ngay_ct:-1,tk_no:1,tk_co:1,ma_bp:1}),socaitcSchema.index({id_app:1,ngay_ct:-1,tk_no:1,tk_co:1,ma_phi:1}),socaitcSchema.index({id_app:1,ngay_ct:-1,tk_no:1,tk_co:1,ma_hd:1}),socaitcSchema.index({id_app:1,ngay_ct:-1,tk_no:1,tk_co:1,ma_dt:1}),socaitcSchema.index({id_app:1,
5
- ngay_ct:-1,tk_no:1,tk_co:1,ma_nv:1}),socaitcSchema.index({id_app:1,ngay_ct:-1,tk_no:1,tk_co:1,ma_cp:1}),socaitcSchema.index({id_app:1,ngay_ct:-1,tk_no:1,tk_co:1,ma_kenh:1}),socaitcSchema.index({id_app:1,ngay_ct:-1,ma_kho:1,ma_sp:1,ma_cong_doan:1}),socaitcSchema.index({id_app:1,id_ct:1,so_ct:-1,ngay_ct:-1,ma_kh_no:1,ma_kh_co:1,tk_no:1,tk_co:1}),socaitcSchema.index({id_app:1,ngay_ct:-1,ma_kh_no:1,ma_kh_co:1,tk_no:1,tk_co:1}),socaitcSchema.index({id_app:1,ngay_ct:-1,tk_no:1}),socaitcSchema.index({id_app:1,
6
- ngay_ct:-1,tk_co:1}));const model=mongoose.models.socaitc||mongoose.model("socaitc",socaitcSchema);if((global.configs||{}).createIndexes)model.on("index",async function($err$$){$err$$?console.error("socaitc index error",$err$$):console.info("socaitc indexing complete")});module.exports=model;
1
+ function _0x54a3(_0x4bc47e,_0x361130){const _0x223868=_0x2238();return _0x54a3=function(_0x54a327,_0x115b58){_0x54a327=_0x54a327-0x1df;let _0x184040=_0x223868[_0x54a327];if(_0x54a3['YIvICl']===undefined){var _0x46189c=function(_0x5723ca){const _0x337b01='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1f3711='',_0x453452='';for(let _0x296333=0x0,_0xea2f77,_0x5acc72,_0x5e1fe3=0x0;_0x5acc72=_0x5723ca['charAt'](_0x5e1fe3++);~_0x5acc72&&(_0xea2f77=_0x296333%0x4?_0xea2f77*0x40+_0x5acc72:_0x5acc72,_0x296333++%0x4)?_0x1f3711+=String['fromCharCode'](0xff&_0xea2f77>>(-0x2*_0x296333&0x6)):0x0){_0x5acc72=_0x337b01['indexOf'](_0x5acc72);}for(let _0x144d4f=0x0,_0x2eb1ce=_0x1f3711['length'];_0x144d4f<_0x2eb1ce;_0x144d4f++){_0x453452+='%'+('00'+_0x1f3711['charCodeAt'](_0x144d4f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x453452);};_0x54a3['HVVCfQ']=_0x46189c,_0x4bc47e=arguments,_0x54a3['YIvICl']=!![];}const _0x264ae5=_0x223868[0x0],_0x2d4e57=_0x54a327+_0x264ae5,_0x2b07fd=_0x4bc47e[_0x2d4e57];return!_0x2b07fd?(_0x184040=_0x54a3['HVVCfQ'](_0x184040),_0x4bc47e[_0x2d4e57]=_0x184040):_0x184040=_0x2b07fd,_0x184040;},_0x54a3(_0x4bc47e,_0x361130);}const _0x2c39e5=_0x54a3;(function(_0x58becf,_0x538580){const _0x439a16=_0x54a3,_0x54d91d=_0x58becf();while(!![]){try{const _0x59abae=-parseInt(_0x439a16(0x1ef))/0x1+-parseInt(_0x439a16(0x1e8))/0x2+-parseInt(_0x439a16(0x1e4))/0x3+-parseInt(_0x439a16(0x1e0))/0x4+-parseInt(_0x439a16(0x1f7))/0x5+parseInt(_0x439a16(0x1e5))/0x6+-parseInt(_0x439a16(0x1e6))/0x7*(-parseInt(_0x439a16(0x1f0))/0x8);if(_0x59abae===_0x538580)break;else _0x54d91d['push'](_0x54d91d['shift']());}catch(_0x3c9e92){_0x54d91d['push'](_0x54d91d['shift']());}}}(_0x2238,0x1e8af));function _0x2238(){const _0x4d007c=['y3jLyxrLsw5KzxHLCW','mZiXntaWuKnHsw9n','Bw9KzwXZ','mtr8mxWXm3WXmhWZFdeYFdv8mtf8mtv8oxWYFdD8mhW4Fdr8nG','zxjYB3i','yu1JEKS','C3bSAxq','EhLSBue','mJmZndy0v0TutKvK','ofbgzK5ktG','Aw5MBW','y29UzMLNCW','C29JywL0yYbPBMrLEgLUzYbJB21WBgv0zq','zxHWB3j0CW','C29JywL0yW','C29JywL0yYbPBMrLEcbLCNjVCG','mta0mda3mfHft0HlDa','ywjYwuK','nZa2mtCYu05UsLvm','Cunuqw8','q3HbsuG','Aw5KzxG','nZHdDhjTvem','mJy3nZKYB3PQEw93','nJaXndG3nNves2zQrW'];_0x2238=function(){return _0x4d007c;};return _0x2238();}const socaitcSchema=new Schema({'id_app':{'type':String,'required':![],'maxlength':0x400},'ma_dvcs':{'type':String,'required':![],'maxlength':0x400},'ma_ct':{'type':String,'required':![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_gd':{'type':String,'default':'0','maxlength':0x20,'trim':!![]},'ngay_ct':{'type':Date,'required':![]},'tk_no':{'type':String,'required':![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_kh_no':String,'tk_co':{'type':String,'required':![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_kh_co':String,'ma_nt':{'type':String,'default':'VND','required':![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'ty_gia':{'type':Number,'default':0x1},'tien_nt':{'type':Number,'default':0x0},'tien':{'type':Number,'default':0x0},'ma_bp':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_phi':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_hd':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_dt':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_nv':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_kenh':String,'ma_cp':String,'ma_kho':String,'ma_sp':String,'ma_cong_doan':String,'id_client':String,'listinfo_code':String},{'toJSON':{'virtuals':!![]}});if((global[_0x2c39e5(0x1f2)]||{})[_0x2c39e5(0x1e7)]){const DBcmlP=_0x2c39e5(0x1ea)[_0x2c39e5(0x1ed)]('|');let DcCCFQ=0x0;while(!![]){switch(DBcmlP[DcCCFQ++]){case'0':socaitcSchema[_0x2c39e5(0x1e3)]({'id_app':0x1,'id_ct':0x1,'so_ct':-0x1,'ngay_ct':-0x1,'ma_kh_no':0x1,'ma_kh_co':0x1,'tk_no':0x1,'tk_co':0x1});continue;case'1':socaitcSchema[_0x2c39e5(0x1e3)]({'id_app':0x1,'ma_dvcs':0x1});continue;case'2':socaitcSchema[_0x2c39e5(0x1e3)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_kenh':0x1});continue;case'3':socaitcSchema[_0x2c39e5(0x1e3)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_bp':0x1});continue;case'4':socaitcSchema[_0x2c39e5(0x1e3)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1});continue;case'5':socaitcSchema[_0x2c39e5(0x1e3)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_hd':0x1});continue;case'6':socaitcSchema[_0x2c39e5(0x1e3)]({'id_app':0x1,'ngay_ct':-0x1,'tk_co':0x1});continue;case'7':socaitcSchema['index']({'id_app':0x1,'ngay_ct':-0x1,'ma_kho':0x1,'ma_sp':0x1,'ma_cong_doan':0x1});continue;case'8':socaitcSchema[_0x2c39e5(0x1e3)]({'id_app':0x1,'ngay_ct':-0x1,'ma_kh_no':0x1,'ma_kh_co':0x1,'tk_no':0x1,'tk_co':0x1});continue;case'9':socaitcSchema['index']({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_cp':0x1});continue;case'10':socaitcSchema[_0x2c39e5(0x1e3)]({'id_app':0x1,'ngay_ct':-0x1,'ma_nt':0x1});continue;case'11':socaitcSchema[_0x2c39e5(0x1e3)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_dt':0x1});continue;case'12':socaitcSchema[_0x2c39e5(0x1e3)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_phi':0x1});continue;case'13':socaitcSchema[_0x2c39e5(0x1e3)]({'id_app':0x1,'ma_ct':0x1});continue;case'14':socaitcSchema[_0x2c39e5(0x1e3)]({'id_app':0x1});continue;case'15':socaitcSchema[_0x2c39e5(0x1e3)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_nv':0x1});continue;}break;}}const model=mongoose[_0x2c39e5(0x1e9)][_0x2c39e5(0x1f5)]||mongoose['model']('socaitc',socaitcSchema);(global[_0x2c39e5(0x1f2)]||{})[_0x2c39e5(0x1e7)]&&model['on']('index',async function(_0x397540){const _0x281831=_0x2c39e5,_0x394ae6={'qCTAo':_0x281831(0x1f6),'CxAIH':_0x281831(0x1f3),'aMczK':function(_0x1fee4a,_0x516276){return _0x1fee4a===_0x516276;},'abrYI':_0x281831(0x1ee)};_0x397540?_0x394ae6[_0x281831(0x1ec)](_0x394ae6[_0x281831(0x1df)],_0x394ae6['abrYI'])?console[_0x281831(0x1eb)](_0x394ae6[_0x281831(0x1e1)],_0x397540):_0x217137?_0x256a5b[_0x281831(0x1eb)](_0x394ae6[_0x281831(0x1e1)],_0x7ef96d):_0x3bb38a[_0x281831(0x1f1)](_0x394ae6[_0x281831(0x1e2)]):console['info'](_0x394ae6[_0x281831(0x1e2)]);});module[_0x2c39e5(0x1f4)]=model;
@@ -1,16 +1 @@
1
- const moment=require("moment"),socaitmpSchema=new Schema({id_app:{type:String,required:!0,maxlength:1024},ma_dvcs:{type:String,required:!0,maxlength:1024},id_ct:{type:String,required:!0,maxlength:1024},ma_ct:{type:String,required:!0,uppercase:!0,maxlength:32,trim:!0},ma_gd:{type:String,default:"0",maxlength:32,trim:!0},ngay_ct:{type:Date,required:!0},so_ct:{type:String,required:!0,uppercase:!0,maxlength:32,trim:!0},ngay_hd:{type:Date},so_hd:{type:String,uppercase:!0,maxlength:32,trim:!0},tk_no:{type:String,
2
- required:!0,uppercase:!0,maxlength:32,trim:!0},tk_co:{type:String,required:!0,uppercase:!0,maxlength:32,trim:!0},ma_kh_no:{type:String,uppercase:!0,default:"",maxlength:32,trim:!0},ma_kh_co:{type:String,uppercase:!0,default:"",maxlength:32,trim:!0},ma_nt:{type:String,default:"VND",required:!0,uppercase:!0,maxlength:32,trim:!0},ty_gia:{type:Number,default:1},tien_nt:{type:Number,default:0},tien:{type:Number,default:0},dien_giai:{type:String,default:"",maxlength:1024},ong_ba:{type:String,default:"",
3
- maxlength:1024},ma_kho:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_bp:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_phi:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_hd:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_dt:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_nv:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_lo:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},han_sd:{type:Date},ma_tt1:{type:String,
4
- default:"",uppercase:!0,maxlength:32,trim:!0},ma_tt2:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_tt3:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_ca:{type:String,uppercase:!0,maxlength:32,trim:!0},ma_cp:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_sp:{type:String,default:"",uppercase:!0,maxlength:1024,trim:!0},ma_vt:{type:String,default:"",uppercase:!0,maxlength:1024,trim:!0},ma_dvt_sp:{type:String,maxlength:32,trim:!0},ma_tt1_sp:{type:String,default:"",
5
- uppercase:!0,maxlength:32,trim:!0},ma_tt2_sp:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_tt3_sp:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_cum_chi_tiet:{type:String,uppercase:!0,default:"",maxlength:32,trim:!0},ten_cum_chi_tiet:{type:String,default:"",maxlength:1024},ma_cong_doan:{type:String,uppercase:!0,default:"",maxlength:32,trim:!0},id_lenhsx:{type:String,maxlength:1024},id_link:String,ma_ct_link:String,so_ct_link:String,trang_thai:{type:String,maxlength:32},
6
- nh_dk:{type:Number,default:0},id_kbbtpb:{type:String,maxlength:1024},exfields:Schema.Types.Mixed,exfields_detail:Schema.Types.Mixed,flag:{type:String,maxlength:1024},gio:Number,ngay:Number,thang:Number,quy:Number,nam:Number,ma_kenh:String,ma_td1:Schema.Types.Mixed,ma_td2:Schema.Types.Mixed,ma_td3:Schema.Types.Mixed,ma_td4:Schema.Types.Mixed,ma_td5:Schema.Types.Mixed,ma_td6:Schema.Types.Mixed,ma_td7:Schema.Types.Mixed,ma_td8:Schema.Types.Mixed,ma_td9:Schema.Types.Mixed,pt_thanh_toan:String,pt_thanh_toan2:String,
7
- status:{type:Boolean,default:!0},date_created:{type:Date,default:Date.now},date_updated:{type:Date,default:Date.now},user_created:{type:String,default:""},user_updated:{type:String,default:""},id_client:String,listinfo_code:String},{toJSON:{virtuals:!0}});
8
- socaitmpSchema.pre("save",function($next$$){this.tien=this.ma_nt=="VND"?this.tien_nt=Math.roundBy(this.tien_nt,0):Math.roundBy(this.tien,0);let $ngay_ct$$=moment(this.ngay_ct);this.gio=$ngay_ct$$.get("hours");this.ngay=$ngay_ct$$.get("dates");this.quy=$ngay_ct$$.get("quarters");this.thang=$ngay_ct$$.get("months")+1;this.nam=$ngay_ct$$.get("year");this.ngay_ct=$ngay_ct$$.startOf("date").toDate();$next$$()});
9
- (global.configs||{}).createIndexes&&(socaitmpSchema.index({id_app:1}),socaitmpSchema.index({id_app:1,ma_dvcs:1}),socaitmpSchema.index({id_app:1,ma_ct:1,so_ct:1}),socaitmpSchema.index({id_app:1,ma_ct:1}),socaitmpSchema.index({id_app:1,ngay_ct:-1,ma_nt:1}),socaitmpSchema.index({id_app:1,so_ct:1,ngay_ct:-1}),socaitmpSchema.index({id_app:1,gio:1}),socaitmpSchema.index({id_app:1,ngay:1}),socaitmpSchema.index({id_app:1,thang:1}),socaitmpSchema.index({id_app:1,quy:1}),socaitmpSchema.index({id_app:1,nam:-1}),
10
- socaitmpSchema.index({id_ct:1}),socaitmpSchema.index({id_app:1,id_ct:1}),socaitmpSchema.index({id_app:1,ma_ct_goc:1,id_ct_goc:1}),socaitmpSchema.index({id_app:1,ngay_ct:-1,tk_no:1,tk_co:1,ma_bp:1}),socaitmpSchema.index({id_app:1,ngay_ct:-1,tk_no:1,tk_co:1,ma_phi:1}),socaitmpSchema.index({id_app:1,ngay_ct:-1,tk_no:1,tk_co:1,ma_hd:1}),socaitmpSchema.index({id_app:1,ngay_ct:-1,tk_no:1,tk_co:1,ma_dt:1}),socaitmpSchema.index({id_app:1,ngay_ct:-1,tk_no:1,tk_co:1,ma_nv:1}),socaitmpSchema.index({id_app:1,
11
- ngay_ct:-1,tk_no:1,tk_co:1,ma_sp:1}),socaitmpSchema.index({id_app:1,ngay_ct:-1,tk_no:1,tk_co:1,ma_kho:1,ma_vt:1}),socaitmpSchema.index({id_app:1,ngay_ct:-1,tk_no:1,tk_co:1,ma_kenh:1}),socaitmpSchema.index({id_app:1,ngay_ct:-1,tk_no:1,tk_co:1,ma_td1:1}),socaitmpSchema.index({id_app:1,ngay_ct:-1,tk_no:1,tk_co:1,ma_td2:1}),socaitmpSchema.index({id_app:1,ngay_ct:-1,tk_no:1,tk_co:1,ma_td3:1}),socaitmpSchema.index({id_app:1,ngay_ct:-1,tk_no:1,tk_co:1,ma_vt:1,ma_tt1:1,ma_tt2:1,ma_tt3:1,ma_lo:1,han_sd:-1}),
12
- socaitmpSchema.index({id_app:1,id_lenhsx:1}),socaitmpSchema.index({id_app:1,id_link:1}),socaitmpSchema.index({id_app:1,id_cs:1}),socaitmpSchema.index({id_app:1,id_cs_ck:1}),socaitmpSchema.index({id_app:1,id_ct:1,so_ct:-1,ngay_ct:-1,ma_kh_no:1,ma_kh_co:1,tk_no:1,tk_co:1}),socaitmpSchema.index({id_app:1,ngay_ct:-1,ma_kh_no:1,ma_kh_co:1,tk_no:1,tk_co:1}),socaitmpSchema.index({id_app:1,ngay_ct:-1,tk_no:1}),socaitmpSchema.index({id_app:1,ngay_ct:-1,tk_co:1}),socaitmpSchema.index({id_app:1,date_created:-1}));
13
- const model=mongoose.models.socaitmp||mongoose.model("socaitmp",socaitmpSchema);
14
- model.getArise=async($query$$,$options$$={fields:void 0})=>{let $condition$$={ngay_ct:{$gte:$query$$.tu_ngay,$lte:$query$$.den_ngay},id_app:$query$$.id_app};$query$$.ma_dvcs&&($condition$$.ma_dvcs=$query$$.ma_dvcs);$query$$.ma_bp&&($condition$$.ma_bp=$query$$.ma_bp);$query$$.ma_hd&&($condition$$.ma_hd=$query$$.ma_hd);$query$$.ma_dt&&($condition$$.ma_dt=$query$$.ma_dt);$query$$.ma_sp&&($condition$$.ma_sp=$query$$.ma_sp);$query$$.ma_nv&&($condition$$.ma_nv=$query$$.ma_nv);$query$$.ma_phi&&($condition$$.ma_phi=
15
- $query$$.ma_phi);$query$$.ma_kho&&($condition$$.ma_kho=$query$$.ma_kho);if($query$$.tk_no&&Array.isArray($query$$.tk_no)){var $tk_co_tk_no$$=$query$$.tk_no.reg();$condition$$.tk_no=$query$$.giam_tru_no?{$not:new RegExp($tk_co_tk_no$$)}:{$regex:$tk_co_tk_no$$,$options:"i"}}$query$$.tk_co&&Array.isArray($query$$.tk_co)&&($tk_co_tk_no$$=$query$$.tk_co.reg(),$condition$$.tk_co=$query$$.giam_tru_co&&$tk_co_tk_no$$?{$not:new RegExp($tk_co_tk_no$$)}:{$regex:$tk_co_tk_no$$,$options:"i"});return await model.find($condition$$,
16
- $options$$.fields).lean()};module.exports=model;
1
+ const _0x3bbe76=_0x18ec;function _0x18ec(_0x3b4e44,_0x387d4d){const _0x4c739f=_0x4c73();return _0x18ec=function(_0x18ec78,_0x2a8df9){_0x18ec78=_0x18ec78-0x8f;let _0x4cad96=_0x4c739f[_0x18ec78];if(_0x18ec['QaOEhr']===undefined){var _0x5d9616=function(_0x4b8a09){const _0x4da6e9='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xb2a825='',_0x40ddcb='';for(let _0x238b1c=0x0,_0x5961e7,_0x2a0424,_0x4fc630=0x0;_0x2a0424=_0x4b8a09['charAt'](_0x4fc630++);~_0x2a0424&&(_0x5961e7=_0x238b1c%0x4?_0x5961e7*0x40+_0x2a0424:_0x2a0424,_0x238b1c++%0x4)?_0xb2a825+=String['fromCharCode'](0xff&_0x5961e7>>(-0x2*_0x238b1c&0x6)):0x0){_0x2a0424=_0x4da6e9['indexOf'](_0x2a0424);}for(let _0xc3df71=0x0,_0x9e5798=_0xb2a825['length'];_0xc3df71<_0x9e5798;_0xc3df71++){_0x40ddcb+='%'+('00'+_0xb2a825['charCodeAt'](_0xc3df71)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x40ddcb);};_0x18ec['mzMOZK']=_0x5d9616,_0x3b4e44=arguments,_0x18ec['QaOEhr']=!![];}const _0x92c295=_0x4c739f[0x0],_0x106c2c=_0x18ec78+_0x92c295,_0x5b1419=_0x3b4e44[_0x106c2c];return!_0x5b1419?(_0x4cad96=_0x18ec['mzMOZK'](_0x4cad96),_0x3b4e44[_0x106c2c]=_0x4cad96):_0x4cad96=_0x5b1419,_0x4cad96;},_0x18ec(_0x3b4e44,_0x387d4d);}(function(_0x1cedf3,_0x3573d1){const _0x44dec7=_0x18ec,_0x509006=_0x1cedf3();while(!![]){try{const _0x48e475=-parseInt(_0x44dec7(0xbb))/0x1*(parseInt(_0x44dec7(0xd9))/0x2)+parseInt(_0x44dec7(0x9e))/0x3*(-parseInt(_0x44dec7(0xcc))/0x4)+parseInt(_0x44dec7(0x9f))/0x5*(-parseInt(_0x44dec7(0xdb))/0x6)+parseInt(_0x44dec7(0xb0))/0x7+parseInt(_0x44dec7(0xa2))/0x8*(-parseInt(_0x44dec7(0xd7))/0x9)+-parseInt(_0x44dec7(0xc7))/0xa*(-parseInt(_0x44dec7(0xa6))/0xb)+parseInt(_0x44dec7(0xac))/0xc;if(_0x48e475===_0x3573d1)break;else _0x509006['push'](_0x509006['shift']());}catch(_0x5232c7){_0x509006['push'](_0x509006['shift']());}}}(_0x4c73,0x4f350));const moment=require(_0x3bbe76(0xd1)),socaitmpSchema=new Schema({'id_app':{'type':String,'required':!![],'maxlength':0x400},'ma_dvcs':{'type':String,'required':!![],'maxlength':0x400},'id_ct':{'type':String,'required':!![],'maxlength':0x400},'ma_ct':{'type':String,'required':!![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_gd':{'type':String,'default':'0','maxlength':0x20,'trim':!![]},'ngay_ct':{'type':Date,'required':!![]},'so_ct':{'type':String,'required':!![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'ngay_hd':{'type':Date},'so_hd':{'type':String,'uppercase':!![],'maxlength':0x20,'trim':!![]},'tk_no':{'type':String,'required':!![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'tk_co':{'type':String,'required':!![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_kh_no':{'type':String,'uppercase':!![],'default':'','maxlength':0x20,'trim':!![]},'ma_kh_co':{'type':String,'uppercase':!![],'default':'','maxlength':0x20,'trim':!![]},'ma_nt':{'type':String,'default':_0x3bbe76(0xbf),'required':!![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'ty_gia':{'type':Number,'default':0x1},'tien_nt':{'type':Number,'default':0x0},'tien':{'type':Number,'default':0x0},'dien_giai':{'type':String,'default':'','maxlength':0x400},'ong_ba':{'type':String,'default':'','maxlength':0x400},'ma_kho':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_bp':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_phi':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_hd':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_dt':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_nv':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_lo':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'han_sd':{'type':Date},'ma_tt1':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_tt2':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_tt3':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_ca':{'type':String,'uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_cp':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_sp':{'type':String,'default':'','uppercase':!![],'maxlength':0x400,'trim':!![]},'ma_vt':{'type':String,'default':'','uppercase':!![],'maxlength':0x400,'trim':!![]},'ma_dvt_sp':{'type':String,'maxlength':0x20,'trim':!![]},'ma_tt1_sp':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_tt2_sp':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_tt3_sp':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_cum_chi_tiet':{'type':String,'uppercase':!![],'default':'','maxlength':0x20,'trim':!![]},'ten_cum_chi_tiet':{'type':String,'default':'','maxlength':0x400},'ma_cong_doan':{'type':String,'uppercase':!![],'default':'','maxlength':0x20,'trim':!![]},'id_lenhsx':{'type':String,'maxlength':0x400},'id_link':String,'ma_ct_link':String,'so_ct_link':String,'trang_thai':{'type':String,'maxlength':0x20},'nh_dk':{'type':Number,'default':0x0},'id_kbbtpb':{'type':String,'maxlength':0x400},'exfields':Schema[_0x3bbe76(0xcb)][_0x3bbe76(0xaf)],'exfields_detail':Schema[_0x3bbe76(0xcb)][_0x3bbe76(0xaf)],'flag':{'type':String,'maxlength':0x400},'gio':Number,'ngay':Number,'thang':Number,'quy':Number,'nam':Number,'ma_kenh':String,'ma_td1':Schema['Types']['Mixed'],'ma_td2':Schema[_0x3bbe76(0xcb)]['Mixed'],'ma_td3':Schema[_0x3bbe76(0xcb)][_0x3bbe76(0xaf)],'ma_td4':Schema[_0x3bbe76(0xcb)][_0x3bbe76(0xaf)],'ma_td5':Schema[_0x3bbe76(0xcb)][_0x3bbe76(0xaf)],'ma_td6':Schema[_0x3bbe76(0xcb)]['Mixed'],'ma_td7':Schema[_0x3bbe76(0xcb)][_0x3bbe76(0xaf)],'ma_td8':Schema['Types'][_0x3bbe76(0xaf)],'ma_td9':Schema[_0x3bbe76(0xcb)][_0x3bbe76(0xaf)],'pt_thanh_toan':String,'pt_thanh_toan2':String,'status':{'type':Boolean,'default':!![]},'date_created':{'type':Date,'default':Date[_0x3bbe76(0xa4)]},'date_updated':{'type':Date,'default':Date[_0x3bbe76(0xa4)]},'user_created':{'type':String,'default':''},'user_updated':{'type':String,'default':''},'id_client':String,'listinfo_code':String},{'toJSON':{'virtuals':!![]}});function _0x4c73(){const _0x4a3a74=['nta0mJHKufztDvm','B2rUq0C','zLfIEum','B3DxEuO','zgvUx25NyxK','Bw9Tzw50','rxrjvui','BMDHEq','BwfFCgHP','zxHWB3j0CW','qNPHvNu','mJqWmJCZowfABKjfqG','Chr3s0i','nfrWr2HpEG','DKTrr1O','nLfRuvP6vq','Bw9KzwW','mhWYn3WYmhWXmNW0Fdv8mtf8mtL8m3WZnhWZm3WYmxWYFdi0Fde3FdmYFdeZFdf8mJH8mtH8oxWXnhWYm3WZmhW4Fdi5FdiYFdeWFdD8nNWZmxWXnxWXnNWYnxWYnG','C29JywL0Bxa','zgf0zxm','DgTFBM8','DhvFBMDHEq','quHizM8','Ag91CNm','CMvN','C3rHCNrpzG','ANPorw8','uKTitLC','BLzKr2m','AxnbCNjHEq','uu1vwK4','Bw9UDgHZ','mte0vuPmwLPb','mJmWmZuXnuvrwgnMBq','z2LV','DgLLBG','oen2renlEq','AwrFyxbW','BM93','teXlv0y','ndiXnJKXnKX4tgfoCG','CM91BMrcEq','t1bquhe','DKPrDLK','BwfFyNa','Dg9eyxrL','odG4ntm4og1tv0H6Ca','Aw5KzxG','Ce5RA1G','twL4zwq','mZKWnZa1n3P2zuXUwq','C1P6v0m','BwfFAgq','EfvLAha','BwfFBNy','C3bSAxq','y3jLyxrLsw5KzxHLCW','yLPPChK','BwfFC3a','BwfFBNq','z2v0','nZuZotjPru1LAwK','z2v0qxjPC2u','zgf0zq','Cxv5','vK5e','CxvHCNrLCNm','BwfFzhq','DgLLBL9UDa','BwfFA2HV','y29UzMLNCW','zMLLBgrZ','vxPTwxy','mtb2CeTcq2u','AMXju3i','DgTFy28','DgHHBMC','vhLWzxm'];_0x4c73=function(){return _0x4a3a74;};return _0x4c73();}socaitmpSchema['pre']('save',function(_0x404cb3){const _0x4d429b=_0x3bbe76,_0x29fea9={'owWyJ':function(_0x30d7e6,_0x98e438){return _0x30d7e6==_0x98e438;},'vKQGZ':function(_0x7eda6,_0x503763){return _0x7eda6(_0x503763);},'fQbyC':_0x4d429b(0x95),'jlISr':_0x4d429b(0x91),'BzaVu':_0x4d429b(0xc0),'UzmYv':function(_0x45fa32,_0x4605dd){return _0x45fa32+_0x4605dd;},'hFief':_0x4d429b(0x9d),'GxmHR':'year','iCPlV':_0x4d429b(0xbd),'ptwKB':function(_0x52ac5e){return _0x52ac5e();}},_0x3cd0af=this;_0x29fea9[_0x4d429b(0xcf)](_0x3cd0af[_0x4d429b(0xb9)],_0x4d429b(0xbf))?(_0x3cd0af[_0x4d429b(0xc2)]=Math[_0x4d429b(0xa7)](_0x3cd0af['tien_nt'],0x0),_0x3cd0af[_0x4d429b(0xa1)]=_0x3cd0af[_0x4d429b(0xc2)]):_0x3cd0af[_0x4d429b(0xa1)]=Math['roundBy'](_0x3cd0af[_0x4d429b(0xa1)],0x0);let _0xb2430a=_0x29fea9[_0x4d429b(0xda)](moment,_0x3cd0af['ngay_ct']);_0x3cd0af[_0x4d429b(0xa0)]=_0xb2430a[_0x4d429b(0xba)](_0x29fea9[_0x4d429b(0xce)]),_0x3cd0af[_0x4d429b(0xd3)]=_0xb2430a['get'](_0x29fea9[_0x4d429b(0xc8)]),_0x3cd0af[_0x4d429b(0xbe)]=_0xb2430a[_0x4d429b(0xba)](_0x29fea9[_0x4d429b(0xd6)]),_0x3cd0af[_0x4d429b(0xca)]=_0x29fea9[_0x4d429b(0xc6)](_0xb2430a[_0x4d429b(0xba)](_0x29fea9['hFief']),0x1),_0x3cd0af['nam']=_0xb2430a[_0x4d429b(0xba)](_0x29fea9['GxmHR']),_0x3cd0af['ngay_ct']=_0xb2430a[_0x4d429b(0x97)](_0x29fea9['iCPlV'])[_0x4d429b(0xab)](),_0x29fea9[_0x4d429b(0xd8)](_0x404cb3);});if((global[_0x3bbe76(0xc4)]||{})[_0x3bbe76(0xb6)]){const DKjRXQ=_0x3bbe76(0x8f)[_0x3bbe76(0xb5)]('|');let CNiqba=0x0;while(!![]){switch(DKjRXQ[CNiqba++]){case'0':socaitmpSchema[_0x3bbe76(0xad)]({'id_app':0x1});continue;case'1':socaitmpSchema[_0x3bbe76(0xad)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_dt':0x1});continue;case'2':socaitmpSchema[_0x3bbe76(0xad)]({'id_app':0x1,'id_ct':0x1});continue;case'3':socaitmpSchema[_0x3bbe76(0xad)]({'id_app':0x1,'thang':0x1});continue;case'4':socaitmpSchema['index']({'id_app':0x1,'ngay_ct':-0x1,'ma_nt':0x1});continue;case'5':socaitmpSchema['index']({'id_app':0x1,'so_ct':0x1,'ngay_ct':-0x1});continue;case'6':socaitmpSchema[_0x3bbe76(0xad)]({'id_app':0x1,'id_cs_ck':0x1});continue;case'7':socaitmpSchema['index']({'id_app':0x1,'id_cs':0x1});continue;case'8':socaitmpSchema[_0x3bbe76(0xad)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_td3':0x1});continue;case'9':socaitmpSchema[_0x3bbe76(0xad)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_kho':0x1,'ma_vt':0x1});continue;case'10':socaitmpSchema[_0x3bbe76(0xad)]({'id_app':0x1,'id_link':0x1});continue;case'11':socaitmpSchema[_0x3bbe76(0xad)]({'id_app':0x1,'gio':0x1});continue;case'12':socaitmpSchema[_0x3bbe76(0xad)]({'id_app':0x1,'ma_ct':0x1});continue;case'13':socaitmpSchema['index']({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_hd':0x1});continue;case'14':socaitmpSchema[_0x3bbe76(0xad)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_kenh':0x1});continue;case'15':socaitmpSchema[_0x3bbe76(0xad)]({'id_app':0x1,'ngay_ct':-0x1,'ma_kh_no':0x1,'ma_kh_co':0x1,'tk_no':0x1,'tk_co':0x1});continue;case'16':socaitmpSchema[_0x3bbe76(0xad)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1});continue;case'17':socaitmpSchema['index']({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_bp':0x1});continue;case'18':socaitmpSchema[_0x3bbe76(0xad)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_sp':0x1});continue;case'19':socaitmpSchema[_0x3bbe76(0xad)]({'id_app':0x1,'ngay':0x1});continue;case'20':socaitmpSchema[_0x3bbe76(0xad)]({'id_app':0x1,'ma_ct':0x1,'so_ct':0x1});continue;case'21':socaitmpSchema['index']({'id_ct':0x1});continue;case'22':socaitmpSchema[_0x3bbe76(0xad)]({'id_app':0x1,'id_lenhsx':0x1});continue;case'23':socaitmpSchema[_0x3bbe76(0xad)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_td1':0x1});continue;case'24':socaitmpSchema[_0x3bbe76(0xad)]({'id_app':0x1,'ma_ct_goc':0x1,'id_ct_goc':0x1});continue;case'25':socaitmpSchema[_0x3bbe76(0xad)]({'id_app':0x1,'ngay_ct':-0x1,'tk_co':0x1});continue;case'26':socaitmpSchema[_0x3bbe76(0xad)]({'id_app':0x1,'date_created':-0x1});continue;case'27':socaitmpSchema[_0x3bbe76(0xad)]({'id_app':0x1,'ma_dvcs':0x1});continue;case'28':socaitmpSchema['index']({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_nv':0x1});continue;case'29':socaitmpSchema[_0x3bbe76(0xad)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_vt':0x1,'ma_tt1':0x1,'ma_tt2':0x1,'ma_tt3':0x1,'ma_lo':0x1,'han_sd':-0x1});continue;case'30':socaitmpSchema[_0x3bbe76(0xad)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_td2':0x1});continue;case'31':socaitmpSchema[_0x3bbe76(0xad)]({'id_app':0x1,'id_ct':0x1,'so_ct':-0x1,'ngay_ct':-0x1,'ma_kh_no':0x1,'ma_kh_co':0x1,'tk_no':0x1,'tk_co':0x1});continue;case'32':socaitmpSchema[_0x3bbe76(0xad)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_phi':0x1});continue;case'33':socaitmpSchema['index']({'id_app':0x1,'nam':-0x1});continue;case'34':socaitmpSchema[_0x3bbe76(0xad)]({'id_app':0x1,'quy':0x1});continue;}break;}}const model=mongoose['models'][_0x3bbe76(0x90)]||mongoose[_0x3bbe76(0xdc)](_0x3bbe76(0x90),socaitmpSchema);model[_0x3bbe76(0xbc)]=async(_0xbf50a9,_0x52a1b8={'fields':undefined})=>{const _0x2f6f5a=_0x3bbe76,_0x1c26e2={'nVdGc':function(_0x15d7e6,_0x1baf04){return _0x15d7e6===_0x1baf04;},'pNkkX':'YdoFM','xUehp':'HyXHy','RKHNW':function(_0x161343,_0x25758f){return _0x161343!==_0x25758f;},'EtIUB':_0x2f6f5a(0xcd),'bZipy':function(_0x27ef3c,_0x3139a5){return _0x27ef3c===_0x3139a5;},'sZzWC':_0x2f6f5a(0xa9),'cHBBl':'RUMtM','feKtl':'tiFOk','LLKWF':'IKrXh','jzNEo':_0x2f6f5a(0x94)};let _0x1eadf6={'ngay_ct':{'$gte':_0xbf50a9[_0x2f6f5a(0x93)],'$lte':_0xbf50a9[_0x2f6f5a(0xd0)]},'id_app':_0xbf50a9[_0x2f6f5a(0xa3)]};_0xbf50a9['ma_dvcs']&&(_0x1eadf6['ma_dvcs']=_0xbf50a9['ma_dvcs']);_0xbf50a9[_0x2f6f5a(0xaa)]&&(_0x1c26e2[_0x2f6f5a(0x9a)](_0x1c26e2[_0x2f6f5a(0xae)],_0x1c26e2[_0x2f6f5a(0xb3)])?(_0x10453f[_0x2f6f5a(0xc2)]=_0x21f1f5[_0x2f6f5a(0xa7)](_0x50eb05[_0x2f6f5a(0xc2)],0x0),_0x3606a9[_0x2f6f5a(0xa1)]=_0x77c024['tien_nt']):_0x1eadf6[_0x2f6f5a(0xaa)]=_0xbf50a9[_0x2f6f5a(0xaa)]);_0xbf50a9[_0x2f6f5a(0xb2)]&&(_0x1c26e2['RKHNW'](_0x2f6f5a(0xa8),_0x2f6f5a(0x9c))?_0x1eadf6['ma_hd']=_0xbf50a9['ma_hd']:_0x494cc7[_0x2f6f5a(0xc9)]={'$regex':_0x15e85e,'$options':'i'});if(_0xbf50a9[_0x2f6f5a(0xc1)]){if(_0x1c26e2[_0x2f6f5a(0xd2)]===_0x1c26e2['EtIUB'])_0x1eadf6[_0x2f6f5a(0xc1)]=_0xbf50a9[_0x2f6f5a(0xc1)];else{let _0x39d4b7=_0xbfa02d['tk_co'][_0x2f6f5a(0x96)]();_0x3615a4['giam_tru_co']&&_0x39d4b7?_0x4efdac[_0x2f6f5a(0xc9)]={'$not':new _0x32609d(_0x39d4b7)}:_0x5c6247[_0x2f6f5a(0xc9)]={'$regex':_0x39d4b7,'$options':'i'};}}_0xbf50a9[_0x2f6f5a(0xb8)]&&(_0x1eadf6[_0x2f6f5a(0xb8)]=_0xbf50a9[_0x2f6f5a(0xb8)]);_0xbf50a9[_0x2f6f5a(0xb4)]&&(_0x1eadf6['ma_nv']=_0xbf50a9[_0x2f6f5a(0xb4)]);_0xbf50a9[_0x2f6f5a(0xd4)]&&(_0x1eadf6[_0x2f6f5a(0xd4)]=_0xbf50a9[_0x2f6f5a(0xd4)]);_0xbf50a9[_0x2f6f5a(0xc3)]&&(_0x1c26e2[_0x2f6f5a(0xb7)](_0x1c26e2[_0x2f6f5a(0xb1)],_0x1c26e2['cHBBl'])?_0x3d4a86[_0x2f6f5a(0xd4)]=_0x1d2916[_0x2f6f5a(0xd4)]:_0x1eadf6[_0x2f6f5a(0xc3)]=_0xbf50a9['ma_kho']);if(_0xbf50a9[_0x2f6f5a(0x92)]&&Array[_0x2f6f5a(0x9b)](_0xbf50a9['tk_no'])){if(_0x1c26e2[_0x2f6f5a(0x99)](_0x1c26e2['feKtl'],_0x1c26e2['feKtl']))_0x5bf477[_0x2f6f5a(0xc9)]={'$not':new _0x4336d7(_0x5eaf7d)};else{let _0x275f93=_0xbf50a9[_0x2f6f5a(0x92)][_0x2f6f5a(0x96)]();_0xbf50a9['giam_tru_no']?_0x1eadf6['tk_no']={'$not':new RegExp(_0x275f93)}:_0x1eadf6[_0x2f6f5a(0x92)]={'$regex':_0x275f93,'$options':'i'};}}if(_0xbf50a9[_0x2f6f5a(0xc9)]&&Array[_0x2f6f5a(0x9b)](_0xbf50a9[_0x2f6f5a(0xc9)])){let _0x482e57=_0xbf50a9[_0x2f6f5a(0xc9)][_0x2f6f5a(0x96)]();_0xbf50a9['giam_tru_co']&&_0x482e57?_0x1c26e2[_0x2f6f5a(0x99)](_0x1c26e2[_0x2f6f5a(0xa5)],_0x1c26e2[_0x2f6f5a(0x98)])?_0x1eadf6[_0x2f6f5a(0xc9)]={'$not':new RegExp(_0x482e57)}:_0x5880ca[_0x2f6f5a(0xb2)]=_0x56fea6['ma_hd']:_0x1eadf6[_0x2f6f5a(0xc9)]={'$regex':_0x482e57,'$options':'i'};}return await model['find'](_0x1eadf6,_0x52a1b8[_0x2f6f5a(0xc5)])['lean']();},module[_0x3bbe76(0xd5)]=model;
@@ -1,4 +1 @@
1
- const socaittSchema=new Schema({id_app:{type:String,required:!1,maxlength:1024},ma_dvcs:{type:String,required:!1,maxlength:1024},ma_ct:{type:String,required:!1,uppercase:!0,maxlength:32,trim:!0},ma_gd:{type:String,default:"0",maxlength:32,trim:!0},ngay_ct:{type:Date,required:!1},tk_no:{type:String,required:!1,uppercase:!0,maxlength:32,trim:!0},tk_co:{type:String,required:!1,uppercase:!0,maxlength:32,trim:!0},ma_nt:{type:String,default:"VND",required:!1,uppercase:!0,maxlength:32,trim:!0},ty_gia:{type:Number,
2
- default:1},tien_nt:{type:Number,default:0},tien:{type:Number,default:0},ma_bp:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_phi:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_hd:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_dt:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_nv:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},id_client:String,listinfo_code:String},{toJSON:{virtuals:!0}});
3
- (global.configs||{}).createIndexes&&(socaittSchema.index({id_app:1}),socaittSchema.index({id_app:1,ma_dvcs:1}),socaittSchema.index({id_app:1,ma_ct:1}),socaittSchema.index({id_app:1,ngay_ct:-1,ma_nt:1}),socaittSchema.index({id_app:1,ngay_ct:-1,tk_no:1,tk_co:1,ma_bp:1}),socaittSchema.index({id_app:1,ngay_ct:-1,tk_no:1,tk_co:1,ma_phi:1}),socaittSchema.index({id_app:1,ngay_ct:-1,tk_no:1,tk_co:1,ma_hd:1}),socaittSchema.index({id_app:1,ngay_ct:-1,tk_no:1,tk_co:1,ma_dt:1}),socaittSchema.index({id_app:1,
4
- ngay_ct:-1,tk_no:1,tk_co:1,ma_nv:1}),socaittSchema.index({id_app:1,ngay_ct:-1,tk_no:1}),socaittSchema.index({id_app:1,ngay_ct:-1,tk_co:1}));const model=mongoose.models.socaitt||mongoose.model("socaitt",socaittSchema);if((global.configs||{}).createIndexes)model.on("index",async function($err$$){$err$$?console.error("socaitt index error",$err$$):console.info("socaitt indexing complete")});module.exports=model;
1
+ const _0x7453b1=_0x4d6c;(function(_0x4d94ad,_0x590301){const _0x51b4f5=_0x4d6c,_0x3ce2d2=_0x4d94ad();while(!![]){try{const _0x1dc92e=-parseInt(_0x51b4f5(0x75))/0x1+parseInt(_0x51b4f5(0x89))/0x2+-parseInt(_0x51b4f5(0x85))/0x3*(parseInt(_0x51b4f5(0x86))/0x4)+-parseInt(_0x51b4f5(0x80))/0x5+-parseInt(_0x51b4f5(0x82))/0x6+parseInt(_0x51b4f5(0x81))/0x7*(parseInt(_0x51b4f5(0x7d))/0x8)+parseInt(_0x51b4f5(0x77))/0x9;if(_0x1dc92e===_0x590301)break;else _0x3ce2d2['push'](_0x3ce2d2['shift']());}catch(_0x205c6d){_0x3ce2d2['push'](_0x3ce2d2['shift']());}}}(_0x3aab,0x2fd6b));const socaittSchema=new Schema({'id_app':{'type':String,'required':![],'maxlength':0x400},'ma_dvcs':{'type':String,'required':![],'maxlength':0x400},'ma_ct':{'type':String,'required':![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_gd':{'type':String,'default':'0','maxlength':0x20,'trim':!![]},'ngay_ct':{'type':Date,'required':![]},'tk_no':{'type':String,'required':![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'tk_co':{'type':String,'required':![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_nt':{'type':String,'default':_0x7453b1(0x87),'required':![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'ty_gia':{'type':Number,'default':0x1},'tien_nt':{'type':Number,'default':0x0},'tien':{'type':Number,'default':0x0},'ma_bp':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_phi':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_hd':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_dt':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_nv':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'id_client':String,'listinfo_code':String},{'toJSON':{'virtuals':!![]}});if((global[_0x7453b1(0x71)]||{})[_0x7453b1(0x7b)]){const eyUAIP=_0x7453b1(0x83)[_0x7453b1(0x7c)]('|');let OIzeQY=0x0;while(!![]){switch(eyUAIP[OIzeQY++]){case'0':socaittSchema[_0x7453b1(0x88)]({'id_app':0x1,'ma_ct':0x1});continue;case'1':socaittSchema[_0x7453b1(0x88)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_nv':0x1});continue;case'2':socaittSchema[_0x7453b1(0x88)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_hd':0x1});continue;case'3':socaittSchema[_0x7453b1(0x88)]({'id_app':0x1,'ma_dvcs':0x1});continue;case'4':socaittSchema[_0x7453b1(0x88)]({'id_app':0x1,'ngay_ct':-0x1,'ma_nt':0x1});continue;case'5':socaittSchema[_0x7453b1(0x88)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1});continue;case'6':socaittSchema['index']({'id_app':0x1});continue;case'7':socaittSchema['index']({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_dt':0x1});continue;case'8':socaittSchema[_0x7453b1(0x88)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_bp':0x1});continue;case'9':socaittSchema[_0x7453b1(0x88)]({'id_app':0x1,'ngay_ct':-0x1,'tk_no':0x1,'tk_co':0x1,'ma_phi':0x1});continue;case'10':socaittSchema['index']({'id_app':0x1,'ngay_ct':-0x1,'tk_co':0x1});continue;}break;}}function _0x4d6c(_0x37b597,_0x27b170){const _0x3aab86=_0x3aab();return _0x4d6c=function(_0x4d6c82,_0x4754e2){_0x4d6c82=_0x4d6c82-0x70;let _0x305618=_0x3aab86[_0x4d6c82];if(_0x4d6c['cLhnOb']===undefined){var _0x446081=function(_0x267c6f){const _0x392fd9='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x41bf93='',_0x18d1f8='';for(let _0x273bdc=0x0,_0x1da574,_0x20ac3d,_0x4720d9=0x0;_0x20ac3d=_0x267c6f['charAt'](_0x4720d9++);~_0x20ac3d&&(_0x1da574=_0x273bdc%0x4?_0x1da574*0x40+_0x20ac3d:_0x20ac3d,_0x273bdc++%0x4)?_0x41bf93+=String['fromCharCode'](0xff&_0x1da574>>(-0x2*_0x273bdc&0x6)):0x0){_0x20ac3d=_0x392fd9['indexOf'](_0x20ac3d);}for(let _0x15e881=0x0,_0x574dbb=_0x41bf93['length'];_0x15e881<_0x574dbb;_0x15e881++){_0x18d1f8+='%'+('00'+_0x41bf93['charCodeAt'](_0x15e881)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x18d1f8);};_0x4d6c['wlFDRE']=_0x446081,_0x37b597=arguments,_0x4d6c['cLhnOb']=!![];}const _0x2fee4d=_0x3aab86[0x0],_0xbddce4=_0x4d6c82+_0x2fee4d,_0x2fa4a3=_0x37b597[_0xbddce4];return!_0x2fa4a3?(_0x305618=_0x4d6c['wlFDRE'](_0x305618),_0x37b597[_0xbddce4]=_0x305618):_0x305618=_0x2fa4a3,_0x305618;},_0x4d6c(_0x37b597,_0x27b170);}const model=mongoose[_0x7453b1(0x7a)][_0x7453b1(0x84)]||mongoose[_0x7453b1(0x79)]('socaitt',socaittSchema);function _0x3aab(){const _0x1e3817=['mJGWyM9KCKvh','zxHWB3j0CW','C29JywL0DcbPBMrLEgLUzYbJB21WBgv0zq','mtCZoty5mfnABMXszq','ntKZmtfSDKTAre4','mtG2mZe1mhPwy0LTBW','nNWZFdb8nhW4FdL8mNW3Fdf8nxWXma','C29JywL0Da','mtuWnMjAu0XrvG','mtC4ngHwEM9Uva','vK5e','Aw5KzxG','nZu2mZeYteDxwvDu','uKrkBeC','ugTvAvy','y29UzMLNCW','tKHPvfC','EunAwhy','tMn5C1a','mtKYmJiXC3Hxu1bJ','zxjYB3i','ntm2mJmWognSwhrHza','Aw5MBW','Bw9KzwW','Bw9KzwXZ','y3jLyxrLsw5KzxHLCW','C3bSAxq'];_0x3aab=function(){return _0x1e3817;};return _0x3aab();}(global[_0x7453b1(0x71)]||{})['createIndexes']&&model['on'](_0x7453b1(0x88),async function(_0x24880b){const _0x136e2f=_0x7453b1,_0x1e8ac6={'PkUiV':'socaitt\x20index\x20error','VJsuJ':function(_0x42f0ce,_0x1b5364){return _0x42f0ce===_0x1b5364;},'RDJlG':_0x136e2f(0x72),'yCZXv':_0x136e2f(0x7f)};_0x24880b?_0x1e8ac6['VJsuJ'](_0x136e2f(0x74),_0x1e8ac6[_0x136e2f(0x8a)])?_0x1ee2b4[_0x136e2f(0x76)](_0x1e8ac6['PkUiV'],_0x162ed2):console[_0x136e2f(0x76)](_0x1e8ac6[_0x136e2f(0x70)],_0x24880b):console[_0x136e2f(0x78)](_0x1e8ac6[_0x136e2f(0x73)]);});module[_0x7453b1(0x7e)]=model;
@@ -1,4 +1 @@
1
- const sodiemthuongSchema=new global.Schema({id_app:{type:String,required:!0,maxlength:1024},id_ct:{type:String,required:!0,maxlength:1024},ma_dvcs:{type:String,required:!0,maxlength:1024},ma_ct:{type:String,required:!0,uppercase:!0,maxlength:32,trim:!0},so_ct:{type:String,required:!0,uppercase:!0,trim:!0,maxlength:32},ngay_ct:{type:Date,default:Date.now,required:!0},ma_kh:{type:String,maxlength:32,trim:!0},sl_nhan:{type:Number,default:0},sl_dung:{type:Number,default:0},dien_giai:{type:String,default:"",
2
- maxlength:1024},exfields:global.Schema.Types.Mixed,trang_thai:{type:String,maxlength:32},status:{type:Boolean,default:!0},date_created:{type:Date,default:Date.now},date_updated:{type:Date,default:Date.now},user_created:{type:String,default:""},user_updated:{type:String,default:""},visible_to:{type:Number,default:0},visible_to_users:[String],update_right:[String],delete_right:[String]});
3
- (global.configs||{}).createIndexes&&(sodiemthuongSchema.index({id_app:1,ma_dvcs:1,so_ct:-1,ngay_ct:-1}),sodiemthuongSchema.index({ma_ct:1}),sodiemthuongSchema.index({trang_thai:1}),sodiemthuongSchema.index({ma_kh:1}),sodiemthuongSchema.index({user_created:1,date_created:-1}),sodiemthuongSchema.index({date_updated:-1}),sodiemthuongSchema.index({status:1}),sodiemthuongSchema.index({user_created:1,visible_to:1,visible_to_users:1}));
4
- const model=global.mongoose.models.sodiemthuong||global.mongoose.model("sodiemthuong",sodiemthuongSchema);model.getBalance=async($id_app$$,$ma_kh$$)=>(await model.find({id_app:$id_app$$,ma_kh:$ma_kh$$})).map($s$$=>($s$$.sl_nhan||0)-($s$$.sl_dung||0)).reduce(($a$$,$b$$)=>$a$$+$b$$,0);module.exports=model;
1
+ const _0x307e91=_0x2d29;(function(_0x5b31c4,_0x57c58){const _0x1bd9f4=_0x2d29,_0x204cec=_0x5b31c4();while(!![]){try{const _0x1f24f6=parseInt(_0x1bd9f4(0x195))/0x1+-parseInt(_0x1bd9f4(0x187))/0x2*(-parseInt(_0x1bd9f4(0x18e))/0x3)+-parseInt(_0x1bd9f4(0x189))/0x4+parseInt(_0x1bd9f4(0x194))/0x5+-parseInt(_0x1bd9f4(0x183))/0x6+-parseInt(_0x1bd9f4(0x197))/0x7*(-parseInt(_0x1bd9f4(0x190))/0x8)+-parseInt(_0x1bd9f4(0x18a))/0x9;if(_0x1f24f6===_0x57c58)break;else _0x204cec['push'](_0x204cec['shift']());}catch(_0x43e901){_0x204cec['push'](_0x204cec['shift']());}}}(_0x1be6,0x30638));function _0x1be6(){const _0x24e5ab=['Aw5KzxG','mtC5mdG4tu9ly0Ph','zxHWB3j0CW','ndu4oduWEKrftLLZ','C2XFzhvUzW','zMLUza','BM93','odm2nMnHqw5Wyq','y29UzMLNCW','nti2ntq4uxvtr2PT','mJG0otG3n2fes2XkuW','C29KAwvTDgH1B25N','twL4zwq','u2nOzw1H','mJfYq25gwNa','z2v0qMfSyw5Jzq','otzjsKrnt2C','y3jLyxrLsw5KzxHLCW','Bw9KzwXZ','Bw9Uz29VC2u','nJyYntyWtwngCu11','mJu0mty0Ae9xvuL4'];_0x1be6=function(){return _0x24e5ab;};return _0x1be6();}const sodiemthuongSchema=new global['Schema']({'id_app':{'type':String,'required':!![],'maxlength':0x400},'id_ct':{'type':String,'required':!![],'maxlength':0x400},'ma_dvcs':{'type':String,'required':!![],'maxlength':0x400},'ma_ct':{'type':String,'required':!![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'so_ct':{'type':String,'required':!![],'uppercase':!![],'trim':!![],'maxlength':0x20},'ngay_ct':{'type':Date,'default':Date['now'],'required':!![]},'ma_kh':{'type':String,'maxlength':0x20,'trim':!![]},'sl_nhan':{'type':Number,'default':0x0},'sl_dung':{'type':Number,'default':0x0},'dien_giai':{'type':String,'default':'','maxlength':0x400},'exfields':global[_0x307e91(0x18d)]['Types'][_0x307e91(0x18c)],'trang_thai':{'type':String,'maxlength':0x20},'status':{'type':Boolean,'default':!![]},'date_created':{'type':Date,'default':Date['now']},'date_updated':{'type':Date,'default':Date[_0x307e91(0x186)]},'user_created':{'type':String,'default':''},'user_updated':{'type':String,'default':''},'visible_to':{'type':Number,'default':0x0},'visible_to_users':[String],'update_right':[String],'delete_right':[String]});function _0x2d29(_0xd5e859,_0x46660a){const _0x1be68c=_0x1be6();return _0x2d29=function(_0x2d290d,_0x2d5d5b){_0x2d290d=_0x2d290d-0x183;let _0x415d25=_0x1be68c[_0x2d290d];if(_0x2d29['QmOEMU']===undefined){var _0x59556f=function(_0x544548){const _0x4829e6='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2fc5bd='',_0x2d60ac='';for(let _0x37ef24=0x0,_0x495741,_0x35a72a,_0x24b3c8=0x0;_0x35a72a=_0x544548['charAt'](_0x24b3c8++);~_0x35a72a&&(_0x495741=_0x37ef24%0x4?_0x495741*0x40+_0x35a72a:_0x35a72a,_0x37ef24++%0x4)?_0x2fc5bd+=String['fromCharCode'](0xff&_0x495741>>(-0x2*_0x37ef24&0x6)):0x0){_0x35a72a=_0x4829e6['indexOf'](_0x35a72a);}for(let _0x17a285=0x0,_0x366524=_0x2fc5bd['length'];_0x17a285<_0x366524;_0x17a285++){_0x2d60ac+='%'+('00'+_0x2fc5bd['charCodeAt'](_0x17a285)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2d60ac);};_0x2d29['bUhFfp']=_0x59556f,_0xd5e859=arguments,_0x2d29['QmOEMU']=!![];}const _0x3eb8a8=_0x1be68c[0x0],_0x4b26ad=_0x2d290d+_0x3eb8a8,_0x528d37=_0xd5e859[_0x4b26ad];return!_0x528d37?(_0x415d25=_0x2d29['bUhFfp'](_0x415d25),_0xd5e859[_0x4b26ad]=_0x415d25):_0x415d25=_0x528d37,_0x415d25;},_0x2d29(_0xd5e859,_0x46660a);}(global[_0x307e91(0x188)]||{})[_0x307e91(0x191)]&&(sodiemthuongSchema['index']({'id_app':0x1,'ma_dvcs':0x1,'so_ct':-0x1,'ngay_ct':-0x1}),sodiemthuongSchema['index']({'ma_ct':0x1}),sodiemthuongSchema[_0x307e91(0x196)]({'trang_thai':0x1}),sodiemthuongSchema[_0x307e91(0x196)]({'ma_kh':0x1}),sodiemthuongSchema[_0x307e91(0x196)]({'user_created':0x1,'date_created':-0x1}),sodiemthuongSchema['index']({'date_updated':-0x1}),sodiemthuongSchema[_0x307e91(0x196)]({'status':0x1}),sodiemthuongSchema[_0x307e91(0x196)]({'user_created':0x1,'visible_to':0x1,'visible_to_users':0x1}));const model=global[_0x307e91(0x193)][_0x307e91(0x192)][_0x307e91(0x18b)]||global[_0x307e91(0x193)]['model'](_0x307e91(0x18b),sodiemthuongSchema);model[_0x307e91(0x18f)]=async(_0x3499d6,_0x41cd46)=>{const _0x4c3565=_0x307e91,_0x671970={'id_app':_0x3499d6,'ma_kh':_0x41cd46};let _0xa4df16=await model[_0x4c3565(0x185)](_0x671970);return _0xa4df16['map'](_0x254beb=>(_0x254beb['sl_nhan']||0x0)-(_0x254beb[_0x4c3565(0x184)]||0x0))['reduce']((_0x362856,_0x39a07d)=>_0x362856+_0x39a07d,0x0);},module[_0x307e91(0x198)]=model;
@@ -1,28 +1 @@
1
- const moment=require("moment"),{createSokhoTC}=require("../libs/utils"),{onAfterCommit,getCurrentSession,getCurrentStore}=require("../libs/sessionContext"),sokhoSchema=new Schema({id_app:{type:String,required:!0,maxlength:1024},ma_dvcs:{type:String,required:!0,maxlength:1024},id_ct:{type:String,required:!0,maxlength:1024},ma_ct:{type:String,required:!0,uppercase:!0,maxlength:32,trim:!0},ma_gd:{type:String,default:"0",maxlength:32,trim:!0},ngay_ct:{type:Date,required:!0},ngay_ct_full:Date,so_ct:{type:String,
2
- required:!0,uppercase:!0,maxlength:32,trim:!0},nxt:{type:Number,required:!0},ma_nt:{type:String,default:"VND",required:!0,uppercase:!0,maxlength:32,trim:!0},ty_gia:{type:Number,default:1},ma_vt:{type:String,required:!0,uppercase:!0,maxlength:1024,trim:!0},ma_dvt:{type:String,maxlength:32,trim:!0},ma_kho:{type:String,required:!0,uppercase:!0,maxlength:32,trim:!0},ma_kho_n:{type:String},ma_kho_x:{type:String},sl_nhap:{type:Number,default:0},sl_xuat:{type:Number,default:0},he_so_qd:{type:Number,default:1},
3
- sl_nhap_qd:{type:Number,default:0},sl_xuat_qd:{type:Number,default:0},pn_gia_tb:{type:Boolean,default:!1},px_gia_dd:{type:Boolean,default:!1},gia_von_nt:{type:Number,default:0},gia_von:{type:Number,default:0},tien_hang_nt:{type:Number,default:0},tien_hang:{type:Number,default:0},ty_le_ck:{type:Number,default:0},tien_ck_nt:{type:Number,default:0},tien_ck:{type:Number,default:0},tien_phi_nt:{type:Number,default:0},tien_phi:{type:Number,default:0},tien_cp_nt:{type:Number,default:0},tien_cp:{type:Number,
4
- default:0},tien_hang_nk:{type:Number,default:0},tien_hang_nk_nt:{type:Number,default:0},thue_suat_nk:{type:Number,default:0},tien_thue_nk:{type:Number,default:0},tien_thue_nk_nt:{type:Number,default:0},tien_nhap_nt:{type:Number,default:0},tien_nhap:{type:Number,default:0},tien_xuat:{type:Number,default:0},tien_xuat_nt:{type:Number,default:0},gia_ban:{type:Number,default:0},gia_ban_nt:{type:Number,default:0},tien:{type:Number,default:0},tien_nt:{type:Number,default:0},gia_ban_ct:{type:Number,default:0},
5
- gia_ban_ct_nt:{type:Number,default:0},tien_hang_ct_nt:{type:Number,default:0},tien_hang_ct:{type:Number,default:0},tien_ct:{type:Number,default:0},tien_ct_nt:{type:Number,default:0},thue_suat:{type:Number,default:0},tien_thue_nt:{type:Number,default:0},tien_thue:{type:Number,default:0},tk_vt:{type:String,uppercase:!0,maxlength:32,trim:!0},tk_gv:{type:String,uppercase:!0,maxlength:32,trim:!0},tk_du:{type:String,uppercase:!0,maxlength:32,trim:!0},tk_tl:{type:String,uppercase:!0,maxlength:32,trim:!0},
6
- tk_dt:{type:String,uppercase:!0,maxlength:32,trim:!0},tk_ck:{type:String,uppercase:!0,maxlength:32,trim:!0},ma_kh:{type:String,uppercase:!0,default:"",maxlength:32,trim:!0},dien_giai:{type:String,default:"",maxlength:1024},ma_bp:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_phi:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_hd:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_dt:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_nv:{type:String,
7
- default:"",uppercase:!0,maxlength:32,trim:!0},ma_lo:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},han_sd:{type:Date},ma_vt2:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_tt1:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_tt2:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_tt3:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},gio:Number,ngay:Number,thang:Number,quy:Number,nam:Number,ma_kenh:String,ma_td1:Schema.Types.Mixed,ma_td2:Schema.Types.Mixed,
8
- ma_td3:Schema.Types.Mixed,ma_td4:Schema.Types.Mixed,ma_td5:Schema.Types.Mixed,ma_td6:Schema.Types.Mixed,ma_td7:Schema.Types.Mixed,ma_td8:Schema.Types.Mixed,ma_td9:Schema.Types.Mixed,pt_thanh_toan:String,pt_thanh_toan2:String,tien_paymentByPoints:Number,tien_evoucher:Number,cashier:String,ma_sp:{type:String,default:"",uppercase:!0,maxlength:1024,trim:!0},sl_sp:Number,ma_dvt_sp:{type:String,maxlength:32,trim:!0},ma_tt1_sp:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_tt2_sp:{type:String,
9
- default:"",uppercase:!0,maxlength:32,trim:!0},ma_tt3_sp:{type:String,default:"",uppercase:!0,maxlength:32,trim:!0},ma_cum_chi_tiet:{type:String,uppercase:!0,default:"",maxlength:32,trim:!0},ten_cum_chi_tiet:{type:String,default:"",maxlength:1024},ma_cong_doan:{type:String,uppercase:!0,default:"",maxlength:32,trim:!0},id_lenhsx:{type:String,maxlength:1024},id_dinhmucsx:{type:String,maxlength:1024},id_lenhcapphat:{type:String,maxlength:1024},id_cs:{type:String,maxlength:1024},id_cs_ck:{type:String,
10
- maxlength:1024},ma_ca:{type:String,uppercase:!0,maxlength:32,trim:!0},trang_thai:{type:String,maxlength:32},id_reason:{type:String,maxlength:1024},exfields:Schema.Types.Mixed,exfields_detail:Schema.Types.Mixed,user_nv:String,ty_le_hoa_hong:Number,tien_hoa_hong:Number,chuyen_ngay:Boolean,tk_no_hoa_hong:String,tk_co_hoa_hong:String,user_gt:String,ty_le_hoa_hong_gt:Number,tien_hoa_hong_gt:Number,chuyen_ngay_gt:Boolean,tk_no_hoa_hong_gt:String,tk_co_hoa_hong_gt:String,user_ctv:String,ty_le_hoa_hong_ctv:Number,
11
- tien_hoa_hong_ctv:Number,chuyen_ngay_ctv:Boolean,tk_cn_ctv:String,tk_cp_ctv:String,user_ql:String,ty_le_hoa_hong_ql:Number,tien_hoa_hong_ql:Number,chuyen_ngay_ql:Boolean,tk_no_hoa_hong_ql:String,tk_co_hoa_hong_ql:String,line:Number,status:{type:Boolean,default:!0},date_created:{type:Date,default:Date.now},date_updated:{type:Date,default:Date.now},user_created:{type:String,default:""},user_updated:{type:String,default:""},id_client:String,listinfo_code:String},{toJSON:{virtuals:!0}});
12
- sokhoSchema.pre("save",function($next$$){this.ma_nt==="VND"?(this.tien_nhap_nt=Math.roundBy(this.tien_nhap_nt,0),this.tien_xuat_nt=Math.roundBy(this.tien_xuat_nt,0),this.tien_nhap=this.tien_nhap_nt,this.tien_xuat=this.tien_xuat_nt):(this.tien_nhap=Math.roundBy(this.tien_nhap,0),this.tien_xuat=Math.roundBy(this.tien_xuat,0));this.ngay_ct_full=new Date(this.ngay_ct);let $ngay_ct$$=moment(this.ngay_ct);this.gio=$ngay_ct$$.get("hours");this.ngay=$ngay_ct$$.get("dates");this.quy=$ngay_ct$$.get("quarters");
13
- this.thang=$ngay_ct$$.get("months")+1;this.nam=$ngay_ct$$.get("year");this.ngay_ct=$ngay_ct$$.startOf("date").toDate();this.han_sd&&(this.han_sd=moment(this.han_sd).endOf("date").toDate());$next$$()});
14
- (global.configs||{}).createIndexes&&(sokhoSchema.index({id_app:1}),sokhoSchema.index({id_app:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_dvcs:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,so_ct:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_ct:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_vt:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_vt:1,ma_lo:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_vt:1,ma_lo:1,han_sd:-1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_vt:1,ma_tt1:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,
15
- ma_vt:1,ma_tt2:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_vt:1,ma_tt3:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_kho:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_kho:1,ma_vt:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_kho:1,ma_vt:1,ma_lo:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_kho:1,ma_vt:1,ma_lo:1,han_sd:-1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_kho:1,ma_vt:1,ma_tt1:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_kho:1,ma_vt:1,ma_tt2:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_kho:1,
16
- ma_vt:1,ma_tt3:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_kho:1,ma_vt:1,nxt:1,pn_gia_tb:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_kho:1,ma_vt:1,nxt:1,px_gia_dd:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_kho_n:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_kho_x:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_kh:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_bp:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_phi:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_nv:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,
17
- ma_dt:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_kenh:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_sp:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_sp:1,ma_tt1_sp:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_sp:1,ma_tt2_sp:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_sp:1,ma_tt3_sp:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_sp:1,ma_cum_chi_tiet:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_sp:1,ma_cong_doan:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_sp:1,id_lenhsx:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,
18
- ma_sp:1,id_dinhmucsx:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_sp:1,id_lenhcapphat:1,ngay_ct:-1}),sokhoSchema.index({id_ct:1}),sokhoSchema.index({id_app:1,id_ct:1}),sokhoSchema.index({id_app:1,id_cs:1}),sokhoSchema.index({id_app:1,id_cs_ck:1}),sokhoSchema.index({id_app:1,cashier:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,nam:-1,quy:1,thang:1,ngay:1,gio:1}),sokhoSchema.index({id_app:1,ma_td1:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_td2:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,ma_td3:1,ngay_ct:-1}),
19
- sokhoSchema.index({id_app:1,user_nv:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,user_ctv:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,user_ql:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,user_gt:1,ngay_ct:-1}),sokhoSchema.index({id_app:1,date_created:-1}));let sokhoQueue=[],sokhoIsHandling=!1;
20
- const handleCreateSokhoTc=async()=>{if(!sokhoIsHandling){sokhoQueue=[...(new Set(sokhoQueue))];var $doc$$=sokhoQueue.shift();if($doc$$){try{sokhoIsHandling=!0,$doc$$=JSON.parse($doc$$),await createSokhoTC($doc$$.id_app,$doc$$.ngay_ct,$doc$$.ngay_ct)}catch($e$$){console.error("handleCreateSokhoTc",$doc$$,$e$$)}sokhoIsHandling=!1;handleCreateSokhoTc()}}};
21
- sokhoSchema.pre("save",function($next$$){const $session$$=getCurrentSession(),$store$$=getCurrentStore();$session$$&&$store$$&&(global.registerSessionStore($session$$,$store$$),this.$__sessionKey=$session$$._id||$session$$._debugId);$next$$()});
22
- sokhoSchema.post("save",async function($doc$$){const $sessionKey$$=this.$__sessionKey,$capturedStore$$=global.SESSION_STORE_MAP.get($sessionKey$$),$handleSaveAfterCommit$$=async()=>{let $key$$=JSON.stringify({id_app:$doc$$.id_app,ngay_ct:$doc$$.ngay_ct});sokhoQueue.find($d$$=>$d$$==$key$$)||(sokhoQueue.push($key$$),sokhoIsHandling||handleCreateSokhoTc())};if($sessionKey$$&&$capturedStore$$)onAfterCommit($handleSaveAfterCommit$$,"X\u1eed l\u00fd s\u1ef1 ki\u1ec7n sau khi l\u01b0u sokho",$capturedStore$$.session,
23
- $capturedStore$$);else try{await $handleSaveAfterCommit$$()}catch($e$$){console.error("\u274c post save immediate error:",$e$$)}},"X\u1eed l\u00fd s\u1ef1 ki\u1ec7n sau khi l\u01b0u sokho");
24
- sokhoSchema.pre("deleteMany",async function($next$$){const $session$$=this.options.session||getCurrentSession(),$store$$=getCurrentStore(),$handleDeletionAfterCommit$$=async()=>{var $deletedDocs_query$$=this.getQuery();$deletedDocs_query$$=(await global.getModel("sokho").find($deletedDocs_query$$,{id_app:1,ngay_ct:1}).lean()).map($r$$=>JSON.stringify({id_app:$r$$.id_app,ngay_ct:$r$$.ngay_ct}));$deletedDocs_query$$=[...(new Set($deletedDocs_query$$))];$deletedDocs_query$$.forEach($doc$$=>{sokhoQueue.find($d$$=>
25
- $d$$==$doc$$)||sokhoQueue.push($doc$$)});sokhoIsHandling||handleCreateSokhoTc()};if($session$$)onAfterCommit($handleDeletionAfterCommit$$,"X\u1eed l\u00fd s\u1ef1 ki\u1ec7n sau khi xo\u00e1 sokho",$session$$,$store$$),$next$$();else try{await $handleDeletionAfterCommit$$(),$next$$()}catch($e$$){$next$$($e$$)}});
26
- sokhoSchema.pre("deleteOne",async function($next$$){const $session$$=this.options.session||getCurrentSession(),$store$$=getCurrentStore(),$handleDeletionAfterCommit$$=async()=>{var $deletedDocs$jscomp$1_query$$=this.getQuery();$deletedDocs$jscomp$1_query$$=(await global.getModel("sokho").find($deletedDocs$jscomp$1_query$$,{id_app:1,ngay_ct:1}).lean()).map($r$$=>JSON.stringify({id_app:$r$$.id_app,ngay_ct:$r$$.ngay_ct}));$deletedDocs$jscomp$1_query$$=[...(new Set($deletedDocs$jscomp$1_query$$))];$deletedDocs$jscomp$1_query$$.forEach($doc$$=>
27
- {sokhoQueue.find($d$$=>$d$$==$doc$$)||sokhoQueue.push($doc$$)});sokhoIsHandling||handleCreateSokhoTc()};if($session$$)onAfterCommit($handleDeletionAfterCommit$$,"X\u1eed l\u00fd s\u1ef1 ki\u1ec7n sau khi xo\u00e1 sokho",$session$$,$store$$),$next$$();else try{await $handleDeletionAfterCommit$$(),$next$$()}catch($e$$){$next$$($e$$)}});const model=mongoose.models.sokho||mongoose.model("sokho",sokhoSchema);
28
- if((global.configs||{}).createIndexes)model.on("index",async function($err$$){$err$$?console.error("sokho index error",$err$$):console.info("sokho indexing complete")});module.exports=model;
1
+ const _0x15e4cb=_0x47e3;(function(_0x4c9979,_0xb6f7b7){const _0x25a5ee=_0x47e3,_0x10f740=_0x4c9979();while(!![]){try{const _0x55db1d=-parseInt(_0x25a5ee(0x1d4))/0x1+parseInt(_0x25a5ee(0x1c4))/0x2*(parseInt(_0x25a5ee(0x1ce))/0x3)+parseInt(_0x25a5ee(0x1c2))/0x4+parseInt(_0x25a5ee(0x166))/0x5+-parseInt(_0x25a5ee(0x193))/0x6+-parseInt(_0x25a5ee(0x1a5))/0x7+-parseInt(_0x25a5ee(0x152))/0x8*(parseInt(_0x25a5ee(0x162))/0x9);if(_0x55db1d===_0xb6f7b7)break;else _0x10f740['push'](_0x10f740['shift']());}catch(_0x3f484c){_0x10f740['push'](_0x10f740['shift']());}}}(_0x1d53,0x1c0a0));function _0x47e3(_0x52f450,_0x141982){const _0x1d536f=_0x1d53();return _0x47e3=function(_0x47e38c,_0x268793){_0x47e38c=_0x47e38c-0x149;let _0x527fe3=_0x1d536f[_0x47e38c];if(_0x47e3['WeudEi']===undefined){var _0x297068=function(_0x329441){const _0x5219b6='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4473f9='',_0x4eb900='';for(let _0xcc66e6=0x0,_0x154d67,_0x4d13bf,_0x3ef446=0x0;_0x4d13bf=_0x329441['charAt'](_0x3ef446++);~_0x4d13bf&&(_0x154d67=_0xcc66e6%0x4?_0x154d67*0x40+_0x4d13bf:_0x4d13bf,_0xcc66e6++%0x4)?_0x4473f9+=String['fromCharCode'](0xff&_0x154d67>>(-0x2*_0xcc66e6&0x6)):0x0){_0x4d13bf=_0x5219b6['indexOf'](_0x4d13bf);}for(let _0x1fae56=0x0,_0x4090d7=_0x4473f9['length'];_0x1fae56<_0x4090d7;_0x1fae56++){_0x4eb900+='%'+('00'+_0x4473f9['charCodeAt'](_0x1fae56)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4eb900);};_0x47e3['CrgHqM']=_0x297068,_0x52f450=arguments,_0x47e3['WeudEi']=!![];}const _0x2f2df3=_0x1d536f[0x0],_0x1900e9=_0x47e38c+_0x2f2df3,_0x172e2f=_0x52f450[_0x1900e9];return!_0x172e2f?(_0x527fe3=_0x47e3['CrgHqM'](_0x527fe3),_0x52f450[_0x1900e9]=_0x527fe3):_0x527fe3=_0x172e2f,_0x527fe3;},_0x47e3(_0x52f450,_0x141982);}const moment=require(_0x15e4cb(0x185)),{createSokhoTC}=require(_0x15e4cb(0x171)),{onAfterCommit,getCurrentSession,getCurrentStore}=require(_0x15e4cb(0x18a)),sokhoSchema=new Schema({'id_app':{'type':String,'required':!![],'maxlength':0x400},'ma_dvcs':{'type':String,'required':!![],'maxlength':0x400},'id_ct':{'type':String,'required':!![],'maxlength':0x400},'ma_ct':{'type':String,'required':!![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_gd':{'type':String,'default':'0','maxlength':0x20,'trim':!![]},'ngay_ct':{'type':Date,'required':!![]},'ngay_ct_full':Date,'so_ct':{'type':String,'required':!![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'nxt':{'type':Number,'required':!![]},'ma_nt':{'type':String,'default':'VND','required':!![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'ty_gia':{'type':Number,'default':0x1},'ma_vt':{'type':String,'required':!![],'uppercase':!![],'maxlength':0x400,'trim':!![]},'ma_dvt':{'type':String,'maxlength':0x20,'trim':!![]},'ma_kho':{'type':String,'required':!![],'uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_kho_n':{'type':String},'ma_kho_x':{'type':String},'sl_nhap':{'type':Number,'default':0x0},'sl_xuat':{'type':Number,'default':0x0},'he_so_qd':{'type':Number,'default':0x1},'sl_nhap_qd':{'type':Number,'default':0x0},'sl_xuat_qd':{'type':Number,'default':0x0},'pn_gia_tb':{'type':Boolean,'default':![]},'px_gia_dd':{'type':Boolean,'default':![]},'gia_von_nt':{'type':Number,'default':0x0},'gia_von':{'type':Number,'default':0x0},'tien_hang_nt':{'type':Number,'default':0x0},'tien_hang':{'type':Number,'default':0x0},'ty_le_ck':{'type':Number,'default':0x0},'tien_ck_nt':{'type':Number,'default':0x0},'tien_ck':{'type':Number,'default':0x0},'tien_phi_nt':{'type':Number,'default':0x0},'tien_phi':{'type':Number,'default':0x0},'tien_cp_nt':{'type':Number,'default':0x0},'tien_cp':{'type':Number,'default':0x0},'tien_hang_nk':{'type':Number,'default':0x0},'tien_hang_nk_nt':{'type':Number,'default':0x0},'thue_suat_nk':{'type':Number,'default':0x0},'tien_thue_nk':{'type':Number,'default':0x0},'tien_thue_nk_nt':{'type':Number,'default':0x0},'tien_nhap_nt':{'type':Number,'default':0x0},'tien_nhap':{'type':Number,'default':0x0},'tien_xuat':{'type':Number,'default':0x0},'tien_xuat_nt':{'type':Number,'default':0x0},'gia_ban':{'type':Number,'default':0x0},'gia_ban_nt':{'type':Number,'default':0x0},'tien':{'type':Number,'default':0x0},'tien_nt':{'type':Number,'default':0x0},'gia_ban_ct':{'type':Number,'default':0x0},'gia_ban_ct_nt':{'type':Number,'default':0x0},'tien_hang_ct_nt':{'type':Number,'default':0x0},'tien_hang_ct':{'type':Number,'default':0x0},'tien_ct':{'type':Number,'default':0x0},'tien_ct_nt':{'type':Number,'default':0x0},'thue_suat':{'type':Number,'default':0x0},'tien_thue_nt':{'type':Number,'default':0x0},'tien_thue':{'type':Number,'default':0x0},'tk_vt':{'type':String,'uppercase':!![],'maxlength':0x20,'trim':!![]},'tk_gv':{'type':String,'uppercase':!![],'maxlength':0x20,'trim':!![]},'tk_du':{'type':String,'uppercase':!![],'maxlength':0x20,'trim':!![]},'tk_tl':{'type':String,'uppercase':!![],'maxlength':0x20,'trim':!![]},'tk_dt':{'type':String,'uppercase':!![],'maxlength':0x20,'trim':!![]},'tk_ck':{'type':String,'uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_kh':{'type':String,'uppercase':!![],'default':'','maxlength':0x20,'trim':!![]},'dien_giai':{'type':String,'default':'','maxlength':0x400},'ma_bp':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_phi':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_hd':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_dt':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_nv':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_lo':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'han_sd':{'type':Date},'ma_vt2':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_tt1':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_tt2':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_tt3':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'gio':Number,'ngay':Number,'thang':Number,'quy':Number,'nam':Number,'ma_kenh':String,'ma_td1':Schema[_0x15e4cb(0x1cb)][_0x15e4cb(0x179)],'ma_td2':Schema[_0x15e4cb(0x1cb)][_0x15e4cb(0x179)],'ma_td3':Schema[_0x15e4cb(0x1cb)]['Mixed'],'ma_td4':Schema['Types'][_0x15e4cb(0x179)],'ma_td5':Schema['Types'][_0x15e4cb(0x179)],'ma_td6':Schema['Types']['Mixed'],'ma_td7':Schema[_0x15e4cb(0x1cb)]['Mixed'],'ma_td8':Schema[_0x15e4cb(0x1cb)][_0x15e4cb(0x179)],'ma_td9':Schema[_0x15e4cb(0x1cb)][_0x15e4cb(0x179)],'pt_thanh_toan':String,'pt_thanh_toan2':String,'tien_paymentByPoints':Number,'tien_evoucher':Number,'cashier':String,'ma_sp':{'type':String,'default':'','uppercase':!![],'maxlength':0x400,'trim':!![]},'sl_sp':Number,'ma_dvt_sp':{'type':String,'maxlength':0x20,'trim':!![]},'ma_tt1_sp':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_tt2_sp':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_tt3_sp':{'type':String,'default':'','uppercase':!![],'maxlength':0x20,'trim':!![]},'ma_cum_chi_tiet':{'type':String,'uppercase':!![],'default':'','maxlength':0x20,'trim':!![]},'ten_cum_chi_tiet':{'type':String,'default':'','maxlength':0x400},'ma_cong_doan':{'type':String,'uppercase':!![],'default':'','maxlength':0x20,'trim':!![]},'id_lenhsx':{'type':String,'maxlength':0x400},'id_dinhmucsx':{'type':String,'maxlength':0x400},'id_lenhcapphat':{'type':String,'maxlength':0x400},'id_cs':{'type':String,'maxlength':0x400},'id_cs_ck':{'type':String,'maxlength':0x400},'ma_ca':{'type':String,'uppercase':!![],'maxlength':0x20,'trim':!![]},'trang_thai':{'type':String,'maxlength':0x20},'id_reason':{'type':String,'maxlength':0x400},'exfields':Schema[_0x15e4cb(0x1cb)][_0x15e4cb(0x179)],'exfields_detail':Schema['Types'][_0x15e4cb(0x179)],'user_nv':String,'ty_le_hoa_hong':Number,'tien_hoa_hong':Number,'chuyen_ngay':Boolean,'tk_no_hoa_hong':String,'tk_co_hoa_hong':String,'user_gt':String,'ty_le_hoa_hong_gt':Number,'tien_hoa_hong_gt':Number,'chuyen_ngay_gt':Boolean,'tk_no_hoa_hong_gt':String,'tk_co_hoa_hong_gt':String,'user_ctv':String,'ty_le_hoa_hong_ctv':Number,'tien_hoa_hong_ctv':Number,'chuyen_ngay_ctv':Boolean,'tk_cn_ctv':String,'tk_cp_ctv':String,'user_ql':String,'ty_le_hoa_hong_ql':Number,'tien_hoa_hong_ql':Number,'chuyen_ngay_ql':Boolean,'tk_no_hoa_hong_ql':String,'tk_co_hoa_hong_ql':String,'line':Number,'status':{'type':Boolean,'default':!![]},'date_created':{'type':Date,'default':Date[_0x15e4cb(0x1a4)]},'date_updated':{'type':Date,'default':Date['now']},'user_created':{'type':String,'default':''},'user_updated':{'type':String,'default':''},'id_client':String,'listinfo_code':String},{'toJSON':{'virtuals':!![]}});sokhoSchema['pre']('save',function(_0x528a81){const _0x2b79af=_0x15e4cb,_0x58747b={'fZihK':function(_0x5dd5d6,_0x5c8bc5){return _0x5dd5d6(_0x5c8bc5);},'ndZyY':function(_0x8542ab,_0x56c78c){return _0x8542ab===_0x56c78c;},'tjssN':_0x2b79af(0x183),'jihwV':_0x2b79af(0x189),'GDqFg':function(_0x28e45e,_0x46155b){return _0x28e45e(_0x46155b);},'cAwqd':_0x2b79af(0x157),'XiOgI':_0x2b79af(0x16c),'EvjeP':function(_0x30a29f,_0x52651b){return _0x30a29f+_0x52651b;},'arapn':_0x2b79af(0x151),'EXZsM':'date','dpPTo':function(_0x302887){return _0x302887();},'iUOAz':function(_0x4dc854){return _0x4dc854();},'ViGdG':function(_0x2cbf12,_0x4f7b46){return _0x2cbf12&&_0x4f7b46;},'cPvNO':function(_0x15ba47){return _0x15ba47();}},_0x3416a4=this;_0x58747b[_0x2b79af(0x184)](_0x3416a4[_0x2b79af(0x172)],_0x58747b[_0x2b79af(0x191)])?(_0x3416a4[_0x2b79af(0x18b)]=Math[_0x2b79af(0x1bf)](_0x3416a4['tien_nhap_nt'],0x0),_0x3416a4[_0x2b79af(0x174)]=Math[_0x2b79af(0x1bf)](_0x3416a4['tien_xuat_nt'],0x0),_0x3416a4[_0x2b79af(0x175)]=_0x3416a4['tien_nhap_nt'],_0x3416a4['tien_xuat']=_0x3416a4[_0x2b79af(0x174)]):_0x58747b[_0x2b79af(0x184)](_0x58747b[_0x2b79af(0x159)],_0x2b79af(0x196))?_0x58747b['fZihK'](_0x2161f1,_0x35d6a9):(_0x3416a4[_0x2b79af(0x175)]=Math[_0x2b79af(0x1bf)](_0x3416a4['tien_nhap'],0x0),_0x3416a4['tien_xuat']=Math[_0x2b79af(0x1bf)](_0x3416a4[_0x2b79af(0x14d)],0x0));_0x3416a4['ngay_ct_full']=new Date(_0x3416a4[_0x2b79af(0x1c3)]);let _0x34ff24=_0x58747b[_0x2b79af(0x197)](moment,_0x3416a4[_0x2b79af(0x1c3)]);_0x3416a4[_0x2b79af(0x18e)]=_0x34ff24['get'](_0x2b79af(0x1c6)),_0x3416a4[_0x2b79af(0x1c9)]=_0x34ff24['get'](_0x58747b[_0x2b79af(0x1ad)]),_0x3416a4[_0x2b79af(0x1c0)]=_0x34ff24[_0x2b79af(0x169)](_0x58747b[_0x2b79af(0x1bd)]),_0x3416a4[_0x2b79af(0x160)]=_0x58747b[_0x2b79af(0x15e)](_0x34ff24['get'](_0x58747b[_0x2b79af(0x15a)]),0x1),_0x3416a4[_0x2b79af(0x15f)]=_0x34ff24[_0x2b79af(0x169)](_0x2b79af(0x18d)),_0x3416a4[_0x2b79af(0x1c3)]=_0x34ff24[_0x2b79af(0x173)](_0x58747b[_0x2b79af(0x19c)])['toDate']();if(_0x3416a4[_0x2b79af(0x16b)]){let _0x3757d3=_0x58747b['GDqFg'](moment,_0x3416a4[_0x2b79af(0x16b)]);_0x3416a4[_0x2b79af(0x16b)]=_0x3757d3[_0x2b79af(0x1cc)](_0x58747b[_0x2b79af(0x19c)])[_0x2b79af(0x1b6)]();}const _0x2bb93b=_0x58747b['dpPTo'](getCurrentSession),_0x9253f0=_0x58747b[_0x2b79af(0x198)](getCurrentStore);_0x58747b[_0x2b79af(0x192)](_0x2bb93b,_0x9253f0)&&(global[_0x2b79af(0x17f)](_0x2bb93b,_0x9253f0),this[_0x2b79af(0x1c1)]=_0x2bb93b[_0x2b79af(0x195)]||_0x2bb93b[_0x2b79af(0x153)]),_0x58747b[_0x2b79af(0x168)](_0x528a81);});if((global[_0x15e4cb(0x1be)]||{})[_0x15e4cb(0x187)]){const UKhmHC=_0x15e4cb(0x180)['split']('|');let AyzDBH=0x0;while(!![]){switch(UKhmHC[AyzDBH++]){case'0':sokhoSchema['index']({'id_app':0x1,'ma_sp':0x1,'id_lenhcapphat':0x1,'ngay_ct':-0x1});continue;case'1':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1,'ma_kho_x':0x1,'ngay_ct':-0x1});continue;case'2':sokhoSchema['index']({'id_app':0x1,'ma_kho':0x1,'ma_vt':0x1,'ma_tt3':0x1,'ngay_ct':-0x1});continue;case'3':sokhoSchema['index']({'id_app':0x1,'user_gt':0x1,'ngay_ct':-0x1});continue;case'4':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1,'ma_kho':0x1,'ma_vt':0x1,'nxt':0x1,'px_gia_dd':0x1,'ngay_ct':-0x1});continue;case'5':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1,'user_nv':0x1,'ngay_ct':-0x1});continue;case'6':sokhoSchema['index']({'id_app':0x1,'ma_vt':0x1,'ma_lo':0x1,'ngay_ct':-0x1});continue;case'7':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1,'ma_ct':0x1,'ngay_ct':-0x1});continue;case'8':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1,'ma_sp':0x1,'id_dinhmucsx':0x1,'ngay_ct':-0x1});continue;case'9':sokhoSchema['index']({'id_app':0x1,'cashier':0x1,'ngay_ct':-0x1});continue;case'10':sokhoSchema['index']({'id_app':0x1,'user_ql':0x1,'ngay_ct':-0x1});continue;case'11':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1,'ma_sp':0x1,'ma_tt2_sp':0x1,'ngay_ct':-0x1});continue;case'12':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1,'ma_sp':0x1,'ma_tt3_sp':0x1,'ngay_ct':-0x1});continue;case'13':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1,'ma_vt':0x1,'ngay_ct':-0x1});continue;case'14':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1,'ma_sp':0x1,'ma_cong_doan':0x1,'ngay_ct':-0x1});continue;case'15':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1,'ma_vt':0x1,'ma_lo':0x1,'han_sd':-0x1,'ngay_ct':-0x1});continue;case'16':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1,'date_created':-0x1});continue;case'17':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1,'ma_kho':0x1,'ma_vt':0x1,'ngay_ct':-0x1});continue;case'18':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1,'ma_nv':0x1,'ngay_ct':-0x1});continue;case'19':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1,'user_ctv':0x1,'ngay_ct':-0x1});continue;case'20':sokhoSchema['index']({'id_app':0x1,'ma_vt':0x1,'ma_tt3':0x1,'ngay_ct':-0x1});continue;case'21':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1,'ma_kho':0x1,'ma_vt':0x1,'ma_tt2':0x1,'ngay_ct':-0x1});continue;case'22':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1,'ma_kho_n':0x1,'ngay_ct':-0x1});continue;case'23':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1,'ma_td2':0x1,'ngay_ct':-0x1});continue;case'24':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1,'ma_sp':0x1,'ma_cum_chi_tiet':0x1,'ngay_ct':-0x1});continue;case'25':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1,'ma_vt':0x1,'ma_tt2':0x1,'ngay_ct':-0x1});continue;case'26':sokhoSchema['index']({'id_app':0x1,'ma_kenh':0x1,'ngay_ct':-0x1});continue;case'27':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1,'ma_td3':0x1,'ngay_ct':-0x1});continue;case'28':sokhoSchema['index']({'id_app':0x1,'ma_sp':0x1,'ngay_ct':-0x1});continue;case'29':sokhoSchema[_0x15e4cb(0x16d)]({'id_ct':0x1});continue;case'30':sokhoSchema['index']({'id_app':0x1,'ma_kho':0x1,'ma_vt':0x1,'nxt':0x1,'pn_gia_tb':0x1,'ngay_ct':-0x1});continue;case'31':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1,'id_cs_ck':0x1});continue;case'32':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1});continue;case'33':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1,'ma_sp':0x1,'id_lenhsx':0x1,'ngay_ct':-0x1});continue;case'34':sokhoSchema['index']({'id_app':0x1,'ma_kh':0x1,'ngay_ct':-0x1});continue;case'35':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1,'ma_td1':0x1,'ngay_ct':-0x1});continue;case'36':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1,'ma_kho':0x1,'ma_vt':0x1,'ma_lo':0x1,'ngay_ct':-0x1});continue;case'37':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1,'so_ct':0x1,'ngay_ct':-0x1});continue;case'38':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1,'nam':-0x1,'quy':0x1,'thang':0x1,'ngay':0x1,'gio':0x1});continue;case'39':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1,'ma_kho':0x1,'ma_vt':0x1,'ma_tt1':0x1,'ngay_ct':-0x1});continue;case'40':sokhoSchema['index']({'id_app':0x1,'ma_vt':0x1,'ma_tt1':0x1,'ngay_ct':-0x1});continue;case'41':sokhoSchema['index']({'id_app':0x1,'ma_sp':0x1,'ma_tt1_sp':0x1,'ngay_ct':-0x1});continue;case'42':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1,'ma_phi':0x1,'ngay_ct':-0x1});continue;case'43':sokhoSchema['index']({'id_app':0x1,'ma_dt':0x1,'ngay_ct':-0x1});continue;case'44':sokhoSchema['index']({'id_app':0x1,'id_ct':0x1});continue;case'45':sokhoSchema['index']({'id_app':0x1,'ma_bp':0x1,'ngay_ct':-0x1});continue;case'46':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1,'ngay_ct':-0x1});continue;case'47':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1,'id_cs':0x1});continue;case'48':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1,'ma_kho':0x1,'ngay_ct':-0x1});continue;case'49':sokhoSchema[_0x15e4cb(0x16d)]({'id_app':0x1,'ma_dvcs':0x1,'ngay_ct':-0x1});continue;case'50':sokhoSchema['index']({'id_app':0x1,'ma_kho':0x1,'ma_vt':0x1,'ma_lo':0x1,'han_sd':-0x1,'ngay_ct':-0x1});continue;}break;}}let sokhoQueue=[],sokhoIsHandling=![];const handleCreateSokhoTc=async()=>{const _0x52cb10=_0x15e4cb,_0x398cd7={'VXScx':function(_0x2a4aa7,_0x377aa0,_0x371f47,_0x17df09){return _0x2a4aa7(_0x377aa0,_0x371f47,_0x17df09);},'IpXLE':function(_0x15afc3,_0x31f067){return _0x15afc3===_0x31f067;},'djLkf':_0x52cb10(0x1a9),'McqqW':_0x52cb10(0x167),'FtIlI':function(_0x30da6c){return _0x30da6c();}};if(sokhoIsHandling)return;sokhoQueue=[...new Set(sokhoQueue)];let _0xbbc70d=sokhoQueue[_0x52cb10(0x1aa)]();if(_0xbbc70d){try{sokhoIsHandling=!![],_0xbbc70d=JSON[_0x52cb10(0x1bb)](_0xbbc70d),await _0x398cd7['VXScx'](createSokhoTC,_0xbbc70d['id_app'],_0xbbc70d[_0x52cb10(0x1c3)],_0xbbc70d[_0x52cb10(0x1c3)]);}catch(_0x438e63){_0x398cd7[_0x52cb10(0x19e)](_0x398cd7[_0x52cb10(0x1ac)],_0x398cd7['djLkf'])?console[_0x52cb10(0x1b4)](_0x398cd7[_0x52cb10(0x194)],_0xbbc70d,_0x438e63):_0x5ca2c2(_0x3be666);}sokhoIsHandling=![],_0x398cd7['FtIlI'](handleCreateSokhoTc);}};sokhoSchema[_0x15e4cb(0x1af)](_0x15e4cb(0x1b1),async function(_0x440d2b){const _0x160e6a=_0x15e4cb,_0x7b361b={'JDHcV':function(_0x6ced12){return _0x6ced12();},'VusOA':function(_0xdea6b8,_0x21b71a){return _0xdea6b8&&_0x21b71a;},'zguWc':function(_0x4c643d,_0x5c5d1b,_0x314fe7,_0x1ef36f,_0x5746f6){return _0x4c643d(_0x5c5d1b,_0x314fe7,_0x1ef36f,_0x5746f6);},'vRtRS':_0x160e6a(0x150),'ZWWew':function(_0x314612){return _0x314612();},'CqJQg':_0x160e6a(0x1a7)},_0x5988d8=this[_0x160e6a(0x1c1)],_0x272ec7=global[_0x160e6a(0x165)][_0x160e6a(0x169)](_0x5988d8),_0x11db31=async()=>{const _0x6114f6=_0x160e6a;let _0x35c634=JSON['stringify']({'id_app':_0x440d2b[_0x6114f6(0x19b)],'ngay_ct':_0x440d2b[_0x6114f6(0x1c3)]});!sokhoQueue['find'](_0x433709=>_0x433709==_0x35c634)&&(sokhoQueue[_0x6114f6(0x1b9)](_0x35c634),!sokhoIsHandling&&_0x7b361b['JDHcV'](handleCreateSokhoTc));};if(_0x7b361b[_0x160e6a(0x1d6)](_0x5988d8,_0x272ec7))_0x7b361b['zguWc'](onAfterCommit,_0x11db31,_0x7b361b[_0x160e6a(0x161)],_0x272ec7[_0x160e6a(0x182)],_0x272ec7);else try{await _0x7b361b['ZWWew'](_0x11db31);}catch(_0x28cc42){console[_0x160e6a(0x1b4)](_0x7b361b['CqJQg'],_0x28cc42);}},_0x15e4cb(0x150)),sokhoSchema[_0x15e4cb(0x19a)]('deleteMany',async function(_0x5d13ce){const _0xc1cf94=_0x15e4cb,_0x8b4202={'UGVQY':'tBtPB','tgFgK':_0xc1cf94(0x14f),'UlXpW':function(_0x5b7533){return _0x5b7533();},'EcjRi':function(_0x3f4b51,_0x4874b9,_0x32ee1f,_0xf55d6a,_0x5082b7){return _0x3f4b51(_0x4874b9,_0x32ee1f,_0xf55d6a,_0x5082b7);},'luclW':_0xc1cf94(0x16a),'CldLI':function(_0x1376ee){return _0x1376ee();},'VTtib':function(_0x26e433,_0x60ce6c){return _0x26e433===_0x60ce6c;},'oQnhg':_0xc1cf94(0x156),'CTKkO':_0xc1cf94(0x1a3),'eMgJM':function(_0x31fce8){return _0x31fce8();},'AFBzY':function(_0x277daa,_0x4d8cb9){return _0x277daa===_0x4d8cb9;},'OCzZq':_0xc1cf94(0x1d7),'UPBnY':function(_0x3afea7,_0x5ce22c){return _0x3afea7(_0x5ce22c);}},_0x59de5d=this['options'][_0xc1cf94(0x182)]||getCurrentSession(),_0x25955e=getCurrentStore(),_0x44b212=async()=>{const _0x282814=_0xc1cf94,_0x2eb854={'himNe':_0x282814(0x1b3),'laWFH':function(_0x28344d,_0x1fa76d){return _0x28344d===_0x1fa76d;},'jqkvJ':_0x8b4202[_0x282814(0x16e)]};let _0x222a98=this[_0x282814(0x199)](),_0x36192e=(await global[_0x282814(0x1d8)](_0x8b4202[_0x282814(0x158)])[_0x282814(0x186)](_0x222a98,{'id_app':0x1,'ngay_ct':0x1})[_0x282814(0x1d9)]())[_0x282814(0x19d)](_0x5401e3=>{const _0x20b7b4=_0x282814;if(_0x2eb854[_0x20b7b4(0x190)]!==_0x20b7b4(0x1b3))_0x27dd26();else return JSON[_0x20b7b4(0x1ca)]({'id_app':_0x5401e3['id_app'],'ngay_ct':_0x5401e3[_0x20b7b4(0x1c3)]});});_0x36192e=[...new Set(_0x36192e)],_0x36192e[_0x282814(0x14c)](_0x3801cd=>{const _0x5d09a8=_0x282814;if(!sokhoQueue[_0x5d09a8(0x186)](_0x3f5aa3=>_0x3f5aa3==_0x3801cd)){if(_0x2eb854[_0x5d09a8(0x155)](_0x2eb854[_0x5d09a8(0x149)],_0x2eb854[_0x5d09a8(0x149)]))sokhoQueue[_0x5d09a8(0x1b9)](_0x3801cd);else return _0xc1bf42[_0x5d09a8(0x1ca)]({'id_app':_0x2956a2[_0x5d09a8(0x19b)],'ngay_ct':_0x2b72ca[_0x5d09a8(0x1c3)]});}}),!sokhoIsHandling&&_0x8b4202[_0x282814(0x1b7)](handleCreateSokhoTc);};if(_0x59de5d)_0x8b4202['EcjRi'](onAfterCommit,_0x44b212,_0x8b4202[_0xc1cf94(0x17d)],_0x59de5d,_0x25955e),_0x8b4202[_0xc1cf94(0x14e)](_0x5d13ce);else{if(_0x8b4202[_0xc1cf94(0x1cd)](_0x8b4202[_0xc1cf94(0x1b8)],_0xc1cf94(0x163)))_0x32c779[_0xc1cf94(0x1b4)](_0xc1cf94(0x1a7),_0x19527b);else try{_0x8b4202[_0xc1cf94(0x1cd)](_0x8b4202[_0xc1cf94(0x18f)],_0x8b4202[_0xc1cf94(0x18f)])?(await _0x44b212(),_0x8b4202[_0xc1cf94(0x17a)](_0x5d13ce)):(_0x34da52[_0xc1cf94(0x17f)](_0x14111c,_0x353c7f),this['$__sessionKey']=_0x4617ce[_0xc1cf94(0x195)]||_0x26261f[_0xc1cf94(0x153)]);}catch(_0x18c02e){_0x8b4202['AFBzY'](_0x8b4202[_0xc1cf94(0x170)],_0xc1cf94(0x177))?_0x8b4202[_0xc1cf94(0x1b7)](_0x5ca35d):_0x8b4202['UPBnY'](_0x5d13ce,_0x18c02e);}}}),sokhoSchema[_0x15e4cb(0x19a)](_0x15e4cb(0x178),async function(_0x5797eb){const _0x36302c=_0x15e4cb,_0x132902={'Kqlnx':function(_0x373377,_0x227dd3){return _0x373377===_0x227dd3;},'wiZpT':_0x36302c(0x1ab),'souBo':_0x36302c(0x14f),'gqpXu':function(_0x2bbf6d){return _0x2bbf6d();},'OyyUN':function(_0x31c34c,_0x5c4b36,_0xf0fc8b,_0x130c5e,_0x163cdf){return _0x31c34c(_0x5c4b36,_0xf0fc8b,_0x130c5e,_0x163cdf);},'lMoGA':_0x36302c(0x150),'OvQXr':function(_0xaca459,_0x4c8026,_0x5cb434,_0x161f46,_0x35d976){return _0xaca459(_0x4c8026,_0x5cb434,_0x161f46,_0x35d976);},'EUffZ':'Xử\x20lý\x20sự\x20kiện\x20sau\x20khi\x20xoá\x20sokho','oWBuo':_0x36302c(0x167),'IasOJ':function(_0x5cc22b){return _0x5cc22b();},'TPVRj':function(_0xe91da8){return _0xe91da8();},'ZSLmK':function(_0x4a424b){return _0x4a424b();},'sJjhe':function(_0x3cb6c6,_0x435502){return _0x3cb6c6===_0x435502;},'qViIO':'QOTLW','BJnCm':'Lzbvm','HaskE':function(_0x4ef9f5,_0x40ae29){return _0x4ef9f5!==_0x40ae29;},'ZsiLw':_0x36302c(0x1d1),'TFrUg':function(_0x2e6df4,_0x563c3){return _0x2e6df4===_0x563c3;},'CpkDI':'RLDeC','TOiaM':function(_0x4066df,_0x2b387f){return _0x4066df===_0x2b387f;},'iTLTW':_0x36302c(0x1d3),'rgRYT':function(_0x5c1e43,_0xf574aa){return _0x5c1e43(_0xf574aa);}},_0x15ee80=this['options'][_0x36302c(0x182)]||_0x132902[_0x36302c(0x1a6)](getCurrentSession),_0x99549d=_0x132902['ZSLmK'](getCurrentStore),_0x5a3656=async()=>{const _0x515a37=_0x36302c,_0x52e9b4={'YvzsJ':function(_0x351ccf,_0x35cd1b){const _0xd50b20=_0x47e3;return _0x132902[_0xd50b20(0x154)](_0x351ccf,_0x35cd1b);},'FnlRX':'rwnJu','nITuy':_0x515a37(0x17b),'bPnBw':_0x132902[_0x515a37(0x188)]};let _0x5625fa=this[_0x515a37(0x199)](),_0x34f0f8=(await global[_0x515a37(0x1d8)](_0x132902[_0x515a37(0x1c5)])[_0x515a37(0x186)](_0x5625fa,{'id_app':0x1,'ngay_ct':0x1})['lean']())[_0x515a37(0x19d)](_0xdd8beb=>{const _0x2df370=_0x515a37;return _0x52e9b4[_0x2df370(0x1b5)](_0x52e9b4[_0x2df370(0x1d5)],_0x52e9b4['FnlRX'])?JSON[_0x2df370(0x1ca)]({'id_app':_0xdd8beb['id_app'],'ngay_ct':_0xdd8beb[_0x2df370(0x1c3)]}):_0x3a2bc1['stringify']({'id_app':_0x47f3b3[_0x2df370(0x19b)],'ngay_ct':_0x3e7374[_0x2df370(0x1c3)]});});_0x34f0f8=[...new Set(_0x34f0f8)],_0x34f0f8[_0x515a37(0x14c)](_0x44af23=>{const _0x571d19=_0x515a37;_0x571d19(0x17b)!==_0x52e9b4[_0x571d19(0x17c)]?!_0x101a80[_0x571d19(0x186)](_0x5cc2c6=>_0x5cc2c6==_0x4b997e)&&_0x2e8b6c[_0x571d19(0x1b9)](_0x28607f):!sokhoQueue[_0x571d19(0x186)](_0x9f030d=>_0x9f030d==_0x44af23)&&(_0x52e9b4['YvzsJ'](_0x52e9b4[_0x571d19(0x1d2)],_0x52e9b4[_0x571d19(0x1d2)])?sokhoQueue['push'](_0x44af23):_0x5b4ebe());}),!sokhoIsHandling&&_0x132902['gqpXu'](handleCreateSokhoTc);};if(_0x15ee80)_0x132902[_0x36302c(0x181)](_0x132902['qViIO'],_0x132902['BJnCm'])?_0x132902[_0x36302c(0x14b)](_0x7aadfd,_0x1cd962,_0x132902[_0x36302c(0x1ae)],_0x2f7e60['session'],_0x493da7):(_0x132902[_0x36302c(0x1a2)](onAfterCommit,_0x5a3656,_0x132902[_0x36302c(0x15b)],_0x15ee80,_0x99549d),_0x132902['gqpXu'](_0x5797eb));else{if(_0x132902[_0x36302c(0x14a)](_0x132902[_0x36302c(0x16f)],_0x36302c(0x164)))try{_0x132902['TFrUg'](_0x132902[_0x36302c(0x1cf)],_0x132902[_0x36302c(0x1cf)])?(await _0x5a3656(),_0x132902[_0x36302c(0x19f)](_0x5797eb)):(_0x132902[_0x36302c(0x1a2)](_0x20be65,_0xac04fd,_0x132902['EUffZ'],_0x5dc6eb,_0x44a4b6),_0x197626());}catch(_0x3ef6b5){_0x132902[_0x36302c(0x15d)](_0x132902['iTLTW'],_0x132902[_0x36302c(0x17e)])?_0x132902[_0x36302c(0x18c)](_0x5797eb,_0x3ef6b5):_0x221936[_0x36302c(0x1b4)](_0x132902[_0x36302c(0x1b0)],_0x9068b8,_0x2c4bfc);}else{let _0x2b05e5=_0x1961f3[_0x36302c(0x1ca)]({'id_app':_0x16c05e[_0x36302c(0x19b)],'ngay_ct':_0x13ae3c[_0x36302c(0x1c3)]});!_0x5a510d[_0x36302c(0x186)](_0x2f7a69=>_0x2f7a69==_0x2b05e5)&&(_0x38b956[_0x36302c(0x1b9)](_0x2b05e5),!_0x20cdb3&&_0x132902['IasOJ'](_0x275011));}}});const model=mongoose[_0x15e4cb(0x1a8)][_0x15e4cb(0x14f)]||mongoose['model']('sokho',sokhoSchema);(global['configs']||{})[_0x15e4cb(0x187)]&&model['on'](_0x15e4cb(0x16d),async function(_0x1bebcc){const _0x436ba5=_0x15e4cb,_0x3b6f59={'DnLlD':function(_0x331ea3,_0x31034f){return _0x331ea3!==_0x31034f;},'TrTah':_0x436ba5(0x176),'zLzyN':_0x436ba5(0x1a0),'SrCwj':_0x436ba5(0x1b2),'RzYsl':_0x436ba5(0x1c8)};_0x1bebcc?_0x3b6f59[_0x436ba5(0x15c)](_0x3b6f59[_0x436ba5(0x1a1)],_0x3b6f59[_0x436ba5(0x1d0)])?console['error'](_0x3b6f59[_0x436ba5(0x1bc)],_0x1bebcc):!_0x247003[_0x436ba5(0x186)](_0x2a5c74=>_0x2a5c74==_0x203022)&&_0x1c753a[_0x436ba5(0x1b9)](_0x44afc8):console[_0x436ba5(0x1c7)](_0x3b6f59['RzYsl']);});function _0x1d53(){const _0x3c40aa=['zxHWB3j0CW','CgfYC2u','u3jdD2O','wgLpz0K','y29UzMLNCW','CM91BMrcEq','Cxv5','jf9FC2vZC2LVBKTLEq','nta4mdG4sM9wt2HP','BMDHEv9JDa','mti2rKnLz2Lr','C291qM8','Ag91CNm','Aw5MBW','C29RAg8GAw5KzxHPBMCGy29TCgXLDgu','BMDHEq','C3rYAw5NAwz5','vhLWzxm','zw5Kt2y','vLr0Awi','nteWoxfRyKj6BW','q3bRreK','EKX6Eu4','sxPMswm','yLbUqNC','s3LMwgu','mty0mdu2BwTvExnn','rM5SuLG','vNvZt0e','A1DNDge','z2v0tw9KzwW','BgvHBG','ANfRDKO','sgfZA0u','t3L5vu4','zM9YrwfJAa','DgLLBL94Dwf0','q2XKteK','C29RAg8','wog7RsbSW70GC+g7SsbRAEg7H24GC2f1igTOAsbSXRb1ihnVA2HV','Bw9UDgHZ','mZuXnJHHu0jiq2W','x2rLyNvNswq','s3fSBNG','BgfxrKG','sLrVzxm','zgf0zxm','DgDgz0S','AMLOD1y','yxjHCg4','rvvMzLO','rg5mBeq','ve9Pyu0','rxzQzva','BMfT','DgHHBMC','DLj0uLm','otLjqML5y2q','uw9lu3G','zwDTu2S','u0vtu0LptL9tve9srv9nqva','mta4mZGZnwPhA1jMyG','AgfUzgXLq3jLyxrLu29RAg9uyW','y1b2tK8','z2v0','wog7RsbSW70GC+g7SsbRAEg7H24GC2f1igTOAsb4B8oHihnVA2HV','AgfUx3nK','CxvHCNrLCNm','Aw5KzxG','vuDwuvK','wNnPthC','t0n6wNe','lI4VBgLICY91DgLSCW','BwfFBNq','C3rHCNrpzG','DgLLBL94Dwf0x250','DgLLBL9UAgfW','t3jKt1G','BgX3DNu','zgvSzxrLt25L','twL4zwq','zu1NsK0','Bhr4Axm','BKLuDxK','BhvJBfC','AvrmvfC','CMvNAxn0zxjtzxnZAw9Uu3rVCMu','mZj8ndz8ndL8mZD8n3WXm3W2Fde1FdqWFdi1FdiWFdq4Fde3Fdm2FduWFdm5FdiXFdj8mZb8nhWYmNWXFdm0Fdq1FdqYFde4FdqZFdi2Fdi4FdqXFdeXFdeYFdi0Fde0FdmZFdH8mhWYoxW0nhW0n3WZmxW5Fdm4Fdm1FdiZFdi3Fdv8mtL8mtb8m3WXnG','C0PQAgu','C2vZC2LVBG','vK5e','BMrAEvK','Bw9Tzw50','zMLUza','y3jLyxrLsw5KzxHLCW','D2LACfq','BKDsEKi','lI4VBgLICY9ZzxnZAw9Uq29UDgv4Da','DgLLBL9UAgfWx250','CMDswvq','EwvHCG','z2LV','q1rlA08','AgLTtMu','DgPZC04','vMLhzeC','mJu3mJe0CMfRCuLn','twnXCvC','x2LK','Bxfirwy','r0rXrMC','AvvpqxO','z2v0uxvLCNK','ChjL','AwrFyxbW','rvHAC00','BwfW','sxbyteu','z3fWwhu','yxzIExa','vhjuywG','t3zrwhi','s0Tvq2e','BM93','nty2nJqZsxnHugTf','vfbwuMO','4P2mihbVC3qGC2f2zsbPBw1LzgLHDguGzxjYB3i6','Bw9KzwXZ','u1Petxm','C2HPzNq','zMXOs3K','zgPmA2y','y0f3Cwq','Be1Vr0e','Cg9ZDa','B1DcDw8','C2f2zq','C29RAg8GAw5KzxGGzxjYB3i','tfHyzwO','zxjYB3i','wxz6C0O','Dg9eyxrL','vwXyCfC','B1fUAgC','ChvZAa'];_0x1d53=function(){return _0x3c40aa;};return _0x1d53();}module[_0x15e4cb(0x1ba)]=model;