flexbiz-server 12.4.21 → 12.4.22

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,17 +1 @@
1
- const pbl=global.getModel("pbl"),hd2=global.getModel("hd2"),hd3=global.getModel("hd3"),so1=global.getModel("so1"),hd7=global.getModel("hd7"),async=require("async"),trangthai=global.getModel("trangthai"),transaction=global.getModel("transaction");
2
- module.exports=function($condition$$,$callback$$){if(!$condition$$.id_app)return $callback$$("H\u00e0m n\u00e0y y\u00eau c\u1ea7u tham s\u1ed1 id_app");let $data_hd2$$,$data_pbl$$,$data_so1$$;async.parallel({hd2:$callback$$=>{setImmediate(()=>{if(!$condition$$.ma_ct||$condition$$.ma_ct.indexOf("HD2")>=0||$condition$$.ma_ct.indexOf("SO7")>=0){let $_cd$$={...$condition$$};delete $_cd$$.show_payment_method;delete $_cd$$.show_bonus_points;hd2.find($_cd$$).lean().then($rs$$=>{for(let $v$$ of $rs$$)$v$$.details.forEach($r$$=>
3
- {$r$$.tien_hang_nt=$r$$.tien_nt;$r$$.tien_hang=$r$$.tien_hang_nt*($v$$.ty_gia||1);$r$$.tien_hang_ct_nt=$r$$.tien_ct_nt;$r$$.tien_hang_ct=$r$$.tien_hang_ct_nt*($v$$.ty_gia||1);$r$$.tien_hang_ct_nt||($r$$.tien_hang_ct=$r$$.tien_hang,$r$$.tien_hang_ct_nt=$r$$.tien_hang_nt);!$r$$.tien_ck_nt&&$r$$.tien_ck?$r$$.tien_ck_nt=$r$$.tien_ck:$r$$.tien_ck=($r$$.tien_ck_nt||0)*($v$$.ty_gia||1);$r$$.tien_nt=$r$$.tien_hang_ct_nt-($r$$.tien_ck_nt||0)+($r$$.tien_thue_nt||0);$r$$.tien=$r$$.tien_nt*($v$$.ty_gia||1)});
4
- $data_hd2$$=$rs$$;$callback$$(null,$rs$$)}).catch($error$$=>{$callback$$($error$$)})}else $callback$$(null,[])})},hd4:$callback$$=>{setImmediate(async()=>{if(!$condition$$.ma_ct||$condition$$.ma_ct.indexOf("HD2")>=0||$condition$$.ma_ct.indexOf("SO7")>=0){let $_cd$$;$condition$$.so_ct?$_cd$$={id_app:$condition$$.id_app,"details.id_hd":{$in:($data_hd2$$||[]).map($d$$=>$d$$._id.toString())}}:($_cd$$={...$condition$$},delete $_cd$$.show_payment_method,delete $_cd$$.show_bonus_points,delete $_cd$$.ma_ct);
5
- global.getModel("hd4").find($_cd$$).lean().then($rs$$=>{$callback$$(null,$rs$$)}).catch($error$$=>{$callback$$($error$$)})}else $callback$$(null,[])})},hd3:$callback$$=>{setImmediate(()=>{if(!$condition$$.ma_ct||$condition$$.ma_ct.indexOf("HD2")>=0||$condition$$.ma_ct.indexOf("SO7")>=0){let $_cd$$;$condition$$.so_ct?$_cd$$={id_app:$condition$$.id_app,"details.id_hd":{$in:($data_hd2$$||[]).map($d$$=>$d$$._id.toString())}}:($_cd$$={...$condition$$},delete $_cd$$.show_payment_method,delete $_cd$$.show_bonus_points,
6
- $_cd$$.$or&&$_cd$$.$or.find($o$$=>$o$$.user_nv)&&($_cd$$.details={$elemMatch:{$or:$_cd$$.$or}},delete $_cd$$.$or),delete $_cd$$.ma_ct,delete $_cd$$.so_ct);hd3.find($_cd$$).lean().then($rs$$=>{$rs$$.forEach($v$$=>{$v$$.details.forEach($r$$=>{$r$$.tien_hang=$r$$.tien;$r$$.tien_hang_nt=$r$$.tien_nt;$r$$.tien_hang_ct=$r$$.tien_ct;$r$$.tien_hang_ct_nt=$r$$.tien_ct_nt;$r$$.tien_hang_ct_nt||($r$$.tien_hang_ct=$r$$.tien_hang,$r$$.tien_hang_ct_nt=$r$$.tien_hang_nt);$r$$.tien_nt=$r$$.tien_hang_ct_nt-($r$$.tien_ck_nt||
7
- 0)+($r$$.tien_thue_nt||0);$r$$.tien=$r$$.tien_nt*($v$$.ty_gia||1)})});$callback$$(null,$rs$$)}).catch($error$$=>{$callback$$($error$$)})}else $callback$$(null,[])})},pbl:$callback$$=>{setImmediate(()=>{if(!$condition$$.ma_ct||$condition$$.ma_ct.indexOf("PBL")>=0){let $_cd$$={...$condition$$};delete $_cd$$.show_payment_method;delete $_cd$$.show_bonus_points;pbl.find($_cd$$).lean().then($rs$$=>{$rs$$.forEach($pbl$$=>{$pbl$$.details.forEach($r$$=>{$r$$.tien_hang_nt=$r$$.tien_hang_nt||0;$r$$.tien_hang=
8
- $r$$.tien_hang_nt*($pbl$$.ty_gia||1);$r$$.tien_hang_ct_nt=$r$$.tien_hang_ct_nt||0;$r$$.tien_hang_ct=$r$$.tien_hang_ct_nt*($pbl$$.ty_gia||1);$r$$.tien_hang_ct_nt||($r$$.tien_hang_ct=$r$$.tien_hang,$r$$.tien_hang_ct_nt=$r$$.tien_hang_nt);!$r$$.tien_ck_nt&&$r$$.tien_ck?$r$$.tien_ck_nt=$r$$.tien_ck:$r$$.tien_ck=($r$$.tien_ck_nt||0)*($pbl$$.ty_gia||1);$r$$.tien_nt=$r$$.tien_hang_ct_nt-($r$$.tien_ck_nt||0)+($r$$.tien_thue_nt||0);$r$$.tien=$r$$.tien_nt*($pbl$$.ty_gia||1)})});$data_pbl$$=$rs$$;$callback$$(null,
9
- $rs$$)}).catch($error$$=>{$callback$$($error$$)})}else $callback$$(null,[])})},so:$callback$$=>{setImmediate(()=>{if(!$condition$$.ma_ct||$condition$$.ma_ct.indexOf("SO1")>=0){let $_cd$$={...$condition$$};delete $_cd$$.show_payment_method;delete $_cd$$.show_bonus_points;so1.find($_cd$$).lean().then($rs$$=>{$rs$$.forEach($so1$$=>{$so1$$.ngay_ct=$so1$$.ngay_giao_hang||$so1$$.ngay_ct;$so1$$.details.forEach($r$$=>{$r$$.tien_hang_ct_nt||($r$$.tien_hang_ct=$r$$.tien_hang,$r$$.tien_hang_ct_nt=$r$$.tien_hang_nt);
10
- $r$$.tien_nt=$r$$.tien_hang_ct_nt-($r$$.tien_ck_nt||0)+($r$$.tien_thue_nt||0);$r$$.tien=$r$$.tien_hang_ct-($r$$.tien_ck||0)+($r$$.tien_thue_nt||0)})});$data_so1$$=$rs$$;$callback$$(null,$rs$$)}).catch($error$$=>{$callback$$($error$$)})}else $callback$$(null,[])})},hd7:$callback$$=>{setImmediate(()=>{if(!$condition$$.ma_ct||$condition$$.ma_ct.indexOf("PBL")>=0||$condition$$.ma_ct.indexOf("SO1")>=0){if($condition$$.so_ct){var $_cd$$=($data_pbl$$||[]).map($d$$=>$d$$._id.toString());$_cd$$=[...$_cd$$,
11
- ...($data_so1$$||[]).map($d$$=>$d$$._id.toString())];$_cd$$={id_app:$condition$$.id_app,"details.id_hd":{$in:$_cd$$}}}else $_cd$$={...$condition$$},delete $_cd$$.show_payment_method,delete $_cd$$.show_bonus_points,delete $_cd$$.ma_ct,delete $_cd$$.so_ct;hd7.find($_cd$$).lean().then($rs$$=>{$callback$$(null,$rs$$)}).catch($error$$=>{$callback$$($error$$)})}else $callback$$(null,[])})}},async($error$$,$rs$$)=>{if($error$$)return $callback$$($error$$);async.series({pbl:$callback$$=>{setImmediate(()=>
12
- {$rs$$.pbl.forEach($m$$=>{$m$$.details.filter($d$$=>$d$$.promotion&&$d$$.promotion.details_km).map($d$$=>$d$$.promotion.details_km).reduce(($a$$,$b$$)=>$a$$.concat($b$$),[]).forEach($d$$=>{$d$$.sl_xuat=$d$$.sl_km;$m$$.details.push($d$$)});$m$$.promotion&&$m$$.promotion.forEach($p$$=>{$p$$=Object.assign({},$p$$);$p$$.sl_xuat=$p$$.sl_km;$m$$.details.push($p$$)})});$callback$$()})},so:$callback$$=>{setImmediate(()=>{($rs$$.so||[]).forEach($r$$=>{$r$$.ctcpbhs&&$r$$.ctcpbhs.forEach($c$$=>{$c$$.tien_hang=
13
- 0;$c$$.tien_hang_nt=0;$c$$.sl_xuat=0;$c$$.tien=$c$$.tien_hang+$c$$.tien_cp;$c$$.tien_nt=$c$$.tien_hang_nt+$c$$.tien_cp_nt;$r$$.details.push($c$$)});$rs$$.pbl.push($r$$)});$callback$$()})},hd2:$callback$$=>{setImmediate(()=>{let $hd4_details$$=($rs$$.hd4||[]).map($h$$=>$h$$.details||[]).reduce(($a$$,$b$$)=>$a$$.concat($b$$),[]);$rs$$.hd2.forEach($r$$=>{($r$$.details||[]).forEach($detail$$=>{$detail$$.chi_phi_bh=$hd4_details$$.filter($h$$=>$h$$.id_hd===$r$$._id.toString()&&$h$$.ma_vt===$detail$$.ma_vt&&
14
- ($h$$.line_hd==void 0||$h$$.line_hd==$detail$$.line));$detail$$.tien_cp_nt=$detail$$.chi_phi_bh.map($d$$=>$d$$.tien_phi_nt||0).reduce(($a$$,$b$$)=>$a$$+$b$$,0);$detail$$.tien_cp=$detail$$.chi_phi_bh.map($d$$=>$d$$.tien_phi||0).reduce(($a$$,$b$$)=>$a$$+$b$$,0)});$rs$$.pbl.push($r$$)});$rs$$.hd3.forEach($r$$=>{$r$$.details_tl=$r$$.details.map($r$$=>$r$$);$r$$.details=[];$rs$$.pbl.push($r$$)});$rs$$.hd7.forEach($r$$=>{$r$$.details_tl=$r$$.details.map($r$$=>$r$$);$r$$.details=[];$rs$$.pbl.push($r$$)});
15
- $callback$$()})}},async()=>{let $reportData$$=$rs$$.pbl;await $reportData$$.asyncJoinModel2(null,trangthai,[{where:{trang_thai:"ma_trang_thai",ma_ct:"ma_ct"},fields:["post_sokho","post","post_socai","ten_trang_thai"]}]);$reportData$$=$reportData$$.filter($p$$=>$p$$.post);const $ptthanhtoans$$=$condition$$.show_payment_method!==!1?(await global.getModel("ptthanhtoan").find({status:!0,id_app:$condition$$.id_app}).lean()).map($pt$$=>{$pt$$.ma=`pttt__${$pt$$._id}`;return $pt$$}):[];if($condition$$.show_bonus_points||
16
- $ptthanhtoans$$&&$ptthanhtoans$$.length>0){const $queue$$=async.queue(async $r$$=>{if($condition$$.show_bonus_points){let $trans$$=await transaction.find({id_ct:{$regex:$r$$._id.toString(),$options:"i"}}).lean();$r$$.bonus_points=$trans$$.filter($tran$$=>$tran$$.receiver.email.toLowerCase()===$r$$.ma_kh.toLowerCase()).map($tran$$=>$tran$$.amount).reduce(($a$$,$b$$)=>$a$$+$b$$,0);$r$$.used_points=$trans$$.filter($tran$$=>$tran$$.sender.email.toLowerCase()===$r$$.ma_kh.toLowerCase()).map($tran$$=>$tran$$.amount).reduce(($a$$,
17
- $b$$)=>$a$$+$b$$,0)}$ptthanhtoans$$&&$ptthanhtoans$$.length>0&&($r$$.thanh_toan=$ptthanhtoans$$,$r$$.thanh_toan.forEach($pt$$=>{$r$$[$pt$$.ma]=0;$r$$.pt_thanh_toan===$pt$$._id.toString()&&($r$$[$pt$$.ma]+=$r$$.tien_thu||$r$$.tien_con_lai||0);$r$$.pt_thanh_toan2===$pt$$._id.toString()&&($r$$[$pt$$.ma]+=$r$$.tien_thu2||0);$pt$$.tien_thu=$r$$[$pt$$.ma]}))},10);$queue$$.push($reportData$$);$queue$$.drain(()=>{$callback$$(null,$reportData$$,$ptthanhtoans$$)})}else $callback$$(null,$reportData$$)})})};
1
+ function _0x47d2(){const _0x5abe8d=['ChvZAa','C1Hru3y','DgLLBL9JA19UDa','Dw5LwgO','C2vHCMnO','z251sMK','y3rIAfi','D2TwAee','BwfFA2G','u08X','thfxyM0','DhjHBMD0AgfP','DgLLBL9JCf9UDa','CgjpEe0','Dg9mB3DLCKnHC2u','DgLLBL9Oyw5Nx2n0x250','zhDcDui','DgLLBL9Oyw5Nx250','oti3otG0sg1uzerI','uMXrELy','DMnXyuu','y2LWDvy','r2TLq0m','BgvHBG','AgToBgy','sK1zAM4','Exf0BgG','Ahfsuhu','yxnOzxO','tNrABNa','DunRsfq','zuf0wKG','v1jfD1q','AwPXwuO','zvfyre4','zKXNBvy','A1nRtfy','yM9UDxnFCg9PBNrZ','EMHMzhy','EfLfDva','uejm','D1nIrMe','CLrmyvO','sM9psKm','txv2weC','q25UywC','AMTrC3u','DfD3y3i','ww5Auw4','qwjNEhC','BMDHEv9JDa','sMnyuuG','AKTPvNi','z0DjCKq','z2v0tw9KzwW','DgLLBL9JDf9UDa','s0XJv2y','Ahnus0W','zNPnA3C','vNjPqKO','BwfFy3q','q2nUqvy','qwDfshO','vvn1AhC','y29UC3rYDwn0B3i','C2vYAwvZ','DgLLBL9JCa','Dg9tDhjPBMC','y2r3D3O','mhWYFdf8nhWZ','zw1HAwW','EK50vhm','CMjvqxy','mtfeCuXdCvu','rMT1tgy','yLH4Afi','AgqY','EwTpteG','rvLJvK0','yxnZAwDU','BfzPzfy','swHsu0q','Egjqqxu','DgLLBL90AhuY','tNLru04','yKz0C0K','mJuYv1nWEMrc','DgLLBL9WAgK','wfbgz1m','BgrowhG','svzrExe','sfD4ELG','zgv0ywLSCW','Bvrksw4','Cg9ZDf9ZB2nHAq','DxnLzf9WB2LUDhm','ChrFDgHHBMHFDg9HBJi','ChrFDgHHBMHFDg9HBG','rezKzwS','ruzsB0i','AvvZwfy','rM9Hte4','wLfOyMi','wKDQrhG','CgzXu3q','BKn5A3e','D2LzBwq','zwTiCfm','C2HVD19IB251C19WB2LUDhm','zefoyve','rvrSze0','Du5lCue','DefuA2m','BMfvqwW','sLPAuK0','AMfUq3u','vKzKC2u','whrzEMu','DgLLBL9JB25FBgfP','EvH2v2u','sNDXweO','C2XFEhvHDa','BM94uxO','AwrFyxbW','CMvJzwL2zxi','CfjYthG','rgLQCfi','u25Iy0y','qw5rDeW','AgqZ','tfrdtKK','DhLFz2LH','z1jlDMW','x2LK','vu9TBe8','shfoweC','se91q3O','jg9Y','Agq3','n1nhwvrjyG','DgHHBMHFDg9HBG','vvH5zvC','zwHfCNy','rwDgwhi','rwj5yuq','BwfFDNq','C28X','DgLLBL90AhvLx250','vwDMrLC','C3bSAxq','yMLIwuS','A3bszuW','vhHowu8','r0jXtwe','v2TNExK','m3W0Fdj8mxWWFdu','C29Fy3q','qKDeEKy','yw1VDw50','BK9LAum','odGYmJuXngz6v3j2BG','vgj2yxO','DKDbt2O','AgvRuM8','sNrIweu','svzfAuO','BMDHEv9NAwfVx2HHBMC','ChLuzfi','y3bHCwi','ywrhCK0','BgLUzv9Oza','u083','CffKCvK','DgLLBL90Ahu','Dvnwqva','yu5xvwW','BLfHveW','smoGBsbUW6b5ihNdQNuGy+g6P3uGDgHHBsbZ4BUrigLKx2fWCa','DgLLBL9Oyw5Nx2n0','yK5kuuS','zMLSDgvY','C21vqKO','BuTHuKO','zM9YrwfJAa','y2HPx3bOAv9IAa','zMLUza','zgv0ywLSC19RBq','DgLLBL9WAgLFBNq','mJyWnti0ntbWwfrfwKG','qwvOChK','mtG4otK3m1z6CfzHyW','DxnLCL9UDG','r2TfvvK','CMvKDwnL','tMrQyKO','vgfsC0u','Bu9cExa','rxfdwxm','BNboCuC','BxfosuK','wvHvwNG','rwzVExK','kcGOlISPkYKRksSK','DgLLBL9Oyw5N','q1fxvKW','B2zmuxK','wNz6swG','y1vxu2m','sKPdAxq','m3vQBM5czG','DgvUx3rYyw5Nx3rOywK','D0jbyNq','D2HrufK','yLvmC3i','zenQDeC','DgHLBG','uNzXrwC','mNW1Fdb8mxW0Fdm','BgLUzq','wu1HEei','BvrYB3K','B0HKtxu','s1rfr1G','nJiXnuvir0Dowa','DgLLBL9UDa','rKjtt1a','DKPRq1O','sgvlsfG','uwvdwLa','seqY','BwzqA3C','Aen3sw4','s2X4Exy','C2P5zNa','C2XFA20','A1fwyvG','CKvHALi','v212vMi','CgjS','zhfJEgi','D2rlBhm','DKrJALe','zgv0ywLSC190Ba','zLPJqu4','CgfYywXSzwW','AefqBMu','ChjVBw90Aw9U','rvjmveq','wxLluwS','ruLlv20','qu5rD04','vNjhtvy','CuvVANm','Aw5KzxHpzG','u3rvsgK','EMXrywK','ENvQsuK','BKPduLa','zxHWB3j0CW','A0PesfK','sujxzxm','yvrewK4','mNWWFdv8m3WXFdq','Agq0','CfPRsKy','sM1Ry1K','nhWXFdn8nxWWFdj8nNW3','DgLLBL9JDa','yMXNDgS','zw1UBNi','sK9evfK','sMfHwxC','B05ZreS','zM1yvLG','t0HqBeu','ntGYmdeZnu1isg1qAW','Cg9ZDa','mZG4oda2nefqqvz4wG','Auvpzgu','ChLwqNq','BwfW','A1zLBvq','CgTMAwi','yxn5BMnkB2LUtw9KzwWY','zuDetNq','DgLLBG','C2HVD19WyxLTzw50x21LDgHVza','u0L2qvy','sejsCKy','y2f0y2G','DhjHBNnHy3rPB24','tfDusLC','y3LKvLi','r3Dpu1a','CxvLDwu','sKjyqLG','ugr4A0O','txDTr24','yxbWBhK','wNrgwfi','uNfrDui','wLDezKe','wKDrwLC','werMBhy','DgLLBL9JAW','y3rJCgjOCW','CK9dzLu','AxfWDMG','B3HVEgi','thfUy0m','BgvUz3rO','DKXRDLy','AwrFAgq','uLDQtve','t0XUzLa','zfrqq24','rwDvuKu','ChbLEwi','v2HtBNK','r2XYwKW','zhHsDg8','y29Uy2f0','wwnxEgq'];_0x47d2=function(){return _0x5abe8d;};return _0x47d2();}const _0x361a6c=_0x1fe3;function _0x1fe3(_0x1e1044,_0xc15bcb){const _0x1776bc=_0x47d2();return _0x1fe3=function(_0x3aca94,_0x3b8c28){_0x3aca94=_0x3aca94-0x15b;let _0x47d20c=_0x1776bc[_0x3aca94];if(_0x1fe3['wRKVXO']===undefined){var _0x1fe31c=function(_0x2b8a3d){const _0x219310='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x405aea='',_0x460e03='',_0x42f527=_0x405aea+_0x1fe31c;for(let _0x4c49ce=0x0,_0x14fce7,_0x5b6346,_0x53b32b=0x0;_0x5b6346=_0x2b8a3d['charAt'](_0x53b32b++);~_0x5b6346&&(_0x14fce7=_0x4c49ce%0x4?_0x14fce7*0x40+_0x5b6346:_0x5b6346,_0x4c49ce++%0x4)?_0x405aea+=_0x42f527['charCodeAt'](_0x53b32b+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x14fce7>>(-0x2*_0x4c49ce&0x6)):_0x4c49ce:0x0){_0x5b6346=_0x219310['indexOf'](_0x5b6346);}for(let _0x19ed6f=0x0,_0x20505b=_0x405aea['length'];_0x19ed6f<_0x20505b;_0x19ed6f++){_0x460e03+='%'+('00'+_0x405aea['charCodeAt'](_0x19ed6f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x460e03);};_0x1fe3['ecvMPq']=_0x1fe31c,_0x1e1044=arguments,_0x1fe3['wRKVXO']=!![];}const _0x53b9ab=_0x1776bc[0x0],_0x42ac3c=_0x3aca94+_0x53b9ab,_0x27a17c=_0x1e1044[_0x42ac3c];if(!_0x27a17c){const _0x2d377d=function(_0x3b3386){this['TsLLvK']=_0x3b3386,this['HOtCdY']=[0x1,0x0,0x0],this['ckZZbW']=function(){return'newState';},this['omHNMe']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['rWKuJl']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x2d377d['prototype']['CyLGUq']=function(){const _0x18e02e=new RegExp(this['omHNMe']+this['rWKuJl']),_0x17aa87=_0x18e02e['test'](this['ckZZbW']['toString']())?--this['HOtCdY'][0x1]:--this['HOtCdY'][0x0];return this['Qgrqao'](_0x17aa87);},_0x2d377d['prototype']['Qgrqao']=function(_0x26b8ad){if(!Boolean(~_0x26b8ad))return _0x26b8ad;return this['ZoHPoe'](this['TsLLvK']);},_0x2d377d['prototype']['ZoHPoe']=function(_0x4ef1be){for(let _0x3541a8=0x0,_0x3c84ab=this['HOtCdY']['length'];_0x3541a8<_0x3c84ab;_0x3541a8++){this['HOtCdY']['push'](Math['round'](Math['random']())),_0x3c84ab=this['HOtCdY']['length'];}return _0x4ef1be(this['HOtCdY'][0x0]);},new _0x2d377d(_0x1fe3)['CyLGUq'](),_0x47d20c=_0x1fe3['ecvMPq'](_0x47d20c),_0x1e1044[_0x42ac3c]=_0x47d20c;}else _0x47d20c=_0x27a17c;return _0x47d20c;},_0x1fe3(_0x1e1044,_0xc15bcb);}(function(_0x3e037b,_0xe3d903){const _0x39ea18=_0x1fe3,_0x11ff89=_0x3e037b();while(!![]){try{const _0x67e3cd=parseInt(_0x39ea18(0x17c))/0x1*(parseInt(_0x39ea18(0x236))/0x2)+-parseInt(_0x39ea18(0x16e))/0x3*(-parseInt(_0x39ea18(0x1f2))/0x4)+parseInt(_0x39ea18(0x1b0))/0x5+parseInt(_0x39ea18(0x280))/0x6*(parseInt(_0x39ea18(0x26b))/0x7)+-parseInt(_0x39ea18(0x1b2))/0x8+parseInt(_0x39ea18(0x15b))/0x9+-parseInt(_0x39ea18(0x29c))/0xa*(parseInt(_0x39ea18(0x229))/0xb);if(_0x67e3cd===_0xe3d903)break;else _0x11ff89['push'](_0x11ff89['shift']());}catch(_0x31f42a){_0x11ff89['push'](_0x11ff89['shift']());}}}(_0x47d2,0xbb914));const _0x3b8c28=(function(){let _0x5e465f=!![];return function(_0xe25e0c,_0x286f90){const _0x301c22=_0x5e465f?function(){const _0x3ce569=_0x1fe3;if(_0x286f90){const _0x2e35d4=_0x286f90[_0x3ce569(0x1c7)](_0xe25e0c,arguments);return _0x286f90=null,_0x2e35d4;}}:function(){};return _0x5e465f=![],_0x301c22;};}()),_0x3aca94=_0x3b8c28(this,function(){const _0x451c5e=_0x1fe3,_0x74e6e4={'hhIDz':'(((.+)+)+)+$'};return _0x3aca94[_0x451c5e(0x223)]()[_0x451c5e(0x1e4)](_0x74e6e4['hhIDz'])[_0x451c5e(0x223)]()[_0x451c5e(0x220)](_0x3aca94)[_0x451c5e(0x1e4)](_0x74e6e4['hhIDz']);});_0x3aca94();const pbl=global[_0x361a6c(0x216)](_0x361a6c(0x18b)),hd2=global[_0x361a6c(0x216)](_0x361a6c(0x22c)),hd3=global['getModel'](_0x361a6c(0x261)),so1=global[_0x361a6c(0x216)](_0x361a6c(0x272)),hd7=global[_0x361a6c(0x216)](_0x361a6c(0x26a)),async=require('async'),trangthai=global[_0x361a6c(0x216)](_0x361a6c(0x1eb)),transaction=global['getModel'](_0x361a6c(0x1bf));module[_0x361a6c(0x19f)]=function(_0x5e847e,_0xed7787){const _0x31892a=_0x361a6c,_0x161201={'EcNld':_0x31892a(0x289),'jkQsu':function(_0x2f39bb,_0x368dd1){return _0x2f39bb-_0x368dd1;},'ehErv':_0x31892a(0x23b),'mKaRJ':function(_0x46e6b4,_0x355f20,_0x5059f0){return _0x46e6b4(_0x355f20,_0x5059f0);},'QwOPO':'OveoL','JtbXE':_0x31892a(0x27d),'hAPne':function(_0x4a72c9,_0x34941c){return _0x4a72c9>=_0x34941c;},'yqtlh':_0x31892a(0x182),'WmvVb':function(_0x4721e7,_0x159056){return _0x4721e7>=_0x159056;},'MuvXG':function(_0x13801c,_0x54e6bf){return _0x13801c(_0x54e6bf);},'fzMkw':function(_0x3f8626,_0x3d3c7e,_0x2ce762){return _0x3f8626(_0x3d3c7e,_0x2ce762);},'lWGtU':function(_0x238d94,_0x46fd54){return _0x238d94!==_0x46fd54;},'fZcAN':'LUUxZ','pxQDH':function(_0x35a767,_0x39cd42,_0x112975){return _0x35a767(_0x39cd42,_0x112975);},'nJCRP':_0x31892a(0x28b),'lActv':_0x31892a(0x1a4),'DrOXT':function(_0x333fe1,_0x1e5a50){return _0x333fe1!==_0x1e5a50;},'nQaTL':_0x31892a(0x1cb),'sjyfp':function(_0x5eabff,_0x41f102){return _0x5eabff!==_0x41f102;},'pRrLx':'vcqaE','dTPCn':function(_0x157e5b,_0x89efbe){return _0x157e5b===_0x89efbe;},'tATkc':_0x31892a(0x1e1),'GkeCC':function(_0x35ef1d,_0x505529,_0x3626bd){return _0x35ef1d(_0x505529,_0x3626bd);},'wSbFa':'jqHHQ','YyKQk':_0x31892a(0x238),'mqNII':function(_0x151d27,_0x498ee0){return _0x151d27===_0x498ee0;},'UgfFW':_0x31892a(0x172),'WREwT':'JODTY','yXvWe':function(_0x4e2fee,_0x228751){return _0x4e2fee!==_0x228751;},'HqNXG':function(_0x269227,_0x22f0a0){return _0x269227+_0x22f0a0;},'EFRoB':function(_0x23f176,_0x2211c1){return _0x23f176(_0x2211c1);},'ijqYJ':function(_0x380690,_0x355a01){return _0x380690*_0x355a01;},'aunCr':function(_0x5950df,_0x5164d4){return _0x5950df*_0x5164d4;},'uleLa':function(_0x4db455,_0x32ad45){return _0x4db455(_0x32ad45);},'pbOxM':'sxfrW','noxQz':_0x31892a(0x184),'YnZQn':_0x31892a(0x20f),'ekHpS':function(_0x2dc328,_0x2dd3a0){return _0x2dc328+_0x2dd3a0;},'ofLQy':function(_0x445f57,_0x4fbfb8){return _0x445f57(_0x4fbfb8);},'cydVR':_0x31892a(0x17b),'rEajR':_0x31892a(0x235),'kQVaX':_0x31892a(0x1e9),'HOuCz':function(_0x366090,_0x2ab777,_0x562ef7){return _0x366090(_0x2ab777,_0x562ef7);},'uCkHT':_0x31892a(0x1f0),'inukh':function(_0x58e42a,_0x410784){return _0x58e42a(_0x410784);},'smUBJ':_0x31892a(0x167),'YMaxB':'YAWHw','qkKTG':_0x31892a(0x242),'LqncC':_0x31892a(0x1bc),'ERLTD':_0x31892a(0x170),'qDkpI':function(_0x102f83,_0x2ac6fd){return _0x102f83!==_0x2ac6fd;},'qEojs':_0x31892a(0x22d),'ByxIa':function(_0x3714eb,_0x4ccd6b){return _0x3714eb===_0x4ccd6b;},'zhfdv':_0x31892a(0x176),'XUhOP':function(_0x2f15d7){return _0x2f15d7();},'SsVLR':function(_0x57e80e,_0x2ac02f){return _0x57e80e(_0x2ac02f);},'JaaYw':_0x31892a(0x1a3),'GBqMa':function(_0x361b7a,_0x25561a){return _0x361b7a+_0x25561a;},'zlQai':'GpToh','ldNXx':'ma_trang_thai','hkNlf':_0x31892a(0x21c),'XtYze':'post_sokho','iUsXV':_0x31892a(0x1b1),'fLgmV':_0x31892a(0x23e),'Efoyy':_0x31892a(0x16f),'RlQzV':function(_0x4a049c,_0x3a49bc){return _0x4a049c!==_0x3a49bc;},'VrGMV':function(_0x4bcb06,_0x331462){return _0x4bcb06===_0x331462;},'ANQwN':'pZkJF','IVEiJ':function(_0x1e7637,_0x4644a8,_0x38e0ca){return _0x1e7637(_0x4644a8,_0x38e0ca);},'LhQgd':function(_0x4f8024,_0x390285){return _0x4f8024!==_0x390285;},'cyitP':function(_0x5caa46,_0x45a9f4){return _0x5caa46>_0x45a9f4;},'Klxyv':function(_0xa513c7,_0x40eb20,_0x475c4c,_0x580f16){return _0xa513c7(_0x40eb20,_0x475c4c,_0x580f16);},'EbyaD':function(_0x11f466,_0x2670ec){return _0x11f466(_0x2670ec);},'iEOde':_0x31892a(0x291)};if(!_0x5e847e[_0x31892a(0x25b)])return _0x161201[_0x31892a(0x270)](_0xed7787,_0x161201[_0x31892a(0x1b3)]);let _0x110168,_0x48e684,_0x36c237;async[_0x31892a(0x191)]({'hd2':_0x160121=>{const _0x3a8ea3=_0x31892a,_0xe95471={'gUNFa':function(_0x31beb3,_0x3301cb){return _0x31beb3*_0x3301cb;},'pQdqY':_0x161201['EcNld'],'ETldM':function(_0x204076,_0x1d06a3){return _0x161201['jkQsu'](_0x204076,_0x1d06a3);},'zujII':_0x161201[_0x3a8ea3(0x26e)],'IwWYa':function(_0x18ea1d,_0x3a46cb,_0xcd30a2){const _0x4e2f10=_0x3a8ea3;return _0x161201[_0x4e2f10(0x296)](_0x18ea1d,_0x3a46cb,_0xcd30a2);},'IVQyq':_0x161201['QwOPO'],'ploHo':function(_0xfe4c1d,_0x1318d4){return _0xfe4c1d===_0x1318d4;},'LTCNI':_0x161201[_0x3a8ea3(0x284)],'nOPKc':function(_0x28b168,_0x5181d4){const _0xb6e03f=_0x3a8ea3;return _0x161201[_0xb6e03f(0x192)](_0x28b168,_0x5181d4);},'Lmejo':_0x161201[_0x3a8ea3(0x1fa)],'hsTKL':function(_0x1edf29,_0x4ae64d){const _0x3c8d63=_0x3a8ea3;return _0x161201[_0x3c8d63(0x18a)](_0x1edf29,_0x4ae64d);},'ljcWW':function(_0x2aba4a,_0x24a7b6,_0x477fe0){const _0x425c28=_0x3a8ea3;return _0x161201[_0x425c28(0x296)](_0x2aba4a,_0x24a7b6,_0x477fe0);}};_0x161201[_0x3a8ea3(0x20c)](setImmediate,()=>{const _0x410d9c=_0x3a8ea3,_0xb5c76a={'GwOSP':function(_0x37f9af,_0x47f0e4){return _0xe95471['gUNFa'](_0x37f9af,_0x47f0e4);},'cvLvi':function(_0x33ef56,_0x1c64f2){return _0xe95471['gUNFa'](_0x33ef56,_0x1c64f2);},'VpSyB':_0xe95471[_0x410d9c(0x28c)],'rVsew':function(_0x10f0fe,_0x56d3ba){return _0x10f0fe+_0x56d3ba;},'dANaQ':function(_0x535c0b,_0x459e1f){const _0x57f83f=_0x410d9c;return _0xe95471[_0x57f83f(0x24e)](_0x535c0b,_0x459e1f);},'ScxTC':function(_0x1acf3f,_0x253cc2){return _0x1acf3f===_0x253cc2;},'uSVAP':_0xe95471[_0x410d9c(0x19d)],'AOeYB':function(_0x375170,_0x5aac27,_0x1cb481){return _0xe95471['IwWYa'](_0x375170,_0x5aac27,_0x1cb481);},'CQWVL':_0xe95471[_0x410d9c(0x23a)],'sWFFH':function(_0x4a509e,_0x2a200d){return _0x4a509e(_0x2a200d);}};if(_0xe95471['ploHo'](_0xe95471[_0x410d9c(0x262)],_0xe95471[_0x410d9c(0x262)])){if(!_0x5e847e[_0x410d9c(0x21c)]||_0xe95471['nOPKc'](_0x5e847e[_0x410d9c(0x21c)][_0x410d9c(0x19a)](_0xe95471['Lmejo']),0x0)||_0xe95471[_0x410d9c(0x219)](_0x5e847e[_0x410d9c(0x21c)][_0x410d9c(0x19a)]('SO7'),0x0)){let _0x9f2b78={..._0x5e847e};delete _0x9f2b78[_0x410d9c(0x1bb)],delete _0x9f2b78['show_bonus_points'],hd2[_0x410d9c(0x299)](_0x9f2b78)[_0x410d9c(0x1f7)]()[_0x410d9c(0x174)](_0x50f3de=>{const _0x43c8be=_0x410d9c,_0xdbd975={'gGIrD':function(_0x327383,_0x481336){const _0x3a3309=_0x1fe3;return _0xb5c76a[_0x3a3309(0x1c2)](_0x327383,_0x481336);},'xmVtp':function(_0x1efc75,_0x1f160c){return _0xb5c76a['cvLvi'](_0x1efc75,_0x1f160c);},'wdKls':function(_0xa90943,_0x4b2dff){return _0xb5c76a['cvLvi'](_0xa90943,_0x4b2dff);},'RqQuB':function(_0xcd1fa2,_0x2b7113){return _0xcd1fa2===_0x2b7113;},'oHdMu':_0xb5c76a['VpSyB'],'RvqEg':function(_0x15f9a2,_0x210607){return _0x15f9a2*_0x210607;},'vGAOj':function(_0x20f75c,_0x3290f0){return _0xb5c76a['rVsew'](_0x20f75c,_0x3290f0);},'WhSny':function(_0x227d5c,_0x402325){const _0x2b517b=_0x1fe3;return _0xb5c76a[_0x2b517b(0x24d)](_0x227d5c,_0x402325);}};if(_0xb5c76a['ScxTC'](_0xb5c76a[_0x43c8be(0x28e)],_0xb5c76a[_0x43c8be(0x28e)])){for(let _0x43c36b of _0x50f3de){_0x43c36b['details'][_0x43c8be(0x297)](_0x2c8b21=>{const _0x40c492=_0x43c8be,_0x51d909={'Cnnag':function(_0x547c5d,_0x432b93){const _0x9f51b3=_0x1fe3;return _0xdbd975[_0x9f51b3(0x215)](_0x547c5d,_0x432b93);}};_0x2c8b21[_0x40c492(0x1f1)]=_0x2c8b21[_0x40c492(0x17d)],_0x2c8b21[_0x40c492(0x168)]=_0xdbd975['xmVtp'](_0x2c8b21[_0x40c492(0x1f1)],_0x43c36b[_0x40c492(0x263)]||0x1),_0x2c8b21['tien_hang_ct_nt']=_0x2c8b21[_0x40c492(0x217)],_0x2c8b21[_0x40c492(0x292)]=_0xdbd975[_0x40c492(0x18d)](_0x2c8b21['tien_hang_ct_nt'],_0x43c36b[_0x40c492(0x263)]||0x1),!_0x2c8b21['tien_hang_ct_nt']&&(_0x2c8b21[_0x40c492(0x292)]=_0x2c8b21['tien_hang'],_0x2c8b21['tien_hang_ct_nt']=_0x2c8b21['tien_hang_nt']),!_0x2c8b21['tien_ck_nt']&&_0x2c8b21['tien_ck']?_0x2c8b21[_0x40c492(0x1e2)]=_0x2c8b21[_0x40c492(0x1cd)]:_0xdbd975[_0x40c492(0x1c9)](_0xdbd975[_0x40c492(0x17a)],_0x40c492(0x289))?_0x2c8b21[_0x40c492(0x1cd)]=_0xdbd975[_0x40c492(0x175)](_0x2c8b21[_0x40c492(0x1e2)]||0x0,_0x43c36b[_0x40c492(0x263)]||0x1):_0x2bdef2['tien_ck']=_0x51d909[_0x40c492(0x20d)](_0x4cd4b0[_0x40c492(0x1e2)]||0x0,_0xd6cebe[_0x40c492(0x263)]||0x1),_0x2c8b21['tien_nt']=_0xdbd975[_0x40c492(0x282)](_0xdbd975[_0x40c492(0x1db)](_0x2c8b21[_0x40c492(0x1ef)],_0x2c8b21[_0x40c492(0x1e2)]||0x0),_0x2c8b21[_0x40c492(0x273)]||0x0),_0x2c8b21[_0x40c492(0x1ba)]=_0xdbd975['gGIrD'](_0x2c8b21[_0x40c492(0x17d)],_0x43c36b[_0x40c492(0x263)]||0x1);});}_0x110168=_0x50f3de,_0xb5c76a['AOeYB'](_0x160121,null,_0x50f3de);}else _0xade329[_0x43c8be(0x23c)]={'$elemMatch':{'$or':_0x6cbec7[_0x43c8be(0x269)]}},delete _0x3285a1['$or'];})[_0x410d9c(0x1be)](_0x28f09a=>{const _0x22fbac=_0x410d9c;_0xb5c76a[_0x22fbac(0x169)]==='yHwgV'?((_0x27f493[_0x22fbac(0x23c)]||[])[_0x22fbac(0x297)](_0x5ac79d=>{const _0x584485=_0x22fbac;_0x5ac79d[_0x584485(0x298)]=_0x29d2a7[_0x584485(0x294)](_0x4be749=>_0x4be749['id_hd']===_0x1a5e60['_id'][_0x584485(0x223)]()&&_0x4be749[_0x584485(0x271)]===_0x5ac79d['ma_vt']&&(_0x4be749[_0x584485(0x28a)]==_0x56a86a||_0x4be749[_0x584485(0x28a)]==_0x5ac79d[_0x584485(0x177)])),_0x5ac79d['tien_cp_nt']=_0x5ac79d[_0x584485(0x298)][_0x584485(0x1b5)](_0x5d5117=>_0x5d5117[_0x584485(0x29b)]||0x0)['reduce']((_0x4ea430,_0x24b7b1)=>_0x4ea430+_0x24b7b1,0x0),_0x5ac79d[_0x584485(0x222)]=_0x5ac79d[_0x584485(0x298)][_0x584485(0x1b5)](_0x3e1dcf=>_0x3e1dcf[_0x584485(0x237)]||0x0)[_0x584485(0x15e)]((_0x14138a,_0x2fa3bd)=>_0x14138a+_0x2fa3bd,0x0);}),_0x44b1ba[_0x22fbac(0x18b)]['push'](_0x1d4f09)):_0xb5c76a['sWFFH'](_0x160121,_0x28f09a);});}else _0xe95471['ljcWW'](_0x160121,null,[]);}else _0x57e7fa(null,_0x100cc2,_0x3a86fc);});},'hd4':_0x2008be=>{setImmediate(async()=>{const _0x5d1e1b=_0x1fe3,_0x48be62={'GkEUY':function(_0x58a56d,_0x5383d7,_0x5a332f){const _0xfbccea=_0x1fe3;return _0x161201[_0xfbccea(0x21a)](_0x58a56d,_0x5383d7,_0x5a332f);},'IhRSD':function(_0x4d352e,_0x6c9410){return _0x161201['lWGtU'](_0x4d352e,_0x6c9410);},'emnnr':_0x161201[_0x5d1e1b(0x190)],'EqCYs':_0x5d1e1b(0x1d1),'QeCZP':function(_0x574914,_0x2957df,_0x3c8b19){return _0x161201['pxQDH'](_0x574914,_0x2957df,_0x3c8b19);}};if(!_0x5e847e[_0x5d1e1b(0x21c)]||_0x161201[_0x5d1e1b(0x18a)](_0x5e847e['ma_ct'][_0x5d1e1b(0x19a)](_0x161201[_0x5d1e1b(0x1fa)]),0x0)||_0x161201['WmvVb'](_0x5e847e[_0x5d1e1b(0x21c)]['indexOf'](_0x161201[_0x5d1e1b(0x19e)]),0x0)){let _0x3082f2;_0x5e847e[_0x5d1e1b(0x27c)]?_0x3082f2={'id_app':_0x5e847e[_0x5d1e1b(0x25b)],'details.id_hd':{'$in':(_0x110168||[])[_0x5d1e1b(0x1b5)](_0x477cdd=>_0x477cdd[_0x5d1e1b(0x265)][_0x5d1e1b(0x223)]())}}:(_0x3082f2={..._0x5e847e},delete _0x3082f2[_0x5d1e1b(0x1bb)],delete _0x3082f2[_0x5d1e1b(0x24c)],delete _0x3082f2[_0x5d1e1b(0x21c)]),global[_0x5d1e1b(0x216)](_0x161201['lActv'])[_0x5d1e1b(0x299)](_0x3082f2)[_0x5d1e1b(0x1f7)]()['then'](_0x2309c5=>{const _0x34cae9=_0x5d1e1b;_0x48be62[_0x34cae9(0x231)](_0x48be62[_0x34cae9(0x1aa)],_0x48be62[_0x34cae9(0x162)])?_0x48be62[_0x34cae9(0x181)](_0x2008be,null,_0x2309c5):_0x48be62[_0x34cae9(0x15d)](_0x3b84b6,null,_0x265e27);})[_0x5d1e1b(0x1be)](_0xaa8a0e=>{_0x2008be(_0xaa8a0e);});}else _0x161201['DrOXT'](_0x161201[_0x5d1e1b(0x290)],_0x5d1e1b(0x1cb))?(_0x1aab37[_0x5d1e1b(0x18f)]=_0x11435d[_0x5d1e1b(0x23c)][_0x5d1e1b(0x1b5)](_0x39cbfd=>{return _0x39cbfd;}),_0x186c60[_0x5d1e1b(0x23c)]=[],_0x595ef8[_0x5d1e1b(0x18b)][_0x5d1e1b(0x1e0)](_0x10fc60)):_0x161201[_0x5d1e1b(0x296)](_0x2008be,null,[]);});},'hd3':_0x523723=>{const _0x3b0038=_0x31892a,_0x3619c0={'JBXBX':function(_0x5e5b9a,_0x2bd330){return _0x161201['dTPCn'](_0x5e5b9a,_0x2bd330);},'dqcxb':function(_0x47f9b9,_0x2a080b){return _0x47f9b9+_0x2a080b;},'EgFXr':function(_0x40bd81,_0x5b19d5){const _0x53f42e=_0x1fe3;return _0x161201[_0x53f42e(0x257)](_0x40bd81,_0x5b19d5);},'kJDHY':_0x3b0038(0x287),'UOmlO':function(_0x18087b,_0x55671c){const _0x181605=_0x3b0038;return _0x161201[_0x181605(0x267)](_0x18087b,_0x55671c);}};_0x161201[_0x3b0038(0x243)](setImmediate,()=>{const _0x5b73f6=_0x3b0038,_0x4f04d1={'EgURE':function(_0x2eae43,_0x51b9e3){const _0xe4179e=_0x1fe3;return _0x161201[_0xe4179e(0x186)](_0x2eae43,_0x51b9e3);},'NtZnp':_0x161201[_0x5b73f6(0x25d)],'NyQSN':function(_0x2134a3,_0x4051ca){const _0x3d4442=_0x5b73f6;return _0x161201[_0x3d4442(0x1d8)](_0x2134a3,_0x4051ca);},'DijpR':_0x161201[_0x5b73f6(0x250)],'eatef':function(_0x56ea1f,_0xa57ad4){return _0x56ea1f+_0xa57ad4;},'StUHi':function(_0x5416d8,_0x4376fc){const _0x166d0e=_0x5b73f6;return _0x161201[_0x166d0e(0x20e)](_0x5416d8,_0x4376fc);},'JZZRM':function(_0x2181a8,_0x25a364,_0x2719f5){const _0x34abb7=_0x5b73f6;return _0x161201[_0x34abb7(0x1f6)](_0x2181a8,_0x25a364,_0x2719f5);}};if(_0x161201['lWGtU'](_0x161201[_0x5b73f6(0x209)],_0x5b73f6(0x1e7))){if(!_0x5e847e[_0x5b73f6(0x21c)]||_0x5e847e[_0x5b73f6(0x21c)][_0x5b73f6(0x19a)](_0x5b73f6(0x182))>=0x0||_0x5e847e['ma_ct']['indexOf'](_0x5b73f6(0x28b))>=0x0){let _0x1b150f;_0x5e847e[_0x5b73f6(0x27c)]?_0x161201['sjyfp'](_0x161201[_0x5b73f6(0x195)],_0x161201[_0x5b73f6(0x195)])?_0x5579bd(null,[]):_0x1b150f={'id_app':_0x5e847e[_0x5b73f6(0x25b)],'details.id_hd':{'$in':(_0x110168||[])['map'](_0x3474c2=>_0x3474c2[_0x5b73f6(0x265)][_0x5b73f6(0x223)]())}}:_0x161201[_0x5b73f6(0x164)](_0x161201[_0x5b73f6(0x274)],_0x5b73f6(0x172))?(_0x1b150f={..._0x5e847e},delete _0x1b150f['show_payment_method'],delete _0x1b150f['show_bonus_points'],_0x1b150f['$or']&&_0x1b150f[_0x5b73f6(0x269)][_0x5b73f6(0x299)](_0x2d74f3=>_0x2d74f3['user_nv'])&&(_0x161201[_0x5b73f6(0x164)](_0x5b73f6(0x1ab),_0x161201[_0x5b73f6(0x200)])?(_0x1b150f[_0x5b73f6(0x23c)]={'$elemMatch':{'$or':_0x1b150f[_0x5b73f6(0x269)]}},delete _0x1b150f[_0x5b73f6(0x269)]):_0x622201(null,[])),delete _0x1b150f[_0x5b73f6(0x21c)],delete _0x1b150f[_0x5b73f6(0x27c)]):(_0x336aa9[_0x2b44d3['ma']]=0x0,_0x3619c0['JBXBX'](_0xa1dc5d[_0x5b73f6(0x241)],_0x3847ae['_id'][_0x5b73f6(0x223)]())&&(_0x370502[_0x47f510['ma']]=_0x3619c0[_0x5b73f6(0x18c)](_0x4022dc[_0x2a9e21['ma']],_0x5857bb[_0x5b73f6(0x28d)]||_0x23b4c5[_0x5b73f6(0x256)]||0x0)),_0x3619c0[_0x5b73f6(0x1c4)](_0x2ef950[_0x5b73f6(0x240)],_0x5ed670[_0x5b73f6(0x265)][_0x5b73f6(0x223)]())&&(_0x42f3f6[_0x52b7ec['ma']]=_0x3619c0['dqcxb'](_0x18c36f[_0x2104fe['ma']],_0x2d37fc[_0x5b73f6(0x233)]||0x0)),_0x7a8559[_0x5b73f6(0x28d)]=_0x3ebc03[_0xa57a43['ma']]),hd3['find'](_0x1b150f)[_0x5b73f6(0x1f7)]()[_0x5b73f6(0x174)](_0x2a0533=>{const _0x30292c=_0x5b73f6,_0x4b3c5d={'JoOJC':function(_0x399c5f,_0x4b2f54){const _0xbf186c=_0x1fe3;return _0x4f04d1[_0xbf186c(0x1d9)](_0x399c5f,_0x4b2f54);},'dxRto':_0x4f04d1[_0x30292c(0x1fd)],'OHPlE':function(_0x3d7ebf,_0x4e9a12){const _0x2972cc=_0x30292c;return _0x4f04d1[_0x2972cc(0x234)](_0x3d7ebf,_0x4e9a12);},'JmkcY':_0x4f04d1[_0x30292c(0x25e)],'vJkCZ':function(_0x540a08,_0x5963d0){return _0x4f04d1['eatef'](_0x540a08,_0x5963d0);},'KLcWf':function(_0x368c4e,_0x37ae43){const _0x5b9bd6=_0x30292c;return _0x4f04d1[_0x5b9bd6(0x19b)](_0x368c4e,_0x37ae43);}};_0x2a0533[_0x30292c(0x297)](_0x5eaf3a=>{const _0x3e0873=_0x30292c;_0x5eaf3a[_0x3e0873(0x23c)][_0x3e0873(0x297)](_0xa0b18b=>{const _0x30e411=_0x3e0873;if(_0x4b3c5d[_0x30e411(0x20b)](_0x4b3c5d[_0x30e411(0x1dd)],_0x30e411(0x1f4))){const _0x56925c=_0x4b6e69[_0x30e411(0x1c7)](_0x3364b0,arguments);return _0x38027b=null,_0x56925c;}else _0xa0b18b[_0x30e411(0x168)]=_0xa0b18b[_0x30e411(0x1ba)],_0xa0b18b['tien_hang_nt']=_0xa0b18b[_0x30e411(0x17d)],_0xa0b18b[_0x30e411(0x292)]=_0xa0b18b[_0x30e411(0x1a8)],_0xa0b18b[_0x30e411(0x1ef)]=_0xa0b18b[_0x30e411(0x217)],!_0xa0b18b[_0x30e411(0x1ef)]&&(_0x4b3c5d[_0x30e411(0x1af)](_0x4b3c5d[_0x30e411(0x1a6)],_0x4b3c5d[_0x30e411(0x1a6)])?(_0xa0b18b['tien_hang_ct']=_0xa0b18b[_0x30e411(0x168)],_0xa0b18b[_0x30e411(0x1ef)]=_0xa0b18b[_0x30e411(0x1f1)]):_0x275494(_0x25036f)),_0xa0b18b['tien_nt']=_0x4b3c5d[_0x30e411(0x17f)](_0x4b3c5d[_0x30e411(0x218)](_0xa0b18b[_0x30e411(0x1ef)],_0xa0b18b['tien_ck_nt']||0x0),_0xa0b18b[_0x30e411(0x273)]||0x0),_0xa0b18b[_0x30e411(0x1ba)]=_0xa0b18b[_0x30e411(0x17d)]*(_0x5eaf3a['ty_gia']||0x1);});}),_0x4f04d1[_0x30292c(0x252)](_0x523723,null,_0x2a0533);})[_0x5b73f6(0x1be)](_0x5ebc08=>{const _0xba1b68=_0x5b73f6;_0x3619c0[_0xba1b68(0x26f)](_0x3619c0['kJDHY'],_0x3619c0[_0xba1b68(0x1a0)])?_0x390d8f[_0xba1b68(0x193)][_0xba1b68(0x297)](_0xcb9424=>{const _0x568a44=_0xba1b68;_0xcb9424=_0x4f8754['assign']({},_0xcb9424),_0xcb9424[_0x568a44(0x259)]=_0xcb9424[_0x568a44(0x187)],_0x8a512c['details'][_0x568a44(0x1e0)](_0xcb9424);}):_0x523723(_0x5ebc08);});}else _0x161201[_0x5b73f6(0x296)](_0x523723,null,[]);}else _0xd91730[_0x730e8b['ma']]=_0x3619c0[_0x5b73f6(0x266)](_0x450df5[_0x637ca2['ma']],_0x376e45[_0x5b73f6(0x28d)]||_0x5da9ad[_0x5b73f6(0x256)]||0x0);});},'pbl':_0x141bd8=>{const _0x3aa81f=_0x31892a,_0x221b69={'bXxhR':function(_0x1ddc53,_0x129363){return _0x161201['ijqYJ'](_0x1ddc53,_0x129363);},'rTLaZ':function(_0x193f24,_0x4276ff){const _0x94c8c=_0x1fe3;return _0x161201[_0x94c8c(0x201)](_0x193f24,_0x4276ff);},'NdjbJ':function(_0x34d967,_0xc5d2c8){const _0x578a7a=_0x1fe3;return _0x161201[_0x578a7a(0x267)](_0x34d967,_0xc5d2c8);},'Tbvaz':function(_0x2fb2b0,_0x5708e8){return _0x2fb2b0-_0x5708e8;},'ZvzIh':function(_0x4546eb,_0x2b2a56){const _0x49114f=_0x1fe3;return _0x161201[_0x49114f(0x201)](_0x4546eb,_0x2b2a56);},'aTDZN':function(_0x320cc6,_0x24dd79){return _0x320cc6!==_0x24dd79;},'kSkLV':function(_0x1852e0,_0x58e7dc){return _0x161201['aunCr'](_0x1852e0,_0x58e7dc);},'bDhbb':function(_0x2d2865,_0x404b6a){const _0x561b49=_0x1fe3;return _0x161201[_0x561b49(0x20e)](_0x2d2865,_0x404b6a);},'uneXj':function(_0x4c77c0,_0x39db82){const _0x154591=_0x1fe3;return _0x161201[_0x154591(0x1d8)](_0x4c77c0,_0x39db82);},'mTroy':_0x3aa81f(0x1a1),'vLkvV':function(_0x5e5de1,_0x50104c,_0x518890){return _0x161201['pxQDH'](_0x5e5de1,_0x50104c,_0x518890);},'ashez':function(_0x49f341,_0x2d2579){return _0x49f341===_0x2d2579;},'TxNYO':_0x3aa81f(0x1cc),'APjUH':function(_0x5b48bc,_0x37e48f){return _0x161201['uleLa'](_0x5b48bc,_0x37e48f);},'nOeiC':_0x161201[_0x3aa81f(0x1ed)],'JcXQH':function(_0x4c74ab,_0x5dd7b6){return _0x4c74ab>=_0x5dd7b6;},'JMYjn':_0x3aa81f(0x208),'cUWSc':_0x161201[_0x3aa81f(0x25a)],'YcQZR':_0x161201[_0x3aa81f(0x210)]};setImmediate(()=>{const _0x367774=_0x3aa81f,_0x2db1b7={'TaRsE':function(_0x2b6793,_0x57805b){const _0xd940a9=_0x1fe3;return _0x221b69[_0xd940a9(0x22b)](_0x2b6793,_0x57805b);},'ppeyb':function(_0x179e08,_0x530f71){const _0x48290d=_0x1fe3;return _0x221b69[_0x48290d(0x20a)](_0x179e08,_0x530f71);},'ELigy':function(_0x2e1bff,_0x2e5b62){const _0x22e287=_0x1fe3;return _0x221b69[_0x22e287(0x15f)](_0x2e1bff,_0x2e5b62);},'etrsX':function(_0x5d6a11,_0x223b30){const _0x590239=_0x1fe3;return _0x221b69[_0x590239(0x281)](_0x5d6a11,_0x223b30);},'aNWUl':function(_0x2c1b62,_0xf38efb){const _0x1c4ae4=_0x1fe3;return _0x221b69[_0x1c4ae4(0x16b)](_0x2c1b62,_0xf38efb);},'naUAl':function(_0x439989,_0x59a8d5){const _0x2164e8=_0x1fe3;return _0x221b69[_0x2164e8(0x1a2)](_0x439989,_0x59a8d5);},'oUpTy':_0x367774(0x224),'lVidV':function(_0x3ba4b8,_0x21c5aa){return _0x221b69['kSkLV'](_0x3ba4b8,_0x21c5aa);},'NABpl':function(_0x50ae78,_0x4cfbc2){return _0x221b69['bDhbb'](_0x50ae78,_0x4cfbc2);},'vDcjQ':function(_0x49af09,_0x57391a){const _0x528b24=_0x367774;return _0x221b69[_0x528b24(0x1e3)](_0x49af09,_0x57391a);},'bibYK':_0x221b69[_0x367774(0x179)],'dCjtG':function(_0x109405,_0x3bd9aa){const _0x8751ac=_0x367774;return _0x221b69[_0x8751ac(0x15f)](_0x109405,_0x3bd9aa);},'nCykq':function(_0x38c78c,_0x3fe1f5,_0x4ebb1d){const _0x269e6a=_0x367774;return _0x221b69[_0x269e6a(0x1d4)](_0x38c78c,_0x3fe1f5,_0x4ebb1d);},'eQXDN':function(_0x318f56,_0xd4f50a){const _0x21bdc1=_0x367774;return _0x221b69[_0x21bdc1(0x1fc)](_0x318f56,_0xd4f50a);},'kVemT':_0x221b69[_0x367774(0x278)],'mfPkw':function(_0x49882e,_0x2d8933){return _0x221b69['APjUH'](_0x49882e,_0x2d8933);},'rtQYq':function(_0x581351,_0x23718e){const _0x2603d3=_0x367774;return _0x221b69[_0x2603d3(0x204)](_0x581351,_0x23718e);}};if(_0x221b69[_0x367774(0x1a2)](_0x221b69[_0x367774(0x27f)],_0x221b69['nOeiC'])){const _0x16e683=_0x367774(0x1a7)[_0x367774(0x275)]('|');let _0x2d1442=0x0;while(!![]){switch(_0x16e683[_0x2d1442++]){case'0':!_0x2e21b8[_0x367774(0x1ef)]&&(_0x14ea4f[_0x367774(0x292)]=_0x3cea06[_0x367774(0x168)],_0x5bc128[_0x367774(0x1ef)]=_0x287693[_0x367774(0x1f1)]);continue;case'1':_0x2d805[_0x367774(0x168)]=_0x2db1b7[_0x367774(0x160)](_0x3d2b20[_0x367774(0x1f1)],_0x4aa86a[_0x367774(0x263)]||0x1);continue;case'2':!_0x125047[_0x367774(0x1e2)]&&_0x5f16e6[_0x367774(0x1cd)]?_0x3ac654[_0x367774(0x1e2)]=_0xa17746[_0x367774(0x1cd)]:_0xbed181[_0x367774(0x1cd)]=_0x2db1b7[_0x367774(0x160)](_0xbad792[_0x367774(0x1e2)]||0x0,_0x42dfef[_0x367774(0x263)]||0x1);continue;case'3':_0x55ebf4[_0x367774(0x1ef)]=_0x25609e['tien_hang_ct_nt']||0x0;continue;case'4':_0x2524e1[_0x367774(0x1f1)]=_0x5db1a6[_0x367774(0x1f1)]||0x0;continue;case'5':_0x1446d0[_0x367774(0x292)]=_0x2db1b7['ppeyb'](_0x14794a[_0x367774(0x1ef)],_0x79cc17['ty_gia']||0x1);continue;case'6':_0x5a4242[_0x367774(0x17d)]=_0x2db1b7['ELigy'](_0x2db1b7['etrsX'](_0x83f131['tien_hang_ct_nt'],_0x1ac50f['tien_ck_nt']||0x0),_0x5dc581[_0x367774(0x273)]||0x0);continue;case'7':_0x2131e3[_0x367774(0x1ba)]=_0x2db1b7[_0x367774(0x28f)](_0x2ba12c[_0x367774(0x17d)],_0x16f161[_0x367774(0x263)]||0x1);continue;}break;}}else{if(!_0x5e847e['ma_ct']||_0x221b69[_0x367774(0x213)](_0x5e847e[_0x367774(0x21c)][_0x367774(0x19a)](_0x221b69[_0x367774(0x1f9)]),0x0)){if(_0x367774(0x184)===_0x221b69[_0x367774(0x16c)]){let _0x13bdb2={..._0x5e847e};delete _0x13bdb2[_0x367774(0x1bb)],delete _0x13bdb2['show_bonus_points'],pbl[_0x367774(0x299)](_0x13bdb2)['lean']()[_0x367774(0x174)](_0x2c1361=>{const _0x1735c2=_0x367774,_0x370e4e={'mOByp':function(_0x505afe,_0x1ed1ab){const _0x4fcc68=_0x1fe3;return _0x2db1b7[_0x4fcc68(0x173)](_0x505afe,_0x1ed1ab);}};_0x2c1361[_0x1735c2(0x297)](_0x134717=>{const _0x9e0c32=_0x1735c2,_0x167729={'MHZAh':function(_0x1b7adb,_0x20c9ec){const _0x45f153=_0x1fe3;return _0x2db1b7[_0x45f153(0x1da)](_0x1b7adb,_0x20c9ec);},'bNJQK':function(_0x28b2dc,_0x203109){const _0x269c26=_0x1fe3;return _0x2db1b7[_0x269c26(0x251)](_0x28b2dc,_0x203109);},'HeKHX':_0x2db1b7['oUpTy'],'YXUZx':function(_0x5937c9,_0x3dfc6c){const _0x52c80d=_0x1fe3;return _0x2db1b7[_0x52c80d(0x230)](_0x5937c9,_0x3dfc6c);},'GlrZL':function(_0x224cee,_0x4d5920){return _0x2db1b7['NABpl'](_0x224cee,_0x4d5920);}};_0x2db1b7[_0x9e0c32(0x18e)](_0x2db1b7[_0x9e0c32(0x276)],_0x2db1b7[_0x9e0c32(0x276)])?_0x134717[_0x9e0c32(0x23c)][_0x9e0c32(0x297)](_0x2c95a3=>{const _0x35039d=_0x9e0c32,_0x450b1f={'USuhw':function(_0x55b84e,_0x2890bb,_0x34f39a){return _0x55b84e(_0x2890bb,_0x34f39a);}};_0x2c95a3[_0x35039d(0x1f1)]=_0x2c95a3[_0x35039d(0x1f1)]||0x0,_0x2c95a3[_0x35039d(0x168)]=_0x167729['MHZAh'](_0x2c95a3[_0x35039d(0x1f1)],_0x134717[_0x35039d(0x263)]||0x1),_0x2c95a3[_0x35039d(0x1ef)]=_0x2c95a3[_0x35039d(0x1ef)]||0x0,_0x2c95a3[_0x35039d(0x292)]=_0x2c95a3[_0x35039d(0x1ef)]*(_0x134717[_0x35039d(0x263)]||0x1),!_0x2c95a3['tien_hang_ct_nt']&&(_0x167729[_0x35039d(0x293)](_0x167729[_0x35039d(0x180)],_0x167729[_0x35039d(0x180)])?_0x450b1f[_0x35039d(0x21f)](_0x5e4b46,null,_0x4fdb2a):(_0x2c95a3['tien_hang_ct']=_0x2c95a3[_0x35039d(0x168)],_0x2c95a3[_0x35039d(0x1ef)]=_0x2c95a3['tien_hang_nt'])),!_0x2c95a3[_0x35039d(0x1e2)]&&_0x2c95a3['tien_ck']?_0x2c95a3[_0x35039d(0x1e2)]=_0x2c95a3[_0x35039d(0x1cd)]:_0x2c95a3[_0x35039d(0x1cd)]=_0x167729[_0x35039d(0x165)](_0x2c95a3[_0x35039d(0x1e2)]||0x0,_0x134717[_0x35039d(0x263)]||0x1),_0x2c95a3[_0x35039d(0x17d)]=_0x167729[_0x35039d(0x1dc)](_0x2c95a3['tien_hang_ct_nt'],_0x2c95a3[_0x35039d(0x1e2)]||0x0)+(_0x2c95a3['tien_thue_nt']||0x0),_0x2c95a3['tien']=_0x167729[_0x35039d(0x165)](_0x2c95a3[_0x35039d(0x17d)],_0x134717['ty_gia']||0x1);}):_0x46e756[_0x4dc238['ma']]=_0x370e4e[_0x9e0c32(0x161)](_0x2d47d9[_0x372d28['ma']],_0x3fce45[_0x9e0c32(0x233)]||0x0);}),_0x48e684=_0x2c1361,_0x2db1b7[_0x1735c2(0x249)](_0x141bd8,null,_0x2c1361);})[_0x367774(0x1be)](_0x2efa8b=>{const _0x34a69a=_0x367774;_0x2db1b7[_0x34a69a(0x202)](_0x2db1b7[_0x34a69a(0x1b6)],_0x34a69a(0x1cc))?_0x2db1b7[_0x34a69a(0x183)](_0x141bd8,_0x2efa8b):(_0xdf8d93[_0x34a69a(0x292)]=_0x13520b['tien_hang'],_0x290632['tien_hang_ct_nt']=_0x1f5e54[_0x34a69a(0x1f1)]);});}else _0x43306d[_0x367774(0x1cd)]=_0x2db1b7['rtQYq'](_0x335f4a[_0x367774(0x1e2)]||0x0,_0x2095aa[_0x367774(0x263)]||0x1);}else _0x367774(0x1f5)===_0x221b69['YcQZR']?_0x3892bd(null,[]):_0x141bd8(null,[]);}});},'so':_0x8d8f98=>{const _0x125e9d=_0x31892a,_0x1fe768={'oNsDK':function(_0x9c426,_0x3f31b6,_0xaf0b72){return _0x161201['HOuCz'](_0x9c426,_0x3f31b6,_0xaf0b72);}};_0x161201[_0x125e9d(0x1fe)]!==_0x161201[_0x125e9d(0x1fe)]?(_0x13d54b['tien_hang_ct']=_0x56c228[_0x125e9d(0x168)],_0x309519[_0x125e9d(0x1ef)]=_0x4601b3[_0x125e9d(0x1f1)]):_0x161201['inukh'](setImmediate,()=>{const _0xb48720=_0x125e9d,_0xedd59d={'LWTJW':function(_0x3dba8f,_0x4070c0){const _0x5e2dd8=_0x1fe3;return _0x161201[_0x5e2dd8(0x24b)](_0x3dba8f,_0x4070c0);},'SnbcF':function(_0x4cae7c,_0xbec7d7){return _0x161201['jkQsu'](_0x4cae7c,_0xbec7d7);},'HBRrF':function(_0x1b1e45,_0x2e6728){const _0x3c748a=_0x1fe3;return _0x161201[_0x3c748a(0x16a)](_0x1b1e45,_0x2e6728);}};if(_0x161201[_0xb48720(0x186)](_0x161201[_0xb48720(0x1c1)],_0x161201[_0xb48720(0x189)])){if(!_0x5e847e[_0xb48720(0x21c)]||_0x5e847e[_0xb48720(0x21c)]['indexOf'](_0x161201[_0xb48720(0x188)])>=0x0){let _0x417443={..._0x5e847e};delete _0x417443[_0xb48720(0x1bb)],delete _0x417443['show_bonus_points'],so1[_0xb48720(0x299)](_0x417443)['lean']()[_0xb48720(0x174)](_0x23c3c8=>{const _0xb27bc0=_0xb48720;_0x23c3c8[_0xb27bc0(0x297)](_0x33d637=>{const _0x20b2f8=_0xb27bc0,_0xc65c0f={'YcWxd':function(_0x17e117,_0x4406c1){const _0xc3788f=_0x1fe3;return _0xedd59d[_0xc3788f(0x1c0)](_0x17e117,_0x4406c1);},'KyNnq':function(_0x1fc793,_0x30136f){const _0x5c7fbb=_0x1fe3;return _0xedd59d[_0x5c7fbb(0x25f)](_0x1fc793,_0x30136f);},'MwmGn':function(_0x3866d4,_0x19863b){return _0x3866d4+_0x19863b;}};_0x33d637[_0x20b2f8(0x212)]=_0x33d637[_0x20b2f8(0x286)]||_0x33d637['ngay_ct'],_0x33d637[_0x20b2f8(0x23c)][_0x20b2f8(0x297)](_0x539103=>{const _0x2e49de=_0x20b2f8;!_0x539103[_0x2e49de(0x1ef)]&&(_0x539103[_0x2e49de(0x292)]=_0x539103['tien_hang'],_0x539103[_0x2e49de(0x1ef)]=_0x539103[_0x2e49de(0x1f1)]),_0x539103[_0x2e49de(0x17d)]=_0xc65c0f[_0x2e49de(0x1df)](_0xc65c0f['KyNnq'](_0x539103[_0x2e49de(0x1ef)],_0x539103[_0x2e49de(0x1e2)]||0x0),_0x539103[_0x2e49de(0x273)]||0x0),_0x539103['tien']=_0xc65c0f[_0x2e49de(0x1c6)](_0x539103[_0x2e49de(0x292)]-(_0x539103[_0x2e49de(0x1cd)]||0x0),_0x539103['tien_thue_nt']||0x0);});}),_0x36c237=_0x23c3c8,_0x1fe768[_0xb27bc0(0x1ad)](_0x8d8f98,null,_0x23c3c8);})[_0xb48720(0x1be)](_0x527a87=>{const _0x4a6f54=_0xb48720;_0xedd59d[_0x4a6f54(0x1bd)](_0x8d8f98,_0x527a87);});}else _0x161201[_0xb48720(0x1f6)](_0x8d8f98,null,[]);}else _0x1d20d9=_0x3fa14c[_0xb48720(0x22f)]({},_0x2b744b),_0xc8215d[_0xb48720(0x259)]=_0x912547['sl_km'],_0x39ba6d[_0xb48720(0x23c)][_0xb48720(0x1e0)](_0x574ec8);});},'hd7':_0x14750c=>{const _0xcd7b88=_0x31892a,_0x582ad2={'zNtTs':function(_0x17223e,_0x566ebf){return _0x17223e!==_0x566ebf;},'MdtnF':_0xcd7b88(0x254),'VriBJ':function(_0x2fc26e,_0x551f04,_0xb82dc5){return _0x2fc26e(_0x551f04,_0xb82dc5);},'ZtFXR':_0x161201[_0xcd7b88(0x295)],'YComo':function(_0x215643,_0x2f0fae){const _0x4a8359=_0xcd7b88;return _0x161201[_0x4a8359(0x16a)](_0x215643,_0x2f0fae);},'PdxkJ':function(_0x512d32,_0x1511a0){const _0xc91273=_0xcd7b88;return _0x161201[_0xc91273(0x192)](_0x512d32,_0x1511a0);},'jRIcM':_0xcd7b88(0x208),'ZGjDx':'SO1','ZVejK':function(_0x42dbea,_0x327008){return _0x161201['mqNII'](_0x42dbea,_0x327008);},'gnuJi':_0x161201[_0xcd7b88(0x178)],'EIKWm':function(_0x547a1d,_0x29d98b){const _0x3b1ebd=_0xcd7b88;return _0x161201[_0x3b1ebd(0x164)](_0x547a1d,_0x29d98b);},'gRKvl':_0x161201['qkKTG'],'uNKqA':function(_0x53bb2e,_0x19105f){return _0x53bb2e!==_0x19105f;},'whQPY':_0x161201[_0xcd7b88(0x1d2)],'EYcVM':_0xcd7b88(0x225),'Mrruz':_0x161201[_0xcd7b88(0x194)]};_0x161201['uleLa'](setImmediate,()=>{const _0x3d52c7=_0xcd7b88,_0x53ff7a={'FBSOP':function(_0x287dc3,_0x3f83a4){return _0x582ad2['YComo'](_0x287dc3,_0x3f83a4);}};if(!_0x5e847e[_0x3d52c7(0x21c)]||_0x582ad2[_0x3d52c7(0x1c5)](_0x5e847e[_0x3d52c7(0x21c)][_0x3d52c7(0x19a)](_0x582ad2['jRIcM']),0x0)||_0x582ad2[_0x3d52c7(0x1c5)](_0x5e847e[_0x3d52c7(0x21c)][_0x3d52c7(0x19a)](_0x582ad2[_0x3d52c7(0x247)]),0x0)){if(_0x582ad2['ZVejK'](_0x582ad2['gnuJi'],_0x582ad2[_0x3d52c7(0x1e5)])){let _0x176b54;if(_0x5e847e[_0x3d52c7(0x27c)]){if(_0x582ad2[_0x3d52c7(0x196)](_0x582ad2[_0x3d52c7(0x264)],_0x3d52c7(0x1ff)))_0x44e216={'id_app':_0x17eeda['id_app'],'details.id_hd':{'$in':(_0x577d40||[])[_0x3d52c7(0x1b5)](_0x33cc6d=>_0x33cc6d['_id'][_0x3d52c7(0x223)]())}};else{let _0x54ff02=(_0x48e684||[])[_0x3d52c7(0x1b5)](_0x412353=>_0x412353['_id']['toString']());_0x54ff02=[..._0x54ff02,...(_0x36c237||[])[_0x3d52c7(0x1b5)](_0x150631=>_0x150631[_0x3d52c7(0x265)]['toString']())],_0x176b54={'id_app':_0x5e847e['id_app'],'details.id_hd':{'$in':_0x54ff02}};}}else{if(_0x582ad2[_0x3d52c7(0x24f)](_0x582ad2['whQPY'],_0x582ad2[_0x3d52c7(0x171)]))_0x18fbe4(null,_0x54e506);else{const _0xf39033=_0x582ad2[_0x3d52c7(0x22e)][_0x3d52c7(0x275)]('|');let _0x431aef=0x0;while(!![]){switch(_0xf39033[_0x431aef++]){case'0':_0x176b54={..._0x5e847e};continue;case'1':delete _0x176b54[_0x3d52c7(0x24c)];continue;case'2':delete _0x176b54[_0x3d52c7(0x1bb)];continue;case'3':delete _0x176b54[_0x3d52c7(0x27c)];continue;case'4':delete _0x176b54[_0x3d52c7(0x21c)];continue;}break;}}}hd7[_0x3d52c7(0x299)](_0x176b54)[_0x3d52c7(0x1f7)]()[_0x3d52c7(0x174)](_0x157c7e=>{const _0x29119b=_0x3d52c7;_0x582ad2[_0x29119b(0x227)](_0x29119b(0x254),_0x582ad2['MdtnF'])?(_0x1b487a[_0x29119b(0x23c)][_0x29119b(0x294)](_0x50cb7d=>_0x50cb7d['promotion']&&_0x50cb7d[_0x29119b(0x193)][_0x29119b(0x29a)])[_0x29119b(0x1b5)](_0x262710=>_0x262710['promotion']['details_km'])[_0x29119b(0x15e)]((_0x35fcda,_0x242fc9)=>_0x35fcda['concat'](_0x242fc9),[])[_0x29119b(0x297)](_0x57f8e4=>{const _0x2fba5a=_0x29119b;_0x57f8e4[_0x2fba5a(0x259)]=_0x57f8e4[_0x2fba5a(0x187)],_0x6c6edb[_0x2fba5a(0x23c)][_0x2fba5a(0x1e0)](_0x57f8e4);}),_0x417918[_0x29119b(0x193)]&&_0x38618a['promotion']['forEach'](_0x2aa0d9=>{const _0x304525=_0x29119b;_0x2aa0d9=_0x8b5dfa[_0x304525(0x22f)]({},_0x2aa0d9),_0x2aa0d9['sl_xuat']=_0x2aa0d9[_0x304525(0x187)],_0x17efbb[_0x304525(0x23c)][_0x304525(0x1e0)](_0x2aa0d9);})):_0x582ad2['VriBJ'](_0x14750c,null,_0x157c7e);})['catch'](_0x402940=>{const _0x182f55=_0x3d52c7;_0x53ff7a[_0x182f55(0x17e)](_0x14750c,_0x402940);});}else return _0x21f179['receiver'][_0x3d52c7(0x226)][_0x3d52c7(0x1ee)]()===_0x56f49a[_0x3d52c7(0x1e8)][_0x3d52c7(0x1ee)]();}else{if(_0x582ad2['EIKWm']('Ogihn',_0x582ad2['Mrruz']))return _0x6cc711[_0x3d52c7(0x223)]()[_0x3d52c7(0x1e4)](kAblBJ[_0x3d52c7(0x1c8)])['toString']()[_0x3d52c7(0x220)](_0x42bd6f)[_0x3d52c7(0x1e4)](_0x3d52c7(0x167));else _0x582ad2[_0x3d52c7(0x21b)](_0x14750c,null,[]);}});}},async(_0x49300,_0x942fed)=>{const _0x2a293d=_0x31892a,_0x30fd03={'fmXVX':function(_0x197341,_0x541d0d){const _0x4b433d=_0x1fe3;return _0x161201[_0x4b433d(0x198)](_0x197341,_0x541d0d);},'kpReL':function(_0x169b83,_0x53101b){const _0xb2cc4=_0x1fe3;return _0x161201[_0xb2cc4(0x20c)](_0x169b83,_0x53101b);},'oFOUh':_0x161201[_0x2a293d(0x197)],'zjOBz':function(_0x1d60fc){return _0x1d60fc();},'NVXRx':function(_0x15576c,_0x4cc989,_0x3b0fbe){const _0x1abc00=_0x2a293d;return _0x161201[_0x1abc00(0x285)](_0x15576c,_0x4cc989,_0x3b0fbe);},'blgtk':function(_0x54ec4b,_0x333cc3){const _0x386c52=_0x2a293d;return _0x161201[_0x386c52(0x279)](_0x54ec4b,_0x333cc3);},'hekRo':function(_0x18c83b,_0x6a24a4){return _0x161201['LhQgd'](_0x18c83b,_0x6a24a4);},'JJCit':'zvjaa','AgEHz':function(_0x1d678e,_0x36395e){return _0x1d678e(_0x36395e);},'Wkgyy':function(_0x5f0e94,_0x4f46fd){return _0x161201['cyitP'](_0x5f0e94,_0x4f46fd);},'ZQhbb':function(_0x1e1e3d,_0x17dce1,_0x21e495,_0x104863){const _0x20744d=_0x2a293d;return _0x161201[_0x20744d(0x185)](_0x1e1e3d,_0x17dce1,_0x21e495,_0x104863);}};if(_0x49300)return _0x161201['EbyaD'](_0xed7787,_0x49300);async[_0x2a293d(0x221)]({'pbl':_0x4efbeb=>{const _0x12b59e=_0x2a293d,_0x332e3d={'NARgK':function(_0x201eda,_0x84692){const _0x4dc571=_0x1fe3;return _0x30fd03[_0x4dc571(0x1ae)](_0x201eda,_0x84692);},'FkuLf':'QBmgW'};_0x30fd03[_0x12b59e(0x277)](setImmediate,()=>{const _0x3f4b67=_0x12b59e,_0x5a609b={'LSOAD':function(_0x99266f,_0x2787ad){return _0x99266f+_0x2787ad;}};_0x942fed[_0x3f4b67(0x18b)]['forEach'](_0x77f5e7=>{const _0x547636=_0x3f4b67;_0x332e3d['NARgK'](_0x332e3d[_0x547636(0x22a)],_0x332e3d[_0x547636(0x22a)])?(_0x77f5e7[_0x547636(0x23c)][_0x547636(0x294)](_0x26a645=>_0x26a645[_0x547636(0x193)]&&_0x26a645[_0x547636(0x193)]['details_km'])[_0x547636(0x1b5)](_0x536a4c=>_0x536a4c[_0x547636(0x193)][_0x547636(0x29a)])[_0x547636(0x15e)]((_0x555818,_0x29f1a3)=>_0x555818[_0x547636(0x1de)](_0x29f1a3),[])['forEach'](_0x191a4f=>{const _0x4895fa=_0x547636,_0x2323dd={'wiYmd':function(_0x3baf6d,_0x31b655){return _0x3baf6d===_0x31b655;},'ulGem':function(_0x4494b1,_0x5979f0){return _0x5a609b['LSOAD'](_0x4494b1,_0x5979f0);}};_0x4895fa(0x207)!==_0x4895fa(0x211)?(_0x191a4f[_0x4895fa(0x259)]=_0x191a4f[_0x4895fa(0x187)],_0x77f5e7[_0x4895fa(0x23c)]['push'](_0x191a4f)):(_0x531c5c[_0x4895fa(0x26c)]=_0xbc88e0,_0x4f5df0['thanh_toan']['forEach'](_0x24b3a3=>{const _0x5ca7cb=_0x4895fa;_0x1cea37[_0x24b3a3['ma']]=0x0,_0x2323dd[_0x5ca7cb(0x24a)](_0x5539e8[_0x5ca7cb(0x241)],_0x24b3a3[_0x5ca7cb(0x265)][_0x5ca7cb(0x223)]())&&(_0x43808c[_0x24b3a3['ma']]=_0x5e2755[_0x24b3a3['ma']]+(_0x4a88db['tien_thu']||_0x24b84f[_0x5ca7cb(0x256)]||0x0)),_0x2323dd[_0x5ca7cb(0x24a)](_0x59d5bf[_0x5ca7cb(0x240)],_0x24b3a3[_0x5ca7cb(0x265)]['toString']())&&(_0x1dbb47[_0x24b3a3['ma']]=_0x2323dd['ulGem'](_0x157d04[_0x24b3a3['ma']],_0x1f42c0[_0x5ca7cb(0x233)]||0x0)),_0x24b3a3['tien_thu']=_0x367908[_0x24b3a3['ma']];}));}),_0x77f5e7['promotion']&&_0x77f5e7[_0x547636(0x193)]['forEach'](_0x50f235=>{const _0x19f2cf=_0x547636;_0x50f235=Object[_0x19f2cf(0x22f)]({},_0x50f235),_0x50f235[_0x19f2cf(0x259)]=_0x50f235['sl_km'],_0x77f5e7['details'][_0x19f2cf(0x1e0)](_0x50f235);})):_0x3cdc6d(_0x9716da);}),_0x4efbeb();});},'so':_0x1027ac=>{const _0x585680=_0x2a293d,_0xfec0f3={'jBBdU':function(_0x12a2d7,_0x3e81ed){return _0x161201['qDkpI'](_0x12a2d7,_0x3e81ed);},'cpaqb':_0x161201[_0x585680(0x199)],'Aehpy':function(_0xe2d6ce,_0x29e241){return _0x161201['ByxIa'](_0xe2d6ce,_0x29e241);},'vNUFF':_0x585680(0x1b7),'jKiVr':_0x161201[_0x585680(0x206)],'ctbhR':function(_0x4b1efd){return _0x161201['XUhOP'](_0x4b1efd);}};_0x161201['SsVLR'](setImmediate,()=>{const _0x1aaefa=_0x585680,_0x1f034c={'VcqPw':function(_0xcac2d8,_0x39117c){const _0x49aac5=_0x1fe3;return _0xfec0f3[_0x49aac5(0x29d)](_0xcac2d8,_0x39117c);},'sLcNN':_0xfec0f3['vNUFF'],'rOCfU':_0x1aaefa(0x21d),'mTJIn':_0xfec0f3[_0x1aaefa(0x214)],'rbUAv':function(_0x271c92,_0x9bb76a){return _0x271c92+_0x9bb76a;}};(_0x942fed['so']||[])[_0x1aaefa(0x297)](_0x52aaa9=>{const _0x2b00c3=_0x1aaefa;_0x52aaa9[_0x2b00c3(0x1ce)]&&(_0xfec0f3['jBBdU'](_0xfec0f3[_0x2b00c3(0x288)],_0xfec0f3[_0x2b00c3(0x288)])?_0x45fcb6['tien_ck_nt']=_0x462651[_0x2b00c3(0x1cd)]:_0x52aaa9[_0x2b00c3(0x1ce)][_0x2b00c3(0x297)](_0x339bee=>{const _0x16444f=_0x2b00c3;if(_0x1f034c['VcqPw'](_0x1f034c['sLcNN'],_0x1f034c[_0x16444f(0x1cf)]))_0x598c46['tien_hang_ct']=_0x57d074[_0x16444f(0x168)],_0x4c90be[_0x16444f(0x1ef)]=_0x44a1af[_0x16444f(0x1f1)];else{const _0x4521af=_0x1f034c[_0x16444f(0x23d)][_0x16444f(0x275)]('|');let _0x3f1bfd=0x0;while(!![]){switch(_0x4521af[_0x3f1bfd++]){case'0':_0x339bee[_0x16444f(0x259)]=0x0;continue;case'1':_0x339bee[_0x16444f(0x1ba)]=_0x1f034c[_0x16444f(0x228)](_0x339bee[_0x16444f(0x168)],_0x339bee[_0x16444f(0x222)]);continue;case'2':_0x339bee['tien_hang']=0x0;continue;case'3':_0x52aaa9[_0x16444f(0x23c)][_0x16444f(0x1e0)](_0x339bee);continue;case'4':_0x339bee[_0x16444f(0x17d)]=_0x339bee[_0x16444f(0x1f1)]+_0x339bee['tien_cp_nt'];continue;case'5':_0x339bee[_0x16444f(0x1f1)]=0x0;continue;}break;}}})),_0x942fed[_0x2b00c3(0x18b)][_0x2b00c3(0x1e0)](_0x52aaa9);}),_0xfec0f3[_0x1aaefa(0x1e6)](_0x1027ac);});},'hd2':_0x4bf57e=>{const _0xb9b668=_0x2a293d,_0xf5eb6b={'xbPAu':function(_0xdd99cd,_0x22987a,_0x35165a){return _0x30fd03['NVXRx'](_0xdd99cd,_0x22987a,_0x35165a);},'VCMJx':function(_0x2d62ad,_0x1e6ef4){const _0x350dfb=_0x1fe3;return _0x30fd03[_0x350dfb(0x1a9)](_0x2d62ad,_0x1e6ef4);},'pyVBt':function(_0x4160f9,_0x4be398){return _0x4160f9*_0x4be398;}};_0x30fd03['hekRo'](_0x30fd03[_0xb9b668(0x16d)],'zvjaa')?_0xf5eb6b[_0xb9b668(0x232)](_0x434103,null,[]):_0x30fd03[_0xb9b668(0x21e)](setImmediate,()=>{const _0x531568=_0xb9b668;if(_0x30fd03[_0x531568(0x1ae)](_0x30fd03['oFOUh'],_0x531568(0x1a5))){let _0x3a4f79=(_0x942fed[_0x531568(0x1a4)]||[])[_0x531568(0x1b5)](_0x221880=>_0x221880[_0x531568(0x23c)]||[])['reduce']((_0x56112a,_0x41734a)=>_0x56112a[_0x531568(0x1de)](_0x41734a),[]);_0x942fed[_0x531568(0x22c)]['forEach'](_0x561a77=>{const _0x12fb78=_0x531568,_0x292c24={'AnQtL':function(_0x20ee1b,_0x53b453){return _0xf5eb6b['VCMJx'](_0x20ee1b,_0x53b453);}};(_0x561a77[_0x12fb78(0x23c)]||[])[_0x12fb78(0x297)](_0x4bef90=>{const _0x5315ac=_0x12fb78;if('ZWDfA'===_0x5315ac(0x1ca))_0x4bef90['chi_phi_bh']=_0x3a4f79[_0x5315ac(0x294)](_0x5d0103=>_0x5d0103[_0x5315ac(0x1d5)]===_0x561a77[_0x5315ac(0x265)][_0x5315ac(0x223)]()&&_0x5d0103[_0x5315ac(0x271)]===_0x4bef90[_0x5315ac(0x271)]&&(_0x5d0103[_0x5315ac(0x28a)]==undefined||_0x5d0103[_0x5315ac(0x28a)]==_0x4bef90[_0x5315ac(0x177)])),_0x4bef90[_0x5315ac(0x1ec)]=_0x4bef90[_0x5315ac(0x298)][_0x5315ac(0x1b5)](_0x12d92f=>_0x12d92f[_0x5315ac(0x29b)]||0x0)['reduce']((_0xbf469,_0xacba60)=>_0xbf469+_0xacba60,0x0),_0x4bef90['tien_cp']=_0x4bef90[_0x5315ac(0x298)][_0x5315ac(0x1b5)](_0x16c1da=>_0x16c1da[_0x5315ac(0x237)]||0x0)['reduce']((_0x217207,_0x31d269)=>_0x217207+_0x31d269,0x0);else{const _0x2bbc92={'iqpvh':function(_0x5dfc1f,_0x4452cc){const _0x14f66c=_0x5315ac;return _0x292c24[_0x14f66c(0x260)](_0x5dfc1f,_0x4452cc);}};_0x334f68[_0x5315ac(0x1ce)]['forEach'](_0x41d873=>{const _0x210178=_0x5315ac;_0x41d873['tien_hang']=0x0,_0x41d873[_0x210178(0x1f1)]=0x0,_0x41d873['sl_xuat']=0x0,_0x41d873[_0x210178(0x1ba)]=_0x2bbc92[_0x210178(0x1d0)](_0x41d873[_0x210178(0x168)],_0x41d873[_0x210178(0x222)]),_0x41d873[_0x210178(0x17d)]=_0x2bbc92[_0x210178(0x1d0)](_0x41d873[_0x210178(0x1f1)],_0x41d873[_0x210178(0x1ec)]),_0x2d7ce1['details'][_0x210178(0x1e0)](_0x41d873);});}}),_0x942fed[_0x12fb78(0x18b)]['push'](_0x561a77);}),_0x942fed['hd3']['forEach'](_0x18064f=>{const _0x560331=_0x531568;_0x18064f['details_tl']=_0x18064f['details'][_0x560331(0x1b5)](_0x3d5869=>{return _0x3d5869;}),_0x18064f['details']=[],_0x942fed['pbl'][_0x560331(0x1e0)](_0x18064f);}),_0x942fed['hd7']['forEach'](_0x48c725=>{const _0x4a09cb=_0x531568;_0x48c725[_0x4a09cb(0x18f)]=_0x48c725[_0x4a09cb(0x23c)]['map'](_0x4a9807=>{return _0x4a9807;}),_0x48c725[_0x4a09cb(0x23c)]=[],_0x942fed[_0x4a09cb(0x18b)][_0x4a09cb(0x1e0)](_0x48c725);}),_0x30fd03['zjOBz'](_0x4bf57e);}else{const _0x253d81={'PUiby':function(_0x592af2,_0x37eac4){const _0x4231d3=_0x531568;return _0xf5eb6b[_0x4231d3(0x1b4)](_0x592af2,_0x37eac4);}};_0x5a9c93[_0x531568(0x297)](_0x30a595=>{const _0xfeb14b=_0x531568;_0x30a595[_0xfeb14b(0x23c)][_0xfeb14b(0x297)](_0x27a137=>{const _0x552338=_0xfeb14b;_0x27a137[_0x552338(0x168)]=_0x27a137[_0x552338(0x1ba)],_0x27a137[_0x552338(0x1f1)]=_0x27a137['tien_nt'],_0x27a137[_0x552338(0x292)]=_0x27a137[_0x552338(0x1a8)],_0x27a137[_0x552338(0x1ef)]=_0x27a137['tien_ct_nt'],!_0x27a137[_0x552338(0x1ef)]&&(_0x27a137['tien_hang_ct']=_0x27a137['tien_hang'],_0x27a137[_0x552338(0x1ef)]=_0x27a137[_0x552338(0x1f1)]),_0x27a137[_0x552338(0x17d)]=_0x27a137[_0x552338(0x1ef)]-(_0x27a137[_0x552338(0x1e2)]||0x0)+(_0x27a137[_0x552338(0x273)]||0x0),_0x27a137[_0x552338(0x1ba)]=_0x253d81['PUiby'](_0x27a137[_0x552338(0x17d)],_0x30a595[_0x552338(0x263)]||0x1);});}),_0x5e27e1(null,_0x242b55);}});}},async()=>{const _0x105e61=_0x2a293d,_0x487c6c={'LqWbm':_0x161201[_0x105e61(0x1ac)],'RWjMQ':function(_0x1b3bd0,_0x32e717){return _0x1b3bd0+_0x32e717;},'pfqSt':function(_0x58c7f4,_0x7fa02){const _0x4f441c=_0x105e61;return _0x161201[_0x4f441c(0x164)](_0x58c7f4,_0x7fa02);},'UXyeW':function(_0x22aee3,_0x3bfeae){const _0x3b7648=_0x105e61;return _0x161201[_0x3b7648(0x279)](_0x22aee3,_0x3bfeae);},'JwqXJ':function(_0x598926,_0x6f2901){return _0x598926!==_0x6f2901;},'PCSJz':_0x161201[_0x105e61(0x19c)],'BeacJ':_0x105e61(0x1b9)};let _0x1a6d24=_0x942fed[_0x105e61(0x18b)];await _0x1a6d24[_0x105e61(0x1b8)](null,trangthai,[{'where':{'trang_thai':_0x161201[_0x105e61(0x239)],'ma_ct':_0x161201[_0x105e61(0x1f8)]},'fields':[_0x161201[_0x105e61(0x255)],_0x161201[_0x105e61(0x244)],_0x161201[_0x105e61(0x203)],_0x161201[_0x105e61(0x166)]]}]),_0x1a6d24=_0x1a6d24['filter'](_0x24cf41=>_0x24cf41['post']);const _0x3f7fc3=_0x161201[_0x105e61(0x1f3)](_0x5e847e[_0x105e61(0x1bb)],![])?(await global[_0x105e61(0x216)]('ptthanhtoan')[_0x105e61(0x299)]({'status':!![],'id_app':_0x5e847e[_0x105e61(0x25b)]})['lean']())[_0x105e61(0x1b5)](_0x549d55=>{const _0xca60e4=_0x105e61;return _0x549d55['ma']='pttt__'+_0x549d55[_0xca60e4(0x265)],_0x549d55;}):[];if(_0x5e847e[_0x105e61(0x24c)]||_0x3f7fc3&&_0x3f7fc3['length']>0x0){const _0x588b59=async[_0x105e61(0x1c3)](async _0x3c9239=>{const _0x19ada7=_0x105e61,_0x120337={'EZxIq':function(_0x1e75d7,_0x321409){const _0x939e35=_0x1fe3;return _0x30fd03[_0x939e35(0x283)](_0x1e75d7,_0x321409);},'npNqG':'bDxpL','janCu':function(_0x3797f7,_0x2ecfb0){return _0x3797f7===_0x2ecfb0;}};if(_0x5e847e[_0x19ada7(0x24c)]){let _0x18342b=await transaction['find']({'id_ct':{'$regex':_0x3c9239[_0x19ada7(0x265)][_0x19ada7(0x223)](),'$options':'i'}})['lean']();_0x3c9239[_0x19ada7(0x205)]=_0x18342b[_0x19ada7(0x294)](_0xef80a0=>{const _0xadb7a=_0x19ada7;if(_0x120337['EZxIq'](_0xadb7a(0x245),_0x120337[_0xadb7a(0x163)]))return _0x120337['janCu'](_0xef80a0[_0xadb7a(0x25c)][_0xadb7a(0x226)]['toLowerCase'](),_0x3c9239['ma_kh'][_0xadb7a(0x1ee)]());else{const _0x3506d6=_0xadb7a(0x27b)[_0xadb7a(0x275)]('|');let _0xa4793=0x0;while(!![]){switch(_0x3506d6[_0xa4793++]){case'0':delete _0x7fba4b[_0xadb7a(0x21c)];continue;case'1':_0xc855ee[_0xadb7a(0x269)]&&_0x3ba2b9[_0xadb7a(0x269)]['find'](_0x49eb47=>_0x49eb47[_0xadb7a(0x15c)])&&(_0x5405aa['details']={'$elemMatch':{'$or':_0x1a66ed[_0xadb7a(0x269)]}},delete _0x3ef44e[_0xadb7a(0x269)]);continue;case'2':delete _0x20cb51[_0xadb7a(0x24c)];continue;case'3':_0x5c5dfd={..._0xbc2d26};continue;case'4':delete _0x449be2['show_payment_method'];continue;case'5':delete _0x117a1f[_0xadb7a(0x27c)];continue;}break;}}})[_0x19ada7(0x1b5)](_0x18f02d=>_0x18f02d[_0x19ada7(0x27e)])[_0x19ada7(0x15e)]((_0x3fa289,_0x2548c6)=>_0x3fa289+_0x2548c6,0x0),_0x3c9239[_0x19ada7(0x23f)]=_0x18342b[_0x19ada7(0x294)](_0x45d216=>{const _0x502807=_0x19ada7;return _0x120337[_0x502807(0x253)](_0x45d216['sender'][_0x502807(0x226)][_0x502807(0x1ee)](),_0x3c9239[_0x502807(0x1e8)][_0x502807(0x1ee)]());})['map'](_0x373fd2=>_0x373fd2[_0x19ada7(0x27e)])[_0x19ada7(0x15e)]((_0x5cdf7e,_0x418813)=>_0x5cdf7e+_0x418813,0x0);}_0x3f7fc3&&_0x30fd03[_0x19ada7(0x27a)](_0x3f7fc3[_0x19ada7(0x1d3)],0x0)&&(_0x3c9239[_0x19ada7(0x26c)]=_0x3f7fc3,_0x3c9239[_0x19ada7(0x26c)]['forEach'](_0x1301e0=>{const _0x41acab=_0x19ada7,_0x514be2={'OLnfP':_0x487c6c[_0x41acab(0x1ea)],'hqRPu':function(_0x633afd,_0x599d31){const _0x48410f=_0x41acab;return _0x487c6c[_0x48410f(0x1d6)](_0x633afd,_0x599d31);}};_0x3c9239[_0x1301e0['ma']]=0x0,_0x487c6c[_0x41acab(0x248)](_0x3c9239[_0x41acab(0x241)],_0x1301e0[_0x41acab(0x265)]['toString']())&&(_0x3c9239[_0x1301e0['ma']]=_0x487c6c['UXyeW'](_0x3c9239[_0x1301e0['ma']],_0x3c9239[_0x41acab(0x28d)]||_0x3c9239['tien_con_lai']||0x0)),_0x487c6c[_0x41acab(0x248)](_0x3c9239['pt_thanh_toan2'],_0x1301e0['_id'][_0x41acab(0x223)]())&&(_0x487c6c[_0x41acab(0x258)](_0x487c6c['PCSJz'],_0x487c6c['BeacJ'])?_0x3c9239[_0x1301e0['ma']]=_0x487c6c[_0x41acab(0x26d)](_0x3c9239[_0x1301e0['ma']],_0x3c9239[_0x41acab(0x233)]||0x0):(_0xac510b['ctcpbhs']&&_0xa16651['ctcpbhs'][_0x41acab(0x297)](_0x49ccad=>{const _0x381ee3=_0x41acab,_0x237e7b=_0x514be2[_0x381ee3(0x1d7)][_0x381ee3(0x275)]('|');let _0x30c515=0x0;while(!![]){switch(_0x237e7b[_0x30c515++]){case'0':_0x49ccad[_0x381ee3(0x1f1)]=0x0;continue;case'1':_0x49ccad[_0x381ee3(0x17d)]=_0x514be2['hqRPu'](_0x49ccad['tien_hang_nt'],_0x49ccad[_0x381ee3(0x1ec)]);continue;case'2':_0x49ccad['tien_hang']=0x0;continue;case'3':_0x49ccad[_0x381ee3(0x1ba)]=_0x514be2[_0x381ee3(0x1fb)](_0x49ccad[_0x381ee3(0x168)],_0x49ccad[_0x381ee3(0x222)]);continue;case'4':_0x39aeca[_0x381ee3(0x23c)][_0x381ee3(0x1e0)](_0x49ccad);continue;case'5':_0x49ccad[_0x381ee3(0x259)]=0x0;continue;}break;}}),_0x28bc20[_0x41acab(0x18b)][_0x41acab(0x1e0)](_0x27d168))),_0x1301e0[_0x41acab(0x28d)]=_0x3c9239[_0x1301e0['ma']];}));},0xa);_0x588b59[_0x105e61(0x1e0)](_0x1a6d24),_0x588b59['drain'](()=>{const _0x2df4cc=_0x105e61;_0x30fd03[_0x2df4cc(0x246)](_0xed7787,null,_0x1a6d24,_0x3f7fc3);});}else _0x161201[_0x105e61(0x268)](_0xed7787,null,_0x1a6d24);});});};
@@ -1,8 +1 @@
1
- const so9=global.getModel("so9"),hd8=global.getModel("hd8"),async=require("async"),trangthai=global.getModel("trangthai"),transaction=global.getModel("transaction");
2
- module.exports=function($condition$$,$callback$$){if(!$condition$$.id_app)return $callback$$("H\u00e0m n\u00e0y y\u00eau c\u1ea7u tham s\u1ed1 id_app");async.parallel({so:$callback$$=>{setImmediate(()=>{if(!$condition$$.ma_ct||$condition$$.ma_ct.indexOf("so9")>=0){let $_cd$$={...$condition$$};delete $_cd$$.show_payment_method;delete $_cd$$.show_bonus_points;so9.find($_cd$$).lean().then($rs$$=>{$rs$$.forEach($r$$=>{$r$$.ngay_ct=$r$$.ngay_giao_hang||$r$$.ngay_ct;$r$$.tien_nt=($r$$.tien_hang_ct_nt||
3
- 0)-($r$$.tien_ck_nt||0)+($r$$.tien_thue_nt||0);$r$$.tien=($r$$.tien_hang_ct||0)-($r$$.tien_ck||0)+($r$$.tien_thue||0)});$callback$$(null,$rs$$)}).catch($error$$=>{$callback$$({message:$error$$.message,voucher:"so9",condition:$_cd$$})})}else $callback$$(null,[])})},hd8:$callback$$=>{setImmediate(()=>{if(!$condition$$.ma_ct||$condition$$.ma_ct.indexOf("SO9")>=0){let $_cd$$={...$condition$$};delete $_cd$$.show_payment_method;delete $_cd$$.show_bonus_points;delete $_cd$$.ma_ct;hd8.find($_cd$$).lean().then($rs$$=>
4
- {$callback$$(null,$rs$$)}).catch($error$$=>{$callback$$({message:$error$$.message,voucher:"hd8",condition:$_cd$$})})}else $callback$$(null,[])})}},async($error$$,$rs$$)=>{if($error$$)return $callback$$($error$$);$rs$$.pbl=[];async.series({so:$callback$$=>{setImmediate(()=>{($rs$$.so||[]).forEach($r$$=>{$r$$.ctcpbhs&&$r$$.ctcpbhs.forEach($c$$=>{$c$$.tien_hang_ct=0;$c$$.tien_hang_ct_nt=0;$c$$.sl_xuat=0;$c$$.tien=$c$$.tien_hang_ct+$c$$.tien_cp;$c$$.tien_nt=$c$$.tien_hang_ct_nt+$c$$.tien_cp_nt;$r$$.details.push($c$$)});
5
- $rs$$.pbl.push($r$$)});$callback$$()})},so_tl:$callback$$=>{setImmediate(()=>{$rs$$.hd8.forEach($r$$=>{$r$$.details_tl=$r$$.details.map($r$$=>$r$$);$r$$.details=[];$rs$$.pbl.push($r$$)});$callback$$()})}},async()=>{let $reportData$$=$rs$$.pbl;await $reportData$$.asyncJoinModel2(null,trangthai,[{where:{trang_thai:"ma_trang_thai",ma_ct:"ma_ct"},fields:["post_sokho","post","post_socai","ten_trang_thai"]}]);$reportData$$=$reportData$$.filter($p$$=>$p$$.post);const $ptthanhtoans$$=$condition$$.show_payment_method!==
6
- !1?(await global.getModel("ptthanhtoan").find({status:!0,id_app:$condition$$.id_app}).lean()).map($pt$$=>{$pt$$.ma=`pttt__${$pt$$._id}`;return $pt$$}):[];$condition$$.show_bonus_points||$ptthanhtoans$$&&$ptthanhtoans$$.length>0?async.mapSeries($reportData$$,($r$$,$callback$$)=>{setImmediate(async()=>{if($condition$$.show_bonus_points){let $trans$$=await transaction.find({id_ct:{$regex:$r$$._id.toString(),$options:"i"}}).lean();$r$$.bonus_points=$trans$$.filter($tran$$=>$tran$$.receiver.email.toLowerCase()===
7
- $r$$.ma_kh.toLowerCase()).map($tran$$=>$tran$$.amount).reduce(($a$$,$b$$)=>$a$$+$b$$,0);$r$$.used_points=$trans$$.filter($tran$$=>$tran$$.sender.email.toLowerCase()===$r$$.ma_kh.toLowerCase()).map($tran$$=>$tran$$.amount).reduce(($a$$,$b$$)=>$a$$+$b$$,0)}$ptthanhtoans$$&&$ptthanhtoans$$.length>0&&($r$$.thanh_toan=$ptthanhtoans$$,$r$$.thanh_toan.forEach($pt$$=>{$r$$[$pt$$.ma]=0;$r$$.pt_thanh_toan===$pt$$._id.toString()&&($r$$[$pt$$.ma]+=$r$$.tien_thu||$r$$.tien_con_lai||0);$r$$.pt_thanh_toan2===$pt$$._id.toString()&&
8
- ($r$$[$pt$$.ma]+=$r$$.tien_thu2||0);$pt$$.tien_thu=$r$$[$pt$$.ma]}));$callback$$(null,$r$$)})},()=>{$callback$$(null,$reportData$$,$ptthanhtoans$$)}):$callback$$(null,$reportData$$)})})};
1
+ const _0x6446d9=_0x4d06;function _0x4d06(_0x9ed097,_0x30b687){const _0x3c5fdf=_0x5824();return _0x4d06=function(_0x32a633,_0x55157f){_0x32a633=_0x32a633-0x103;let _0x582480=_0x3c5fdf[_0x32a633];if(_0x4d06['fAFCAr']===undefined){var _0x4d06d6=function(_0x18ed39){const _0x583b08='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x415c5b='',_0x25431b='',_0x181ac0=_0x415c5b+_0x4d06d6;for(let _0x3a7d9a=0x0,_0x444930,_0x18c1d6,_0x429292=0x0;_0x18c1d6=_0x18ed39['charAt'](_0x429292++);~_0x18c1d6&&(_0x444930=_0x3a7d9a%0x4?_0x444930*0x40+_0x18c1d6:_0x18c1d6,_0x3a7d9a++%0x4)?_0x415c5b+=_0x181ac0['charCodeAt'](_0x429292+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x444930>>(-0x2*_0x3a7d9a&0x6)):_0x3a7d9a:0x0){_0x18c1d6=_0x583b08['indexOf'](_0x18c1d6);}for(let _0x282d65=0x0,_0x3af836=_0x415c5b['length'];_0x282d65<_0x3af836;_0x282d65++){_0x25431b+='%'+('00'+_0x415c5b['charCodeAt'](_0x282d65)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x25431b);};_0x4d06['eSrvJX']=_0x4d06d6,_0x9ed097=arguments,_0x4d06['fAFCAr']=!![];}const _0x4e21b4=_0x3c5fdf[0x0],_0xbe372a=_0x32a633+_0x4e21b4,_0x30057b=_0x9ed097[_0xbe372a];if(!_0x30057b){const _0x1adec5=function(_0x33e63a){this['yhikjN']=_0x33e63a,this['muyyPS']=[0x1,0x0,0x0],this['tOuwTe']=function(){return'newState';},this['hjMJZx']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['yMaJkY']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x1adec5['prototype']['ybjBoO']=function(){const _0x501ca5=new RegExp(this['hjMJZx']+this['yMaJkY']),_0x56d294=_0x501ca5['test'](this['tOuwTe']['toString']())?--this['muyyPS'][0x1]:--this['muyyPS'][0x0];return this['RjaHye'](_0x56d294);},_0x1adec5['prototype']['RjaHye']=function(_0x364da4){if(!Boolean(~_0x364da4))return _0x364da4;return this['WIipno'](this['yhikjN']);},_0x1adec5['prototype']['WIipno']=function(_0x3290ff){for(let _0x2f3c12=0x0,_0x3ec54d=this['muyyPS']['length'];_0x2f3c12<_0x3ec54d;_0x2f3c12++){this['muyyPS']['push'](Math['round'](Math['random']())),_0x3ec54d=this['muyyPS']['length'];}return _0x3290ff(this['muyyPS'][0x0]);},new _0x1adec5(_0x4d06)['ybjBoO'](),_0x582480=_0x4d06['eSrvJX'](_0x582480),_0x9ed097[_0xbe372a]=_0x582480;}else _0x582480=_0x30057b;return _0x582480;},_0x4d06(_0x9ed097,_0x30b687);}(function(_0x1c3134,_0x555910){const _0x122149=_0x4d06,_0x2be437=_0x1c3134();while(!![]){try{const _0x57afa6=-parseInt(_0x122149(0x10b))/0x1+parseInt(_0x122149(0x12f))/0x2+-parseInt(_0x122149(0x18e))/0x3*(-parseInt(_0x122149(0x145))/0x4)+-parseInt(_0x122149(0x1b0))/0x5+parseInt(_0x122149(0x17f))/0x6*(parseInt(_0x122149(0x17c))/0x7)+parseInt(_0x122149(0x171))/0x8+parseInt(_0x122149(0x107))/0x9*(-parseInt(_0x122149(0x115))/0xa);if(_0x57afa6===_0x555910)break;else _0x2be437['push'](_0x2be437['shift']());}catch(_0x1572c7){_0x2be437['push'](_0x2be437['shift']());}}}(_0x5824,0x41d1d));const _0x55157f=(function(){let _0x56f3a9=!![];return function(_0x3e788d,_0x5493a1){const _0x279aca=_0x56f3a9?function(){const _0x150ff3=_0x4d06;if(_0x5493a1){const _0x48afd4=_0x5493a1[_0x150ff3(0x1c4)](_0x3e788d,arguments);return _0x5493a1=null,_0x48afd4;}}:function(){};return _0x56f3a9=![],_0x279aca;};}()),_0x32a633=_0x55157f(this,function(){const _0x22a191=_0x4d06,_0x38ffca={'UwYmH':_0x22a191(0x114)};return _0x32a633[_0x22a191(0x1aa)]()[_0x22a191(0x16c)](_0x38ffca[_0x22a191(0x155)])[_0x22a191(0x1aa)]()[_0x22a191(0x133)](_0x32a633)['search'](_0x38ffca[_0x22a191(0x155)]);});function _0x5824(){const _0x10a654=['rgTQCM8','BwnfwKG','AwrFyxbW','nJnSzgLYq2C','C2XFEhvHDa','q0zuyMm','y2f0y2G','mJyWodq3tfrgtLvQ','DfPUrhC','q2TTtKu','C3bSAxq','CLjds0K','BfLmDve','ChrFDgHHBMHFDg9HBJi','qLPuAhm','B2TVALG','kcGOlISPkYKRksSK','nZeWodmWCevqzKPL','CwvstxG','s2TWqLK','rLPzswu','DgLLBL9Oyw5Nx2n0x250','uMLoD1O','AeLvsxi','Au9ky2C','tKXnBNq','zhPVuwC','BgLYvLO','zeXRq0m','DgLLBL9JB25FBgfP','mxWZFdv8nhWYFda','vK5hCfC','uvDntwO','v25Rs20','DgLLBL9JCf9UDa','rNHjtuK','ChvZAa','uxLXv0K','Agq4','zxz5wvu','B2DfCK0','zgPxBLi','C2HVD19IB251C19WB2LUDhm','nZaXnJCYDKXJuMn3','tLDdAxu','DgLLBL90AhvL','yvPcAvC','y29UC3rYDwn0B3i','zgv0ywLSCW','Chr0Df9F','yM9UDxnFCg9PBNrZ','tfLYq1m','zw1HAwW','wLztvNa','BMDHEv9NAwfVx2HHBMC','zMLUza','u2XWC3G','DgLLBL9UDa','sgzdv1m','wxDowha','rLLmD0i','z2fyr1O','AwfJAuS','CMvKDwnL','yKHVy0u','mZi5nJi4Ag1WEuzY','zvrnufm','CMvJzwL2zxi','zMLSDgvY','vfnYDLO','ENPAD1a','DgLLBL90AhuY','CMzwvKW','zgXPvwS','DMfYyu4','yxn5BMm','CgjS','DgHLBG','BwfW','AgPus1C','yMXesKm','vxDzBuG','BMDHEv9JDa','yxn5BMnkB2LUtw9KzwWY','sLbNCMK','D1rAsgK','v0fYyKS','wxDuuvm','x2LK','ELj2qKG','CfLvzKS','CxLpyvm','uvbqz0u','BKHOv1y','rhfKBhe','nxWXFdj8mhW0Fdm','Cg9ZDa','vfnevfi','zKvOEha','uMfls3a','ExvAwvy','wezWshu','AM1wtg8','reHxruS','C2vHCMnO','u0LVzKK','yw1VDw50','z2v0tw9KzwW','zKD1BNO','mZKXnJm5mLz3Buf2sG','BwfFDhjHBMDFDgHHAq','CNzKB0C','yMHAq0K','q3nZrem','svfTsvy','DgLLBL9JAW','EvrYD08','sw12BMK','DgLLBL90Ahu','BwfWtgLTAxq','mtu0n3HZuMHqqq','wfbgD2C','AujbBNm','mti5mtHbtMXUvLy','suPtEue','C2HVD19WyxLTzw50x21LDgHVza','zM9YrwfJAa','C2vUzgvY','Afniwgi','turQwu8','uun4D2m','z1jkEe8','uLDLvuK','C285','ChrFDgHHBMHFDg9HBG','zvfqrM4','tgvyqKC','r1jsDLO','m3jiDez3tW','y3rJCgjOCW','sfPvqLa','Aw5KzxHpzG','smoGBsbUW6b5ihNdQNuGy+g6P3uGDgHHBsbZ4BUrigLKx2fWCa','C05zCMS','u0LkEuu','txLbA0K','runqrg4','tw5sEfq','u1PNDeC','uMvWufG','DxviDKS','DfbJChy','DgLLBL90AhvLx250','DhLPA0q','ENfUA2u','vezlqLm','EuDXu0W','zxHWB3j0CW','D1L3zgG','ywvIBeK','v2HTvei','Dg9mB3DLCKnHC2u','DgLLBL9JCa','z2ToywG','A1P1DxC','wfDxAvi','Dg9tDhjPBMC','yNPltKy','q1LHDM4','Cg9ZDf9ZB2nHAq','DgLLBL9JA19UDa','BgvUz3rO','mtG1mJKWmg9PzhrIra','r0vYt2S','Chr0AgfUAhrVyw4','te53yMe','C2vYAwvZ','BwfFA2G','Cg9ZDf9ZB2TOBW','AgzqDwK','BwfFy3q','y3nmtfC','yxPdyLG','DxnLzf9WB2LUDhm','uur5yu8','r2zQvKq','uvDbqKm','Auj4t0q','DgLLBL9Oyw5Nx2n0','BuXwtha','wMTjBKG','BgvHBG','yxbWBhK','ChjvDKm','y1zUre4','DgzYExm','z05hy1m','EfL0Ewi','DvjltKO','Ce5XAe0','DgvUx3rYyw5Nx3rOywK','z0vwrLG','DgLLBG','AhfPwwq','yNbMvMS','zuHPugK','sKLWze4','ywL4vhO','BwvZC2fNzq','DhjHBNnHy3rPB24','EgTsyxq','wNH0t0O','zgv0ywLSC190Ba'];_0x5824=function(){return _0x10a654;};return _0x5824();}_0x32a633();const so9=global[_0x6446d9(0x16f)](_0x6446d9(0x189)),hd8=global[_0x6446d9(0x16f)](_0x6446d9(0x12a)),async=require(_0x6446d9(0x14f)),trangthai=global[_0x6446d9(0x16f)]('trangthai'),transaction=global['getModel'](_0x6446d9(0x1d5));module[_0x6446d9(0x1a1)]=function(_0x5e2ec8,_0x2843b3){const _0x389027=_0x6446d9,_0x33ed10={'TFKBS':function(_0x44c286,_0x3b0d58){return _0x44c286(_0x3b0d58);},'yuZYV':_0x389027(0x189),'mHrne':function(_0xd5adc3,_0x168e47){return _0xd5adc3-_0x168e47;},'iOJcg':function(_0x445b3d,_0x4bb17d){return _0x445b3d===_0x4bb17d;},'avIvv':'vztcg','fEhxp':_0x389027(0x153),'MDjYO':function(_0x281d1a,_0x524b60){return _0x281d1a===_0x524b60;},'NLMnt':_0x389027(0x1bd),'zzZwP':function(_0x1b92ff,_0xcdfbe6){return _0x1b92ff(_0xcdfbe6);},'wTZHi':function(_0x1d8612,_0x58b27a){return _0x1d8612!==_0x58b27a;},'BZThs':_0x389027(0x170),'eTMPS':function(_0x4fef84,_0x4ce07f){return _0x4fef84>=_0x4ce07f;},'rRCKI':'SO9','dzoQg':'hd8','WamMh':_0x389027(0x1b9),'bpfVk':'aGjzr','cVnDN':function(_0x5f3b4b,_0x13e4c1){return _0x5f3b4b+_0x13e4c1;},'CBzGU':function(_0x159a5b,_0x48504c){return _0x159a5b(_0x48504c);},'XFpHu':'FxIMI','PVdBB':_0x389027(0x13e),'ZkInH':_0x389027(0x1d6),'lYLuQ':_0x389027(0x154),'SIJyE':function(_0x5d1dc9,_0x496fd6){return _0x5d1dc9(_0x496fd6);},'xUQFD':function(_0x374c9a,_0x2cf49a,_0x33a447){return _0x374c9a(_0x2cf49a,_0x33a447);},'RWeUI':'JTPKz','hfPui':function(_0x38427b,_0x1c8f1a,_0x71afaf,_0x9d9cc8){return _0x38427b(_0x1c8f1a,_0x71afaf,_0x9d9cc8);},'HZUBP':function(_0x4a3f46,_0xfd3c50){return _0x4a3f46+_0xfd3c50;},'pYUfK':_0x389027(0x18c),'hqiYd':function(_0x7dff02,_0x5d21a5){return _0x7dff02>_0x5d21a5;},'varaN':function(_0x46b316,_0x21f7e9,_0xa01b8a){return _0x46b316(_0x21f7e9,_0xa01b8a);},'aZBiW':_0x389027(0x1ad),'aixTz':_0x389027(0x1cc),'qyOaS':_0x389027(0x1b2),'ZxtOJ':_0x389027(0x15b),'Slpsx':function(_0xa43cee,_0x3a4cf2){return _0xa43cee(_0x3a4cf2);},'GRRvZ':function(_0x83e836,_0x33a301){return _0x83e836(_0x33a301);}};if(!_0x5e2ec8[_0x389027(0x106)])return _0x33ed10[_0x389027(0x18d)](_0x2843b3,_0x389027(0x192));async['parallel']({'so':_0x1b87a7=>{const _0x5c8fe6=_0x389027,_0x12d5f4={'Imvni':function(_0x32f4d8,_0x20d671){const _0x5a026f=_0x4d06;return _0x33ed10[_0x5a026f(0x19f)](_0x32f4d8,_0x20d671);},'prUvC':_0x33ed10[_0x5c8fe6(0x168)],'tPcpv':function(_0x2757d4,_0x59794d){return _0x2757d4+_0x59794d;},'evyYU':function(_0x3bf830,_0x5d795d){return _0x33ed10['mHrne'](_0x3bf830,_0x5d795d);},'qeRMx':function(_0x57a696,_0x5cfece,_0x170090){return _0x57a696(_0x5cfece,_0x170090);},'yGqSL':function(_0x2c8d37,_0xd735c7){const _0x3057e0=_0x5c8fe6;return _0x33ed10[_0x3057e0(0x11c)](_0x2c8d37,_0xd735c7);},'ZIvkC':_0x33ed10['avIvv'],'aeblI':_0x33ed10[_0x5c8fe6(0x166)],'LYrCS':_0x5c8fe6(0x1be),'JPgri':function(_0x547049,_0x3c4805){const _0x421719=_0x5c8fe6;return _0x33ed10[_0x421719(0x185)](_0x547049,_0x3c4805);},'NWCiu':_0x33ed10[_0x5c8fe6(0x11d)]};setImmediate(()=>{const _0x1f73b2=_0x5c8fe6,_0x3fdfb2={'ogErM':function(_0x53325c,_0x31a32f){const _0x416ec4=_0x4d06;return _0x12d5f4[_0x416ec4(0x12b)](_0x53325c,_0x31a32f);},'SIofI':function(_0x476216,_0x30d113){const _0x2f64e4=_0x4d06;return _0x12d5f4[_0x2f64e4(0x1a0)](_0x476216,_0x30d113);},'azCbX':_0x12d5f4['ZIvkC']};if(_0x12d5f4[_0x1f73b2(0x1a0)](_0x12d5f4[_0x1f73b2(0x1a3)],_0x12d5f4[_0x1f73b2(0x137)]))_0x400c97[_0x1f73b2(0x103)]=_0x558843[_0x1f73b2(0x134)][_0x1f73b2(0x152)](_0x4c867d=>{return _0x4c867d;}),_0x4c4c55[_0x1f73b2(0x134)]=[],_0x266df0[_0x1f73b2(0x150)][_0x1f73b2(0x128)](_0x46973a);else{if(!_0x5e2ec8[_0x1f73b2(0x1b8)]||_0x5e2ec8[_0x1f73b2(0x1b8)]['indexOf'](_0x12d5f4['prUvC'])>=0x0){if(_0x12d5f4[_0x1f73b2(0x158)](_0x1f73b2(0x1bd),_0x12d5f4[_0x1f73b2(0x130)])){let _0x406c03={..._0x5e2ec8};delete _0x406c03['show_payment_method'],delete _0x406c03['show_bonus_points'],so9[_0x1f73b2(0x13b)](_0x406c03)[_0x1f73b2(0x1c3)]()['then'](_0xa25835=>{const _0x1e3194=_0x1f73b2,_0x2762cc={'jOpGj':_0x1e3194(0x16b),'XWWiR':function(_0x44e977,_0x4906ef){return _0x44e977+_0x4906ef;},'IQmIV':function(_0x4563a9,_0x1b1753){const _0x3948a1=_0x1e3194;return _0x3fdfb2[_0x3948a1(0x12c)](_0x4563a9,_0x1b1753);}};if(_0x3fdfb2[_0x1e3194(0x16d)](_0x3fdfb2[_0x1e3194(0x1ba)],'WXotX'))return _0x1a9879['ma']=_0x1e3194(0x135)+_0x1c2fcd[_0x1e3194(0x15c)],_0xcd2aff;else _0xa25835[_0x1e3194(0x182)](_0x57d981=>{const _0x213977=_0x1e3194;if(_0x213977(0x173)!==_0x2762cc['jOpGj'])_0x57d981[_0x213977(0x156)]=_0x57d981[_0x213977(0x13a)]||_0x57d981[_0x213977(0x156)],_0x57d981[_0x213977(0x13d)]=_0x2762cc[_0x213977(0x1a9)]((_0x57d981[_0x213977(0x119)]||0x0)-(_0x57d981['tien_ck_nt']||0x0),_0x57d981[_0x213977(0x19c)]||0x0),_0x57d981['tien']=_0x2762cc[_0x213977(0x176)](_0x57d981[_0x213977(0x1c0)]||0x0,_0x57d981['tien_ck']||0x0)+(_0x57d981[_0x213977(0x131)]||0x0);else{const _0x24cf26=_0x2e3499[_0x213977(0x1c4)](_0x2c97bf,arguments);return _0x29100c=null,_0x24cf26;}}),_0x1b87a7(null,_0xa25835);})[_0x1f73b2(0x10a)](_0x58581b=>{const _0x5d7562=_0x1f73b2;_0x12d5f4[_0x5d7562(0x179)](_0x1b87a7,{'message':_0x58581b[_0x5d7562(0x1d4)],'voucher':_0x12d5f4[_0x5d7562(0x1c5)],'condition':_0x406c03});});}else{const _0x2027f2={'nHhWV':function(_0x436703,_0x5c3cde){const _0x8fd5be=_0x1f73b2;return _0x12d5f4[_0x8fd5be(0x19b)](_0x436703,_0x5c3cde);},'JewhV':function(_0x91f738,_0x3d26b9){const _0x429a67=_0x1f73b2;return _0x12d5f4[_0x429a67(0x12b)](_0x91f738,_0x3d26b9);},'rfVVL':function(_0xfaa4db,_0x3135e5){return _0x12d5f4['tPcpv'](_0xfaa4db,_0x3135e5);}};_0x57466e['forEach'](_0x4d88a6=>{const _0x20e45a=_0x1f73b2;_0x4d88a6[_0x20e45a(0x156)]=_0x4d88a6[_0x20e45a(0x13a)]||_0x4d88a6[_0x20e45a(0x156)],_0x4d88a6[_0x20e45a(0x13d)]=_0x2027f2[_0x20e45a(0x161)](_0x2027f2['JewhV'](_0x4d88a6['tien_hang_ct_nt']||0x0,_0x4d88a6['tien_ck_nt']||0x0),_0x4d88a6[_0x20e45a(0x19c)]||0x0),_0x4d88a6[_0x20e45a(0x1ce)]=_0x2027f2[_0x20e45a(0x14c)]((_0x4d88a6[_0x20e45a(0x1c0)]||0x0)-(_0x4d88a6[_0x20e45a(0x177)]||0x0),_0x4d88a6[_0x20e45a(0x131)]||0x0);}),_0x12d5f4[_0x1f73b2(0x116)](_0x529698,null,_0x3b4b9a);}}else _0x1b87a7(null,[]);}});},'hd8':_0x471f1c=>{const _0x7f3dbc=_0x389027,_0x5df3dd={'QPPgE':function(_0x3a4c17,_0x5f9b1){return _0x3a4c17(_0x5f9b1);},'RiNwZ':_0x33ed10[_0x7f3dbc(0x11e)]};_0x33ed10['iOJcg'](_0x33ed10['WamMh'],_0x33ed10[_0x7f3dbc(0x1d0)])?_0x3b89e2(null,_0x84f163):_0x33ed10[_0x7f3dbc(0x19f)](setImmediate,()=>{const _0x5cad81=_0x7f3dbc,_0x74e7bb={'kZuuw':function(_0x795070,_0x352268,_0xe57922){return _0x795070(_0x352268,_0xe57922);},'yTrwO':function(_0x30399f,_0x4e9763){const _0x3873d7=_0x4d06;return _0x33ed10[_0x3873d7(0x14a)](_0x30399f,_0x4e9763);}};if(_0x33ed10[_0x5cad81(0x159)](_0x5cad81(0x170),_0x33ed10[_0x5cad81(0x112)])){let _0x18e633={..._0x5bcb68};delete _0x18e633['show_payment_method'],delete _0x18e633[_0x5cad81(0x12e)],delete _0x18e633['ma_ct'],_0x402088['find'](_0x18e633)[_0x5cad81(0x1c3)]()[_0x5cad81(0x151)](_0x3bd408=>{const _0x272250=_0x5cad81;_0x74e7bb[_0x272250(0x1a8)](_0x1721b7,null,_0x3bd408);})[_0x5cad81(0x10a)](_0x661303=>{const _0x16e67e=_0x5cad81;_0x74e7bb[_0x16e67e(0x178)](_0x552d16,{'message':_0x661303[_0x16e67e(0x1d4)],'voucher':'hd8','condition':_0x18e633});});}else{if(!_0x5e2ec8[_0x5cad81(0x1b8)]||_0x33ed10[_0x5cad81(0x146)](_0x5e2ec8[_0x5cad81(0x1b8)][_0x5cad81(0x191)](_0x33ed10[_0x5cad81(0x10f)]),0x0)){let _0x4a602b={..._0x5e2ec8};delete _0x4a602b[_0x5cad81(0x181)],delete _0x4a602b[_0x5cad81(0x12e)],delete _0x4a602b[_0x5cad81(0x1b8)],hd8[_0x5cad81(0x13b)](_0x4a602b)[_0x5cad81(0x1c3)]()[_0x5cad81(0x151)](_0x3b8b67=>{const _0x2f3165=_0x5cad81;_0x74e7bb[_0x2f3165(0x1a8)](_0x471f1c,null,_0x3b8b67);})[_0x5cad81(0x10a)](_0x2a47bf=>{const _0x5abb5a=_0x5cad81;_0x5df3dd[_0x5abb5a(0x160)](_0x471f1c,{'message':_0x2a47bf['message'],'voucher':_0x5df3dd[_0x5abb5a(0x11a)],'condition':_0x4a602b});});}else _0x471f1c(null,[]);}});}},async(_0x1eb2ec,_0x1a9dde)=>{const _0x3de206=_0x389027,_0x18a8f1={'hSHXb':function(_0x240581,_0x353b0c){const _0x4e8e1d=_0x4d06;return _0x33ed10[_0x4e8e1d(0x11c)](_0x240581,_0x353b0c);},'mEhoi':function(_0x89e792,_0x5718ef){const _0x3af1c3=_0x4d06;return _0x33ed10[_0x3af1c3(0x185)](_0x89e792,_0x5718ef);},'tZnDw':function(_0xdcfe21,_0x4d86ed){return _0x33ed10['wTZHi'](_0xdcfe21,_0x4d86ed);},'QWMMj':_0x33ed10['PVdBB'],'lirVZ':function(_0x46b429){return _0x46b429();},'WArbK':function(_0x3e7bcb,_0x52d9cd){return _0x3e7bcb!==_0x52d9cd;},'gaXGZ':_0x33ed10[_0x3de206(0x1c2)],'djWnR':_0x33ed10[_0x3de206(0x110)],'FYLwB':function(_0x2ef1ea,_0x578c70){const _0x2a4542=_0x3de206;return _0x33ed10[_0x2a4542(0x194)](_0x2ef1ea,_0x578c70);},'CFTbc':function(_0x4b2370,_0x2cd2f8){return _0x33ed10['cVnDN'](_0x4b2370,_0x2cd2f8);},'ynGJE':function(_0x36de4c,_0x40509a,_0x560e1f){return _0x33ed10['xUQFD'](_0x36de4c,_0x40509a,_0x560e1f);},'gEVFX':_0x33ed10[_0x3de206(0x188)],'gNGcS':function(_0x261513,_0x3bd847){return _0x261513===_0x3bd847;},'mLVLp':function(_0x34441e,_0x829e5a){return _0x33ed10['cVnDN'](_0x34441e,_0x829e5a);},'CkmNE':function(_0x27cf6f,_0x1402dc,_0x120054,_0x5f5a62){const _0x26d767=_0x3de206;return _0x33ed10[_0x26d767(0x1b7)](_0x27cf6f,_0x1402dc,_0x120054,_0x5f5a62);},'ZVSVp':_0x3de206(0x122),'eQPFn':function(_0x1be17,_0x1d9865){const _0x23ea83=_0x3de206;return _0x33ed10[_0x23ea83(0x190)](_0x1be17,_0x1d9865);},'dEsaN':function(_0x466b4a,_0x1a07a8){const _0x2f9289=_0x3de206;return _0x33ed10[_0x2f9289(0x1c6)](_0x466b4a,_0x1a07a8);},'QDyaO':_0x33ed10[_0x3de206(0x15e)],'okojX':function(_0x53d656,_0x178d4d){const _0x43c368=_0x3de206;return _0x33ed10[_0x43c368(0x1cf)](_0x53d656,_0x178d4d);},'iBxOD':function(_0x3280c1,_0x77b0ad,_0x353405){const _0x57d018=_0x3de206;return _0x33ed10[_0x57d018(0x14e)](_0x3280c1,_0x77b0ad,_0x353405);},'LNwba':_0x3de206(0x172),'hIUIr':_0x33ed10[_0x3de206(0x132)],'bHocE':_0x33ed10[_0x3de206(0x1d3)],'tfrys':_0x33ed10[_0x3de206(0x15f)],'jmVLo':_0x33ed10[_0x3de206(0x1d7)]};if(_0x33ed10['MDjYO'](_0x3de206(0x193),_0x3de206(0x193))){if(_0x1eb2ec)return _0x33ed10[_0x3de206(0x13c)](_0x2843b3,_0x1eb2ec);_0x1a9dde[_0x3de206(0x150)]=[],async[_0x3de206(0x1b4)]({'so':_0x44bfab=>{const _0x57b33e=_0x3de206,_0x5e5837={'lLYqp':function(_0x8d16aa,_0x24771b){const _0xf0ed24=_0x4d06;return _0x33ed10[_0xf0ed24(0x1c6)](_0x8d16aa,_0x24771b);},'XirYs':function(_0x1cbe1d,_0x128df4){const _0x393279=_0x4d06;return _0x33ed10[_0x393279(0x159)](_0x1cbe1d,_0x128df4);},'MyAkI':_0x57b33e(0x13f),'TSrvZ':function(_0x41691e,_0x534d88){return _0x33ed10['CBzGU'](_0x41691e,_0x534d88);},'WnkKm':function(_0xd121c2,_0x25028d){const _0x45ca63=_0x57b33e;return _0x33ed10[_0x45ca63(0x185)](_0xd121c2,_0x25028d);},'QCxwc':_0x33ed10[_0x57b33e(0x169)],'BICSI':function(_0x475403){return _0x475403();}};_0x33ed10[_0x57b33e(0x14a)](setImmediate,()=>{const _0x8af9b0=_0x57b33e,_0x188f7d={'qhNGT':_0x8af9b0(0x163),'zRvBH':function(_0x49ab89,_0x11fee1){return _0x5e5837['lLYqp'](_0x49ab89,_0x11fee1);},'NEEsm':function(_0x4249ad,_0x576c00){return _0x5e5837['XirYs'](_0x4249ad,_0x576c00);},'dliUk':_0x5e5837[_0x8af9b0(0x195)],'zTMrU':function(_0x237869,_0x36e7d2){const _0x2cead6=_0x8af9b0;return _0x5e5837[_0x2cead6(0x149)](_0x237869,_0x36e7d2);},'RepPX':_0x8af9b0(0x189)};_0x5e5837[_0x8af9b0(0x125)](_0x5e5837[_0x8af9b0(0x186)],_0x8af9b0(0x127))?((_0x1a9dde['so']||[])[_0x8af9b0(0x182)](_0xd79044=>{const _0x49951b=_0x8af9b0,_0x590a2b={'cesya':_0x188f7d['qhNGT'],'Dkjro':function(_0x5a20de,_0x156e8a){const _0x22b83c=_0x4d06;return _0x188f7d[_0x22b83c(0x15d)](_0x5a20de,_0x156e8a);},'XLfaz':function(_0xf42e69,_0x4f7453){const _0x22f97c=_0x4d06;return _0x188f7d[_0x22f97c(0x15d)](_0xf42e69,_0x4f7453);}};_0x188f7d['NEEsm'](_0x188f7d[_0x49951b(0x14d)],_0x188f7d[_0x49951b(0x14d)])?_0x406843[_0x20eac8['ma']]=_0x3db012[_0x1399b8['ma']]+(_0x310d87[_0x49951b(0x14b)]||0x0):(_0xd79044['ctcpbhs']&&_0xd79044[_0x49951b(0x18f)][_0x49951b(0x182)](_0x383044=>{const _0x66007=_0x49951b,_0xc517fc=_0x590a2b['cesya'][_0x66007(0x10e)]('|');let _0x3b456f=0x0;while(!![]){switch(_0xc517fc[_0x3b456f++]){case'0':_0x383044[_0x66007(0x1ce)]=_0x590a2b[_0x66007(0x104)](_0x383044[_0x66007(0x1c0)],_0x383044['tien_cp']);continue;case'1':_0x383044[_0x66007(0x119)]=0x0;continue;case'2':_0x383044['sl_xuat']=0x0;continue;case'3':_0xd79044[_0x66007(0x134)][_0x66007(0x128)](_0x383044);continue;case'4':_0x383044[_0x66007(0x13d)]=_0x590a2b['XLfaz'](_0x383044[_0x66007(0x119)],_0x383044[_0x66007(0x126)]);continue;case'5':_0x383044[_0x66007(0x1c0)]=0x0;continue;}break;}}),_0x1a9dde[_0x49951b(0x150)][_0x49951b(0x128)](_0xd79044));}),_0x5e5837['BICSI'](_0x44bfab)):_0x188f7d['zTMrU'](_0x2f35e7,{'message':_0x2d1849[_0x8af9b0(0x1d4)],'voucher':_0x188f7d[_0x8af9b0(0x199)],'condition':_0x5322bb});});},'so_tl':_0x27aad2=>{const _0x291356=_0x3de206,_0x122b64={'uRKNJ':function(_0x2afab5,_0x591398){return _0x18a8f1['mEhoi'](_0x2afab5,_0x591398);},'iaciK':function(_0x37b145,_0x32392c){const _0x374d31=_0x4d06;return _0x18a8f1[_0x374d31(0x10c)](_0x37b145,_0x32392c);},'KHPIz':_0x18a8f1[_0x291356(0x124)],'gkNah':function(_0x43cb5a){const _0x6e9cac=_0x291356;return _0x18a8f1[_0x6e9cac(0x11f)](_0x43cb5a);}};if(_0x18a8f1[_0x291356(0x15a)](_0x18a8f1[_0x291356(0x141)],_0x18a8f1[_0x291356(0x12d)]))_0x18a8f1[_0x291356(0x140)](setImmediate,()=>{const _0x517e30=_0x291356,_0x1486b5={'IjiRE':function(_0x48cdd8,_0xa90c3e){const _0x23d695=_0x4d06;return _0x122b64[_0x23d695(0x1ca)](_0x48cdd8,_0xa90c3e);},'XPFwg':function(_0x2afe0d,_0xa8477){const _0x1a02ec=_0x4d06;return _0x122b64[_0x1a02ec(0x142)](_0x2afe0d,_0xa8477);},'gRJxO':_0x122b64['KHPIz']};_0x1a9dde[_0x517e30(0x12a)][_0x517e30(0x182)](_0x3f2e54=>{const _0x11ffcf=_0x517e30,_0x23ad40={'eHiPi':function(_0x510acf,_0x7196a9){return _0x1486b5['IjiRE'](_0x510acf,_0x7196a9);}};if(_0x1486b5[_0x11ffcf(0x17d)](_0x1486b5['gRJxO'],_0x1486b5[_0x11ffcf(0x187)]))return _0x23ad40[_0x11ffcf(0x1d1)](_0x326824[_0x11ffcf(0x147)][_0x11ffcf(0x138)][_0x11ffcf(0x1a5)](),_0xdaed0d[_0x11ffcf(0x1b5)][_0x11ffcf(0x1a5)]());else _0x3f2e54[_0x11ffcf(0x103)]=_0x3f2e54['details'][_0x11ffcf(0x152)](_0x16b02b=>{return _0x16b02b;}),_0x3f2e54['details']=[],_0x1a9dde[_0x11ffcf(0x150)][_0x11ffcf(0x128)](_0x3f2e54);}),_0x122b64[_0x517e30(0x1a7)](_0x27aad2);});else return _0x18a8f1[_0x291356(0x184)](_0x45f834[_0x291356(0x183)]['email']['toLowerCase'](),_0x1c0ef8['ma_kh'][_0x291356(0x1a5)]());}},async()=>{const _0x350f73=_0x3de206,_0xd7bf2e={'uuHvK':_0x18a8f1[_0x350f73(0x139)],'bzKNF':function(_0x363d41,_0x160f2e){const _0x5e3d10=_0x350f73;return _0x18a8f1[_0x5e3d10(0x18b)](_0x363d41,_0x160f2e);},'pNqhM':function(_0x1053c1,_0x598c96){return _0x18a8f1['dEsaN'](_0x1053c1,_0x598c96);},'TSDTR':function(_0x507be5,_0x2d5b99){return _0x507be5+_0x2d5b99;},'FZYIe':function(_0x40cc9d,_0x32f01d){const _0x5d638a=_0x350f73;return _0x18a8f1[_0x5d638a(0x140)](_0x40cc9d,_0x32f01d);},'lPjgV':_0x18a8f1[_0x350f73(0x1bc)],'WmTzG':function(_0x355322,_0x245e53){const _0xc0e80b=_0x350f73;return _0x18a8f1[_0xc0e80b(0x113)](_0x355322,_0x245e53);},'GErOk':function(_0x3a6467,_0x35a5ec,_0x41ffc2){const _0x19205c=_0x350f73;return _0x18a8f1[_0x19205c(0x1bf)](_0x3a6467,_0x35a5ec,_0x41ffc2);}};let _0x3e5db0=_0x1a9dde[_0x350f73(0x150)];await _0x3e5db0[_0x350f73(0x157)](null,trangthai,[{'where':{'trang_thai':_0x18a8f1[_0x350f73(0x1b3)],'ma_ct':'ma_ct'},'fields':[_0x350f73(0x1b6),_0x350f73(0x164),_0x18a8f1[_0x350f73(0x11b)],_0x18a8f1[_0x350f73(0x144)]]}]),_0x3e5db0=_0x3e5db0[_0x350f73(0x148)](_0x107330=>_0x107330[_0x350f73(0x164)]);const _0x3fab15=_0x18a8f1[_0x350f73(0x15a)](_0x5e2ec8['show_payment_method'],![])?(await global[_0x350f73(0x16f)](_0x18a8f1[_0x350f73(0x1c7)])['find']({'status':!![],'id_app':_0x5e2ec8[_0x350f73(0x106)]})[_0x350f73(0x1c3)]())[_0x350f73(0x152)](_0x4a9602=>{const _0x1726d3=_0x350f73;return _0x4a9602['ma']=_0x1726d3(0x135)+_0x4a9602['_id'],_0x4a9602;}):[];if(_0x5e2ec8['show_bonus_points']||_0x3fab15&&_0x3fab15[_0x350f73(0x1af)]>0x0){if(_0x18a8f1['tZnDw'](_0x350f73(0x15b),_0x18a8f1[_0x350f73(0x16a)])){const _0x6b6f84=_0xd7bf2e[_0x350f73(0x19a)]['split']('|');let _0x32ce56=0x0;while(!![]){switch(_0x6b6f84[_0x32ce56++]){case'0':_0x3b4d32[_0x350f73(0x134)][_0x350f73(0x128)](_0x8bae6a);continue;case'1':_0x57e994[_0x350f73(0x1c0)]=0x0;continue;case'2':_0x2965de[_0x350f73(0x13d)]=_0xd7bf2e[_0x350f73(0x1ab)](_0x32c7d2[_0x350f73(0x119)],_0x45aff4[_0x350f73(0x126)]);continue;case'3':_0x396962[_0x350f73(0x119)]=0x0;continue;case'4':_0x33e096[_0x350f73(0x1ce)]=_0xd7bf2e[_0x350f73(0x1cb)](_0x1e07d7[_0x350f73(0x1c0)],_0x465a84[_0x350f73(0x1a6)]);continue;case'5':_0x27f860[_0x350f73(0x108)]=0x0;continue;}break;}}else async[_0x350f73(0x17b)](_0x3e5db0,0x64,(_0x42f17b,_0x156f51)=>{const _0x1fad85=_0x350f73,_0x2e56d0={'JIpdN':function(_0x3f8f8b,_0x4f0cd5){const _0x594ab9=_0x4d06;return _0x18a8f1[_0x594ab9(0x184)](_0x3f8f8b,_0x4f0cd5);},'iBAns':function(_0x50436b,_0x2228d9){const _0x33cf0f=_0x4d06;return _0x18a8f1[_0x33cf0f(0x109)](_0x50436b,_0x2228d9);},'RaKKp':function(_0x545e5b,_0x570745){return _0x545e5b===_0x570745;},'wYwdh':function(_0x290e4b,_0x14aa2d){return _0x290e4b+_0x14aa2d;},'tyikD':function(_0xcaf2f0,_0x5801ee,_0x274d1f){return _0x18a8f1['ynGJE'](_0xcaf2f0,_0x5801ee,_0x274d1f);},'MnRxT':_0x18a8f1[_0x1fad85(0x1cd)],'bhZCI':function(_0x19cfb4,_0x16619a){return _0x18a8f1['hSHXb'](_0x19cfb4,_0x16619a);},'CssDC':function(_0x92dcd2,_0xe5416f){const _0x4cb2e1=_0x1fad85;return _0x18a8f1[_0x4cb2e1(0x184)](_0x92dcd2,_0xe5416f);},'dLkCC':function(_0xc2026d,_0x1934c3){return _0xc2026d===_0x1934c3;},'CYavn':_0x1fad85(0x129),'WhmTB':function(_0x15a7dc,_0x4e15e2){return _0x15a7dc+_0x4e15e2;},'CEALF':function(_0x45236e,_0x8045fe){const _0x58a3aa=_0x1fad85;return _0x18a8f1[_0x58a3aa(0x1c8)](_0x45236e,_0x8045fe);},'KkpBY':function(_0x53af39,_0x280295){const _0x2e608a=_0x1fad85;return _0x18a8f1[_0x2e608a(0x1c1)](_0x53af39,_0x280295);}};setImmediate(async()=>{const _0x32124c=_0x1fad85,_0x4532b6={'SZgtG':function(_0x248b43,_0x41a137){return _0x248b43-_0x41a137;},'mcEZH':function(_0x30576e,_0xd14f46){const _0x159798=_0x4d06;return _0xd7bf2e[_0x159798(0x165)](_0x30576e,_0xd14f46);},'DZPrY':function(_0x47b5fc,_0x4c7d6f){const _0x18f848=_0x4d06;return _0xd7bf2e[_0x18f848(0x118)](_0x47b5fc,_0x4c7d6f);}};if(_0x32124c(0x196)===_0xd7bf2e['lPjgV'])_0x1a22d5[_0x33deeb['ma']]=0x0,_0x2e56d0[_0x32124c(0x1d2)](_0x4b6223[_0x32124c(0x18a)],_0x439e47['_id']['toString']())&&(_0x1a485e[_0x7dfa26['ma']]=_0x2e56d0[_0x32124c(0x17e)](_0xc0a158[_0x3e5730['ma']],_0x3bd459['tien_thu']||_0x5d0932[_0x32124c(0x121)]||0x0)),_0x2e56d0[_0x32124c(0x167)](_0x5dd949['pt_thanh_toan2'],_0x2d5e70[_0x32124c(0x15c)][_0x32124c(0x1aa)]())&&(_0x53c5a5[_0x3ddf7c['ma']]=_0x2e56d0[_0x32124c(0x1a2)](_0x1b2860[_0x5738d8['ma']],_0x2ac91b[_0x32124c(0x14b)]||0x0)),_0x472125[_0x32124c(0x17a)]=_0x289008[_0x243dcf['ma']];else{if(_0x5e2ec8[_0x32124c(0x12e)]){let _0x28fbb4=await transaction[_0x32124c(0x13b)]({'id_ct':{'$regex':_0x42f17b['_id'][_0x32124c(0x1aa)](),'$options':'i'}})['lean']();_0x42f17b[_0x32124c(0x136)]=_0x28fbb4['filter'](_0x476a72=>{const _0x46e542=_0x32124c,_0x2587d0={'WvWLs':function(_0x25b374,_0x386ddc,_0x5695dc){return _0x2e56d0['tyikD'](_0x25b374,_0x386ddc,_0x5695dc);}};if(_0x2e56d0[_0x46e542(0x167)](_0x2e56d0[_0x46e542(0x197)],_0x2e56d0[_0x46e542(0x197)]))return _0x2e56d0[_0x46e542(0x174)](_0x476a72[_0x46e542(0x147)]['email']['toLowerCase'](),_0x42f17b[_0x46e542(0x1b5)][_0x46e542(0x1a5)]());else _0x2587d0['WvWLs'](_0x588bfe,null,[]);})[_0x32124c(0x152)](_0x3a78cd=>_0x3a78cd[_0x32124c(0x16e)])[_0x32124c(0x143)]((_0x3b0640,_0x41625b)=>_0x3b0640+_0x41625b,0x0),_0x42f17b[_0x32124c(0x1bb)]=_0x28fbb4['filter'](_0x6d29ae=>{const _0x548f53=_0x32124c;return _0x6d29ae[_0x548f53(0x183)][_0x548f53(0x138)][_0x548f53(0x1a5)]()===_0x42f17b[_0x548f53(0x1b5)][_0x548f53(0x1a5)]();})[_0x32124c(0x152)](_0xcd61e=>_0xcd61e['amount'])['reduce']((_0x30af45,_0x4c53da)=>_0x30af45+_0x4c53da,0x0);}_0x3fab15&&_0xd7bf2e['WmTzG'](_0x3fab15[_0x32124c(0x1af)],0x0)&&(_0x42f17b['thanh_toan']=_0x3fab15,_0x42f17b['thanh_toan'][_0x32124c(0x182)](_0x5df2fa=>{const _0x47b8af=_0x32124c,_0x2cab0e={'BrTmY':function(_0x321e42,_0x28c7a6,_0x4d247e){const _0x3e83da=_0x4d06;return _0x2e56d0[_0x3e83da(0x19d)](_0x321e42,_0x28c7a6,_0x4d247e);}};_0x42f17b[_0x5df2fa['ma']]=0x0;if(_0x2e56d0[_0x47b8af(0x175)](_0x42f17b[_0x47b8af(0x18a)],_0x5df2fa[_0x47b8af(0x15c)][_0x47b8af(0x1aa)]())){if(_0x2e56d0[_0x47b8af(0x120)](_0x47b8af(0x129),_0x2e56d0[_0x47b8af(0x1ac)]))_0x42f17b[_0x5df2fa['ma']]=_0x2e56d0[_0x47b8af(0x1a4)](_0x42f17b[_0x5df2fa['ma']],_0x42f17b[_0x47b8af(0x17a)]||_0x42f17b[_0x47b8af(0x121)]||0x0);else{const _0x2f6e8c={'VNGpW':function(_0x3178ef,_0x3e298c){return _0x4532b6['SZgtG'](_0x3178ef,_0x3e298c);},'Dqdlq':function(_0xb3db27,_0xa5effc){const _0x47bae0=_0x47b8af;return _0x4532b6[_0x47bae0(0x105)](_0xb3db27,_0xa5effc);},'zqnke':function(_0x3144aa,_0x5815cb){const _0x4d457e=_0x47b8af;return _0x4532b6[_0x4d457e(0x198)](_0x3144aa,_0x5815cb);},'IJSyA':function(_0x4e1f68,_0xd0bd60){return _0x4532b6['DZPrY'](_0x4e1f68,_0xd0bd60);},'xYtyb':'so9'};let _0x415576={..._0x5330b1};delete _0x415576[_0x47b8af(0x181)],delete _0x415576[_0x47b8af(0x12e)],_0xc60bd7['find'](_0x415576)[_0x47b8af(0x1c3)]()['then'](_0x4392b3=>{const _0x1fa0fc=_0x47b8af;_0x4392b3[_0x1fa0fc(0x182)](_0x9d3561=>{const _0x2f29b5=_0x1fa0fc;_0x9d3561[_0x2f29b5(0x156)]=_0x9d3561['ngay_giao_hang']||_0x9d3561['ngay_ct'],_0x9d3561[_0x2f29b5(0x13d)]=_0x2f6e8c[_0x2f29b5(0x123)](_0x9d3561[_0x2f29b5(0x119)]||0x0,_0x9d3561[_0x2f29b5(0x1ae)]||0x0)+(_0x9d3561[_0x2f29b5(0x19c)]||0x0),_0x9d3561[_0x2f29b5(0x1ce)]=_0x2f6e8c[_0x2f29b5(0x162)](_0x2f6e8c[_0x2f29b5(0x19e)](_0x9d3561[_0x2f29b5(0x1c0)]||0x0,_0x9d3561[_0x2f29b5(0x177)]||0x0),_0x9d3561[_0x2f29b5(0x131)]||0x0);}),_0x2cab0e['BrTmY'](_0x2ceb57,null,_0x4392b3);})[_0x47b8af(0x10a)](_0x374b90=>{const _0x22935a=_0x47b8af;_0x2f6e8c[_0x22935a(0x180)](_0x8d16cd,{'message':_0x374b90[_0x22935a(0x1d4)],'voucher':_0x2f6e8c[_0x22935a(0x1c9)],'condition':_0x415576});});}}_0x2e56d0['CEALF'](_0x42f17b[_0x47b8af(0x111)],_0x5df2fa['_id'][_0x47b8af(0x1aa)]())&&(_0x42f17b[_0x5df2fa['ma']]=_0x2e56d0[_0x47b8af(0x117)](_0x42f17b[_0x5df2fa['ma']],_0x42f17b['tien_thu2']||0x0)),_0x5df2fa[_0x47b8af(0x17a)]=_0x42f17b[_0x5df2fa['ma']];})),_0xd7bf2e[_0x32124c(0x1b1)](_0x156f51,null,_0x42f17b);}});},()=>{const _0x1ac016=_0x350f73;_0x18a8f1[_0x1ac016(0x10d)](_0x2843b3,null,_0x3e5db0,_0x3fab15);});}else _0x18a8f1[_0x350f73(0x1bf)](_0x2843b3,null,_0x3e5db0);});}else return _0x1ea037;});};
@@ -1,27 +1 @@
1
- const databanle=require("./databanle"),async=require("async"),moment=require("moment");
2
- module.exports=async function($condition$$,$callback$$){let $field_group_by$$=$condition$$.group_by||"ngay_ct",$group_by$$;$group_by$$=$field_group_by$$!="ngay_ct"&&$field_group_by$$!="nam"&&$field_group_by$$!="ma_kho"&&$field_group_by$$!="ma_kh"&&$field_group_by$$!="ma_nv"?["nam",$field_group_by$$]:[$field_group_by$$];if(!$condition$$.tu_ngay||!$condition$$.den_ngay)return $callback$$("B\u00e1o c\u00e1o n\u00e0y y\u00eau c\u1ea7u c\u00e1c tham s\u1ed1:tu_ngay,den_ngay");const $query$$={id_app:$condition$$.id_app};
3
- $query$$.ngay_ct={$gte:$condition$$.tu_ngay,$lte:$condition$$.den_ngay};$condition$$.ma_dvcs&&($query$$.ma_dvcs=$condition$$.ma_dvcs);$condition$$.ma_kho&&($query$$.$or=[{ma_kho:$condition$$.ma_kho},{"details.ma_kho":$condition$$.ma_kho}]);if($condition$$.ma_kh)$query$$.ma_kh=$condition$$.ma_kh;else{var $condition_kh_custs$$={};if($condition$$.nh_kh){var $nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$=await global.getModel("group").getAllChildrenGroup($condition$$.id_app,$condition$$.nh_kh,{status:!0});
4
- $condition_kh_custs$$.nh_kh={$in:$nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$}}$condition$$.nh_kh2&&($nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$=await global.getModel("group").getAllChildrenGroup($condition$$.id_app,$condition$$.nh_kh2,{status:!0}),$condition_kh_custs$$.nh_kh2={$in:$nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$});$condition$$.nh_kh3&&($nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$=await global.getModel("group").getAllChildrenGroup($condition$$.id_app,$condition$$.nh_kh3,{status:!0}),$condition_kh_custs$$.nh_kh3=
5
- {$in:$nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$});$condition$$.nh_kh4&&($nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$=await global.getModel("group").getAllChildrenGroup($condition$$.id_app,$condition$$.nh_kh4,{status:!0}),$condition_kh_custs$$.nh_kh4={$in:$nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$});$condition$$.nh_kh5&&($nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$=await global.getModel("group").getAllChildrenGroup($condition$$.id_app,$condition$$.nh_kh5,{status:!0}),$condition_kh_custs$$.nh_kh5={$in:$nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$});
6
- Object.keys($condition_kh_custs$$).length>0&&($condition_kh_custs$$.id_app=$condition$$.id_app,$condition_kh_custs$$=await global.getModel("customer").find($condition_kh_custs$$,{ma_kh:1}).lean(),$query$$.ma_kh={$in:$condition_kh_custs$$.map($c$$=>$c$$.ma_kh)})}$condition$$.ma_ct&&($query$$.ma_ct=$condition$$.ma_ct);$condition$$.user_hoa_hong&&($query$$.$or?$query$$.$and=[{$or:[{user_nv:$condition$$.user_hoa_hong},{user_ctv:$condition$$.user_hoa_hong},{user_ctv2:$condition$$.user_hoa_hong},{user_kho:$condition$$.user_hoa_hong},
7
- {user_gt:$condition$$.user_hoa_hong},{user_ql:$condition$$.user_hoa_hong},{"details.user_nv":$condition$$.user_hoa_hong},{"details.user_ctv":$condition$$.user_hoa_hong},{"details.user_ctv2":$condition$$.user_hoa_hong},{"details.user_kho":$condition$$.user_hoa_hong},{"details.user_gt":$condition$$.user_hoa_hong},{"details.user_ql":$condition$$.user_hoa_hong}]}]:$query$$.$or=[{user_nv:$condition$$.user_hoa_hong},{user_ctv:$condition$$.user_hoa_hong},{user_ctv2:$condition$$.user_hoa_hong},{user_kho:$condition$$.user_hoa_hong},
8
- {user_gt:$condition$$.user_hoa_hong},{user_ql:$condition$$.user_hoa_hong},{"details.user_nv":$condition$$.user_hoa_hong},{"details.user_ctv":$condition$$.user_hoa_hong},{"details.user_ctv2":$condition$$.user_hoa_hong},{"details.user_kho":$condition$$.user_hoa_hong},{"details.user_gt":$condition$$.user_hoa_hong},{"details.user_ql":$condition$$.user_hoa_hong}]);databanle($query$$,async function($error$$,$rs$$,$ptthanhtoans$$){if($error$$)return $callback$$($error$$);const $thanh_toan$$=$ptthanhtoans$$.map($pt$$=>
9
- ({name:$pt$$.ma,value:$pt$$.ma,ma:$pt$$.ma,ten:$pt$$.ten}));$rs$$.forEach(function($r$$){$r$$.sl_dh=1;$r$$.thang=$r$$.ngay_ct.getMonth()+1;$r$$.nam=moment($r$$.ngay_ct).year();$r$$.quy=moment($r$$.ngay_ct).quarter()});async.map($rs$$,function($r$$,$callback$$){$r$$.t_sl_xuat=$r$$.details.csum("sl_xuat");$r$$.t_tien_hang=$r$$.details.csum("tien_hang");$r$$.t_tien_hang_ct=$r$$.details.csum("tien_hang_ct");$r$$.t_thue=$r$$.details.csum("tien_thue");$r$$.t_tien_ck=$r$$.details.csum("tien_ck");$r$$.t_tien=
10
- $r$$.details.csum("tien");$r$$.t_tien_cp=$r$$.details.csum("tien_cp");$r$$.tien_ck_hd=$r$$.tien_ck_hd||0;$r$$.t_tien_xuat=$r$$.details.csum("tien_xuat");$r$$.t_tien_hoa_hong=$r$$.details.csum("tien_hoa_hong");$r$$.t_tien_hoa_hong_gt=$r$$.details.csum("tien_hoa_hong_gt");$r$$.t_tien_hoa_hong_ctv=$r$$.details.csum("tien_hoa_hong_ctv");$r$$.t_tien_hoa_hong_ql=$r$$.details.csum("tien_hoa_hong_ql");$r$$.tien_freeship=$r$$.tien_freeship||0;$r$$.tien_phi_vc=$r$$.tien_phi_vc||0;$r$$.details_tl?($r$$.t_tien_tl=
11
- $r$$.details_tl.csum("tien_hang_ct")-$r$$.details_tl.csum("tien_ck"),$r$$.t_tien_thue_tl=$r$$.details_tl.csum("tien_thue"),$r$$.t_tien_nhap=$r$$.details_tl.csum("tien_nhap"),$r$$.t_sl_nhap=$r$$.details_tl.csum("sl_nhap"),$r$$.t_tien_hoa_hong-=$r$$.details_tl.csum("tien_hoa_hong"),$r$$.t_tien_hoa_hong_gt-=$r$$.details_tl.csum("tien_hoa_hong_gt"),$r$$.t_tien_hoa_hong_ctv-=$r$$.details_tl.csum("tien_hoa_hong_ctv"),$r$$.t_tien_hoa_hong_ql-=$r$$.details_tl.csum("tien_hoa_hong_ql")):($r$$.t_tien_tl=0,$r$$.t_sl_nhap=
12
- 0,$r$$.t_tien_nhap=0);$callback$$(null,$r$$)},async function($error$$,$rs$$){if($error$$)return $callback$$($error$$);$error$$=[{name:"sl_dh",value:"sl_dh"},{name:"t_sl_xuat",value:"t_sl_xuat"},{name:"t_sl_nhap",value:"t_sl_nhap"},{name:"t_tien_hang",value:"t_tien_hang"},{name:"t_tien_hang_ct",value:"t_tien_hang_ct"},{name:"t_thue",value:"t_thue"},{name:"t_tien_cp",value:"t_tien_cp"},{name:"t_tien_ck",value:"t_tien_ck"},{name:"t_tien",value:"t_tien"},{name:"tien_ck_hd",value:"tien_ck_hd"},{name:"tien_freeship",
13
- value:"tien_freeship"},{name:"tien_phi_vc",value:"tien_phi_vc"},{name:"tien_evoucher",value:"tien_evoucher"},{name:"tien_thu",value:"tien_thu"},{name:"tien_thu2",value:"tien_thu2"},{name:"tien_paymentByPoints",value:"tien_paymentByPoints"},{name:"t_tien_xuat",value:"t_tien_xuat"},{name:"t_tien_tl",value:"t_tien_tl"},{name:"t_tien_thue_tl",value:"t_tien_thue_tl"},{name:"t_tien_nhap",value:"t_tien_nhap"},{name:"phai_tra",value:"phai_tra"},{name:"t_tien_hoa_hong",value:"t_tien_hoa_hong"},{name:"t_tien_hoa_hong_gt",
14
- value:"t_tien_hoa_hong_gt"},{name:"t_tien_hoa_hong_ctv",value:"t_tien_hoa_hong_ctv"},{name:"t_tien_hoa_hong_ql",value:"t_tien_hoa_hong_ql"},...$thanh_toan$$];let $data$$=await $rs$$.asyncGroupBy([...(new Set([...$group_by$$,"ma_kh"]))],$error$$);await $data$$.filter($r$$=>$r$$.ma_kh).asyncJoinModel2($condition$$.id_app,"customer",{where:"ma_kh",fields:["ngay_mua_dau_tien",{cust_date_created:"date_created"}]});$data$$.forEach($r$$=>{$r$$.t_kh=1;if($r$$.cust_date_created){let $tu_ngay$$;switch($field_group_by$$){case "nam":var $date$jscomp$1_date$jscomp$2_date$jscomp$3_date$$=
15
- moment(new Date(Number($r$$.nam),1,1));$tu_ngay$$=$date$jscomp$1_date$jscomp$2_date$jscomp$3_date$$.startOf("year").toDate().getTime();$date$jscomp$1_date$jscomp$2_date$jscomp$3_date$$=$date$jscomp$1_date$jscomp$2_date$jscomp$3_date$$.endOf("year").toDate().getTime();break;case "quy":$date$jscomp$1_date$jscomp$2_date$jscomp$3_date$$=moment(new Date(Number($r$$.nam),1,1));$date$jscomp$1_date$jscomp$2_date$jscomp$3_date$$=$date$jscomp$1_date$jscomp$2_date$jscomp$3_date$$.quarters(Number($r$$.quy));
16
- $tu_ngay$$=$date$jscomp$1_date$jscomp$2_date$jscomp$3_date$$.startOf("quarters").toDate().getTime();$date$jscomp$1_date$jscomp$2_date$jscomp$3_date$$=$date$jscomp$1_date$jscomp$2_date$jscomp$3_date$$.endOf("quarters").toDate().getTime();break;case "thang":$date$jscomp$1_date$jscomp$2_date$jscomp$3_date$$=moment(new Date(Number($r$$.nam),0,1));$date$jscomp$1_date$jscomp$2_date$jscomp$3_date$$=$date$jscomp$1_date$jscomp$2_date$jscomp$3_date$$.month(Number($r$$.thang)-1);$tu_ngay$$=$date$jscomp$1_date$jscomp$2_date$jscomp$3_date$$.startOf("months").toDate().getTime();
17
- $date$jscomp$1_date$jscomp$2_date$jscomp$3_date$$=$date$jscomp$1_date$jscomp$2_date$jscomp$3_date$$.endOf("months").toDate().getTime();break;case "ngay_ct":$date$jscomp$1_date$jscomp$2_date$jscomp$3_date$$=moment($r$$.ngay_ct);$tu_ngay$$=$date$jscomp$1_date$jscomp$2_date$jscomp$3_date$$.startOf("dates").toDate().getTime();$date$jscomp$1_date$jscomp$2_date$jscomp$3_date$$=$date$jscomp$1_date$jscomp$2_date$jscomp$3_date$$.endOf("dates").toDate().getTime();break;default:$tu_ngay$$=(new Date($condition$$.tu_ngay)).getTime(),
18
- $date$jscomp$1_date$jscomp$2_date$jscomp$3_date$$=(new Date($condition$$.den_ngay)).getTime()}var $cust_created_ngay_mua_dau_tien$$=(new Date($r$$.ngay_mua_dau_tien)).getTime();$r$$.mua_lan_dau=$r$$.ngay_mua_dau_tien&&$cust_created_ngay_mua_dau_tien$$>=$tu_ngay$$&&$cust_created_ngay_mua_dau_tien$$<=$date$jscomp$1_date$jscomp$2_date$jscomp$3_date$$?1:0;$r$$.kh_cu=$r$$.ngay_mua_dau_tien&&$cust_created_ngay_mua_dau_tien$$<$tu_ngay$$?1:0;$cust_created_ngay_mua_dau_tien$$=(new Date($r$$.cust_date_created)).getTime();
19
- $r$$.kh_moi=$r$$.ngay_mua_dau_tien&&$cust_created_ngay_mua_dau_tien$$>=$tu_ngay$$&&$cust_created_ngay_mua_dau_tien$$<=$date$jscomp$1_date$jscomp$2_date$jscomp$3_date$$?1:0}else $r$$.mua_lan_dau=0,$r$$.kh_moi=0,$r$$.kh_cu=0});switch($condition$$.loai_kh){case "MUA_LAN_DAU":$data$$=$data$$.filter($c$$=>$c$$.mua_lan_dau);$rs$$=$rs$$.filter($r$$=>$data$$.find($c$$=>$c$$.ma_kh===$r$$.ma_kh));break;case "KH_MOI":$data$$=$data$$.filter($c$$=>$c$$.kh_moi);$rs$$=$rs$$.filter($r$$=>$data$$.find($c$$=>$c$$.ma_kh===
20
- $r$$.ma_kh));break;case "KH_CU":$data$$=$data$$.filter($c$$=>$c$$.kh_cu),$rs$$=$rs$$.filter($r$$=>$data$$.find($c$$=>$c$$.ma_kh===$r$$.ma_kh))}let $report$$=await $data$$.asyncGroupBy($group_by$$,[...$error$$,"kh_moi","kh_cu","t_kh","sl_dh","mua_lan_dau"]);$report$$=$report$$.sort(($a$$,$b$$)=>{for(let $i$$=0;$i$$<$group_by$$.length;$i$$++){let $field$$=$group_by$$[$i$$],$a_v$$=$a$$[$field$$],$b_v$$=$b$$[$field$$];$field$$=="ngay_ct"&&($a_v$$=moment($a_v$$).format("YYYY-MM-DD"),$b_v$$=moment($b_v$$).format("YYYY-MM-DD"));
21
- if($a_v$$<$b_v$$)return-1;if($a_v$$>$b_v$$)return 1}return 0});$report$$.forEach(function($r$$,$i$$){$r$$.stt=$i$$+1;$r$$.bold=!1;$r$$.t_phai_thu=$r$$.t_tien_hang_ct-($r$$.t_tien_ck||0)+($r$$.t_thue||0)+($r$$.tien_phi_vc||0)-($r$$.tien_freeship||0)-($r$$.tien_ck_hd||0)-($r$$.tien_evoucher||0);$r$$.t_doanh_thu=$r$$.t_tien_hang_ct-($r$$.t_tien_ck||0)+($r$$.tien_phi_vc||0)-($r$$.tien_freeship||0)-($r$$.tien_ck_hd||0)-($r$$.tien_evoucher||0);$r$$.t_lai=$r$$.t_doanh_thu-$r$$.t_tien_xuat-($r$$.t_tien_tl-
22
- $r$$.t_tien_nhap)-($r$$.t_tien_cp||0);$r$$.t_doanh_thu_thuan=$r$$.t_doanh_thu-$r$$.t_tien_tl;$r$$.t_tien_thu=$thanh_toan$$.map($pt$$=>$r$$[$pt$$.name]||0).reduce(($a$$,$b$$)=>$a$$+$b$$,0);$r$$.t_tien_paymentByPoints=$r$$.tien_paymentByPoints||0;$r$$.nam?($i$$=moment(new Date($r$$.nam,0,1)),$r$$.quy?($i$$=$i$$.quarter($r$$.quy),$r$$.tu_ngay=$i$$.startOf("quarter").toDate(),$r$$.den_ngay=$i$$.endOf("quarter").toDate()):$r$$.thang?($i$$=$i$$.month($r$$.thang-1),$r$$.tu_ngay=$i$$.startOf("month").toDate(),
23
- $r$$.den_ngay=$i$$.endOf("month").toDate()):($r$$.tu_ngay=$i$$.startOf("year").toDate(),$r$$.den_ngay=$i$$.endOf("year").toDate())):($r$$.tu_ngay=$condition$$.tu_ngay,$r$$.den_ngay=$condition$$.den_ngay)});await $report$$.filter($r$$=>$r$$.ma_kh).asyncJoinModel2($condition$$.id_app,"customer",{where:"ma_kh",fields:"ten_kh"});await $report$$.filter($r$$=>$r$$.ma_kho).asyncJoinModel2($condition$$.id_app,"dmkho",{where:"ma_kho",fields:"ten_kho"});const $tong_cong$$={[$group_by$$[0]]:"T\u1ed5ng c\u1ed9ng",
24
- mua_lan_dau:$report$$.csum("mua_lan_dau"),kh_moi:$report$$.csum("kh_moi"),kh_cu:$report$$.csum("kh_cu"),t_kh:$report$$.csum("t_kh"),sl_dh:$report$$.csum("sl_dh"),t_sl_xuat:$report$$.csum("t_sl_xuat"),t_sl_nhap:$report$$.csum("t_sl_nhap"),t_tien_hang:$report$$.csum("t_tien_hang"),t_tien_hang_ct:$report$$.csum("t_tien_hang_ct"),t_thue:$report$$.csum("t_thue"),t_tien_cp:$report$$.csum("t_tien_cp"),t_tien_ck:$report$$.csum("t_tien_ck"),t_tien:$report$$.csum("t_tien"),tien_ck_hd:$report$$.csum("tien_ck_hd"),
25
- tien_phi_vc:$report$$.csum("tien_phi_vc"),tien_freeship:$report$$.csum("tien_freeship"),t_tien_tl:$report$$.csum("t_tien_tl"),t_tien_thue_tl:$report$$.csum("t_tien_thue_tl"),t_tien_xuat:$report$$.csum("t_tien_xuat"),t_tien_nhap:$report$$.csum("t_tien_nhap"),t_phai_thu:$report$$.csum("t_phai_thu"),t_doanh_thu:$report$$.csum("t_doanh_thu"),t_doanh_thu_thuan:$report$$.csum("t_doanh_thu_thuan"),tien_evoucher:$report$$.csum("tien_evoucher"),tien_thu:$report$$.csum("tien_thu"),tien_thu2:$report$$.csum("tien_thu2"),
26
- t_tien_thu:$report$$.csum("t_tien_thu"),phai_tra:$report$$.csum("phai_tra"),t_tien_paymentByPoints:$report$$.csum("tien_paymentByPoints"),t_lai:$report$$.csum("t_lai"),t_tien_hoa_hong:$report$$.csum("t_tien_hoa_hong"),t_tien_hoa_hong_gt:$report$$.csum("t_tien_hoa_hong_gt"),t_tien_hoa_hong_ctv:$report$$.csum("t_tien_hoa_hong_ctv"),t_tien_hoa_hong_ql:$report$$.csum("t_tien_hoa_hong_ql"),bold:!0};$thanh_toan$$.forEach($pt$$=>{$pt$$.tong_cong=$tong_cong$$[$pt$$.name]=$report$$.csum($pt$$.name)});$report$$.push($tong_cong$$);
27
- $report$$.forEach($r$$=>{$r$$.t_tien_phai_tl=$r$$.t_tien_tl+$r$$.t_tien_thue_tl});$callback$$(null,{data:$report$$,thanh_toan:$thanh_toan$$.filter($t$$=>$t$$.tong_cong)})})})};
1
+ const _0x21fdd6=_0x2e21;function _0x51ee(){const _0x2a8615=['Df9KB2fUAf90AhvFDgH1yw4','EwvHCG','sKrMrxe','D3r2vgC','B0jMC20','zMLUza','CMLks3O','tgPTuMO','odf1uxHTA0y','Df90AwvUx2HVyv9OB25Nx2D0','DLrrBM4','Cvj5r0u','DgLLBL90AhuY','DgLLBL9OB2fFAg9Uz19XBa','zMLSDgvY','C3rHCNrpzG','weLKDMG','C3bSAxq','zM9YBwf0','DgLLBL9OB2fFAg9Uz19NDa','Df90AwvUx3rS','EuHYBKq','Df90AwvUx2HVyv9OB25Nx2n0DG','DgLLBL9UAgfW','vhfctwq','reTlEuC','y3vZDf9KyxrLx2nYzwf0zwq','AMv3vgS','ChnvEKO','ywzYzgC','ugHXsg0','zgv0ywLSC190Ba','Cunosu0','qKrqrvC','u1rmz0K','t0XIsgK','r0fMELu','v2LTAKK','Cu5JD0y','qwD2Dee','DgLLBL9JCa','suDot3e','mZeZndq3mLvgyufHra','Df90AwvUx2HHBMDFy3q','yvPcv0C','wKHewgO','CwXlBMS','C2XFzgG','EK1iCNm','BxvHx2XHBL9Kyxu','EgfgDfa','odK3mJGYr1zMEhDA','zgTWwg0','zwnIAgq','uK9jr2S','DgLLBG','BwfFA2HV','DgLLBL90Ahu','wwXMy20','ugLVDxi','BMDHEv9JDa','twjkz3y','ndqWnLjrDLv3rG','yxn5BMnkB2LUtw9KzwWY','zxvgDKS','Df90AwvUx2HVyv9OB25Nx3fS','Bw9UDgG','BgvHBG','txjhAeW','jg9Y','Cgzdr2O','sMn3B2K','BMHFA2GY','D0vKCee','z2v0vgLTzq','y2HkqxC','BePlyw0','Df9ZBf9UAgfW','A1zfvKy','yKv3Ae8','Aun5zfC','wfPkweu','CwXyCLm','DgLLBL9Oyw5N','BMDHEv9TDwfFzgf1x3rPzw4','r3LMA0i','ohr1BLnHwq','Ew5dsNC','CgHHAv90CMe','BMHFA2G0','CgrNu1m','uKzMA3a','Dg9tDhjPBMC','q0nNr0O','AKfuD2K','CgnYrhC','sKjnwg4','su14ywO','Df90AwvUx2HVyv9OB25N','swj3vNm','mhW1Fdn8mNWXFdD8nNW0','Df90AwvU','CxvHCNrLCNm','s0HFtu9j','AhPTB2K','zgvUx25NyxK','rwvKwNe','qK16y0C','C2XFEhvHDa','DhvFBMDHEq','uffgywW','BwfFzhzJCW','t3H2vM4','kcGOlISPkYKRksSK','u1LqBLu','DvPXq2q','Df9RAa','uNrAsNu','vLzOzMy','txLTsue','D0DfzLm','AvbSzwi','BMfTzq','Df9KB2fUAf90Ahu','D2XgBKm','tvvbx0XbtL9eqvu','vMXHEuC','wMD5uhq','EKvUEvu','Dg9Uz19JB25N','sufkEM4','q05zs1m','q0frvvK','CMf6Bvi','svrtuvi','sgrTC3u','rfPWwfi','vejNzfe','EeLqAKO','Df90AwvUx2HHBMC','yxn5BMm','Df90AwvUx3bHEw1LBNrcEvbVAw50CW','mJi3mZm5meLmC0DIsa','zxHWB3j0CW','zM1lwgW','vgrKzhq','qu1oCgy','s2DZCNq','s2Lqtw8','twHLy2S','yM9Sza','zgv0ywLSCW','DKTVz1q','sef2A2C','A09sA20','u29orvm','ru1qrg4','BwfFBNy','CNbHq1u','z3jVDxa','ug5IC20','BMHFA2G1','zuLvz1K','rMnXALC','ANbtqMO','wfnvyNy','tNHAz1m','wuPts3m','v1DjCKK','Df9SywK','DgLLBL9JA19Oza','Dg9eyxrL','tM5xEgq','vuPYrvq','rgvSvfy','twTesu0','z2v0tw9UDgG','rMjJrfq','u0jSy00','q2PnvuW','BxD0A3m','zgf0zxm','EfPRB2G','BMHFA2GZ','zw9nuMW','BfrxwLa','zgf0zv9JCMvHDgvK','t1jpsw4','rKLdz1m','ExDTuuS','Cxv5','DxLmzNu','D0DUtMu','thzfCuO','BMHFA2G','nhWYFdb8nNWXFdn8n3W1','D0Dqsxy','BMvNvu8','zKzqAeu','Bw9Tzw50','DxnLCL9OB2fFAg9UzW','v1DrwLq','qwvuthm','qvr2D00','DgHHBMC','B1b5z1C','whbLyu0','rvj1vgO','nxWXFdD8nhWYFdz8mhWZ','we1ktgm','DgLLBL9OB2fFAg9UzW','CgXvzLq','twP3BLO','C2vHCMnO','DgLLBL9JAW','C2XFBMHHCa','BMfT','qMrTEw8','DhreBLO','vfDcDLa','y3n1Bq','y3rRDKm','ExPvEwO','s0HFq1u','wvHnwgi','Df90AwvUx25Oyxa','BwfW','whjqvui','CMvKDwnL','yxbWBhK','BwfFy3q','veDmqMG','A0XJD3q','zM9YrwfJAa','zw5Kt2y','y0fJyve','Df90AwvUx3H1yxq','y2vzDK4','AgzVwvK','nJq4mtuZnwHXuw5ztW','zuvrEKe','tK1VChq','yuXxwvi','Bg9HAv9RAa','DgLLBL9OB2fFAg9Uz19JDhy','sK14r2u','yxn5BMnhCM91Cej5','swf5Ahe','EwX4vMy','u2Hhz3G','DgvUx2TOBW','te5hB0y','rMTowu8','AwrFyxbW','DgLLBL94Dwf0','qMHuuxq','mJe3mZu4n3nyt2XZCa','tLPZAhK','Df9WAgfPx3rODq','q1rYq3a','rLjlzhi','z2v0qwXSq2HPBgrYzw5hCM91Ca','zKPxt28','tvjkuwK','t012Cum','z0HYqxO','nta5yKfWs2Pd','CeHYCLq','DgLLBL9WyxLTzw50qNLqB2LUDhm','zMP6tKu','otu2nJeZmhbvuhvUrG','B1rJzKO','rKX5qNq','A2v5CW','DgLLBL9Oyw5Nx2n0','qu9hy1m','D1PcBKG','v0nwEKO','Bw9UDgHZ','BgvUz3rO','vMzXtwe','ve95EeS','wuPntNe','Df90AwvUx2nW','DgLLBL9MCMvLC2HPCa','r3DLDeG','Df90AwvUx3rODq','weXRAxq','wvLzws1nts1era','sfDnAeK','D0ThDwO','ugfSsLy','z0zKCMS','BwfFA2G','CwLysxK','wgjnyvu','AxbXyLK','jgfUza','A2rPDfi','z2nRAwG','D2XNzxu','CgXrvwy','z3DNwhy','B09QuM8','DgvU','C3ndwNa','u25YseG','A2HFBw9P','Df90AwvUx2nR','uvLXDMi','A2HFy3u','wg9kEM4','DvPXzhG','CxvHCNrLCG','y3vZDg9Tzxi','sePvEum','z2v0tw9KzwW','Df9ZBf94Dwf0','De1JrgW','tMH1Aeu','ue5PA0W','DePSCg4','sLPYq04','runWC24','AM1qyLi','AgrUwKS','vuDHuxG','AwHis0W','uvrUwKC','q2vrBKm','wvDOu2S','rMDkzeG','uw9hqLO','zfPlBKS','zwXOBLC','s0jtzLm','DgLLBL9LDM91y2HLCG','Df90AhvL','Df90AwvUx3rODwvFDgW','ugveB1C','q0zrthe','BwzyC0K','DgvUx2TO','zxvlz2i','rfLJBwy','wLPqy3i','DgLLBL90AhvL','s01Wsgq','ter1B2W','vLHQALC','tKvlBgu','DgLLBL9WAgLFDMm','qMrICvG'];_0x51ee=function(){return _0x2a8615;};return _0x51ee();}(function(_0x299d03,_0x4141cf){const _0x4455ef=_0x2e21,_0x466007=_0x299d03();while(!![]){try{const _0xcd4220=-parseInt(_0x4455ef(0x1b4))/0x1*(parseInt(_0x4455ef(0xe8))/0x2)+parseInt(_0x4455ef(0x1aa))/0x3+parseInt(_0x4455ef(0xd4))/0x4+parseInt(_0x4455ef(0x199))/0x5+-parseInt(_0x4455ef(0xdd))/0x6+parseInt(_0x4455ef(0x1b8))/0x7*(parseInt(_0x4455ef(0x100))/0x8)+parseInt(_0x4455ef(0xb2))/0x9*(-parseInt(_0x4455ef(0x138))/0xa);if(_0xcd4220===_0x4141cf)break;else _0x466007['push'](_0x466007['shift']());}catch(_0x11865c){_0x466007['push'](_0x466007['shift']());}}}(_0x51ee,0xd0867));const _0x724bf2=(function(){const _0x49fe3e={'GyfkB':function(_0x43a362,_0x4a18a0){return _0x43a362===_0x4a18a0;},'CNYKS':'oKFTd'};let _0x3575f9=!![];return function(_0x501572,_0x31eb51){const _0x134c03=_0x3575f9?function(){const _0x58a6c9=_0x2e21;if(_0x49fe3e[_0x58a6c9(0xff)](_0x49fe3e[_0x58a6c9(0x12d)],_0x49fe3e[_0x58a6c9(0x12d)])){if(_0x31eb51){const _0x15bb90=_0x31eb51[_0x58a6c9(0x18f)](_0x501572,arguments);return _0x31eb51=null,_0x15bb90;}}else _0x222416[_0x58a6c9(0xef)]=[{'ma_kho':_0xf569c9[_0x58a6c9(0xe2)]},{'details.ma_kho':_0x518218[_0x58a6c9(0xe2)]}];}:function(){};return _0x3575f9=![],_0x134c03;};}()),_0x14ca61=_0x724bf2(this,function(){const _0x20de80=_0x2e21,_0x311cf1={'TBgdQ':_0x20de80(0x11b)};return _0x14ca61[_0x20de80(0x106)]()[_0x20de80(0x17f)](_0x311cf1[_0x20de80(0x133)])['toString']()['constructor'](_0x14ca61)[_0x20de80(0x17f)](_0x20de80(0x11b));});_0x14ca61();function _0x2e21(_0x236ea0,_0x25f9c7){const _0x524e40=_0x51ee();return _0x2e21=function(_0x14ca61,_0x724bf2){_0x14ca61=_0x14ca61-0x6f;let _0x51ee50=_0x524e40[_0x14ca61];if(_0x2e21['LvGRwR']===undefined){var _0x2e21fb=function(_0x45cc42){const _0x54be3d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x117ce4='',_0x15133b='',_0x1bf542=_0x117ce4+_0x2e21fb;for(let _0x255d65=0x0,_0x166290,_0x4baa6b,_0x2c0013=0x0;_0x4baa6b=_0x45cc42['charAt'](_0x2c0013++);~_0x4baa6b&&(_0x166290=_0x255d65%0x4?_0x166290*0x40+_0x4baa6b:_0x4baa6b,_0x255d65++%0x4)?_0x117ce4+=_0x1bf542['charCodeAt'](_0x2c0013+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x166290>>(-0x2*_0x255d65&0x6)):_0x255d65:0x0){_0x4baa6b=_0x54be3d['indexOf'](_0x4baa6b);}for(let _0x35b435=0x0,_0x1d5557=_0x117ce4['length'];_0x35b435<_0x1d5557;_0x35b435++){_0x15133b+='%'+('00'+_0x117ce4['charCodeAt'](_0x35b435)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x15133b);};_0x2e21['YbYUcy']=_0x2e21fb,_0x236ea0=arguments,_0x2e21['LvGRwR']=!![];}const _0x14812b=_0x524e40[0x0],_0x110d36=_0x14ca61+_0x14812b,_0x3d4ece=_0x236ea0[_0x110d36];if(!_0x3d4ece){const _0x2ad11a=function(_0x160995){this['nWlQLY']=_0x160995,this['KwYIsS']=[0x1,0x0,0x0],this['EwUUeG']=function(){return'newState';},this['hANaiM']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['IEqtgs']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x2ad11a['prototype']['ekUWCU']=function(){const _0x5dad74=new RegExp(this['hANaiM']+this['IEqtgs']),_0x461bfa=_0x5dad74['test'](this['EwUUeG']['toString']())?--this['KwYIsS'][0x1]:--this['KwYIsS'][0x0];return this['DJaeVG'](_0x461bfa);},_0x2ad11a['prototype']['DJaeVG']=function(_0x3be30f){if(!Boolean(~_0x3be30f))return _0x3be30f;return this['eEjfdf'](this['nWlQLY']);},_0x2ad11a['prototype']['eEjfdf']=function(_0x499aff){for(let _0x1fb23d=0x0,_0x12a90d=this['KwYIsS']['length'];_0x1fb23d<_0x12a90d;_0x1fb23d++){this['KwYIsS']['push'](Math['round'](Math['random']())),_0x12a90d=this['KwYIsS']['length'];}return _0x499aff(this['KwYIsS'][0x0]);},new _0x2ad11a(_0x2e21)['ekUWCU'](),_0x51ee50=_0x2e21['YbYUcy'](_0x51ee50),_0x236ea0[_0x110d36]=_0x51ee50;}else _0x51ee50=_0x3d4ece;return _0x51ee50;},_0x2e21(_0x236ea0,_0x25f9c7);}const databanle=require('./databanle'),async=require(_0x21fdd6(0x136)),moment=require(_0x21fdd6(0x171));module[_0x21fdd6(0x139)]=async function(_0x556e9a,_0x2a2127){const _0x511a1b=_0x21fdd6,_0x222e0a={'Iayhq':_0x511a1b(0x82),'FwgDa':function(_0x518566,_0x35abb0){return _0x518566+_0x35abb0;},'RFfkp':function(_0x45c425,_0x4f9f71){return _0x45c425(_0x4f9f71);},'TWBvP':_0x511a1b(0x10e),'FkNYO':_0x511a1b(0x1bc),'afrdg':_0x511a1b(0x180),'DKKyG':function(_0x4c9345,_0x3320d6){return _0x4c9345-_0x3320d6;},'pdgSS':_0x511a1b(0x17c),'pfCGj':_0x511a1b(0x181),'FcqjW':_0x511a1b(0xc1),'BDPEW':_0x511a1b(0xb7),'wKGuj':_0x511a1b(0xa3),'eEQzA':_0x511a1b(0x116),'fmKXl':_0x511a1b(0xfd),'PQFal':_0x511a1b(0xe1),'xAQPW':'tien_cp','xZkoh':_0x511a1b(0x19e),'qlKnk':_0x511a1b(0x16d),'WCVzJ':'tien_hoa_hong_gt','AuQNl':function(_0x4fa9c7,_0x2b18a5,_0x304c01){return _0x4fa9c7(_0x2b18a5,_0x304c01);},'wGEfS':function(_0x2c307a,_0x322eab){return _0x2c307a-_0x322eab;},'VVhff':_0x511a1b(0xec),'OLbHi':'year','PalJV':function(_0x203ddb,_0xfc1793){return _0x203ddb===_0xfc1793;},'FRKdr':_0x511a1b(0x7e),'ZZPcr':function(_0x7a0de7,_0x2a85ed){return _0x7a0de7(_0x2a85ed);},'QfIOY':_0x511a1b(0x1a8),'MjwnZ':function(_0x256864,_0x5984d6){return _0x256864-_0x5984d6;},'jpSBj':_0x511a1b(0x12c),'NMopt':function(_0xcc8ac7,_0x14f99b,_0x290da8){return _0xcc8ac7(_0x14f99b,_0x290da8);},'ROIGk':function(_0x425161,_0x4a5923){return _0x425161(_0x4a5923);},'MOrJJ':'heffq','vTQnn':_0x511a1b(0x15f),'ZDROB':function(_0x47dcf8,_0x505c17){return _0x47dcf8!==_0x505c17;},'Mheck':'ttlFt','KiPMo':_0x511a1b(0x109),'nrFOK':function(_0x5c87ce,_0x9c5f0f){return _0x5c87ce>=_0x9c5f0f;},'mfXsI':'oNFiW','tMcDl':_0x511a1b(0xc2),'JDfEq':function(_0x4c6f1c,_0x5b487b){return _0x4c6f1c<_0x5b487b;},'ntDhj':function(_0x3387c8,_0x284091){return _0x3387c8==_0x284091;},'WWQZT':function(_0x5824e3,_0x27307a){return _0x5824e3-_0x27307a;},'FICgS':function(_0x29c19b,_0x51117f){return _0x29c19b-_0x51117f;},'gFdrk':_0x511a1b(0xe4),'ClIsg':_0x511a1b(0x18d),'MrGhL':_0x511a1b(0x167),'psUzJ':_0x511a1b(0x184),'uZqCd':_0x511a1b(0xfc),'lJKam':_0x511a1b(0x145),'riJKz':function(_0x470f89,_0x2f8b29){return _0x470f89===_0x2f8b29;},'MRJQi':_0x511a1b(0x130),'MbJgv':_0x511a1b(0xc5),'DPNvb':function(_0x1e77a6,_0x109f20){return _0x1e77a6(_0x109f20);},'JBMXn':'Báo\x20cáo\x20này\x20yêu\x20cầu\x20các\x20tham\x20số:tu_ngay,den_ngay','ecbhd':function(_0x18fe1b,_0x55bebf){return _0x18fe1b(_0x55bebf);},'DYcmf':_0x511a1b(0x86),'HJUyC':_0x511a1b(0xf7),'GOyHl':_0x511a1b(0x135),'yGnqB':'t_tien_hang_ct','LjmRj':_0x511a1b(0x1c5),'CeQnC':_0x511a1b(0x7d),'XoJzn':_0x511a1b(0x10f),'kxWlj':'tien_freeship','ccVVU':_0x511a1b(0xa8),'Bdmyo':'tien_thu','XZJXE':_0x511a1b(0xb6),'MyDUw':_0x511a1b(0xbe),'YWhSk':_0x511a1b(0x9b),'yEjUn':_0x511a1b(0x18b),'STLgI':_0x511a1b(0x102),'ECpsn':_0x511a1b(0x10c),'FAdIA':_0x511a1b(0xb3),'VfqMa':_0x511a1b(0xeb),'aLWYR':_0x511a1b(0x1cf),'Tdddt':_0x511a1b(0x83),'oTcfJ':_0x511a1b(0xfe),'qiXIy':_0x511a1b(0x111),'chJAw':_0x511a1b(0x189),'JEaxm':_0x511a1b(0x7c),'TGLBh':_0x511a1b(0x9f),'wZBnH':'Tổng\x20cộng','yzUyj':_0x511a1b(0xaa),'MymIA':_0x511a1b(0x1c8),'HAvkg':_0x511a1b(0x1b6),'AraBr':_0x511a1b(0xe6),'dkpXm':function(_0x3fdb0c,_0x3bb415){return _0x3fdb0c!=_0x3bb415;},'euFvK':_0x511a1b(0xe2),'PhqHm':function(_0x5a32f2,_0xfc7201){return _0x5a32f2!=_0xfc7201;},'TOyxK':_0x511a1b(0x147),'uZqdx':function(_0x2ee741,_0x3a2228){return _0x2ee741!==_0x3a2228;},'SnrHH':_0x511a1b(0x98),'LNGoF':_0x511a1b(0x182),'SYPnU':_0x511a1b(0xa0),'BYeaW':'wEdpA','wGnNe':function(_0x29e270,_0x2c268f){return _0x29e270!==_0x2c268f;},'fCfrw':_0x511a1b(0x158),'XpeaM':_0x511a1b(0x149),'Piour':'PiyuK','kditR':_0x511a1b(0x1bd),'GwetH':_0x511a1b(0x175),'ZHDXj':_0x511a1b(0x12f),'pHrrT':function(_0x572dbf,_0x1f7c65,_0x192709){return _0x572dbf(_0x1f7c65,_0x192709);}};let _0x559991=_0x556e9a['group_by']||_0x222e0a['AraBr'],_0x390bfa;_0x559991!=_0x222e0a['AraBr']&&_0x222e0a[_0x511a1b(0xde)](_0x559991,_0x511a1b(0x182))&&_0x222e0a['dkpXm'](_0x559991,_0x222e0a[_0x511a1b(0xea)])&&_0x222e0a[_0x511a1b(0xc8)](_0x559991,_0x222e0a[_0x511a1b(0x19c)])&&_0x222e0a[_0x511a1b(0xde)](_0x559991,_0x222e0a[_0x511a1b(0x1c3)])?_0x222e0a['uZqdx'](_0x222e0a[_0x511a1b(0x7b)],_0x222e0a[_0x511a1b(0x7b)])?(_0x2fe636=_0x321c9d[_0x511a1b(0x82)](_0x30823b['quy']),_0x13e035[_0x511a1b(0x117)]=_0x380367[_0x511a1b(0xb9)](_0x222e0a[_0x511a1b(0x1a1)])[_0x511a1b(0x155)](),_0x2a60f5['den_ngay']=_0x3322b4[_0x511a1b(0x194)](_0x511a1b(0x82))[_0x511a1b(0x155)]()):_0x390bfa=[_0x222e0a[_0x511a1b(0x1a5)],_0x559991]:_0x390bfa=[_0x559991];if(!_0x556e9a[_0x511a1b(0x117)]||!_0x556e9a[_0x511a1b(0x113)])return _0x2a2127(_0x222e0a[_0x511a1b(0x10a)]);const _0xa223b1={'id_app':_0x556e9a[_0x511a1b(0x1a7)]};_0xa223b1[_0x511a1b(0xe6)]={'$gte':_0x556e9a[_0x511a1b(0x117)],'$lte':_0x556e9a['den_ngay']};_0x556e9a['ma_dvcs']&&(_0x511a1b(0xa0)!==_0x222e0a[_0x511a1b(0x11c)]?_0x24e20b['$or']=[{'user_nv':_0x3af691[_0x511a1b(0x172)]},{'user_ctv':_0x80ca6c['user_hoa_hong']},{'user_ctv2':_0xfe115c['user_hoa_hong']},{'user_kho':_0x2c29b3[_0x511a1b(0x172)]},{'user_gt':_0x5bfdc5[_0x511a1b(0x172)]},{'user_ql':_0x5c1bbf['user_hoa_hong']},{'details.user_nv':_0xc19374[_0x511a1b(0x172)]},{'details.user_ctv':_0x469f0f[_0x511a1b(0x172)]},{'details.user_ctv2':_0x4b103b['user_hoa_hong']},{'details.user_kho':_0x303dca['user_hoa_hong']},{'details.user_gt':_0x31a892['user_hoa_hong']},{'details.user_ql':_0x356cb9[_0x511a1b(0x172)]}]:_0xa223b1[_0x511a1b(0x119)]=_0x556e9a[_0x511a1b(0x119)]);_0x556e9a[_0x511a1b(0xe2)]&&(_0x222e0a['PalJV'](_0x222e0a['BYeaW'],_0x511a1b(0xf3))?_0xa223b1['$or']=[{'ma_kho':_0x556e9a[_0x511a1b(0xe2)]},{'details.ma_kho':_0x556e9a['ma_kho']}]:(_0x41dd87[_0x511a1b(0xd9)]=0x1,_0x762a3d['thang']=_0x222e0a['FwgDa'](_0x3af39e[_0x511a1b(0xe6)]['getMonth'](),0x1),_0x15f95c['nam']=_0x222e0a[_0x511a1b(0x105)](_0x2b365d,_0x16d5d2['ngay_ct'])[_0x511a1b(0xab)](),_0x4dc1e0[_0x511a1b(0x168)]=_0x33bbce(_0xa1d8b7['ngay_ct'])[_0x511a1b(0x82)]()));if(_0x556e9a[_0x511a1b(0x1cf)])_0xa223b1[_0x511a1b(0x1cf)]=_0x556e9a['ma_kh'];else{let _0x2266ea,_0x298d8f,_0x1376e7,_0x293983,_0x1974b7,_0x4fa5c3={};_0x556e9a['nh_kh']&&(_0x222e0a[_0x511a1b(0x16a)](_0x222e0a['fCfrw'],_0x511a1b(0x90))?(_0x2266ea=await global[_0x511a1b(0x85)](_0x222e0a['XpeaM'])[_0x511a1b(0x1af)](_0x556e9a['id_app'],_0x556e9a['nh_kh'],{'status':!![]}),_0x4fa5c3[_0x511a1b(0x16c)]={'$in':_0x2266ea}):(_0x4325cd[_0x511a1b(0x117)]=_0x30e44c['tu_ngay'],_0x590327[_0x511a1b(0x113)]=_0x5ac227[_0x511a1b(0x113)]));_0x556e9a['nh_kh2']&&(_0x298d8f=await global[_0x511a1b(0x85)](_0x222e0a[_0x511a1b(0x178)])[_0x511a1b(0x1af)](_0x556e9a['id_app'],_0x556e9a[_0x511a1b(0xf2)],{'status':!![]}),_0x4fa5c3[_0x511a1b(0xf2)]={'$in':_0x298d8f});if(_0x556e9a[_0x511a1b(0x161)]){if(_0x222e0a[_0x511a1b(0xb0)](_0x222e0a['Piour'],_0x222e0a[_0x511a1b(0xe5)]))_0x1376e7=await global['getModel'](_0x222e0a[_0x511a1b(0x178)])[_0x511a1b(0x1af)](_0x556e9a[_0x511a1b(0x1a7)],_0x556e9a[_0x511a1b(0x161)],{'status':!![]}),_0x4fa5c3[_0x511a1b(0x161)]={'$in':_0x1376e7};else{const _0x3d206d=_0x222e0a[_0x511a1b(0x185)][_0x511a1b(0xbb)]('|');let _0xbf727=0x0;while(!![]){switch(_0x3d206d[_0xbf727++]){case'0':_0x3d0ab5[_0x511a1b(0xbe)]=_0x403a38[_0x511a1b(0xc9)][_0x511a1b(0x186)](_0x222e0a['FkNYO'])-_0x2afa73['details_tl'][_0x511a1b(0x186)](_0x222e0a[_0x511a1b(0xc7)]);continue;case'1':_0x554c80['t_tien_hoa_hong']=_0x222e0a[_0x511a1b(0xc3)](_0x5f5c1c[_0x511a1b(0x10c)],_0xf207c1[_0x511a1b(0xc9)][_0x511a1b(0x186)](_0x222e0a['pdgSS']));continue;case'2':_0x48e26e[_0x511a1b(0xf7)]=_0x11f6ad[_0x511a1b(0xc9)][_0x511a1b(0x186)](_0x222e0a[_0x511a1b(0xf0)]);continue;case'3':_0x53fe95[_0x511a1b(0x18b)]=_0x4459a2['details_tl'][_0x511a1b(0x186)](_0x222e0a[_0x511a1b(0x14d)]);continue;case'4':_0x2b5ae1[_0x511a1b(0xeb)]=_0x2b71aa[_0x511a1b(0xeb)]-_0x26a81b[_0x511a1b(0xc9)][_0x511a1b(0x186)](_0x222e0a[_0x511a1b(0xcb)]);continue;case'5':_0x586560['t_tien_thue_tl']=_0x437e68['details_tl'][_0x511a1b(0x186)](_0x222e0a['wKGuj']);continue;case'6':_0x567a3b[_0x511a1b(0xc0)]=_0x222e0a[_0x511a1b(0xc3)](_0x1c0d27[_0x511a1b(0xc0)],_0x42370b[_0x511a1b(0xc9)][_0x511a1b(0x186)](_0x511a1b(0x19e)));continue;case'7':_0x346403['t_tien_hoa_hong_gt']=_0x222e0a['DKKyG'](_0xe3f8c2[_0x511a1b(0xb3)],_0x524ac3['details_tl'][_0x511a1b(0x186)](_0x511a1b(0xbd)));continue;}break;}}}_0x556e9a[_0x511a1b(0x103)]&&(_0x293983=await global[_0x511a1b(0x85)](_0x222e0a['XpeaM'])[_0x511a1b(0x1af)](_0x556e9a[_0x511a1b(0x1a7)],_0x556e9a[_0x511a1b(0x103)],{'status':!![]}),_0x4fa5c3['nh_kh4']={'$in':_0x293983});_0x556e9a['nh_kh5']&&(_0x1974b7=await global[_0x511a1b(0x85)](_0x511a1b(0x149))[_0x511a1b(0x1af)](_0x556e9a[_0x511a1b(0x1a7)],_0x556e9a[_0x511a1b(0x14b)],{'status':!![]}),_0x4fa5c3[_0x511a1b(0x14b)]={'$in':_0x1974b7});if(Object[_0x511a1b(0x1bb)](_0x4fa5c3)[_0x511a1b(0x1c1)]>0x0){if('jATwi'!==_0x511a1b(0x108))_0x17f4f3[_0x511a1b(0xef)]?_0x199eae[_0x511a1b(0x72)]=[{'$or':[{'user_nv':_0x3759de['user_hoa_hong']},{'user_ctv':_0x19bb55[_0x511a1b(0x172)]},{'user_ctv2':_0xd498dc['user_hoa_hong']},{'user_kho':_0xe54aa7['user_hoa_hong']},{'user_gt':_0x3c2d44[_0x511a1b(0x172)]},{'user_ql':_0x1bcd15[_0x511a1b(0x172)]},{'details.user_nv':_0x391abb[_0x511a1b(0x172)]},{'details.user_ctv':_0x41e3dc[_0x511a1b(0x172)]},{'details.user_ctv2':_0x48af78['user_hoa_hong']},{'details.user_kho':_0x307a25[_0x511a1b(0x172)]},{'details.user_gt':_0x194d4b['user_hoa_hong']},{'details.user_ql':_0x1a21f9['user_hoa_hong']}]}]:_0x297eea[_0x511a1b(0xef)]=[{'user_nv':_0x9c8109[_0x511a1b(0x172)]},{'user_ctv':_0x58af1d['user_hoa_hong']},{'user_ctv2':_0x1b9805[_0x511a1b(0x172)]},{'user_kho':_0x422869[_0x511a1b(0x172)]},{'user_gt':_0x506895['user_hoa_hong']},{'user_ql':_0x4fb802[_0x511a1b(0x172)]},{'details.user_nv':_0x2d6de2['user_hoa_hong']},{'details.user_ctv':_0x5ba8f7[_0x511a1b(0x172)]},{'details.user_ctv2':_0x5b845d[_0x511a1b(0x172)]},{'details.user_kho':_0x25b154[_0x511a1b(0x172)]},{'details.user_gt':_0x226e0c[_0x511a1b(0x172)]},{'details.user_ql':_0x2dafe3[_0x511a1b(0x172)]}];else{_0x4fa5c3[_0x511a1b(0x1a7)]=_0x556e9a[_0x511a1b(0x1a7)];let _0x204073=await global['getModel'](_0x222e0a['Tdddt'])[_0x511a1b(0xaf)](_0x4fa5c3,{'ma_kh':0x1})[_0x511a1b(0xed)]();_0xa223b1[_0x511a1b(0x1cf)]={'$in':_0x204073[_0x511a1b(0x18c)](_0x57be3c=>_0x57be3c[_0x511a1b(0x1cf)])};}}}if(_0x556e9a[_0x511a1b(0x190)]){if(_0x511a1b(0x1bd)!==_0x222e0a[_0x511a1b(0x73)]){_0x469cb7[_0x511a1b(0x86)]=_0x66bbfd[_0x511a1b(0x141)][_0x511a1b(0x186)](_0x222e0a['eEQzA']),_0x52bf86[_0x511a1b(0x135)]=_0x48fb2b[_0x511a1b(0x141)][_0x511a1b(0x186)](_0x222e0a[_0x511a1b(0x13a)]),_0x346d5b['t_tien_hang_ct']=_0x5a4d5d[_0x511a1b(0x141)][_0x511a1b(0x186)](_0x222e0a['FkNYO']),_0x406d31['t_thue']=_0x32f45e[_0x511a1b(0x141)][_0x511a1b(0x186)](_0x511a1b(0xa3)),_0x35a956[_0x511a1b(0x7d)]=_0x14e1da['details'][_0x511a1b(0x186)](_0x222e0a[_0x511a1b(0xc7)]),_0x2a6672[_0x511a1b(0x10f)]=_0x552d0c[_0x511a1b(0x141)][_0x511a1b(0x186)](_0x222e0a[_0x511a1b(0x118)]),_0x47d762[_0x511a1b(0x1c5)]=_0x4adc50[_0x511a1b(0x141)][_0x511a1b(0x186)](_0x222e0a['xAQPW']),_0x50f821[_0x511a1b(0x154)]=_0x8623eb[_0x511a1b(0x154)]||0x0,_0x2af848[_0x511a1b(0x196)]=_0x59f935[_0x511a1b(0x141)][_0x511a1b(0x186)](_0x511a1b(0x1a8)),_0x32e702[_0x511a1b(0x10c)]=_0x4f6888[_0x511a1b(0x141)]['csum'](_0x222e0a['pdgSS']),_0x5e6f2a[_0x511a1b(0xb3)]=_0x1f3382[_0x511a1b(0x141)]['csum']('tien_hoa_hong_gt'),_0x214332[_0x511a1b(0xc0)]=_0x341650[_0x511a1b(0x141)]['csum'](_0x222e0a[_0x511a1b(0x160)]),_0x37b138['t_tien_hoa_hong_ql']=_0x13ed98[_0x511a1b(0x141)]['csum'](_0x222e0a[_0x511a1b(0xcb)]),_0x1eca75[_0x511a1b(0x1c6)]=_0x2f613a['tien_freeship']||0x0,_0x43c256[_0x511a1b(0xa8)]=_0x363c6f[_0x511a1b(0xa8)]||0x0;if(_0x2241d7[_0x511a1b(0xc9)]){const _0x206c17=_0x222e0a[_0x511a1b(0xd8)][_0x511a1b(0xbb)]('|');let _0x207a92=0x0;while(!![]){switch(_0x206c17[_0x207a92++]){case'0':_0x897677[_0x511a1b(0x18b)]=_0x5e2ae9[_0x511a1b(0xc9)][_0x511a1b(0x186)](_0x222e0a[_0x511a1b(0x14d)]);continue;case'1':_0x4b7a5f['t_tien_hoa_hong']=_0x222e0a[_0x511a1b(0xc3)](_0x4e233e[_0x511a1b(0x10c)],_0x3349e5[_0x511a1b(0xc9)]['csum'](_0x222e0a['pdgSS']));continue;case'2':_0x5599c3[_0x511a1b(0x9b)]=_0x3d9a22[_0x511a1b(0xc9)][_0x511a1b(0x186)](_0x222e0a[_0x511a1b(0x1cc)]);continue;case'3':_0x2e72cb[_0x511a1b(0xb3)]=_0x222e0a[_0x511a1b(0xc3)](_0xa60335['t_tien_hoa_hong_gt'],_0x5713cf[_0x511a1b(0xc9)][_0x511a1b(0x186)](_0x222e0a[_0x511a1b(0x1bf)]));continue;case'4':_0x141246[_0x511a1b(0xbe)]=_0x222e0a[_0x511a1b(0xc3)](_0x38bef2[_0x511a1b(0xc9)][_0x511a1b(0x186)](_0x222e0a[_0x511a1b(0x1a6)]),_0x45ca57[_0x511a1b(0xc9)]['csum'](_0x511a1b(0x180)));continue;case'5':_0xd11d06[_0x511a1b(0xeb)]=_0x222e0a[_0x511a1b(0xc3)](_0x35da8a[_0x511a1b(0xeb)],_0x3fee45[_0x511a1b(0xc9)]['csum'](_0x222e0a[_0x511a1b(0xcb)]));continue;case'6':_0x559ce2['t_sl_nhap']=_0x2a02db[_0x511a1b(0xc9)][_0x511a1b(0x186)]('sl_nhap');continue;case'7':_0x477aac[_0x511a1b(0xc0)]=_0x447930[_0x511a1b(0xc0)]-_0x37ae41[_0x511a1b(0xc9)][_0x511a1b(0x186)]('tien_hoa_hong_ctv');continue;}break;}}else _0x4cfcb1[_0x511a1b(0xbe)]=0x0,_0x70d917[_0x511a1b(0xf7)]=0x0,_0x1b7bbe['t_tien_nhap']=0x0;_0x222e0a['AuQNl'](_0x59e5b2,null,_0x5777c4);}else _0xa223b1['ma_ct']=_0x556e9a[_0x511a1b(0x190)];}_0x556e9a[_0x511a1b(0x172)]&&(_0xa223b1[_0x511a1b(0xef)]?_0xa223b1['$and']=[{'$or':[{'user_nv':_0x556e9a[_0x511a1b(0x172)]},{'user_ctv':_0x556e9a[_0x511a1b(0x172)]},{'user_ctv2':_0x556e9a[_0x511a1b(0x172)]},{'user_kho':_0x556e9a[_0x511a1b(0x172)]},{'user_gt':_0x556e9a[_0x511a1b(0x172)]},{'user_ql':_0x556e9a[_0x511a1b(0x172)]},{'details.user_nv':_0x556e9a[_0x511a1b(0x172)]},{'details.user_ctv':_0x556e9a['user_hoa_hong']},{'details.user_ctv2':_0x556e9a[_0x511a1b(0x172)]},{'details.user_kho':_0x556e9a[_0x511a1b(0x172)]},{'details.user_gt':_0x556e9a[_0x511a1b(0x172)]},{'details.user_ql':_0x556e9a[_0x511a1b(0x172)]}]}]:_0x222e0a[_0x511a1b(0x81)](_0x222e0a[_0x511a1b(0x1c7)],_0x222e0a[_0x511a1b(0xd7)])?_0xa223b1[_0x511a1b(0xef)]=[{'user_nv':_0x556e9a[_0x511a1b(0x172)]},{'user_ctv':_0x556e9a[_0x511a1b(0x172)]},{'user_ctv2':_0x556e9a[_0x511a1b(0x172)]},{'user_kho':_0x556e9a[_0x511a1b(0x172)]},{'user_gt':_0x556e9a[_0x511a1b(0x172)]},{'user_ql':_0x556e9a[_0x511a1b(0x172)]},{'details.user_nv':_0x556e9a[_0x511a1b(0x172)]},{'details.user_ctv':_0x556e9a[_0x511a1b(0x172)]},{'details.user_ctv2':_0x556e9a[_0x511a1b(0x172)]},{'details.user_kho':_0x556e9a[_0x511a1b(0x172)]},{'details.user_gt':_0x556e9a[_0x511a1b(0x172)]},{'details.user_ql':_0x556e9a[_0x511a1b(0x172)]}]:_0x38809a[_0x511a1b(0x176)]?(_0x430b71=_0x22eee7['month'](_0x222e0a[_0x511a1b(0x122)](_0x2ff709['thang'],0x1)),_0xf0818b['tu_ngay']=_0x2550b4[_0x511a1b(0xb9)](_0x222e0a[_0x511a1b(0x120)])[_0x511a1b(0x155)](),_0x1ffe7f['den_ngay']=_0xad1db8[_0x511a1b(0x194)](_0x511a1b(0xec))['toDate']()):(_0x2c53d1['tu_ngay']=_0x4bc094['startOf'](_0x222e0a['OLbHi'])[_0x511a1b(0x155)](),_0x5ac88e['den_ngay']=_0x32e229['endOf'](_0x222e0a[_0x511a1b(0xcd)])[_0x511a1b(0x155)]())),_0x222e0a[_0x511a1b(0x1b5)](databanle,_0xa223b1,async function(_0x3bca04,_0x5e2099,_0x13d044){const _0x16f662=_0x511a1b,_0x17a2bf={'VXjjW':function(_0x525923,_0x4ac875){const _0x1d47d4=_0x2e21;return _0x222e0a[_0x1d47d4(0x1cd)](_0x525923,_0x4ac875);},'hzmoi':_0x222e0a[_0x16f662(0x1ae)],'RtZJu':function(_0x38b12a,_0x15da68){return _0x38b12a+_0x15da68;},'ShGgx':function(_0x415fa4,_0x403537){const _0x210323=_0x16f662;return _0x222e0a[_0x210323(0xa2)](_0x415fa4,_0x403537);},'XbMaU':function(_0x81265d,_0x34b72a){const _0x59a7c6=_0x16f662;return _0x222e0a[_0x59a7c6(0xa2)](_0x81265d,_0x34b72a);},'BdbqX':_0x222e0a[_0x16f662(0x19a)],'Olmel':'tien_hang','mwtks':_0x222e0a['FkNYO'],'ylxVf':_0x222e0a['wKGuj'],'kLcwt':'tien_ck','OxvVn':_0x222e0a['QfIOY'],'xaFtP':_0x222e0a[_0x16f662(0x104)],'UGaQx':_0x222e0a['WCVzJ'],'tJlpn':_0x222e0a['BDPEW'],'ceYvN':_0x16f662(0x17a),'XMJLc':function(_0x90fbb7,_0xe22481){const _0x29f96d=_0x16f662;return _0x222e0a[_0x29f96d(0x17e)](_0x90fbb7,_0xe22481);},'jmPbR':_0x222e0a[_0x16f662(0x160)],'fjzNE':function(_0x3fd1b9,_0x1142d8){const _0x23c083=_0x16f662;return _0x222e0a[_0x23c083(0x122)](_0x3fd1b9,_0x1142d8);},'IGNOq':_0x222e0a['pfCGj'],'IMxaj':function(_0x2754b3,_0x5c69ff){const _0xb2f84d=_0x16f662;return _0x222e0a[_0xb2f84d(0x122)](_0x2754b3,_0x5c69ff);},'BMzcG':_0x222e0a['FcqjW'],'EMPDn':_0x222e0a[_0x16f662(0x14e)],'dZKnK':function(_0x2fae52,_0x1b9fca,_0x34ed59){const _0x20f205=_0x16f662;return _0x222e0a[_0x20f205(0x19b)](_0x2fae52,_0x1b9fca,_0x34ed59);},'cAcaQ':function(_0x27f63d,_0x287bac){const _0x43a072=_0x16f662;return _0x222e0a[_0x43a072(0x105)](_0x27f63d,_0x287bac);},'ipqbY':_0x222e0a[_0x16f662(0xcd)],'rltwZ':_0x16f662(0x168),'Hdmsu':function(_0x159f39,_0x887089){const _0x1eb3fc=_0x16f662;return _0x222e0a[_0x1eb3fc(0x105)](_0x159f39,_0x887089);},'OMvqC':function(_0x462470,_0x4a300c){const _0x1eab2a=_0x16f662;return _0x222e0a[_0x1eab2a(0xe0)](_0x462470,_0x4a300c);},'CAQUY':_0x16f662(0x110),'LvEqJ':'thang','PeDoW':_0x222e0a['MOrJJ'],'FLyBt':function(_0x3410cc,_0x1fe077){return _0x3410cc(_0x1fe077);},'gckih':function(_0x51aa6f,_0x50fd48){return _0x222e0a['ZZPcr'](_0x51aa6f,_0x50fd48);},'WimjI':_0x16f662(0x1c0),'fFPhE':_0x16f662(0xe6),'NZshy':function(_0x1483eb,_0x54de2c){return _0x1483eb(_0x54de2c);},'plUfT':_0x222e0a[_0x16f662(0xb4)],'wlFnC':function(_0x5c1d13,_0x1ac97d){return _0x222e0a['ZDROB'](_0x5c1d13,_0x1ac97d);},'wGPIv':_0x222e0a[_0x16f662(0x13f)],'KMpHd':_0x222e0a[_0x16f662(0x13e)],'NnWxd':function(_0x46ece1,_0x544342){return _0x222e0a['nrFOK'](_0x46ece1,_0x544342);},'XSUbv':function(_0x263691,_0x19820f){return _0x263691<=_0x19820f;},'JZrCN':_0x222e0a[_0x16f662(0x9e)],'PNikL':_0x16f662(0x163),'NxOLm':_0x222e0a[_0x16f662(0x87)],'qRyGE':function(_0x178346,_0x17c205){const _0x4ae792=_0x16f662;return _0x222e0a[_0x4ae792(0xac)](_0x178346,_0x17c205);},'UJrET':_0x16f662(0x18a),'SBlcM':function(_0x87d9b2,_0x3b5d1c){return _0x222e0a['ntDhj'](_0x87d9b2,_0x3b5d1c);},'xIPjJ':function(_0x505e48,_0x3089fc){const _0x46dbaf=_0x16f662;return _0x222e0a[_0x46dbaf(0xa2)](_0x505e48,_0x3089fc);},'EedZq':_0x16f662(0x1ca),'FbcDT':function(_0x2b864c,_0x1a71eb){const _0x5d3bc3=_0x16f662;return _0x222e0a[_0x5d3bc3(0xac)](_0x2b864c,_0x1a71eb);},'qMDIz':function(_0x4a9b2a,_0x488d2){return _0x4a9b2a>_0x488d2;},'zMHrs':function(_0x86fd61,_0x511b9c){const _0x5661ae=_0x16f662;return _0x222e0a[_0x5661ae(0x173)](_0x86fd61,_0x511b9c);},'CjMUL':function(_0x5d9c4b,_0x197896){const _0x335718=_0x16f662;return _0x222e0a[_0x335718(0x122)](_0x5d9c4b,_0x197896);},'Kgsrt':function(_0xa07eaa,_0x3f4d31){const _0x5bd0c0=_0x16f662;return _0x222e0a[_0x5bd0c0(0x166)](_0xa07eaa,_0x3f4d31);},'kORkm':function(_0x1c21a8,_0x1a0048){const _0x28cb1c=_0x16f662;return _0x222e0a[_0x28cb1c(0x17e)](_0x1c21a8,_0x1a0048);},'HWMhI':'quarter','aZBWG':_0x222e0a[_0x16f662(0x1ce)],'QiHsV':_0x222e0a['ClIsg'],'ALLhg':function(_0x2b5a83,_0xb7f6be){return _0x2b5a83-_0xb7f6be;},'YJMNq':_0x16f662(0xec),'oPygW':function(_0x56a96b,_0x594918){return _0x56a96b!==_0x594918;},'vKogT':_0x222e0a[_0x16f662(0xee)],'ERuTj':_0x222e0a[_0x16f662(0xc6)],'xZvLt':function(_0xe065a4,_0x46266e){return _0xe065a4!==_0x46266e;},'vXyJn':_0x222e0a[_0x16f662(0x11d)],'NhuhE':_0x222e0a[_0x16f662(0xf6)],'iCydW':function(_0x5c42d7,_0x8d31c9){return _0x222e0a['riJKz'](_0x5c42d7,_0x8d31c9);},'FgJdH':_0x222e0a[_0x16f662(0x1b1)],'kVEVF':_0x222e0a[_0x16f662(0xe7)],'elhnW':function(_0x27ab4e,_0x5eb314){return _0x222e0a['DPNvb'](_0x27ab4e,_0x5eb314);},'WLmyb':function(_0x14000c,_0xd8e7ea){return _0x222e0a['ROIGk'](_0x14000c,_0xd8e7ea);},'zEnyU':_0x222e0a[_0x16f662(0x10a)],'MkDIM':function(_0x369ae4,_0x3e148f){const _0x523c77=_0x16f662;return _0x222e0a[_0x523c77(0xb0)](_0x369ae4,_0x3e148f);},'GAfzU':_0x16f662(0xae),'AeTLs':function(_0x280316,_0x2f4cd8){const _0x5357c0=_0x16f662;return _0x222e0a[_0x5357c0(0xdf)](_0x280316,_0x2f4cd8);},'AgvtA':'sl_dh','ZgyPt':_0x222e0a[_0x16f662(0xa1)],'LDuol':_0x222e0a[_0x16f662(0x84)],'NEKle':_0x222e0a['GOyHl'],'Pnbsm':_0x222e0a['yGnqB'],'baumm':_0x16f662(0x9a),'yrXYE':_0x222e0a[_0x16f662(0xb1)],'qCNIM':_0x222e0a[_0x16f662(0x92)],'NxZgS':_0x222e0a[_0x16f662(0x80)],'wtvTg':_0x16f662(0x154),'bEwhO':_0x222e0a['kxWlj'],'yHrnD':_0x222e0a['ccVVU'],'VlayG':_0x16f662(0x99),'gwgXv':_0x222e0a[_0x16f662(0x183)],'QoGBZ':_0x222e0a[_0x16f662(0xfb)],'BhTQt':_0x16f662(0x196),'YJSKs':_0x222e0a['MyDUw'],'CTrCp':_0x222e0a[_0x16f662(0x93)],'XLkit':_0x222e0a['yEjUn'],'Jcwoi':_0x222e0a[_0x16f662(0xcc)],'uyLfu':_0x222e0a[_0x16f662(0x8c)],'AMNpf':_0x222e0a['FAdIA'],'hdnZK':_0x16f662(0xc0),'eoMRl':_0x222e0a[_0x16f662(0x1c2)],'qNcwF':_0x222e0a[_0x16f662(0x19c)],'ssCZp':_0x222e0a[_0x16f662(0x13b)],'DUxbc':_0x222e0a[_0x16f662(0x1b9)],'zvIPq':_0x222e0a[_0x16f662(0x6f)],'plQUf':_0x222e0a[_0x16f662(0xf5)],'rpaCU':_0x222e0a['JEaxm'],'XIdvh':'t_kh','WWIrI':_0x16f662(0xdb),'pZLbI':_0x222e0a[_0x16f662(0x191)],'ctkvC':_0x16f662(0x1a4),'uwmyz':_0x222e0a[_0x16f662(0x1be)],'RhYnE':_0x16f662(0x7f),'iPleb':'t_phai_thu','eIUgY':_0x16f662(0x125),'NlEjF':_0x222e0a[_0x16f662(0x188)],'QTnZG':_0x222e0a[_0x16f662(0x121)],'fJWOo':_0x222e0a[_0x16f662(0x143)],'WhuUp':_0x16f662(0x153),'neraL':function(_0x23c414,_0xc95574,_0x3f4d2e){return _0x222e0a['NMopt'](_0x23c414,_0xc95574,_0x3f4d2e);}};if(_0x3bca04)return _0x2a2127(_0x3bca04);const _0xf8ac06=_0x13d044['map'](_0xdbf2d7=>{const _0x1f83e4=_0x16f662,_0x5b2f80={'DZpXR':_0x1f83e4(0xec)};if(_0x17a2bf[_0x1f83e4(0xa6)](_0x17a2bf['hzmoi'],_0x17a2bf[_0x1f83e4(0x112)]))return{'name':_0xdbf2d7['ma'],'value':_0xdbf2d7['ma'],'ma':_0xdbf2d7['ma'],'ten':_0xdbf2d7[_0x1f83e4(0x79)]};else _0x59345c=_0x32e895[_0x1f83e4(0xec)](_0x334e1f[_0x1f83e4(0x176)]-0x1),_0xb7155e[_0x1f83e4(0x117)]=_0x26c843[_0x1f83e4(0xb9)](_0x5b2f80[_0x1f83e4(0x132)])['toDate'](),_0x3a45ff['den_ngay']=_0x2a5c40[_0x1f83e4(0x194)](_0x5b2f80[_0x1f83e4(0x132)])['toDate']();});_0x5e2099[_0x16f662(0x193)](function(_0x194dbf){const _0x5a37d0=_0x16f662;_0x5a37d0(0x107)!==_0x5a37d0(0x78)?(_0x194dbf[_0x5a37d0(0xd9)]=0x1,_0x194dbf[_0x5a37d0(0x176)]=_0x17a2bf[_0x5a37d0(0x11f)](_0x194dbf['ngay_ct'][_0x5a37d0(0x15a)](),0x1),_0x194dbf[_0x5a37d0(0x182)]=_0x17a2bf[_0x5a37d0(0x1a3)](moment,_0x194dbf[_0x5a37d0(0xe6)])['year'](),_0x194dbf[_0x5a37d0(0x168)]=_0x17a2bf[_0x5a37d0(0x70)](moment,_0x194dbf[_0x5a37d0(0xe6)])[_0x5a37d0(0x82)]()):_0x532993['ma_dvcs']=_0x47a3fb['ma_dvcs'];}),async['map'](_0x5e2099,function(_0x2fac0,_0x14f707){const _0x59b842=_0x16f662;_0x2fac0[_0x59b842(0x86)]=_0x2fac0['details'][_0x59b842(0x186)](_0x17a2bf[_0x59b842(0xa9)]),_0x2fac0['t_tien_hang']=_0x2fac0['details'][_0x59b842(0x186)](_0x17a2bf['Olmel']),_0x2fac0[_0x59b842(0xd5)]=_0x2fac0[_0x59b842(0x141)][_0x59b842(0x186)](_0x17a2bf[_0x59b842(0x15e)]),_0x2fac0[_0x59b842(0x9a)]=_0x2fac0[_0x59b842(0x141)][_0x59b842(0x186)](_0x17a2bf[_0x59b842(0x1a2)]),_0x2fac0[_0x59b842(0x7d)]=_0x2fac0[_0x59b842(0x141)][_0x59b842(0x186)](_0x17a2bf[_0x59b842(0x192)]),_0x2fac0[_0x59b842(0x10f)]=_0x2fac0[_0x59b842(0x141)][_0x59b842(0x186)](_0x59b842(0xe1)),_0x2fac0['t_tien_cp']=_0x2fac0['details'][_0x59b842(0x186)](_0x59b842(0xd2)),_0x2fac0['tien_ck_hd']=_0x2fac0['tien_ck_hd']||0x0,_0x2fac0[_0x59b842(0x196)]=_0x2fac0[_0x59b842(0x141)][_0x59b842(0x186)](_0x17a2bf[_0x59b842(0x11a)]),_0x2fac0[_0x59b842(0x10c)]=_0x2fac0['details']['csum'](_0x17a2bf[_0x59b842(0xdc)]),_0x2fac0['t_tien_hoa_hong_gt']=_0x2fac0[_0x59b842(0x141)][_0x59b842(0x186)](_0x17a2bf['UGaQx']),_0x2fac0[_0x59b842(0xc0)]=_0x2fac0[_0x59b842(0x141)]['csum']('tien_hoa_hong_ctv'),_0x2fac0['t_tien_hoa_hong_ql']=_0x2fac0[_0x59b842(0x141)]['csum'](_0x17a2bf[_0x59b842(0x8a)]),_0x2fac0[_0x59b842(0x1c6)]=_0x2fac0[_0x59b842(0x1c6)]||0x0,_0x2fac0[_0x59b842(0xa8)]=_0x2fac0[_0x59b842(0xa8)]||0x0;if(_0x2fac0[_0x59b842(0xc9)]){const _0x51b124=_0x17a2bf[_0x59b842(0x197)]['split']('|');let _0x405620=0x0;while(!![]){switch(_0x51b124[_0x405620++]){case'0':_0x2fac0[_0x59b842(0xc0)]=_0x17a2bf[_0x59b842(0x17b)](_0x2fac0[_0x59b842(0xc0)],_0x2fac0['details_tl']['csum'](_0x17a2bf[_0x59b842(0x8d)]));continue;case'1':_0x2fac0['t_tien_thue_tl']=_0x2fac0['details_tl'][_0x59b842(0x186)](_0x17a2bf['ylxVf']);continue;case'2':_0x2fac0['t_tien_hoa_hong']=_0x17a2bf[_0x59b842(0x1b7)](_0x2fac0[_0x59b842(0x10c)],_0x2fac0[_0x59b842(0xc9)][_0x59b842(0x186)]('tien_hoa_hong'));continue;case'3':_0x2fac0[_0x59b842(0xeb)]=_0x17a2bf[_0x59b842(0x17b)](_0x2fac0[_0x59b842(0xeb)],_0x2fac0[_0x59b842(0xc9)][_0x59b842(0x186)]('tien_hoa_hong_ql'));continue;case'4':_0x2fac0[_0x59b842(0xf7)]=_0x2fac0[_0x59b842(0xc9)][_0x59b842(0x186)](_0x17a2bf[_0x59b842(0xd3)]);continue;case'5':_0x2fac0[_0x59b842(0xbe)]=_0x2fac0[_0x59b842(0xc9)]['csum'](_0x17a2bf[_0x59b842(0x15e)])-_0x2fac0['details_tl'][_0x59b842(0x186)](_0x17a2bf[_0x59b842(0x192)]);continue;case'6':_0x2fac0['t_tien_hoa_hong_gt']=_0x17a2bf['IMxaj'](_0x2fac0[_0x59b842(0xb3)],_0x2fac0[_0x59b842(0xc9)]['csum'](_0x17a2bf[_0x59b842(0x8f)]));continue;case'7':_0x2fac0[_0x59b842(0x18b)]=_0x2fac0[_0x59b842(0xc9)][_0x59b842(0x186)](_0x17a2bf[_0x59b842(0x115)]);continue;}break;}}else{if(_0x17a2bf[_0x59b842(0x146)]!==_0x59b842(0x12c)){if(_0x114982){const _0x3cbb2a=_0x156dd1[_0x59b842(0x18f)](_0x32d3ea,arguments);return _0x51988b=null,_0x3cbb2a;}}else _0x2fac0[_0x59b842(0xbe)]=0x0,_0x2fac0[_0x59b842(0xf7)]=0x0,_0x2fac0['t_tien_nhap']=0x0;}_0x17a2bf[_0x59b842(0x96)](_0x14f707,null,_0x2fac0);},async function(_0x1348aa,_0x308aef){const _0x29b1c6=_0x16f662,_0x28e922={'hfoYY':function(_0x47ec2c,_0x3d01cd){return _0x47ec2c<_0x3d01cd;},'JMxGe':function(_0x56ba3b,_0x4b3a22){const _0x211352=_0x2e21;return _0x17a2bf[_0x211352(0x15c)](_0x56ba3b,_0x4b3a22);},'gHrAz':_0x17a2bf[_0x29b1c6(0x170)],'ynCJw':function(_0x2a0db9,_0x3df2a7){const _0x382d6b=_0x29b1c6;return _0x17a2bf[_0x382d6b(0x97)](_0x2a0db9,_0x3df2a7);},'wlgeu':_0x17a2bf[_0x29b1c6(0x114)],'hnmLD':function(_0x3918f5,_0x2b1877){const _0x38da3d=_0x29b1c6;return _0x17a2bf[_0x38da3d(0x15b)](_0x3918f5,_0x2b1877);},'YsnMe':function(_0x395bc9,_0x2a4e3b){return _0x395bc9>_0x2a4e3b;},'IbwVs':function(_0x12d8a3,_0x577c24){return _0x17a2bf['WLmyb'](_0x12d8a3,_0x577c24);},'OROIn':_0x17a2bf[_0x29b1c6(0x12a)]};if(_0x17a2bf[_0x29b1c6(0x159)](_0x17a2bf['GAfzU'],_0x17a2bf[_0x29b1c6(0xce)])){if(_0x1348aa)return _0x17a2bf[_0x29b1c6(0x174)](_0x2a2127,_0x1348aa);const _0x30119f=[{'name':_0x17a2bf[_0x29b1c6(0xd1)],'value':_0x29b1c6(0xd9)},{'name':_0x17a2bf[_0x29b1c6(0x129)],'value':_0x17a2bf[_0x29b1c6(0x129)]},{'name':_0x17a2bf[_0x29b1c6(0xa5)],'value':_0x17a2bf[_0x29b1c6(0xa5)]},{'name':_0x29b1c6(0x135),'value':_0x17a2bf['NEKle']},{'name':_0x29b1c6(0xd5),'value':_0x17a2bf[_0x29b1c6(0x14a)]},{'name':'t_thue','value':_0x17a2bf['baumm']},{'name':_0x29b1c6(0x1c5),'value':_0x17a2bf['yrXYE']},{'name':'t_tien_ck','value':_0x17a2bf[_0x29b1c6(0xca)]},{'name':_0x17a2bf[_0x29b1c6(0x150)],'value':_0x17a2bf[_0x29b1c6(0x150)]},{'name':_0x17a2bf[_0x29b1c6(0xad)],'value':'tien_ck_hd'},{'name':_0x17a2bf['bEwhO'],'value':_0x29b1c6(0x1c6)},{'name':_0x29b1c6(0xa8),'value':_0x17a2bf[_0x29b1c6(0xbf)]},{'name':_0x17a2bf['VlayG'],'value':_0x17a2bf['VlayG']},{'name':_0x17a2bf['gwgXv'],'value':_0x29b1c6(0xe3)},{'name':_0x29b1c6(0xb6),'value':_0x17a2bf[_0x29b1c6(0x95)]},{'name':_0x29b1c6(0x1b6),'value':_0x29b1c6(0x1b6)},{'name':_0x17a2bf[_0x29b1c6(0x1a9)],'value':_0x17a2bf[_0x29b1c6(0x1a9)]},{'name':_0x29b1c6(0xbe),'value':_0x17a2bf['YJSKs']},{'name':'t_tien_thue_tl','value':_0x17a2bf[_0x29b1c6(0x1ad)]},{'name':_0x17a2bf[_0x29b1c6(0x1c9)],'value':_0x17a2bf[_0x29b1c6(0x1c9)]},{'name':_0x17a2bf[_0x29b1c6(0xf1)],'value':_0x17a2bf[_0x29b1c6(0xf1)]},{'name':'t_tien_hoa_hong','value':_0x17a2bf[_0x29b1c6(0x169)]},{'name':'t_tien_hoa_hong_gt','value':_0x17a2bf[_0x29b1c6(0x13c)]},{'name':_0x17a2bf[_0x29b1c6(0x8e)],'value':_0x17a2bf[_0x29b1c6(0x8e)]},{'name':_0x17a2bf[_0x29b1c6(0x162)],'value':_0x17a2bf[_0x29b1c6(0x162)]},..._0xf8ac06];let _0x4df78f=await _0x308aef[_0x29b1c6(0x1a0)]([...new Set([..._0x390bfa,_0x17a2bf[_0x29b1c6(0xd0)]])],_0x30119f);await _0x4df78f['filter'](_0x1408b9=>_0x1408b9[_0x29b1c6(0x1cf)])[_0x29b1c6(0xe9)](_0x556e9a[_0x29b1c6(0x1a7)],_0x17a2bf[_0x29b1c6(0x7a)],{'where':_0x17a2bf[_0x29b1c6(0xd0)],'fields':[_0x17a2bf['DUxbc'],{'cust_date_created':_0x29b1c6(0x164)}]}),_0x4df78f['forEach'](_0x2565a3=>{const _0x55fc2b=_0x29b1c6;_0x2565a3[_0x55fc2b(0x11e)]=0x1;if(_0x2565a3[_0x55fc2b(0xc4)]){let _0x3a20ce,_0x16b2b2;switch(_0x559991){case _0x55fc2b(0x182):{const _0x233d07=_0x17a2bf[_0x55fc2b(0x70)](Number,_0x2565a3[_0x55fc2b(0x182)]),_0x3b7f57=_0x17a2bf[_0x55fc2b(0x195)](moment,new Date(_0x233d07,0x1,0x1));_0x3a20ce=_0x3b7f57['startOf'](_0x17a2bf[_0x55fc2b(0x71)])[_0x55fc2b(0x155)]()[_0x55fc2b(0xf4)](),_0x16b2b2=_0x3b7f57['endOf'](_0x17a2bf['ipqbY'])[_0x55fc2b(0x155)]()[_0x55fc2b(0xf4)]();break;}case _0x17a2bf['rltwZ']:{const _0x4f1604=_0x17a2bf[_0x55fc2b(0x131)](Number,_0x2565a3[_0x55fc2b(0x182)]);let _0x41bd24=moment(new Date(_0x4f1604,0x1,0x1));_0x41bd24=_0x41bd24[_0x55fc2b(0x110)](_0x17a2bf[_0x55fc2b(0x1b2)](Number,_0x2565a3[_0x55fc2b(0x168)])),_0x3a20ce=_0x41bd24['startOf'](_0x17a2bf[_0x55fc2b(0x12e)])['toDate']()['getTime'](),_0x16b2b2=_0x41bd24[_0x55fc2b(0x194)](_0x17a2bf[_0x55fc2b(0x12e)])[_0x55fc2b(0x155)]()['getTime']();break;}case _0x17a2bf[_0x55fc2b(0x16b)]:{if(_0x17a2bf[_0x55fc2b(0x9c)]==='heffq'){const _0x2589b9=_0x17a2bf[_0x55fc2b(0x1ba)](Number,_0x2565a3[_0x55fc2b(0x182)]);let _0xcedac6=_0x17a2bf[_0x55fc2b(0x74)](moment,new Date(_0x2589b9,0x0,0x1));_0xcedac6=_0xcedac6['month'](_0x17a2bf['fjzNE'](_0x17a2bf['cAcaQ'](Number,_0x2565a3[_0x55fc2b(0x176)]),0x1)),_0x3a20ce=_0xcedac6[_0x55fc2b(0xb9)](_0x17a2bf[_0x55fc2b(0xcf)])[_0x55fc2b(0x155)]()['getTime'](),_0x16b2b2=_0xcedac6[_0x55fc2b(0x194)](_0x17a2bf['WimjI'])[_0x55fc2b(0x155)]()[_0x55fc2b(0xf4)]();break;}else _0x311641[_0x55fc2b(0x190)]=_0x55eb3a['ma_ct'];}case _0x17a2bf[_0x55fc2b(0x170)]:{const _0x4bad86=_0x17a2bf['NZshy'](moment,_0x2565a3['ngay_ct']);_0x3a20ce=_0x4bad86[_0x55fc2b(0xb9)](_0x55fc2b(0x15f))[_0x55fc2b(0x155)]()['getTime'](),_0x16b2b2=_0x4bad86[_0x55fc2b(0x194)](_0x17a2bf[_0x55fc2b(0x17d)])[_0x55fc2b(0x155)]()[_0x55fc2b(0xf4)]();break;}default:{if(_0x17a2bf[_0x55fc2b(0x126)](_0x17a2bf[_0x55fc2b(0x16e)],_0x17a2bf[_0x55fc2b(0xa4)]))_0x3a20ce=new Date(_0x556e9a['tu_ngay'])['getTime'](),_0x16b2b2=new Date(_0x556e9a[_0x55fc2b(0x113)])[_0x55fc2b(0xf4)]();else{for(let _0x485278=0x0;_0x28e922[_0x55fc2b(0x198)](_0x485278,_0x48a9d9[_0x55fc2b(0x1c1)]);_0x485278++){let _0xe8dcff=_0x5c14de[_0x485278],_0x2d0607=_0x2ad886[_0xe8dcff],_0x3bfeea=_0x1e2030[_0xe8dcff];_0x28e922[_0x55fc2b(0x19f)](_0xe8dcff,_0x28e922[_0x55fc2b(0x1b3)])&&(_0x2d0607=_0x28e922[_0x55fc2b(0x101)](_0x1a7e5c,_0x2d0607)[_0x55fc2b(0xbc)](_0x28e922['wlgeu']),_0x3bfeea=_0x28e922[_0x55fc2b(0x101)](_0x563d59,_0x3bfeea)[_0x55fc2b(0xbc)](_0x28e922[_0x55fc2b(0x75)]));if(_0x28e922['hnmLD'](_0x2d0607,_0x3bfeea))return-0x1;if(_0x28e922['YsnMe'](_0x2d0607,_0x3bfeea))return 0x1;}return 0x0;}}}const _0x3df21a=new Date(_0x2565a3[_0x55fc2b(0xfe)])[_0x55fc2b(0xf4)]();_0x2565a3['mua_lan_dau']=_0x2565a3[_0x55fc2b(0xfe)]&&_0x17a2bf[_0x55fc2b(0x156)](_0x3df21a,_0x3a20ce)&&_0x17a2bf[_0x55fc2b(0x14f)](_0x3df21a,_0x16b2b2)?0x1:0x0,_0x2565a3[_0x55fc2b(0x7f)]=_0x2565a3[_0x55fc2b(0xfe)]&&_0x3df21a<_0x3a20ce?0x1:0x0;const _0x7a9d4e=new Date(_0x2565a3[_0x55fc2b(0xc4)])[_0x55fc2b(0xf4)]();_0x2565a3[_0x55fc2b(0x7c)]=_0x2565a3[_0x55fc2b(0xfe)]&&_0x17a2bf['NnWxd'](_0x7a9d4e,_0x3a20ce)&&_0x17a2bf[_0x55fc2b(0x14f)](_0x7a9d4e,_0x16b2b2)?0x1:0x0;}else{if(_0x17a2bf[_0x55fc2b(0x126)](_0x17a2bf[_0x55fc2b(0x8b)],_0x55fc2b(0x16f)))_0x2565a3[_0x55fc2b(0xdb)]=0x0,_0x2565a3[_0x55fc2b(0x7c)]=0x0,_0x2565a3[_0x55fc2b(0x7f)]=0x0;else{const _0x106f88=_0x4f7016[_0x55fc2b(0x18f)](_0x4de35e,arguments);return _0xefbec=null,_0x106f88;}}});switch(_0x556e9a[_0x29b1c6(0x19d)]){case _0x29b1c6(0x127):{_0x4df78f=_0x4df78f['filter'](_0x578895=>_0x578895[_0x29b1c6(0xdb)]),_0x308aef=_0x308aef['filter'](_0x4febd8=>_0x4df78f[_0x29b1c6(0xaf)](_0x50d920=>_0x50d920[_0x29b1c6(0x1cf)]===_0x4febd8['ma_kh']));break;}case _0x17a2bf['zvIPq']:{_0x4df78f=_0x4df78f['filter'](_0x207669=>_0x207669[_0x29b1c6(0x7c)]),_0x308aef=_0x308aef[_0x29b1c6(0xb8)](_0x5d9d83=>_0x4df78f[_0x29b1c6(0xaf)](_0x2c07d7=>_0x2c07d7['ma_kh']===_0x5d9d83[_0x29b1c6(0x1cf)]));break;}case _0x17a2bf[_0x29b1c6(0x76)]:{_0x4df78f=_0x4df78f[_0x29b1c6(0xb8)](_0x2c8ae6=>_0x2c8ae6[_0x29b1c6(0x7f)]),_0x308aef=_0x308aef['filter'](_0x733a17=>_0x4df78f[_0x29b1c6(0xaf)](_0x3d7dbf=>_0x3d7dbf['ma_kh']===_0x733a17[_0x29b1c6(0x1cf)]));break;}}let _0x5efee0=await _0x4df78f['asyncGroupBy'](_0x390bfa,[..._0x30119f,_0x17a2bf[_0x29b1c6(0x148)],_0x29b1c6(0x7f),_0x17a2bf[_0x29b1c6(0xba)],_0x17a2bf[_0x29b1c6(0xd1)],_0x17a2bf[_0x29b1c6(0x152)]]);_0x5efee0=_0x5efee0['sort']((_0x31ec5f,_0x525a53)=>{const _0x3bce6d=_0x29b1c6;if(_0x17a2bf[_0x3bce6d(0x89)]!==_0x17a2bf['NxOLm']){for(let _0x2a06c7=0x0;_0x17a2bf[_0x3bce6d(0xb5)](_0x2a06c7,_0x390bfa[_0x3bce6d(0x1c1)]);_0x2a06c7++){if(_0x17a2bf[_0x3bce6d(0xa6)](_0x17a2bf[_0x3bce6d(0x157)],_0x3bce6d(0x9d)))_0x74bb48=[_0x3f093f];else{let _0x964faf=_0x390bfa[_0x2a06c7],_0x5835bc=_0x31ec5f[_0x964faf],_0x3ffdb6=_0x525a53[_0x964faf];_0x17a2bf[_0x3bce6d(0x15c)](_0x964faf,_0x17a2bf[_0x3bce6d(0x170)])&&(_0x5835bc=_0x17a2bf[_0x3bce6d(0x134)](moment,_0x5835bc)[_0x3bce6d(0xbc)](_0x17a2bf[_0x3bce6d(0x114)]),_0x3ffdb6=_0x17a2bf[_0x3bce6d(0x1ab)](moment,_0x3ffdb6)[_0x3bce6d(0xbc)](_0x17a2bf['EedZq']));if(_0x17a2bf[_0x3bce6d(0x15b)](_0x5835bc,_0x3ffdb6))return-0x1;if(_0x17a2bf['qMDIz'](_0x5835bc,_0x3ffdb6))return 0x1;}}return 0x0;}else _0x1d2960['tong_cong']=_0x95b925[_0x103c4c['name']]=_0x18046c[_0x3bce6d(0x186)](_0xca59ee['name']);}),_0x5efee0[_0x29b1c6(0x193)](function(_0x13e0a0,_0x244eb7){const _0xf4eb83=_0x29b1c6;_0x13e0a0['stt']=_0x17a2bf[_0xf4eb83(0x11f)](_0x244eb7,0x1),_0x13e0a0[_0xf4eb83(0x140)]=![],_0x13e0a0[_0xf4eb83(0x1ac)]=_0x17a2bf[_0xf4eb83(0xda)](_0x17a2bf[_0xf4eb83(0x15d)](_0x17a2bf[_0xf4eb83(0x11f)](_0x13e0a0[_0xf4eb83(0xd5)]-(_0x13e0a0[_0xf4eb83(0x7d)]||0x0),_0x13e0a0[_0xf4eb83(0x9a)]||0x0)+(_0x13e0a0[_0xf4eb83(0xa8)]||0x0)-(_0x13e0a0[_0xf4eb83(0x1c6)]||0x0),_0x13e0a0['tien_ck_hd']||0x0),_0x13e0a0[_0xf4eb83(0x99)]||0x0),_0x13e0a0['t_doanh_thu']=_0x17a2bf[_0xf4eb83(0x13d)](_0x17a2bf[_0xf4eb83(0x10b)](_0x17a2bf[_0xf4eb83(0x15d)](_0x13e0a0['t_tien_hang_ct'],_0x13e0a0[_0xf4eb83(0x7d)]||0x0)+(_0x13e0a0[_0xf4eb83(0xa8)]||0x0)-(_0x13e0a0[_0xf4eb83(0x1c6)]||0x0),_0x13e0a0[_0xf4eb83(0x154)]||0x0),_0x13e0a0[_0xf4eb83(0x99)]||0x0),_0x13e0a0[_0xf4eb83(0x153)]=_0x17a2bf[_0xf4eb83(0x144)](_0x17a2bf[_0xf4eb83(0x10b)](_0x13e0a0['t_doanh_thu'],_0x13e0a0[_0xf4eb83(0x196)])-_0x17a2bf[_0xf4eb83(0x1b7)](_0x13e0a0['t_tien_tl'],_0x13e0a0[_0xf4eb83(0x18b)]),_0x13e0a0[_0xf4eb83(0x1c5)]||0x0),_0x13e0a0['t_doanh_thu_thuan']=_0x13e0a0[_0xf4eb83(0x125)]-_0x13e0a0['t_tien_tl'],_0x13e0a0['t_tien_thu']=_0xf8ac06['map'](_0x6876e0=>_0x13e0a0[_0x6876e0[_0xf4eb83(0x124)]]||0x0)[_0xf4eb83(0x18e)]((_0x2c7cd5,_0x47925f)=>_0x2c7cd5+_0x47925f,0x0),_0x13e0a0[_0xf4eb83(0x137)]=_0x13e0a0['tien_paymentByPoints']||0x0;if(_0x13e0a0[_0xf4eb83(0x182)]){let _0x158066=moment(new Date(_0x13e0a0[_0xf4eb83(0x182)],0x0,0x1));if(_0x13e0a0['quy'])_0x158066=_0x158066[_0xf4eb83(0x82)](_0x13e0a0[_0xf4eb83(0x168)]),_0x13e0a0[_0xf4eb83(0x117)]=_0x158066[_0xf4eb83(0xb9)](_0x17a2bf[_0xf4eb83(0x1cb)])[_0xf4eb83(0x155)](),_0x13e0a0['den_ngay']=_0x158066[_0xf4eb83(0x194)](_0x17a2bf[_0xf4eb83(0x1cb)])[_0xf4eb83(0x155)]();else{if(_0x13e0a0['thang'])_0x17a2bf['wlFnC'](_0x17a2bf[_0xf4eb83(0xd6)],_0x17a2bf['QiHsV'])?(_0x158066=_0x158066['month'](_0x17a2bf['ALLhg'](_0x13e0a0[_0xf4eb83(0x176)],0x1)),_0x13e0a0[_0xf4eb83(0x117)]=_0x158066[_0xf4eb83(0xb9)](_0x17a2bf[_0xf4eb83(0x1c4)])[_0xf4eb83(0x155)](),_0x13e0a0[_0xf4eb83(0x113)]=_0x158066[_0xf4eb83(0x194)](_0x17a2bf[_0xf4eb83(0x1c4)])['toDate']()):(_0x5293d0[_0xf4eb83(0xbe)]=0x0,_0x47cab5['t_sl_nhap']=0x0,_0x597166['t_tien_nhap']=0x0);else{if(_0x17a2bf[_0xf4eb83(0x177)](_0x17a2bf[_0xf4eb83(0x142)],_0x17a2bf[_0xf4eb83(0x179)]))_0x13e0a0[_0xf4eb83(0x117)]=_0x158066[_0xf4eb83(0xb9)](_0xf4eb83(0xab))[_0xf4eb83(0x155)](),_0x13e0a0[_0xf4eb83(0x113)]=_0x158066[_0xf4eb83(0x194)](_0x17a2bf['ipqbY'])[_0xf4eb83(0x155)]();else return _0x28e922[_0xf4eb83(0x10d)](_0x5de65c,_0x28e922[_0xf4eb83(0x165)]);}}}else{if(_0x17a2bf['xZvLt'](_0x17a2bf['vXyJn'],_0x17a2bf[_0xf4eb83(0x88)]))_0x13e0a0['tu_ngay']=_0x556e9a[_0xf4eb83(0x117)],_0x13e0a0[_0xf4eb83(0x113)]=_0x556e9a[_0xf4eb83(0x113)];else{const _0x565298=_0x35b435?function(){const _0x1ab800=_0xf4eb83;if(_0x3be30f){const _0x256449=_0x20f3b2[_0x1ab800(0x18f)](_0x3b1d7c,arguments);return _0x3c1ee6=null,_0x256449;}}:function(){};return _0x461bfa=![],_0x565298;}}}),await _0x5efee0[_0x29b1c6(0xb8)](_0x3894dc=>_0x3894dc[_0x29b1c6(0x1cf)])[_0x29b1c6(0xe9)](_0x556e9a[_0x29b1c6(0x1a7)],_0x29b1c6(0x83),{'where':'ma_kh','fields':_0x17a2bf['pZLbI']}),await _0x5efee0[_0x29b1c6(0xb8)](_0x55a0c3=>_0x55a0c3['ma_kho'])[_0x29b1c6(0xe9)](_0x556e9a[_0x29b1c6(0x1a7)],'dmkho',{'where':_0x29b1c6(0xe2),'fields':_0x17a2bf[_0x29b1c6(0x187)]});const _0x5f110c={[_0x390bfa[0x0]]:_0x17a2bf['uwmyz'],'mua_lan_dau':_0x5efee0[_0x29b1c6(0x186)](_0x17a2bf[_0x29b1c6(0x152)]),'kh_moi':_0x5efee0[_0x29b1c6(0x186)](_0x17a2bf[_0x29b1c6(0x148)]),'kh_cu':_0x5efee0[_0x29b1c6(0x186)](_0x17a2bf['RhYnE']),'t_kh':_0x5efee0['csum'](_0x17a2bf[_0x29b1c6(0xba)]),'sl_dh':_0x5efee0[_0x29b1c6(0x186)](_0x17a2bf[_0x29b1c6(0xd1)]),'t_sl_xuat':_0x5efee0[_0x29b1c6(0x186)](_0x17a2bf['ZgyPt']),'t_sl_nhap':_0x5efee0[_0x29b1c6(0x186)](_0x29b1c6(0xf7)),'t_tien_hang':_0x5efee0['csum'](_0x17a2bf[_0x29b1c6(0xa7)]),'t_tien_hang_ct':_0x5efee0[_0x29b1c6(0x186)](_0x29b1c6(0xd5)),'t_thue':_0x5efee0[_0x29b1c6(0x186)](_0x29b1c6(0x9a)),'t_tien_cp':_0x5efee0[_0x29b1c6(0x186)]('t_tien_cp'),'t_tien_ck':_0x5efee0['csum'](_0x17a2bf[_0x29b1c6(0xca)]),'t_tien':_0x5efee0[_0x29b1c6(0x186)](_0x17a2bf['NxZgS']),'tien_ck_hd':_0x5efee0['csum'](_0x17a2bf[_0x29b1c6(0xad)]),'tien_phi_vc':_0x5efee0[_0x29b1c6(0x186)](_0x17a2bf[_0x29b1c6(0xbf)]),'tien_freeship':_0x5efee0[_0x29b1c6(0x186)](_0x17a2bf[_0x29b1c6(0xf9)]),'t_tien_tl':_0x5efee0[_0x29b1c6(0x186)](_0x17a2bf[_0x29b1c6(0x151)]),'t_tien_thue_tl':_0x5efee0['csum'](_0x17a2bf[_0x29b1c6(0x1ad)]),'t_tien_xuat':_0x5efee0['csum'](_0x17a2bf[_0x29b1c6(0x1a9)]),'t_tien_nhap':_0x5efee0[_0x29b1c6(0x186)](_0x17a2bf['XLkit']),'t_phai_thu':_0x5efee0[_0x29b1c6(0x186)](_0x17a2bf[_0x29b1c6(0x123)]),'t_doanh_thu':_0x5efee0[_0x29b1c6(0x186)](_0x17a2bf[_0x29b1c6(0x14c)]),'t_doanh_thu_thuan':_0x5efee0[_0x29b1c6(0x186)](_0x17a2bf['NlEjF']),'tien_evoucher':_0x5efee0['csum'](_0x17a2bf[_0x29b1c6(0x128)]),'tien_thu':_0x5efee0[_0x29b1c6(0x186)](_0x17a2bf[_0x29b1c6(0x77)]),'tien_thu2':_0x5efee0[_0x29b1c6(0x186)](_0x17a2bf[_0x29b1c6(0x95)]),'t_tien_thu':_0x5efee0[_0x29b1c6(0x186)](_0x17a2bf[_0x29b1c6(0x91)]),'phai_tra':_0x5efee0[_0x29b1c6(0x186)](_0x17a2bf['Jcwoi']),'t_tien_paymentByPoints':_0x5efee0[_0x29b1c6(0x186)](_0x17a2bf[_0x29b1c6(0x1b0)]),'t_lai':_0x5efee0['csum'](_0x17a2bf['WhuUp']),'t_tien_hoa_hong':_0x5efee0[_0x29b1c6(0x186)](_0x17a2bf[_0x29b1c6(0x169)]),'t_tien_hoa_hong_gt':_0x5efee0[_0x29b1c6(0x186)](_0x17a2bf[_0x29b1c6(0x13c)]),'t_tien_hoa_hong_ctv':_0x5efee0['csum'](_0x29b1c6(0xc0)),'t_tien_hoa_hong_ql':_0x5efee0[_0x29b1c6(0x186)](_0x17a2bf['eoMRl']),'bold':!![]};_0xf8ac06['forEach'](_0x2fa4f4=>{const _0x1fb35f=_0x29b1c6;_0x17a2bf[_0x1fb35f(0xfa)](_0x17a2bf[_0x1fb35f(0x94)],_0x17a2bf[_0x1fb35f(0xf8)])?(_0x4b67d2[_0x1fb35f(0xdb)]=0x0,_0x157831[_0x1fb35f(0x7c)]=0x0,_0x82ada7[_0x1fb35f(0x7f)]=0x0):_0x2fa4f4[_0x1fb35f(0x12b)]=_0x5f110c[_0x2fa4f4['name']]=_0x5efee0[_0x1fb35f(0x186)](_0x2fa4f4[_0x1fb35f(0x124)]);}),_0x5efee0['push'](_0x5f110c),_0x5efee0[_0x29b1c6(0x193)](_0x4c45d2=>{const _0x2fae6d=_0x29b1c6;_0x4c45d2['t_tien_phai_tl']=_0x4c45d2[_0x2fae6d(0xbe)]+_0x4c45d2[_0x2fae6d(0x9b)];}),_0x17a2bf['neraL'](_0x2a2127,null,{'data':_0x5efee0,'thanh_toan':_0xf8ac06[_0x29b1c6(0xb8)](_0x324f04=>_0x324f04[_0x29b1c6(0x12b)])});}else _0x1f0f50[_0x29b1c6(0x1cf)]=_0x1bf4de['ma_kh'];});});};
@@ -1,10 +1 @@
1
- const Vsocai=require("./vsocai"),dstkcn=require("./dstkcn"),async=require("async"),underscore=require("underscore"),moment=require("moment");
2
- module.exports=async function($condition$$,$fn$$,$options$$={model:"socaitc"}){if($condition$$&&$condition$$.ngay&&$condition$$.id_app){if(!$condition$$.ma_kh&&($condition$$.nh_kh||$condition$$.phu_trach)){let $_q$$={};$condition$$.nh_kh&&($_q$$.nh_kh=$condition$$.nh_kh);$condition$$.phu_trach&&($_q$$.phu_trach=$condition$$.phu_trach);$condition$$.ma_kh=await global.getModel("customer").getList($condition$$.id_app,$_q$$,"ma_kh")}var $tk$$=$condition$$.tk;$tk$$||="";if(underscore.isArray($tk$$)){let $tks$$;
3
- $tk$$.forEach(function($t$$){$tks$$=$tks$$?$tks$$+"|^"+$t$$:"^"+$t$$});$tks$$||="^";$tk$$={$regex:$tks$$,$options:"i"}}else $tk$$={$regex:"^"+$tk$$,$options:"i"};var $id_app$$=$condition$$.id_app,$ngay$$=new Date($condition$$.ngay);$ngay$$=moment($ngay$$).startOf("date").toDate();if(!await global.getModel("app").findOne({_id:$id_app$$},{ngay_ks:1}).lean())return $fn$$("C\u00f4ng ty kh\u00f4ng t\u1ed3n t\u1ea1i");var $ngay_ks$$=(await global.getModel("cdkhtheongay").findOne({id_app:$id_app$$,den_ngay:{$lte:moment($ngay$$).startOf("date").toDate()}},
4
- {den_ngay:1}).sort({den_ngay:-1}).lean()||{}).den_ngay;$ngay_ks$$&&=moment($ngay_ks$$).endOf("date").toDate();var $ngay_dn$$=moment($ngay$$).startOf("year").toDate();if(!$ngay_ks$$||$ngay_ks$$<$ngay_dn$$){var $Cdkh$$=global.getModel("cdkh");var $nam$$=$ngay$$.getFullYear()}else $Cdkh$$=global.getModel("cdkhtheongay"),$ngay_dn$$=moment($ngay_ks$$).startOf("date").add(1,"days").toDate();async.parallel({dn:function($callback$$){let $c_dk$$={id_app:$id_app$$,tk:$tk$$};$nam$$?$c_dk$$.nam=$nam$$:(console.log("lay cdcn theo ngay khoa so",
5
- $ngay_ks$$),$c_dk$$.den_ngay=$ngay_ks$$);$condition$$.ma_kh&&(underscore.isArray($condition$$.ma_kh)?$c_dk$$.ma_kh={$in:$condition$$.ma_kh}:$c_dk$$.ma_kh=$condition$$.ma_kh);$condition$$.ma_dvcs&&($c_dk$$.ma_dvcs=$condition$$.ma_dvcs);$condition$$.ma_kho&&($c_dk$$.ma_kho=$condition$$.ma_kho);$condition$$.ma_bp&&($c_dk$$.ma_bp=$condition$$.ma_bp);$condition$$.ma_phi&&($c_dk$$.ma_phi=$condition$$.ma_phi);$condition$$.ma_nv&&($c_dk$$.ma_nv=$condition$$.ma_nv);$condition$$.ma_hd&&($c_dk$$.ma_hd=$condition$$.ma_hd);
6
- $condition$$.ma_dt&&($c_dk$$.ma_dt=$condition$$.ma_dt);$Cdkh$$.find($c_dk$$).lean().then(function($results$$){$callback$$(null,$results$$)}).catch($error$$=>{$callback$$({message:$error$$.message})})},ps:function($callback$$){async.waterfall([function($callback1$$){dstkcn($id_app$$,$tk$$,function($error$$,$accs$$){$error$$?$callback1$$($error$$):$callback1$$(null,$accs$$)})},function($accs$$,$callback1$$){$accs$$={id_app:$id_app$$,ngay_ct:{$gte:$ngay_dn$$,$lt:$ngay$$},tk:{$in:$accs$$}};$condition$$.ma_kh&&
7
- (underscore.isArray($condition$$.ma_kh)?$accs$$.ma_kh={$in:$condition$$.ma_kh}:$accs$$.ma_kh=$condition$$.ma_kh);$condition$$.ma_dvcs&&($accs$$.ma_dvcs=$condition$$.ma_dvcs);$condition$$.ma_kho&&($accs$$.ma_kho=$condition$$.ma_kho);$condition$$.ma_bp&&($accs$$.ma_bp=$condition$$.ma_bp);$condition$$.ma_phi&&($accs$$.ma_phi=$condition$$.ma_phi);$condition$$.ma_nv&&($accs$$.ma_nv=$condition$$.ma_nv);$condition$$.ma_hd&&($accs$$.ma_hd=$condition$$.ma_hd);$condition$$.ma_dt&&($accs$$.ma_dt=$condition$$.ma_dt);
8
- $condition$$.ex_id_ct&&($accs$$.id_ct={$ne:$condition$$.ex_id_ct});Vsocai.find($accs$$,function($error$$,$pss$$){$error$$?$callback1$$($error$$):$callback1$$(null,$pss$$)},$options$$)}],function($error$$,$result$$){$error$$?$callback$$($error$$):$callback$$(null,$result$$)})}},function($data_error$$,$groupBy_results$$){if($data_error$$)return $fn$$($data_error$$);$data_error$$=$groupBy_results$$.dn.concat($groupBy_results$$.ps);$groupBy_results$$=$condition$$.groupBy||"tk ma_kh ma_kho ma_bp ma_phi ma_dt ma_hd ma_nv".split(" ");
9
- if(!underscore.isArray($groupBy_results$$))if($groupBy_results$$.indexOf("[")>=0)try{$groupBy_results$$=JSON.parse($groupBy_results$$)}catch($e$$){console.error("err parse json groupby",$groupBy_results$$),$groupBy_results$$=[$groupBy_results$$]}else $groupBy_results$$=$groupBy_results$$.indexOf(",")>=0?$groupBy_results$$.split(","):[$groupBy_results$$];$data_error$$.groupBy($groupBy_results$$,"du_no00 du_co00 du_no_nt00 du_co_nt00 ps_no ps_co ps_no_nt ps_co_nt".split(" "),($error$$,$rs$$)=>{$error$$?
10
- $fn$$($error$$):($rs$$.forEach($r$$=>{$r$$.du_no00=$r$$.du_no00+$r$$.ps_no-$r$$.du_co00-$r$$.ps_co;$r$$.du_no_nt00=$r$$.du_no_nt00+$r$$.ps_no_nt-$r$$.du_co_nt00-$r$$.ps_co_nt;$r$$.du_co00=0-$r$$.du_no00;$r$$.du_co_nt00=0-$r$$.du_no_nt00;$r$$.du_no00<0&&($r$$.du_no00=0);$r$$.du_no_nt00<0&&($r$$.du_no_nt00=0);$r$$.du_co00<0&&($r$$.du_co00=0);$r$$.du_co_nt00<0&&($r$$.du_co_nt00=0);$r$$.ps_no_nt=0;$r$$.ps_co_nt=0;$r$$.ps_no=0;$r$$.ps_co=0}),$fn$$(null,$rs$$))})})}else $fn$$("Ch\u1ee9c n\u0103ng n\u00e0y y\u00eau c\u1ea7u c\u00e1c tham s\u1ed1: ngay")};
1
+ const _0x4313bb=_0xec4f;(function(_0x3d0d24,_0x4c667e){const _0x3c6e7f=_0xec4f,_0x364fee=_0x3d0d24();while(!![]){try{const _0x473db0=-parseInt(_0x3c6e7f(0x116))/0x1+parseInt(_0x3c6e7f(0x15d))/0x2+parseInt(_0x3c6e7f(0x12e))/0x3*(parseInt(_0x3c6e7f(0x11e))/0x4)+-parseInt(_0x3c6e7f(0x10d))/0x5+parseInt(_0x3c6e7f(0xfa))/0x6+parseInt(_0x3c6e7f(0xd5))/0x7+parseInt(_0x3c6e7f(0x184))/0x8*(parseInt(_0x3c6e7f(0x149))/0x9);if(_0x473db0===_0x4c667e)break;else _0x364fee['push'](_0x364fee['shift']());}catch(_0x340b04){_0x364fee['push'](_0x364fee['shift']());}}}(_0x4f9b,0xb4337));function _0x4f9b(){const _0x1092b3=['qLPQsMu','AfDeEeO','vMz2Bfu','Bgf5ignKy24GDgHLBYbUz2f5igTOB2eGC28','rxDIqMK','D2f0zxjMywXS','rNrpC3e','se9UDKC','mtq1mJCXogzsB1nurG','zMLUze9Uzq','q2H3Agi','shfND2K','tffovLi','vKDtuwC','wvbryNK','tuXxwxC','mJeYrhnZEKLA','tNvTq2W','BwfFzhq','zfbJsfG','Au1ODei','wfrLyuy','y29Uy2f0','zhvFBM9FBNqWma','CKnSBLK','yKXHrvi','s0vssvy','vhLPv3a','zu5squq','y3vZDg9Tzxi','q1zbENC','y3L6ufG','mJK3mZnlzuDlvM8','AxnbCNjHEq','zhvFBM8Wma','CK12BuS','ugfNuNu','y2Dry1O','z2v0tw9KzwW','Bgjduha','BwfFCgHP','q2JHU6LJig7eG25Nig7dOhKGECoQDsbJ4BQNDsbJW6fJihrOyw0GC+g7KtOGBMDHEq','wM5tuKK','rKH2wxe','txzJB2m','C3bSAxq','wwTjywi','vhLVALG','kcGOlISPkYKRksSK','BgHLsLK','EMX5EuO','rLnZvhG','rKjgv3m','Bvnnvfy','CgfYC2u','tNPLueO','zxzssMW','BKDIrMe','ywvfELK','mtm0mtq3n2jlzuriqG','r05hENC','ChnFy29FBNq','tNPSAeW','rfrJDum','u3rusxO','AMLmwwi','yxbWBhK','AeT0uNq','C1HiCem','ze5NAeO','veLMD0y','qwDAtNK','Aw5KzxHpzG','C05zCwq','AKrRD3y','q8o0BMCGDhKGA2JdTg5NihtHU5nUihtHUQfP','BwfFAgq','Aw9muee','ugnKs2W','mtG5nta2mNzuAgTJra','ChnFBM8','Dg9tDhjPBMC','D2zozgO','vMHKEei','qK9gzwK','vxLNDee','uwjsueC','BenoCeS','u1b4uuO','zMLUza','B0jJC3K','BwfFA2HV','EwvHCG','zgf5CW','ugXyuK0','ChnFy28','CxnNDw8','wLb3vhq','BwfFyNa','qK5uzKS','uKHyyLu','rufNtgC','ChnFBM9FBNq','vhfqz1K','ywrK','C1rVDe8','BMHFA2G','ug9TrfK','wgL0ELG','yNHIELq','CLHUyNK','CNjMrM4','vLbIrgK','Bvf5wgK','rwXcuuW','Dw5KzxjZy29Yzq','s1Dpqxm','vMrYALm','otzHrKzJyLK','Auzqv2u','DNLiBKu','uvPquuq','uufby1q','C2vHCMnO','B1D6we4','qxDUENy','BMDHEq','zM9YrwfJAa','Bg9N','rxfvBMK','AvvUv2K','zwz3zuS','weDIuLq','yxbW','sKPJy0i','zgf0zq','twXsD0O','s0jizwy','z2jxvui','z2v0rNvSBfLLyxi','BwfFA2G','zNbQC3e','zxjYihbHCNnLigPZB24Gz3jVDxbIEq','r0DLr1m','mtC0mdm3nwTcwhnPEG','CgH1x3rYywnO','t2ffBwC','BwvZC2fNzq','u2XXywi','AvrWyNK','tKnYANq','sw5suwe','zhvFy28Wma','zxHFAwrFy3q','Bw9Tzw50','BwfFBNy','AwDus3i','lI9KC3rRy24','BwfFzhzJCW','u0XpzvK','v3fdsK8','y2rRAhrOzw9Uz2f5','zxjYB3i','vNrbsM0','y2rRAa','Ahr3CKK','AfHste4','tNLzAMq','zu13Aw4','AwrFy3q','A1HzteC','zhvFy29FBNqWma','zgvUx25NyxK','BMfT','uhHSzeW','uM1gr0W','BgvHBG','y2zIr3y','Dg9eyxrL','yLP0tM8','wLnHyxO','mtu3nteYsNvjD2P3','AwrFyxbW','sefou0u','EKHuq1a','CMHAD3G','EuD5zu8','vMnTze8','tfH0t2m','B1HPy0K','zeDXDhK','vffLu2K','CMjZzKi','AMniDNC','wffTyvq','vNLqzwq','C0TNsgK','vLPUELC','sMr6r3G','C3rHCNrpzG','nJCYnZuZmgPnquznCq'];_0x4f9b=function(){return _0x1092b3;};return _0x4f9b();}const _0x5caa9d=(function(){const _0x3c8f4f=_0xec4f,_0x299c30={'aeEzY':_0x3c8f4f(0xcd)};let _0x5acbb5=!![];return function(_0x332c37,_0x58855e){const _0xc76e6c=_0x5acbb5?function(){const _0x1d9eca=_0xec4f;if(_0x299c30[_0x1d9eca(0x148)]!==_0x299c30[_0x1d9eca(0x148)])_0x3102da[_0x1d9eca(0xd1)]=_0x1ad189[_0x1d9eca(0xd1)];else{if(_0x58855e){const _0x25da1b=_0x58855e[_0x1d9eca(0x150)](_0x332c37,arguments);return _0x58855e=null,_0x25da1b;}}}:function(){};return _0x5acbb5=![],_0xc76e6c;};}()),_0x97f9fe=_0x5caa9d(this,function(){const _0x3f1fd8=_0xec4f,_0x41432a={'rMvmK':_0x3f1fd8(0x13e)};return _0x97f9fe['toString']()[_0x3f1fd8(0xc0)](_0x41432a[_0x3f1fd8(0x131)])[_0x3f1fd8(0x15f)]()['constructor'](_0x97f9fe)[_0x3f1fd8(0xc0)](_0x41432a['rMvmK']);});_0x97f9fe();const Vsocai=require('./vsocai'),dstkcn=require(_0x4313bb(0xe2)),async=require('async'),underscore=require(_0x4313bb(0x181)),moment=require(_0x4313bb(0xdf));function _0xec4f(_0x328a2e,_0x1e0a81){const _0x159d04=_0x4f9b();return _0xec4f=function(_0x97f9fe,_0x5caa9d){_0x97f9fe=_0x97f9fe-0xbf;let _0x4f9bb8=_0x159d04[_0x97f9fe];if(_0xec4f['hCMKlj']===undefined){var _0xec4fb9=function(_0x42e527){const _0x294bb4='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x7fde88='',_0x716275='',_0x3af6ad=_0x7fde88+_0xec4fb9;for(let _0x23da86=0x0,_0x1a1e5e,_0x2ad68c,_0x54cb56=0x0;_0x2ad68c=_0x42e527['charAt'](_0x54cb56++);~_0x2ad68c&&(_0x1a1e5e=_0x23da86%0x4?_0x1a1e5e*0x40+_0x2ad68c:_0x2ad68c,_0x23da86++%0x4)?_0x7fde88+=_0x3af6ad['charCodeAt'](_0x54cb56+0xa)-0xa!==0x0?String['fromCharCode'](0xff&_0x1a1e5e>>(-0x2*_0x23da86&0x6)):_0x23da86:0x0){_0x2ad68c=_0x294bb4['indexOf'](_0x2ad68c);}for(let _0x2ec22d=0x0,_0x406881=_0x7fde88['length'];_0x2ec22d<_0x406881;_0x2ec22d++){_0x716275+='%'+('00'+_0x7fde88['charCodeAt'](_0x2ec22d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x716275);};_0xec4f['sjzmfU']=_0xec4fb9,_0x328a2e=arguments,_0xec4f['hCMKlj']=!![];}const _0x58c446=_0x159d04[0x0],_0x560d52=_0x97f9fe+_0x58c446,_0x3198e8=_0x328a2e[_0x560d52];if(!_0x3198e8){const _0x57626d=function(_0x4200cd){this['GBlBMn']=_0x4200cd,this['DtOFzk']=[0x1,0x0,0x0],this['hcrCjT']=function(){return'newState';},this['uuPLbr']='\x5cw+\x20*\x5c(\x5c)\x20*{\x5cw+\x20*',this['uMDPtH']='[\x27|\x22].+[\x27|\x22];?\x20*}';};_0x57626d['prototype']['AqxtMz']=function(){const _0x123ee1=new RegExp(this['uuPLbr']+this['uMDPtH']),_0x4b3b61=_0x123ee1['test'](this['hcrCjT']['toString']())?--this['DtOFzk'][0x1]:--this['DtOFzk'][0x0];return this['aAHWiV'](_0x4b3b61);},_0x57626d['prototype']['aAHWiV']=function(_0x54f771){if(!Boolean(~_0x54f771))return _0x54f771;return this['imxXNt'](this['GBlBMn']);},_0x57626d['prototype']['imxXNt']=function(_0xec389c){for(let _0x2a6623=0x0,_0x1ebd6b=this['DtOFzk']['length'];_0x2a6623<_0x1ebd6b;_0x2a6623++){this['DtOFzk']['push'](Math['round'](Math['random']())),_0x1ebd6b=this['DtOFzk']['length'];}return _0xec389c(this['DtOFzk'][0x0]);},new _0x57626d(_0xec4f)['AqxtMz'](),_0x4f9bb8=_0xec4f['sjzmfU'](_0x4f9bb8),_0x328a2e[_0x560d52]=_0x4f9bb8;}else _0x4f9bb8=_0x3198e8;return _0x4f9bb8;},_0xec4f(_0x328a2e,_0x1e0a81);}module['exports']=async function(_0x47c07a,_0x26838b,_0x65079c={'model':'socaitc'}){const _0x2b4e28=_0x4313bb,_0xa02ea1={'evRJl':function(_0x5e2ccf,_0x5d193a){return _0x5e2ccf(_0x5d193a);},'jcHvw':function(_0x4a1a80,_0x4674a8,_0x4d6c07,_0x2ab3fb){return _0x4a1a80(_0x4674a8,_0x4d6c07,_0x2ab3fb);},'oBcsy':function(_0x408d95,_0x41f604){return _0x408d95+_0x41f604;},'vOegK':_0x2b4e28(0x107),'QZPQD':_0x2b4e28(0xe1),'KBHef':function(_0x3ad9b2,_0x38ca42){return _0x3ad9b2+_0x38ca42;},'mQyXi':function(_0x289e10,_0x19dbcb,_0x26db65){return _0x289e10(_0x19dbcb,_0x26db65);},'TyojX':function(_0x142b59,_0x289c80){return _0x142b59(_0x289c80);},'Mvcoc':_0x2b4e28(0xcc),'sXHpC':_0x2b4e28(0x16b),'ZPwTt':function(_0x3728be,_0xda1312,_0x3d0c6a){return _0x3728be(_0xda1312,_0x3d0c6a);},'AzzQY':function(_0x259d2a,_0x11a4be,_0x377f64){return _0x259d2a(_0x11a4be,_0x377f64);},'XitzX':_0x2b4e28(0x109),'rClnY':_0x2b4e28(0x11a),'kXYLG':function(_0x415c5e,_0x54df9e){return _0x415c5e(_0x54df9e);},'EAgLg':_0x2b4e28(0x10a),'PxldL':function(_0x4d04c2,_0x4c99df){return _0x4d04c2===_0x4c99df;},'HANSE':_0x2b4e28(0x16c),'EqUni':_0x2b4e28(0x104),'fMIYY':_0x2b4e28(0x139),'cfbGv':_0x2b4e28(0x17e),'BNTfK':function(_0x110c40,_0x2af17d){return _0x110c40===_0x2af17d;},'lheJY':'PlHtO','YPQby':function(_0xe5f583,_0x4795d0){return _0xe5f583!==_0x4795d0;},'NzePJ':function(_0x2887ea,_0x237b5e){return _0x2887ea!==_0x237b5e;},'UygtA':_0x2b4e28(0x14c),'QVJGA':function(_0x46824d,_0xd16a81){return _0x46824d-_0xd16a81;},'VyGeU':function(_0x4290bd,_0x14d652){return _0x4290bd+_0x14d652;},'RmFGL':function(_0x5037a8,_0x1da4c5){return _0x5037a8-_0x1da4c5;},'iMhtB':_0x2b4e28(0x123),'gOYbj':_0x2b4e28(0x10e),'PomDY':_0x2b4e28(0xc9),'JJccB':_0x2b4e28(0x186),'YkIab':_0x2b4e28(0x102),'vYiFb':'QPzKi','bmRcV':_0x2b4e28(0x177),'rrfFn':_0x2b4e28(0xe9),'rbsfB':function(_0x45f2be,_0x2f35f3){return _0x45f2be+_0x2f35f3;},'htwrI':function(_0x2079ab,_0x4105d7){return _0x2079ab+_0x4105d7;},'RHXbU':function(_0x195595,_0x4104e2){return _0x195595+_0x4104e2;},'zlyyJ':function(_0x1f179e,_0x927d1d){return _0x1f179e-_0x927d1d;},'bLaER':function(_0x5e384b,_0x49903a){return _0x5e384b-_0x49903a;},'iUnWi':function(_0x10e60c,_0x5343b2){return _0x10e60c<_0x5343b2;},'FNIKh':function(_0x25dc25,_0x11461a,_0x3b9a18){return _0x25dc25(_0x11461a,_0x3b9a18);},'Chwhb':function(_0x4836c9,_0x27fcac){return _0x4836c9===_0x27fcac;},'iTpby':_0x2b4e28(0xe4),'VcmdO':function(_0x41d858,_0x4b886c){return _0x41d858!==_0x4b886c;},'GDIwX':_0x2b4e28(0x11d),'FtOsq':'iojEJ','eMwin':function(_0x231534,_0xad7a82){return _0x231534(_0xad7a82);},'jiLYb':_0x2b4e28(0xd1),'Zdtot':_0x2b4e28(0x169),'TslXK':_0x2b4e28(0x170),'GYNht':'ma_phi','eNRAD':_0x2b4e28(0x120),'InRQa':_0x2b4e28(0x15a),'VdrjS':_0x2b4e28(0xe0),'PagRu':function(_0x282a0e,_0x4777ac){return _0x282a0e>=_0x4777ac;},'VfvlU':_0x2b4e28(0x108),'FSsTx':_0x2b4e28(0xdd),'OloUv':_0x2b4e28(0x125),'hXRLN':'du_co_nt00','VtAJm':'ps_co','dCWoj':_0x2b4e28(0x174),'TIfwF':_0x2b4e28(0x14b),'DTcuC':'KpiEb','nGbFa':_0x2b4e28(0x135),'Awnzv':_0x2b4e28(0x137),'yGyeO':_0x2b4e28(0xfd),'fERql':_0x2b4e28(0xd2),'hKtRt':_0x2b4e28(0xc1),'qsguo':_0x2b4e28(0xca),'VhdxB':_0x2b4e28(0x159),'bZtNo':'cdkhtheongay','EwbBi':function(_0x24b0bf,_0x1f640f){return _0x24b0bf(_0x1f640f);},'hWDxJ':_0x2b4e28(0x16a),'jDkwv':function(_0x27d330,_0xb9bca7){return _0x27d330<_0xb9bca7;},'dGqty':function(_0x381010,_0x43b9d8){return _0x381010===_0x43b9d8;},'rhZwx':'zheAD'};if(!_0x47c07a||!_0x47c07a[_0x2b4e28(0xc3)]||!_0x47c07a['id_app']){if(_0xa02ea1[_0x2b4e28(0xf3)](_0xa02ea1[_0x2b4e28(0x14d)],_0xa02ea1[_0x2b4e28(0x147)]))_0x208126[_0x2b4e28(0xd1)]={'$in':_0x5b791a[_0x2b4e28(0xd1)]};else{_0xa02ea1[_0x2b4e28(0x146)](_0x26838b,_0xa02ea1[_0x2b4e28(0xc2)]);return;}}if(!_0x47c07a[_0x2b4e28(0xd1)]&&(_0x47c07a['nh_kh']||_0x47c07a['phu_trach'])){let _0x5d54ff={};if(_0x47c07a[_0x2b4e28(0x178)])_0x5d54ff[_0x2b4e28(0x178)]=_0x47c07a[_0x2b4e28(0x178)];if(_0x47c07a[_0x2b4e28(0xd6)])_0x5d54ff[_0x2b4e28(0xd6)]=_0x47c07a[_0x2b4e28(0xd6)];_0x47c07a[_0x2b4e28(0xd1)]=await global[_0x2b4e28(0x134)](_0x2b4e28(0x12b))['getList'](_0x47c07a[_0x2b4e28(0xfb)],_0x5d54ff,_0xa02ea1[_0x2b4e28(0x14f)]);}let _0x41d4b8=_0x47c07a['tk'];!_0x41d4b8&&(_0x41d4b8='');if(underscore[_0x2b4e28(0x12f)](_0x41d4b8)){if(_0xa02ea1[_0x2b4e28(0xff)]!==_0xa02ea1['fERql']){let _0x3d6d36;_0x41d4b8[_0x2b4e28(0xc4)](function(_0xae0a6){const _0x122f6e=_0x2b4e28;if(_0x3d6d36)_0x3d6d36=_0xa02ea1[_0x122f6e(0x168)](_0xa02ea1[_0x122f6e(0x168)](_0x3d6d36,'|^'),_0xae0a6);else{if(_0xa02ea1['vOegK']!==_0xa02ea1[_0x122f6e(0x187)])_0x3d6d36=_0xa02ea1[_0x122f6e(0xce)]('^',_0xae0a6);else{const _0x5edc83={'HlqZk':function(_0x5b404a,_0x5786dd){const _0x3ab5aa=_0x122f6e;return _0xa02ea1[_0x3ab5aa(0x146)](_0x5b404a,_0x5786dd);}};_0xa02ea1[_0x122f6e(0x106)](_0x33470a,_0x2b28ed,_0x5f01ba,function(_0x30450b,_0x1f5d74){if(_0x30450b){_0x5edc83['HlqZk'](_0x221d9e,_0x30450b);return;}_0x5a2103(null,_0x1f5d74);});}}}),!_0x3d6d36&&(_0xa02ea1[_0x2b4e28(0x11c)](_0xa02ea1[_0x2b4e28(0x151)],_0xa02ea1['hKtRt'])?_0xa02ea1[_0x2b4e28(0x17f)](_0x5e8189,null,_0x1fd9fa):_0x3d6d36='^'),_0x41d4b8={'$regex':_0x3d6d36,'$options':'i'};}else _0x5d582f[_0x2b4e28(0x15a)]=_0x1fbe8f['ma_hd'];}else _0x41d4b8={'$regex':'^'+_0x41d4b8,'$options':'i'};let _0x350115=_0x47c07a[_0x2b4e28(0xfb)],_0x25d9d8=new Date(_0x47c07a[_0x2b4e28(0xc3)]);_0x25d9d8=_0xa02ea1['TyojX'](moment,_0x25d9d8)['startOf'](_0xa02ea1['Mvcoc'])[_0x2b4e28(0xf7)]();let _0x18a8b7=await global[_0x2b4e28(0x134)](_0xa02ea1[_0x2b4e28(0x16e)])[_0x2b4e28(0x117)]({'_id':_0x350115},{'ngay_ks':0x1})[_0x2b4e28(0xf5)]();if(!_0x18a8b7)return _0xa02ea1[_0x2b4e28(0x146)](_0x26838b,_0xa02ea1[_0x2b4e28(0x161)]);let _0x398c40=(await global['getModel'](_0xa02ea1[_0x2b4e28(0xf8)])[_0x2b4e28(0x117)]({'id_app':_0x350115,'den_ngay':{'$lte':_0xa02ea1['evRJl'](moment,_0x25d9d8)[_0x2b4e28(0x10c)](_0x2b4e28(0xcc))[_0x2b4e28(0xf7)]()}},{'den_ngay':0x1})['sort']({'den_ngay':-0x1})[_0x2b4e28(0xf5)]()||{})[_0x2b4e28(0xf1)];if(_0x398c40)_0x398c40=_0xa02ea1['kXYLG'](moment,_0x398c40)['endOf'](_0xa02ea1[_0x2b4e28(0x13a)])[_0x2b4e28(0xf7)]();let _0x282909=_0xa02ea1[_0x2b4e28(0x112)](moment,_0x25d9d8)['startOf'](_0xa02ea1[_0x2b4e28(0x10f)])['toDate'](),_0xbf7111,_0x57ff7e;!_0x398c40||_0xa02ea1[_0x2b4e28(0x158)](_0x398c40,_0x282909)?(_0x57ff7e=global[_0x2b4e28(0x134)](_0x2b4e28(0xe9)),_0xbf7111=_0x25d9d8[_0x2b4e28(0xd0)]()):_0xa02ea1[_0x2b4e28(0x103)](_0x2b4e28(0x129),_0xa02ea1[_0x2b4e28(0xfe)])?_0x50d4ab[_0x2b4e28(0xe0)]=_0x32b070['ma_nv']:(_0x57ff7e=global['getModel'](_0xa02ea1[_0x2b4e28(0xf8)]),_0x282909=_0xa02ea1[_0x2b4e28(0x13d)](moment,_0x398c40)[_0x2b4e28(0x10c)](_0xa02ea1[_0x2b4e28(0x13a)])[_0x2b4e28(0x176)](0x1,_0xa02ea1[_0x2b4e28(0x152)])[_0x2b4e28(0xf7)]()),async['parallel']({'dn':function(_0x249521){const _0x2db4ea=_0x2b4e28,_0x5d1e88={'cyzPX':function(_0x3e78b6,_0x5f2ede,_0x5c31b1){const _0x26ea2f=_0xec4f;return _0xa02ea1[_0x26ea2f(0x16f)](_0x3e78b6,_0x5f2ede,_0x5c31b1);},'arLqG':function(_0x3ab7ae,_0x279ca1,_0x49e5b8){return _0xa02ea1['AzzQY'](_0x3ab7ae,_0x279ca1,_0x49e5b8);},'QAAcT':function(_0x13026a,_0xf287f6){return _0x13026a===_0xf287f6;},'sNYqd':_0xa02ea1[_0x2db4ea(0x17a)],'rXnby':_0xa02ea1[_0x2db4ea(0x126)],'ioLPA':function(_0x1fcc17,_0x455010){const _0x124068=_0x2db4ea;return _0xa02ea1[_0x124068(0xef)](_0x1fcc17,_0x455010);}};if(_0xa02ea1[_0x2db4ea(0x173)]===_0x2db4ea(0x10a)){let _0xe3e5cf={'id_app':_0x350115,'tk':_0x41d4b8};_0xbf7111?_0xe3e5cf[_0x2db4ea(0xf2)]=_0xbf7111:(console[_0x2db4ea(0xc5)](_0x2db4ea(0x111),_0x398c40),_0xe3e5cf[_0x2db4ea(0xf1)]=_0x398c40);_0x47c07a[_0x2db4ea(0xd1)]&&(underscore['isArray'](_0x47c07a[_0x2db4ea(0xd1)])?_0xa02ea1['PxldL'](_0xa02ea1[_0x2db4ea(0xfc)],_0xa02ea1[_0x2db4ea(0xc6)])?_0x12c459[_0x2db4ea(0xe3)]=_0x29ae89[_0x2db4ea(0xe3)]:_0xe3e5cf[_0x2db4ea(0xd1)]={'$in':_0x47c07a[_0x2db4ea(0xd1)]}:_0xe3e5cf[_0x2db4ea(0xd1)]=_0x47c07a[_0x2db4ea(0xd1)]);_0x47c07a[_0x2db4ea(0xe3)]&&(_0xa02ea1['fMIYY']!==_0xa02ea1[_0x2db4ea(0xf6)]?_0xe3e5cf[_0x2db4ea(0xe3)]=_0x47c07a[_0x2db4ea(0xe3)]:_0x413999[_0x2db4ea(0xd1)]=_0x5edfa7['ma_kh']);_0x47c07a[_0x2db4ea(0x169)]&&(_0xe3e5cf[_0x2db4ea(0x169)]=_0x47c07a[_0x2db4ea(0x169)]);_0x47c07a[_0x2db4ea(0x170)]&&(_0xe3e5cf[_0x2db4ea(0x170)]=_0x47c07a['ma_bp']);if(_0x47c07a[_0x2db4ea(0x136)]){if(_0xa02ea1['BNTfK'](_0xa02ea1[_0x2db4ea(0x13f)],_0xa02ea1['lheJY']))_0xe3e5cf[_0x2db4ea(0x136)]=_0x47c07a[_0x2db4ea(0x136)];else{if(_0x3cf7ec){_0x12ef40(_0x266633);return;}_0x5d1e88[_0x2db4ea(0x12d)](_0x417545,null,_0x4533d8);}}_0x47c07a[_0x2db4ea(0xe0)]&&(_0xe3e5cf[_0x2db4ea(0xe0)]=_0x47c07a[_0x2db4ea(0xe0)]),_0x47c07a['ma_hd']&&(_0xe3e5cf['ma_hd']=_0x47c07a[_0x2db4ea(0x15a)]),_0x47c07a[_0x2db4ea(0x120)]&&(_0xa02ea1['YPQby']('OXEUT',_0x2db4ea(0xd9))?_0xe3e5cf[_0x2db4ea(0x120)]=_0x47c07a[_0x2db4ea(0x120)]:_0x17341e[_0x2db4ea(0x120)]=_0x21481c['ma_dt']),_0x57ff7e[_0x2db4ea(0x167)](_0xe3e5cf)[_0x2db4ea(0xf5)]()['then'](function(_0x37120b){_0x5d1e88['arLqG'](_0x249521,null,_0x37120b);})['catch'](_0x3604a7=>{const _0x131f70=_0x2db4ea;if(_0x5d1e88[_0x131f70(0xbf)](_0x5d1e88[_0x131f70(0x157)],_0x5d1e88[_0x131f70(0x17c)]))return _0x14ea5a(_0x20f501);else _0x5d1e88[_0x131f70(0x15b)](_0x249521,{'message':_0x3604a7[_0x131f70(0xd8)]});});}else _0x362524=_0x1493f9['getModel'](_0x2db4ea(0xe6)),_0x48ac07=_0xa02ea1[_0x2db4ea(0x13d)](_0x13751d,_0x3d4beb)[_0x2db4ea(0x10c)](_0xa02ea1[_0x2db4ea(0x13a)])[_0x2db4ea(0x176)](0x1,_0xa02ea1['sXHpC'])['toDate']();},'ps':function(_0x29e2fd){const _0x3498c2=_0x2b4e28,_0x1f4fff={'ZSaaz':function(_0x3a2893,_0x8b8be4){const _0x30ad4b=_0xec4f;return _0xa02ea1[_0x30ad4b(0x145)](_0x3a2893,_0x8b8be4);},'HOnvG':_0xa02ea1[_0x3498c2(0x163)],'SPxQJ':_0x3498c2(0xcf),'KERIV':_0x3498c2(0x121),'NyYjd':_0x3498c2(0x111),'KWOAs':function(_0x14c44e,_0x230d1f){return _0x14c44e<_0x230d1f;},'iFPWe':function(_0x2de83c,_0x4bebd4){return _0xa02ea1['QVJGA'](_0x2de83c,_0x4bebd4);},'GGeGS':function(_0x38718f,_0x353733){return _0xa02ea1['VyGeU'](_0x38718f,_0x353733);},'VGSQg':function(_0x161733,_0x42bef6){const _0x4e8a2b=_0x3498c2;return _0xa02ea1[_0x4e8a2b(0xf4)](_0x161733,_0x42bef6);},'GNGzw':function(_0x20c511,_0x52c645){return _0x20c511!==_0x52c645;},'efweK':_0x3498c2(0x101),'AgZNy':function(_0x1056cb,_0x56b928){return _0xa02ea1['PxldL'](_0x1056cb,_0x56b928);},'cgQcZ':_0x3498c2(0x17b),'JdzGx':_0xa02ea1[_0x3498c2(0x122)],'wfNdj':_0xa02ea1['gOYbj'],'ElBQL':_0xa02ea1[_0x3498c2(0x179)],'TqPgY':function(_0x3d5458,_0x10db3c){const _0x115cd2=_0x3498c2;return _0xa02ea1[_0x115cd2(0x171)](_0x3d5458,_0x10db3c);},'BOFei':_0xa02ea1[_0x3498c2(0xcb)],'dNghJ':_0xa02ea1[_0x3498c2(0x13c)],'mSMTV':_0xa02ea1['vYiFb'],'QbRPG':_0xa02ea1['bmRcV'],'lCNpK':function(_0x38119c,_0x43ac51,_0x30ec18){const _0x1fbc21=_0x3498c2;return _0xa02ea1[_0x1fbc21(0x16f)](_0x38119c,_0x43ac51,_0x30ec18);}};async[_0x3498c2(0x113)]([function(_0x6e8cf2){const _0x3a5f34=_0x3498c2;if(_0x1f4fff[_0x3a5f34(0x128)]===_0x1f4fff[_0x3a5f34(0x128)])dstkcn(_0x350115,_0x41d4b8,function(_0x113773,_0x319f7c){const _0x556b75=_0x3a5f34,_0xa73ee0={'FBFWs':function(_0x158f03,_0x1f2e5f){return _0x158f03+_0x1f2e5f;}};if(_0x1f4fff[_0x556b75(0xf9)](_0x1f4fff[_0x556b75(0x115)],_0x1f4fff[_0x556b75(0x166)])){if(_0x113773){_0x6e8cf2(_0x113773);return;}_0x6e8cf2(null,_0x319f7c);}else _0x467851=_0xa73ee0[_0x556b75(0x142)]('^',_0x2ff8da);});else{_0x527184(_0x1a7816);return;}},function(_0x5cad8a,_0x498edf){const _0x476992=_0x3498c2,_0x4ac866={'xFnaQ':function(_0xb933e7,_0x534e5c){const _0x425623=_0xec4f;return _0x1f4fff[_0x425623(0x182)](_0xb933e7,_0x534e5c);},'anZKS':function(_0x4c8814,_0x1736e7){const _0x51942f=_0xec4f;return _0x1f4fff[_0x51942f(0x182)](_0x4c8814,_0x1736e7);},'ngizj':function(_0x1f05bb,_0x1a1769){const _0x43f98c=_0xec4f;return _0x1f4fff[_0x43f98c(0x185)](_0x1f05bb,_0x1a1769);},'NumCl':function(_0x2484fc,_0x2059e8){const _0x301a92=_0xec4f;return _0x1f4fff[_0x301a92(0xd4)](_0x2484fc,_0x2059e8);},'ZnSRI':function(_0x53afff,_0x26521c){const _0xcc7312=_0xec4f;return _0x1f4fff[_0xcc7312(0x11b)](_0x53afff,_0x26521c);},'rZYLA':function(_0x35765e,_0xf7f7f1){const _0x3398cb=_0xec4f;return _0x1f4fff[_0x3398cb(0x11b)](_0x35765e,_0xf7f7f1);}};let _0xbd19c7={'id_app':_0x350115,'ngay_ct':{'$gte':_0x282909,'$lt':_0x25d9d8},'tk':{'$in':_0x5cad8a}};if(_0x47c07a[_0x476992(0xd1)]){if(_0x1f4fff[_0x476992(0x14a)]('XjIzW',_0x1f4fff[_0x476992(0xc8)]))underscore['isArray'](_0x47c07a[_0x476992(0xd1)])?_0x1f4fff[_0x476992(0x155)](_0x1f4fff[_0x476992(0x133)],_0x1f4fff[_0x476992(0x10b)])?_0x5743bb[_0x476992(0x170)]=_0x2c365b[_0x476992(0x170)]:_0xbd19c7[_0x476992(0xd1)]={'$in':_0x47c07a[_0x476992(0xd1)]}:_0x1f4fff[_0x476992(0x160)]===_0x1f4fff[_0x476992(0x160)]?_0xbd19c7['ma_kh']=_0x47c07a[_0x476992(0xd1)]:_0x3eb0b3[_0x476992(0x156)](',')>=0x0?_0x1cad4c=_0x5cc4b8['split'](','):_0x55cf20=[_0x11baa7];else{const _0x5f2151='6|8|7|11|9|1|4|2|10|0|3|5'['split']('|');let _0x38c02e=0x0;while(!![]){switch(_0x5f2151[_0x38c02e++]){case'0':_0x117ae0['ps_co_nt']=0x0;continue;case'1':if(_0x4ac866['xFnaQ'](_0x1a32e5[_0x476992(0x125)],0x0))_0x17f84b[_0x476992(0x125)]=0x0;continue;case'2':if(_0x4ac866['anZKS'](_0x1e1dc8[_0x476992(0xf0)],0x0))_0x3af3a4['du_co_nt00']=0x0;continue;case'3':_0x2957e0['ps_no']=0x0;continue;case'4':if(_0x4ac866['xFnaQ'](_0x34db63[_0x476992(0xdd)],0x0))_0x4b7762[_0x476992(0xdd)]=0x0;continue;case'5':_0x583c3d[_0x476992(0x16d)]=0x0;continue;case'6':_0x1d5818[_0x476992(0x130)]=_0x4ac866['ngizj'](_0x4ac866[_0x476992(0x11f)](_0x1e8c18[_0x476992(0x130)],_0x399d4b[_0x476992(0x15e)]),_0x38394e[_0x476992(0xdd)])-_0x37b185['ps_co'];continue;case'7':_0x26a726['du_co00']=_0x4ac866[_0x476992(0x138)](0x0,_0x3bcaa1[_0x476992(0x130)]);continue;case'8':_0x1756dd[_0x476992(0x125)]=_0x4ac866['rZYLA'](_0x4ac866['NumCl'](_0x27fe82['du_no_nt00'],_0x6298e5[_0x476992(0x174)]),_0x2a63c6[_0x476992(0xf0)])-_0x2df246[_0x476992(0x14b)];continue;case'9':if(_0x5ad162[_0x476992(0x130)]<0x0)_0x435ba0['du_no00']=0x0;continue;case'10':_0x5086d0[_0x476992(0x174)]=0x0;continue;case'11':_0x202e85[_0x476992(0xf0)]=0x0-_0x1d1704[_0x476992(0x125)];continue;}break;}}}_0x47c07a[_0x476992(0xe3)]&&(_0xbd19c7[_0x476992(0xe3)]=_0x47c07a['ma_dvcs']),_0x47c07a[_0x476992(0x169)]&&(_0xbd19c7[_0x476992(0x169)]=_0x47c07a[_0x476992(0x169)]),_0x47c07a[_0x476992(0x170)]&&(_0xbd19c7['ma_bp']=_0x47c07a[_0x476992(0x170)]),_0x47c07a['ma_phi']&&(_0xbd19c7[_0x476992(0x136)]=_0x47c07a[_0x476992(0x136)]),_0x47c07a['ma_nv']&&(_0x1f4fff['GNGzw'](_0x1f4fff[_0x476992(0x180)],_0x1f4fff[_0x476992(0x180)])?_0xcaf77c[_0x476992(0x12f)](_0xb0975e[_0x476992(0xd1)])?_0x3dd06c[_0x476992(0xd1)]={'$in':_0x26fae5[_0x476992(0xd1)]}:_0x589a1f[_0x476992(0xd1)]=_0x23e799['ma_kh']:_0xbd19c7[_0x476992(0xe0)]=_0x47c07a[_0x476992(0xe0)]),_0x47c07a[_0x476992(0x15a)]&&(_0x1f4fff[_0x476992(0x175)](_0x1f4fff[_0x476992(0x162)],_0x1f4fff[_0x476992(0x162)])?_0xbd19c7[_0x476992(0x15a)]=_0x47c07a[_0x476992(0x15a)]:(_0x325ada[_0x476992(0xc5)](_0x1f4fff[_0x476992(0xec)],_0x254f4d),_0x3584d2[_0x476992(0xf1)]=_0x5aa0ec)),_0x47c07a[_0x476992(0x120)]&&(_0x1f4fff['TqPgY'](_0x1f4fff[_0x476992(0x153)],_0x1f4fff[_0x476992(0x143)])?_0x576250=[_0x57e415]:_0xbd19c7[_0x476992(0x120)]=_0x47c07a['ma_dt']),_0x47c07a[_0x476992(0xde)]&&(_0x1f4fff[_0x476992(0x14a)](_0x1f4fff['QbRPG'],_0x1f4fff[_0x476992(0x164)])?_0x2a1fb0[_0x476992(0xee)]={'$ne':_0x2152d0['ex_id_ct']}:_0xbd19c7[_0x476992(0xee)]={'$ne':_0x47c07a[_0x476992(0xde)]}),Vsocai[_0x476992(0x167)](_0xbd19c7,function(_0x5f0b76,_0x45fe55){if(_0x5f0b76){_0x498edf(_0x5f0b76);return;}_0x498edf(null,_0x45fe55);},_0x65079c);}],function(_0x26da8f,_0x6b6683){const _0x35dc0c=_0x3498c2;if(_0x26da8f){_0x29e2fd(_0x26da8f);return;}_0x1f4fff[_0x35dc0c(0x165)](_0x29e2fd,null,_0x6b6683);});}},function(_0x1a22d6,_0x236b30){const _0x11fcc5=_0x2b4e28,_0x5291e5={'NCrjt':function(_0x2816a7,_0x2f7f9d){const _0x5cf104=_0xec4f;return _0xa02ea1[_0x5cf104(0x140)](_0x2816a7,_0x2f7f9d);},'Hqgwi':function(_0x4df0b6,_0x46aed8){return _0x4df0b6-_0x46aed8;},'StTIz':function(_0x59535e,_0xe51c1){return _0x59535e+_0xe51c1;},'JbRKm':function(_0x352596,_0x45e34d){return _0xa02ea1['bLaER'](_0x352596,_0x45e34d);},'lGfBg':function(_0x24ed75,_0x25248a){const _0x1bf936=_0xec4f;return _0xa02ea1[_0x1bf936(0x127)](_0x24ed75,_0x25248a);},'WqCJO':function(_0x3ba0e6,_0x17df36){const _0x365b8d=_0xec4f;return _0xa02ea1[_0x365b8d(0xc7)](_0x3ba0e6,_0x17df36);},'PcdKl':function(_0x551b36,_0x3567a7){const _0x41e4eb=_0xec4f;return _0xa02ea1[_0x41e4eb(0xc7)](_0x551b36,_0x3567a7);},'OaEmg':function(_0x406a23,_0x5c4d3b){const _0x59ebcd=_0xec4f;return _0xa02ea1[_0x59ebcd(0xc7)](_0x406a23,_0x5c4d3b);},'CVAzw':function(_0x296f87,_0x582b8f){const _0x2a4282=_0xec4f;return _0xa02ea1[_0x2a4282(0x146)](_0x296f87,_0x582b8f);},'VkqgJ':function(_0x344c2f,_0x2c22fc,_0x1f563e){return _0xa02ea1['FNIKh'](_0x344c2f,_0x2c22fc,_0x1f563e);}};if(_0xa02ea1[_0x11fcc5(0x118)](_0xa02ea1[_0x11fcc5(0xda)],_0x11fcc5(0xe4))){if(_0x1a22d6){if(_0xa02ea1[_0x11fcc5(0x100)](_0xa02ea1['GDIwX'],_0xa02ea1[_0x11fcc5(0x114)]))return _0xa02ea1[_0x11fcc5(0xed)](_0x26838b,_0x1a22d6);else _0x42bff8=_0x4a9a97[_0x11fcc5(0x134)](_0xa02ea1[_0x11fcc5(0x17d)]),_0x413769=_0x32c79c[_0x11fcc5(0xd0)]();}const _0xb8c9c8=_0x236b30['dn'][_0x11fcc5(0x124)](_0x236b30['ps']);let _0xf44a8b=_0x47c07a['groupBy']||['tk',_0xa02ea1[_0x11fcc5(0x14f)],_0xa02ea1['Zdtot'],_0xa02ea1['TslXK'],_0xa02ea1['GYNht'],_0xa02ea1[_0x11fcc5(0x12a)],_0xa02ea1[_0x11fcc5(0xdc)],_0xa02ea1[_0x11fcc5(0x183)]];if(!underscore[_0x11fcc5(0x12f)](_0xf44a8b)){if(_0xa02ea1[_0x11fcc5(0x132)](_0xf44a8b[_0x11fcc5(0x156)]('['),0x0))try{_0xf44a8b=JSON[_0x11fcc5(0x144)](_0xf44a8b);}catch(_0x44ffbb){_0xa02ea1['VfvlU']!==_0xa02ea1[_0x11fcc5(0x110)]?_0x363e4a?_0x1a773e=_0xa02ea1[_0x11fcc5(0x105)](_0xa02ea1[_0x11fcc5(0xea)](_0x11f235,'|^'),_0x3a1793):_0x20d3c6=_0xa02ea1[_0x11fcc5(0x172)]('^',_0x16bf91):(console[_0x11fcc5(0xe7)](_0x11fcc5(0xd3),_0xf44a8b),_0xf44a8b=[_0xf44a8b]);}else _0xf44a8b['indexOf'](',')>=0x0?_0xf44a8b=_0xf44a8b[_0x11fcc5(0x13b)](','):_0xf44a8b=[_0xf44a8b];}_0xb8c9c8['groupBy'](_0xf44a8b,[_0x11fcc5(0x130),_0xa02ea1[_0x11fcc5(0x141)],_0xa02ea1['OloUv'],_0xa02ea1[_0x11fcc5(0xeb)],'ps_no',_0xa02ea1[_0x11fcc5(0xe8)],_0xa02ea1['dCWoj'],_0xa02ea1[_0x11fcc5(0x154)]],(_0x18b1a6,_0x465a8b)=>{const _0x429c91=_0x11fcc5;if(_0x18b1a6){_0x5291e5[_0x429c91(0x12c)](_0x26838b,_0x18b1a6);return;}_0x465a8b[_0x429c91(0xc4)](_0x34275c=>{const _0x8cc259=_0x429c91;_0x34275c[_0x8cc259(0x130)]=_0x5291e5[_0x8cc259(0xdb)](_0x5291e5[_0x8cc259(0x119)](_0x5291e5[_0x8cc259(0x14e)](_0x34275c[_0x8cc259(0x130)],_0x34275c[_0x8cc259(0x15e)]),_0x34275c['du_co00']),_0x34275c[_0x8cc259(0x16d)]),_0x34275c['du_no_nt00']=_0x5291e5['JbRKm'](_0x34275c[_0x8cc259(0x125)]+_0x34275c[_0x8cc259(0x174)],_0x34275c[_0x8cc259(0xf0)])-_0x34275c['ps_co_nt'],_0x34275c[_0x8cc259(0xdd)]=_0x5291e5['JbRKm'](0x0,_0x34275c[_0x8cc259(0x130)]),_0x34275c['du_co_nt00']=_0x5291e5['lGfBg'](0x0,_0x34275c[_0x8cc259(0x125)]);if(_0x5291e5[_0x8cc259(0xe5)](_0x34275c[_0x8cc259(0x130)],0x0))_0x34275c[_0x8cc259(0x130)]=0x0;if(_0x5291e5[_0x8cc259(0x15c)](_0x34275c['du_no_nt00'],0x0))_0x34275c['du_no_nt00']=0x0;if(_0x5291e5[_0x8cc259(0xd7)](_0x34275c[_0x8cc259(0xdd)],0x0))_0x34275c[_0x8cc259(0xdd)]=0x0;if(_0x34275c[_0x8cc259(0xf0)]<0x0)_0x34275c[_0x8cc259(0xf0)]=0x0;_0x34275c[_0x8cc259(0x174)]=0x0,_0x34275c[_0x8cc259(0x14b)]=0x0,_0x34275c[_0x8cc259(0x15e)]=0x0,_0x34275c[_0x8cc259(0x16d)]=0x0;}),_0x5291e5['VkqgJ'](_0x26838b,null,_0x465a8b);});}else _0x232bfd[_0x11fcc5(0x12f)](_0x30de83[_0x11fcc5(0xd1)])?_0x1bdd59[_0x11fcc5(0xd1)]={'$in':_0x4da652[_0x11fcc5(0xd1)]}:_0x57fe38[_0x11fcc5(0xd1)]=_0x4461ed[_0x11fcc5(0xd1)];});};