flexbiz-server 12.4.21 → 12.4.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1068) hide show
  1. package/package.json +2 -1
  2. package/server/app.js +1 -22
  3. package/server/auths/bearer.js +1 -3
  4. package/server/auths/facebook.js +1 -12
  5. package/server/auths/google.js +1 -13
  6. package/server/auths/local.js +1 -64
  7. package/server/cluster.js +1 -27
  8. package/server/controllers/controller.js +1 -107
  9. package/server/controllers/controllerRPT.js +1 -27
  10. package/server/controllers/controllerUtils.js +1 -76
  11. package/server/controllers/createHandler.js +1 -35
  12. package/server/controllers/createRouteHandler.js +1 -4
  13. package/server/controllers/deleteHandler.js +1 -11
  14. package/server/controllers/deleteManyHandler.js +1 -2
  15. package/server/controllers/exportHandler.js +1 -17
  16. package/server/controllers/findHandler.js +1 -53
  17. package/server/controllers/handlers.js +1 -3
  18. package/server/controllers/historyHandler.js +1 -5
  19. package/server/controllers/importFromExcelHandler.js +1 -14
  20. package/server/controllers/importFromGsHandler.js +1 -10
  21. package/server/controllers/importFromJsonHandler.js +1 -7
  22. package/server/controllers/importHandler.js +1 -21
  23. package/server/controllers/logHandler.js +1 -5
  24. package/server/controllers/rptCreateRouteHandler.js +1 -4
  25. package/server/controllers/rptExcelHandler.js +1 -32
  26. package/server/controllers/rptHandler.js +1 -13
  27. package/server/controllers/updateBookHandler.js +1 -10
  28. package/server/controllers/updateFieldHandler.js +1 -12
  29. package/server/controllers/updateHandler.js +1 -39
  30. package/server/controllers/updateKeyHandler.js +1 -14
  31. package/server/controllers/viewHandler.js +1 -13
  32. package/server/flow/FlowEngine.js +1 -64
  33. package/server/flow/WebhookManager.js +1 -26
  34. package/server/flow/handlers.js +1 -3
  35. package/server/flow/nodes/aiAnalysis.js +1 -9
  36. package/server/flow/nodes/customer.js +1 -15
  37. package/server/flow/nodes/data.js +1 -14
  38. package/server/flow/nodes/debug.js +1 -2
  39. package/server/flow/nodes/delay.js +1 -3
  40. package/server/flow/nodes/email.js +1 -9
  41. package/server/flow/nodes/event.js +1 -11
  42. package/server/flow/nodes/facebook.js +1 -3
  43. package/server/flow/nodes/facebookConversations.js +1 -5
  44. package/server/flow/nodes/facebookCreatePost.js +1 -10
  45. package/server/flow/nodes/facebookSendMessage.js +1 -12
  46. package/server/flow/nodes/forEachItem.js +1 -8
  47. package/server/flow/nodes/function.js +1 -4
  48. package/server/flow/nodes/httprequest.js +1 -7
  49. package/server/flow/nodes/inject.js +1 -12
  50. package/server/flow/nodes/pushNotification.js +1 -5
  51. package/server/flow/nodes/report.js +1 -6
  52. package/server/flow/nodes/saveData.js +1 -2
  53. package/server/flow/nodes/switch.js +1 -20
  54. package/server/flow/nodes/webhook.js +1 -1
  55. package/server/flow/nodes/zaloSendMessage.js +1 -4
  56. package/server/flow/utils.js +1 -2
  57. package/server/global.js +1 -23
  58. package/server/libs/BlockchainTransactionPool.js +1 -3
  59. package/server/libs/WorkerPool.js +1 -4
  60. package/server/libs/WorkerStaticPool.js +1 -16
  61. package/server/libs/WorkerStaticPool_v1.js +1 -5
  62. package/server/libs/assbonus.js +1 -7
  63. package/server/libs/backup.js +1 -2
  64. package/server/libs/blockchainconnect.js +1 -12
  65. package/server/libs/cdpsdiem.js +1 -5
  66. package/server/libs/cdpsdt.js +1 -7
  67. package/server/libs/cdpskh.js +1 -9
  68. package/server/libs/cdpsnphep.js +1 -6
  69. package/server/libs/cdpstk.js +1 -11
  70. package/server/libs/ckcn.js +1 -12
  71. package/server/libs/ckdiem.js +1 -5
  72. package/server/libs/ckdt.js +1 -6
  73. package/server/libs/cknphep.js +1 -6
  74. package/server/libs/cktk.js +1 -4
  75. package/server/libs/cktt.js +1 -9
  76. package/server/libs/ckvt.js +1 -12
  77. package/server/libs/ckvtcapphat.js +1 -6
  78. package/server/libs/ckvtnpp.js +1 -8
  79. package/server/libs/ckvttt.js +1 -11
  80. package/server/libs/createSocaitheongay.js +1 -9
  81. package/server/libs/ctdiem.js +1 -5
  82. package/server/libs/ctvt.js +1 -7
  83. package/server/libs/ctvtnpp.js +1 -7
  84. package/server/libs/ctvttt.js +1 -7
  85. package/server/libs/databanle.js +1 -17
  86. package/server/libs/databanlenpp.js +1 -8
  87. package/server/libs/databanletheongay.js +1 -27
  88. package/server/libs/dkcn.js +1 -10
  89. package/server/libs/dkdiem.js +1 -5
  90. package/server/libs/dkdt.js +1 -6
  91. package/server/libs/dknphep.js +1 -7
  92. package/server/libs/dktk.js +1 -4
  93. package/server/libs/dktt.js +1 -8
  94. package/server/libs/dkvt.js +1 -9
  95. package/server/libs/dkvtnpp.js +1 -7
  96. package/server/libs/dkvttt.js +1 -7
  97. package/server/libs/dncn.js +1 -6
  98. package/server/libs/dntk.js +1 -4
  99. package/server/libs/dntt.js +1 -6
  100. package/server/libs/docs.js +1 -452
  101. package/server/libs/dstkcn.js +1 -1
  102. package/server/libs/dstktt.js +1 -1
  103. package/server/libs/dtbanletheonpp.js +1 -17
  104. package/server/libs/dtbanletheosp.js +1 -15
  105. package/server/libs/dtbanletheospnpp.js +1 -15
  106. package/server/libs/email.js +1 -3
  107. package/server/libs/excel.js +1 -2
  108. package/server/libs/getGiaban.js +1 -67
  109. package/server/libs/getGiabanAsync.js +1 -1
  110. package/server/libs/getNotifies.js +1 -1
  111. package/server/libs/htmlReport.js +1 -9
  112. package/server/libs/initDatabase.js +1 -9
  113. package/server/libs/invoiceEasy.js +1 -109
  114. package/server/libs/invoiceViettel.js +1 -29
  115. package/server/libs/invoiceVnpt.js +1 -22
  116. package/server/libs/kpistatus.js +1 -32
  117. package/server/libs/load-template.js +1 -3
  118. package/server/libs/mailmanagement.js +1 -13
  119. package/server/libs/mongooseDeletePost.js +1 -6
  120. package/server/libs/mongooseLeanId.js +1 -1
  121. package/server/libs/mongoosePatch.js +1 -8
  122. package/server/libs/onepay-payment.js +1 -4
  123. package/server/libs/optimizeBookkeeping.js +1 -14
  124. package/server/libs/parse-template.js +1 -5
  125. package/server/libs/permission.js +1 -51
  126. package/server/libs/phanbokh.js +1 -3
  127. package/server/libs/post-book.js +1 -23
  128. package/server/libs/post-socai.js +1 -25
  129. package/server/libs/post-sokho.js +1 -27
  130. package/server/libs/prototypes.js +1 -29
  131. package/server/libs/psdt.js +1 -1
  132. package/server/libs/pskh.js +1 -1
  133. package/server/libs/pstk.js +1 -1
  134. package/server/libs/redis-cache.js +1 -17
  135. package/server/libs/restore.js +1 -1
  136. package/server/libs/schedule.js +1 -18
  137. package/server/libs/sessionContext.js +2 -14
  138. package/server/libs/textReport.js +1 -3
  139. package/server/libs/thnxt.js +1 -9
  140. package/server/libs/thnxtnpp.js +1 -9
  141. package/server/libs/thnxttt.js +1 -8
  142. package/server/libs/tinhGt.js +1 -7
  143. package/server/libs/tinhGtCapnhatPNK.js +1 -7
  144. package/server/libs/tinhGtPhanboHeSo.js +1 -12
  145. package/server/libs/tinhGtPhanboSltp.js +1 -10
  146. package/server/libs/tinhGtPhanboYtcp.js +1 -11
  147. package/server/libs/tinhGtSltk.js +1 -9
  148. package/server/libs/tinhGtThcppstk.js +1 -10
  149. package/server/libs/tinhGtTrucTiep.js +1 -7
  150. package/server/libs/tinhGtXoa.js +1 -3
  151. package/server/libs/tinhgiatb.js +1 -38
  152. package/server/libs/tinhgiatb1vt.js +1 -5
  153. package/server/libs/tinhhoahong.js +1 -64
  154. package/server/libs/tinhhoahongnpp.js +1 -46
  155. package/server/libs/tinhkhauhao1ts.js +1 -12
  156. package/server/libs/tinhkhauhaots.js +1 -8
  157. package/server/libs/tuoinophaithu.js +1 -10
  158. package/server/libs/tuoinophaitra.js +1 -11
  159. package/server/libs/utils.js +1 -78
  160. package/server/libs/validate.js +1 -4
  161. package/server/libs/validator-acc-cust.js +1 -1
  162. package/server/libs/validator-account.js +1 -4
  163. package/server/libs/validator-vt.js +1 -2
  164. package/server/libs/validator.js +1 -11
  165. package/server/libs/vsocai.js +1 -8
  166. package/server/models/account.js +1 -7
  167. package/server/models/afflink.js +1 -2
  168. package/server/models/app.js +1 -15
  169. package/server/models/approve.js +1 -93
  170. package/server/models/assabcihandler.js +1 -35
  171. package/server/models/assbank.js +1 -19
  172. package/server/models/assbooking.js +1 -4
  173. package/server/models/assbuy.js +1 -3
  174. package/server/models/asscashwithdraw.js +1 -4
  175. package/server/models/assfindhash.js +1 -2
  176. package/server/models/assinvestment.js +1 -13
  177. package/server/models/assissue.js +1 -2
  178. package/server/models/asskey.js +1 -15
  179. package/server/models/assneedtobuy.js +1 -6
  180. package/server/models/assperiod.js +1 -7
  181. package/server/models/assproduct.js +1 -13
  182. package/server/models/assprofitsharing.js +1 -4
  183. package/server/models/assreceiver.js +1 -2
  184. package/server/models/assrequest.js +1 -11
  185. package/server/models/asssell.js +1 -7
  186. package/server/models/asstransaction.js +1 -3
  187. package/server/models/asstransfer.js +1 -4
  188. package/server/models/assuser_identity.js +1 -4
  189. package/server/models/asswithdraw.js +1 -4
  190. package/server/models/attend.js +1 -2
  191. package/server/models/banggiaban.js +1 -8
  192. package/server/models/bangtinhluong.js +1 -6
  193. package/server/models/base.js +1 -1
  194. package/server/models/bds_area.js +1 -4
  195. package/server/models/bds_block.js +1 -3
  196. package/server/models/bds_building.js +1 -4
  197. package/server/models/bds_floor.js +1 -3
  198. package/server/models/bds_floordetail.js +1 -9
  199. package/server/models/bds_nhadat.js +1 -11
  200. package/server/models/bds_nhomnhadat.js +1 -4
  201. package/server/models/bds_phanloainhadat.js +1 -3
  202. package/server/models/bg1.js +1 -9
  203. package/server/models/bg2.js +1 -10
  204. package/server/models/cache.js +1 -3
  205. package/server/models/calllog.js +1 -4
  206. package/server/models/campaign.js +1 -6
  207. package/server/models/cart.js +1 -5
  208. package/server/models/cddiem.js +1 -2
  209. package/server/models/cddt.js +1 -3
  210. package/server/models/cdkh.js +1 -5
  211. package/server/models/cdkhtheongay.js +1 -5
  212. package/server/models/cdnphep.js +1 -2
  213. package/server/models/cdtk.js +1 -3
  214. package/server/models/cdtktheongay.js +1 -3
  215. package/server/models/cdvt.js +1 -5
  216. package/server/models/cdvtnpp.js +1 -6
  217. package/server/models/cdvttheongay.js +1 -5
  218. package/server/models/chamcong.js +1 -7
  219. package/server/models/checkin.js +1 -4
  220. package/server/models/checkinactivity.js +1 -3
  221. package/server/models/checkinkpi.js +1 -4
  222. package/server/models/checkinlocation.js +1 -2
  223. package/server/models/chitieukpi.js +1 -3
  224. package/server/models/chudethaoluan.js +1 -3
  225. package/server/models/ckgtluong.js +1 -2
  226. package/server/models/colleague.js +1 -2
  227. package/server/models/comment.js +1 -4
  228. package/server/models/congdoansx.js +1 -4
  229. package/server/models/congtacvien.js +1 -4
  230. package/server/models/congthuctinhgiaban.js +1 -8
  231. package/server/models/consultant.js +1 -4
  232. package/server/models/contract.js +1 -6
  233. package/server/models/counter.js +1 -2
  234. package/server/models/ctds.js +1 -5
  235. package/server/models/ctds2.js +1 -6
  236. package/server/models/currency.js +1 -3
  237. package/server/models/customer.js +1 -31
  238. package/server/models/databanle.js +1 -8
  239. package/server/models/datlich.js +1 -4
  240. package/server/models/department.js +1 -4
  241. package/server/models/dh2.js +1 -20
  242. package/server/models/diagram.js +1 -2
  243. package/server/models/dinhmucsx.js +1 -8
  244. package/server/models/dkhoc.js +1 -6
  245. package/server/models/dknphep.js +1 -2
  246. package/server/models/dmban.js +1 -4
  247. package/server/models/dmbp.js +1 -12
  248. package/server/models/dmca.js +1 -2
  249. package/server/models/dmchietkhau.js +1 -9
  250. package/server/models/dmchietkhauhd.js +1 -20
  251. package/server/models/dmcpmh.js +1 -2
  252. package/server/models/dmdiemthuong.js +1 -5
  253. package/server/models/dmdoi.js +1 -4
  254. package/server/models/dmdoituongdanhgia.js +1 -2
  255. package/server/models/dmdt.js +1 -8
  256. package/server/models/dmdvt.js +1 -3
  257. package/server/models/dmgiaban.js +1 -9
  258. package/server/models/dmgiamua.js +1 -5
  259. package/server/models/dmgiathitruong.js +1 -5
  260. package/server/models/dmgiathitruong_ngay.js +1 -2
  261. package/server/models/dmgiathitruong_theodoi.js +1 -2
  262. package/server/models/dmhoahonghd.js +1 -9
  263. package/server/models/dmhoahongnpp.js +1 -9
  264. package/server/models/dmkc.js +1 -3
  265. package/server/models/dmkho.js +1 -6
  266. package/server/models/dmkhuyenmai.js +1 -9
  267. package/server/models/dmkhuyenmaihd.js +1 -11
  268. package/server/models/dmletet.js +1 -2
  269. package/server/models/dmlo.js +1 -4
  270. package/server/models/dmloaicong.js +1 -4
  271. package/server/models/dmloaitask.js +1 -2
  272. package/server/models/dmloaits.js +1 -2
  273. package/server/models/dmnckkm.js +1 -4
  274. package/server/models/dmnghiepvu.js +1 -4
  275. package/server/models/dmnguonvon.js +1 -2
  276. package/server/models/dmnhnv.js +1 -4
  277. package/server/models/dmnv.js +1 -17
  278. package/server/models/dmnvt.js +1 -9
  279. package/server/models/dmphatdichvu.js +1 -5
  280. package/server/models/dmphi.js +1 -3
  281. package/server/models/dmqct.js +1 -3
  282. package/server/models/dmqddvt.js +1 -3
  283. package/server/models/dmtanggiamts.js +1 -3
  284. package/server/models/dmto.js +1 -4
  285. package/server/models/dmtt.js +1 -6
  286. package/server/models/dmvt.js +1 -17
  287. package/server/models/dmyt.js +1 -4
  288. package/server/models/dn0.js +1 -13
  289. package/server/models/dnm.js +1 -11
  290. package/server/models/dokho.js +1 -2
  291. package/server/models/domain.js +1 -2
  292. package/server/models/dvcs.js +1 -3
  293. package/server/models/ecomcategories.js +1 -3
  294. package/server/models/ecomcategories_cty.js +1 -3
  295. package/server/models/ecomproductlines.js +1 -2
  296. package/server/models/ecompromotion_flashsales.js +1 -2
  297. package/server/models/ecompromotion_freeships.js +1 -2
  298. package/server/models/email.js +1 -2
  299. package/server/models/endpoint.js +1 -1
  300. package/server/models/events.js +1 -3
  301. package/server/models/evoucher.js +1 -5
  302. package/server/models/experiencejourney.js +1 -2
  303. package/server/models/experiencejourneydata.js +1 -4
  304. package/server/models/experiencejourneypersona.js +1 -3
  305. package/server/models/experiencejourneystage.js +1 -2
  306. package/server/models/exportexceltemplate.js +1 -2
  307. package/server/models/fbconversation.js +1 -15
  308. package/server/models/fbmessage.js +1 -2
  309. package/server/models/fbpage.js +1 -2
  310. package/server/models/fbpost.js +1 -2
  311. package/server/models/fieldright.js +1 -2
  312. package/server/models/file.js +1 -4
  313. package/server/models/financialroadmap.js +1 -3
  314. package/server/models/flow.js +1 -2
  315. package/server/models/flowdata.js +1 -3
  316. package/server/models/folder.js +1 -4
  317. package/server/models/follow.js +1 -2
  318. package/server/models/form.js +1 -3
  319. package/server/models/forminfo.js +1 -5
  320. package/server/models/formvalue.js +1 -3
  321. package/server/models/giaoca.js +1 -4
  322. package/server/models/giatb.js +1 -3
  323. package/server/models/group.js +1 -11
  324. package/server/models/gt_ctgt.js +1 -4
  325. package/server/models/gt_hspb.js +1 -3
  326. package/server/models/gt_sltk.js +1 -3
  327. package/server/models/gt_thcppstk.js +1 -3
  328. package/server/models/hanmucton.js +1 -4
  329. package/server/models/hd1.js +1 -11
  330. package/server/models/hd2.js +1 -27
  331. package/server/models/hd3.js +1 -18
  332. package/server/models/hd4.js +1 -13
  333. package/server/models/hd7.js +1 -17
  334. package/server/models/hd8.js +1 -12
  335. package/server/models/hde.js +1 -11
  336. package/server/models/hlink.js +1 -2
  337. package/server/models/hlinkvalue.js +1 -2
  338. package/server/models/hmcn.js +1 -3
  339. package/server/models/hmcnct.js +1 -2
  340. package/server/models/hspbts.js +1 -4
  341. package/server/models/htl.js +1 -13
  342. package/server/models/importexceltemplate.js +1 -2
  343. package/server/models/introducebonus.js +1 -4
  344. package/server/models/introducecode.js +1 -3
  345. package/server/models/introducer.js +1 -4
  346. package/server/models/kbbtpb.js +1 -7
  347. package/server/models/kbmPttct.js +1 -4
  348. package/server/models/kbmTkgtgt.js +1 -5
  349. package/server/models/kbm_bcdkt.js +1 -4
  350. package/server/models/kbm_kqhdkd.js +1 -3
  351. package/server/models/kbm_lcttgt.js +1 -5
  352. package/server/models/kbm_lctttt.js +1 -4
  353. package/server/models/kbm_pttct.js +1 -4
  354. package/server/models/kbm_tkgtgt.js +1 -5
  355. package/server/models/kbmbcdkt.js +1 -4
  356. package/server/models/kbmbcqt.js +1 -4
  357. package/server/models/kbmkqhdkd.js +1 -3
  358. package/server/models/kbmlcttgt.js +1 -6
  359. package/server/models/kbmlctttt.js +1 -4
  360. package/server/models/kbmtmbctc.js +1 -4
  361. package/server/models/kehoachdtcp.js +1 -3
  362. package/server/models/kehoachmh.js +1 -8
  363. package/server/models/keyresult.js +1 -7
  364. package/server/models/khunghangthanhvien.js +1 -3
  365. package/server/models/label.js +1 -2
  366. package/server/models/labelinfo.js +1 -2
  367. package/server/models/lenhcapphat.js +1 -8
  368. package/server/models/lenhsx.js +1 -8
  369. package/server/models/lienhe.js +1 -4
  370. package/server/models/like_module.js +1 -2
  371. package/server/models/link.js +1 -2
  372. package/server/models/loaidiem.js +1 -2
  373. package/server/models/lock.js +1 -2
  374. package/server/models/log.js +1 -5
  375. package/server/models/mailaccount.js +1 -3
  376. package/server/models/mailgroup.js +1 -3
  377. package/server/models/mailreceived.js +1 -2
  378. package/server/models/mailschedule.js +1 -2
  379. package/server/models/mailsent.js +1 -2
  380. package/server/models/mailtemplate.js +1 -2
  381. package/server/models/maudanhgia.js +1 -2
  382. package/server/models/menuinfo.js +1 -2
  383. package/server/models/message.js +1 -8
  384. package/server/models/message2.js +1 -4
  385. package/server/models/message2setting.js +1 -3
  386. package/server/models/moduleinfo.js +1 -4
  387. package/server/models/momo.js +1 -17
  388. package/server/models/news.js +1 -3
  389. package/server/models/newsfeed.js +1 -4
  390. package/server/models/note.js +1 -2
  391. package/server/models/notification.js +1 -7
  392. package/server/models/okr.js +1 -4
  393. package/server/models/okrdiagram.js +1 -3
  394. package/server/models/onepay.js +1 -24
  395. package/server/models/opportunity.js +1 -4
  396. package/server/models/options.js +1 -2
  397. package/server/models/originimportid.js +1 -1
  398. package/server/models/otp.js +1 -1
  399. package/server/models/parameter.js +1 -2
  400. package/server/models/participant.js +1 -20
  401. package/server/models/partner.js +1 -1
  402. package/server/models/payload.js +1 -1
  403. package/server/models/pbl.js +1 -16
  404. package/server/models/pc0.js +1 -13
  405. package/server/models/pc1.js +1 -14
  406. package/server/models/pc2.js +1 -13
  407. package/server/models/pc3.js +1 -13
  408. package/server/models/pc5.js +1 -8
  409. package/server/models/pc6.js +1 -14
  410. package/server/models/pcl.js +1 -6
  411. package/server/models/pdn.js +1 -9
  412. package/server/models/pdx.js +1 -9
  413. package/server/models/pgh.js +1 -5
  414. package/server/models/phieudanhgia.js +1 -3
  415. package/server/models/pht.js +1 -8
  416. package/server/models/phucap.js +1 -4
  417. package/server/models/pkc.js +1 -6
  418. package/server/models/pkh.js +1 -6
  419. package/server/models/pkk.js +1 -10
  420. package/server/models/pkt.js +1 -12
  421. package/server/models/pn1.js +1 -17
  422. package/server/models/pn2.js +1 -11
  423. package/server/models/pn3.js +1 -13
  424. package/server/models/pn5.js +1 -14
  425. package/server/models/pn6.js +1 -14
  426. package/server/models/pn9.js +1 -17
  427. package/server/models/pnc.js +1 -10
  428. package/server/models/pnh.js +1 -12
  429. package/server/models/pnk.js +1 -10
  430. package/server/models/po1.js +1 -19
  431. package/server/models/ppb.js +1 -6
  432. package/server/models/profile.js +1 -4
  433. package/server/models/pt1.js +1 -12
  434. package/server/models/pt5.js +1 -8
  435. package/server/models/ptl.js +1 -6
  436. package/server/models/ptthanhtoan.js +1 -6
  437. package/server/models/purchase_contract.js +1 -17
  438. package/server/models/pxc.js +1 -9
  439. package/server/models/pxh.js +1 -12
  440. package/server/models/pxk.js +1 -10
  441. package/server/models/qts.js +1 -14
  442. package/server/models/qts_dieuchinh.js +1 -3
  443. package/server/models/qts_dieuchuyen.js +1 -4
  444. package/server/models/quanhuyen.js +1 -2
  445. package/server/models/reason.js +1 -2
  446. package/server/models/receivedinvoice.js +1 -2
  447. package/server/models/reportinfo.js +1 -5
  448. package/server/models/right.js +1 -4
  449. package/server/models/rpt.js +1 -2
  450. package/server/models/rptform.js +1 -5
  451. package/server/models/rptobject.js +1 -2
  452. package/server/models/sale_contract.js +1 -9
  453. package/server/models/schedule.js +1 -16
  454. package/server/models/schedule_log.js +1 -2
  455. package/server/models/service.js +1 -4
  456. package/server/models/shipbook.js +1 -12
  457. package/server/models/shortcut.js +1 -2
  458. package/server/models/smsaccount.js +1 -10
  459. package/server/models/smssend.js +1 -2
  460. package/server/models/so1.js +1 -22
  461. package/server/models/so2.js +1 -10
  462. package/server/models/so3.js +1 -9
  463. package/server/models/so5.js +1 -15
  464. package/server/models/so9.js +1 -19
  465. package/server/models/socai.js +1 -26
  466. package/server/models/socainpp.js +1 -18
  467. package/server/models/socaitc.js +1 -6
  468. package/server/models/socaitmp.js +1 -16
  469. package/server/models/socaitt.js +1 -4
  470. package/server/models/sodiemthuong.js +1 -4
  471. package/server/models/sokho.js +1 -28
  472. package/server/models/sokhocapphat.js +1 -18
  473. package/server/models/sokhokhongton.js +1 -19
  474. package/server/models/sokhonpp.js +1 -19
  475. package/server/models/sokhotc.js +1 -8
  476. package/server/models/sokhott.js +1 -18
  477. package/server/models/sophanbokh.js +1 -3
  478. package/server/models/sosanxuat.js +1 -5
  479. package/server/models/sotinhkh.js +1 -2
  480. package/server/models/spdd_ck.js +1 -3
  481. package/server/models/spdd_dk.js +1 -3
  482. package/server/models/step.js +1 -2
  483. package/server/models/strategicdiagram.js +1 -3
  484. package/server/models/strategicgoal.js +1 -4
  485. package/server/models/strategickpi.js +1 -6
  486. package/server/models/strategicobjective.js +1 -5
  487. package/server/models/strategicplan.js +1 -5
  488. package/server/models/subscribe.js +1 -2
  489. package/server/models/support.js +1 -2
  490. package/server/models/synctime.js +1 -2
  491. package/server/models/sysconfig.js +1 -2
  492. package/server/models/sysgroup.js +1 -2
  493. package/server/models/tableinfo.js +1 -3
  494. package/server/models/task.js +1 -9
  495. package/server/models/taskreg.js +1 -4
  496. package/server/models/tc.js +1 -2
  497. package/server/models/tdttco.js +1 -8
  498. package/server/models/tdttco_tt.js +1 -5
  499. package/server/models/tdttno.js +1 -8
  500. package/server/models/tdttno_tt.js +1 -5
  501. package/server/models/templaterpt.js +1 -2
  502. package/server/models/templatestore.js +1 -3
  503. package/server/models/templatevoucher.js +1 -3
  504. package/server/models/tinhthanh.js +1 -2
  505. package/server/models/tokens.js +1 -2
  506. package/server/models/tontucthoi.js +1 -9
  507. package/server/models/trangthai.js +1 -4
  508. package/server/models/trangthaiapp.js +1 -4
  509. package/server/models/transaction.js +1 -16
  510. package/server/models/trialinfo.js +1 -2
  511. package/server/models/user.js +1 -38
  512. package/server/models/usergroup.js +1 -7
  513. package/server/models/vanchuyen.js +1 -12
  514. package/server/models/vat.js +1 -3
  515. package/server/models/vatra.js +1 -6
  516. package/server/models/vatvao.js +1 -6
  517. package/server/models/versioninfo.js +1 -2
  518. package/server/models/vietqrbanks.js +1 -2
  519. package/server/models/vsocai.js +1 -6
  520. package/server/models/waitevent.js +1 -2
  521. package/server/models/wallet.js +1 -8
  522. package/server/models/warranty.js +1 -3
  523. package/server/models/warrantyclaim.js +1 -2
  524. package/server/models/warrantypolicy.js +1 -1
  525. package/server/models/xaphuong.js +1 -2
  526. package/server/models/xhd.js +1 -10
  527. package/server/models/ytdd_ck.js +1 -4
  528. package/server/models/ytdd_dk.js +1 -4
  529. package/server/models/zalo.js +1 -17
  530. package/server/modules/lists/bg-cddiem.js +1 -6
  531. package/server/modules/lists/bg-cddt.js +1 -7
  532. package/server/modules/lists/bg-cdkh.js +1 -11
  533. package/server/modules/lists/bg-cdnphep.js +1 -6
  534. package/server/modules/lists/bg-cdtk.js +1 -9
  535. package/server/modules/lists/bg-cdvt.js +1 -8
  536. package/server/modules/lists/bg-cdvtnpp.js +1 -8
  537. package/server/modules/lists/ls-account.js +1 -4
  538. package/server/modules/lists/ls-afflink.js +1 -3
  539. package/server/modules/lists/ls-approve.js +1 -4
  540. package/server/modules/lists/ls-assabcihandler.js +1 -3
  541. package/server/modules/lists/ls-assbank.js +1 -3
  542. package/server/modules/lists/ls-assbooking.js +1 -20
  543. package/server/modules/lists/ls-assbuy.js +1 -8
  544. package/server/modules/lists/ls-asscashwithdraw.js +1 -8
  545. package/server/modules/lists/ls-assinvestment.js +1 -31
  546. package/server/modules/lists/ls-assissue.js +1 -3
  547. package/server/modules/lists/ls-asskey.js +1 -41
  548. package/server/modules/lists/ls-assneedtobuy.js +1 -10
  549. package/server/modules/lists/ls-assperiod.js +1 -19
  550. package/server/modules/lists/ls-assproduct.js +1 -9
  551. package/server/modules/lists/ls-assprofitsharing.js +1 -8
  552. package/server/modules/lists/ls-assreceiver.js +1 -3
  553. package/server/modules/lists/ls-assrequest.js +1 -4
  554. package/server/modules/lists/ls-asssell.js +1 -13
  555. package/server/modules/lists/ls-asstransaction.js +1 -3
  556. package/server/modules/lists/ls-asstransfer.js +1 -3
  557. package/server/modules/lists/ls-assuser_identity.js +1 -1
  558. package/server/modules/lists/ls-asswithdraw.js +1 -12
  559. package/server/modules/lists/ls-bangtinhluong.js +1 -2
  560. package/server/modules/lists/ls-bds_area.js +1 -3
  561. package/server/modules/lists/ls-bds_block.js +1 -1
  562. package/server/modules/lists/ls-bds_building.js +1 -3
  563. package/server/modules/lists/ls-bds_dmnhbds.js +1 -6
  564. package/server/modules/lists/ls-bds_floor.js +1 -2
  565. package/server/modules/lists/ls-bds_floordetail.js +1 -19
  566. package/server/modules/lists/ls-bds_nhadat.js +1 -16
  567. package/server/modules/lists/ls-bds_nhomnhadat.js +1 -1
  568. package/server/modules/lists/ls-bds_phanloainhadat.js +1 -1
  569. package/server/modules/lists/ls-calllog.js +1 -4
  570. package/server/modules/lists/ls-campaign.js +1 -1
  571. package/server/modules/lists/ls-cart.js +1 -14
  572. package/server/modules/lists/ls-chamcong.js +1 -3
  573. package/server/modules/lists/ls-checkin.js +1 -12
  574. package/server/modules/lists/ls-checkinactivity.js +1 -8
  575. package/server/modules/lists/ls-checkinkpi.js +1 -3
  576. package/server/modules/lists/ls-checkinlocation.js +1 -1
  577. package/server/modules/lists/ls-chitieukpi.js +1 -1
  578. package/server/modules/lists/ls-chudethaoluan.js +1 -1
  579. package/server/modules/lists/ls-ckgtluong.js +1 -1
  580. package/server/modules/lists/ls-comment.js +1 -9
  581. package/server/modules/lists/ls-congdoansx.js +1 -3
  582. package/server/modules/lists/ls-congtacvien.js +1 -5
  583. package/server/modules/lists/ls-consultant.js +1 -2
  584. package/server/modules/lists/ls-contract.js +1 -7
  585. package/server/modules/lists/ls-ctds.js +1 -4
  586. package/server/modules/lists/ls-ctds2.js +1 -4
  587. package/server/modules/lists/ls-currency.js +1 -1
  588. package/server/modules/lists/ls-customer.js +1 -21
  589. package/server/modules/lists/ls-datlich.js +1 -9
  590. package/server/modules/lists/ls-dckhauhaots.js +1 -3
  591. package/server/modules/lists/ls-department.js +1 -3
  592. package/server/modules/lists/ls-diagram.js +1 -1
  593. package/server/modules/lists/ls-dkhoc.js +1 -6
  594. package/server/modules/lists/ls-dknphep.js +1 -1
  595. package/server/modules/lists/ls-dmban.js +1 -4
  596. package/server/modules/lists/ls-dmbp.js +1 -7
  597. package/server/modules/lists/ls-dmca.js +1 -1
  598. package/server/modules/lists/ls-dmchietkhau.js +1 -19
  599. package/server/modules/lists/ls-dmchietkhauhd.js +1 -4
  600. package/server/modules/lists/ls-dmchucvu.js +1 -2
  601. package/server/modules/lists/ls-dmcpmh.js +1 -1
  602. package/server/modules/lists/ls-dmdiemthuong.js +1 -4
  603. package/server/modules/lists/ls-dmdoi.js +1 -4
  604. package/server/modules/lists/ls-dmdoituongdanhgia.js +1 -1
  605. package/server/modules/lists/ls-dmdt.js +1 -11
  606. package/server/modules/lists/ls-dmdvt.js +1 -2
  607. package/server/modules/lists/ls-dmgiaban.js +1 -4
  608. package/server/modules/lists/ls-dmgiamua.js +1 -4
  609. package/server/modules/lists/ls-dmgiathitruong.js +1 -15
  610. package/server/modules/lists/ls-dmgiathitruong_ngay.js +1 -2
  611. package/server/modules/lists/ls-dmgiathitruong_theodoi.js +1 -1
  612. package/server/modules/lists/ls-dmhoahonghd.js +1 -1
  613. package/server/modules/lists/ls-dmhoahongnpp.js +1 -1
  614. package/server/modules/lists/ls-dmkc.js +1 -3
  615. package/server/modules/lists/ls-dmkho.js +1 -1
  616. package/server/modules/lists/ls-dmkhuyenmai.js +1 -5
  617. package/server/modules/lists/ls-dmkhuyenmaihd.js +1 -3
  618. package/server/modules/lists/ls-dmletet.js +1 -1
  619. package/server/modules/lists/ls-dmlo.js +1 -1
  620. package/server/modules/lists/ls-dmloaicong.js +1 -1
  621. package/server/modules/lists/ls-dmloaits.js +1 -1
  622. package/server/modules/lists/ls-dmnckkm.js +1 -7
  623. package/server/modules/lists/ls-dmnghiepvu.js +1 -1
  624. package/server/modules/lists/ls-dmnguonvon.js +1 -1
  625. package/server/modules/lists/ls-dmnhnv.js +1 -6
  626. package/server/modules/lists/ls-dmnhtask.js +1 -5
  627. package/server/modules/lists/ls-dmnkh.js +1 -6
  628. package/server/modules/lists/ls-dmntt.js +1 -6
  629. package/server/modules/lists/ls-dmnv.js +1 -17
  630. package/server/modules/lists/ls-dmnvt.js +1 -8
  631. package/server/modules/lists/ls-dmphatdichvu.js +1 -3
  632. package/server/modules/lists/ls-dmphi.js +1 -6
  633. package/server/modules/lists/ls-dmqct.js +1 -2
  634. package/server/modules/lists/ls-dmqddvt.js +1 -3
  635. package/server/modules/lists/ls-dmtanggiamts.js +1 -1
  636. package/server/modules/lists/ls-dmto.js +1 -5
  637. package/server/modules/lists/ls-dmtt.js +1 -7
  638. package/server/modules/lists/ls-dmvt.js +1 -68
  639. package/server/modules/lists/ls-dmyt.js +1 -1
  640. package/server/modules/lists/ls-dokho.js +1 -1
  641. package/server/modules/lists/ls-dvcs.js +1 -1
  642. package/server/modules/lists/ls-ecomcategories.js +1 -5
  643. package/server/modules/lists/ls-ecomcategories_cty.js +1 -5
  644. package/server/modules/lists/ls-email.js +1 -4
  645. package/server/modules/lists/ls-events.js +1 -3
  646. package/server/modules/lists/ls-evoucher.js +1 -3
  647. package/server/modules/lists/ls-experiencejourney.js +1 -1
  648. package/server/modules/lists/ls-experiencejourneydata.js +1 -3
  649. package/server/modules/lists/ls-experiencejourneypersona.js +1 -4
  650. package/server/modules/lists/ls-experiencejourneystage.js +1 -1
  651. package/server/modules/lists/ls-fbconversation.js +1 -2
  652. package/server/modules/lists/ls-fbmessage.js +1 -2
  653. package/server/modules/lists/ls-fbpage.js +1 -11
  654. package/server/modules/lists/ls-fbpost.js +1 -2
  655. package/server/modules/lists/ls-file.js +1 -31
  656. package/server/modules/lists/ls-financialroadmap.js +1 -3
  657. package/server/modules/lists/ls-flow.js +1 -6
  658. package/server/modules/lists/ls-flowdata.js +1 -1
  659. package/server/modules/lists/ls-folder.js +1 -1
  660. package/server/modules/lists/ls-form.js +1 -1
  661. package/server/modules/lists/ls-forminfo.js +1 -1
  662. package/server/modules/lists/ls-formvalue.js +1 -1
  663. package/server/modules/lists/ls-giaoca.js +1 -4
  664. package/server/modules/lists/ls-group.js +1 -5
  665. package/server/modules/lists/ls-hlink.js +1 -1
  666. package/server/modules/lists/ls-hlinkvalue.js +1 -1
  667. package/server/modules/lists/ls-hmcn.js +1 -2
  668. package/server/modules/lists/ls-hspbts.js +1 -3
  669. package/server/modules/lists/ls-introducebonus.js +1 -4
  670. package/server/modules/lists/ls-introducecode.js +1 -10
  671. package/server/modules/lists/ls-introducer.js +1 -20
  672. package/server/modules/lists/ls-kbm-bcdkt.js +1 -1
  673. package/server/modules/lists/ls-kbm-bcqt.js +1 -5
  674. package/server/modules/lists/ls-kbm-kqhdkd.js +1 -1
  675. package/server/modules/lists/ls-kbm-lcttgt.js +1 -1
  676. package/server/modules/lists/ls-kbm-lctttt.js +1 -1
  677. package/server/modules/lists/ls-kbm-pttct.js +1 -3
  678. package/server/modules/lists/ls-kbm-tkgtgt.js +1 -3
  679. package/server/modules/lists/ls-kbm-tmbctc.js +1 -3
  680. package/server/modules/lists/ls-kehoachdtcp.js +1 -4
  681. package/server/modules/lists/ls-keyresult.js +1 -7
  682. package/server/modules/lists/ls-khunghangthanhvien.js +1 -1
  683. package/server/modules/lists/ls-kygui.js +1 -19
  684. package/server/modules/lists/ls-label.js +1 -1
  685. package/server/modules/lists/ls-lienhe.js +1 -4
  686. package/server/modules/lists/ls-like-module.js +1 -1
  687. package/server/modules/lists/ls-link.js +1 -1
  688. package/server/modules/lists/ls-loaidiem.js +1 -1
  689. package/server/modules/lists/ls-lock.js +1 -1
  690. package/server/modules/lists/ls-log.js +1 -3
  691. package/server/modules/lists/ls-mailaccount.js +1 -5
  692. package/server/modules/lists/ls-mailreceived.js +1 -5
  693. package/server/modules/lists/ls-mailschedule.js +1 -7
  694. package/server/modules/lists/ls-mailsent.js +1 -4
  695. package/server/modules/lists/ls-mailtemplate.js +1 -4
  696. package/server/modules/lists/ls-maudanhgia.js +1 -3
  697. package/server/modules/lists/ls-message2.js +1 -8
  698. package/server/modules/lists/ls-message2setting.js +1 -5
  699. package/server/modules/lists/ls-news.js +1 -7
  700. package/server/modules/lists/ls-newsfeed.js +1 -4
  701. package/server/modules/lists/ls-note.js +1 -6
  702. package/server/modules/lists/ls-okr.js +1 -5
  703. package/server/modules/lists/ls-okrdiagram.js +1 -1
  704. package/server/modules/lists/ls-opportunity.js +1 -5
  705. package/server/modules/lists/ls-options.js +1 -4
  706. package/server/modules/lists/ls-parameter.js +1 -3
  707. package/server/modules/lists/ls-participant.js +1 -10
  708. package/server/modules/lists/ls-phieudanhgia.js +1 -7
  709. package/server/modules/lists/ls-phucap.js +1 -2
  710. package/server/modules/lists/ls-profile.js +1 -1
  711. package/server/modules/lists/ls-ptthanhtoan.js +1 -3
  712. package/server/modules/lists/ls-qts-dieuchinh.js +1 -2
  713. package/server/modules/lists/ls-qts-dieuchuyen.js +1 -8
  714. package/server/modules/lists/ls-reason.js +1 -1
  715. package/server/modules/lists/ls-rpt.js +1 -5
  716. package/server/modules/lists/ls-rptform.js +1 -4
  717. package/server/modules/lists/ls-service.js +1 -3
  718. package/server/modules/lists/ls-shortcut.js +1 -1
  719. package/server/modules/lists/ls-smsaccount.js +1 -1
  720. package/server/modules/lists/ls-smssend.js +1 -3
  721. package/server/modules/lists/ls-sosanxuat.js +1 -4
  722. package/server/modules/lists/ls-step.js +1 -1
  723. package/server/modules/lists/ls-strategicdiagram.js +1 -1
  724. package/server/modules/lists/ls-strategicgoal.js +1 -3
  725. package/server/modules/lists/ls-strategickpi.js +1 -7
  726. package/server/modules/lists/ls-strategicobjective.js +1 -3
  727. package/server/modules/lists/ls-strategicplan.js +1 -6
  728. package/server/modules/lists/ls-support.js +1 -3
  729. package/server/modules/lists/ls-task.js +1 -34
  730. package/server/modules/lists/ls-taskreg.js +1 -2
  731. package/server/modules/lists/ls-tc.js +1 -1
  732. package/server/modules/lists/ls-templaterpt.js +1 -5
  733. package/server/modules/lists/ls-templatevoucher.js +1 -1
  734. package/server/modules/lists/ls-tontucthoi.js +1 -3
  735. package/server/modules/lists/ls-trangthaiapp.js +1 -3
  736. package/server/modules/lists/ls-transaction.js +1 -4
  737. package/server/modules/lists/ls-usergroup.js +1 -7
  738. package/server/modules/lists/ls-vat.js +1 -1
  739. package/server/modules/lists/ls-vatra.js +1 -5
  740. package/server/modules/lists/ls-vatvao.js +1 -6
  741. package/server/modules/lists/ls-waitevent.js +1 -1
  742. package/server/modules/lists/ls-warranty.js +1 -4
  743. package/server/modules/lists/ls_hanmucton.js +1 -3
  744. package/server/modules/lists/ls_hspb.js +1 -4
  745. package/server/modules/lists/ls_spdd_ck.js +1 -3
  746. package/server/modules/lists/ls_spdd_dk.js +1 -3
  747. package/server/modules/lists/ls_ytdd_ck.js +1 -4
  748. package/server/modules/lists/ls_ytdd_dk.js +1 -4
  749. package/server/modules/lists/sys-attend.js +1 -4
  750. package/server/modules/lists/sys-follow.js +1 -4
  751. package/server/modules/lists/sys-right.js +1 -2
  752. package/server/modules/public/app.js +1 -4
  753. package/server/modules/public/approve.js +1 -37
  754. package/server/modules/public/callin.js +1 -7
  755. package/server/modules/public/comment.js +1 -5
  756. package/server/modules/public/dmnvt.js +1 -4
  757. package/server/modules/public/dmvt.js +1 -9
  758. package/server/modules/public/file.js +1 -11
  759. package/server/modules/public/form.js +1 -7
  760. package/server/modules/public/forminfo.js +1 -1
  761. package/server/modules/public/group.js +1 -4
  762. package/server/modules/public/hlink.js +1 -3
  763. package/server/modules/public/introducecode.js +1 -1
  764. package/server/modules/public/listinfo.js +1 -1
  765. package/server/modules/public/media-webhook.js +1 -1
  766. package/server/modules/public/partner.js +1 -1
  767. package/server/modules/public/paymentCallback.js +1 -32
  768. package/server/modules/public/province.js +1 -1
  769. package/server/modules/public/ptthanhtoan.js +1 -4
  770. package/server/modules/public/subscribe.js +1 -30
  771. package/server/modules/public/support.js +1 -3
  772. package/server/modules/public/tableinfo.js +1 -1
  773. package/server/modules/public/trialinfo.js +1 -4
  774. package/server/modules/public/versioninfo.js +1 -1
  775. package/server/modules/reports/calc-tinhgiatb.js +1 -6
  776. package/server/modules/reports/calc-tinhgiathanh.js +1 -6
  777. package/server/modules/reports/calc-tinhkhauhaots.js +1 -3
  778. package/server/modules/reports/calc-tinhluong.js +1 -37
  779. package/server/modules/reports/rp-analyzedata.js +1 -6
  780. package/server/modules/reports/rp-assbonus.js +1 -4
  781. package/server/modules/reports/rp-assinterest.js +1 -8
  782. package/server/modules/reports/rp-assproductowners.js +1 -3
  783. package/server/modules/reports/rp-asssupply.js +1 -1
  784. package/server/modules/reports/rp-asstransferlog.js +1 -10
  785. package/server/modules/reports/rp-banggiatb.js +1 -3
  786. package/server/modules/reports/rp-bangtinhkhauhao.js +1 -6
  787. package/server/modules/reports/rp-baocaokhachhang.js +1 -6
  788. package/server/modules/reports/rp-bcdkt.js +1 -11
  789. package/server/modules/reports/rp-bcintroducebonus.js +1 -4
  790. package/server/modules/reports/rp-bckhtiemnang.js +1 -3
  791. package/server/modules/reports/rp-bcqt.js +1 -85
  792. package/server/modules/reports/rp-bkct.js +1 -13
  793. package/server/modules/reports/rp-bkshipbook.js +1 -8
  794. package/server/modules/reports/rp-bkvanchuyen.js +1 -8
  795. package/server/modules/reports/rp-bkvatra.js +1 -7
  796. package/server/modules/reports/rp-bkvatvao.js +1 -7
  797. package/server/modules/reports/rp-capnhatsocaitc.js +1 -4
  798. package/server/modules/reports/rp-cdpsdiem.js +1 -4
  799. package/server/modules/reports/rp-cdpsdt.js +1 -5
  800. package/server/modules/reports/rp-cdpskh.js +1 -7
  801. package/server/modules/reports/rp-cdpsnphep.js +1 -3
  802. package/server/modules/reports/rp-cdpstk.js +1 -4
  803. package/server/modules/reports/rp-chitietchitientheohoadon.js +1 -12
  804. package/server/modules/reports/rp-chitiettaisan.js +1 -13
  805. package/server/modules/reports/rp-chitietthutientheohoadon.js +1 -13
  806. package/server/modules/reports/rp-ckcn.js +1 -3
  807. package/server/modules/reports/rp-ckdiem.js +1 -2
  808. package/server/modules/reports/rp-cktk.js +1 -3
  809. package/server/modules/reports/rp-ckvt.js +1 -10
  810. package/server/modules/reports/rp-ckvttheokho.js +1 -4
  811. package/server/modules/reports/rp-ckvttheotg.js +1 -4
  812. package/server/modules/reports/rp-ckvttt.js +1 -3
  813. package/server/modules/reports/rp-congnophaithutheotuoino.js +1 -3
  814. package/server/modules/reports/rp-congnophaitratheotuoino.js +1 -3
  815. package/server/modules/reports/rp-congnosapthu.js +1 -4
  816. package/server/modules/reports/rp-congnosaptra.js +1 -4
  817. package/server/modules/reports/rp-congviectheobp.js +1 -9
  818. package/server/modules/reports/rp-congviectheodt.js +1 -8
  819. package/server/modules/reports/rp-congviectheokh.js +1 -8
  820. package/server/modules/reports/rp-congviectheonv.js +1 -9
  821. package/server/modules/reports/rp-congviectheotimeline.js +1 -6
  822. package/server/modules/reports/rp-ctbanle.js +1 -15
  823. package/server/modules/reports/rp-ctbanle2.js +1 -20
  824. package/server/modules/reports/rp-ctbanlectv.js +1 -20
  825. package/server/modules/reports/rp-ctbanlenpp.js +1 -24
  826. package/server/modules/reports/rp-ctdanhgianhanvien.js +1 -8
  827. package/server/modules/reports/rp-cthangbanbitralai.js +1 -4
  828. package/server/modules/reports/rp-ctmuahang.js +1 -7
  829. package/server/modules/reports/rp-cttralaihang.js +1 -4
  830. package/server/modules/reports/rp-databanle.js +1 -10
  831. package/server/modules/reports/rp-diemthuong.js +1 -2
  832. package/server/modules/reports/rp-dkcn.js +1 -3
  833. package/server/modules/reports/rp-dktk.js +1 -2
  834. package/server/modules/reports/rp-dsnhanviencm.js +1 -9
  835. package/server/modules/reports/rp-dsnhanvientb.js +1 -9
  836. package/server/modules/reports/rp-dtbanlekempk.js +1 -9
  837. package/server/modules/reports/rp-dtbanletheoct.js +1 -23
  838. package/server/modules/reports/rp-dtbanletheoctkempk.js +1 -25
  839. package/server/modules/reports/rp-dtbanletheokh.js +1 -20
  840. package/server/modules/reports/rp-dtbanletheokhnpp.js +1 -19
  841. package/server/modules/reports/rp-dtbanletheokho.js +1 -18
  842. package/server/modules/reports/rp-dtbanletheonam.js +1 -3
  843. package/server/modules/reports/rp-dtbanletheongay.js +1 -1
  844. package/server/modules/reports/rp-dtbanletheonpp.js +1 -23
  845. package/server/modules/reports/rp-dtbanletheonv.js +1 -19
  846. package/server/modules/reports/rp-dtbanletheoquy.js +1 -3
  847. package/server/modules/reports/rp-dtbanletheosp.js +1 -8
  848. package/server/modules/reports/rp-dtbanletheospnpp.js +1 -6
  849. package/server/modules/reports/rp-dtbanletheothang.js +1 -3
  850. package/server/modules/reports/rp-dtbanletheothungan.js +1 -12
  851. package/server/modules/reports/rp-dtbanletheovt.js +1 -2
  852. package/server/modules/reports/rp-dtbanletheovtnpp.js +1 -2
  853. package/server/modules/reports/rp-dutoanthuchitheodt.js +1 -4
  854. package/server/modules/reports/rp-getPXC2PNC.js +1 -8
  855. package/server/modules/reports/rp-getariseofaccountsbymonth.js +1 -4
  856. package/server/modules/reports/rp-getbtpb.js +1 -6
  857. package/server/modules/reports/rp-getcashbycashier.js +1 -7
  858. package/server/modules/reports/rp-getcschietkhau.js +1 -5
  859. package/server/modules/reports/rp-getdinhmuc4lenhcp.js +1 -7
  860. package/server/modules/reports/rp-getdinhmuc4pxk.js +1 -9
  861. package/server/modules/reports/rp-getdk4pht.js +1 -8
  862. package/server/modules/reports/rp-getdk4pkc.js +1 -9
  863. package/server/modules/reports/rp-getdttheoca.js +1 -5
  864. package/server/modules/reports/rp-getinvoice2pay.js +1 -4
  865. package/server/modules/reports/rp-getinvoice2receive.js +1 -4
  866. package/server/modules/reports/rp-getinvoice2return.js +1 -5
  867. package/server/modules/reports/rp-getinvoice2return_bl.js +1 -6
  868. package/server/modules/reports/rp-getkehoachmh4lenhcp.js +1 -4
  869. package/server/modules/reports/rp-getkhauhao.js +1 -7
  870. package/server/modules/reports/rp-getluong.js +1 -8
  871. package/server/modules/reports/rp-getluongchuyen.js +1 -5
  872. package/server/modules/reports/rp-getpn2fee.js +1 -5
  873. package/server/modules/reports/rp-getpn2return.js +1 -5
  874. package/server/modules/reports/rp-getthanhpham4pnk.js +1 -7
  875. package/server/modules/reports/rp-getvc2xhd.js +1 -11
  876. package/server/modules/reports/rp-gt_cpnvltt.js +1 -6
  877. package/server/modules/reports/rp-hangbanbitralai.js +1 -5
  878. package/server/modules/reports/rp-hangthanhvien.js +1 -3
  879. package/server/modules/reports/rp-hoadonbanhangtheohantt.js +1 -5
  880. package/server/modules/reports/rp-hoadonmuahangtheohantt.js +1 -5
  881. package/server/modules/reports/rp-hoahong.js +1 -15
  882. package/server/modules/reports/rp-kcsns.js +1 -19
  883. package/server/modules/reports/rp-kgchamcong.js +1 -7
  884. package/server/modules/reports/rp-khoaso.js +1 -12
  885. package/server/modules/reports/rp-kiemtrasocaitcvssocai.js +1 -6
  886. package/server/modules/reports/rp-kqdanhgianhanvien.js +1 -5
  887. package/server/modules/reports/rp-kqhdkd.js +1 -7
  888. package/server/modules/reports/rp-lcttgt.js +1 -17
  889. package/server/modules/reports/rp-lctttt.js +1 -11
  890. package/server/modules/reports/rp-linkslist.js +1 -4
  891. package/server/modules/reports/rp-phanbochitienchohoadon.js +1 -11
  892. package/server/modules/reports/rp-phanbothutienchohoadon.js +1 -10
  893. package/server/modules/reports/rp-ptbitralai.js +1 -7
  894. package/server/modules/reports/rp-ptcttct.js +1 -22
  895. package/server/modules/reports/rp-ptdonhang.js +1 -8
  896. package/server/modules/reports/rp-pttct.js +1 -49
  897. package/server/modules/reports/rp-pttctkho.js +1 -32
  898. package/server/modules/reports/rp-pttctkho2.js +1 -29
  899. package/server/modules/reports/rp-referredusers.js +1 -1
  900. package/server/modules/reports/rp-sctbhxh.js +1 -4
  901. package/server/modules/reports/rp-sctcnkh.js +1 -17
  902. package/server/modules/reports/rp-sctdiem.js +1 -3
  903. package/server/modules/reports/rp-sctdt.js +1 -7
  904. package/server/modules/reports/rp-sctdtcp.js +1 -11
  905. package/server/modules/reports/rp-sctluong.js +1 -4
  906. package/server/modules/reports/rp-sctthuetncn.js +1 -4
  907. package/server/modules/reports/rp-scttk.js +1 -7
  908. package/server/modules/reports/rp-sctvt.js +1 -5
  909. package/server/modules/reports/rp-sctvt_sl.js +1 -5
  910. package/server/modules/reports/rp-sctvtnpp.js +1 -6
  911. package/server/modules/reports/rp-sctvttt.js +1 -5
  912. package/server/modules/reports/rp-search.js +1 -4
  913. package/server/modules/reports/rp-socai.js +1 -6
  914. package/server/modules/reports/rp-socaitk.js +1 -7
  915. package/server/modules/reports/rp-sochut.js +1 -7
  916. package/server/modules/reports/rp-sokho.js +1 -7
  917. package/server/modules/reports/rp-sokhott.js +1 -5
  918. package/server/modules/reports/rp-sonkbh.js +1 -5
  919. package/server/modules/reports/rp-sonkc.js +1 -6
  920. package/server/modules/reports/rp-sonkct.js +1 -5
  921. package/server/modules/reports/rp-sonkmh.js +1 -5
  922. package/server/modules/reports/rp-sonktt.js +1 -5
  923. package/server/modules/reports/rp-soquy.js +1 -11
  924. package/server/modules/reports/rp-sosanhkhvatt.js +1 -13
  925. package/server/modules/reports/rp-sosanhkhvatt2.js +1 -6
  926. package/server/modules/reports/rp-sotaisan.js +1 -13
  927. package/server/modules/reports/rp-sotiengui.js +1 -7
  928. package/server/modules/reports/rp-taodinhmuctudkhoc.js +1 -5
  929. package/server/modules/reports/rp-thbanhangkempk.js +1 -28
  930. package/server/modules/reports/rp-thdanhgianhanvien.js +1 -9
  931. package/server/modules/reports/rp-thgt.js +1 -6
  932. package/server/modules/reports/rp-thnxt.js +1 -12
  933. package/server/modules/reports/rp-thnxt_sl.js +1 -9
  934. package/server/modules/reports/rp-thnxtnpp.js +1 -10
  935. package/server/modules/reports/rp-thnxttt.js +1 -9
  936. package/server/modules/reports/rp-tkbanhangtheogioithieu.js +1 -9
  937. package/server/modules/reports/rp-tkgioithieukh.js +1 -4
  938. package/server/modules/reports/rp-tkgtgt.js +1 -7
  939. package/server/modules/reports/rp-tmbctc.js +1 -20
  940. package/server/modules/reports/rp-tonghopbanhang.js +1 -6
  941. package/server/modules/reports/rp-tonghopmuahang.js +1 -5
  942. package/server/modules/reports/rp-tonghoptralaihang.js +1 -5
  943. package/server/modules/reports/rp-tongquanbanle.js +1 -20
  944. package/server/modules/reports/rp-tongquanbds.js +1 -3
  945. package/server/modules/reports/rp-tongquancongty.js +1 -6
  946. package/server/modules/reports/rp-tongquanctvnpp.js +1 -12
  947. package/server/modules/reports/rp-tongquannvbh.js +1 -14
  948. package/server/modules/reports/rp-tongquannvnpp.js +1 -5
  949. package/server/modules/reports/rp-uoctinhnvl.js +1 -11
  950. package/server/modules/reports/rp-wallet.js +1 -3
  951. package/server/modules/reports/rpt-tkdiemtichluy.js +1 -9
  952. package/server/modules/systems/sys-app.js +1 -30
  953. package/server/modules/systems/sys-colleague.js +1 -11
  954. package/server/modules/systems/sys-domain.js +1 -4
  955. package/server/modules/systems/sys-ecomproductlines.js +1 -1
  956. package/server/modules/systems/sys-exportexceltemplate.js +1 -4
  957. package/server/modules/systems/sys-fieldright.js +1 -3
  958. package/server/modules/systems/sys-importexceltemplate.js +1 -4
  959. package/server/modules/systems/sys-labelinfo.js +1 -4
  960. package/server/modules/systems/sys-listinfo.js +1 -10
  961. package/server/modules/systems/sys-menuinfo.js +1 -4
  962. package/server/modules/systems/sys-message.js +1 -14
  963. package/server/modules/systems/sys-moduleinfo.js +1 -4
  964. package/server/modules/systems/sys-notification.js +1 -8
  965. package/server/modules/systems/sys-quanhuyen.js +1 -4
  966. package/server/modules/systems/sys-reportinfo.js +1 -4
  967. package/server/modules/systems/sys-rptobject.js +1 -3
  968. package/server/modules/systems/sys-schedule.js +1 -11
  969. package/server/modules/systems/sys-sysconfig.js +1 -3
  970. package/server/modules/systems/sys-sysgroup.js +1 -3
  971. package/server/modules/systems/sys-tableinfo.js +1 -3
  972. package/server/modules/systems/sys-templatestore.js +1 -5
  973. package/server/modules/systems/sys-tinhthanh.js +1 -4
  974. package/server/modules/systems/sys-token.js +1 -3
  975. package/server/modules/systems/sys-trangthai.js +1 -4
  976. package/server/modules/systems/sys-trialinfo.js +1 -3
  977. package/server/modules/systems/sys-user.js +1 -45
  978. package/server/modules/systems/sys-users.js +1 -10
  979. package/server/modules/systems/sys-versioninfo.js +1 -3
  980. package/server/modules/systems/sys-vietqrbanks.js +1 -4
  981. package/server/modules/systems/sys-xaphuong.js +1 -4
  982. package/server/modules/vouchers/vo-banggiaban.js +1 -5
  983. package/server/modules/vouchers/vo-bc1.js +1 -33
  984. package/server/modules/vouchers/vo-bc5.js +1 -15
  985. package/server/modules/vouchers/vo-bg1.js +1 -10
  986. package/server/modules/vouchers/vo-bg2.js +1 -12
  987. package/server/modules/vouchers/vo-bn1.js +1 -35
  988. package/server/modules/vouchers/vo-bn5.js +1 -15
  989. package/server/modules/vouchers/vo-dh2.js +1 -35
  990. package/server/modules/vouchers/vo-dinhmucsx.js +1 -6
  991. package/server/modules/vouchers/vo-dkb.js +1 -21
  992. package/server/modules/vouchers/vo-dn0.js +1 -9
  993. package/server/modules/vouchers/vo-dnm.js +1 -21
  994. package/server/modules/vouchers/vo-hd1.js +1 -36
  995. package/server/modules/vouchers/vo-hd2.js +1 -107
  996. package/server/modules/vouchers/vo-hd3.js +1 -44
  997. package/server/modules/vouchers/vo-hd4.js +1 -13
  998. package/server/modules/vouchers/vo-hd7.js +1 -29
  999. package/server/modules/vouchers/vo-hd8.js +1 -29
  1000. package/server/modules/vouchers/vo-hde.js +1 -40
  1001. package/server/modules/vouchers/vo-htl.js +1 -11
  1002. package/server/modules/vouchers/vo-kbbtpb.js +1 -6
  1003. package/server/modules/vouchers/vo-kehoachmh.js +1 -13
  1004. package/server/modules/vouchers/vo-lenhcapphat.js +1 -10
  1005. package/server/modules/vouchers/vo-lenhsx.js +1 -12
  1006. package/server/modules/vouchers/vo-pbl.js +1 -93
  1007. package/server/modules/vouchers/vo-pc0.js +1 -14
  1008. package/server/modules/vouchers/vo-pc1.js +1 -31
  1009. package/server/modules/vouchers/vo-pc2.js +1 -24
  1010. package/server/modules/vouchers/vo-pc3.js +1 -14
  1011. package/server/modules/vouchers/vo-pc5.js +1 -15
  1012. package/server/modules/vouchers/vo-pc6.js +1 -19
  1013. package/server/modules/vouchers/vo-pcl.js +1 -7
  1014. package/server/modules/vouchers/vo-pdn.js +1 -11
  1015. package/server/modules/vouchers/vo-pdx.js +1 -9
  1016. package/server/modules/vouchers/vo-pgh.js +1 -19
  1017. package/server/modules/vouchers/vo-pht.js +1 -7
  1018. package/server/modules/vouchers/vo-pkc.js +1 -7
  1019. package/server/modules/vouchers/vo-pkh.js +1 -10
  1020. package/server/modules/vouchers/vo-pkk.js +1 -12
  1021. package/server/modules/vouchers/vo-pkt.js +1 -13
  1022. package/server/modules/vouchers/vo-pn1.js +1 -33
  1023. package/server/modules/vouchers/vo-pn2.js +1 -16
  1024. package/server/modules/vouchers/vo-pn3.js +1 -18
  1025. package/server/modules/vouchers/vo-pn5.js +1 -19
  1026. package/server/modules/vouchers/vo-pn6.js +1 -18
  1027. package/server/modules/vouchers/vo-pn9.js +1 -22
  1028. package/server/modules/vouchers/vo-pnc.js +1 -20
  1029. package/server/modules/vouchers/vo-pnh.js +1 -20
  1030. package/server/modules/vouchers/vo-pnk.js +1 -14
  1031. package/server/modules/vouchers/vo-pnknpp.js +1 -12
  1032. package/server/modules/vouchers/vo-po1.js +1 -15
  1033. package/server/modules/vouchers/vo-ppb.js +1 -8
  1034. package/server/modules/vouchers/vo-pt1.js +1 -21
  1035. package/server/modules/vouchers/vo-pt5.js +1 -15
  1036. package/server/modules/vouchers/vo-ptl.js +1 -8
  1037. package/server/modules/vouchers/vo-purchase_contract.js +1 -9
  1038. package/server/modules/vouchers/vo-pxc.js +1 -22
  1039. package/server/modules/vouchers/vo-pxh.js +1 -28
  1040. package/server/modules/vouchers/vo-pxk.js +1 -15
  1041. package/server/modules/vouchers/vo-pxknpp.js +1 -14
  1042. package/server/modules/vouchers/vo-qts.js +1 -12
  1043. package/server/modules/vouchers/vo-sale_contract.js +1 -11
  1044. package/server/modules/vouchers/vo-shipbook.js +1 -17
  1045. package/server/modules/vouchers/vo-so1.js +1 -126
  1046. package/server/modules/vouchers/vo-so2.js +1 -37
  1047. package/server/modules/vouchers/vo-so3.js +1 -41
  1048. package/server/modules/vouchers/vo-so5.js +1 -57
  1049. package/server/modules/vouchers/vo-so7.js +1 -97
  1050. package/server/modules/vouchers/vo-so9.js +1 -119
  1051. package/server/modules/vouchers/vo-vanchuyen.js +1 -14
  1052. package/server/modules/vouchers/vo-xhd.js +1 -33
  1053. package/server/route.js +1 -51
  1054. package/server/services/invoiceFetcher.js +1 -15
  1055. package/server/sslConfig.js +1 -2
  1056. package/server/transactionMiddleware.js +1 -5
  1057. package/server/workers/backupApp.js +1 -9
  1058. package/server/workers/calcGrid.js +1 -9
  1059. package/server/workers/customerOnImport.js +1 -8
  1060. package/server/workers/dmvtOnImport.js +1 -9
  1061. package/server/workers/excelParser.js +1 -9
  1062. package/server/workers/inputWorker.js +1 -6
  1063. package/server/workers/pushNotify.js +1 -10
  1064. package/server/workers/reportWorker.js +1 -7
  1065. package/server/workers/restoreApp.js +1 -23
  1066. package/server/workers/runScript.js +1 -4
  1067. package/server/workers/sendEmail.js +1 -13
  1068. package/server/workers/webhook.js +1 -5
@@ -1,7 +1 @@
1
- const dmtk=global.getModel("account"),dmbp=global.getModel("dmbp"),qts=global.getModel("qts"),sotinhkh=global.getModel("sotinhkh"),phanbokh=require("../../libs/phanbokh"),async=require("async"),controller=require("../../controllers/controllerRPT");
2
- module.exports=function($router$$){new controller($router$$,"getkhauhao",function($req$$,$callback$$){const $condition$$=$req$$.query;if(!$condition$$.nam||!$condition$$.id_app)return $callback$$("Ch\u1ee9c n\u0103ng n\u00e0y y\u00eau c\u1ea7u tham s\u1ed1: nam,id_app");$condition$$.thang||($condition$$.thang=0);if($condition$$.thang>11)return $callback$$("Tham s\u1ed1 th\u00e1ng kh\u00f4ng h\u1ee3p l\u1ec7");sotinhkh.find({id_app:$condition$$.id_app,thang:Number($condition$$.thang)+1,nam:$condition$$.nam}).lean().then(async function($khauhaos$$){await $khauhaos$$.filter($r$$=>
3
- $r$$.ma_tang_giam_ts).asyncJoinModel2($condition$$.id_app,"dmtanggiamts",{where:"ma_tang_giam_ts",fields:{kieu_dc:"kieu"}});$khauhaos$$.forEach($r$$=>{$r$$.kieu_dc=="2"&&($r$$.nguyen_gia=0-$r$$.nguyen_gia,$r$$.gia_tri_da_kh=0-$r$$.gia_tri_da_kh,$r$$.gia_tri_con_lai=0-$r$$.gia_tri_con_lai,$r$$.gia_tri_kh_ky=0-$r$$.gia_tri_kh_ky)});$khauhaos$$=await $khauhaos$$.asyncGroupBy("id_app nam thang ngay_dau_thang ngay_cuoi_thang so_ngay_kh sua_kh id_ts tk_cp tk_kh ma_kho ma_bp ma_phi ma_dt".split(" "),["gia_tri_kh_ky"]);
4
- $khauhaos$$.joinModel2($condition$$.id_app,qts,[{where:{id_ts:"_id"},fields:[{tk_kh_goc:"tk_kh"},{tk_cp_goc:"tk_cp"},{ma_bp_goc:"ma_bp"},{ma_kho_goc:"ma_kho"},{ma_phi_goc:"ma_phi"},{ma_dt_goc:"ma_dt"},"ten_ts","so_the_ts"]}],function(){async.mapSeries($khauhaos$$,function($khauhao$$,$callback$$){phanbokh($khauhao$$,function($error$$,$kqpb$$){if($error$$)return console.log($error$$),$callback$$($error$$);$callback$$(null,$kqpb$$)})},function($error$$,$kqpbs$$){$kqpbs$$=$kqpbs$$.reduce(($a$$,$b$$)=>
5
- $a$$.concat($b$$),[]);if($error$$)return $callback$$($error$$);let $report$$=$kqpbs$$.filter($r$$=>!!$r$$).map(($r$$,$i$$)=>{$r$$.line=$i$$;$r$$.tk_no=$r$$.tk_cp||$r$$.tk_cp_goc;$r$$.tk_co=$r$$.tk_kh||$r$$.tk_kh_goc;$r$$.ma_kho=$r$$.ma_kho||$r$$.ma_kho_goc;$r$$.ma_bp=$r$$.ma_bp||$r$$.ma_bp_goc;$r$$.ma_phi=$r$$.ma_phi||$r$$.ma_phi_goc;$r$$.ma_dt=$r$$.ma_dt||$r$$.ma_dt_goc;$r$$.tien_nt=$r$$.gia_tri_kh_ky;$r$$.tien=$r$$.tien_nt;return $r$$});async.series({tk:function($callback$$){$report$$.joinModel2($condition$$.id_app,
6
- dmtk,[{where:{tk_no:"tk"},fields:[{name:"ten_tk_no",value:"ten_tk"}]},{akey:"tk_co",bkey:"tk",fields:[{name:"ten_tk_co",value:"ten_tk"}]}],function($r$$){$callback$$(null,$r$$)})},bp:function($callback$$){$report$$.joinModel2($condition$$.id_app,dmbp,[{where:"ma_bp",fields:[{name:"ten_bp",value:"ten_bp"}]}],function($r$$){$callback$$(null,$r$$)})},ts:function($callback$$){$report$$.joinModel2($condition$$.id_app,qts,[{where:{id_ts:"_id"},fields:[{name:"ten_ts",value:"ten_ts"},{name:"so_the_ts",value:"so_the_ts"}]}],
7
- function($r$$){$callback$$(null,$r$$)})}},function(){$report$$.forEach($r$$=>{delete $r$$._id});$callback$$(null,$report$$)})})})}).catch($error$$=>{$callback$$($error$$)})},{cache:!1})};
1
+ const _0x295f7e=_0x1af7;(function(_0x5454c3,_0x3d8721){const _0x2638de=_0x1af7,_0x4a2a5f=_0x5454c3();while(!![]){try{const _0x2bc1dd=parseInt(_0x2638de(0xd7))/0x1+-parseInt(_0x2638de(0xed))/0x2*(parseInt(_0x2638de(0x9f))/0x3)+parseInt(_0x2638de(0xdb))/0x4+parseInt(_0x2638de(0xd1))/0x5*(-parseInt(_0x2638de(0xaf))/0x6)+parseInt(_0x2638de(0x83))/0x7+parseInt(_0x2638de(0x12b))/0x8+-parseInt(_0x2638de(0xbf))/0x9;if(_0x2bc1dd===_0x3d8721)break;else _0x4a2a5f['push'](_0x4a2a5f['shift']());}catch(_0x472e6d){_0x4a2a5f['push'](_0x4a2a5f['shift']());}}}(_0x434a,0xd1e7f));function _0x434a(){const _0x459299=['DgLLBL9UDa','sM9Vu0O','rw5uvgK','uLLTzu0','DgvUx2jW','DgvUx3rRx25V','zxnKBKu','vxDfALy','DgTFy3a','BwfFCgHPx2DVyW','qwXuuhu','AwvPDwG','vLrvruq','qLzhEMW','q0PhB1a','Dg5isgK','BK9Nufu','s2vdEMq','sNfMuu4','ExPeB28','zMLSDgvY','BMnhywK','sfPnrfO','tLfNzxK','CMvKDwnL','y29Uy2f0','rfHvz0W','yxn5BMnhCM91Cej5','vvPQrNu','zhzqrLe','nJGYnZG4mgzLsenHrq','C29FBMDHEv9RAa','BfPStNu','ELDMy1m','Bg9N','z2LHx3rYAv9Kyv9RAa','BgLUzq','yMndyvO','t09QEue','ruT3DM4','zxLhB2m','C1P3t0C','mta4mty0ndLysuHKA24','CxvLCNK','y2f0y2G','tMXbB24','zg10yw5Nz2LHBxrZ','sKjXyxO','DgHHBMC','x2LK','zK9qzKC','BwfW','DgTFA2HFz29J','z2LHx3rYAv9JB25FBgfP','CxrZ','DgTFy3bFz29J','v25nweS','zvr0qMq','BMDHEv9KyxvFDgHHBMC','y3zVz0m','DuDdzxq','sMrIDuG','rNnNCe8','BwfFA2HV','z2npExy','tuTsru8','BgHVrLG','zMDOEMq','A21UA1m','sLDorxG','mJK0DeDWwLru','zgrIy3K','DgTFBM8','z2LHx3rYAv9RAf9REq','q2JHU6LJig7eG25Nig7dOhKGECoQDsbJ4BQNDsb0AgfTihpHU5e6ig5HBsXPzf9HCha','BMD1EwvUx2DPyq','ohWYFdv8nNW3Fdb8mxWZFdr8oq','BwfFCgHP','C3vHx2TO','C0nszvm','AwPgzKK','BMfT','twD1C0m','CLfYCg4','vfHxsNC','q2HOB2i','mZqZmZK4Bwr2Cwv4','t1zvA2C','DgLLBG','suHbwhy','v1H0ALK','CgfYywXSzwW','te5Yy3G','DKjqzKC','t2Dmzu8','rxDjAxC','DLrxwvy','s0TiuNq','yLvIzfu','EenpAui','DgvUx3rR','C3bSAxq','mtK0ntaYnJbqvxHgtMm','lI4VlI4Vy29UDhjVBgXLCNmVy29UDhjVBgXLCLjqva','rKTIree','AvHJrvu','uM1yqKC','DgvUx3rZ','yLDcANC','z2v0A2HHDwHHBW','zMLUza','C290Aw5OA2G','y1PbAK4','EvLSEMO','z3veEgS','CMTJCuO','BMDHEv9JDw9Px3rOyw5N','q29NCKC','BwfFA2HVx2DVyW','tvnYzxC','mteWCuHAvxLM','AM9PBK1VzgvSmG','v1PKwLa','BwfFzhq','A2LLDv9KyW','yxn5BMnkB2LUtw9KzwWY','mty1mtC4mgzoBMHrCG','D21JvfK','DgTFA2G','yur1ELy','mJCZntK4meTIuNrfzq','AuPZv1m','sKHPEhO','veHkBhK','zgfTzwK','qLDTwgq','EgnZqwi','vKjlrMm','CgrgC0K','BwfFDgfUz19NAwfTx3rZ','EuzXrKi','AhnmCuq','z2v0tw9KzwW','DgTFy28','sunPyLa','rfr0qMy','AwrFyxbW','C2PdCuK','oti3nff4B1HZqW','A2LLDq','rNvctwW','BNfktLu','q2LJCNa','DKjcuve','BwfFyNa','wfbNsMu','t1DACvi','v3LSrfa','EKr2teS','rgTxzMe','A01yq3a','t0HUqu8','A015Exq','ENfKv0W','C29FDgHLx3rZ','qNrNBuO','zM9YrwfJAa','tKjtDwW','zxrsEem','vLLnB2C','tuDizuK','D2vRs0u','y1PsDui','u0PXsLK','zMnQyM0','rg9LrfG','quzLELu','ELDqsKW','AwrFDhm','BwX6yLy'];_0x434a=function(){return _0x459299;};return _0x434a();}function _0x1af7(_0x3bdfd3,_0xc829bb){const _0x434a21=_0x434a();return _0x1af7=function(_0x1af79c,_0x5eb2e1){_0x1af79c=_0x1af79c-0x7f;let _0x1b86c6=_0x434a21[_0x1af79c];if(_0x1af7['KSBgQJ']===undefined){var _0x54f3ab=function(_0x50dbbc){const _0x3c64af='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x38baa0='',_0x3fe385='';for(let _0x2eb99a=0x0,_0x14c545,_0x1dd228,_0x14803c=0x0;_0x1dd228=_0x50dbbc['charAt'](_0x14803c++);~_0x1dd228&&(_0x14c545=_0x2eb99a%0x4?_0x14c545*0x40+_0x1dd228:_0x1dd228,_0x2eb99a++%0x4)?_0x38baa0+=String['fromCharCode'](0xff&_0x14c545>>(-0x2*_0x2eb99a&0x6)):0x0){_0x1dd228=_0x3c64af['indexOf'](_0x1dd228);}for(let _0x51efb7=0x0,_0x2a0457=_0x38baa0['length'];_0x51efb7<_0x2a0457;_0x51efb7++){_0x3fe385+='%'+('00'+_0x38baa0['charCodeAt'](_0x51efb7)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3fe385);};_0x1af7['eOCrIV']=_0x54f3ab,_0x3bdfd3=arguments,_0x1af7['KSBgQJ']=!![];}const _0x4a7a4b=_0x434a21[0x0],_0x57beba=_0x1af79c+_0x4a7a4b,_0xda61d4=_0x3bdfd3[_0x57beba];return!_0xda61d4?(_0x1b86c6=_0x1af7['eOCrIV'](_0x1b86c6),_0x3bdfd3[_0x57beba]=_0x1b86c6):_0x1b86c6=_0xda61d4,_0x1b86c6;},_0x1af7(_0x3bdfd3,_0xc829bb);}const dmtk=global['getModel']('account'),dmbp=global[_0x295f7e(0xe7)]('dmbp'),qts=global[_0x295f7e(0xe7)](_0x295f7e(0x8f)),sotinhkh=global[_0x295f7e(0xe7)](_0x295f7e(0xc8)),phanbokh=require('../../libs/phanbokh'),async=require('async'),controller=require(_0x295f7e(0xc0));module['exports']=function(_0x402ca7){const _0xd2c425=_0x295f7e,_0x3fc1ce={'PAOWd':function(_0x4b7093,_0x252392){return _0x4b7093===_0x252392;},'bWBjw':_0xd2c425(0x114),'OgLeO':_0xd2c425(0xb6),'esdnE':function(_0x5410d9,_0xb07ffa,_0x2a968c){return _0x5410d9(_0xb07ffa,_0x2a968c);},'WXtjY':_0xd2c425(0xe4),'OVUkg':_0xd2c425(0xee),'Zpaly':_0xd2c425(0xeb),'xCOiB':_0xd2c425(0xaa),'CogrG':_0xd2c425(0x89),'tnHHi':_0xd2c425(0xcd),'WZdZP':_0xd2c425(0x12c),'QNowo':_0xd2c425(0xa7),'gYBec':_0xd2c425(0x10b),'cZAjN':_0xd2c425(0x115),'eTtBd':'tk_kh','OWZqR':_0xd2c425(0x98),'Svuld':_0xd2c425(0xf3),'cvogC':_0xd2c425(0xa6),'etRxC':_0xd2c425(0xa2),'KKHRt':_0xd2c425(0x8a),'yFqFB':_0xd2c425(0xd4),'VYMog':_0xd2c425(0xc4),'HZMDZ':_0xd2c425(0xfd),'mlzbV':function(_0x2937f5,_0x56e4f6){return _0x2937f5(_0x56e4f6);},'WnMXK':_0xd2c425(0x88),'rQrpn':_0xd2c425(0xe2),'DoeDX':function(_0x7d7c8e,_0x233967){return _0x7d7c8e-_0x233967;},'vBBQQ':function(_0x55cc89,_0x347767){return _0x55cc89(_0x347767);},'damei':_0xd2c425(0x111),'cZRuB':'WjEDm','Chhob':_0xd2c425(0xe3),'EzJxk':'ELtzc','MSrew':function(_0x5e447f,_0x11f85a){return _0x5e447f!==_0x11f85a;},'AlTPu':'wyEZG','ZLSST':_0xd2c425(0xbd),'JqNJi':_0xd2c425(0x11e),'dqmIz':_0xd2c425(0x99),'XPgJe':'BKoAE','JWNEx':_0xd2c425(0xa3),'hsLqD':function(_0x2f0efb,_0x503942){return _0x2f0efb>_0x503942;},'ICibP':function(_0x23092f,_0x36c3ec){return _0x23092f(_0x36c3ec);},'fghzd':function(_0x47877b,_0x4fe54e){return _0x47877b+_0x4fe54e;},'Roipq':function(_0x134dc4,_0x373094){return _0x134dc4(_0x373094);},'fneDJ':_0xd2c425(0xc6)};new controller(_0x402ca7,_0x3fc1ce['fneDJ'],function(_0x53df07,_0x520aac){const _0x24cddd=_0xd2c425,_0x5a784c={'sCReS':function(_0x30053a,_0x482da0,_0x419898){return _0x30053a(_0x482da0,_0x419898);},'xcsAb':_0x3fc1ce[_0x24cddd(0x91)],'WylDP':function(_0x2b1b27,_0x4fbc02){return _0x2b1b27==_0x4fbc02;},'UZjFu':_0x3fc1ce[_0x24cddd(0xac)],'FuBMl':function(_0x2323a6,_0x5423ed){return _0x2323a6-_0x5423ed;},'pWYkE':function(_0x3a6ab0,_0x4e3b98){const _0x1250dd=_0x24cddd;return _0x3fc1ce[_0x1250dd(0x108)](_0x3a6ab0,_0x4e3b98);},'THJly':function(_0x17cf38,_0xc84c0d){const _0x5a312d=_0x24cddd;return _0x3fc1ce[_0x5a312d(0xf2)](_0x17cf38,_0xc84c0d);},'MGHeI':_0x3fc1ce['Svuld'],'wmcTY':_0x3fc1ce[_0x24cddd(0xdf)],'vSjmR':_0x3fc1ce[_0x24cddd(0x105)],'wekKE':function(_0x1b6f8d,_0x5a3178){return _0x3fc1ce['PAOWd'](_0x1b6f8d,_0x5a3178);},'dTFnv':_0x3fc1ce[_0x24cddd(0xae)],'aDuzV':_0x3fc1ce['EzJxk'],'nqJNU':function(_0x501773,_0x410495){const _0x19f077=_0x24cddd;return _0x3fc1ce[_0x19f077(0xd0)](_0x501773,_0x410495);},'sZwOG':_0x3fc1ce[_0x24cddd(0x117)],'ieiuh':_0x3fc1ce['ZLSST'],'pwSro':_0x3fc1ce['JqNJi'],'BtgmJ':_0x24cddd(0xa9),'TXWJw':_0x3fc1ce['dqmIz'],'UJlDc':_0x3fc1ce[_0x24cddd(0xba)],'BVGzl':_0x24cddd(0xc4),'Emuts':_0x3fc1ce[_0x24cddd(0x123)],'fcjbm':_0x3fc1ce[_0x24cddd(0xf4)]},_0x5aeb64=_0x53df07[_0x24cddd(0x84)];if(!_0x5aeb64[_0x24cddd(0xaa)]||!_0x5aeb64['id_app'])return _0x3fc1ce['vBBQQ'](_0x520aac,_0x3fc1ce[_0x24cddd(0x9e)]);if(!_0x5aeb64[_0x24cddd(0x89)])_0x5aeb64[_0x24cddd(0x89)]=0x0;if(_0x3fc1ce[_0x24cddd(0xe6)](_0x5aeb64[_0x24cddd(0x89)],0xb))return _0x3fc1ce[_0x24cddd(0xe9)](_0x520aac,'Tham\x20số\x20tháng\x20không\x20hợp\x20lệ');sotinhkh[_0x24cddd(0xc7)]({'id_app':_0x5aeb64['id_app'],'thang':_0x3fc1ce[_0x24cddd(0x9c)](_0x3fc1ce['Roipq'](Number,_0x5aeb64['thang']),0x1),'nam':_0x5aeb64[_0x24cddd(0xaa)]})['lean']()['then'](async function(_0x47416c){const _0x139e94=_0x24cddd,_0x50b1f8={'JqfQN':function(_0x453f2a,_0x45cd23){return _0x3fc1ce['PAOWd'](_0x453f2a,_0x45cd23);},'RNAGT':_0x3fc1ce[_0x139e94(0xc5)],'nOgPU':_0x3fc1ce[_0x139e94(0xb7)],'dvPFQ':function(_0x46ce17,_0x2f6f02,_0x436429){const _0x2d4c58=_0x139e94;return _0x3fc1ce[_0x2d4c58(0x113)](_0x46ce17,_0x2f6f02,_0x436429);}};await _0x47416c[_0x139e94(0x121)](_0x3348c0=>_0x3348c0[_0x139e94(0xe4)])[_0x139e94(0xd6)](_0x5aeb64[_0x139e94(0xeb)],_0x139e94(0x87),{'where':_0x3fc1ce[_0x139e94(0xb3)],'fields':{'kieu_dc':_0x3fc1ce[_0x139e94(0xb0)]}}),_0x47416c[_0x139e94(0xff)](_0x312f5c=>{const _0x4b1e99=_0x139e94,_0x544e20={'KfzwN':function(_0x42abf1,_0x18fce8,_0x3c7665){const _0x281073=_0x1af7;return _0x5a784c[_0x281073(0xa8)](_0x42abf1,_0x18fce8,_0x3c7665);},'JHixz':function(_0x302d62,_0x1fe8f8){return _0x302d62(_0x1fe8f8);},'yYlzj':function(_0x45732f,_0x1ed2f5,_0x44765f){return _0x45732f(_0x1ed2f5,_0x44765f);}};if(_0x5a784c[_0x4b1e99(0xe1)]===_0x5a784c[_0x4b1e99(0xe1)])_0x5a784c[_0x4b1e99(0xf6)](_0x312f5c[_0x4b1e99(0xd5)],'2')&&(_0x4b1e99(0xf7)!==_0x5a784c[_0x4b1e99(0x129)]?(_0x312f5c[_0x4b1e99(0xa4)]=0x0-_0x312f5c[_0x4b1e99(0xa4)],_0x312f5c[_0x4b1e99(0x130)]=_0x5a784c[_0x4b1e99(0xef)](0x0,_0x312f5c['gia_tri_da_kh']),_0x312f5c[_0x4b1e99(0x8e)]=_0x5a784c[_0x4b1e99(0xef)](0x0,_0x312f5c[_0x4b1e99(0x8e)]),_0x312f5c[_0x4b1e99(0xa2)]=_0x5a784c['pWYkE'](0x0,_0x312f5c[_0x4b1e99(0xa2)])):_0x544e20['KfzwN'](_0x506af8,null,_0x2bbad9));else{const _0x2add5b={'bcCaZ':function(_0x264688,_0x290fba){const _0x2430be=_0x4b1e99;return _0x544e20[_0x2430be(0xdd)](_0x264688,_0x290fba);},'lhoFX':function(_0x3c4c89,_0x44de98,_0x5c4714){const _0x48d847=_0x4b1e99;return _0x544e20[_0x48d847(0xca)](_0x3c4c89,_0x44de98,_0x5c4714);}};_0x2cecee(_0x5d5322,function(_0x593f8d,_0xac4769){const _0x43f9fd=_0x4b1e99;if(_0x593f8d)return _0x11c270[_0x43f9fd(0x12f)](_0x593f8d),_0x2add5b[_0x43f9fd(0x132)](_0x5c0b90,_0x593f8d);_0x2add5b[_0x43f9fd(0x9b)](_0x56a8db,null,_0xac4769);});}}),_0x47416c=await _0x47416c[_0x139e94(0x128)]([_0x3fc1ce['Zpaly'],_0x3fc1ce[_0x139e94(0xbc)],_0x3fc1ce[_0x139e94(0xce)],_0x139e94(0x93),_0x3fc1ce[_0x139e94(0x11c)],_0x3fc1ce[_0x139e94(0xd3)],_0x3fc1ce['QNowo'],_0x3fc1ce['gYBec'],_0x3fc1ce[_0x139e94(0xc9)],_0x3fc1ce[_0x139e94(0x92)],_0x3fc1ce[_0x139e94(0xf5)],_0x3fc1ce['Svuld'],_0x3fc1ce[_0x139e94(0x94)],'ma_dt'],[_0x3fc1ce[_0x139e94(0x101)]]),_0x47416c['joinModel2'](_0x5aeb64[_0x139e94(0xeb)],qts,[{'where':{'id_ts':_0x3fc1ce[_0x139e94(0xba)]},'fields':[{'tk_kh_goc':_0x3fc1ce[_0x139e94(0x92)]},{'tk_cp_goc':_0x139e94(0x115)},{'ma_bp_goc':_0x139e94(0xf3)},{'ma_kho_goc':_0x139e94(0x98)},{'ma_phi_goc':'ma_phi'},{'ma_dt_goc':_0x3fc1ce[_0x139e94(0xe5)]},_0x3fc1ce[_0x139e94(0x102)],_0x3fc1ce[_0x139e94(0x123)]]}],function(){const _0x4ebf6c=_0x139e94,_0x5d04d8={'NQgey':function(_0x5a118d,_0x4146b6){const _0x295d12=_0x1af7;return _0x5a784c[_0x295d12(0xde)](_0x5a118d,_0x4146b6);},'ddbcy':function(_0x1ec757,_0x4b82dc,_0x43c47f){return _0x1ec757(_0x4b82dc,_0x43c47f);},'EKkBE':_0x5a784c[_0x4ebf6c(0x103)],'ncGai':_0x5a784c[_0x4ebf6c(0xd8)],'EnTTi':_0x5a784c['vSjmR'],'guDxk':function(_0x46d396,_0x40d005){const _0x5735f0=_0x4ebf6c;return _0x5a784c[_0x5735f0(0x104)](_0x46d396,_0x40d005);},'zWPJL':_0x5a784c['dTFnv'],'OOjyA':function(_0x579dfd,_0x1518b8,_0x1c1682){const _0x47f05b=_0x4ebf6c;return _0x5a784c[_0x47f05b(0xa8)](_0x579dfd,_0x1518b8,_0x1c1682);},'eyGoc':_0x5a784c[_0x4ebf6c(0xda)],'ljqDr':function(_0x3ce723,_0x16323a){const _0x5e9a11=_0x4ebf6c;return _0x5a784c[_0x5e9a11(0xf0)](_0x3ce723,_0x16323a);},'rkcqJ':_0x5a784c[_0x4ebf6c(0x82)],'OHnAO':_0x4ebf6c(0x112),'tusXt':_0x5a784c[_0x4ebf6c(0x118)],'bUbdU':_0x4ebf6c(0x119),'kiMxr':_0x5a784c['pwSro'],'wLvKZ':_0x5a784c[_0x4ebf6c(0xfe)],'zWfcS':function(_0x16264a,_0x19cc58){return _0x16264a-_0x19cc58;},'zqdWL':_0x5a784c[_0x4ebf6c(0xad)],'GnDWn':_0x5a784c['UJlDc'],'MWjKV':_0x5a784c[_0x4ebf6c(0x11a)],'IHAXv':_0x5a784c['Emuts'],'DkWfa':function(_0x1b1cb7,_0x4a9240){const _0xeaf292=_0x4ebf6c;return _0x5a784c[_0xeaf292(0x104)](_0x1b1cb7,_0x4a9240);},'wopGl':_0x5a784c[_0x4ebf6c(0x107)]};async['mapLimit'](_0x47416c,0x14,function(_0x506c65,_0x1dea6a){const _0x4d77f0=_0x4ebf6c,_0x3ed51a={'kMXCp':function(_0x41eab4,_0x13f98d,_0x3288b5){return _0x41eab4(_0x13f98d,_0x3288b5);}};_0x50b1f8[_0x4d77f0(0x11f)](_0x50b1f8['RNAGT'],_0x50b1f8[_0x4d77f0(0x11d)])?(_0x208a7f['forEach'](_0x6c8d44=>{const _0x147f4b=_0x4d77f0;delete _0x6c8d44[_0x147f4b(0x8a)];}),_0x3ed51a[_0x4d77f0(0xf9)](_0x490625,null,_0x5573a3)):_0x50b1f8[_0x4d77f0(0x12a)](phanbokh,_0x506c65,function(_0x40a943,_0x27eea9){const _0x7fc09c=_0x4d77f0;if(_0x40a943)return console['log'](_0x40a943),_0x5d04d8[_0x7fc09c(0x124)](_0x1dea6a,_0x40a943);_0x5d04d8['ddbcy'](_0x1dea6a,null,_0x27eea9);});},function(_0x4db319,_0x471688){const _0x3bc1c8=_0x4ebf6c,_0x230ec2={'DXUgL':function(_0x42ef86,_0xdc9946,_0x273dac){const _0x28a683=_0x1af7;return _0x5d04d8[_0x28a683(0x7f)](_0x42ef86,_0xdc9946,_0x273dac);},'NBSul':function(_0x517abb,_0x57f2a8){return _0x517abb!==_0x57f2a8;},'LNrcx':_0x5d04d8[_0x3bc1c8(0x81)],'RYmeM':function(_0x37bb4c,_0xdc3084){return _0x37bb4c-_0xdc3084;},'AFezU':function(_0x128bc5,_0x3992fc){return _0x5d04d8['ljqDr'](_0x128bc5,_0x3992fc);},'MgusC':_0x5d04d8[_0x3bc1c8(0xcc)],'DTtBf':_0x5d04d8[_0x3bc1c8(0xfa)],'JooSJ':'tk_co','kMyyt':'ten_tk_co','uGCet':_0x5d04d8['tusXt'],'iJsWS':function(_0x23ef4c,_0x530c53,_0x41c8fb){const _0x4ca691=_0x3bc1c8;return _0x5d04d8[_0x4ca691(0xa0)](_0x23ef4c,_0x530c53,_0x41c8fb);},'vvnSD':function(_0x1df0e6,_0x287694){return _0x1df0e6(_0x287694);},'yzDoo':function(_0x35c05f,_0x376206){const _0x3fb487=_0x3bc1c8;return _0x5d04d8[_0x3fb487(0xcb)](_0x35c05f,_0x376206);},'EwIiw':_0x5d04d8[_0x3bc1c8(0xbb)],'vbVYA':function(_0x43ec76,_0x5331db,_0x10ef80){const _0x30eb6c=_0x3bc1c8;return _0x5d04d8[_0x30eb6c(0xa0)](_0x43ec76,_0x5331db,_0x10ef80);},'FKbDA':_0x5d04d8['kiMxr'],'NlAon':_0x5d04d8['wLvKZ'],'RmXBG':_0x5d04d8['EKkBE'],'iXcEU':_0x3bc1c8(0x111),'Cicrp':function(_0x180696,_0x1b3288,_0x698598){const _0x1aeb1d=_0x3bc1c8;return _0x5d04d8[_0x1aeb1d(0x7f)](_0x180696,_0x1b3288,_0x698598);},'kmnkS':function(_0x216a49,_0x4553a5){return _0x216a49-_0x4553a5;},'CJGoP':function(_0x2c2b03,_0x1c09d6){const _0x24275b=_0x3bc1c8;return _0x5d04d8[_0x24275b(0x12e)](_0x2c2b03,_0x1c09d6);},'EKwvn':_0x5d04d8[_0x3bc1c8(0xfc)],'vTWYV':_0x5d04d8['GnDWn'],'JdbuH':_0x5d04d8['MWjKV'],'SJqJY':_0x5d04d8[_0x3bc1c8(0xb2)]};if(_0x5d04d8[_0x3bc1c8(0xf8)](_0x5d04d8['wopGl'],'zZRax'))_0x41055e[_0x3bc1c8(0xd2)](_0x1c7f6c[_0x3bc1c8(0xeb)],_0x454580,[{'where':_0x5d04d8['EKkBE'],'fields':[{'name':_0x5d04d8[_0x3bc1c8(0x122)],'value':_0x5d04d8['ncGai']}]}],function(_0x7907){const _0x1959f7=_0x3bc1c8;_0x230ec2[_0x1959f7(0x127)](_0x4e0b6a,null,_0x7907);});else{_0x471688=_0x471688[_0x3bc1c8(0x125)]((_0xca8f75,_0x593225)=>_0xca8f75[_0x3bc1c8(0x126)](_0x593225),[]);if(_0x4db319)return _0x5d04d8[_0x3bc1c8(0x124)](_0x520aac,_0x4db319);let _0x38c5cc=_0x471688[_0x3bc1c8(0x121)](_0x15d953=>!!_0x15d953)[_0x3bc1c8(0x8c)]((_0x1cae89,_0x1348c4)=>{const _0x256d76=_0x3bc1c8,_0x53576a={'FsgpO':function(_0x5c49eb,_0x55e9c7,_0x26b7dd){return _0x5c49eb(_0x55e9c7,_0x26b7dd);}};if(_0x230ec2[_0x256d76(0x100)](_0x230ec2[_0x256d76(0xb5)],_0x256d76(0x8b)))return _0x1cae89[_0x256d76(0x131)]=_0x1348c4,_0x1cae89[_0x256d76(0xa1)]=_0x1cae89['tk_cp']||_0x1cae89['tk_cp_goc'],_0x1cae89['tk_co']=_0x1cae89['tk_kh']||_0x1cae89['tk_kh_goc'],_0x1cae89['ma_kho']=_0x1cae89[_0x256d76(0x98)]||_0x1cae89[_0x256d76(0xcf)],_0x1cae89[_0x256d76(0xf3)]=_0x1cae89[_0x256d76(0xf3)]||_0x1cae89['ma_bp_goc'],_0x1cae89[_0x256d76(0xa6)]=_0x1cae89[_0x256d76(0xa6)]||_0x1cae89['ma_phi_goc'],_0x1cae89[_0x256d76(0xd4)]=_0x1cae89[_0x256d76(0xd4)]||_0x1cae89['ma_dt_goc'],_0x1cae89[_0x256d76(0x10d)]=_0x1cae89['gia_tri_kh_ky'],_0x1cae89[_0x256d76(0xb1)]=_0x1cae89['tien_nt'],_0x1cae89;else _0x53576a[_0x256d76(0x97)](_0x521541,null,_0x2d64c1);});async[_0x3bc1c8(0xb4)]({'tk':function(_0x33c382){const _0x122a5=_0x3bc1c8;_0x230ec2[_0x122a5(0x109)](_0x230ec2[_0x122a5(0xab)],_0x230ec2[_0x122a5(0xab)])?(_0x44330d['nguyen_gia']=_0x230ec2[_0x122a5(0x110)](0x0,_0x6f3c21[_0x122a5(0xa4)]),_0x1efd77[_0x122a5(0x130)]=0x0-_0x23a4b3[_0x122a5(0x130)],_0x1e52ae[_0x122a5(0x8e)]=0x0-_0x4443b5[_0x122a5(0x8e)],_0x4ddc45[_0x122a5(0xa2)]=_0x230ec2[_0x122a5(0x110)](0x0,_0x2ec65d[_0x122a5(0xa2)])):_0x38c5cc[_0x122a5(0xd2)](_0x5aeb64[_0x122a5(0xeb)],dmtk,[{'where':{'tk_no':'tk'},'fields':[{'name':_0x230ec2[_0x122a5(0xea)],'value':_0x122a5(0xbd)}]},{'akey':_0x230ec2[_0x122a5(0x10e)],'bkey':'tk','fields':[{'name':_0x230ec2[_0x122a5(0xfb)],'value':_0x230ec2[_0x122a5(0x95)]}]}],function(_0x5947b2){_0x33c382(null,_0x5947b2);});},'bp':function(_0x2b0f33){const _0x333312=_0x3bc1c8,_0x1139db={'MKREO':function(_0x122a77,_0x108427){return _0x230ec2['vvnSD'](_0x122a77,_0x108427);},'lZlNu':function(_0x1747fb,_0x6daa2e){const _0x4b4bb9=_0x1af7;return _0x230ec2[_0x4b4bb9(0x120)](_0x1747fb,_0x6daa2e);},'ZGUPf':_0x230ec2[_0x333312(0xb8)],'BWmXd':function(_0x2141c6,_0x1b4867,_0x175c04){return _0x230ec2['vbVYA'](_0x2141c6,_0x1b4867,_0x175c04);}};_0x230ec2[_0x333312(0x109)](_0x230ec2[_0x333312(0xc1)],_0x230ec2[_0x333312(0x86)])?_0x38c5cc[_0x333312(0xd2)](_0x5aeb64['id_app'],dmbp,[{'where':_0x230ec2[_0x333312(0xc3)],'fields':[{'name':_0x230ec2['iXcEU'],'value':_0x230ec2[_0x333312(0xc2)]}]}],function(_0xd9860f){const _0x4576a5=_0x333312,_0x5c7e4e={'oCigW':function(_0x25aa19,_0x147081){const _0x33db88=_0x1af7;return _0x1139db[_0x33db88(0x9a)](_0x25aa19,_0x147081);}};_0x1139db[_0x4576a5(0x12d)](_0x1139db['ZGUPf'],_0x1139db['ZGUPf'])?_0x1139db[_0x4576a5(0xe0)](_0x2b0f33,null,_0xd9860f):_0x5c7e4e['oCigW'](_0x1b800f,_0x52ec31);}):_0x230ec2[_0x333312(0xdc)](_0x13e851,null,_0x60b331);},'ts':function(_0x5441c5){const _0x26cb02=_0x3bc1c8;_0x230ec2['yzDoo'](_0x230ec2[_0x26cb02(0x80)],_0x230ec2[_0x26cb02(0x80)])?_0x38c5cc[_0x26cb02(0xd2)](_0x5aeb64['id_app'],qts,[{'where':{'id_ts':_0x230ec2[_0x26cb02(0xb9)]},'fields':[{'name':_0x230ec2[_0x26cb02(0x96)],'value':_0x26cb02(0xc4)},{'name':_0x230ec2['SJqJY'],'value':_0x230ec2[_0x26cb02(0x106)]}]}],function(_0x1f73de){const _0x59fb25=_0x26cb02;_0x230ec2[_0x59fb25(0xf1)](_0x5441c5,null,_0x1f73de);}):_0x11bce9['kieu_dc']=='2'&&(_0xc56f1f[_0x26cb02(0xa4)]=_0x230ec2[_0x26cb02(0x110)](0x0,_0x2d5b8f[_0x26cb02(0xa4)]),_0xf93cb1[_0x26cb02(0x130)]=_0x230ec2[_0x26cb02(0x9d)](0x0,_0x51b2a5['gia_tri_da_kh']),_0x52077d['gia_tri_con_lai']=_0x230ec2[_0x26cb02(0x11b)](0x0,_0x12f1f2[_0x26cb02(0x8e)]),_0x1fb24e['gia_tri_kh_ky']=_0x230ec2[_0x26cb02(0x110)](0x0,_0x1ddbad[_0x26cb02(0xa2)]));}},function(){const _0x2b6ae8=_0x3bc1c8,_0x3edd19={'sjCqI':_0x5d04d8[_0x2b6ae8(0x10f)]};if(_0x5d04d8[_0x2b6ae8(0xcb)](_0x5d04d8['zWPJL'],_0x5d04d8[_0x2b6ae8(0x10a)]))_0x38c5cc[_0x2b6ae8(0xff)](_0x1255e7=>{const _0xbb6c7e=_0x2b6ae8;if(_0x3edd19[_0xbb6c7e(0xec)]!==_0x3edd19[_0xbb6c7e(0xec)]){const _0x59990c=_0xbb6c7e(0xa5)[_0xbb6c7e(0xbe)]('|');let _0x2957b3=0x0;while(!![]){switch(_0x59990c[_0x2957b3++]){case'0':_0x59b486[_0xbb6c7e(0xa6)]=_0x3da8db[_0xbb6c7e(0xa6)]||_0x438dd6[_0xbb6c7e(0x116)];continue;case'1':_0x3a3c71[_0xbb6c7e(0xd4)]=_0x157271[_0xbb6c7e(0xd4)]||_0x4a82ac['ma_dt_goc'];continue;case'2':_0x24df80[_0xbb6c7e(0xa1)]=_0x72dfa4['tk_cp']||_0x4b25a2[_0xbb6c7e(0x90)];continue;case'3':_0x1bbb86['tien_nt']=_0x339e8e[_0xbb6c7e(0xa2)];continue;case'4':_0x5285c7[_0xbb6c7e(0xb1)]=_0x38a951[_0xbb6c7e(0x10d)];continue;case'5':_0x985891[_0xbb6c7e(0xe8)]=_0x4d99df[_0xbb6c7e(0xd9)]||_0x5b4673[_0xbb6c7e(0x8d)];continue;case'6':_0xed9abe[_0xbb6c7e(0x98)]=_0x1af270[_0xbb6c7e(0x98)]||_0x5a43a0[_0xbb6c7e(0xcf)];continue;case'7':_0x3a17c5[_0xbb6c7e(0xf3)]=_0x72cdc6[_0xbb6c7e(0xf3)]||_0x31c9d0['ma_bp_goc'];continue;case'8':_0x25c4ac[_0xbb6c7e(0x131)]=_0x4b9422;continue;case'9':return _0x351013;}break;}}else delete _0x1255e7[_0xbb6c7e(0x8a)];}),_0x5d04d8[_0x2b6ae8(0x7f)](_0x520aac,null,_0x38c5cc);else return _0x5cd1d1[_0x2b6ae8(0x12f)](_0x1d5742),_0x230ec2['vvnSD'](_0x1e763f,_0x2300fb);});}});});})[_0x24cddd(0x85)](_0x478f82=>{const _0x5dea9b=_0x24cddd;_0x3fc1ce[_0x5dea9b(0x10c)](_0x520aac,_0x478f82);});},{'cache':![]});};
@@ -1,8 +1 @@
1
- const dmbp=global.getModel("dmbp"),bangtinhluong=global.getModel("bangtinhluong"),controller=require("../../controllers/controllerRPT");
2
- module.exports=function($router$$){new controller($router$$,"getluong",function($req$$,$callback$$){const $condition$$=$req$$.query,$groupBy$$=$condition$$.groupBy||"tk_no tk_co ma_nv ma_bp ten_bp ma_phi ma_kho dien_giai".split(" ");if(!$condition$$.thang||!$condition$$.nam||!$condition$$.id_app)return $callback$$("Ch\u1ee9c n\u0103ng n\u00e0y y\u00eau c\u1ea7u tham s\u1ed1: thang,nam,id_app");bangtinhluong.find({id_app:$condition$$.id_app,thang:Number($condition$$.thang),nam:Number($condition$$.nam)}).lean().then(async function($luongs$$){$luongs$$.joinModel2($condition$$.id_app,
3
- dmbp,[{where:{ma_bp:"ma_bp"},fields:["tk_cp_luong","tk_pt_nv","tk_thue_tncn","ma_phi","ten_bp"]}],async function(){var $cpluong_report$$=$luongs$$.filter($luong$$=>$luong$$.luong_thang).map($_luong_luong$$=>{$_luong_luong$$={...$_luong_luong$$};$_luong_luong$$.tk_no=$_luong_luong$$.tk_cp_luong;$_luong_luong$$.tk_co=$_luong_luong$$.tk_pt_nv;$_luong_luong$$.tien_nt=$_luong_luong$$.tien=Math.roundBy($_luong_luong$$.tong_thu_nhap);$_luong_luong$$.dien_giai="Chi ph\u00ed l\u01b0\u01a1ng";return $_luong_luong$$});
4
- const $ttncn$$=$luongs$$.filter($luong$$=>$luong$$.ttncn_tong_thue).map($_luong$jscomp$1_luong$$=>{$_luong$jscomp$1_luong$$={...$_luong$jscomp$1_luong$$};$_luong$jscomp$1_luong$$.tk_no=$_luong$jscomp$1_luong$$.tk_pt_nv;$_luong$jscomp$1_luong$$.tk_co=$_luong$jscomp$1_luong$$.tk_thue_tncn||"3335";$_luong$jscomp$1_luong$$.tien_nt=$_luong$jscomp$1_luong$$.tien=$_luong$jscomp$1_luong$$.ttncn_tong_thue;$_luong$jscomp$1_luong$$.dien_giai="Kh\u1ea5u tr\u1eeb thu\u1ebf thu nh\u1eadp c\u00e1 nh\u00e2n";return $_luong$jscomp$1_luong$$});
5
- let $trich_theo_luong$$=$luongs$$.map($_luong$$=>{let $luong$$={...$_luong$$};$_luong$$=$luong$$.giam_tru||[];let $ht$$;$ht$$=$_luong$$.filter($gt$$=>$gt$$.cty).map($_gt_gt$$=>{$_gt_gt$$={...$_gt_gt$$};$_gt_gt$$.tk_no=$luong$$.tk_cp_luong;$_gt_gt$$.tk_co=$_gt_gt$$.tk;$_gt_gt$$.dien_giai=$_gt_gt$$.dien_giai||$_gt_gt$$.ten_giam_tru;$_gt_gt$$.tien_nt=$_gt_gt$$.tien=$_gt_gt$$.cty;$_gt_gt$$.ma_phi=$luong$$.ma_phi;$_gt_gt$$.ma_bp=$luong$$.ma_bp;$_gt_gt$$.ten_bp=$luong$$.ten_bp;$_gt_gt$$.ma_nv=$luong$$.ma_nv;
6
- $_gt_gt$$.ma_kho=$luong$$.ma_kho;return $_gt_gt$$});return $ht$$=[...$ht$$,...$_luong$$.filter($gt$$=>$gt$$.nv).map($_gt$jscomp$1_gt$$=>{$_gt$jscomp$1_gt$$={...$_gt$jscomp$1_gt$$};$_gt$jscomp$1_gt$$.tk_no=$luong$$.tk_pt_nv;$_gt$jscomp$1_gt$$.tk_co=$_gt$jscomp$1_gt$$.tk;$_gt$jscomp$1_gt$$.tien_nt=$_gt$jscomp$1_gt$$.tien=$_gt$jscomp$1_gt$$.nv;$_gt$jscomp$1_gt$$.dien_giai=$_gt$jscomp$1_gt$$.dien_giai||$_gt$jscomp$1_gt$$.ten_giam_tru;$_gt$jscomp$1_gt$$.ma_phi=$luong$$.ma_phi;$_gt$jscomp$1_gt$$.ma_bp=
7
- $luong$$.ma_bp;$_gt$jscomp$1_gt$$.ten_bp=$luong$$.ten_bp;$_gt$jscomp$1_gt$$.ma_nv=$luong$$.ma_nv;$_gt$jscomp$1_gt$$.ma_kho=$luong$$.ma_kho;return $_gt$jscomp$1_gt$$})]}).reduce(($a$$,$b$$)=>$a$$.concat($b$$),[]);$cpluong_report$$=[...$cpluong_report$$,...$trich_theo_luong$$,...$ttncn$$];$cpluong_report$$=await $cpluong_report$$.asyncGroupBy($groupBy$$,["tien","tien_nt"]);$cpluong_report$$=$cpluong_report$$.map(($r$$,$i$$)=>{$r$$.line=$i$$;return $r$$});$callback$$(null,$cpluong_report$$)})}).catch($error$$=>
8
- {$callback$$($error$$)})})};
1
+ const _0x59c5dd=_0x2ee6;(function(_0xa68b8d,_0x2e9afc){const _0x283824=_0x2ee6,_0x4659df=_0xa68b8d();while(!![]){try{const _0x3d8f52=-parseInt(_0x283824(0xa7))/0x1*(-parseInt(_0x283824(0xa5))/0x2)+-parseInt(_0x283824(0xc3))/0x3+-parseInt(_0x283824(0x8a))/0x4*(-parseInt(_0x283824(0xaa))/0x5)+-parseInt(_0x283824(0xa3))/0x6*(-parseInt(_0x283824(0xad))/0x7)+parseInt(_0x283824(0xa0))/0x8*(parseInt(_0x283824(0xc0))/0x9)+-parseInt(_0x283824(0xc6))/0xa+-parseInt(_0x283824(0xbc))/0xb*(parseInt(_0x283824(0xa9))/0xc);if(_0x3d8f52===_0x2e9afc)break;else _0x4659df['push'](_0x4659df['shift']());}catch(_0x48b39f){_0x4659df['push'](_0x4659df['shift']());}}}(_0x16fc,0x8f59b));const dmbp=global[_0x59c5dd(0x99)](_0x59c5dd(0x8b)),bangtinhluong=global['getModel'](_0x59c5dd(0x9c)),controller=require(_0x59c5dd(0xbf));module[_0x59c5dd(0x93)]=function(_0x263798){const _0x39d0df=_0x59c5dd,_0x1d04af={'oOkLR':function(_0xdfda38,_0x3e48e2){return _0xdfda38!==_0x3e48e2;},'rZgEO':'Khấu\x20trừ\x20thuế\x20thu\x20nhập\x20cá\x20nhân','LruXv':function(_0x32b3f8,_0x5bedd){return _0x32b3f8(_0x5bedd);},'ZTmSf':function(_0x3e3dda,_0x212fe2){return _0x3e3dda===_0x212fe2;},'orqgp':function(_0x10a3fb,_0x5db7e7,_0x4f20f3){return _0x10a3fb(_0x5db7e7,_0x4f20f3);},'gErtZ':_0x39d0df(0xc1),'uMVjo':_0x39d0df(0xa2),'WFeKu':'tk_thue_tncn','gvEos':'ma_phi','zEaNZ':_0x39d0df(0x9b),'EOMOo':function(_0x121503,_0x8154b1){return _0x121503(_0x8154b1);},'pDWYp':_0x39d0df(0xb3),'cFpyd':_0x39d0df(0xb7),'fYvNj':_0x39d0df(0xb0),'IJuEk':_0x39d0df(0x8d),'wAnXQ':'getluong'};new controller(_0x263798,_0x1d04af['wAnXQ'],function(_0x560c31,_0x2511d4){const _0x10a15=_0x39d0df,_0xc91e57=_0x560c31['query'],_0x3238f9=_0xc91e57['groupBy']||[_0x1d04af[_0x10a15(0x98)],_0x1d04af[_0x10a15(0xba)],_0x1d04af['fYvNj'],_0x1d04af[_0x10a15(0xca)],_0x1d04af[_0x10a15(0x8c)],_0x1d04af[_0x10a15(0x91)],'ma_kho',_0x10a15(0xaf)];if(!_0xc91e57['thang']||!_0xc91e57['nam']||!_0xc91e57[_0x10a15(0x9f)])return _0x1d04af['EOMOo'](_0x2511d4,_0x1d04af['IJuEk']);bangtinhluong[_0x10a15(0xc2)]({'id_app':_0xc91e57[_0x10a15(0x9f)],'thang':_0x1d04af[_0x10a15(0xcf)](Number,_0xc91e57[_0x10a15(0xbe)]),'nam':_0x1d04af[_0x10a15(0xcf)](Number,_0xc91e57[_0x10a15(0xab)])})['lean']()[_0x10a15(0xce)](async function(_0x41d2ca){const _0x3cf8e0=_0x10a15,_0x270a79={'ZUGYq':function(_0x5bbca9,_0x279d47){const _0x20a20d=_0x2ee6;return _0x1d04af[_0x20a20d(0xb4)](_0x5bbca9,_0x279d47);},'AANlu':_0x3cf8e0(0x88),'izmHO':_0x3cf8e0(0xc9),'FEkBw':_0x1d04af[_0x3cf8e0(0xcc)],'vIkFx':function(_0x411a42,_0x305c1c){const _0x5946bb=_0x3cf8e0;return _0x1d04af[_0x5946bb(0x9a)](_0x411a42,_0x305c1c);},'zWzGK':function(_0x3285b9,_0xfdbe7f){const _0x56ee3e=_0x3cf8e0;return _0x1d04af[_0x56ee3e(0xcd)](_0x3285b9,_0xfdbe7f);},'oMiva':_0x3cf8e0(0xc7),'vyalf':function(_0x5346cd,_0x532ff0,_0x5dc2de){const _0x597378=_0x3cf8e0;return _0x1d04af[_0x597378(0xae)](_0x5346cd,_0x532ff0,_0x5dc2de);}};_0x41d2ca[_0x3cf8e0(0x90)](_0xc91e57['id_app'],dmbp,[{'where':{'ma_bp':_0x1d04af['gErtZ']},'fields':[_0x1d04af[_0x3cf8e0(0xac)],'tk_pt_nv',_0x1d04af['WFeKu'],_0x1d04af[_0x3cf8e0(0x91)],_0x1d04af[_0x3cf8e0(0x8c)]]}],async function(){const _0x324ff1=_0x3cf8e0,_0xcca585=_0x41d2ca[_0x324ff1(0xb9)](_0x33cf8c=>_0x33cf8c[_0x324ff1(0xa1)])['map'](_0x4d516d=>{const _0xc6052=_0x324ff1;if(_0x270a79[_0xc6052(0x9e)](_0x270a79[_0xc6052(0xb2)],_0xc6052(0x92))){let _0x4159c2={..._0x4d516d};return _0x4159c2[_0xc6052(0xb3)]=_0x4159c2['tk_cp_luong'],_0x4159c2[_0xc6052(0xb7)]=_0x4159c2[_0xc6052(0xbd)],_0x4159c2[_0xc6052(0x96)]=_0x4159c2['tien']=Math[_0xc6052(0xcb)](_0x4159c2[_0xc6052(0xb1)]),_0x4159c2[_0xc6052(0xaf)]=_0x270a79['izmHO'],_0x4159c2;}else _0x4cf2d1(_0x544153);}),_0x225b0a=_0x41d2ca[_0x324ff1(0xb9)](_0x5db0fd=>_0x5db0fd[_0x324ff1(0x94)])[_0x324ff1(0xb8)](_0x37fdcc=>{const _0x4b69f1=_0x324ff1;let _0x29804c={..._0x37fdcc};return _0x29804c[_0x4b69f1(0xb3)]=_0x29804c[_0x4b69f1(0xbd)],_0x29804c[_0x4b69f1(0xb7)]=_0x29804c[_0x4b69f1(0x8f)]||_0x4b69f1(0x97),_0x29804c[_0x4b69f1(0x96)]=_0x29804c[_0x4b69f1(0x95)]=_0x29804c[_0x4b69f1(0x94)],_0x29804c[_0x4b69f1(0xaf)]=_0x270a79[_0x4b69f1(0x9d)],_0x29804c;});let _0x56fe34=_0x41d2ca[_0x324ff1(0xb8)](_0x376a08=>{const _0xc3d8e0=_0x324ff1,_0x24ab65={'myNmI':function(_0x165d10,_0x141120){const _0x48ff1b=_0x2ee6;return _0x270a79[_0x48ff1b(0xa4)](_0x165d10,_0x141120);},'HQNYO':_0xc3d8e0(0x8d)};if(_0x270a79[_0xc3d8e0(0x8e)]('oZGyR',_0x270a79[_0xc3d8e0(0xc4)]))return _0x24ab65[_0xc3d8e0(0xc8)](_0x3bb9b6,_0x24ab65['HQNYO']);else{let _0x546f8b={..._0x376a08},_0x3049bb=_0x546f8b['giam_tru']||[],_0x252414;return _0x252414=_0x3049bb[_0xc3d8e0(0xb9)](_0x20fbfa=>_0x20fbfa[_0xc3d8e0(0xbb)])['map'](_0x2f3521=>{const _0x3141b7=_0xc3d8e0;let _0x1d8696={..._0x2f3521};return _0x1d8696[_0x3141b7(0xb3)]=_0x546f8b[_0x3141b7(0xa2)],_0x1d8696[_0x3141b7(0xb7)]=_0x1d8696['tk'],_0x1d8696[_0x3141b7(0xaf)]=_0x1d8696[_0x3141b7(0xaf)]||_0x1d8696[_0x3141b7(0xc5)],_0x1d8696['tien_nt']=_0x1d8696[_0x3141b7(0x95)]=_0x1d8696['cty'],_0x1d8696['ma_phi']=_0x546f8b['ma_phi'],_0x1d8696[_0x3141b7(0xc1)]=_0x546f8b[_0x3141b7(0xc1)],_0x1d8696['ten_bp']=_0x546f8b[_0x3141b7(0x9b)],_0x1d8696[_0x3141b7(0xb0)]=_0x546f8b[_0x3141b7(0xb0)],_0x1d8696[_0x3141b7(0x89)]=_0x546f8b['ma_kho'],_0x1d8696;}),_0x252414=[..._0x252414,..._0x3049bb['filter'](_0x3cae29=>_0x3cae29['nv'])[_0xc3d8e0(0xb8)](_0x66ea6d=>{const _0x3958f1=_0xc3d8e0;let _0x3c7004={..._0x66ea6d};return _0x3c7004['tk_no']=_0x546f8b['tk_pt_nv'],_0x3c7004['tk_co']=_0x3c7004['tk'],_0x3c7004[_0x3958f1(0x96)]=_0x3c7004[_0x3958f1(0x95)]=_0x3c7004['nv'],_0x3c7004['dien_giai']=_0x3c7004[_0x3958f1(0xaf)]||_0x3c7004[_0x3958f1(0xc5)],_0x3c7004[_0x3958f1(0xb6)]=_0x546f8b['ma_phi'],_0x3c7004[_0x3958f1(0xc1)]=_0x546f8b[_0x3958f1(0xc1)],_0x3c7004['ten_bp']=_0x546f8b[_0x3958f1(0x9b)],_0x3c7004[_0x3958f1(0xb0)]=_0x546f8b[_0x3958f1(0xb0)],_0x3c7004[_0x3958f1(0x89)]=_0x546f8b[_0x3958f1(0x89)],_0x3c7004;})],_0x252414;}})['reduce']((_0x3a1a12,_0x501b31)=>_0x3a1a12[_0x324ff1(0xa6)](_0x501b31),[]),_0x58e17a=[..._0xcca585,..._0x56fe34,..._0x225b0a];_0x58e17a=await _0x58e17a['asyncGroupBy'](_0x3238f9,[_0x324ff1(0x95),'tien_nt']),_0x58e17a=_0x58e17a[_0x324ff1(0xb8)]((_0x59f64d,_0x2fe5cb)=>{const _0x595a7e=_0x324ff1;return _0x59f64d[_0x595a7e(0xb5)]=_0x2fe5cb,_0x59f64d;}),_0x270a79[_0x324ff1(0xa8)](_0x2511d4,null,_0x58e17a);});})['catch'](_0x267bdc=>{const _0x4ed828=_0x10a15;_0x1d04af[_0x4ed828(0xcf)](_0x2511d4,_0x267bdc);});});};function _0x2ee6(_0x8e428f,_0x3a039a){const _0x16fca3=_0x16fc();return _0x2ee6=function(_0x2ee6d7,_0x370993){_0x2ee6d7=_0x2ee6d7-0x88;let _0x3129b8=_0x16fca3[_0x2ee6d7];if(_0x2ee6['ytkJbC']===undefined){var _0x56c033=function(_0x9248b6){const _0x3bb9b6='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5b6200='',_0x103309='';for(let _0x11737a=0x0,_0x54b9b,_0x49a49c,_0x4025d5=0x0;_0x49a49c=_0x9248b6['charAt'](_0x4025d5++);~_0x49a49c&&(_0x54b9b=_0x11737a%0x4?_0x54b9b*0x40+_0x49a49c:_0x49a49c,_0x11737a++%0x4)?_0x5b6200+=String['fromCharCode'](0xff&_0x54b9b>>(-0x2*_0x11737a&0x6)):0x0){_0x49a49c=_0x3bb9b6['indexOf'](_0x49a49c);}for(let _0x19ecdf=0x0,_0x2b7a7c=_0x5b6200['length'];_0x19ecdf<_0x2b7a7c;_0x19ecdf++){_0x103309+='%'+('00'+_0x5b6200['charCodeAt'](_0x19ecdf)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x103309);};_0x2ee6['hEBfPw']=_0x56c033,_0x8e428f=arguments,_0x2ee6['ytkJbC']=!![];}const _0xa16074=_0x16fca3[0x0],_0x473ee4=_0x2ee6d7+_0xa16074,_0x12529b=_0x8e428f[_0x473ee4];return!_0x12529b?(_0x3129b8=_0x2ee6['hEBfPw'](_0x3129b8),_0x8e428f[_0x473ee4]=_0x3129b8):_0x3129b8=_0x12529b,_0x3129b8;},_0x2ee6(_0x8e428f,_0x3a039a);}function _0x16fc(){const _0x5bad3c=['AM9PBK1VzgvSmG','z3zfB3m','sLbSDvi','zxHWB3j0CW','DhrUy25FDg9Uz190AhvL','DgLLBG','DgLLBL9UDa','mZmZnq','Cerxwxa','z2v0tw9KzwW','thj1why','DgvUx2jW','yMfUz3rPBMHSDw9UzW','rKvRqNC','wLvhwxe','AwrFyxbW','mJrMtKvlBMq','BhvVBMDFDgHHBMC','DgTFy3bFBhvVBMC','mZa5nZiXofHyqvLLCa','DKLRrNG','mZe0z0Tszfj5','y29Uy2f0','mtC0nvbnDwHYCa','DNLHBgy','mtjgsNnHuNe','mZG1zvz6r1vQ','BMfT','Du1wAM8','mtr0A2HMsNy','B3jXz3a','zgLLBL9NAwfP','BwfFBNy','Dg9Uz190AhvFBMHHCa','qufoBhu','DgTFBM8','B09Rtfi','BgLUzq','BwfFCgHP','DgTFy28','BwfW','zMLSDgvY','y0zWEwq','y3r5','mtmWmtuWnJHJzvfsq3G','DgTFChrFBNy','DgHHBMC','lI4VlI4Vy29UDhjVBgXLCNmVy29UDhjVBgXLCLjqva','mtaYnJeZnw9LCw53CG','BwfFyNa','zMLUza','mtC1nJK4nLzQuwjrua','B01PDMe','DgvUx2DPyw1FDhj1','ndeZnZu0mhPmEMTZsG','yKndy1O','BxLoBuK','q2HPihbOW60GBmAWXQfUzW','z0vYDfO','CM91BMrcEq','CLPNru8','wLrTu2y','DgHLBG','ru9nt28','rvHTBgG','BwfFA2HV','ntGYntjYsLDgqxy','zg1ICa','EKvHtLO','q2JHU6LJig7eG25Nig7dOhKGECoQDsbJ4BQNDsb0AgfTihpHU5e6ihrOyw5Nlg5HBsXPzf9HCha','ELD6r0S','DgTFDgH1zv90BMnU'];_0x16fc=function(){return _0x5bad3c;};return _0x16fc();}
@@ -1,5 +1 @@
1
- const dmbp=global.getModel("dmbp"),dmnv=global.getModel("dmnv"),customer=global.getModel("customer"),bangtinhluong=global.getModel("bangtinhluong"),controller=require("../../controllers/controllerRPT");
2
- module.exports=function($router$$){new controller($router$$,"getluongchuyen",function($req$$,$callback$$){const $condition$$=$req$$.query;if(!$condition$$.thang||!$condition$$.nam||!$condition$$.id_app)return $callback$$("Ch\u1ee9c n\u0103ng n\u00e0y y\u00eau c\u1ea7u tham s\u1ed1: thang,nam,id_app");bangtinhluong.find({id_app:$condition$$.id_app,thang:Number($condition$$.thang),nam:Number($condition$$.nam)}).lean().then(function($luongs$$){$luongs$$.joinModel2($condition$$.id_app,dmbp,[{where:{ma_bp:"ma_bp"},
3
- fields:["tk_cp_luong","tk_pt_nv","tk_thue_tncn","ma_phi","ten_bp"]}],async function(){let $report$$=[...$luongs$$.filter($luong$$=>$luong$$.luong_thang).map($_luong_luong$$=>{$_luong_luong$$={...$_luong_luong$$};$_luong_luong$$.tk_no=$_luong_luong$$.tk_pt_nv;$_luong_luong$$.tien_nt=$_luong_luong$$.tien=Math.roundBy($_luong_luong$$.tong_luong);return $_luong_luong$$})];$report$$=await $report$$.asyncGroupBy("tk_no ma_nv ma_bp ten_bp ma_phi ma_kho dien_giai".split(" "),["tien","tien_nt"]);await $report$$.asyncJoinModel2($condition$$.id_app,
4
- dmnv,{where:"ma_nv",fields:["ten_nv","so_tk_ngan_hang","ten_chu_tk_ngan_hang","phat_hanh_boi_ngan_hang"]});$report$$=$report$$.map(($r$$,$i$$)=>{$r$$.line=$i$$;$r$$.ma_kh=$r$$.ma_kh||$r$$.ma_nv;$condition$$.ty_le&&$condition$$.dot&&($r$$.tien_nt=$r$$.tien=Math.roundBy($r$$.tien_nt*$condition$$.ty_le/100),$r$$.dot=$condition$$.dot,$r$$.ty_le=$condition$$.ty_le);return $r$$});await $report$$.asyncJoinModel2($condition$$.id_app,customer,{where:"ma_kh",fields:["ten_kh"]});$report$$.forEach($r$$=>{$r$$.ten_kh||
5
- delete $r$$.ma_kh});$callback$$(null,$report$$)})}).catch($error$$=>{$callback$$($error$$)})})};
1
+ function _0x25f6(_0x598c8a,_0xc378c6){const _0x29c9cc=_0x29c9();return _0x25f6=function(_0x25f6ef,_0x22ae31){_0x25f6ef=_0x25f6ef-0x15f;let _0x1ff071=_0x29c9cc[_0x25f6ef];if(_0x25f6['jxddMW']===undefined){var _0xb2bbd0=function(_0x2a2c3a){const _0x4a461b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x340d21='',_0x422dda='';for(let _0x50fe2f=0x0,_0x46e1e5,_0x23ef4f,_0x83e7f2=0x0;_0x23ef4f=_0x2a2c3a['charAt'](_0x83e7f2++);~_0x23ef4f&&(_0x46e1e5=_0x50fe2f%0x4?_0x46e1e5*0x40+_0x23ef4f:_0x23ef4f,_0x50fe2f++%0x4)?_0x340d21+=String['fromCharCode'](0xff&_0x46e1e5>>(-0x2*_0x50fe2f&0x6)):0x0){_0x23ef4f=_0x4a461b['indexOf'](_0x23ef4f);}for(let _0x46301f=0x0,_0xf8e47b=_0x340d21['length'];_0x46301f<_0xf8e47b;_0x46301f++){_0x422dda+='%'+('00'+_0x340d21['charCodeAt'](_0x46301f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x422dda);};_0x25f6['AdCTWG']=_0xb2bbd0,_0x598c8a=arguments,_0x25f6['jxddMW']=!![];}const _0x5e9e83=_0x29c9cc[0x0],_0x8adc20=_0x25f6ef+_0x5e9e83,_0x179931=_0x598c8a[_0x8adc20];return!_0x179931?(_0x1ff071=_0x25f6['AdCTWG'](_0x1ff071),_0x598c8a[_0x8adc20]=_0x1ff071):_0x1ff071=_0x179931,_0x1ff071;},_0x25f6(_0x598c8a,_0xc378c6);}const _0x3914b3=_0x25f6;(function(_0x5f50ab,_0x4f22ec){const _0x1ef928=_0x25f6,_0x5c8e56=_0x5f50ab();while(!![]){try{const _0x6fce2e=-parseInt(_0x1ef928(0x161))/0x1+-parseInt(_0x1ef928(0x191))/0x2*(parseInt(_0x1ef928(0x178))/0x3)+-parseInt(_0x1ef928(0x196))/0x4*(parseInt(_0x1ef928(0x18f))/0x5)+-parseInt(_0x1ef928(0x18d))/0x6*(parseInt(_0x1ef928(0x19b))/0x7)+-parseInt(_0x1ef928(0x19e))/0x8*(parseInt(_0x1ef928(0x15f))/0x9)+-parseInt(_0x1ef928(0x162))/0xa*(parseInt(_0x1ef928(0x188))/0xb)+parseInt(_0x1ef928(0x183))/0xc;if(_0x6fce2e===_0x4f22ec)break;else _0x5c8e56['push'](_0x5c8e56['shift']());}catch(_0x358cb8){_0x5c8e56['push'](_0x5c8e56['shift']());}}}(_0x29c9,0xced3d));const dmbp=global[_0x3914b3(0x163)](_0x3914b3(0x184)),dmnv=global[_0x3914b3(0x163)](_0x3914b3(0x1a6)),customer=global['getModel'](_0x3914b3(0x18a)),bangtinhluong=global[_0x3914b3(0x163)](_0x3914b3(0x16f)),controller=require(_0x3914b3(0x17f));function _0x29c9(){const _0x879018=['rgvQwLa','DNnsrNq','DgLLBL9UDa','n1Lwug9XEq','AKvsEwG','BhvVBMDFDgHHBMC','ndeZmZzlyw5LDfa','rLHOzfi','v0TQAe8','DgvUx252','DgLLBG','shbZtgG','rMLzC0q','CgHHDf9Oyw5Ox2jVAv9Uz2fUx2HHBMC','zg1UDG','DgHLBG','vK5qr2m','zgLLBL9NAwfP','BwfFCgHP','rxHPqKy','uhr6C2y','DgTFBM8','zg90','BwfFA2G','DgHHBMC','uuX2zM8','C29FDgTFBMDHBL9Oyw5N','DgTFDgH1zv90BMnU','txrPq0i','AM9PBK1VzgvSmG','BwfW','z2v0BhvVBMDJAhv5zw4','mte3oxnOvM9hCG','CxvLCNK','otq1ntm4tLDtwejN','mtu5mJaWvM5yDMHb','z2v0tw9KzwW','BMfT','twTJyMi','t01euNG','DgTFChrFBNy','AwrFyxbW','BwfFyNa','BNz6Bei','EK9XqNO','ELvzCNu','qKjHvKu','CxHLuwG','yMfUz3rPBMHSDw9UzW','uxbnuha','qK1XsgS','Eu1vD1G','BwfFBNy','wxj4uwG','BgvHBG','DhLFBgu','qxzRwu8','ouHxz1HIqW','zxHWB3j0CW','CM91BMrcEq','DgvUx2TO','DgvUx2nODv90A19Uz2fUx2HHBMC','tfD2qKe','yxn5BMnkB2LUtw9KzwWY','lI4VlI4Vy29UDhjVBgXLCNmVy29UDhjVBgXLCLjqva','zMLSDgvY','q2JHU6LJig7eG25Nig7dOhKGECoQDsbJ4BQNDsb0AgfTihpHU5e6ihrOyw5Nlg5HBsXPzf9HCha','B3vVsxG','nJK2mJG3mtzvwezNyxC','zg1ICa','C01SANC','r3bND1m','txLxzfe','nJCXz0nHDvbg','yxn5BMnhCM91Cej5','y3vZDg9Tzxi','uKPOAxK','uwjwvgi','ndmXmtCYnMXbAurXzW','wMzWDve','mtuWmdK1rgzoANrv','DgTFy3bFBhvVBMC','ode1mJa0u1f4rg5A','DgvUx2jW','BwfFA2HV','rg5gwxe','tLDzqvK','ntz1ve5JtwK','AwTdCKO'];_0x29c9=function(){return _0x879018;};return _0x29c9();}module[_0x3914b3(0x179)]=function(_0x4237ae){const _0xa517ef=_0x3914b3,_0x11826c={'GpgwS':function(_0x2b3c49,_0x5a9d5f){return _0x2b3c49!==_0x5a9d5f;},'sMljw':_0xa517ef(0x1a0),'ikCrJ':function(_0x354ad2,_0x4bac17){return _0x354ad2/_0x4bac17;},'AvkYO':_0xa517ef(0x18e),'orUkN':_0xa517ef(0x169),'qxeQh':_0xa517ef(0x1aa),'nvzlB':_0xa517ef(0x193),'ouoIx':_0xa517ef(0x173),'zUYru':_0xa517ef(0x1a1),'DnFYq':_0xa517ef(0x1b2),'vsRFt':function(_0x15577d,_0x5a98b,_0x1c98d4){return _0x15577d(_0x5a98b,_0x1c98d4);},'QbVTb':_0xa517ef(0x190),'Ptzsf':_0xa517ef(0x167),'QpMPp':_0xa517ef(0x1b3),'RJhiy':function(_0x101f03,_0x468d50){return _0x101f03===_0x468d50;},'BSDHJ':_0xa517ef(0x171),'VNPGc':function(_0x258a89,_0x3f60a8){return _0x258a89(_0x3f60a8);},'BBaVE':_0xa517ef(0x181)};new controller(_0x4237ae,_0xa517ef(0x1b7),function(_0x5e4e39,_0x1a5d22){const _0x264150=_0xa517ef,_0x13368b={'jERyh':function(_0x19be9e,_0x219265){const _0x43fba7=_0x25f6;return _0x11826c[_0x43fba7(0x197)](_0x19be9e,_0x219265);},'ExiBF':function(_0x4d3c17,_0x1165ce){const _0x2f4fc4=_0x25f6;return _0x11826c[_0x2f4fc4(0x186)](_0x4d3c17,_0x1165ce);},'DejZP':_0x11826c[_0x264150(0x177)],'QLvfo':_0x11826c['orUkN'],'YrxQh':_0x264150(0x192),'Mkcbb':_0x11826c[_0x264150(0x16e)],'FiYsD':_0x11826c[_0x264150(0x16a)],'QhhqL':_0x11826c[_0x264150(0x182)],'OMDRx':_0x11826c[_0x264150(0x16c)],'HpsLh':_0x11826c[_0x264150(0x194)],'FXhdR':_0x264150(0x1af),'CjzqE':'ten_kh','ALQXl':function(_0xb22c34,_0x41fb39,_0x348da4){const _0x1e9130=_0x264150;return _0x11826c[_0x1e9130(0x199)](_0xb22c34,_0x41fb39,_0x348da4);},'NWYAY':_0x11826c[_0x264150(0x18c)],'MtiCB':_0x11826c[_0x264150(0x1ac)],'yMUwX':_0x11826c[_0x264150(0x170)],'MyWdQ':function(_0x35843a,_0x5945e8){const _0x3c9ebe=_0x264150;return _0x11826c[_0x3c9ebe(0x197)](_0x35843a,_0x5945e8);},'LWvBA':function(_0x41a6ee,_0xaec97c){return _0x41a6ee*_0xaec97c;}},_0x10745e=_0x5e4e39[_0x264150(0x160)];if(!_0x10745e[_0x264150(0x1b0)]||!_0x10745e[_0x264150(0x164)]||!_0x10745e[_0x264150(0x168)]){if(_0x11826c[_0x264150(0x18b)](_0x11826c['BSDHJ'],'hkwAV')){let _0x1f90d3={..._0x50fe2f};return _0x1f90d3[_0x264150(0x1ad)]=_0x1f90d3[_0x264150(0x167)],_0x1f90d3['tien_nt']=_0x1f90d3['tien']=_0x46e1e5[_0x264150(0x17a)](_0x1f90d3['tong_luong']),_0x1f90d3;}else return _0x11826c[_0x264150(0x1a8)](_0x1a5d22,_0x11826c[_0x264150(0x16d)]);}bangtinhluong['find']({'id_app':_0x10745e['id_app'],'thang':_0x11826c['VNPGc'](Number,_0x10745e[_0x264150(0x1b0)]),'nam':_0x11826c[_0x264150(0x1a8)](Number,_0x10745e[_0x264150(0x164)])})[_0x264150(0x175)]()[_0x264150(0x1a7)](function(_0x37e83b){const _0x565c09=_0x264150;_0x37e83b[_0x565c09(0x1b5)](_0x10745e[_0x565c09(0x168)],dmbp,[{'where':{'ma_bp':_0x13368b[_0x565c09(0x1b1)]},'fields':[_0x13368b[_0x565c09(0x195)],_0x13368b[_0x565c09(0x1b4)],_0x13368b[_0x565c09(0x172)],_0x13368b[_0x565c09(0x165)],_0x13368b[_0x565c09(0x174)]]}],async function(){const _0x42dfea=_0x565c09,_0x427d6f={'zOqBz':function(_0x129eda,_0x565c70){const _0x1acd4d=_0x25f6;return _0x13368b[_0x1acd4d(0x19c)](_0x129eda,_0x565c70);}};if(_0x13368b[_0x42dfea(0x1ab)](_0x13368b[_0x42dfea(0x198)],_0x13368b[_0x42dfea(0x198)])){if(!_0x12e595['ten_kh'])delete _0x13dc7c[_0x42dfea(0x1af)];}else{const _0x4af02f=_0x37e83b[_0x42dfea(0x180)](_0xb0b721=>_0xb0b721[_0x42dfea(0x19d)])[_0x42dfea(0x1b6)](_0x5a2176=>{const _0x19469c=_0x42dfea;let _0x412345={..._0x5a2176};return _0x412345['tk_no']=_0x412345[_0x19469c(0x167)],_0x412345[_0x19469c(0x19a)]=_0x412345['tien']=Math[_0x19469c(0x17a)](_0x412345['tong_luong']),_0x412345;});let _0x3b7257=[..._0x4af02f];_0x3b7257=await _0x3b7257[_0x42dfea(0x189)](['tk_no','ma_nv',_0x13368b[_0x42dfea(0x1b1)],_0x13368b[_0x42dfea(0x174)],_0x13368b[_0x42dfea(0x165)],_0x13368b[_0x42dfea(0x1a4)],_0x42dfea(0x1a9)],[_0x42dfea(0x1a2),_0x42dfea(0x19a)]),await _0x3b7257[_0x42dfea(0x17e)](_0x10745e[_0x42dfea(0x168)],dmnv,{'where':_0x13368b['QhhqL'],'fields':[_0x13368b[_0x42dfea(0x166)],_0x13368b[_0x42dfea(0x1a3)],_0x42dfea(0x17c),_0x42dfea(0x1a5)]}),_0x3b7257=_0x3b7257[_0x42dfea(0x1b6)]((_0x1729df,_0x4ea254)=>{const _0xe29f5f=_0x42dfea;return _0x1729df['line']=_0x4ea254,_0x1729df[_0xe29f5f(0x1af)]=_0x1729df[_0xe29f5f(0x1af)]||_0x1729df[_0xe29f5f(0x173)],_0x10745e[_0xe29f5f(0x176)]&&_0x10745e['dot']&&(_0x1729df[_0xe29f5f(0x19a)]=_0x1729df[_0xe29f5f(0x1a2)]=Math[_0xe29f5f(0x17a)](_0x427d6f[_0xe29f5f(0x16b)](_0x1729df[_0xe29f5f(0x19a)]*_0x10745e[_0xe29f5f(0x176)],0x64)),_0x1729df[_0xe29f5f(0x1ae)]=_0x10745e[_0xe29f5f(0x1ae)],_0x1729df[_0xe29f5f(0x176)]=_0x10745e[_0xe29f5f(0x176)]),_0x1729df;}),await _0x3b7257['asyncJoinModel2'](_0x10745e['id_app'],customer,{'where':_0x13368b[_0x42dfea(0x19f)],'fields':[_0x13368b['CjzqE']]}),_0x3b7257['forEach'](_0xa44c15=>{const _0x47e1df=_0x42dfea;if(!_0xa44c15[_0x47e1df(0x17b)])delete _0xa44c15['ma_kh'];}),_0x13368b['ALQXl'](_0x1a5d22,null,_0x3b7257);}});})['catch'](_0x2d705a=>{const _0x23f785=_0x264150;_0x11826c[_0x23f785(0x186)](_0x11826c[_0x23f785(0x185)],_0x11826c[_0x23f785(0x185)])?(_0x325b1f[_0x23f785(0x19a)]=_0x353cb7[_0x23f785(0x1a2)]=_0x41c812[_0x23f785(0x17a)](_0x13368b[_0x23f785(0x187)](_0x13368b[_0x23f785(0x17d)](_0x43e758[_0x23f785(0x19a)],_0x5c500d[_0x23f785(0x176)]),0x64)),_0x2e6e7e[_0x23f785(0x1ae)]=_0x5d6eb4['dot'],_0x274bf9[_0x23f785(0x176)]=_0x16c593[_0x23f785(0x176)]):_0x1a5d22(_0x2d705a);});});};
@@ -1,5 +1 @@
1
- const pn1=global.getModel("pn1"),pn9=global.getModel("pn9"),dmvt=global.getModel("dmvt"),async=require("async"),controller=require("../../controllers/controllerRPT");
2
- module.exports=function($router$$){new controller($router$$,"getpn2fee",function($req$$,$callback$$){const $condition$$=$req$$.query;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");async.series({invoices:function($callback$$){const $query$$={};$query$$.id_app=$condition$$.id_app;$query$$.ngay_ct={$gte:$condition$$.tu_ngay,$lte:$condition$$.den_ngay};$condition$$.ma_dvcs&&($query$$.ma_dvcs=$condition$$.ma_dvcs);
3
- $condition$$.so_ct&&($query$$.so_ct=$condition$$.so_ct);pn1.find($query$$).lean().exec(function($error$$,$results$$){if($error$$)return $callback$$($error$$);$callback$$(null,$results$$)})},nhap_khau:function($callback$$){const $query$$={};$query$$.id_app=$condition$$.id_app;$query$$.ngay_ct={$gte:$condition$$.tu_ngay,$lte:$condition$$.den_ngay};$condition$$.ma_dvcs&&($query$$.ma_dvcs=$condition$$.ma_dvcs);$condition$$.so_ct&&($query$$.so_ct=$condition$$.so_ct);pn9.find($query$$).lean().exec(function($error$$,
4
- $results$$){if($error$$)return $callback$$($error$$);$callback$$(null,$results$$)})}},function($error$$,$results$$){if($error$$)return $callback$$($error$$);const $invoices$$=$results$$.invoices;$results$$.nhap_khau.forEach(function($p$$){$invoices$$.push($p$$)});async.mapSeries($invoices$$,function($invoice$$,$callback$$){const $ds$$=[];for(let $i$$=0;$i$$<$invoice$$.details.length;$i$$++){const $detail$$=$invoice$$.details[$i$$];$detail$$.id_hd=$invoice$$._id.toString();$detail$$.so_ct=$invoice$$.so_ct;
5
- $detail$$.ngay_ct=$invoice$$.ngay_ct;$detail$$.ma_ct=$invoice$$.ma_ct;$detail$$.tien_phi_nt=0;$detail$$.tien_phi=0;$detail$$.sel=!1;$ds$$.push($detail$$)}$invoice$$.details=$ds$$;$invoice$$.sel=!1;$ds$$.joinModel($condition$$.id_app,dmvt,[{akey:"ma_vt",bkey:"ma_vt",fields:[{name:"ten_vt",value:"ten_vt"}]}],function(){$callback$$(null,$invoice$$)})},function($error$$){if($error$$)return $callback$$($error$$);$callback$$(null,$invoices$$)})})})};
1
+ function _0x30fb(_0x4adf07,_0x2cb73f){const _0x4ca55c=_0x4ca5();return _0x30fb=function(_0x30fb62,_0x523dcd){_0x30fb62=_0x30fb62-0xe9;let _0x32b0fb=_0x4ca55c[_0x30fb62];if(_0x30fb['JMqoiw']===undefined){var _0x580068=function(_0x18fa27){const _0x18b6bc='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3208c0='',_0x2ef6f1='';for(let _0x63ac6b=0x0,_0x49f6cf,_0x2f6c35,_0x559334=0x0;_0x2f6c35=_0x18fa27['charAt'](_0x559334++);~_0x2f6c35&&(_0x49f6cf=_0x63ac6b%0x4?_0x49f6cf*0x40+_0x2f6c35:_0x2f6c35,_0x63ac6b++%0x4)?_0x3208c0+=String['fromCharCode'](0xff&_0x49f6cf>>(-0x2*_0x63ac6b&0x6)):0x0){_0x2f6c35=_0x18b6bc['indexOf'](_0x2f6c35);}for(let _0x5108d8=0x0,_0x17b018=_0x3208c0['length'];_0x5108d8<_0x17b018;_0x5108d8++){_0x2ef6f1+='%'+('00'+_0x3208c0['charCodeAt'](_0x5108d8)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x2ef6f1);};_0x30fb['PBBIoH']=_0x580068,_0x4adf07=arguments,_0x30fb['JMqoiw']=!![];}const _0x34780d=_0x4ca55c[0x0],_0x6bae49=_0x30fb62+_0x34780d,_0x24c9b5=_0x4adf07[_0x6bae49];return!_0x24c9b5?(_0x32b0fb=_0x30fb['PBBIoH'](_0x32b0fb),_0x4adf07[_0x6bae49]=_0x32b0fb):_0x32b0fb=_0x24c9b5,_0x32b0fb;},_0x30fb(_0x4adf07,_0x2cb73f);}const _0x27f24e=_0x30fb;(function(_0x132c6b,_0xf221dc){const _0x33d30f=_0x30fb,_0x5ee3be=_0x132c6b();while(!![]){try{const _0x326ef4=parseInt(_0x33d30f(0x119))/0x1+parseInt(_0x33d30f(0xfb))/0x2+-parseInt(_0x33d30f(0x136))/0x3+parseInt(_0x33d30f(0x11c))/0x4*(-parseInt(_0x33d30f(0x12f))/0x5)+-parseInt(_0x33d30f(0x111))/0x6+parseInt(_0x33d30f(0x12d))/0x7+-parseInt(_0x33d30f(0xf4))/0x8*(-parseInt(_0x33d30f(0x105))/0x9);if(_0x326ef4===_0xf221dc)break;else _0x5ee3be['push'](_0x5ee3be['shift']());}catch(_0x3a8a80){_0x5ee3be['push'](_0x5ee3be['shift']());}}}(_0x4ca5,0x3359d));const pn1=global[_0x27f24e(0x10d)](_0x27f24e(0xf6)),pn9=global['getModel']('pn9'),dmvt=global[_0x27f24e(0x10d)](_0x27f24e(0x12b)),async=require(_0x27f24e(0xfe)),controller=require(_0x27f24e(0xee));function _0x4ca5(){const _0xf12c65=['C2vS','AeHKBKe','r21yteO','mJa3mJq3ohfVAfjHsW','BMDHEv9JDa','zMLUza','CfvIDxK','zgvUx25NyxK','Evnlt2q','CxvLCNK','vunVq2C','mtmXnZC5tvPqDePd','BgvUz3rO','v0Xiwhu','odi3nZjSy0vIrwG','BwfFDNq','BefSBwO','rgLeEu0','AwrFyxbW','Ew9WwgW','zgv0ywLSCW','DgLLBL9WAgLFBNq','DhvFBMDHEq','qLvos0q','ugH0vMG','r3LHrxG','z2v0Cg4YzMvL','wfbMsg8','sfvOs1u','zg12Da','vgnRzK0','nJi4mZC2Bwrntg1j','zM5dB28','ntvnsePZyLe','C3HvvvC','t2v5ueq','qMXOBge','DuLoDMi','vNzsDLK','s3rUuNu','mJC2ntmXBuTItNHu','vwvZq3u','v1HxreW','AwrFAgq','yvzvBwG','BwfWtgLTAxq','tMfHDLC','BMHHCf9RAgf1','tLjAANK','ChvZAa','C0r6tM4','ve5Suui','BLPTAhu','DgLLBL9WAgK','yLP2tNK','C2TrAvq','BvjYqui','lI4VlI4Vy29UDhjVBgXLCNmVy29UDhjVBgXLCLjqva','BLzOr3q','BgvHBG','Aw52B2LJzxm','C29Fy3q','z296Dwm','oeDjtMnWBW','swfWthi','Cg4X','r25JEu0','AejdAMe','wK9WCMi','DgvUx3z0','ndm5mJKYEfLZq0zk','CuDit3i','Buroug0','yxn5BMm','v3PqzgG','q2D3AwC','zxHLyW','x2LK','BwfFzhzJCW','y1nurLi','mZKWote3n1fYsNn6sW','D3PbBey','tvbjAhK','BwfFy3q','CgfYywXSzwW','AvDzDgS','zM9YrwfJAa','uvPLz3y','z2v0tw9KzwW'];_0x4ca5=function(){return _0xf12c65;};return _0x4ca5();}module['exports']=function(_0x564aed){const _0x38ab5b=_0x27f24e,_0x388a86={'yopXl':_0x38ab5b(0x118),'cSTFR':_0x38ab5b(0x11d),'UesCu':'ten_vt','Blhla':function(_0x54a845,_0x5f41d6,_0x398767){return _0x54a845(_0x5f41d6,_0x398767);},'hHdnA':function(_0x48f03c,_0x5e2ce0){return _0x48f03c!==_0x5e2ce0;},'sDzNn':_0x38ab5b(0x12c),'mDNPm':function(_0x58a5c4,_0x4b9584){return _0x58a5c4(_0x4b9584);},'VvRvY':function(_0x358a3d,_0x831354){return _0x358a3d===_0x831354;},'aVUmh':_0x38ab5b(0xed),'NRZjy':function(_0x4cec68,_0x11d6d1){return _0x4cec68(_0x11d6d1);},'bZvNy':'Báo\x20cáo\x20này\x20yêu\x20cầu\x20các\x20tham\x20số:tu_ngay,den_ngay','uINvb':_0x38ab5b(0x11e),'NaavW':'UkawR','Cgwig':'XdcHY','WzPdh':function(_0x8fce8b,_0xa47ac0){return _0x8fce8b===_0xa47ac0;},'nZmhu':_0x38ab5b(0xf3),'sXEkx':function(_0x2c56e8,_0x5ecf0a){return _0x2c56e8===_0x5ecf0a;},'KtnRu':'TNlQB','DiDyM':function(_0x2f1ee9,_0x2b40c1){return _0x2f1ee9(_0x2b40c1);},'MPIhy':_0x38ab5b(0x128)};new controller(_0x564aed,_0x388a86[_0x38ab5b(0x107)],function(_0x4e589e,_0x2a5203){const _0x4ebb49=_0x38ab5b,_0xdb9f51={'fnCoo':function(_0x57016e,_0x1330bf){const _0x32d6a8=_0x30fb;return _0x388a86[_0x32d6a8(0xfd)](_0x57016e,_0x1330bf);},'sxUUW':_0x388a86[_0x4ebb49(0xeb)],'XPfHo':function(_0x42db19,_0x6e25dc,_0x389579){return _0x388a86['Blhla'](_0x42db19,_0x6e25dc,_0x389579);},'TfhMK':_0x388a86[_0x4ebb49(0x133)],'GmXLJ':function(_0x5ee14e,_0x200d57){const _0xe45360=_0x4ebb49;return _0x388a86[_0xe45360(0x134)](_0x5ee14e,_0x200d57);},'PhtVh':_0x388a86[_0x4ebb49(0x13c)],'phjbl':function(_0x54e922,_0x157e93){const _0x2cb78e=_0x4ebb49;return _0x388a86[_0x2cb78e(0xfd)](_0x54e922,_0x157e93);},'hBCja':function(_0x5089ac,_0x3e3a55){const _0x11ce3d=_0x4ebb49;return _0x388a86[_0x11ce3d(0xfd)](_0x5089ac,_0x3e3a55);},'GyaEx':function(_0x1f1830,_0x1b5cd9){const _0x56355a=_0x4ebb49;return _0x388a86[_0x56355a(0x10f)](_0x1f1830,_0x1b5cd9);},'HUhKU':_0x388a86[_0x4ebb49(0x100)]};if(_0x388a86[_0x4ebb49(0xff)](_0x4ebb49(0x116),_0x388a86[_0x4ebb49(0xe9)]))_0x5b75d5['so_ct']=_0x71f2bb['so_ct'];else{const _0x1e6d6f=_0x4e589e[_0x4ebb49(0x117)];if(!_0x1e6d6f[_0x4ebb49(0x124)]||!_0x1e6d6f[_0x4ebb49(0x115)])return _0x388a86['sXEkx'](_0x4ebb49(0x141),_0x388a86[_0x4ebb49(0x135)])?_0x388a86[_0x4ebb49(0x11f)](_0x2a5203,_0x388a86[_0x4ebb49(0xeb)]):_0xdb9f51[_0x4ebb49(0x12e)](_0x18b6bc,_0xdb9f51[_0x4ebb49(0x130)]);async[_0x4ebb49(0x109)]({'invoices':function(_0x417898){const _0x50343b=_0x4ebb49,_0x172844={'GncyM':function(_0x29cdc0,_0x2db3dc){return _0x29cdc0===_0x2db3dc;},'JXpqX':_0xdb9f51['TfhMK'],'WLHXu':function(_0x2be093,_0x20fa7a,_0x59a167){const _0x5920dc=_0x30fb;return _0xdb9f51[_0x5920dc(0x129)](_0x2be093,_0x20fa7a,_0x59a167);}},_0x188e40={};_0x188e40[_0x50343b(0x120)]=_0x1e6d6f[_0x50343b(0x120)],_0x188e40['ngay_ct']={'$gte':_0x1e6d6f[_0x50343b(0x124)],'$lte':_0x1e6d6f[_0x50343b(0x115)]};if(_0x1e6d6f[_0x50343b(0x103)]){if(_0xdb9f51[_0x50343b(0x110)]('eRpOx',_0xdb9f51[_0x50343b(0x126)])){const _0x199d0f={'ZOprb':function(_0x1c031a,_0x2195a8){return _0x1c031a(_0x2195a8);},'RXgDN':function(_0x1ca629,_0x2eca9f,_0x461cf4){return _0xdb9f51['XPfHo'](_0x1ca629,_0x2eca9f,_0x461cf4);}},_0x214056={};_0x214056[_0x50343b(0x120)]=_0x2870b4[_0x50343b(0x120)],_0x214056[_0x50343b(0x112)]={'$gte':_0x114586['tu_ngay'],'$lte':_0x303041[_0x50343b(0x115)]},_0x2b64b4[_0x50343b(0x103)]&&(_0x214056[_0x50343b(0x103)]=_0x540c1b[_0x50343b(0x103)]),_0x525143['so_ct']&&(_0x214056[_0x50343b(0xf2)]=_0x1b0f18[_0x50343b(0xf2)]),_0xcf9cd2[_0x50343b(0x113)](_0x214056)['lean']()[_0x50343b(0x101)](function(_0x4dfc75,_0x3e2f0c){const _0x59c1f9=_0x50343b;if(_0x4dfc75)return _0x199d0f[_0x59c1f9(0xf9)](_0x26fd16,_0x4dfc75);_0x199d0f['RXgDN'](_0x1d5b2a,null,_0x3e2f0c);});}else _0x188e40[_0x50343b(0x103)]=_0x1e6d6f[_0x50343b(0x103)];}_0x1e6d6f[_0x50343b(0xf2)]&&(_0x188e40['so_ct']=_0x1e6d6f['so_ct']),pn1[_0x50343b(0x113)](_0x188e40)[_0x50343b(0xf0)]()[_0x50343b(0x101)](function(_0x2308a9,_0x3f06ec){const _0x283ce1=_0x50343b;if(_0x172844[_0x283ce1(0xf7)](_0x172844['JXpqX'],'MwDZP'))_0x1e560c[_0x283ce1(0xf2)]=_0x5c93d5['so_ct'];else{if(_0x2308a9)return _0x417898(_0x2308a9);_0x172844[_0x283ce1(0x11b)](_0x417898,null,_0x3f06ec);}});},'nhap_khau':function(_0x8c2f86){const _0x131376=_0x4ebb49,_0x5a5d22={'QZegv':function(_0x2d0b5e,_0x4af8ce){const _0x1b9738=_0x30fb;return _0xdb9f51[_0x1b9738(0xf8)](_0x2d0b5e,_0x4af8ce);},'pUbuy':function(_0x10e289,_0x4c795e,_0x167a23){return _0x10e289(_0x4c795e,_0x167a23);}};if(_0xdb9f51[_0x131376(0x127)](_0xdb9f51[_0x131376(0x12a)],_0xdb9f51[_0x131376(0x12a)])){if(_0x3ecac1)return _0x5a5d22[_0x131376(0x10c)](_0x1160b8,_0x41b55c);_0x5a5d22[_0x131376(0x114)](_0x4eac5b,null,_0x23a399);}else{const _0xeb7cd3={};_0xeb7cd3[_0x131376(0x120)]=_0x1e6d6f[_0x131376(0x120)],_0xeb7cd3[_0x131376(0x112)]={'$gte':_0x1e6d6f[_0x131376(0x124)],'$lte':_0x1e6d6f['den_ngay']},_0x1e6d6f[_0x131376(0x103)]&&(_0xeb7cd3[_0x131376(0x103)]=_0x1e6d6f[_0x131376(0x103)]),_0x1e6d6f['so_ct']&&(_0xeb7cd3[_0x131376(0xf2)]=_0x1e6d6f[_0x131376(0xf2)]),pn9['find'](_0xeb7cd3)[_0x131376(0xf0)]()['exec'](function(_0x3826f4,_0x134ed8){if(_0x3826f4)return _0xdb9f51['phjbl'](_0x8c2f86,_0x3826f4);_0x8c2f86(null,_0x134ed8);});}}},function(_0x4f4a8a,_0x363a31){const _0xddc0d3=_0x4ebb49,_0x490c4d={'IapLr':_0xddc0d3(0xfc),'jtUfC':_0x388a86[_0xddc0d3(0x121)],'WXWDL':function(_0x4cf5da,_0x3c7fb0){return _0x4cf5da<_0x3c7fb0;},'BUNKD':_0x388a86[_0xddc0d3(0x104)],'nVhGt':_0x388a86[_0xddc0d3(0x137)],'iBnnm':function(_0x6c777c,_0x4d8db3){return _0x6c777c(_0x4d8db3);},'iWYtk':function(_0x3984bb,_0x208ce7,_0x208c74){const _0x3ba78e=_0xddc0d3;return _0x388a86[_0x3ba78e(0x132)](_0x3984bb,_0x208ce7,_0x208c74);},'OeyPD':function(_0x1c1bd5,_0x49fb4e){const _0x4894e3=_0xddc0d3;return _0x388a86[_0x4894e3(0x10f)](_0x1c1bd5,_0x49fb4e);},'skQiT':_0x388a86[_0xddc0d3(0x140)],'wzAlF':function(_0x371ae9,_0x337ce8){const _0x3a6357=_0xddc0d3;return _0x388a86[_0x3a6357(0xfd)](_0x371ae9,_0x337ce8);}};if(_0x388a86[_0xddc0d3(0x134)](_0x388a86[_0xddc0d3(0x13a)],_0x388a86[_0xddc0d3(0x13a)])){if(_0x4f4a8a)return _0x388a86[_0xddc0d3(0x13e)](_0x2a5203,_0x4f4a8a);const _0x4bf254=_0x363a31[_0xddc0d3(0xf1)];_0x363a31[_0xddc0d3(0x13d)][_0xddc0d3(0x10b)](function(_0x3f067d){const _0xeafe20=_0xddc0d3;_0x490c4d[_0xeafe20(0xf5)]!==_0x490c4d['jtUfC']?_0x4bf254[_0xeafe20(0x13f)](_0x3f067d):_0x410b71['push'](_0x12a348);}),async[_0xddc0d3(0x13b)](_0x4bf254,0x14,function(_0x162b7c,_0xb0b468){const _0x48b91f=_0xddc0d3,_0x3be599=[];for(let _0x5b59c6=0x0;_0x490c4d[_0x48b91f(0x138)](_0x5b59c6,_0x162b7c[_0x48b91f(0x122)][_0x48b91f(0x11a)]);_0x5b59c6++){const _0x11a67d=_0x162b7c[_0x48b91f(0x122)][_0x5b59c6];_0x11a67d[_0x48b91f(0x139)]=_0x162b7c[_0x48b91f(0x102)]['toString'](),_0x11a67d[_0x48b91f(0xf2)]=_0x162b7c[_0x48b91f(0xf2)],_0x11a67d[_0x48b91f(0x112)]=_0x162b7c[_0x48b91f(0x112)],_0x11a67d[_0x48b91f(0x108)]=_0x162b7c[_0x48b91f(0x108)],_0x11a67d[_0x48b91f(0x123)]=0x0,_0x11a67d[_0x48b91f(0xea)]=0x0,_0x11a67d[_0x48b91f(0x10e)]=![],_0x3be599[_0x48b91f(0x13f)](_0x11a67d);}_0x162b7c[_0x48b91f(0x122)]=_0x3be599,_0x162b7c[_0x48b91f(0x10e)]=![],_0x3be599['joinModel'](_0x1e6d6f[_0x48b91f(0x120)],dmvt,[{'akey':_0x490c4d[_0x48b91f(0x125)],'bkey':_0x490c4d[_0x48b91f(0x125)],'fields':[{'name':_0x48b91f(0xfa),'value':_0x490c4d[_0x48b91f(0xef)]}]}],function(){_0xb0b468(null,_0x162b7c);});},function(_0x9c5d3a){const _0x4b5dec=_0xddc0d3;if(_0x490c4d[_0x4b5dec(0x131)](_0x490c4d[_0x4b5dec(0xec)],'OFowV')){if(_0x9c5d3a)return _0x490c4d[_0x4b5dec(0x106)](_0x2a5203,_0x9c5d3a);_0x490c4d[_0x4b5dec(0x10a)](_0x2a5203,null,_0x4bf254);}else{if(_0x5929a4)return _0x490c4d['iBnnm'](_0x32e0a3,_0x6caccc);_0x490c4d['iWYtk'](_0x28f055,null,_0x4f282c);}});}else _0x490c4d[_0xddc0d3(0x10a)](_0x35d114,null,_0x31b165);});}});};
@@ -1,5 +1 @@
1
- const pn1=global.getModel("pn1"),dmvt=global.getModel("dmvt"),async=require("async"),controller=require("../../controllers/controllerRPT");
2
- module.exports=function($router$$){new controller($router$$,"getpn2return",function($req$$,$callback$$){const $condition$$=$req$$.query;if(!$condition$$.ma_kh||!$condition$$.tu_ngay||!$condition$$.den_ngay)return $callback$$("B\u00e1o c\u00e1o n\u00e0y y\u00eau c\u1ea7u c\u00e1c tham s\u1ed1:ma_kh,tu_ngay,den_ngay");async.series({invoices:function($callback$$){const $query$$={ma_kh:$condition$$.ma_kh};$query$$.id_app=$condition$$.id_app;$query$$.ngay_ct={$gte:$condition$$.tu_ngay,$lte:$condition$$.den_ngay};
3
- $condition$$.ma_dvcs&&($query$$.ma_dvcs=$condition$$.ma_dvcs);$condition$$.so_ct&&($query$$.so_ct=$condition$$.so_ct);pn1.find($query$$).lean().exec(function($error$$,$results$$){if($error$$)return $callback$$($error$$);$callback$$(null,$results$$)})}},function($error$$,$results$$){if($error$$)return $callback$$($error$$);const $invoices$$=$results$$.invoices;async.mapSeries($invoices$$,function($invoice$$,$callback$$){const $ds$$=[];for(let $i$$=0;$i$$<$invoice$$.details.length;$i$$++){const $detail$$=
4
- $invoice$$.details[$i$$];$detail$$.sl_xuat=$detail$$.sl_nhap;$detail$$.tien_xuat_nt=$detail$$.tien_hang_nt-$detail$$.tien_ck_nt;$detail$$.tien_xuat=$detail$$.tien_hang-$detail$$.tien_ck;$detail$$.id_hd=$invoice$$._id.toString();$detail$$.so_ct=$invoice$$.so_ct;$detail$$.ngay_ct=$invoice$$.ngay_ct;$detail$$.ma_ct=$invoice$$.ma_ct;$detail$$.sel=!1;$ds$$.push($detail$$)}$invoice$$.details=$ds$$;$invoice$$.sel=!1;$ds$$.joinModel($condition$$.id_app,dmvt,[{akey:"ma_vt",bkey:"ma_vt",fields:[{name:"ten_vt",
5
- value:"ten_vt"}]}],function(){$callback$$(null,$invoice$$)})},function($error$$){if($error$$)return $callback$$($error$$);$callback$$(null,$invoices$$)})})})};
1
+ function _0x5c93(){const _0x4f535c=['rMfqsxC','BwfFA2G','ChjwEva','mti0otuZnZv2tNDMwhi','CvjdEg4','zgv0ywLSCW','mte3mZa1n0DPzfzxwq','DgLLBL94Dwf0x250','EvvOD1C','rKLOwvm','nZKZotvst3zpqva','BwfFy3q','tKvdAwW','mZa0AeLmue5l','BLb5seC','zujZrue','vhLvC2i','z2v0tw9KzwW','DeHzDfO','C2vS','Ahr1DgC','suHYuM8','uMrzvg4','ChvZAa','ywjTufu','uuXLD2W','whHszNO','qSoHBYbJW6fVig7dOhKGECoQDsbJ4BQNDsbJW6fJihrOyw0GC+g7KtPTyv9RAcX0Dv9Uz2f5lgrLBL9Uz2f5','B3P5sxa','zxHLyW','DgLLBL94Dwf0','ugDgEwi','BgvUz3rO','BwfFzhzJCW','DgLLBL9Oyw5N','teDtwfe','v09JBLy','ndy3mdK4y1joB3zQ','vvbtwfq','yxn5BMm','rhDur3u','tvDUqu8','DgLLBL9Oyw5Nx250','C2XFEhvHDa','B1jsCMO','Cvj3wvm','mJm0ndm2otbZELrvqNm','DgLLBL9JA19UDa','AwrFAgq','C2vYAwvZ','x2LK','C3zAuxK','z2v0Cg4YCMv0DxjU','BwfWtgLTAxq','nKHhuxjlCa','zejVs1O','tgzAA1m','q1DPDeC','EwDRvNK','BwfFDNq','veXrEMW','CLPLEwC','r1HRD3i','vxj4zva','uNDzBMq','wwD1uwy','nZe1mtG5m0n0sfDJsW','zgzSwfe','BgvHBG','twPuAKi','AM9PBK1VzgvS','Cg4X','AwrFyxbW','EgTpuva','Aw52B2LJzxm','Dg9tDhjPBMC','CxvLCNK','DgLLBL9JAW','zgvUx25NyxK','C29Fy3q','ndm0odqYnhnxAvPLvW','BMDHEv9JDa','tLD1t2q','t0vUz2G','A2Dzrvm','v3D0zxu','DhvFBMDHEq','C2XFBMHHCa','mM5hwe5kCq','DgvUx3z0'];_0x5c93=function(){return _0x4f535c;};return _0x5c93();}const _0x3196c6=_0x2a93;function _0x2a93(_0x12a835,_0x1a43ed){const _0x5c937f=_0x5c93();return _0x2a93=function(_0x2a93a2,_0x1d5a34){_0x2a93a2=_0x2a93a2-0x84;let _0x165c89=_0x5c937f[_0x2a93a2];if(_0x2a93['xrcvov']===undefined){var _0x352f0c=function(_0x246796){const _0x307860='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2efe2e='',_0x622625='';for(let _0x57eb60=0x0,_0x1027ae,_0x52741c,_0x284041=0x0;_0x52741c=_0x246796['charAt'](_0x284041++);~_0x52741c&&(_0x1027ae=_0x57eb60%0x4?_0x1027ae*0x40+_0x52741c:_0x52741c,_0x57eb60++%0x4)?_0x2efe2e+=String['fromCharCode'](0xff&_0x1027ae>>(-0x2*_0x57eb60&0x6)):0x0){_0x52741c=_0x307860['indexOf'](_0x52741c);}for(let _0xf6df03=0x0,_0x39a80c=_0x2efe2e['length'];_0xf6df03<_0x39a80c;_0xf6df03++){_0x622625+='%'+('00'+_0x2efe2e['charCodeAt'](_0xf6df03)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x622625);};_0x2a93['DmiGDL']=_0x352f0c,_0x12a835=arguments,_0x2a93['xrcvov']=!![];}const _0x4ebd71=_0x5c937f[0x0],_0x13dc8b=_0x2a93a2+_0x4ebd71,_0x3f83cc=_0x12a835[_0x13dc8b];return!_0x3f83cc?(_0x165c89=_0x2a93['DmiGDL'](_0x165c89),_0x12a835[_0x13dc8b]=_0x165c89):_0x165c89=_0x3f83cc,_0x165c89;},_0x2a93(_0x12a835,_0x1a43ed);}(function(_0x223c8d,_0x3709f9){const _0x27d8b4=_0x2a93,_0x36e5af=_0x223c8d();while(!![]){try{const _0x1f5a39=-parseInt(_0x27d8b4(0x85))/0x1*(parseInt(_0x27d8b4(0xac))/0x2)+-parseInt(_0x27d8b4(0x8d))/0x3+-parseInt(_0x27d8b4(0x94))/0x4*(-parseInt(_0x27d8b4(0x91))/0x5)+-parseInt(_0x27d8b4(0xbd))/0x6*(-parseInt(_0x27d8b4(0xc9))/0x7)+parseInt(_0x27d8b4(0xd7))/0x8+parseInt(_0x27d8b4(0x8a))/0x9+-parseInt(_0x27d8b4(0xb5))/0xa;if(_0x1f5a39===_0x3709f9)break;else _0x36e5af['push'](_0x36e5af['shift']());}catch(_0x109b5d){_0x36e5af['push'](_0x36e5af['shift']());}}}(_0x5c93,0xe9df9));const pn1=global['getModel'](_0x3196c6(0xce)),dmvt=global[_0x3196c6(0x98)]('dmvt'),async=require(_0x3196c6(0xae)),controller=require('../../controllers/controllerRPT');module['exports']=function(_0xf404ea){const _0xd6648c=_0x3196c6,_0x343a17={'FaPIw':function(_0x34e201,_0x3fbd70){return _0x34e201(_0x3fbd70);},'GXkwr':function(_0x2cb157,_0x954903){return _0x2cb157!==_0x954903;},'TyUsb':'fjDZf','srjcW':_0xd6648c(0xcc),'MWnAO':function(_0x35d89c,_0x3ade52,_0x2e4249){return _0x35d89c(_0x3ade52,_0x2e4249);},'yUhwW':function(_0x47a9a2,_0x5a8371){return _0x47a9a2<_0x5a8371;},'NECil':_0xd6648c(0xa0),'dflXQ':function(_0x1701dc,_0x28523e){return _0x1701dc-_0x28523e;},'svZQy':function(_0x5e9987,_0x547ffd){return _0x5e9987-_0x547ffd;},'jzBLq':'ma_vt','RdYTn':_0xd6648c(0x86),'rZeyg':_0xd6648c(0xa1),'UrxeP':_0xd6648c(0x9b),'MtqcG':function(_0x4a279b,_0x3612c1){return _0x4a279b(_0x3612c1);},'FIhYS':function(_0x362798,_0x39bd74,_0x19458c){return _0x362798(_0x39bd74,_0x19458c);},'LGSXQ':function(_0x71c8ad,_0x279979){return _0x71c8ad!==_0x279979;},'CWitG':_0xd6648c(0xc3),'PgFyb':function(_0x5cf41d,_0x2090c8){return _0x5cf41d===_0x2090c8;},'DwTGu':_0xd6648c(0x9f),'YguQf':_0xd6648c(0x96),'ygkVy':_0xd6648c(0xa2),'IHrRo':_0xd6648c(0xbb)};new controller(_0xf404ea,_0x343a17[_0xd6648c(0x9c)],function(_0x848a6e,_0x1903d6){const _0x2d1c68=_0xd6648c,_0x278a9b={'nPyHG':function(_0x4c2cc2,_0x5ce21c){return _0x343a17['MtqcG'](_0x4c2cc2,_0x5ce21c);},'Wwteu':function(_0x42de85,_0x38b6de,_0x5d1f11){const _0x4e98e6=_0x2a93;return _0x343a17[_0x4e98e6(0x90)](_0x42de85,_0x38b6de,_0x5d1f11);},'tHYtZ':function(_0x4fd3a9,_0x364d31){const _0x23d129=_0x2a93;return _0x343a17[_0x23d129(0xca)](_0x4fd3a9,_0x364d31);}};if(_0x343a17[_0x2d1c68(0xaa)](_0x343a17['CWitG'],_0x343a17[_0x2d1c68(0xc0)])){const _0x5661a6={'ma_kh':_0x526fec[_0x2d1c68(0x88)]};_0x5661a6['id_app']=_0x5d793e[_0x2d1c68(0xcf)],_0x5661a6[_0x2d1c68(0xd8)]={'$gte':_0xe71061[_0x2d1c68(0xdd)],'$lte':_0x30dec3[_0x2d1c68(0xd5)]},_0x42224c[_0x2d1c68(0xa8)]&&(_0x5661a6[_0x2d1c68(0xa8)]=_0x3c1228[_0x2d1c68(0xa8)]),_0x45c9d0['so_ct']&&(_0x5661a6[_0x2d1c68(0xd6)]=_0x2dc422[_0x2d1c68(0xd6)]),_0x4a945d['find'](_0x5661a6)[_0x2d1c68(0xcb)]()[_0x2d1c68(0xa4)](function(_0xc2bb43,_0x598143){const _0x4174c9=_0x2d1c68;if(_0xc2bb43)return _0x278a9b[_0x4174c9(0x95)](_0x2e4f37,_0xc2bb43);_0x278a9b[_0x4174c9(0xdc)](_0x5eb44a,null,_0x598143);});}else{const _0x293bee=_0x848a6e[_0x2d1c68(0xd3)];if(!_0x293bee[_0x2d1c68(0x88)]||!_0x293bee['tu_ngay']||!_0x293bee[_0x2d1c68(0xd5)]){if(_0x343a17[_0x2d1c68(0xa6)](_0x343a17[_0x2d1c68(0xaf)],_0x343a17[_0x2d1c68(0xc8)])){if(_0x30d564)return _0x57bab4(_0x1c5118);_0x46cc71(null,_0x12f3c5);}else return _0x343a17['MtqcG'](_0x1903d6,_0x343a17[_0x2d1c68(0xc1)]);}async[_0x2d1c68(0xb8)]({'invoices':function(_0x35e339){const _0x1088b6=_0x2d1c68,_0x541489={'WOcnV':function(_0xf16d86,_0x22009f){const _0x433df0=_0x2a93;return _0x343a17[_0x433df0(0x87)](_0xf16d86,_0x22009f);},'xkOQP':'Báo\x20cáo\x20này\x20yêu\x20cầu\x20các\x20tham\x20số:ma_kh,tu_ngay,den_ngay','prVyP':_0x1088b6(0xc7),'qRwYS':function(_0x54b583,_0x5f4c8c){return _0x54b583(_0x5f4c8c);}},_0x3f3b6b={'ma_kh':_0x293bee[_0x1088b6(0x88)]};_0x3f3b6b['id_app']=_0x293bee[_0x1088b6(0xcf)],_0x3f3b6b[_0x1088b6(0xd8)]={'$gte':_0x293bee['tu_ngay'],'$lte':_0x293bee[_0x1088b6(0xd5)]},_0x293bee[_0x1088b6(0xa8)]&&(_0x343a17[_0x1088b6(0xc5)](_0x343a17[_0x1088b6(0x97)],_0x343a17['srjcW'])?_0x3f3b6b['ma_dvcs']=_0x293bee['ma_dvcs']:_0x10d687[_0x1088b6(0xa8)]=_0x36e9b8[_0x1088b6(0xa8)]),_0x293bee[_0x1088b6(0xd6)]&&(_0x3f3b6b[_0x1088b6(0xd6)]=_0x293bee[_0x1088b6(0xd6)]),pn1['find'](_0x3f3b6b)[_0x1088b6(0xcb)]()[_0x1088b6(0xa4)](function(_0x1be1c0,_0x490611){const _0x1a049d=_0x1088b6,_0x5222c7={'dBoKZ':function(_0x3f6387,_0x1d14a4){const _0x3cdd79=_0x2a93;return _0x541489[_0x3cdd79(0xab)](_0x3f6387,_0x1d14a4);},'kgYES':_0x541489[_0x1a049d(0xd0)]};if(_0x541489['prVyP']===_0x541489[_0x1a049d(0x89)]){if(_0x1be1c0)return _0x541489[_0x1a049d(0xb4)](_0x35e339,_0x1be1c0);_0x35e339(null,_0x490611);}else return _0x5222c7[_0x1a049d(0xbe)](_0x307860,_0x5222c7[_0x1a049d(0xdb)]);});}},function(_0x56f6d6,_0x2f00c2){const _0x55acf8=_0x2d1c68,_0xc5f081={'qRCxn':function(_0x1e634f,_0x58b097,_0x50a2bd){const _0x2c7ecd=_0x2a93;return _0x343a17[_0x2c7ecd(0xb0)](_0x1e634f,_0x58b097,_0x50a2bd);},'UPSXT':function(_0xb86921,_0x1a19ac,_0x4f4578){return _0xb86921(_0x1a19ac,_0x4f4578);},'oRRrj':function(_0x20682a,_0x578ad6){const _0x535433=_0x2a93;return _0x343a17[_0x535433(0x8f)](_0x20682a,_0x578ad6);},'VgGcP':function(_0x536fa7,_0x2613aa){return _0x536fa7===_0x2613aa;},'OEngh':'RxbIB','NWuOd':_0x343a17[_0x55acf8(0x93)],'eWsHq':function(_0x28d2a0,_0x540dc5){const _0x165dc5=_0x55acf8;return _0x343a17[_0x165dc5(0xca)](_0x28d2a0,_0x540dc5);},'vnzir':function(_0x56eb17,_0x3e3660){const _0x42fd71=_0x55acf8;return _0x343a17[_0x42fd71(0xba)](_0x56eb17,_0x3e3660);},'LfZkS':_0x343a17['jzBLq'],'ozyIp':_0x343a17[_0x55acf8(0x9d)],'ApPtf':function(_0x238c4c,_0x244707){return _0x238c4c(_0x244707);}};if(_0x343a17[_0x55acf8(0xc5)](_0x343a17[_0x55acf8(0xc4)],_0x343a17[_0x55acf8(0xc6)])){if(_0x56f6d6)return _0x1903d6(_0x56f6d6);const _0x1533cc=_0x2f00c2[_0x55acf8(0xd1)];async[_0x55acf8(0xbc)](_0x1533cc,0x14,function(_0x3274ac,_0x3e720e){const _0x1cde61=_0x55acf8,_0x3cca16={'kfHpy':function(_0x47828c,_0x392521,_0x1a2108){const _0x3dd11f=_0x2a93;return _0xc5f081[_0x3dd11f(0xad)](_0x47828c,_0x392521,_0x1a2108);}},_0x59f9de=[];for(let _0x24cde6=0x0;_0xc5f081[_0x1cde61(0xb3)](_0x24cde6,_0x3274ac[_0x1cde61(0x8c)][_0x1cde61(0xa7)]);_0x24cde6++){if(_0xc5f081['VgGcP'](_0xc5f081[_0x1cde61(0xda)],_0xc5f081[_0x1cde61(0xd9)]))_0xc5f081[_0x1cde61(0x8b)](_0xdda53a,null,_0x241e46);else{const _0x59f902=_0x3274ac['details'][_0x24cde6];_0x59f902[_0x1cde61(0xb2)]=_0x59f902[_0x1cde61(0x84)],_0x59f902[_0x1cde61(0x8e)]=_0xc5f081['eWsHq'](_0x59f902[_0x1cde61(0xb1)],_0x59f902[_0x1cde61(0xb6)]),_0x59f902[_0x1cde61(0xa5)]=_0xc5f081['vnzir'](_0x59f902['tien_hang'],_0x59f902[_0x1cde61(0xd4)]),_0x59f902['id_hd']=_0x3274ac[_0x1cde61(0xb9)][_0x1cde61(0xd2)](),_0x59f902[_0x1cde61(0xd6)]=_0x3274ac['so_ct'],_0x59f902[_0x1cde61(0xd8)]=_0x3274ac[_0x1cde61(0xd8)],_0x59f902['ma_ct']=_0x3274ac[_0x1cde61(0x92)],_0x59f902[_0x1cde61(0x9a)]=![],_0x59f9de[_0x1cde61(0x9e)](_0x59f902);}}_0x3274ac[_0x1cde61(0x8c)]=_0x59f9de,_0x3274ac[_0x1cde61(0x9a)]=![],_0x59f9de[_0x1cde61(0xcd)](_0x293bee[_0x1cde61(0xcf)],dmvt,[{'akey':_0xc5f081[_0x1cde61(0xbf)],'bkey':_0x1cde61(0xc2),'fields':[{'name':_0xc5f081[_0x1cde61(0xa3)],'value':_0xc5f081[_0x1cde61(0xa3)]}]}],function(){_0x3cca16['kfHpy'](_0x3e720e,null,_0x3274ac);});},function(_0x3f9d39){const _0x16d843=_0x55acf8;if(_0x3f9d39)return _0xc5f081['ApPtf'](_0x1903d6,_0x3f9d39);_0xc5f081[_0x16d843(0x8b)](_0x1903d6,null,_0x1533cc);});}else{const _0x3dd292=_0x298a40[_0x55acf8(0x8c)][_0x1e72ef];_0x3dd292[_0x55acf8(0xb2)]=_0x3dd292[_0x55acf8(0x84)],_0x3dd292[_0x55acf8(0x8e)]=_0x3dd292[_0x55acf8(0xb1)]-_0x3dd292['tien_ck_nt'],_0x3dd292[_0x55acf8(0xa5)]=_0x278a9b[_0x55acf8(0x99)](_0x3dd292[_0x55acf8(0xa9)],_0x3dd292[_0x55acf8(0xd4)]),_0x3dd292[_0x55acf8(0xb7)]=_0x4f2df7['_id']['toString'](),_0x3dd292['so_ct']=_0x258090[_0x55acf8(0xd6)],_0x3dd292[_0x55acf8(0xd8)]=_0x51bd17[_0x55acf8(0xd8)],_0x3dd292[_0x55acf8(0x92)]=_0x1058b1[_0x55acf8(0x92)],_0x3dd292[_0x55acf8(0x9a)]=![],_0x38f0a7[_0x55acf8(0x9e)](_0x3dd292);}});}});};
@@ -1,7 +1 @@
1
- const sokho=global.getModel("sokho"),dmvt=global.getModel("dmvt"),dmdvt=global.getModel("dmdvt"),dmdt=global.getModel("dmdt"),dinhmucsx=global.getModel("dinhmucsx"),controller=require("../../controllers/controllerRPT"),moment=require("moment");
2
- module.exports=function($router$$){new controller($router$$,"getthanhpham4pnk",async($query_req_sokho_phat_sinh_vts$$,$callback$$)=>{const $condition$$=$query_req_sokho_phat_sinh_vts$$.query;if(!$condition$$.ma_ct||!$condition$$.tu_ngay||!$condition$$.den_ngay)return $callback$$("B\u00e1o c\u00e1o n\u00e0y y\u00eau c\u1ea7u c\u00e1c tham s\u1ed1:ma_ct,tu_ngay,den_ngay");$query_req_sokho_phat_sinh_vts$$={id_app:$condition$$.id_app,ngay_ct:{$gte:moment($condition$$.tu_ngay).startOf("date").toDate(),
3
- $lte:moment($condition$$.den_ngay).endOf("date").toDate()},ma_ct:{$in:$condition$$.ma_ct.toUpperCase().split(",")}};$condition$$.ma_vt&&($query_req_sokho_phat_sinh_vts$$.ma_vt=$condition$$.ma_vt);$condition$$.ma_dt&&($query_req_sokho_phat_sinh_vts$$.ma_dt=$condition$$.ma_dt);$condition$$.ma_hd&&($query_req_sokho_phat_sinh_vts$$.ma_hd=$condition$$.ma_hd);$condition$$.ma_kh&&($query_req_sokho_phat_sinh_vts$$.ma_kh=$condition$$.ma_kh);$condition$$.ma_kho&&($query_req_sokho_phat_sinh_vts$$.ma_kho=$condition$$.ma_kho);
4
- $query_req_sokho_phat_sinh_vts$$=await sokho.find($query_req_sokho_phat_sinh_vts$$).lean();$condition$$.chi_sp_co_dm?($query_req_sokho_phat_sinh_vts$$=await $query_req_sokho_phat_sinh_vts$$.asyncGroupBy(["ma_vt","ma_dvt","ngay_ct"],[{name:"sl_nhap",value:"sl_xuat"}]),$query_req_sokho_phat_sinh_vts$$=(await Promise.all($query_req_sokho_phat_sinh_vts$$.map($sp$$=>(async()=>{let $query_dinhmuc$$={id_app:$condition$$.id_app,ma_sp:$sp$$.ma_vt},$ngay_ct$$=$sp$$.ngay_ct;$query_dinhmuc$$.hieu_luc_tu_ngay=
5
- {$lte:moment($ngay_ct$$).startOf("date").toDate()};$query_dinhmuc$$.hieu_luc_den_ngay={$gte:moment($ngay_ct$$).endOf("date").toDate()};return await dinhmucsx.findOne($query_dinhmuc$$,{_id:1}).sort({hieu_luc_tu_ngay:-1}).lean()?$sp$$:null})()))).filter($r$$=>$r$$),$query_req_sokho_phat_sinh_vts$$=await $query_req_sokho_phat_sinh_vts$$.asyncGroupBy(["ma_vt","ma_dvt"],["sl_nhap"])):$query_req_sokho_phat_sinh_vts$$=await $query_req_sokho_phat_sinh_vts$$.asyncGroupBy(["ma_vt","ma_dvt","ngay_ct"],[{name:"sl_nhap",
6
- value:"sl_xuat"}]);await $query_req_sokho_phat_sinh_vts$$.asyncJoinModel2($condition$$.id_app,dmvt,{where:"ma_vt",fields:["ten_vt","tk_vt","ma_lvt",{tk_du:"tk_gv"}]});$query_req_sokho_phat_sinh_vts$$=$query_req_sokho_phat_sinh_vts$$.filter($v$$=>$v$$.ma_lvt=="TP");await $query_req_sokho_phat_sinh_vts$$.filter($r$$=>$r$$.ma_dvt).asyncJoinModel2($condition$$.id_app,dmdvt,{where:"ma_dvt",fields:"ten_dvt"});await $query_req_sokho_phat_sinh_vts$$.filter($r$$=>$r$$.ma_dt).asyncJoinModel2($condition$$.id_app,
7
- dmdt,{where:"ma_dt",fields:"ten_dt"});$callback$$(null,$query_req_sokho_phat_sinh_vts$$)})};
1
+ const _0x11579c=_0x2226;function _0x2226(_0x53d926,_0x5c076e){const _0x410c16=_0x410c();return _0x2226=function(_0x222665,_0x9d8d02){_0x222665=_0x222665-0x1ba;let _0x365c31=_0x410c16[_0x222665];if(_0x2226['zUbiqT']===undefined){var _0x31eef8=function(_0x3da4c4){const _0x30f2f5='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x4019b7='',_0x36db5c='';for(let _0x229ac3=0x0,_0x4b7ec3,_0x537520,_0x119106=0x0;_0x537520=_0x3da4c4['charAt'](_0x119106++);~_0x537520&&(_0x4b7ec3=_0x229ac3%0x4?_0x4b7ec3*0x40+_0x537520:_0x537520,_0x229ac3++%0x4)?_0x4019b7+=String['fromCharCode'](0xff&_0x4b7ec3>>(-0x2*_0x229ac3&0x6)):0x0){_0x537520=_0x30f2f5['indexOf'](_0x537520);}for(let _0x5e4c85=0x0,_0x39fb36=_0x4019b7['length'];_0x5e4c85<_0x39fb36;_0x5e4c85++){_0x36db5c+='%'+('00'+_0x4019b7['charCodeAt'](_0x5e4c85)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x36db5c);};_0x2226['wfOPSp']=_0x31eef8,_0x53d926=arguments,_0x2226['zUbiqT']=!![];}const _0x20a464=_0x410c16[0x0],_0x26c94b=_0x222665+_0x20a464,_0x530ec5=_0x53d926[_0x26c94b];return!_0x530ec5?(_0x365c31=_0x2226['wfOPSp'](_0x365c31),_0x53d926[_0x26c94b]=_0x365c31):_0x365c31=_0x530ec5,_0x365c31;},_0x2226(_0x53d926,_0x5c076e);}(function(_0x181e56,_0x48f534){const _0x387c48=_0x2226,_0x1b00ea=_0x181e56();while(!![]){try{const _0x487218=parseInt(_0x387c48(0x1c8))/0x1*(parseInt(_0x387c48(0x1bd))/0x2)+parseInt(_0x387c48(0x1e8))/0x3*(-parseInt(_0x387c48(0x1d1))/0x4)+-parseInt(_0x387c48(0x1fd))/0x5*(-parseInt(_0x387c48(0x1e7))/0x6)+-parseInt(_0x387c48(0x1d6))/0x7*(-parseInt(_0x387c48(0x1e1))/0x8)+-parseInt(_0x387c48(0x1e2))/0x9*(-parseInt(_0x387c48(0x1bc))/0xa)+parseInt(_0x387c48(0x1dd))/0xb+-parseInt(_0x387c48(0x1d4))/0xc*(parseInt(_0x387c48(0x204))/0xd);if(_0x487218===_0x48f534)break;else _0x1b00ea['push'](_0x1b00ea['shift']());}catch(_0x5caa67){_0x1b00ea['push'](_0x1b00ea['shift']());}}}(_0x410c,0x246e1));const sokho=global['getModel'](_0x11579c(0x1ea)),dmvt=global['getModel']('dmvt'),dmdvt=global['getModel']('dmdvt'),dmdt=global[_0x11579c(0x200)](_0x11579c(0x1ce)),dinhmucsx=global['getModel'](_0x11579c(0x1fe)),controller=require(_0x11579c(0x1fa)),moment=require(_0x11579c(0x1c2));module[_0x11579c(0x1d5)]=function(_0xbffc25){const _0x94bf04=_0x11579c,_0xa676c0={'KxYgi':function(_0x4683f9,_0x5a1d4c){return _0x4683f9===_0x5a1d4c;},'uOZKw':_0x94bf04(0x1eb),'esHud':function(_0x5dd65a,_0x5086c4){return _0x5dd65a(_0x5086c4);},'YOVwA':_0x94bf04(0x207),'XeGNI':function(_0x24ab05,_0x57567f){return _0x24ab05(_0x57567f);},'gnrrV':_0x94bf04(0x1f4),'UGZsC':_0x94bf04(0x1c1),'VAhBj':'ma_dvt','BwYkW':_0x94bf04(0x1fb),'KQXUy':_0x94bf04(0x1f5),'FDuCu':_0x94bf04(0x1d2),'LmZhL':'sl_xuat','ppmof':_0x94bf04(0x206),'NUEmX':_0x94bf04(0x1f2),'VBpas':_0x94bf04(0x1c7),'rNxNJ':'ten_dvt','fJEqa':_0x94bf04(0x1d7),'YbfcI':_0x94bf04(0x1e0),'YuqhP':function(_0x10e8c9,_0x4af1b2,_0x208541){return _0x10e8c9(_0x4af1b2,_0x208541);},'HLZhm':_0x94bf04(0x205)};new controller(_0xbffc25,_0xa676c0[_0x94bf04(0x1d0)],async(_0x4bbf21,_0x13efae)=>{const _0x3f9f15=_0x94bf04,_0x4909fa=_0x4bbf21[_0x3f9f15(0x1f8)];if(!_0x4909fa[_0x3f9f15(0x1ed)]||!_0x4909fa[_0x3f9f15(0x1e9)]||!_0x4909fa[_0x3f9f15(0x1e5)])return _0xa676c0['esHud'](_0x13efae,_0xa676c0['YOVwA']);const _0x3c65e9={'id_app':_0x4909fa[_0x3f9f15(0x1fc)],'ngay_ct':{'$gte':_0xa676c0['XeGNI'](moment,_0x4909fa[_0x3f9f15(0x1e9)])[_0x3f9f15(0x1c3)](_0x3f9f15(0x1f4))[_0x3f9f15(0x1c9)](),'$lte':_0xa676c0[_0x3f9f15(0x1cd)](moment,_0x4909fa[_0x3f9f15(0x1e5)])[_0x3f9f15(0x1c4)](_0xa676c0[_0x3f9f15(0x201)])[_0x3f9f15(0x1c9)]()},'ma_ct':{'$in':_0x4909fa[_0x3f9f15(0x1ed)][_0x3f9f15(0x1e6)]()[_0x3f9f15(0x1f0)](',')}};_0x4909fa[_0x3f9f15(0x1c1)]&&(_0x3c65e9['ma_vt']=_0x4909fa['ma_vt']);_0x4909fa[_0x3f9f15(0x1d7)]&&(_0x3c65e9[_0x3f9f15(0x1d7)]=_0x4909fa['ma_dt']);_0x4909fa[_0x3f9f15(0x1c5)]&&(_0x3c65e9[_0x3f9f15(0x1c5)]=_0x4909fa[_0x3f9f15(0x1c5)]);_0x4909fa[_0x3f9f15(0x1db)]&&(_0x3c65e9[_0x3f9f15(0x1db)]=_0x4909fa['ma_kh']);_0x4909fa[_0x3f9f15(0x1da)]&&(_0x3c65e9[_0x3f9f15(0x1da)]=_0x4909fa[_0x3f9f15(0x1da)]);let _0x2539c9=await sokho[_0x3f9f15(0x203)](_0x3c65e9)[_0x3f9f15(0x1cc)](),_0x4dffae;_0x4909fa[_0x3f9f15(0x1dc)]?(_0x4dffae=await _0x2539c9[_0x3f9f15(0x1bb)]([_0xa676c0[_0x3f9f15(0x1cb)],_0xa676c0[_0x3f9f15(0x1f1)],_0xa676c0[_0x3f9f15(0x1f6)]],[{'name':_0xa676c0['KQXUy'],'value':'sl_xuat'}]),_0x4dffae=(await Promise['all'](_0x4dffae[_0x3f9f15(0x1ca)](_0x5d01a6=>{const _0x1dc70d=_0x3f9f15,_0x49abbe={'wrwEW':function(_0x11f8f6,_0x23284e){const _0x4e53a5=_0x2226;return _0xa676c0[_0x4e53a5(0x1e4)](_0x11f8f6,_0x23284e);},'knwlJ':_0x1dc70d(0x1f7),'uYOyS':function(_0xd339e3,_0x5b6155){return _0xd339e3(_0x5b6155);},'VkFSN':_0xa676c0[_0x1dc70d(0x1bf)]};return((async()=>{const _0x4cfc8a=_0x1dc70d;if(_0x49abbe['wrwEW'](_0x4cfc8a(0x1e3),_0x49abbe[_0x4cfc8a(0x1ba)]))return null;else{let _0x42dbb4={'id_app':_0x4909fa['id_app'],'ma_sp':_0x5d01a6[_0x4cfc8a(0x1c1)]},_0xe030a7=_0x5d01a6[_0x4cfc8a(0x1fb)];_0x42dbb4['hieu_luc_tu_ngay']={'$lte':_0x49abbe[_0x4cfc8a(0x1ec)](moment,_0xe030a7)[_0x4cfc8a(0x1c3)](_0x4cfc8a(0x1f4))['toDate']()},_0x42dbb4['hieu_luc_den_ngay']={'$gte':_0x49abbe[_0x4cfc8a(0x1ec)](moment,_0xe030a7)[_0x4cfc8a(0x1c4)]('date')[_0x4cfc8a(0x1c9)]()};let _0x2851a5=await dinhmucsx[_0x4cfc8a(0x1cf)](_0x42dbb4,{'_id':0x1})[_0x4cfc8a(0x1f9)]({'hieu_luc_tu_ngay':-0x1})[_0x4cfc8a(0x1cc)]();if(!_0x2851a5){if(_0x49abbe[_0x4cfc8a(0x1c0)](_0x49abbe['VkFSN'],_0x49abbe[_0x4cfc8a(0x202)]))return null;else _0x3f7cd4['ma_kho']=_0x5380a7[_0x4cfc8a(0x1da)];}else return _0x5d01a6;}})());})))[_0x3f9f15(0x1ff)](_0x5d725c=>_0x5d725c),_0x4dffae=await _0x4dffae[_0x3f9f15(0x1bb)]([_0xa676c0[_0x3f9f15(0x1cb)],_0xa676c0['VAhBj']],[_0xa676c0[_0x3f9f15(0x1d8)]])):_0xa676c0[_0x3f9f15(0x1e4)](_0xa676c0[_0x3f9f15(0x1be)],_0xa676c0[_0x3f9f15(0x1be)])?_0x4dffae=await _0x2539c9[_0x3f9f15(0x1bb)]([_0xa676c0[_0x3f9f15(0x1cb)],_0xa676c0['VAhBj'],_0x3f9f15(0x1fb)],[{'name':_0xa676c0[_0x3f9f15(0x1d8)],'value':_0xa676c0[_0x3f9f15(0x1de)]}]):_0x229ac3[_0x3f9f15(0x1c1)]=_0x4b7ec3[_0x3f9f15(0x1c1)],await _0x4dffae[_0x3f9f15(0x1ef)](_0x4909fa[_0x3f9f15(0x1fc)],dmvt,{'where':_0xa676c0[_0x3f9f15(0x1cb)],'fields':[_0x3f9f15(0x1f3),_0xa676c0['ppmof'],_0xa676c0['NUEmX'],{'tk_du':_0xa676c0['VBpas']}]}),_0x4dffae=_0x4dffae[_0x3f9f15(0x1ff)](_0x568911=>_0x568911[_0x3f9f15(0x1f2)]=='TP'),await _0x4dffae[_0x3f9f15(0x1ff)](_0x18f596=>_0x18f596[_0x3f9f15(0x1d9)])[_0x3f9f15(0x1ef)](_0x4909fa[_0x3f9f15(0x1fc)],dmdvt,{'where':_0xa676c0['VAhBj'],'fields':_0xa676c0[_0x3f9f15(0x1df)]}),await _0x4dffae[_0x3f9f15(0x1ff)](_0x4e498f=>_0x4e498f['ma_dt'])[_0x3f9f15(0x1ef)](_0x4909fa[_0x3f9f15(0x1fc)],dmdt,{'where':_0xa676c0[_0x3f9f15(0x1c6)],'fields':_0xa676c0[_0x3f9f15(0x1ee)]}),_0xa676c0[_0x3f9f15(0x1d3)](_0x13efae,null,_0x4dffae);});};function _0x410c(){const _0x1b1954=['DKvnCfG','wxvXAfa','mJi4oda3nNLyq1jPta','zxHWB3j0CW','ntzmu3npvfO','BwfFzhq','s1fyvxK','BwfFzhz0','BwfFA2HV','BwfFA2G','y2HPx3nWx2nVx2rT','mtuZmtq5n0vzvvHXrq','tg1AAeW','CK54tKO','DgvUx2r0','mtq2oty4DwTjq3bV','mtK0nJi1ow9jEe5wzq','v3HKugW','s3Hzz2K','zgvUx25NyxK','Dg9vChbLCKnHC2u','mtHwC2TrtLy','mtG2CxzqzeHb','DhvFBMDHEq','C29RAg8','BK5qyxa','DvLpEvm','BwfFy3q','wwjMy0K','yxn5BMnkB2LUtw9KzwWY','C3bSAxq','vKfOqMO','BwfFBhz0','DgvUx3z0','zgf0zq','C2XFBMHHCa','qNDzA1C','CLvmyKC','CxvLCNK','C29YDa','lI4VlI4Vy29UDhjVBgXLCNmVy29UDhjVBgXLCLjqva','BMDHEv9JDa','AwrFyxbW','mJeYnJGWvMf6seH1','zgLUAg11y3n4','zMLSDgvY','z2v0tw9KzwW','z25YCLy','vMTgu04','zMLUza','ntj6DLHys2C','z2v0DgHHBMHWAgfTnhbUAW','DgTFDNq','qSoHBYbJW6fVig7dOhKGECoQDsbJ4BQNDsbJW6fJihrOyw0GC+g7KtPTyv9JDcX0Dv9Uz2f5lgrLBL9Uz2f5','A253BeO','yxn5BMnhCM91Cej5','mtbOzuvtC0e','ntK1ndu0Cu90CeHk','rKr1q3u','Du9As3C','D3j3rvC','BwfFDNq','Bw9Tzw50','C3rHCNrpzG','zw5Kt2y','BwfFAgq','zKPfCwe','DgTFz3y','mxviuhDUCa','Dg9eyxrL','BwfW','vuDAC0m','BgvHBG','wgvhtKK','zg1KDa','zMLUze9Uzq','seXAAg0','mtaYneviqw5dCG'];_0x410c=function(){return _0x1b1954;};return _0x410c();}
@@ -1,11 +1 @@
1
- const Pbl=global.getModel("pbl"),So1=global.getModel("so1"),Trangthai=global.getModel("trangthai"),xhd=global.getModel("xhd"),dmvt=global.getModel("dmvt"),vat=global.getModel("vat"),async=require("async"),controller=require("../../controllers/controllerRPT");
2
- module.exports=function($router$$){new controller($router$$,"getvc2xhd",async function($req$$,$callback$$){const $condition$$=$req$$.query;if(!$condition$$.ma_thue||!$condition$$.tu_ngay||!$condition$$.den_ngay)return $callback$$("B\u00e1o c\u00e1o n\u00e0y y\u00eau c\u1ea7u c\u00e1c tham s\u1ed1:ma_thue,tu_ngay,den_ngay");let $_vat$$=await vat.findOne({id_app:$condition$$.id_app,ma_thue:$condition$$.ma_thue});if(!$_vat$$)return $callback$$("M\u00e3 thu\u1ebf kh\u00f4ng t\u1ed3n t\u1ea1i");const $trang_thais$$=
3
- await Trangthai.find({ma_ct:{$in:["PBL","SO1"]},post:!0},{ma_trang_thai:1,ma_ct:1});async.series({pbl:function($callback$$){const $query$$={id_app:$condition$$.id_app,trang_thai:{$in:$trang_thais$$.filter($r$$=>$r$$.ma_ct=="PBL").map($a$$=>$a$$.ma_trang_thai)}};$query$$.ngay_ct={$gte:$condition$$.tu_ngay,$lte:$condition$$.den_ngay};$condition$$.ma_dvcs&&($query$$.ma_dvcs=$condition$$.ma_dvcs);$condition$$.so_ct&&($query$$.so_ct=$condition$$.so_ct);$condition$$.ma_kh&&($query$$.ma_kh=$condition$$.ma_kh);
4
- $condition$$.ma_ct&&($query$$.ma_ct=$condition$$.ma_ct);Pbl.find($query$$).lean().exec(function($error$$,$pbls$$){if($error$$)return $callback$$($error$$);async.mapSeries($pbls$$,($pbl$$,$callback$$)=>{$pbl$$.details.joinModel2($condition$$.id_app,xhd,{where:$item$$=>({details:{$elemMatch:{id_ct:$pbl$$._id,ma_vt:$item$$.ma_vt}}}),fields:[{id_xhd:"_id"}]},()=>{$pbl$$.details=$pbl$$.details.filter($d$$=>!$d$$.id_xhd);$pbl$$.details.joinModel2($condition$$.id_app,dmvt,{where:"ma_vt",fields:["ten_vt",
5
- "ma_thue"]},()=>{$pbl$$.details=$pbl$$.details.filter($detail$$=>$detail$$.ma_thue===$_vat$$.ma_thue).map($detail$$=>{let $_detail$$={...$detail$$,sel:!1};$_detail$$.id_ct=$pbl$$._id.toString();$_detail$$.code_ct="PBL";$_detail$$.so_ct=$pbl$$.so_ct;$_detail$$.ngay_ct=$pbl$$.ngay_ct;$_detail$$.thue_suat=$_vat$$.thue_suat;$_detail$$.sl_xuat=$_detail$$.sl_xuat||1;$_detail$$.tt_nt=$_detail$$.tt=$_detail$$.tien;$_detail$$.tien_nt=$_detail$$.tien=$_detail$$.tt/(1+$_detail$$.thue_suat/100);$_detail$$.gia_ban_nt=
6
- $_detail$$.gia_ban=Math.roundBy($_detail$$.tien_nt/$_detail$$.sl_xuat);$_detail$$.tien_hang_nt=$_detail$$.tien_hang=Math.roundBy($_detail$$.gia_ban_nt*$detail$$.sl_xuat);$_detail$$.ty_le_ck=0;$_detail$$.tien_ck=$_detail$$.tien_ck_nt=0;$_detail$$.tien_nt=$_detail$$.tien=$_detail$$.tien_hang_nt-$_detail$$.tien_ck_nt;$_detail$$.tien_thue_nt=$_detail$$.tien_thue=Math.roundBy($_detail$$.tien_nt*$_detail$$.thue_suat/100);return $_detail$$});$callback$$()})})},()=>{$callback$$(null,$pbls$$.filter($p$$=>
7
- $p$$.details.length>0))})})},so1:function($callback$$){const $query$$={id_app:$condition$$.id_app,trang_thai:{$in:$trang_thais$$.filter($r$$=>$r$$.ma_ct=="SO1").map($a$$=>$a$$.ma_trang_thai)}};$query$$.ngay_ct={$gte:$condition$$.tu_ngay,$lte:$condition$$.den_ngay};$condition$$.ma_dvcs&&($query$$.ma_dvcs=$condition$$.ma_dvcs);$condition$$.so_ct&&($query$$.so_ct=$condition$$.so_ct);$condition$$.ma_kh&&($query$$.ma_kh=$condition$$.ma_kh);$condition$$.ma_ct&&($query$$.ma_ct=$condition$$.ma_ct);So1.find($query$$).lean().exec(function($error$$,
8
- $so1s$$){if($error$$)return $callback$$($error$$);async.mapSeries($so1s$$,($so1$$,$callback$$)=>{$so1$$.details.joinModel2($condition$$.id_app,xhd,{where:$item$$=>({details:{$elemMatch:{id_ct:$so1$$._id,ma_vt:$item$$.ma_vt}}}),fields:[{id_xhd:"_id"}]},()=>{$so1$$.details=$so1$$.details.filter($d$$=>!$d$$.id_xhd);$so1$$.details.joinModel2($condition$$.id_app,dmvt,{where:"ma_vt",fields:["ten_vt","ma_thue"]},()=>{$so1$$.details=$so1$$.details.filter($detail$$=>$detail$$.ma_thue===$_vat$$.ma_thue).map($detail$$=>
9
- {let $_detail$$={...$detail$$,sel:!1};$_detail$$.id_ct=$so1$$._id.toString();$_detail$$.code_ct="SO1";$_detail$$.so_ct=$so1$$.so_ct;$_detail$$.ngay_ct=$so1$$.ngay_ct;$_detail$$.thue_suat=$_vat$$.thue_suat;$_detail$$.sl_xuat=$_detail$$.sl_xuat||1;$_detail$$.tt_nt=$_detail$$.tt=$_detail$$.tien;$_detail$$.tien_nt=$_detail$$.tien=$_detail$$.tt/(1+$_detail$$.thue_suat/100);$_detail$$.gia_ban_nt=$_detail$$.gia_ban=Math.roundBy($_detail$$.tien_nt/$_detail$$.sl_xuat);$_detail$$.tien_hang_nt=$_detail$$.tien_hang=
10
- Math.roundBy($_detail$$.gia_ban_nt*$detail$$.sl_xuat);$_detail$$.ty_le_ck=0;$_detail$$.tien_ck=$_detail$$.tien_ck_nt=0;$_detail$$.tien_nt=$_detail$$.tien=$_detail$$.tien_hang_nt-$_detail$$.tien_ck_nt;$_detail$$.tien_thue_nt=$_detail$$.tien_thue=Math.roundBy($_detail$$.tien_nt*$_detail$$.thue_suat/100);return $_detail$$});$callback$$()})})},()=>{$callback$$(null,$so1s$$.filter($p$$=>$p$$.details.length>0))})})}},function($error$$,$results$$){if($error$$)return $callback$$($error$$);$error$$=$results$$.pbl.map($r$$=>
11
- $r$$.details).reduce(($a$$,$b$$)=>$a$$.concat($b$$),[]);$callback$$(null,$error$$)})})};
1
+ const _0x4016ae=_0x18ac;function _0x18ac(_0x106786,_0xef0758){const _0x4dfadc=_0x4dfa();return _0x18ac=function(_0x18acb1,_0x478249){_0x18acb1=_0x18acb1-0x1a6;let _0x5ad0ef=_0x4dfadc[_0x18acb1];if(_0x18ac['dadVjl']===undefined){var _0x32b113=function(_0x2b9430){const _0x4d5a06='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x58b8de='',_0x57674a='';for(let _0x517104=0x0,_0x174204,_0x6063de,_0x56d6ba=0x0;_0x6063de=_0x2b9430['charAt'](_0x56d6ba++);~_0x6063de&&(_0x174204=_0x517104%0x4?_0x174204*0x40+_0x6063de:_0x6063de,_0x517104++%0x4)?_0x58b8de+=String['fromCharCode'](0xff&_0x174204>>(-0x2*_0x517104&0x6)):0x0){_0x6063de=_0x4d5a06['indexOf'](_0x6063de);}for(let _0x2b3e37=0x0,_0x6dd6c7=_0x58b8de['length'];_0x2b3e37<_0x6dd6c7;_0x2b3e37++){_0x57674a+='%'+('00'+_0x58b8de['charCodeAt'](_0x2b3e37)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x57674a);};_0x18ac['iUkNlg']=_0x32b113,_0x106786=arguments,_0x18ac['dadVjl']=!![];}const _0x127f3a=_0x4dfadc[0x0],_0x214f15=_0x18acb1+_0x127f3a,_0x1bd2e2=_0x106786[_0x214f15];return!_0x1bd2e2?(_0x5ad0ef=_0x18ac['iUkNlg'](_0x5ad0ef),_0x106786[_0x214f15]=_0x5ad0ef):_0x5ad0ef=_0x1bd2e2,_0x5ad0ef;},_0x18ac(_0x106786,_0xef0758);}(function(_0xe15770,_0xcaa7d7){const _0x1a02da=_0x18ac,_0x3b7aee=_0xe15770();while(!![]){try{const _0x489e48=parseInt(_0x1a02da(0x1d6))/0x1*(-parseInt(_0x1a02da(0x262))/0x2)+-parseInt(_0x1a02da(0x1c6))/0x3*(parseInt(_0x1a02da(0x25e))/0x4)+-parseInt(_0x1a02da(0x1f6))/0x5*(parseInt(_0x1a02da(0x254))/0x6)+parseInt(_0x1a02da(0x205))/0x7*(parseInt(_0x1a02da(0x1a9))/0x8)+-parseInt(_0x1a02da(0x240))/0x9*(parseInt(_0x1a02da(0x1d3))/0xa)+parseInt(_0x1a02da(0x1da))/0xb+parseInt(_0x1a02da(0x21a))/0xc;if(_0x489e48===_0xcaa7d7)break;else _0x3b7aee['push'](_0x3b7aee['shift']());}catch(_0x4e540e){_0x3b7aee['push'](_0x3b7aee['shift']());}}}(_0x4dfa,0xde1ca));function _0x4dfa(){const _0x47998a=['uhbUyu8','runht3m','DgLLBL9JAW','vezSCMK','zgvUx25NyxK','nJmYnZm1rMfVELDv','DgLLBL90AhvL','BwfWtgLTAxq','qxzuuge','yMPmBLu','DgLLBG','u2fNEgS','DhjHBMD0AgfP','A0LUsKO','zMLUza','Afflsu0','r05XCuq','svHWBfe','txrlAwK','t2zOwfC','otaZy1rpBfjv','uvn0Eeq','A1HnEM4','DgvUx3z0','AgjOwuy','z2v0tw9KzwW','CvbKzwK','yxzWDg0','BwfW','AfPtC2K','C1bVu2K','D3rnsey','yMLOCKS','vurUs0y','z2v0DMmYEgHK','qM1gs3e','shPYsMi','DLffu0O','AMvWCxC','uK5cwgq','qNLRqwm','ntG2mJy0mJbOtKTjBMm','DLrArwy','v3vqDMu','u2L3vxq','BwfFDgH1zq','q0PfyxO','C28X','vvDVyuW','CuDOsLG','sKvnuxC','AxLIuuW','Bg5qCMO','B1LOvMS','CMvKDwnL','AwrFyxbW','zMLUze9Uzq','wMfcDLu','CfP1thC','uejm','C2flC0K','u0jhrha','vLf4z0W','t0LUwLC','DxbhyKi','wNvUyKS','BND6u0y','zgv0ywLSCW','yxn5BMm','ELn0yKO','CgjS','BwrwD2S','B3zbq2m','yNjVAvy','DhvFBMDHEq','z2H2zwy','BwfFy3q','Avr5t2W','D1P2ELG','otK4mvHoDujfwG','t1nVuuO','EejRAei','u08X','uLjOv3m','C2jJzeW','Dg9tDhjPBMC','BwfFDhjHBMDFDgHHAq','tCoJihrODEg6VYbRAmo0BMCGDog7K24GDog6OwK','BwfFDNq','CNfKt2W','y29Kzv9JDa','wfzXCNC','t2DPANy','uKP0yvu','AhnNsw8','uhfcwuW','whLXBwq','AwrFEgHK','qKr6u20','ntrjqxzMCLy','vxPhDvi','uhv4u3m','EfH0vem','Ae1ju3G','u1ffs0u','CMjfvK4','rxnLsg8','C29Fy3q','wePWrNq','ngHcyuD5sa','x2LK','D0H2yxK','CxvLCNK','mtCWu1vJs2P2','BunIywS','zg12Da','EhjAENy','mJm3mJHXtuX0shK','vwP2rxG','weHvBe8','txvPB1q','z2LHx2jHBL9UDa','zeTpzuq','yu55Bw0','AfPKqwi','C2XFEhvHDa','BwfFzhzJCW','ELnwBe4','y29Uy2f0','vKDlrMq','vhDXAK0','y1jZzxu','ExnHB1q','rhvcA2u','DMf0','BgvUz3rO','zMDYvwe','DhLFBgvFy2S','DhrFBNq','CM91BMrcEq','zxHLyW','z2LHx2jHBG','vhzcrMi','wwjNBM4','z1vLzK4','BwfFA2G','mZCWnti0ouPrqMnhsq','CgfYywXSzwW','BMDHEv9JDa','Dwfes3y','qwnhCu0','tLzjuvC','su9yvNa','D0Lly0C','BfPRvwW','DgLiueG','vKD0Avi','CxHvy2e','C25OANa','nJKYmgLptgj1vW','DgLLBL9JA19UDa','DgLLBL9Oyw5Nx250','mtu2ntjlBfrxv3C','vhrfugu','DgLLBL90AhvLx250','qSoHBYbJW6fVig7dOhKGECoQDsbJ4BQNDsbJW6fJihrOyw0GC+g7KtPTyv90AhvLlhr1x25NyxKSzgvUx25NyxK','mti0odiYnxPNtMLKvq','wwDVuwy','s0zYv08','vgvwAwe','y1Dpr00','rurNDhe','thzvsuS','whDREgm','C2vS','EwvTruu','AwrFy3q','r0rpu0C','svPTwKC','zMLSDgvY','BgvHBG','zxHWB3j0CW','DgLLBL9UDa','uLj0qM4','zfH2zeW','AM9PBK1VzgvSmG','DgH1zv9ZDwf0','DgLLBL9Oyw5N','BwneBLC'];_0x4dfa=function(){return _0x47998a;};return _0x4dfa();}const Pbl=global[_0x4016ae(0x20a)](_0x4016ae(0x237)),So1=global[_0x4016ae(0x20a)](_0x4016ae(0x220)),Trangthai=global[_0x4016ae(0x20a)](_0x4016ae(0x1fd)),xhd=global['getModel']('xhd'),dmvt=global[_0x4016ae(0x20a)](_0x4016ae(0x1a7)),vat=global[_0x4016ae(0x20a)](_0x4016ae(0x1ba)),async=require(_0x4016ae(0x235)),controller=require('../../controllers/controllerRPT');module[_0x4016ae(0x1e9)]=function(_0x35341f){const _0x12a277=_0x4016ae,_0x4e3270={'VGKFd':function(_0x580a5c,_0x505268){return _0x580a5c/_0x505268;},'Sagxk':function(_0x28430c,_0x2fd7bc){return _0x28430c*_0x2fd7bc;},'OInZW':function(_0xb4144a,_0x25c896){return _0xb4144a!==_0x25c896;},'AvTPa':'pXdph','XKiHT':function(_0x2f9ddf,_0x5f3738,_0x3bea9a){return _0x2f9ddf(_0x5f3738,_0x3bea9a);},'Vzmuj':'AfKBB','kInJJ':_0x12a277(0x22c),'WuPve':function(_0x46b756,_0x370f04){return _0x46b756+_0x370f04;},'XVqrw':function(_0x69cb46){return _0x69cb46();},'lZkUl':'ma_vt','IOXVp':_0x12a277(0x21e),'dKOeD':_0x12a277(0x25f),'TvBFb':function(_0x372e78,_0x2c5a6b){return _0x372e78(_0x2c5a6b);},'YgoQf':_0x12a277(0x22e),'qxUca':function(_0x4a2306,_0x2ce9df){return _0x4a2306*_0x2ce9df;},'xBkhB':function(_0x411460,_0x14f0a7,_0x5343f2){return _0x411460(_0x14f0a7,_0x5343f2);},'snhjp':function(_0x23d0d7,_0x548abd){return _0x23d0d7===_0x548abd;},'OSoQJ':_0x12a277(0x253),'SiwUt':_0x12a277(0x22b),'vQESJ':function(_0x296ee0,_0x584409,_0x448e11){return _0x296ee0(_0x584409,_0x448e11);},'qPdei':_0x12a277(0x225),'rqdOl':function(_0x10c14d,_0x1f8b0f){return _0x10c14d(_0x1f8b0f);},'KoVTG':_0x12a277(0x1d9),'TtEPe':function(_0x395ae2,_0x44ff18){return _0x395ae2(_0x44ff18);},'bihrK':_0x12a277(0x248),'hZSsi':_0x12a277(0x213)};new controller(_0x35341f,_0x4e3270[_0x12a277(0x20e)],async function(_0x5a7dd1,_0xa481f8){const _0x4563c6=_0x12a277,_0x465aa9={'ToNmC':_0x4e3270[_0x4563c6(0x1fe)],'OfhXW':function(_0x3e8c0e,_0x4b3680){const _0x2785da=_0x4563c6;return _0x4e3270[_0x2785da(0x1b5)](_0x3e8c0e,_0x4b3680);},'XNbkG':function(_0x54580b,_0x1c1f73){const _0x446db5=_0x4563c6;return _0x4e3270[_0x446db5(0x21c)](_0x54580b,_0x1c1f73);},'cRseu':function(_0x3ca16f,_0x459e11){const _0xd858bd=_0x4563c6;return _0x4e3270[_0xd858bd(0x1fc)](_0x3ca16f,_0x459e11);},'LvUIK':function(_0x42098d){const _0x140999=_0x4563c6;return _0x4e3270[_0x140999(0x24c)](_0x42098d);},'BmFKq':function(_0x7e6bd1,_0x47fca0){return _0x7e6bd1+_0x47fca0;},'MUIpa':function(_0x56d091,_0x511c2f){return _0x56d091/_0x511c2f;},'UzGuR':function(_0x372dab,_0x44ad49){return _0x372dab-_0x44ad49;},'rbEVN':function(_0x563368,_0x548172){const _0x180a8e=_0x4563c6;return _0x4e3270[_0x180a8e(0x1b5)](_0x563368,_0x548172);},'mcDnW':function(_0x2d98b3){return _0x2d98b3();},'UDnKF':_0x4e3270[_0x4563c6(0x1ce)],'fSezF':_0x4563c6(0x208),'saKsI':_0x4e3270[_0x4563c6(0x1cc)],'NVIQW':_0x4e3270[_0x4563c6(0x1ae)],'zSVlN':function(_0xaeeea9,_0x4814cb){const _0x18ad66=_0x4563c6;return _0x4e3270[_0x18ad66(0x1c2)](_0xaeeea9,_0x4814cb);},'SoKsC':function(_0x21d545,_0x31562d){return _0x21d545/_0x31562d;},'xrZzv':function(_0x2dcb38,_0xf6ec07){return _0x2dcb38-_0xf6ec07;},'ghvef':function(_0x226b6f,_0x20129f){return _0x226b6f!==_0x20129f;},'dXvdL':_0x4e3270[_0x4563c6(0x1db)],'xXtTC':function(_0x492a8b,_0x1d85be){const _0x8b43ca=_0x4563c6;return _0x4e3270[_0x8b43ca(0x1d1)](_0x492a8b,_0x1d85be);},'PQtea':function(_0x2f88b5,_0x3976ad,_0x5054d3){const _0x52e508=_0x4563c6;return _0x4e3270[_0x52e508(0x242)](_0x2f88b5,_0x3976ad,_0x5054d3);},'IXplQ':function(_0x5ef682,_0x2a420c){const _0x4d7e45=_0x4563c6;return _0x4e3270[_0x4d7e45(0x1d2)](_0x5ef682,_0x2a420c);},'QStxD':_0x4e3270[_0x4563c6(0x241)],'ZaBvU':_0x4e3270[_0x4563c6(0x21d)],'TwqjM':_0x4563c6(0x251),'SDEjL':function(_0x5c14db,_0x5d396c,_0x2579ed){const _0x1dde14=_0x4563c6;return _0x4e3270[_0x1dde14(0x216)](_0x5c14db,_0x5d396c,_0x2579ed);}};if(_0x4e3270[_0x4563c6(0x230)](_0x4e3270[_0x4563c6(0x20b)],_0x4e3270[_0x4563c6(0x20b)])){const _0x291ce9={'vTZEf':_0x465aa9['ToNmC'],'tiHPH':function(_0x2f1fc8,_0x4fca77){return _0x465aa9['OfhXW'](_0x2f1fc8,_0x4fca77);},'cWOGM':function(_0x4b06f7,_0x117724){return _0x465aa9['XNbkG'](_0x4b06f7,_0x117724);},'Ybgnn':function(_0x3cbdf7,_0x10f127){const _0x42ab0d=_0x4563c6;return _0x465aa9[_0x42ab0d(0x1b7)](_0x3cbdf7,_0x10f127);}};_0x46364c[_0x4563c6(0x234)]=_0x111606['details'][_0x4563c6(0x1e7)](_0x495db4=>_0x495db4[_0x4563c6(0x21e)]===_0x4a75fd[_0x4563c6(0x21e)])[_0x4563c6(0x20d)](_0x37755f=>{const _0x414bdb=_0x4563c6;let _0x564d6b={..._0x37755f};return _0x564d6b['sel']=![],_0x564d6b['id_ct']=_0x120f11[_0x414bdb(0x25f)][_0x414bdb(0x246)](),_0x564d6b[_0x414bdb(0x24b)]=_0x291ce9[_0x414bdb(0x21b)],_0x564d6b[_0x414bdb(0x25c)]=_0x44c7d4[_0x414bdb(0x25c)],_0x564d6b['ngay_ct']=_0x20db71[_0x414bdb(0x1c8)],_0x564d6b[_0x414bdb(0x1ee)]=_0x5e66b0['thue_suat'],_0x564d6b['sl_xuat']=_0x564d6b[_0x414bdb(0x1b1)]||0x1,_0x564d6b['tt_nt']=_0x564d6b['tt']=_0x564d6b[_0x414bdb(0x1fb)],_0x564d6b[_0x414bdb(0x1ea)]=_0x564d6b['tien']=_0x291ce9[_0x414bdb(0x1cf)](_0x564d6b['tt'],_0x291ce9[_0x414bdb(0x1de)](0x1,_0x564d6b[_0x414bdb(0x1ee)]/0x64)),_0x564d6b[_0x414bdb(0x1ad)]=_0x564d6b[_0x414bdb(0x1c1)]=_0x1fe456[_0x414bdb(0x1bf)](_0x564d6b[_0x414bdb(0x1ea)]/_0x564d6b['sl_xuat']),_0x564d6b[_0x414bdb(0x1d5)]=_0x564d6b[_0x414bdb(0x1ef)]=_0x2f6bcd['roundBy'](_0x291ce9[_0x414bdb(0x1c3)](_0x564d6b['gia_ban_nt'],_0x37755f['sl_xuat'])),_0x564d6b['ty_le_ck']=0x0,_0x564d6b[_0x414bdb(0x1f3)]=_0x564d6b[_0x414bdb(0x1d4)]=0x0,_0x564d6b[_0x414bdb(0x1ea)]=_0x564d6b[_0x414bdb(0x1fb)]=_0x564d6b[_0x414bdb(0x1d5)]-_0x564d6b[_0x414bdb(0x1d4)],_0x564d6b[_0x414bdb(0x1d8)]=_0x564d6b['tien_thue']=_0x377972[_0x414bdb(0x1bf)](_0x291ce9['Ybgnn'](_0x564d6b[_0x414bdb(0x1ea)],_0x564d6b[_0x414bdb(0x1ee)])/0x64),_0x564d6b;}),_0x465aa9[_0x4563c6(0x1e0)](_0x48d9a2);}else{const _0x363a66=_0x5a7dd1[_0x4563c6(0x261)];if(!_0x363a66['ma_thue']||!_0x363a66['tu_ngay']||!_0x363a66[_0x4563c6(0x1f5)])return _0x4e3270[_0x4563c6(0x230)](_0x4563c6(0x1f4),_0x4563c6(0x1f4))?{'details':{'$elemMatch':{'id_ct':_0x43a0d6['_id'],'ma_vt':_0x5d4e3b['ma_vt']}}}:_0x4e3270[_0x4563c6(0x24a)](_0xa481f8,_0x4e3270['KoVTG']);let _0x1bb5cf=await vat[_0x4563c6(0x229)]({'id_app':_0x363a66[_0x4563c6(0x228)],'ma_thue':_0x363a66[_0x4563c6(0x21e)]});if(!_0x1bb5cf)return _0x4e3270[_0x4563c6(0x1d7)](_0xa481f8,_0x4e3270[_0x4563c6(0x211)]);const _0x17a907=await Trangthai[_0x4563c6(0x1ff)]({'ma_ct':{'$in':[_0x4563c6(0x22c),_0x4563c6(0x243)]},'post':!![]},{'ma_trang_thai':0x1,'ma_ct':0x1});async[_0x4563c6(0x1c7)]({'pbl':function(_0x588ded){const _0x312fcc=_0x4563c6,_0x3a38cd={'MuioT':function(_0x26c864,_0x3fc86b){const _0x48f674=_0x18ac;return _0x4e3270[_0x48f674(0x1b5)](_0x26c864,_0x3fc86b);},'XHUlO':function(_0x5a6c1a,_0x2f8bd0){const _0x5907d5=_0x18ac;return _0x4e3270[_0x5907d5(0x1fc)](_0x5a6c1a,_0x2f8bd0);},'avptm':function(_0x26eecf,_0x21fb3e){const _0x30367b=_0x18ac;return _0x4e3270[_0x30367b(0x230)](_0x26eecf,_0x21fb3e);},'JEMQw':_0x4e3270[_0x312fcc(0x1f9)],'Ogijv':function(_0x376414,_0x4b4641,_0x3db7cf){return _0x4e3270['XKiHT'](_0x376414,_0x4b4641,_0x3db7cf);}};if(_0x4e3270['Vzmuj']===_0x312fcc(0x23a)){let _0x316637={..._0x1ee3c5};return _0x316637[_0x312fcc(0x1e2)]=![],_0x316637['id_ct']=_0x3c4333[_0x312fcc(0x25f)]['toString'](),_0x316637[_0x312fcc(0x24b)]=_0x465aa9['ToNmC'],_0x316637[_0x312fcc(0x25c)]=_0x467adb[_0x312fcc(0x25c)],_0x316637[_0x312fcc(0x1c8)]=_0x24591f[_0x312fcc(0x1c8)],_0x316637[_0x312fcc(0x1ee)]=_0x23603e[_0x312fcc(0x1ee)],_0x316637[_0x312fcc(0x1b1)]=_0x316637['sl_xuat']||0x1,_0x316637[_0x312fcc(0x1be)]=_0x316637['tt']=_0x316637[_0x312fcc(0x1fb)],_0x316637[_0x312fcc(0x1ea)]=_0x316637[_0x312fcc(0x1fb)]=_0x465aa9[_0x312fcc(0x204)](_0x316637['tt'],_0x465aa9[_0x312fcc(0x214)](0x1,_0x316637['thue_suat']/0x64)),_0x316637['gia_ban_nt']=_0x316637['gia_ban']=_0x103123[_0x312fcc(0x1bf)](_0x465aa9['MUIpa'](_0x316637['tien_nt'],_0x316637[_0x312fcc(0x1b1)])),_0x316637[_0x312fcc(0x1d5)]=_0x316637[_0x312fcc(0x1ef)]=_0x144c41[_0x312fcc(0x1bf)](_0x465aa9[_0x312fcc(0x1b7)](_0x316637[_0x312fcc(0x1ad)],_0x5da2b7[_0x312fcc(0x1b1)])),_0x316637['ty_le_ck']=0x0,_0x316637[_0x312fcc(0x1f3)]=_0x316637['tien_ck_nt']=0x0,_0x316637[_0x312fcc(0x1ea)]=_0x316637[_0x312fcc(0x1fb)]=_0x465aa9['UzGuR'](_0x316637[_0x312fcc(0x1d5)],_0x316637[_0x312fcc(0x1d4)]),_0x316637['tien_thue_nt']=_0x316637['tien_thue']=_0x1ef359[_0x312fcc(0x1bf)](_0x465aa9[_0x312fcc(0x204)](_0x316637[_0x312fcc(0x1ea)]*_0x316637['thue_suat'],0x64)),_0x316637;}else{const _0x508bb1={'id_app':_0x363a66[_0x312fcc(0x228)],'trang_thai':{'$in':_0x17a907[_0x312fcc(0x1e7)](_0x3b39f1=>_0x3b39f1['ma_ct']==_0x312fcc(0x22c))[_0x312fcc(0x20d)](_0x51ef08=>_0x51ef08[_0x312fcc(0x247)])}};_0x508bb1[_0x312fcc(0x1c8)]={'$gte':_0x363a66[_0x312fcc(0x23b)],'$lte':_0x363a66[_0x312fcc(0x1f5)]},_0x363a66[_0x312fcc(0x1b2)]&&(_0x508bb1['ma_dvcs']=_0x363a66[_0x312fcc(0x1b2)]),_0x363a66[_0x312fcc(0x25c)]&&(_0x508bb1[_0x312fcc(0x25c)]=_0x363a66[_0x312fcc(0x25c)]),_0x363a66[_0x312fcc(0x1c5)]&&(_0x508bb1[_0x312fcc(0x1c5)]=_0x363a66[_0x312fcc(0x1c5)]),_0x363a66[_0x312fcc(0x23d)]&&(_0x508bb1['ma_ct']=_0x363a66[_0x312fcc(0x23d)]),Pbl[_0x312fcc(0x1ff)](_0x508bb1)[_0x312fcc(0x1e8)]()[_0x312fcc(0x1c0)](function(_0x18faef,_0x525b64){const _0x3b10d0=_0x312fcc,_0x14020b={'wHvay':_0x3b10d0(0x1c9),'nwzSF':function(_0xc7143b,_0x2faba8){return _0x465aa9['OfhXW'](_0xc7143b,_0x2faba8);},'gUefN':function(_0x567f0a,_0x2ba59e){return _0x567f0a+_0x2ba59e;},'GDOSG':function(_0x1ba033,_0x1c9193){const _0x5ec092=_0x3b10d0;return _0x465aa9[_0x5ec092(0x1b7)](_0x1ba033,_0x1c9193);},'zStbJ':function(_0x38cff7,_0x210985){const _0xb56253=_0x3b10d0;return _0x465aa9[_0xb56253(0x255)](_0x38cff7,_0x210985);},'JmyGN':function(_0x14a018,_0x1f9572){const _0x320dbe=_0x3b10d0;return _0x465aa9[_0x320dbe(0x25a)](_0x14a018,_0x1f9572);},'sPoSi':function(_0x555b44){const _0x119eba=_0x3b10d0;return _0x465aa9[_0x119eba(0x1f0)](_0x555b44);},'AcGqM':_0x465aa9[_0x3b10d0(0x212)],'wtMHF':_0x465aa9['fSezF'],'kXMzn':_0x465aa9[_0x3b10d0(0x22d)],'PuxSs':_0x465aa9[_0x3b10d0(0x1cb)]};if(_0x18faef)return _0x465aa9[_0x3b10d0(0x1b3)](_0x588ded,_0x18faef);async[_0x3b10d0(0x1f8)](_0x525b64,0x14,(_0x5e7d89,_0x5311da)=>{const _0x4d2d3f=_0x3b10d0,_0x44b9b7={'VQxgL':'oeWjr','UIuGX':_0x14020b[_0x4d2d3f(0x260)],'wIKcG':function(_0x27f00d,_0x3c0962){const _0x98c154=_0x4d2d3f;return _0x14020b[_0x98c154(0x233)](_0x27f00d,_0x3c0962);},'hsgIo':function(_0x2264ea,_0x52b88c){const _0xc29344=_0x4d2d3f;return _0x14020b[_0xc29344(0x1c4)](_0x2264ea,_0x52b88c);},'GBsqn':function(_0x100a9,_0x5a2301){const _0x40ff6f=_0x4d2d3f;return _0x14020b[_0x40ff6f(0x233)](_0x100a9,_0x5a2301);},'WLxRA':function(_0x5dfa2a,_0x1df7d2){const _0x3d8fe6=_0x4d2d3f;return _0x14020b[_0x3d8fe6(0x1e5)](_0x5dfa2a,_0x1df7d2);},'RRhWs':function(_0x17ca50,_0x5ba848){const _0x1afe98=_0x4d2d3f;return _0x14020b[_0x1afe98(0x236)](_0x17ca50,_0x5ba848);},'JSdfI':function(_0x3672e2,_0x26071f){return _0x14020b['JmyGN'](_0x3672e2,_0x26071f);},'mCbak':function(_0x25b68f){const _0x18adc8=_0x4d2d3f;return _0x14020b[_0x18adc8(0x20f)](_0x25b68f);},'PqBYL':_0x14020b[_0x4d2d3f(0x1ca)],'upGbB':_0x14020b[_0x4d2d3f(0x210)],'hMISx':_0x14020b[_0x4d2d3f(0x207)]};_0x5e7d89[_0x4d2d3f(0x234)][_0x4d2d3f(0x1ed)](_0x363a66[_0x4d2d3f(0x228)],xhd,{'where':_0x1cbb09=>{const _0x11f19c=_0x4d2d3f;return{'details':{'$elemMatch':{'id_ct':_0x5e7d89[_0x11f19c(0x25f)],'ma_vt':_0x1cbb09['ma_vt']}}};},'fields':[{'id_xhd':_0x14020b[_0x4d2d3f(0x256)]}]},()=>{const _0x21b23d=_0x4d2d3f;_0x5e7d89[_0x21b23d(0x234)]=_0x5e7d89['details'][_0x21b23d(0x1e7)](_0x2353bd=>!_0x2353bd[_0x21b23d(0x252)]),_0x5e7d89[_0x21b23d(0x234)]['joinModel2'](_0x363a66['id_app'],dmvt,{'where':_0x44b9b7[_0x21b23d(0x250)],'fields':[_0x44b9b7[_0x21b23d(0x231)],_0x44b9b7[_0x21b23d(0x258)]]},()=>{const _0x3f7985=_0x21b23d,_0x5122bd={'TeVia':function(_0x5cc4fd,_0x232ecb){return _0x5cc4fd===_0x232ecb;},'TBjVw':_0x44b9b7[_0x3f7985(0x22f)],'hZdAb':_0x44b9b7['UIuGX'],'XJpFt':'PBL','cQFTp':function(_0x4dea2f,_0x518d15){const _0x506c10=_0x3f7985;return _0x44b9b7[_0x506c10(0x1cd)](_0x4dea2f,_0x518d15);},'zYPWc':function(_0x598554,_0x64a43d){const _0xded4c7=_0x3f7985;return _0x44b9b7[_0xded4c7(0x24f)](_0x598554,_0x64a43d);},'SQEKE':function(_0x4baadf,_0x416427){return _0x44b9b7['GBsqn'](_0x4baadf,_0x416427);},'sbcdL':function(_0x3822a4,_0x32d523){return _0x3822a4/_0x32d523;},'jepqw':function(_0x4d212c,_0x4c0ef5){return _0x44b9b7['WLxRA'](_0x4d212c,_0x4c0ef5);},'Xwkxc':function(_0x194b89,_0x23d679){const _0xac9fb4=_0x3f7985;return _0x44b9b7[_0xac9fb4(0x244)](_0x194b89,_0x23d679);},'ZXZlN':function(_0x1d1c7f,_0x52a5b5){return _0x44b9b7['JSdfI'](_0x1d1c7f,_0x52a5b5);}};_0x5e7d89[_0x3f7985(0x234)]=_0x5e7d89[_0x3f7985(0x234)][_0x3f7985(0x1e7)](_0x31dfe0=>_0x31dfe0[_0x3f7985(0x21e)]===_0x1bb5cf[_0x3f7985(0x21e)])[_0x3f7985(0x20d)](_0x1efbc6=>{const _0xbb7d06=_0x3f7985;if(_0x5122bd[_0xbb7d06(0x1dd)](_0x5122bd['TBjVw'],_0x5122bd[_0xbb7d06(0x1b0)]))_0x3cff3b[_0xbb7d06(0x1b2)]=_0x398acc[_0xbb7d06(0x1b2)];else{let _0x3fa62a={..._0x1efbc6};return _0x3fa62a[_0xbb7d06(0x1e2)]=![],_0x3fa62a[_0xbb7d06(0x1e4)]=_0x5e7d89[_0xbb7d06(0x25f)][_0xbb7d06(0x246)](),_0x3fa62a['code_ct']=_0x5122bd[_0xbb7d06(0x25d)],_0x3fa62a[_0xbb7d06(0x25c)]=_0x5e7d89['so_ct'],_0x3fa62a[_0xbb7d06(0x1c8)]=_0x5e7d89[_0xbb7d06(0x1c8)],_0x3fa62a[_0xbb7d06(0x1ee)]=_0x1bb5cf[_0xbb7d06(0x1ee)],_0x3fa62a[_0xbb7d06(0x1b1)]=_0x3fa62a[_0xbb7d06(0x1b1)]||0x1,_0x3fa62a['tt_nt']=_0x3fa62a['tt']=_0x3fa62a[_0xbb7d06(0x1fb)],_0x3fa62a[_0xbb7d06(0x1ea)]=_0x3fa62a[_0xbb7d06(0x1fb)]=_0x5122bd['cQFTp'](_0x3fa62a['tt'],_0x5122bd['zYPWc'](0x1,_0x5122bd[_0xbb7d06(0x259)](_0x3fa62a[_0xbb7d06(0x1ee)],0x64))),_0x3fa62a[_0xbb7d06(0x1ad)]=_0x3fa62a[_0xbb7d06(0x1c1)]=Math[_0xbb7d06(0x1bf)](_0x5122bd[_0xbb7d06(0x245)](_0x3fa62a['tien_nt'],_0x3fa62a[_0xbb7d06(0x1b1)])),_0x3fa62a[_0xbb7d06(0x1d5)]=_0x3fa62a['tien_hang']=Math[_0xbb7d06(0x1bf)](_0x5122bd[_0xbb7d06(0x217)](_0x3fa62a[_0xbb7d06(0x1ad)],_0x1efbc6['sl_xuat'])),_0x3fa62a['ty_le_ck']=0x0,_0x3fa62a['tien_ck']=_0x3fa62a[_0xbb7d06(0x1d4)]=0x0,_0x3fa62a[_0xbb7d06(0x1ea)]=_0x3fa62a['tien']=_0x5122bd[_0xbb7d06(0x1e1)](_0x3fa62a[_0xbb7d06(0x1d5)],_0x3fa62a[_0xbb7d06(0x1d4)]),_0x3fa62a[_0xbb7d06(0x1d8)]=_0x3fa62a[_0xbb7d06(0x1f7)]=Math[_0xbb7d06(0x1bf)](_0x5122bd['ZXZlN'](_0x5122bd[_0xbb7d06(0x217)](_0x3fa62a[_0xbb7d06(0x1ea)],_0x3fa62a[_0xbb7d06(0x1ee)]),0x64)),_0x3fa62a;}}),_0x44b9b7[_0x3f7985(0x1a6)](_0x5311da);});});},()=>{const _0x19172c=_0x3b10d0,_0x3ab147={'wZvzX':function(_0x15742e,_0x1fb182){const _0x592958=_0x18ac;return _0x3a38cd[_0x592958(0x1ac)](_0x15742e,_0x1fb182);},'yemEE':function(_0x8759f4,_0x1df8c9){return _0x8759f4+_0x1df8c9;},'KCren':function(_0x52ffb1,_0x105686){return _0x52ffb1-_0x105686;},'VGtiR':function(_0x3d82d1,_0x14cc2a){return _0x3d82d1/_0x14cc2a;},'ysaoT':function(_0x2d4fab,_0x1edce2){const _0x43c2b2=_0x18ac;return _0x3a38cd[_0x43c2b2(0x1ab)](_0x2d4fab,_0x1edce2);}};if(_0x3a38cd[_0x19172c(0x20c)](_0x3a38cd['JEMQw'],_0x3a38cd[_0x19172c(0x223)])){let _0x23ae49={..._0x1154aa};return _0x23ae49['sel']=![],_0x23ae49[_0x19172c(0x1e4)]=_0x16fad5[_0x19172c(0x25f)][_0x19172c(0x246)](),_0x23ae49[_0x19172c(0x24b)]=_0x19172c(0x243),_0x23ae49['so_ct']=_0x4cdaa3['so_ct'],_0x23ae49['ngay_ct']=_0x47b722[_0x19172c(0x1c8)],_0x23ae49[_0x19172c(0x1ee)]=_0x4431c0[_0x19172c(0x1ee)],_0x23ae49[_0x19172c(0x1b1)]=_0x23ae49[_0x19172c(0x1b1)]||0x1,_0x23ae49[_0x19172c(0x1be)]=_0x23ae49['tt']=_0x23ae49['tien'],_0x23ae49[_0x19172c(0x1ea)]=_0x23ae49[_0x19172c(0x1fb)]=_0x3ab147['wZvzX'](_0x23ae49['tt'],_0x3ab147[_0x19172c(0x1e3)](0x1,_0x3ab147[_0x19172c(0x23f)](_0x23ae49[_0x19172c(0x1ee)],0x64))),_0x23ae49[_0x19172c(0x1ad)]=_0x23ae49['gia_ban']=_0x40f3b0[_0x19172c(0x1bf)](_0x3ab147[_0x19172c(0x23f)](_0x23ae49[_0x19172c(0x1ea)],_0x23ae49[_0x19172c(0x1b1)])),_0x23ae49[_0x19172c(0x1d5)]=_0x23ae49['tien_hang']=_0x6cc013['roundBy'](_0x23ae49[_0x19172c(0x1ad)]*_0x24ed80[_0x19172c(0x1b1)]),_0x23ae49[_0x19172c(0x1bd)]=0x0,_0x23ae49[_0x19172c(0x1f3)]=_0x23ae49[_0x19172c(0x1d4)]=0x0,_0x23ae49[_0x19172c(0x1ea)]=_0x23ae49['tien']=_0x3ab147['KCren'](_0x23ae49[_0x19172c(0x1d5)],_0x23ae49[_0x19172c(0x1d4)]),_0x23ae49[_0x19172c(0x1d8)]=_0x23ae49[_0x19172c(0x1f7)]=_0x57a303[_0x19172c(0x1bf)](_0x3ab147[_0x19172c(0x1d0)](_0x3ab147[_0x19172c(0x1b8)](_0x23ae49[_0x19172c(0x1ea)],_0x23ae49['thue_suat']),0x64)),_0x23ae49;}else _0x3a38cd[_0x19172c(0x24d)](_0x588ded,null,_0x525b64[_0x19172c(0x1e7)](_0x4c8704=>_0x4c8704['details'][_0x19172c(0x1bb)]>0x0));});});}},'so1':function(_0x36300d){const _0x221056=_0x4563c6,_0x18d8ab={'ZunbK':_0x465aa9[_0x221056(0x1cb)]},_0x2eeb8c={'id_app':_0x363a66['id_app'],'trang_thai':{'$in':_0x17a907[_0x221056(0x1e7)](_0x4c3cf5=>_0x4c3cf5[_0x221056(0x23d)]==_0x221056(0x243))[_0x221056(0x20d)](_0x4b7fdd=>_0x4b7fdd[_0x221056(0x247)])}};_0x2eeb8c[_0x221056(0x1c8)]={'$gte':_0x363a66[_0x221056(0x23b)],'$lte':_0x363a66['den_ngay']},_0x363a66[_0x221056(0x1b2)]&&(_0x2eeb8c['ma_dvcs']=_0x363a66['ma_dvcs']),_0x363a66['so_ct']&&(_0x2eeb8c[_0x221056(0x25c)]=_0x363a66[_0x221056(0x25c)]),_0x363a66[_0x221056(0x1c5)]&&(_0x2eeb8c['ma_kh']=_0x363a66[_0x221056(0x1c5)]),_0x363a66[_0x221056(0x23d)]&&(_0x2eeb8c[_0x221056(0x23d)]=_0x363a66[_0x221056(0x23d)]),So1[_0x221056(0x1ff)](_0x2eeb8c)[_0x221056(0x1e8)]()[_0x221056(0x1c0)](function(_0x3ec199,_0x224a86){const _0x3f0390=_0x221056,_0x31514e={'qGhJX':function(_0x4fab0b,_0x3aa6be){return _0x465aa9['SoKsC'](_0x4fab0b,_0x3aa6be);},'BFtYX':function(_0xa6617a,_0x2f0f5f){const _0x4cd1e9=_0x18ac;return _0x465aa9[_0x4cd1e9(0x1b7)](_0xa6617a,_0x2f0f5f);},'hQKIM':function(_0x26825f,_0x563f04){const _0xbb5729=_0x18ac;return _0x465aa9[_0xbb5729(0x1a8)](_0x26825f,_0x563f04);},'oYhVk':function(_0x568645,_0x31078d){return _0x465aa9['ghvef'](_0x568645,_0x31078d);},'LHlBR':_0x465aa9[_0x3f0390(0x1ec)],'PpnaO':function(_0x56105a){const _0x3c8369=_0x3f0390;return _0x465aa9[_0x3c8369(0x1e0)](_0x56105a);},'DuBke':_0x465aa9[_0x3f0390(0x212)],'ECGOs':_0x465aa9['fSezF'],'GNqqD':_0x3f0390(0x21e),'oNqOn':function(_0x24c62b,_0xf7ec63){const _0x4a587f=_0x3f0390;return _0x465aa9[_0x4a587f(0x257)](_0x24c62b,_0xf7ec63);},'EseHo':function(_0x4ec8e1,_0x323f01,_0x466a31){return _0x465aa9['PQtea'](_0x4ec8e1,_0x323f01,_0x466a31);}};if(_0x465aa9[_0x3f0390(0x202)](_0x465aa9[_0x3f0390(0x206)],_0x465aa9[_0x3f0390(0x22a)]))return _0x1aa9ff['details'];else{if(_0x3ec199)return _0x465aa9[_0x3f0390(0x1b3)](_0x36300d,_0x3ec199);async[_0x3f0390(0x1f8)](_0x224a86,0x14,(_0x70a93c,_0x4cc177)=>{const _0x37da10=_0x3f0390;_0x70a93c[_0x37da10(0x234)][_0x37da10(0x1ed)](_0x363a66['id_app'],xhd,{'where':_0xaf1149=>{const _0x3179d3=_0x37da10;return{'details':{'$elemMatch':{'id_ct':_0x70a93c[_0x3179d3(0x25f)],'ma_vt':_0xaf1149[_0x3179d3(0x249)]}}};},'fields':[{'id_xhd':_0x18d8ab[_0x37da10(0x232)]}]},()=>{const _0x1e669b=_0x37da10,_0x4282ba={'Gladm':_0x1e669b(0x243),'ovACc':function(_0x28ad36,_0x131303){const _0x1a9d0b=_0x1e669b;return _0x31514e[_0x1a9d0b(0x222)](_0x28ad36,_0x131303);},'mdVwk':function(_0xff231d,_0xefeb34){return _0x31514e['BFtYX'](_0xff231d,_0xefeb34);},'RNBXd':function(_0x4d7a97,_0x17c83c){const _0x5bb0bf=_0x1e669b;return _0x31514e[_0x5bb0bf(0x200)](_0x4d7a97,_0x17c83c);},'iybQL':function(_0x54df3f,_0xf1f3d7){return _0x54df3f*_0xf1f3d7;},'BykAc':function(_0x5aa701,_0x4f2810){const _0x1948c7=_0x1e669b;return _0x31514e[_0x1948c7(0x226)](_0x5aa701,_0x4f2810);},'RJtaU':_0x31514e['LHlBR'],'sxYHN':function(_0x2b6bd1){const _0x5bd8d6=_0x1e669b;return _0x31514e[_0x5bd8d6(0x1f1)](_0x2b6bd1);}};_0x70a93c[_0x1e669b(0x234)]=_0x70a93c[_0x1e669b(0x234)][_0x1e669b(0x1e7)](_0x1ac60a=>!_0x1ac60a[_0x1e669b(0x252)]),_0x70a93c[_0x1e669b(0x234)][_0x1e669b(0x1ed)](_0x363a66[_0x1e669b(0x228)],dmvt,{'where':_0x31514e[_0x1e669b(0x1b9)],'fields':[_0x31514e[_0x1e669b(0x1f2)],_0x31514e[_0x1e669b(0x201)]]},()=>{const _0x114e7d=_0x1e669b;if(_0x4282ba[_0x114e7d(0x219)](_0x4282ba[_0x114e7d(0x24e)],_0x4282ba['RJtaU']))return{'details':{'$elemMatch':{'id_ct':_0x3646bb[_0x114e7d(0x25f)],'ma_vt':_0x46ee5f[_0x114e7d(0x249)]}}};else _0x70a93c[_0x114e7d(0x234)]=_0x70a93c[_0x114e7d(0x234)][_0x114e7d(0x1e7)](_0x1ee78d=>_0x1ee78d[_0x114e7d(0x21e)]===_0x1bb5cf[_0x114e7d(0x21e)])[_0x114e7d(0x20d)](_0x267bfe=>{const _0x2d80c4=_0x114e7d;let _0x416c88={..._0x267bfe};return _0x416c88[_0x2d80c4(0x1e2)]=![],_0x416c88['id_ct']=_0x70a93c['_id'][_0x2d80c4(0x246)](),_0x416c88[_0x2d80c4(0x24b)]=_0x4282ba['Gladm'],_0x416c88['so_ct']=_0x70a93c[_0x2d80c4(0x25c)],_0x416c88[_0x2d80c4(0x1c8)]=_0x70a93c[_0x2d80c4(0x1c8)],_0x416c88[_0x2d80c4(0x1ee)]=_0x1bb5cf[_0x2d80c4(0x1ee)],_0x416c88[_0x2d80c4(0x1b1)]=_0x416c88['sl_xuat']||0x1,_0x416c88['tt_nt']=_0x416c88['tt']=_0x416c88['tien'],_0x416c88['tien_nt']=_0x416c88[_0x2d80c4(0x1fb)]=_0x416c88['tt']/(0x1+_0x416c88[_0x2d80c4(0x1ee)]/0x64),_0x416c88[_0x2d80c4(0x1ad)]=_0x416c88[_0x2d80c4(0x1c1)]=Math[_0x2d80c4(0x1bf)](_0x4282ba['ovACc'](_0x416c88[_0x2d80c4(0x1ea)],_0x416c88['sl_xuat'])),_0x416c88[_0x2d80c4(0x1d5)]=_0x416c88[_0x2d80c4(0x1ef)]=Math['roundBy'](_0x4282ba[_0x2d80c4(0x238)](_0x416c88[_0x2d80c4(0x1ad)],_0x267bfe[_0x2d80c4(0x1b1)])),_0x416c88[_0x2d80c4(0x1bd)]=0x0,_0x416c88['tien_ck']=_0x416c88['tien_ck_nt']=0x0,_0x416c88[_0x2d80c4(0x1ea)]=_0x416c88[_0x2d80c4(0x1fb)]=_0x4282ba[_0x2d80c4(0x218)](_0x416c88[_0x2d80c4(0x1d5)],_0x416c88['tien_ck_nt']),_0x416c88[_0x2d80c4(0x1d8)]=_0x416c88[_0x2d80c4(0x1f7)]=Math[_0x2d80c4(0x1bf)](_0x4282ba[_0x2d80c4(0x239)](_0x4282ba[_0x2d80c4(0x224)](_0x416c88['tien_nt'],_0x416c88['thue_suat']),0x64)),_0x416c88;}),_0x4282ba['sxYHN'](_0x4cc177);});});},()=>{const _0x37081b=_0x3f0390,_0x5ebbd6={'HzrJb':function(_0x3f9845,_0x4edf7f){const _0x1821e4=_0x18ac;return _0x31514e[_0x1821e4(0x222)](_0x3f9845,_0x4edf7f);},'UjvEx':function(_0x4fc0b9,_0x195186){return _0x31514e['oNqOn'](_0x4fc0b9,_0x195186);},'pCzxU':_0x31514e[_0x37081b(0x1f2)],'UWoaL':_0x31514e[_0x37081b(0x201)]};if(_0x31514e[_0x37081b(0x226)](_0x37081b(0x1e6),_0x37081b(0x1e6))){const _0x1bdf4a={'AqlEi':_0x37081b(0x243),'RRtBn':function(_0x3980c3,_0x6a4f34){const _0x427293=_0x37081b;return _0x5ebbd6[_0x427293(0x215)](_0x3980c3,_0x6a4f34);},'MtKii':function(_0x3878c3,_0x4b6597){return _0x3878c3+_0x4b6597;},'bjLnU':function(_0x4bca9a,_0x1670f2){return _0x4bca9a/_0x1670f2;},'iTyOl':function(_0x586d4a,_0x30d4a8){const _0x1b8306=_0x37081b;return _0x5ebbd6[_0x1b8306(0x1aa)](_0x586d4a,_0x30d4a8);}};_0x2293ff[_0x37081b(0x234)]=_0x4894f2[_0x37081b(0x234)][_0x37081b(0x1e7)](_0x54aa79=>!_0x54aa79[_0x37081b(0x252)]),_0x4d8bee['details']['joinModel2'](_0x374047['id_app'],_0x517aac,{'where':_0x37081b(0x249),'fields':[_0x5ebbd6['pCzxU'],_0x5ebbd6[_0x37081b(0x221)]]},()=>{const _0xe32ca7=_0x37081b,_0x3f25a9={'BdxXA':_0x1bdf4a['AqlEi'],'CJEaz':function(_0x152d39,_0x11b7c0){const _0x597c82=_0x18ac;return _0x1bdf4a[_0x597c82(0x1eb)](_0x152d39,_0x11b7c0);},'fgrUa':function(_0x50ae1e,_0x1ac2c1){const _0x4420b9=_0x18ac;return _0x1bdf4a[_0x4420b9(0x203)](_0x50ae1e,_0x1ac2c1);},'hbhYF':function(_0x3734a2,_0x2dba60){const _0xea153d=_0x18ac;return _0x1bdf4a[_0xea153d(0x1fa)](_0x3734a2,_0x2dba60);},'KFrWO':function(_0x1817a1,_0x359bde){const _0x2aac25=_0x18ac;return _0x1bdf4a[_0x2aac25(0x23e)](_0x1817a1,_0x359bde);}};_0x4ed83b[_0xe32ca7(0x234)]=_0x3eeadf[_0xe32ca7(0x234)][_0xe32ca7(0x1e7)](_0x34b78c=>_0x34b78c[_0xe32ca7(0x21e)]===_0x5974fd[_0xe32ca7(0x21e)])[_0xe32ca7(0x20d)](_0x235aa5=>{const _0x19105b=_0xe32ca7;let _0x36b798={..._0x235aa5};return _0x36b798[_0x19105b(0x1e2)]=![],_0x36b798[_0x19105b(0x1e4)]=_0x5d36e4[_0x19105b(0x25f)][_0x19105b(0x246)](),_0x36b798[_0x19105b(0x24b)]=_0x3f25a9['BdxXA'],_0x36b798[_0x19105b(0x25c)]=_0x17a7e5['so_ct'],_0x36b798['ngay_ct']=_0x4fe9cc[_0x19105b(0x1c8)],_0x36b798[_0x19105b(0x1ee)]=_0x442fe0[_0x19105b(0x1ee)],_0x36b798[_0x19105b(0x1b1)]=_0x36b798[_0x19105b(0x1b1)]||0x1,_0x36b798['tt_nt']=_0x36b798['tt']=_0x36b798[_0x19105b(0x1fb)],_0x36b798[_0x19105b(0x1ea)]=_0x36b798[_0x19105b(0x1fb)]=_0x3f25a9[_0x19105b(0x21f)](_0x36b798['tt'],_0x3f25a9[_0x19105b(0x1bc)](0x1,_0x3f25a9[_0x19105b(0x209)](_0x36b798['thue_suat'],0x64))),_0x36b798[_0x19105b(0x1ad)]=_0x36b798['gia_ban']=_0xa96758['roundBy'](_0x3f25a9[_0x19105b(0x209)](_0x36b798[_0x19105b(0x1ea)],_0x36b798['sl_xuat'])),_0x36b798['tien_hang_nt']=_0x36b798[_0x19105b(0x1ef)]=_0x53d27c[_0x19105b(0x1bf)](_0x36b798[_0x19105b(0x1ad)]*_0x235aa5['sl_xuat']),_0x36b798[_0x19105b(0x1bd)]=0x0,_0x36b798[_0x19105b(0x1f3)]=_0x36b798['tien_ck_nt']=0x0,_0x36b798[_0x19105b(0x1ea)]=_0x36b798[_0x19105b(0x1fb)]=_0x36b798['tien_hang_nt']-_0x36b798[_0x19105b(0x1d4)],_0x36b798['tien_thue_nt']=_0x36b798[_0x19105b(0x1f7)]=_0xfa6b00[_0x19105b(0x1bf)](_0x3f25a9[_0x19105b(0x21f)](_0x3f25a9[_0x19105b(0x1dc)](_0x36b798['tien_nt'],_0x36b798[_0x19105b(0x1ee)]),0x64)),_0x36b798;}),_0x3e35e6();});}else _0x31514e[_0x37081b(0x25b)](_0x36300d,null,_0x224a86[_0x37081b(0x1e7)](_0x29172e=>_0x29172e['details']['length']>0x0));});}});}},function(_0x3f6bb4,_0x5f3be9){const _0xbb0f5d=_0x4563c6,_0x153922={'aNymm':function(_0x3d1b1a,_0x5483cc){const _0xe090fc=_0x18ac;return _0x465aa9[_0xe090fc(0x23c)](_0x3d1b1a,_0x5483cc);},'jdFVT':_0x465aa9[_0xbb0f5d(0x1b6)]};if(_0x3f6bb4)return _0xa481f8(_0x3f6bb4);const _0x2d54c4=_0x5f3be9[_0xbb0f5d(0x237)][_0xbb0f5d(0x20d)](_0x2011f4=>{const _0x7c7a49=_0xbb0f5d;if(_0x153922[_0x7c7a49(0x1af)](_0x7c7a49(0x1df),_0x153922['jdFVT']))return _0x2011f4[_0x7c7a49(0x234)];else _0x6cd854['ma_ct']=_0x5bd9be[_0x7c7a49(0x23d)];})[_0xbb0f5d(0x227)]((_0x1257c9,_0x327505)=>_0x1257c9[_0xbb0f5d(0x1b4)](_0x327505),[]);_0x465aa9['SDEjL'](_0xa481f8,null,_0x2d54c4);});}});};
@@ -1,6 +1 @@
1
- const sokho=global.getModel("sokho"),dmvt=global.getModel("dmvt"),dmkho=global.getModel("dmkho"),dmbp=global.getModel("dmbp"),controller=require("../../controllers/controllerRPT"),async=require("async"),moment=require("moment");
2
- module.exports=function($router$$){new controller($router$$,"gt_cpnvltt",function($query_req$$,$callback$$){$query_req$$=$query_req$$.query;let $id_app$$=$query_req$$.id_app,$condition$$={id_app:$id_app$$,nxt:2};$condition$$.ngay_ct={$gte:$query_req$$.tu_ngay,$lte:$query_req$$.den_ngay};$query_req$$.id_ct&&($condition$$.id_ct=$query_req$$.id_ct);$query_req$$.ma_vt&&($condition$$.ma_vt=$query_req$$.ma_vt);$condition$$.ma_sp=$query_req$$.ma_sp?$query_req$$.ma_sp:{$nin:[null,""]};$query_req$$.ma_ct&&
3
- ($condition$$.ma_ct=$query_req$$.ma_ct.toUpperCase());$query_req$$.ma_kho&&($condition$$.ma_kho=$query_req$$.ma_kho);$query_req$$.ma_kh&&($condition$$.ma_kh=$query_req$$.ma_kh);$query_req$$.ma_nv&&($condition$$.ma_nv=$query_req$$.ma_nv);$query_req$$.tk_vt&&($condition$$.tk_vt={$regex:"^"+$query_req$$.tk_vt,$options:"i"});$query_req$$.tk_gv&&($condition$$.tk_gv={$regex:"^"+$query_req$$.tk_gv,$options:"i"});$query_req$$.tk_dt&&($condition$$.tk_dt={$regex:"^"+$query_req$$.tk_dt,$options:"i"});sokho.find($condition$$).sort({ngay_ct:1,
4
- so_ct:1}).lean().exec(async($error$$,$report$$)=>{if($error$$)return $callback$$($error$$);$report$$.forEach($r$$=>{$r$$.sysorder=5;$r$$.bold=!1});$error$$=await $report$$.asyncGroupBy("id_ct so_ct ngay_ct ma_kho ma_bp ma_sp ma_tt1_sp".split(" "),["sl_xuat","sl_xuat_qd","tien_xuat","sl_sp"]);$error$$.forEach($r$$=>{$r$$.sysorder=1;$r$$.bold=!0;$r$$.ma_vt=$r$$.ma_sp;$r$$.ma_tt1=$r$$.ma_tt1_sp;$r$$.sl_xuat_qd=$r$$.sl_sp});$report$$=$report$$.concat($error$$);async.series({vt:$callback$$=>{$report$$.filter($r$$=>
5
- $r$$.ma_vt).joinModel2($id_app$$,dmvt,[{where:"ma_vt",fields:["ten_vt","ma_dvt"]}],function(){$callback$$()})},kho:$callback$$=>{$report$$.filter($r$$=>$r$$.ma_kho).joinModel2($id_app$$,dmkho,[{where:"ma_kho",fields:"ten_kho"}],function(){$callback$$()})},bp:$callback$$=>{$report$$.filter($r$$=>$r$$.ma_bp).joinModel2($id_app$$,dmbp,[{where:"ma_bp",fields:"ten_bp"}],function(){$callback$$()})}},()=>{$report$$=$report$$.sort(($a$$,$b$$)=>{let $a_ngay_ct$$=moment($a$$.ngay_ct).format("YYYY-MM-DD"),$b_ngay_ct$$=
6
- moment($b$$.ngay_ct).format("YYYY-MM-DD");return $a_ngay_ct$$<$b_ngay_ct$$?-1:$a_ngay_ct$$>$b_ngay_ct$$?1:$a$$.id_ct<$b$$.id_ct?-1:$a$$.id_ct>$b$$.id_ct?1:$a$$.ma_sp<$b$$.ma_sp?-1:$a$$.ma_sp>$b$$.ma_sp?1:$a$$.ma_tt1_sp<$b$$.ma_tt1_sp?-1:$a$$.ma_tt1_sp>$b$$.ma_tt1_sp?1:$a$$.sysorder<$b$$.sysorder?-1:$a$$.sysorder>$b$$.sysorder?1:0});$callback$$(null,$report$$)})})})};
1
+ const _0x354cc4=_0xb76a;(function(_0x212549,_0x1a184a){const _0x58f797=_0xb76a,_0x461c3a=_0x212549();while(!![]){try{const _0x1faa55=parseInt(_0x58f797(0x185))/0x1+-parseInt(_0x58f797(0x1b1))/0x2+parseInt(_0x58f797(0x1c4))/0x3+parseInt(_0x58f797(0x1de))/0x4+-parseInt(_0x58f797(0x1a7))/0x5*(parseInt(_0x58f797(0x17f))/0x6)+parseInt(_0x58f797(0x1ba))/0x7*(-parseInt(_0x58f797(0x198))/0x8)+parseInt(_0x58f797(0x1aa))/0x9;if(_0x1faa55===_0x1a184a)break;else _0x461c3a['push'](_0x461c3a['shift']());}catch(_0x47cd64){_0x461c3a['push'](_0x461c3a['shift']());}}}(_0x10c1,0x6332e));function _0xb76a(_0x26e06c,_0x570b79){const _0x10c10d=_0x10c1();return _0xb76a=function(_0xb76a4b,_0x42b482){_0xb76a4b=_0xb76a4b-0x178;let _0x98af84=_0x10c10d[_0xb76a4b];if(_0xb76a['zKaYwA']===undefined){var _0x218e12=function(_0x11181e){const _0x37a062='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1d3ee1='',_0x49206e='';for(let _0x238e8d=0x0,_0x488f5e,_0x214968,_0x56cc09=0x0;_0x214968=_0x11181e['charAt'](_0x56cc09++);~_0x214968&&(_0x488f5e=_0x238e8d%0x4?_0x488f5e*0x40+_0x214968:_0x214968,_0x238e8d++%0x4)?_0x1d3ee1+=String['fromCharCode'](0xff&_0x488f5e>>(-0x2*_0x238e8d&0x6)):0x0){_0x214968=_0x37a062['indexOf'](_0x214968);}for(let _0x17c6ab=0x0,_0x526805=_0x1d3ee1['length'];_0x17c6ab<_0x526805;_0x17c6ab++){_0x49206e+='%'+('00'+_0x1d3ee1['charCodeAt'](_0x17c6ab)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x49206e);};_0xb76a['YIxDeq']=_0x218e12,_0x26e06c=arguments,_0xb76a['zKaYwA']=!![];}const _0x16dbb0=_0x10c10d[0x0],_0x99cb47=_0xb76a4b+_0x16dbb0,_0x116485=_0x26e06c[_0x99cb47];return!_0x116485?(_0x98af84=_0xb76a['YIxDeq'](_0x98af84),_0x26e06c[_0x99cb47]=_0x98af84):_0x98af84=_0x116485,_0x98af84;},_0xb76a(_0x26e06c,_0x570b79);}function _0x10c1(){const _0x36c2e5=['n1LduvHSEa','DxnTuxm','yxfQvvG','EKzesxK','Cxv6vvC','zgvUx25NyxK','BwfFy3q','qLjzCxK','yxn5BMm','zM9YrwfJAa','mtCYmdKXmvHACfvlvG','z2v0tw9KzwW','twLkquW','zxHLyW','yxn5BMnhCM91Cej5','DgvUx2jW','DwjduLy','zg1ICa','yKzjuK8','rwHMDxm','A2DVyu0','lI4VlI4Vy29UDhjVBgXLCNmVy29UDhjVBgXLCLjqva','ANviy24','BwfFC3a','C3bSAxq','y2HJA2W','DhvFBMDHEq','DgvUx2TOBW','C29YDa','CuHfyKS','r3nWAfa','C0PuAee','veT4BMS','BwfFA2HV','sMvwEha','zfjtt1C','mtyZotq0uM1kzLL4','sxnxA1q','DgTFDNq','AM9PBK1VzgvSmG','shjdB1O','vMPhrNq','ENv1y1G','DgTFzhq','C29RAg8','AxD4ru8','CKjjsvm','C3LZB3jKzxi','CxH3z0W','CMvbEw4','AwrFyxbW','zwjwB1m','sgvswxa','shLgDvy','DgvUx3z0','tvrqAhC','BMDHEv9JDa','zg12Da','mtm4ndi2vhDuDwfM','y29Uy2f0','Bw9Tzw50','Du5lB3m','rfffy28','C2XFEhvHDa','nZu2nJmWCMXuz2Db','DgTFz3y','s21Zs1C','zfzyA1a','zMLSDgvY','CgvYqNm','C2XFEhvHDf9Xza','m3W0Fdf8mNWW','vMrrBKm','zwzfqum','C29Fy3q','yM9Sza','qwPhs1q','zuTNv28','BwfFDhqXx3nW','AuDQDgu','zg1RAg8','rMvus2S','z3rFy3bUDMX0Da','mtC3mdeZnKvHu1LjDa','zM9YBwf0','t1P5ww8','BwfFA2G','zw1PqLa','C2XFC3a','BwfFDNq','BfHsu3q','rND3rK8','wMLPsvm','zxHWB3j0CW','vvr0zwC','DeHUEKG','ugD1s1i','twDluw8','otvdqu5lvxa','AK1ZEwK','zhnKq2G','nZi0nJe3zKror1vt','v1Lzug4','wvLzws1nts1era','AwrFy3q','A2flsei','ELjXzwS','yvnLAeO','nZCXnJy0y1z2s3rw','zMLUza','BgvHBG','yNHeAfe','Cwfese8','BwfFzhz0','DezpuwW','BwfFBNy','CxvLCNK'];_0x10c1=function(){return _0x36c2e5;};return _0x10c1();}const sokho=global[_0x354cc4(0x1c5)](_0x354cc4(0x1e6)),dmvt=global[_0x354cc4(0x1c5)](_0x354cc4(0x17e)),dmkho=global[_0x354cc4(0x1c5)](_0x354cc4(0x195)),dmbp=global[_0x354cc4(0x1c5)](_0x354cc4(0x1cb)),controller=require(_0x354cc4(0x1cf)),async=require(_0x354cc4(0x1c2)),moment=require(_0x354cc4(0x181));module[_0x354cc4(0x1a2)]=function(_0x1a30a6){const _0x5b71a3=_0x354cc4,_0x1e985a={'MiJAL':function(_0x150cd2,_0x5289f4,_0x378199){return _0x150cd2(_0x5289f4,_0x378199);},'EMFQF':function(_0x1bb335,_0x2bfb5d){return _0x1bb335(_0x2bfb5d);},'dQVAn':_0x5b71a3(0x1ac),'uNwrV':function(_0x721fdf,_0x255bbf){return _0x721fdf>_0x255bbf;},'PguKR':function(_0x172b9d,_0x522c22){return _0x172b9d<_0x522c22;},'KmsKW':function(_0x4fe615,_0x28a77a){return _0x4fe615+_0x28a77a;},'zuucX':function(_0x64efaa){return _0x64efaa();},'perBs':_0x5b71a3(0x19e),'ijvCv':_0x5b71a3(0x1b6),'QMKhf':_0x5b71a3(0x1db),'usmQs':_0x5b71a3(0x1d5),'dVXkP':_0x5b71a3(0x1ae),'aqjUX':_0x5b71a3(0x1a1),'lXRSt':function(_0x7255e8,_0x323b2b){return _0x7255e8(_0x323b2b);},'FwwFO':'id_ct','qHEbK':_0x5b71a3(0x18f),'DQEco':_0x5b71a3(0x17d),'uNKos':_0x5b71a3(0x1d1),'Cotcc':'sl_xuat_qd','bFIRO':'tien_xuat','zFDIy':function(_0x8b50b3,_0x4091d1){return _0x8b50b3===_0x4091d1;},'dsdCh':function(_0x3f9c9a,_0x52768d){return _0x3f9c9a===_0x52768d;},'tHnzH':_0x5b71a3(0x1e8),'fveRc':_0x5b71a3(0x1cd),'GsphP':'UNbEi','DelFv':_0x5b71a3(0x197)};new controller(_0x1a30a6,_0x1e985a['DelFv'],function(_0x2425e4,_0x515529){const _0x5c3aee=_0x5b71a3,_0x4c2ba7={'iGjte':function(_0x6d6ec1,_0x2619a5){return _0x1e985a['EMFQF'](_0x6d6ec1,_0x2619a5);},'VjGFt':_0x1e985a['dQVAn'],'tFOQl':function(_0x4fd771,_0x13bf38){return _0x1e985a['uNwrV'](_0x4fd771,_0x13bf38);},'dRSOW':function(_0x10426f,_0x8621f6){return _0x1e985a['uNwrV'](_0x10426f,_0x8621f6);},'sJThA':function(_0x5a3ac5,_0x1e3b3a){const _0x4ab365=_0xb76a;return _0x1e985a[_0x4ab365(0x1a5)](_0x5a3ac5,_0x1e3b3a);},'Qbtfa':function(_0x33f444,_0x5eb92b){return _0x1e985a['KmsKW'](_0x33f444,_0x5eb92b);},'zRqek':function(_0x3a1fcc){const _0x604997=_0xb76a;return _0x1e985a[_0x604997(0x1e4)](_0x3a1fcc);},'eKgWo':_0x1e985a[_0x5c3aee(0x18a)],'bxDhQ':_0x5c3aee(0x17b),'BRYqy':_0x1e985a['ijvCv'],'OZyYo':_0x1e985a['QMKhf'],'UTteg':_0x1e985a[_0x5c3aee(0x1bb)],'oduWA':'ma_bp','HyFuV':_0x5c3aee(0x1c9),'MgKQo':function(_0x51adea,_0xf43589,_0x30264b){return _0x1e985a['MiJAL'](_0x51adea,_0xf43589,_0x30264b);},'efEAC':function(_0x54c79e,_0x4f5e5d){return _0x54c79e!==_0x4f5e5d;},'ubCRV':_0x1e985a[_0x5c3aee(0x188)],'sfxVy':_0x1e985a[_0x5c3aee(0x1bc)],'jMsyi':function(_0x51161c,_0x38e11b){const _0x333018=_0x5c3aee;return _0x1e985a[_0x333018(0x19f)](_0x51161c,_0x38e11b);},'TKxnk':function(_0x59e9e5,_0x5baf1c){return _0x1e985a['uNwrV'](_0x59e9e5,_0x5baf1c);},'JeVxp':_0x1e985a[_0x5c3aee(0x1a0)],'reAyn':_0x1e985a[_0x5c3aee(0x1d7)],'kgoaM':_0x1e985a[_0x5c3aee(0x183)],'quzUW':_0x1e985a[_0x5c3aee(0x182)],'chckl':_0x5c3aee(0x193),'AjGKT':_0x1e985a['Cotcc'],'VdQnC':_0x1e985a[_0x5c3aee(0x1cc)],'emiBP':'sl_sp'};if(_0x1e985a[_0x5c3aee(0x1bd)](_0x5c3aee(0x1e2),_0x5c3aee(0x1ea)))_0x38cc27[_0x5c3aee(0x1db)]=_0x3eb551['ma_kho'];else{let _0x59ca58=_0x2425e4[_0x5c3aee(0x1b9)],_0x29ded6=_0x59ca58[_0x5c3aee(0x1ec)],_0x49f518={'id_app':_0x29ded6,'nxt':0x2};_0x49f518[_0x5c3aee(0x17d)]={'$gte':_0x59ca58[_0x5c3aee(0x1d4)],'$lte':_0x59ca58[_0x5c3aee(0x1bf)]},_0x59ca58[_0x5c3aee(0x1ad)]&&(_0x49f518[_0x5c3aee(0x1ad)]=_0x59ca58[_0x5c3aee(0x1ad)]),_0x59ca58[_0x5c3aee(0x19e)]&&(_0x1e985a[_0x5c3aee(0x1a9)](_0x1e985a[_0x5c3aee(0x1a4)],_0x1e985a['fveRc'])?(_0x378bff=_0x142742[_0x5c3aee(0x1d6)]((_0x1b63df,_0x251d87)=>{const _0x1b08a7=_0x5c3aee;let _0x57ddb5=_0x4c2ba7[_0x1b08a7(0x194)](_0x4d4b30,_0x1b63df['ngay_ct'])[_0x1b08a7(0x199)](_0x4c2ba7[_0x1b08a7(0x1e3)]),_0x4a25e5=_0x4c2ba7[_0x1b08a7(0x194)](_0x5359be,_0x251d87[_0x1b08a7(0x17d)])[_0x1b08a7(0x199)](_0x4c2ba7['VjGFt']);if(_0x57ddb5<_0x4a25e5)return-0x1;if(_0x4c2ba7[_0x1b08a7(0x1b7)](_0x57ddb5,_0x4a25e5))return 0x1;if(_0x1b63df['id_ct']<_0x251d87['id_ct'])return-0x1;if(_0x4c2ba7[_0x1b08a7(0x1dd)](_0x1b63df['id_ct'],_0x251d87[_0x1b08a7(0x1ad)]))return 0x1;if(_0x1b63df[_0x1b08a7(0x1d1)]<_0x251d87['ma_sp'])return-0x1;if(_0x4c2ba7[_0x1b08a7(0x1dd)](_0x1b63df[_0x1b08a7(0x1d1)],_0x251d87[_0x1b08a7(0x1d1)]))return 0x1;if(_0x4c2ba7[_0x1b08a7(0x1d9)](_0x1b63df[_0x1b08a7(0x193)],_0x251d87[_0x1b08a7(0x193)]))return-0x1;if(_0x4c2ba7[_0x1b08a7(0x1dd)](_0x1b63df[_0x1b08a7(0x193)],_0x251d87[_0x1b08a7(0x193)]))return 0x1;if(_0x1b63df[_0x1b08a7(0x1e9)]<_0x251d87[_0x1b08a7(0x1e9)])return-0x1;if(_0x1b63df['sysorder']>_0x251d87[_0x1b08a7(0x1e9)])return 0x1;return 0x0;}),_0x1e985a[_0x5c3aee(0x1c6)](_0x7fa623,null,_0x497cec)):_0x49f518['ma_vt']=_0x59ca58[_0x5c3aee(0x19e)]),_0x59ca58['ma_sp']?_0x5c3aee(0x1b0)!==_0x5c3aee(0x1b0)?_0x13c98c[_0x5c3aee(0x1e5)]={'$regex':_0x4c2ba7['Qbtfa']('^',_0x127a92[_0x5c3aee(0x1e5)]),'$options':'i'}:_0x49f518[_0x5c3aee(0x1d1)]=_0x59ca58[_0x5c3aee(0x1d1)]:_0x49f518[_0x5c3aee(0x1d1)]={'$nin':[null,'']},_0x59ca58[_0x5c3aee(0x1c0)]&&(_0x49f518[_0x5c3aee(0x1c0)]=_0x59ca58[_0x5c3aee(0x1c0)]['toUpperCase']()),_0x59ca58[_0x5c3aee(0x1db)]&&(_0x49f518[_0x5c3aee(0x1db)]=_0x59ca58[_0x5c3aee(0x1db)]),_0x59ca58['ma_kh']&&(_0x1e985a[_0x5c3aee(0x1d8)]!=='UNbEi'?_0x214968[_0x5c3aee(0x19e)]=_0x56cc09[_0x5c3aee(0x19e)]:_0x49f518[_0x5c3aee(0x19b)]=_0x59ca58[_0x5c3aee(0x19b)]),_0x59ca58[_0x5c3aee(0x1b8)]&&(_0x49f518[_0x5c3aee(0x1b8)]=_0x59ca58[_0x5c3aee(0x1b8)]),_0x59ca58[_0x5c3aee(0x1e0)]&&(_0x49f518['tk_vt']={'$regex':_0x1e985a[_0x5c3aee(0x187)]('^',_0x59ca58[_0x5c3aee(0x1e0)]),'$options':'i'}),_0x59ca58[_0x5c3aee(0x186)]&&(_0x49f518['tk_gv']={'$regex':_0x1e985a[_0x5c3aee(0x187)]('^',_0x59ca58[_0x5c3aee(0x186)]),'$options':'i'}),_0x59ca58[_0x5c3aee(0x1e5)]&&(_0x49f518[_0x5c3aee(0x1e5)]={'$regex':_0x1e985a[_0x5c3aee(0x187)]('^',_0x59ca58[_0x5c3aee(0x1e5)]),'$options':'i'}),sokho[_0x5c3aee(0x1b2)](_0x49f518)[_0x5c3aee(0x1d6)]({'ngay_ct':0x1,'so_ct':0x1})[_0x5c3aee(0x1b3)]()[_0x5c3aee(0x1c7)](async(_0x61dc8a,_0x7abd91)=>{const _0x5065e5=_0x5c3aee,_0xc280fd={'juHcn':function(_0x26685b,_0x2cdca1){const _0x5121d8=_0xb76a;return _0x4c2ba7[_0x5121d8(0x18e)](_0x26685b,_0x2cdca1);},'eAJcs':_0x4c2ba7[_0x5065e5(0x1ca)],'iwxEO':_0x4c2ba7['sfxVy'],'FeTKk':function(_0x8fbdbd){return _0x8fbdbd();},'WYYPn':function(_0x265e81,_0x301fb3){const _0x37a720=_0x5065e5;return _0x4c2ba7[_0x37a720(0x194)](_0x265e81,_0x301fb3);},'ebVoS':function(_0x5deb54,_0x5dcb36){return _0x4c2ba7['jMsyi'](_0x5deb54,_0x5dcb36);},'MTPhw':_0x4c2ba7[_0x5065e5(0x1e3)],'qaDHO':function(_0x36afef,_0x369861){const _0x8129c4=_0x5065e5;return _0x4c2ba7[_0x8129c4(0x1d9)](_0x36afef,_0x369861);},'HeRYp':function(_0xb58bb7,_0x1f0e2b){const _0x417cf3=_0x5065e5;return _0x4c2ba7[_0x417cf3(0x1da)](_0xb58bb7,_0x1f0e2b);},'ANZoP':function(_0x9a8559,_0x46a7dd){return _0x9a8559>_0x46a7dd;},'SieFV':function(_0x569934,_0x24e2f3){const _0x2b4ea5=_0x5065e5;return _0x4c2ba7[_0x2b4ea5(0x1da)](_0x569934,_0x24e2f3);}};if(_0x61dc8a)return _0x4c2ba7[_0x5065e5(0x1a8)](_0x515529,_0x61dc8a);_0x7abd91[_0x5065e5(0x1c3)](_0x25c89f=>{const _0x5771ef=_0x5065e5;_0x25c89f[_0x5771ef(0x1e9)]=0x5,_0x25c89f['bold']=![];});let _0x365594=await _0x7abd91[_0x5065e5(0x1c8)]([_0x4c2ba7[_0x5065e5(0x1dc)],_0x4c2ba7[_0x5065e5(0x1eb)],_0x4c2ba7[_0x5065e5(0x1ce)],_0x4c2ba7[_0x5065e5(0x19a)],_0x4c2ba7['oduWA'],_0x4c2ba7[_0x5065e5(0x1be)],_0x4c2ba7[_0x5065e5(0x1d3)]],[_0x5065e5(0x184),_0x4c2ba7[_0x5065e5(0x191)],_0x4c2ba7[_0x5065e5(0x18d)],_0x4c2ba7[_0x5065e5(0x19c)]]);_0x365594[_0x5065e5(0x1c3)](_0x5b6b9e=>{const _0x4db2ab=_0x5065e5,_0x1fe66f=_0x4db2ab(0x18c)[_0x4db2ab(0x1d2)]('|');let _0x30dc61=0x0;while(!![]){switch(_0x1fe66f[_0x30dc61++]){case'0':_0x5b6b9e[_0x4db2ab(0x18b)]=_0x5b6b9e[_0x4db2ab(0x19d)];continue;case'1':_0x5b6b9e['ma_vt']=_0x5b6b9e[_0x4db2ab(0x1d1)];continue;case'2':_0x5b6b9e['ma_tt1']=_0x5b6b9e[_0x4db2ab(0x193)];continue;case'3':_0x5b6b9e[_0x4db2ab(0x1e9)]=0x1;continue;case'4':_0x5b6b9e[_0x4db2ab(0x190)]=!![];continue;}break;}}),_0x7abd91=_0x7abd91[_0x5065e5(0x180)](_0x365594),async['series']({'vt':_0x5e8973=>{const _0x3afe8b=_0x5065e5,_0x28c6f2={'IsWkT':function(_0x3a4fd0){const _0x58ceb2=_0xb76a;return _0x4c2ba7[_0x58ceb2(0x1af)](_0x3a4fd0);}};_0x7abd91[_0x3afe8b(0x189)](_0x47dabb=>_0x47dabb[_0x3afe8b(0x19e)])[_0x3afe8b(0x1e1)](_0x29ded6,dmvt,[{'where':_0x4c2ba7[_0x3afe8b(0x192)],'fields':[_0x4c2ba7[_0x3afe8b(0x1b4)],_0x4c2ba7[_0x3afe8b(0x1c1)]]}],function(){const _0x12cad5=_0x3afe8b;_0x28c6f2[_0x12cad5(0x1df)](_0x5e8973);});},'kho':_0x17f50d=>{const _0x5254d5=_0x5065e5;_0x7abd91[_0x5254d5(0x189)](_0x2de57e=>_0x2de57e[_0x5254d5(0x1db)])['joinModel2'](_0x29ded6,dmkho,[{'where':_0x4c2ba7[_0x5254d5(0x19a)],'fields':_0x4c2ba7[_0x5254d5(0x1a3)]}],function(){const _0x1fe12c=_0x5254d5;_0xc280fd[_0x1fe12c(0x1d0)](_0xc280fd['eAJcs'],_0xc280fd[_0x1fe12c(0x1e7)])?_0xc280fd[_0x1fe12c(0x196)](_0x17f50d):_0xfd53be[_0x1fe12c(0x1d1)]={'$nin':[null,'']};});},'bp':_0x2b0114=>{const _0xa5298b=_0x5065e5;_0x7abd91[_0xa5298b(0x189)](_0x404e5b=>_0x404e5b['ma_bp'])[_0xa5298b(0x1e1)](_0x29ded6,dmbp,[{'where':_0x4c2ba7['oduWA'],'fields':_0x4c2ba7[_0xa5298b(0x17a)]}],function(){_0x2b0114();});}},()=>{const _0x9631c4=_0x5065e5;_0x7abd91=_0x7abd91[_0x9631c4(0x1d6)]((_0x249f86,_0x2462db)=>{const _0x18e112=_0x9631c4;let _0x1db190=_0xc280fd[_0x18e112(0x1ab)](moment,_0x249f86[_0x18e112(0x17d)])['format'](_0x18e112(0x1ac)),_0x52df02=_0xc280fd[_0x18e112(0x178)](moment,_0x2462db[_0x18e112(0x17d)])['format'](_0xc280fd[_0x18e112(0x17c)]);if(_0xc280fd[_0x18e112(0x1b5)](_0x1db190,_0x52df02))return-0x1;if(_0xc280fd[_0x18e112(0x179)](_0x1db190,_0x52df02))return 0x1;if(_0x249f86[_0x18e112(0x1ad)]<_0x2462db[_0x18e112(0x1ad)])return-0x1;if(_0xc280fd[_0x18e112(0x179)](_0x249f86[_0x18e112(0x1ad)],_0x2462db[_0x18e112(0x1ad)]))return 0x1;if(_0x249f86[_0x18e112(0x1d1)]<_0x2462db[_0x18e112(0x1d1)])return-0x1;if(_0xc280fd['ANZoP'](_0x249f86[_0x18e112(0x1d1)],_0x2462db[_0x18e112(0x1d1)]))return 0x1;if(_0x249f86['ma_tt1_sp']<_0x2462db[_0x18e112(0x193)])return-0x1;if(_0x249f86[_0x18e112(0x193)]>_0x2462db[_0x18e112(0x193)])return 0x1;if(_0x249f86[_0x18e112(0x1e9)]<_0x2462db['sysorder'])return-0x1;if(_0xc280fd['SieFV'](_0x249f86[_0x18e112(0x1e9)],_0x2462db[_0x18e112(0x1e9)]))return 0x1;return 0x0;}),_0x4c2ba7[_0x9631c4(0x1a6)](_0x515529,null,_0x7abd91);});});}});};
@@ -1,5 +1 @@
1
- const sokho=global.getModel("sokho"),dmvt=global.getModel("dmvt"),underscore=require("underscore"),controller=require("../../controllers/controllerRPT");
2
- module.exports=function($router$$){new controller($router$$,"hangbanbitralai",function($query_req$$,$callback$$){let $condition$$=$query_req$$.query;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");$query_req$$={id_app:$condition$$.id_app,nxt:1,ma_ct:{$in:["HD3","HD7"]}};$query_req$$.ngay_ct={$gte:$condition$$.tu_ngay,$lte:$condition$$.den_ngay};$condition$$.ma_dvcs&&($query_req$$.ma_dvcs={$regex:$condition$$.ma_dvcs,
3
- $options:"i"});$condition$$.ma_vt&&($query_req$$.ma_vt={$regex:$condition$$.ma_vt,$options:"i"});$condition$$.ma_kho&&($query_req$$.ma_kho={$regex:$condition$$.ma_kho,$options:"i"});sokho.find($query_req$$).lean().then(function($rs$$){$rs$$.groupBy("ma_vt",[{name:"sl_nhap",value:"sl_nhap"},{name:"tien",value:"tien"},{name:"tien_ck",value:"tien_ck"},{name:"tien_nhap",value:"tien_nhap"}],function($error$$,$rs$$){if($error$$)return console.log($error$$),$callback$$($error$$);const $report$$=underscore.sortBy($rs$$,
4
- function($r$$){return $r$$.ma_vt});let $i$$=1;$report$$.forEach(function($r$$){$r$$.stt=$i$$;$r$$.bold=!1;$r$$.doanh_thu=$r$$.tien-$r$$.tien_ck;$r$$.lai=$r$$.doanh_thu-$r$$.tien_nhap;$i$$++});$report$$.joinModel($condition$$.id_app,dmvt,[{akey:"ma_vt",bkey:"ma_vt",fields:[{name:"ten_vt",value:"ten_vt"},{name:"ma_dvt",value:"ma_dvt"}]}],function(){$report$$.push({ten_vt:"T\u1ed5ng c\u1ed9ng",sl_nhap:$report$$.csum("sl_nhap"),tien:$report$$.csum("tien"),tien_ck:$report$$.csum("tien_ck"),doanh_thu:$report$$.csum("doanh_thu"),
5
- tien_nhap:$report$$.csum("tien_nhap"),lai:$report$$.csum("lai"),bold:!0});$callback$$(null,$report$$)})})}).catch($e$$=>{$callback$$($e$$)})})};
1
+ const _0x10677e=_0x1f58;(function(_0x2c6983,_0xb4b095){const _0x58fc36=_0x1f58,_0x54b73b=_0x2c6983();while(!![]){try{const _0x34ca79=-parseInt(_0x58fc36(0x124))/0x1+-parseInt(_0x58fc36(0x12b))/0x2+parseInt(_0x58fc36(0x10b))/0x3+-parseInt(_0x58fc36(0xfe))/0x4*(-parseInt(_0x58fc36(0x101))/0x5)+parseInt(_0x58fc36(0xdf))/0x6+parseInt(_0x58fc36(0x107))/0x7+-parseInt(_0x58fc36(0xce))/0x8*(parseInt(_0x58fc36(0x118))/0x9);if(_0x34ca79===_0xb4b095)break;else _0x54b73b['push'](_0x54b73b['shift']());}catch(_0x3e8510){_0x54b73b['push'](_0x54b73b['shift']());}}}(_0x1168,0x918a5));const sokho=global[_0x10677e(0x100)](_0x10677e(0xe6)),dmvt=global[_0x10677e(0x100)]('dmvt'),underscore=require(_0x10677e(0x105)),controller=require(_0x10677e(0xf3));module['exports']=function(_0x30510e){const _0x34c7fa=_0x10677e,_0x46bcf6={'YCtOE':function(_0x1a811e,_0x5a0b6b){return _0x1a811e(_0x5a0b6b);},'jCFhJ':_0x34c7fa(0x102),'ZkZGF':_0x34c7fa(0xf8),'lsMrW':_0x34c7fa(0x10f),'qFOiO':function(_0x27348a,_0x2c4659,_0x432431){return _0x27348a(_0x2c4659,_0x432431);},'idJcT':'TDEpi','atLor':function(_0x537da8,_0x4856e4){return _0x537da8-_0x4856e4;},'AJEGo':function(_0x34448a,_0x20538f){return _0x34448a!==_0x20538f;},'mDDUJ':'Ogaim','YBQoD':_0x34c7fa(0x132),'noEpX':_0x34c7fa(0x12a),'tHcCl':function(_0x42668c,_0x4a4e91){return _0x42668c-_0x4a4e91;},'oIRWj':_0x34c7fa(0x131),'Lweqx':_0x34c7fa(0x129),'GPdnV':_0x34c7fa(0x116),'tBvOr':_0x34c7fa(0xf6),'bocrA':_0x34c7fa(0x10a),'ncphu':function(_0x437311,_0x3ce9e8){return _0x437311!==_0x3ce9e8;},'DPZUM':function(_0xb557c3,_0x119d7f){return _0xb557c3(_0x119d7f);},'sgAcn':_0x34c7fa(0x136),'iyGnT':'ma_dvt','Hqwhx':function(_0x2b97d0,_0x317bb0){return _0x2b97d0===_0x317bb0;},'Kudcj':_0x34c7fa(0x123),'FrvZx':function(_0x17e983,_0x4e28ac){return _0x17e983(_0x4e28ac);},'YYjmX':_0x34c7fa(0xfc),'Jsyca':function(_0x4b0bc0,_0x33ce1a){return _0x4b0bc0!==_0x33ce1a;},'RSmvR':_0x34c7fa(0x11a),'PABOy':'hangbanbitralai'};new controller(_0x30510e,_0x46bcf6[_0x34c7fa(0x134)],function(_0x712f62,_0x4436f4){const _0x5b8b87=_0x34c7fa,_0x2c3671={'YhTkN':_0x46bcf6[_0x5b8b87(0xf2)],'TiGGP':'sl_nhap','RhPyc':_0x46bcf6['ZkZGF'],'NvEHw':_0x46bcf6[_0x5b8b87(0x135)],'OWmqd':_0x5b8b87(0x119),'WHuWo':function(_0x324c82,_0xe62d21,_0x617c0d){const _0x1f0295=_0x5b8b87;return _0x46bcf6[_0x1f0295(0xd7)](_0x324c82,_0xe62d21,_0x617c0d);},'UpKmR':function(_0x5b9643,_0x11a680){const _0x59bead=_0x5b8b87;return _0x46bcf6[_0x59bead(0x12c)](_0x5b9643,_0x11a680);},'EPxxe':_0x5b8b87(0x104),'XtqkF':function(_0x77db7b,_0x535bb1){const _0x511726=_0x5b8b87;return _0x46bcf6[_0x511726(0xcf)](_0x77db7b,_0x535bb1);},'KcrtJ':_0x5b8b87(0x131),'YsFRl':_0x46bcf6[_0x5b8b87(0xd0)],'zZzGL':_0x46bcf6[_0x5b8b87(0xd1)]};if(_0x46bcf6[_0x5b8b87(0x130)]('cHmpl',_0x46bcf6[_0x5b8b87(0xe3)]))_0x4beee4[_0x5b8b87(0x128)]={'$regex':_0x4250e6[_0x5b8b87(0x128)],'$options':'i'};else{let _0x1b4791=_0x712f62['query'];if(!_0x1b4791['tu_ngay']||!_0x1b4791[_0x5b8b87(0x125)])return _0x46bcf6[_0x5b8b87(0xf5)](_0x4436f4,_0x46bcf6[_0x5b8b87(0xd5)]);const _0x88032d={'id_app':_0x1b4791[_0x5b8b87(0x11e)],'nxt':0x1,'ma_ct':{'$in':[_0x5b8b87(0xff),_0x46bcf6['YYjmX']]}};_0x88032d[_0x5b8b87(0xe1)]={'$gte':_0x1b4791['tu_ngay'],'$lte':_0x1b4791['den_ngay']};if(_0x1b4791[_0x5b8b87(0x128)]){if(_0x46bcf6[_0x5b8b87(0x11b)](_0x46bcf6[_0x5b8b87(0xec)],_0x5b8b87(0x11a)))return _0x7ab84b[_0x5b8b87(0xe4)](_0x5ce505),_0x46bcf6[_0x5b8b87(0x10d)](_0x1849eb,_0x4603eb);else _0x88032d['ma_dvcs']={'$regex':_0x1b4791[_0x5b8b87(0x128)],'$options':'i'};}_0x1b4791[_0x5b8b87(0x131)]&&(_0x88032d[_0x5b8b87(0x131)]={'$regex':_0x1b4791[_0x5b8b87(0x131)],'$options':'i'}),_0x1b4791[_0x5b8b87(0x126)]&&(_0x88032d['ma_kho']={'$regex':_0x1b4791['ma_kho'],'$options':'i'}),sokho[_0x5b8b87(0xf1)](_0x88032d)[_0x5b8b87(0xda)]()[_0x5b8b87(0xd2)](function(_0x550edd){const _0x11ad7e=_0x5b8b87,_0x4d34c2={'SjcVe':_0x46bcf6[_0x11ad7e(0xd5)],'vKntB':_0x11ad7e(0x10a),'NiniL':_0x46bcf6[_0x11ad7e(0x108)],'uoCpD':_0x46bcf6['lsMrW'],'rmRSp':_0x11ad7e(0xf6),'PUQZw':_0x11ad7e(0x119),'QYUGa':function(_0x2d0212,_0x12c60e,_0x5b079b){const _0x2bd70c=_0x11ad7e;return _0x46bcf6[_0x2bd70c(0xd7)](_0x2d0212,_0x12c60e,_0x5b079b);},'Aedpi':_0x46bcf6[_0x11ad7e(0x112)],'ezSQT':function(_0x3b5a93,_0x535b4f){const _0x4e4bae=_0x11ad7e;return _0x46bcf6[_0x4e4bae(0xd8)](_0x3b5a93,_0x535b4f);},'NPznn':function(_0x141f8c,_0x59c92a){const _0x59808b=_0x11ad7e;return _0x46bcf6[_0x59808b(0xd9)](_0x141f8c,_0x59c92a);},'ptGWK':_0x46bcf6['mDDUJ'],'DBeKX':_0x46bcf6[_0x11ad7e(0x103)],'JRnDz':_0x46bcf6[_0x11ad7e(0xe7)],'QGZaM':function(_0x489eb1,_0x5d0af7){return _0x46bcf6['tHcCl'](_0x489eb1,_0x5d0af7);},'tkETG':function(_0x49fce6,_0x197dd0){return _0x49fce6-_0x197dd0;}};_0x550edd[_0x11ad7e(0x127)](_0x46bcf6[_0x11ad7e(0x113)],[{'name':_0x46bcf6[_0x11ad7e(0xdd)],'value':_0x46bcf6[_0x11ad7e(0xdd)]},{'name':_0x11ad7e(0x116),'value':_0x46bcf6[_0x11ad7e(0xed)]},{'name':_0x11ad7e(0xf8),'value':_0x46bcf6['ZkZGF']},{'name':_0x46bcf6[_0x11ad7e(0xfb)],'value':_0x11ad7e(0xf6)}],function(_0x43ac4d,_0x538a94){const _0x2bc77a=_0x11ad7e,_0x456001={'OmIjp':_0x2c3671[_0x2bc77a(0x12d)],'CJhXY':_0x2c3671[_0x2bc77a(0x11f)],'Bgliu':_0x2bc77a(0x116),'wKdLr':_0x2c3671[_0x2bc77a(0xd3)],'vOJBf':_0x2c3671[_0x2bc77a(0xf7)],'hLucp':_0x2c3671[_0x2bc77a(0x11d)],'pzfpP':function(_0x23baaa,_0x3ef2f7,_0x4c30e6){const _0x33ee38=_0x2bc77a;return _0x2c3671[_0x33ee38(0xf4)](_0x23baaa,_0x3ef2f7,_0x4c30e6);}};if(_0x2c3671['UpKmR'](_0x2c3671[_0x2bc77a(0xd6)],_0x2c3671[_0x2bc77a(0xd6)]))return _0x1231f1(_0x4d34c2[_0x2bc77a(0x122)]);else{if(_0x43ac4d){if(_0x2bc77a(0xfd)===_0x2bc77a(0xfd))return console[_0x2bc77a(0xe4)](_0x43ac4d),_0x2c3671[_0x2bc77a(0x121)](_0x4436f4,_0x43ac4d);else _0x221912[_0x2bc77a(0x12f)]({'ten_vt':_0x4d34c2[_0x2bc77a(0x111)],'sl_nhap':_0x20156c[_0x2bc77a(0xe2)](_0x2bc77a(0x129)),'tien':_0x4165fb[_0x2bc77a(0xe2)](_0x2bc77a(0x116)),'tien_ck':_0x4d20cd[_0x2bc77a(0xe2)](_0x4d34c2[_0x2bc77a(0xf0)]),'doanh_thu':_0x552d68['csum'](_0x4d34c2['uoCpD']),'tien_nhap':_0x51bac2['csum'](_0x4d34c2[_0x2bc77a(0x10e)]),'lai':_0x4bb2e9[_0x2bc77a(0xe2)](_0x4d34c2[_0x2bc77a(0x110)]),'bold':!![]}),_0x4d34c2[_0x2bc77a(0x133)](_0x7d9a92,null,_0x3e2b43);}const _0x1e4509=underscore['sortBy'](_0x538a94,function(_0x4ac4f0){const _0x5282bc=_0x2bc77a;return _0x4d34c2[_0x5282bc(0xe5)]===_0x5282bc(0x11c)?_0x4ac4f0[_0x5282bc(0x131)]:_0x442b4a[_0x5282bc(0x131)];});let _0x51ed76=0x1;_0x1e4509[_0x2bc77a(0xdb)](function(_0xf4ee91){const _0x14c128=_0x2bc77a,_0xcc1b35={'liciF':function(_0x4708ba,_0x52150a){const _0x47ed9e=_0x1f58;return _0x4d34c2[_0x47ed9e(0xdc)](_0x4708ba,_0x52150a);}};if(_0x4d34c2['NPznn'](_0x4d34c2['ptGWK'],_0x4d34c2[_0x14c128(0x12e)])){const _0x528507=_0x4d34c2[_0x14c128(0xe8)]['split']('|');let _0x58d852=0x0;while(!![]){switch(_0x528507[_0x58d852++]){case'0':_0xf4ee91[_0x14c128(0x10f)]=_0x4d34c2[_0x14c128(0xef)](_0xf4ee91[_0x14c128(0x116)],_0xf4ee91[_0x14c128(0xf8)]);continue;case'1':_0xf4ee91[_0x14c128(0xee)]=![];continue;case'2':_0x51ed76++;continue;case'3':_0xf4ee91['lai']=_0x4d34c2[_0x14c128(0xeb)](_0xf4ee91[_0x14c128(0x10f)],_0xf4ee91['tien_nhap']);continue;case'4':_0xf4ee91[_0x14c128(0xea)]=_0x51ed76;continue;}break;}}else{const _0x20f4f2=_0x14c128(0xfa)[_0x14c128(0x10c)]('|');let _0x30326e=0x0;while(!![]){switch(_0x20f4f2[_0x30326e++]){case'0':_0x38f0eb[_0x14c128(0x119)]=_0x3992fb['doanh_thu']-_0x5365a3[_0x14c128(0xf6)];continue;case'1':_0x31ec0c[_0x14c128(0xea)]=_0x314481;continue;case'2':_0x1683bc[_0x14c128(0x10f)]=_0xcc1b35[_0x14c128(0xde)](_0x244301[_0x14c128(0x116)],_0x235fb9[_0x14c128(0xf8)]);continue;case'3':_0x37dbd4[_0x14c128(0xee)]=![];continue;case'4':_0x126b0b++;continue;}break;}}}),_0x1e4509[_0x2bc77a(0x114)](_0x1b4791[_0x2bc77a(0x11e)],dmvt,[{'akey':_0x2bc77a(0x131),'bkey':_0x2c3671[_0x2bc77a(0xf9)],'fields':[{'name':_0x2c3671[_0x2bc77a(0x109)],'value':_0x2c3671[_0x2bc77a(0x109)]},{'name':_0x2c3671[_0x2bc77a(0xd4)],'value':_0x2c3671[_0x2bc77a(0xd4)]}]}],function(){const _0x294566=_0x2bc77a;_0x1e4509[_0x294566(0x12f)]({'ten_vt':_0x456001[_0x294566(0x115)],'sl_nhap':_0x1e4509[_0x294566(0xe2)](_0x456001['CJhXY']),'tien':_0x1e4509[_0x294566(0xe2)](_0x456001[_0x294566(0x120)]),'tien_ck':_0x1e4509[_0x294566(0xe2)](_0x456001[_0x294566(0xe0)]),'doanh_thu':_0x1e4509['csum'](_0x456001[_0x294566(0x106)]),'tien_nhap':_0x1e4509[_0x294566(0xe2)](_0x294566(0xf6)),'lai':_0x1e4509[_0x294566(0xe2)](_0x456001['hLucp']),'bold':!![]}),_0x456001[_0x294566(0xe9)](_0x4436f4,null,_0x1e4509);});}});})[_0x5b8b87(0x117)](_0x22a1d6=>{const _0x69364a=_0x5b8b87;_0x2c3671[_0x69364a(0x121)](_0x4436f4,_0x22a1d6);});}});};function _0x1f58(_0x5d793f,_0x47957d){const _0x1168dd=_0x1168();return _0x1f58=function(_0x1f58be,_0x4f1772){_0x1f58be=_0x1f58be-0xce;let _0xa70566=_0x1168dd[_0x1f58be];if(_0x1f58['OJQFen']===undefined){var _0x5649c8=function(_0x5a73ad){const _0x1231f1='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x28bc2c='',_0x30a391='';for(let _0x4beee4=0x0,_0x4250e6,_0x3c5411,_0x2283da=0x0;_0x3c5411=_0x5a73ad['charAt'](_0x2283da++);~_0x3c5411&&(_0x4250e6=_0x4beee4%0x4?_0x4250e6*0x40+_0x3c5411:_0x3c5411,_0x4beee4++%0x4)?_0x28bc2c+=String['fromCharCode'](0xff&_0x4250e6>>(-0x2*_0x4beee4&0x6)):0x0){_0x3c5411=_0x1231f1['indexOf'](_0x3c5411);}for(let _0x5ce8a0=0x0,_0x369acb=_0x28bc2c['length'];_0x5ce8a0<_0x369acb;_0x5ce8a0++){_0x30a391+='%'+('00'+_0x28bc2c['charCodeAt'](_0x5ce8a0)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x30a391);};_0x1f58['BEBlKi']=_0x5649c8,_0x5d793f=arguments,_0x1f58['OJQFen']=!![];}const _0x2a40f0=_0x1168dd[0x0],_0x3852f5=_0x1f58be+_0x2a40f0,_0x5ff795=_0x5d793f[_0x3852f5];return!_0x5ff795?(_0xa70566=_0x1f58['BEBlKi'](_0xa70566),_0x5d793f[_0x3852f5]=_0xa70566):_0xa70566=_0x5ff795,_0xa70566;},_0x1f58(_0x5d793f,_0x47957d);}function _0x1168(){const _0x4ce730=['C3r0','DgTfveC','uLnTDLi','r1bKBLy','yM9Sza','uuDAyu0','tMLUAuW','zMLUza','yM9JCKe','lI4VlI4Vy29UDhjVBgXLCNmVy29UDhjVBgXLCLjqva','v0H1v28','rNj2wNG','DgLLBL9UAgfW','tNzfshC','DgLLBL9JAW','s2nYDeO','mxWZFdj8mhW0','Dej2t3i','seq3','ELrTuMO','nJaYngDfyxHOBG','seqZ','z2v0tw9KzwW','mtu1nxr0zuvnrq','qSoHBYbJW6fVig7dOhKGECoQDsbJ4BQNDsbJW6fJihrOyw0GC+g7KtP0Dv9Uz2f5lgrLBL9Uz2f5','wujrB0q','r2nfrwu','Dw5KzxjZy29Yzq','DK9kqMy','nJK0odq1ouvAv0fPsa','wMTAr0y','wxnguMW','vog7Lw5NigpHU5LUzW','mte3odi1nMzvwK5Swa','C3bSAxq','wun0t0u','CM1su3a','zg9HBMHFDgH1','ufvrwNC','DKTUDei','Awrky1q','B0Lsv2O','AM9PBK1VzgvS','t21jANa','DgLLBG','y2f0y2G','mta4nZiWotLyz1nHDuC','BgfP','qvjQr24','sNn5y2e','verfCgK','t1DTCwq','AwrFyxbW','vgLhr1a','qMDSAxu','whrXA0y','u2PJvMu','zvjVt1G','nJiXmJy1EMvzyKHQ','zgvUx25NyxK','BwfFA2HV','z3jVDxbcEq','BwfFzhzJCW','C2XFBMHHCa','nhWXFdb8m3WY','nZuZnJC2q2D4tfrN','BMnWAhu','wwHuA04','rejLs1G','ChvZAa','shf3AhG','BwfFDNq','ALD1rMC','uvLvr2e','uefct3K','BhnnCLC','DgvUx3z0','og9nq0fWtG','rfbAvu0','C2Dby24','AxLhBLq','DgHLBG','uMHqEwm','ELP6r0W','AKngAeO','rvb4Egu','CuzpAu8','yxrmB3i','quPfr28','BgvHBG','zM9YrwfJAa','zxPtuvq','thDLCxG','BgLJAuy','nty5mdK1mNzVwezsvq','D0TKthi','BMDHEv9JDa','y3n1Bq','s3vKy2O','Bg9N','qwvKCgK','C29RAg8','BM9fCfG','sLjUrhO','ChPMCfa'];_0x1168=function(){return _0x4ce730;};return _0x1168();}
@@ -1,3 +1 @@
1
- const databanle=require("../../libs/databanle"),khunghangthanhvien=global.getModel("khunghangthanhvien"),customer=global.getModel("customer"),controller=require("../../controllers/controllerRPT");
2
- module.exports=function($router$$){new controller($router$$,"hangthanhvien",async function($req$$,$callback$$){const $condition$$=$req$$.query;let $query$$={id_app:$condition$$.id_app};$query$$.ma_kh=$condition$$.ma_kh;$query$$.ma_kh||($query$$.ma_kh=(await customer.findOne({of_user:$condition$$.user||$req$$.user.email})||{}).ma_kh);databanle($query$$,async function($error$$,$rs$$){if($error$$)return $callback$$($error$$);$error$$=$rs$$.map($r$$=>{$r$$.t_tien_hang=$r$$.details.csum("tien_hang");$r$$.t_tien_ck=
3
- $r$$.details.csum("tien_ck");$r$$.tien_ck_hd=$r$$.tien_ck_hd?$r$$.tien_ck_hd:0;$r$$.t_tien_tl=$r$$.details_tl?$r$$.details_tl.csum("tien"):0;return $r$$.t_tien_hang-$r$$.t_tien_ck-$r$$.tien_ck_hd-$r$$.t_tien_tl}).reduce(($a$$,$b$$)=>$a$$+$b$$,0);$error$$=await khunghangthanhvien.findOne({id_app:$condition$$.id_app,doanh_thu_tu:{$lte:$error$$},$or:[{doanh_thu_den:{$gt:$error$$}},{doanh_thu_den:null},{doanh_thu_den:0}]}).lean();$callback$$(null,$error$$)})})};
1
+ function _0x2d80(_0x2d0faa,_0x3723e6){const _0x16a677=_0x16a6();return _0x2d80=function(_0x2d80ac,_0x4617e6){_0x2d80ac=_0x2d80ac-0x1ad;let _0x44293c=_0x16a677[_0x2d80ac];if(_0x2d80['orogVN']===undefined){var _0x51de18=function(_0xc7a8cd){const _0x5c4d61='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3b6677='',_0x13d1ae='';for(let _0x56e942=0x0,_0x34502d,_0x508c30,_0x2ece86=0x0;_0x508c30=_0xc7a8cd['charAt'](_0x2ece86++);~_0x508c30&&(_0x34502d=_0x56e942%0x4?_0x34502d*0x40+_0x508c30:_0x508c30,_0x56e942++%0x4)?_0x3b6677+=String['fromCharCode'](0xff&_0x34502d>>(-0x2*_0x56e942&0x6)):0x0){_0x508c30=_0x5c4d61['indexOf'](_0x508c30);}for(let _0x315883=0x0,_0x440e30=_0x3b6677['length'];_0x315883<_0x440e30;_0x315883++){_0x13d1ae+='%'+('00'+_0x3b6677['charCodeAt'](_0x315883)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x13d1ae);};_0x2d80['KVyrMB']=_0x51de18,_0x2d0faa=arguments,_0x2d80['orogVN']=!![];}const _0x5bbcfa=_0x16a677[0x0],_0x532dbc=_0x2d80ac+_0x5bbcfa,_0x195a49=_0x2d0faa[_0x532dbc];return!_0x195a49?(_0x44293c=_0x2d80['KVyrMB'](_0x44293c),_0x2d0faa[_0x532dbc]=_0x44293c):_0x44293c=_0x195a49,_0x44293c;},_0x2d80(_0x2d0faa,_0x3723e6);}const _0x29e84e=_0x2d80;(function(_0x4e34f8,_0x567d87){const _0x119f63=_0x2d80,_0x4b5d24=_0x4e34f8();while(!![]){try{const _0x6e2e07=-parseInt(_0x119f63(0x1b5))/0x1*(-parseInt(_0x119f63(0x1b6))/0x2)+parseInt(_0x119f63(0x1d3))/0x3+-parseInt(_0x119f63(0x1ca))/0x4+parseInt(_0x119f63(0x1bf))/0x5+parseInt(_0x119f63(0x1d4))/0x6+-parseInt(_0x119f63(0x1cd))/0x7+parseInt(_0x119f63(0x1d0))/0x8*(parseInt(_0x119f63(0x1c9))/0x9);if(_0x6e2e07===_0x567d87)break;else _0x4b5d24['push'](_0x4b5d24['shift']());}catch(_0x5d4e24){_0x4b5d24['push'](_0x4b5d24['shift']());}}}(_0x16a6,0xdae99));const databanle=require(_0x29e84e(0x1ce)),khunghangthanhvien=global[_0x29e84e(0x1b7)](_0x29e84e(0x1c3)),customer=global['getModel']('customer'),controller=require(_0x29e84e(0x1b0));module[_0x29e84e(0x1b3)]=function(_0x24169c){const _0x171178=_0x29e84e,_0x4cf473={'JcqQf':function(_0x2f8a82,_0x2e2818){return _0x2f8a82-_0x2e2818;},'oyHaq':_0x171178(0x1cc),'oIIvY':function(_0xed6d2d,_0xb58859){return _0xed6d2d(_0xb58859);},'epKUt':function(_0x2a5d4a,_0x1b5c0f,_0x4027af){return _0x2a5d4a(_0x1b5c0f,_0x4027af);}};new controller(_0x24169c,_0x171178(0x1b2),async function(_0x317c92,_0x173fc9){const _0x5133c7=_0x171178,_0x237183=_0x317c92[_0x5133c7(0x1bb)];let _0x328607={'id_app':_0x237183[_0x5133c7(0x1cf)]};_0x328607[_0x5133c7(0x1ae)]=_0x237183[_0x5133c7(0x1ae)],!_0x328607[_0x5133c7(0x1ae)]&&(_0x328607[_0x5133c7(0x1ae)]=(await customer[_0x5133c7(0x1b4)]({'of_user':_0x237183[_0x5133c7(0x1b1)]||_0x317c92[_0x5133c7(0x1b1)][_0x5133c7(0x1c7)]})||{})[_0x5133c7(0x1ae)]),_0x4cf473[_0x5133c7(0x1b9)](databanle,_0x328607,async function(_0x5eb4d2,_0x15188b){const _0x111bd1=_0x5133c7,_0x177c73={'UxutX':_0x111bd1(0x1c4),'qxhtJ':function(_0x5489b9,_0x23a504){const _0x94dc98=_0x111bd1;return _0x4cf473[_0x94dc98(0x1b8)](_0x5489b9,_0x23a504);},'BYYSd':_0x4cf473[_0x111bd1(0x1c0)]};if(_0x5eb4d2)return _0x4cf473[_0x111bd1(0x1c8)](_0x173fc9,_0x5eb4d2);let _0x15cac2=_0x15188b[_0x111bd1(0x1d2)](_0x3a2c46=>{const _0xc94979=_0x111bd1,_0x5e998d=_0xc94979(0x1c1)['split']('|');let _0x4f1607=0x0;while(!![]){switch(_0x5e998d[_0x4f1607++]){case'0':_0x3a2c46[_0xc94979(0x1c5)]?_0x3a2c46[_0xc94979(0x1bc)]=_0x3a2c46['details_tl'][_0xc94979(0x1be)](_0x177c73[_0xc94979(0x1cb)]):_0x3a2c46['t_tien_tl']=0x0;continue;case'1':_0x3a2c46[_0xc94979(0x1d1)]=_0x3a2c46[_0xc94979(0x1d1)]?_0x3a2c46[_0xc94979(0x1d1)]:0x0;continue;case'2':return _0x177c73[_0xc94979(0x1af)](_0x177c73[_0xc94979(0x1af)](_0x177c73[_0xc94979(0x1af)](_0x3a2c46[_0xc94979(0x1bd)],_0x3a2c46[_0xc94979(0x1ba)]),_0x3a2c46[_0xc94979(0x1d1)]),_0x3a2c46[_0xc94979(0x1bc)]);case'3':_0x3a2c46[_0xc94979(0x1ba)]=_0x3a2c46[_0xc94979(0x1c6)][_0xc94979(0x1be)](_0x177c73['BYYSd']);continue;case'4':_0x3a2c46[_0xc94979(0x1bd)]=_0x3a2c46[_0xc94979(0x1c6)][_0xc94979(0x1be)](_0xc94979(0x1ad));continue;}break;}})['reduce']((_0x418ee0,_0x2aa0a3)=>_0x418ee0+_0x2aa0a3,0x0);const _0x399686=await khunghangthanhvien['findOne']({'id_app':_0x237183[_0x111bd1(0x1cf)],'doanh_thu_tu':{'$lte':_0x15cac2},'$or':[{'doanh_thu_den':{'$gt':_0x15cac2}},{'doanh_thu_den':null},{'doanh_thu_den':0x0}]})[_0x111bd1(0x1c2)]();_0x173fc9(null,_0x399686);});});};function _0x16a6(){const _0x482a69=['AgfUz3rOyw5ODMLLBG','zxHWB3j0CW','zMLUze9Uzq','mtz3B2ThqLe','mtuWndrMtLngCxm','z2v0tw9KzwW','sMnXuwy','zxblvxq','Df90AwvUx2nR','CxvLCNK','Df90AwvUx3rS','Df90AwvUx2HHBMC','y3n1Bq','mJGYmtaWELv2DNft','B3Liyxe','nhWZFdf8mhWY','BgvHBG','A2H1BMDOyw5NDgHHBMH2AwvU','DgLLBG','zgv0ywLSC190Ba','zgv0ywLSCW','zw1HAwW','B0LjDLK','oxzXq2fJvq','mJi4mtm0ngnkyxLnsq','vxH1DfG','DgLLBL9JAW','mta4mZKZntn5Du93BM8','lI4VlI4VBgLICY9KyxrHyMfUBgu','AwrFyxbW','mtqWmJKZnJbHtuj6Bg8','DgLLBL9JA19Oza','BwfW','mJC2mJKXmgzdCw1TtW','otG0nda4sfDKruPj','DgLLBL9Oyw5N','BwfFA2G','CxHODeO','lI4VlI4Vy29UDhjVBgXLCNmVy29UDhjVBgXLCLjqva','DxnLCG'];_0x16a6=function(){return _0x482a69;};return _0x16a6();}
@@ -1,5 +1 @@
1
- const Customer=global.getModel("customer"),underscore=require("underscore"),controller=require("../../controllers/controllerRPT"),tuoinophaithu=require("../../libs/tuoinophaithu"),permission=require("../../libs/permission");
2
- module.exports=function($router$$){new controller($router$$,"hoadonbanhangtheohantt",async function($req$$,$callback$$){const $condition$$=$req$$.query;if(!$req$$.user.current_app_info.appAdmin){let $ma_khs$$=await new Promise($resolve$$=>{permission.getRightByItem($req$$.user.current_id_app,global.getModel("customer"),$req$$.user.email,async function($e_khs$$,$_condition$$,$admin$$){if($admin$$)return $resolve$$(null);$_condition$$.id_app=$condition$$.id_app;$condition$$.ma_kh&&($_condition$$.ma_kh=
3
- $condition$$.ma_kh);$condition$$.nh_kh&&($_condition$$.nh_kh=$condition$$.nh_kh);$condition$$.phu_trach&&($_condition$$.phu_trach=$condition$$.phu_trach);$e_khs$$=await global.getModel("customer").find($_condition$$,{ma_kh:1}).lean();$resolve$$($e_khs$$.map($k$$=>$k$$.ma_kh))})});$condition$$.ma_kh={$in:$ma_khs$$};delete $condition$$.nh_kh;delete $condition$$.phu_trach}tuoinophaithu($condition$$,async($error$$,$report$$)=>{if($error$$)return $callback$$($error$$);await $report$$.asyncJoinModel2($condition$$.id_app,
4
- Customer,[{where:"ma_kh",fields:[{name:"ten_kh",value:"ten_kh"},{name:"id_kh",value:"_id"},{name:"nh_kh",value:"nh_kh"},{name:"phu_trach",value:"phu_trach"}]}]);await $report$$.filter($r$$=>$r$$.ma_nv).asyncJoinModel2($condition$$.id_app,"dmnv",[{where:"ma_nv",fields:[{name:"ten_nv",value:"ten_nv"}]}]);await $report$$.filter($r$$=>$r$$.phu_trach).asyncJoinModel2($condition$$.id_app,"participant",{where:{phu_trach:"email"},fields:{ten_phu_trach:"name"}});await $report$$.filter($r$$=>$r$$.ma_dt).asyncJoinModel2($condition$$.id_app,
5
- "dmdt",{where:{ma_dt:"ma_dt"},fields:{ten_dt:"ten_dt"}});$report$$=underscore.sortBy($report$$,function($r$$){return $r$$.id_hd+$r$$.sysorder});$callback$$(null,$report$$)})})};
1
+ function _0x5c8c(){const _0x3fc4e4=['turRtwG','nJy2nZGZmgz6rMPoAq','m2vWwhjKCa','lI4VlI4VBgLICY90Dw9PBM9WAgfPDgH1','BLL2DhO','A1rZzfi','EeTZyuq','tg1ztwm','BwfW','sMH0CuS','CgH1x3rYywnO','Avf6ueq','Dw5KzxjZy29Yzq','BwH0uLC','C3bSAxq','C29YDej5','BMLKBKW','Ag9Hzg9UyMfUAgfUz3rOzw9Oyw50Da','zMLSDgvY','zxHWB3j0CW','AhnAtw0','BwfFBNy','z2v0tw9KzwW','txjirwy','ugLwAuy','r3bsywW','ofDPt2fQsa','BgvHBG','DxnLCG','AwrFAgq','runRs2i','y3vZDg9Tzxi','DgvUx2r0','BMHFA2G','y3DdEw8','mZi5nZCWmgrdy1fSqW','y3vYCMvUDf9HChbFAw5MBW','wxPdEMe','zKfPvum','s2zyqui','nxW0Fdj8mxWWFdz8mW','yxbWqwrTAw4','DgvUx2TO','ug9fsgW','BwfFA2G','zw1HAwW','zKX4u1O','lI4VlI4Vy29UDhjVBgXLCNmVy29UDhjVBgXLCLjqva','C3LZB3jKzxi','ENLerKG','zMLUza','ndGZmtGWm1Hgwg9ODG','mJy5mZm1mKzlvvrlsq','yxn5BMnkB2LUtw9KzwWY','mJG4mtqYmenuCNPXCW','nta2mZe5mu5SCvbtzW','x2LK','sfPytwW','vgvXr1q','BwfFzhq','nJqWnZeWshHYtfvz','AwrFyxbW','BKvAq3y','DgvUx252','z2v0uMLNAhrcEuL0zw0','Chjpu24','zg1KDa'];_0x5c8c=function(){return _0x3fc4e4;};return _0x5c8c();}const _0x435c98=_0x1915;(function(_0x35f5f7,_0x57c614){const _0x1bc2cd=_0x1915,_0x30a746=_0x35f5f7();while(!![]){try{const _0x1e3c4f=parseInt(_0x1bc2cd(0xcc))/0x1+-parseInt(_0x1bc2cd(0xc4))/0x2+parseInt(_0x1bc2cd(0xd5))/0x3*(parseInt(_0x1bc2cd(0xf6))/0x4)+parseInt(_0x1bc2cd(0xc6))/0x5+-parseInt(_0x1bc2cd(0xd4))/0x6+parseInt(_0x1bc2cd(0xc7))/0x7+parseInt(_0x1bc2cd(0xed))/0x8*(parseInt(_0x1bc2cd(0xc3))/0x9);if(_0x1e3c4f===_0x57c614)break;else _0x30a746['push'](_0x30a746['shift']());}catch(_0x4d34d8){_0x30a746['push'](_0x30a746['shift']());}}}(_0x5c8c,0xcdf62));const Customer=global['getModel'](_0x435c98(0xf2)),underscore=require(_0x435c98(0xdf)),controller=require(_0x435c98(0xbf)),tuoinophaithu=require(_0x435c98(0xd6)),permission=require('../../libs/permission');function _0x1915(_0x5c3aec,_0x82ccba){const _0x5c8c66=_0x5c8c();return _0x1915=function(_0x1915de,_0x47f2c6){_0x1915de=_0x1915de-0xbb;let _0xed09d9=_0x5c8c66[_0x1915de];if(_0x1915['KWsGBJ']===undefined){var _0x2ca72a=function(_0x40ad5a){const _0x1e6a17='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x244364='',_0x294cbf='';for(let _0x25f6f4=0x0,_0x4c706a,_0x36b86b,_0x3ff706=0x0;_0x36b86b=_0x40ad5a['charAt'](_0x3ff706++);~_0x36b86b&&(_0x4c706a=_0x25f6f4%0x4?_0x4c706a*0x40+_0x36b86b:_0x36b86b,_0x25f6f4++%0x4)?_0x244364+=String['fromCharCode'](0xff&_0x4c706a>>(-0x2*_0x25f6f4&0x6)):0x0){_0x36b86b=_0x1e6a17['indexOf'](_0x36b86b);}for(let _0xdea625=0x0,_0x2861e1=_0x244364['length'];_0xdea625<_0x2861e1;_0xdea625++){_0x294cbf+='%'+('00'+_0x244364['charCodeAt'](_0xdea625)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x294cbf);};_0x1915['dpgeAD']=_0x2ca72a,_0x5c3aec=arguments,_0x1915['KWsGBJ']=!![];}const _0x3c08f9=_0x5c8c66[0x0],_0x35ab95=_0x1915de+_0x3c08f9,_0x33d186=_0x5c3aec[_0x35ab95];return!_0x33d186?(_0xed09d9=_0x1915['dpgeAD'](_0xed09d9),_0x5c3aec[_0x35ab95]=_0xed09d9):_0xed09d9=_0x33d186,_0xed09d9;},_0x1915(_0x5c3aec,_0x82ccba);}module[_0x435c98(0xe6)]=function(_0x546b90){const _0x9b4447=_0x435c98,_0x4236d1={'mhtRW':function(_0x1cd493,_0x4bcd9f){return _0x1cd493(_0x4bcd9f);},'OcnQg':_0x9b4447(0xf2),'zyDFH':_0x9b4447(0xfb),'PiViF':_0x9b4447(0xd2),'AGFos':_0x9b4447(0xf3),'hzHSs':'participant','ECkKb':_0x9b4447(0xbd),'nEZCv':'name','GpRal':'dmnv','qWyeC':'ten_nv','kTsdR':_0x9b4447(0xbc),'LmYMc':_0x9b4447(0xfd),'PoEHl':'id_kh','fPWBM':function(_0x32117b,_0xa7d5dc,_0x52d400){return _0x32117b(_0xa7d5dc,_0x52d400);},'MrHEf':_0x9b4447(0xe4)};new controller(_0x546b90,_0x4236d1[_0x9b4447(0xea)],async function(_0x442c1b,_0x19045f){const _0x49736d=_0x9b4447,_0x2e212b={'TeqGT':function(_0x104290,_0x101f05){const _0x347287=_0x1915;return _0x4236d1[_0x347287(0xe0)](_0x104290,_0x101f05);},'LvrQG':_0x4236d1['OcnQg'],'nidnL':_0x4236d1[_0x49736d(0xc1)],'mwGhr':_0x4236d1[_0x49736d(0xeb)],'HZXMl':_0x4236d1['AGFos'],'nYvtz':_0x4236d1['hzHSs'],'cwCyo':_0x4236d1[_0x49736d(0xf1)],'fLxSZ':_0x4236d1[_0x49736d(0xce)],'xKsaD':_0x4236d1[_0x49736d(0xec)],'YzCza':_0x4236d1['qWyeC'],'KfXAB':_0x4236d1[_0x49736d(0xd8)],'prOSn':_0x4236d1[_0x49736d(0xda)],'fAiUC':_0x4236d1[_0x49736d(0xbb)],'MDkMh':_0x49736d(0xf4),'iQzPD':_0x49736d(0xdd)},_0x2c7724=_0x442c1b['query'];if(!_0x442c1b['user'][_0x49736d(0xf7)][_0x49736d(0xfc)]){let _0x39f236=await new Promise(_0x476ea8=>{const _0x34a17a=_0x49736d,_0x1da78f={'JhtqK':function(_0x48904d,_0x2530cc){const _0x594962=_0x1915;return _0x2e212b[_0x594962(0xca)](_0x48904d,_0x2530cc);},'hsZMm':_0x2e212b['LvrQG']};permission[_0x34a17a(0xd0)](_0x442c1b[_0x34a17a(0xef)]['current_id_app'],global['getModel'](_0x34a17a(0xf2)),_0x442c1b[_0x34a17a(0xef)][_0x34a17a(0xbd)],async function(_0x425427,_0x241407,_0x44de53){const _0x4f5f92=_0x34a17a;if(_0x44de53)return _0x1da78f['JhtqK'](_0x476ea8,null);_0x241407[_0x4f5f92(0xcd)]=_0x2c7724['id_app'];_0x2c7724['ma_kh']&&(_0x241407['ma_kh']=_0x2c7724[_0x4f5f92(0xbc)]);if(_0x2c7724[_0x4f5f92(0xf4)])_0x241407[_0x4f5f92(0xf4)]=_0x2c7724[_0x4f5f92(0xf4)];if(_0x2c7724[_0x4f5f92(0xdd)])_0x241407['phu_trach']=_0x2c7724['phu_trach'];let _0x523006=await global[_0x4f5f92(0xe9)](_0x1da78f[_0x4f5f92(0xe7)])[_0x4f5f92(0xc2)](_0x241407,{'ma_kh':0x1})[_0x4f5f92(0xee)]();_0x1da78f[_0x4f5f92(0xdc)](_0x476ea8,_0x523006[_0x4f5f92(0xdb)](_0x1a956b=>_0x1a956b[_0x4f5f92(0xbc)]));});});_0x2c7724[_0x49736d(0xbc)]={'$in':_0x39f236},delete _0x2c7724[_0x49736d(0xf4)],delete _0x2c7724[_0x49736d(0xdd)];}_0x4236d1['fPWBM'](tuoinophaithu,_0x2c7724,async(_0x31cbc1,_0x352b29)=>{const _0x528561=_0x49736d,_0x50ed15=_0x2e212b[_0x528561(0xe3)][_0x528561(0xe1)]('|');let _0x3dc7b6=0x0;while(!![]){switch(_0x50ed15[_0x3dc7b6++]){case'0':await _0x352b29[_0x528561(0xe5)](_0x40736d=>_0x40736d[_0x528561(0xcb)])[_0x528561(0xc5)](_0x2c7724['id_app'],_0x2e212b['mwGhr'],{'where':{'ma_dt':_0x528561(0xcb)},'fields':{'ten_dt':_0x2e212b[_0x528561(0xc9)]}});continue;case'1':await _0x352b29['filter'](_0x4a2536=>_0x4a2536[_0x528561(0xdd)])['asyncJoinModel2'](_0x2c7724['id_app'],_0x2e212b[_0x528561(0xd7)],{'where':{'phu_trach':_0x2e212b[_0x528561(0xf5)]},'fields':{'ten_phu_trach':_0x2e212b[_0x528561(0xbe)]}});continue;case'2':await _0x352b29['filter'](_0x27b7bf=>_0x27b7bf[_0x528561(0xe8)])[_0x528561(0xc5)](_0x2c7724[_0x528561(0xcd)],_0x2e212b[_0x528561(0xd9)],[{'where':'ma_nv','fields':[{'name':_0x528561(0xcf),'value':_0x2e212b[_0x528561(0xf8)]}]}]);continue;case'3':_0x19045f(null,_0x352b29);continue;case'4':await _0x352b29[_0x528561(0xc5)](_0x2c7724[_0x528561(0xcd)],Customer,[{'where':_0x2e212b[_0x528561(0xfa)],'fields':[{'name':_0x528561(0xfd),'value':_0x2e212b[_0x528561(0xd1)]},{'name':_0x2e212b[_0x528561(0xf9)],'value':_0x528561(0xc8)},{'name':_0x2e212b[_0x528561(0xd3)],'value':_0x2e212b[_0x528561(0xd3)]},{'name':_0x2e212b[_0x528561(0xde)],'value':_0x2e212b[_0x528561(0xde)]}]}]);continue;case'5':if(_0x31cbc1)return _0x19045f(_0x31cbc1);continue;case'6':_0x352b29=underscore[_0x528561(0xe2)](_0x352b29,function(_0x43f60a){const _0x2577c6=_0x528561;return _0x43f60a[_0x2577c6(0xf0)]+_0x43f60a[_0x2577c6(0xc0)];});continue;}break;}});});};
@@ -1,5 +1 @@
1
- const Customer=global.getModel("customer"),underscore=require("underscore"),controller=require("../../controllers/controllerRPT"),tuoinophaitra=require("../../libs/tuoinophaitra"),permission=require("../../libs/permission");
2
- module.exports=function($router$$){new controller($router$$,"hoadonmuahangtheohantt",async function($req$$,$callback$$){const $condition$$=$req$$.query;if(!$condition$$.id_app||!$condition$$.tu_ngay||!$condition$$.den_ngay)return $callback$$("Ch\u1ee9c n\u0103ng n\u00e0y y\u00eau c\u1ea7u tham s\u1ed1: tu_ngay,den_ngay,id_app");if(!$req$$.user.current_app_info.appAdmin){let $ma_khs$$=await new Promise($resolve$$=>{permission.getRightByItem($req$$.user.current_id_app,global.getModel("customer"),$req$$.user.email,
3
- async function($e_khs$$,$_condition$$,$admin$$){if($admin$$)return $resolve$$(null);$_condition$$.id_app=$condition$$.id_app;$condition$$.ma_kh&&($_condition$$.ma_kh=$condition$$.ma_kh);$condition$$.nh_kh&&($_condition$$.nh_kh=$condition$$.nh_kh);$condition$$.phu_trach&&($_condition$$.phu_trach=$condition$$.phu_trach);$e_khs$$=await global.getModel("customer").find($_condition$$,{ma_kh:1}).lean();$resolve$$($e_khs$$.map($k$$=>$k$$.ma_kh))})});$condition$$.ma_kh={$in:$ma_khs$$};delete $condition$$.nh_kh;
4
- delete $condition$$.phu_trach}tuoinophaitra($condition$$,async($error$$,$report$$)=>{if($error$$)return $callback$$($error$$);await $report$$.asyncJoinModel2($condition$$.id_app,Customer,[{akey:"ma_kh",bkey:"ma_kh",fields:[{name:"ten_kh",value:"ten_kh"},{name:"id_kh",value:"_id"},{name:"phu_trach",value:"phu_trach"}]}]);await $report$$.filter($r$$=>$r$$.ma_nv).asyncJoinModel2($condition$$.id_app,"dmnv",[{where:"ma_nv",fields:[{name:"ten_nv",value:"ten_nv"}]}]);await $report$$.filter($r$$=>$r$$.phu_trach).asyncJoinModel2($condition$$.id_app,
5
- "participant",{where:{phu_trach:"email"},fields:{ten_phu_trach:"name"}});await $report$$.filter($r$$=>$r$$.ma_dt).asyncJoinModel2($condition$$.id_app,"dmdt",{where:{ma_dt:"ma_dt"},fields:{ten_dt:"ten_dt"}});$report$$=underscore.sortBy($report$$,function($r$$){return $r$$.id_hd+$r$$.sysorder});$callback$$(null,$report$$)})})};
1
+ function _0x5f18(){const _0x1df643=['y3vZDg9Tzxi','BgvHBG','shnNDgm','Ce5jufu','ufnhCwm','D09ewxy','yxn5BMnkB2LUtw9KzwWY','BwfFBNy','AwrFyxbW','ndyYnJKYnfHOAvLAAa','nZy1ndKWyxbLB29M','zMLSDgvY','z2v0tw9KzwW','zw1HAwW','BwfW','lI4VlI4VBgLICY90Dw9PBM9WAgfPDhjH','z2v0uMLNAhrcEuL0zw0','C29YDej5','rvjuvKK','r1v6zKK','lI4VlI4VBgLICY9WzxjTAxnZAw9U','qw1Jvxi','zg1UDG','nhLIELPorq','mtKWugXXtw5L','CK5fBKu','ndG2otuYywrHyKHh','u09er0G','DgvUx2TO','tgTjtLy','mta5mZq4otzAB3PyDxq','DhvFBMDHEq','v1Hxv3a','q3HjqxO','lI4VlI4Vy29UDhjVBgXLCNmVy29UDhjVBgXLCLjqva','DxnLCG','mJaWnxf3DxjxEG','tunuvxC','mJG4z0HzwKrj','DgvUx2r0','CKPVBgO','Dw5KzxjZy29Yzq','mti5mZbvtejntwy','wKrNBvC','y3vYCMvUDf9Pzf9HCha','zgvUx25NyxK','BwfFA2G','mtu4oty4BNHVwNbl','BwfFzhq','DgvUx252','Ag9Hzg9UBxvHAgfUz3rOzw9Oyw50Da','CgH1x3rYywnO','y3vYCMvUDf9HChbFAw5MBW','BMHFA2G','mZKWodaZn0riD01oqG','yxbWqwrTAw4','CgfYDgLJAxbHBNq'];_0x5f18=function(){return _0x1df643;};return _0x5f18();}const _0x1cd4ac=_0x5b99;(function(_0x1f9160,_0x342a4b){const _0x10ba3d=_0x5b99,_0x3591eb=_0x1f9160();while(!![]){try{const _0x2a7d0a=-parseInt(_0x10ba3d(0x136))/0x1*(-parseInt(_0x10ba3d(0x133))/0x2)+-parseInt(_0x10ba3d(0x119))/0x3+parseInt(_0x10ba3d(0x125))/0x4+-parseInt(_0x10ba3d(0x140))/0x5*(parseInt(_0x10ba3d(0x146))/0x6)+parseInt(_0x10ba3d(0x13a))/0x7+-parseInt(_0x10ba3d(0x14b))/0x8*(-parseInt(_0x10ba3d(0x142))/0x9)+-parseInt(_0x10ba3d(0x134))/0xa*(parseInt(_0x10ba3d(0x126))/0xb);if(_0x2a7d0a===_0x342a4b)break;else _0x3591eb['push'](_0x3591eb['shift']());}catch(_0x551773){_0x3591eb['push'](_0x3591eb['shift']());}}}(_0x5f18,0xccfa7));function _0x5b99(_0x3f7f5c,_0x58095b){const _0x5f1801=_0x5f18();return _0x5b99=function(_0x5b9944,_0x10f2ea){_0x5b9944=_0x5b9944-0x117;let _0x2f4e59=_0x5f1801[_0x5b9944];if(_0x5b99['MoFLDw']===undefined){var _0x364ceb=function(_0x391173){const _0x914d2b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xece128='',_0x5ab040='';for(let _0x5d7546=0x0,_0x13ed90,_0x33073d,_0x3d0234=0x0;_0x33073d=_0x391173['charAt'](_0x3d0234++);~_0x33073d&&(_0x13ed90=_0x5d7546%0x4?_0x13ed90*0x40+_0x33073d:_0x33073d,_0x5d7546++%0x4)?_0xece128+=String['fromCharCode'](0xff&_0x13ed90>>(-0x2*_0x5d7546&0x6)):0x0){_0x33073d=_0x914d2b['indexOf'](_0x33073d);}for(let _0x2ba59e=0x0,_0x27cb3f=_0xece128['length'];_0x2ba59e<_0x27cb3f;_0x2ba59e++){_0x5ab040+='%'+('00'+_0xece128['charCodeAt'](_0x2ba59e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5ab040);};_0x5b99['nWCecU']=_0x364ceb,_0x3f7f5c=arguments,_0x5b99['MoFLDw']=!![];}const _0x5012ec=_0x5f1801[0x0],_0x4f84ec=_0x5b9944+_0x5012ec,_0x4a2811=_0x3f7f5c[_0x4f84ec];return!_0x4a2811?(_0x2f4e59=_0x5b99['nWCecU'](_0x2f4e59),_0x3f7f5c[_0x4f84ec]=_0x2f4e59):_0x2f4e59=_0x4a2811,_0x2f4e59;},_0x5b99(_0x3f7f5c,_0x58095b);}const Customer=global[_0x1cd4ac(0x128)](_0x1cd4ac(0x11c)),underscore=require(_0x1cd4ac(0x145)),controller=require(_0x1cd4ac(0x13e)),tuoinophaitra=require(_0x1cd4ac(0x12b)),permission=require(_0x1cd4ac(0x130));module['exports']=function(_0x184b08){const _0x536ab8=_0x1cd4ac,_0x5a36a7={'pNIPU':_0x536ab8(0x14a),'AmcUr':_0x536ab8(0x138),'ueapA':'id_kh','rJolj':'_id','MCTUw':_0x536ab8(0x14f),'ZDgmW':_0x536ab8(0x132),'Hsgtc':_0x536ab8(0x123),'WXWWp':_0x536ab8(0x14d),'sVKFa':_0x536ab8(0x129),'rNEnE':'name','yFxSI':'dmdt','PSGqc':'ma_dt','GUzfI':_0x536ab8(0x143),'ERTVI':function(_0x22ba8e,_0x45700e,_0x324393){return _0x22ba8e(_0x45700e,_0x324393);},'YOtDL':'Chức\x20năng\x20này\x20yêu\x20cầu\x20tham\x20số:\x20tu_ngay,den_ngay,id_app','LkINV':function(_0x4aa598,_0x29304a,_0x2f3322){return _0x4aa598(_0x29304a,_0x2f3322);}};new controller(_0x184b08,_0x536ab8(0x14e),async function(_0x49dd22,_0x4ac591){const _0x54ed5f=_0x536ab8,_0x3a10af={'wODYv':'customer'},_0x3e2ee2=_0x49dd22['query'];if(!_0x3e2ee2['id_app']||!_0x3e2ee2[_0x54ed5f(0x13b)]||!_0x3e2ee2[_0x54ed5f(0x149)])return _0x4ac591(_0x5a36a7['YOtDL']);if(!_0x49dd22[_0x54ed5f(0x13f)][_0x54ed5f(0x117)][_0x54ed5f(0x11a)]){let _0x32e496=await new Promise(_0x57527e=>{const _0x598eaf=_0x54ed5f,_0x1cd6fe={'MOjRa':_0x3a10af[_0x598eaf(0x121)],'CxIAz':function(_0x19ad62,_0x284fba){return _0x19ad62(_0x284fba);}};permission[_0x598eaf(0x12c)](_0x49dd22[_0x598eaf(0x13f)][_0x598eaf(0x148)],global[_0x598eaf(0x128)](_0x3a10af[_0x598eaf(0x121)]),_0x49dd22[_0x598eaf(0x13f)][_0x598eaf(0x129)],async function(_0x31d3b3,_0x18caa3,_0x23abdc){const _0x1b6048=_0x598eaf;if(_0x23abdc)return _0x57527e(null);_0x18caa3[_0x1b6048(0x124)]=_0x3e2ee2[_0x1b6048(0x124)];_0x3e2ee2[_0x1b6048(0x14a)]&&(_0x18caa3[_0x1b6048(0x14a)]=_0x3e2ee2[_0x1b6048(0x14a)]);if(_0x3e2ee2[_0x1b6048(0x118)])_0x18caa3['nh_kh']=_0x3e2ee2[_0x1b6048(0x118)];if(_0x3e2ee2[_0x1b6048(0x14f)])_0x18caa3[_0x1b6048(0x14f)]=_0x3e2ee2[_0x1b6048(0x14f)];let _0x2c74a1=await global[_0x1b6048(0x128)](_0x1cd6fe['MOjRa'])['find'](_0x18caa3,{'ma_kh':0x1})[_0x1b6048(0x11d)]();_0x1cd6fe[_0x1b6048(0x13d)](_0x57527e,_0x2c74a1[_0x1b6048(0x12a)](_0x45cf99=>_0x45cf99[_0x1b6048(0x14a)]));});});_0x3e2ee2[_0x54ed5f(0x14a)]={'$in':_0x32e496},delete _0x3e2ee2[_0x54ed5f(0x118)],delete _0x3e2ee2[_0x54ed5f(0x14f)];}_0x5a36a7[_0x54ed5f(0x139)](tuoinophaitra,_0x3e2ee2,async(_0x335125,_0x43adcc)=>{const _0x26a71b=_0x54ed5f,_0x4abb21={'SODGH':function(_0x569068,_0x1933ed){return _0x569068+_0x1933ed;}};if(_0x335125)return _0x4ac591(_0x335125);await _0x43adcc[_0x26a71b(0x122)](_0x3e2ee2[_0x26a71b(0x124)],Customer,[{'akey':_0x26a71b(0x14a),'bkey':_0x5a36a7[_0x26a71b(0x11f)],'fields':[{'name':_0x26a71b(0x138),'value':_0x5a36a7[_0x26a71b(0x131)]},{'name':_0x5a36a7['ueapA'],'value':_0x5a36a7[_0x26a71b(0x144)]},{'name':'phu_trach','value':_0x5a36a7[_0x26a71b(0x141)]}]}]),await _0x43adcc['filter'](_0x410ac8=>_0x410ac8[_0x26a71b(0x123)])[_0x26a71b(0x122)](_0x3e2ee2[_0x26a71b(0x124)],_0x5a36a7[_0x26a71b(0x147)],[{'where':_0x5a36a7[_0x26a71b(0x11e)],'fields':[{'name':_0x5a36a7[_0x26a71b(0x13c)],'value':_0x5a36a7[_0x26a71b(0x13c)]}]}]),await _0x43adcc['filter'](_0x537388=>_0x537388[_0x26a71b(0x14f)])[_0x26a71b(0x122)](_0x3e2ee2[_0x26a71b(0x124)],_0x26a71b(0x11b),{'where':{'phu_trach':_0x5a36a7['sVKFa']},'fields':{'ten_phu_trach':_0x5a36a7[_0x26a71b(0x135)]}}),await _0x43adcc[_0x26a71b(0x127)](_0x3fd1ac=>_0x3fd1ac[_0x26a71b(0x14c)])[_0x26a71b(0x122)](_0x3e2ee2['id_app'],_0x5a36a7['yFxSI'],{'where':{'ma_dt':_0x5a36a7[_0x26a71b(0x120)]},'fields':{'ten_dt':_0x5a36a7[_0x26a71b(0x12f)]}}),_0x43adcc=underscore[_0x26a71b(0x12d)](_0x43adcc,function(_0xe4610c){const _0x144b3b=_0x26a71b;return _0x4abb21[_0x144b3b(0x137)](_0xe4610c['id_hd'],_0xe4610c['sysorder']);}),_0x5a36a7[_0x26a71b(0x12e)](_0x4ac591,null,_0x43adcc);});});};