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,109 +1 @@
1
- const axios=require("axios"),moment=require("moment"),{updateInvoice,numberToWord}=require("./utils"),crypto=require("crypto");
2
- function generateEasyInvoiceToken($httpMethod_signatureRawData$$,$username$$,$password$$){const $timestamp$$=Math.floor(Date.now()/1E3).toString(),$nonce$$=crypto.randomUUID().replace(/-/g,"");$httpMethod_signatureRawData$$=`${$httpMethod_signatureRawData$$.toUpperCase()}${$timestamp$$}${$nonce$$}`;return`${crypto.createHash("md5").update($httpMethod_signatureRawData$$,"utf8").digest("base64")}:${$nonce$$}:${$timestamp$$}:${$username$$}:${$password$$}`}
3
- const exportInvoice=async($app$$,$ct$$,$check_data$$=!1)=>{const $ctrl$$=global.controllers[$ct$$?.ma_ct?.toUpperCase()];if(!$ctrl$$)throw"Kh\u00f4ng th\u1ec3 xu\u1ea5t thu\u1ebf cho ch\u1ee9ng t\u1eeb "+$ct$$?.ma_ct;if(!$app$$)throw"Kh\u00f4ng t\u00ecm th\u1ea5y c\u00f4ng ty n\u00e0y";if(!$app$$.easy_url_service||!$app$$.easy_user||!$app$$.easy_password)throw"Th\u00f4ng tin xu\u1ea5t ho\u00e1 \u0111\u01a1n ch\u01b0a \u0111\u01b0\u1ee3c khai b\u00e1o \u0111\u1ea7y \u0111\u1ee7";if(!$app$$.ma_so_thue)throw"B\u1ea1n ch\u01b0a nh\u1eadp m\u00e3 s\u1ed1 thu\u1ebf c\u1ee7a c\u00f4ng ty";
4
- var $kh_pattern$$=await getInvoice($app$$,$ct$$._id.toString());if($kh_pattern$$)return console.log("[utils] [exportInvoiceEasyInvoice] \u0110\u1ed3ng b\u1ed9 hoa \u0111\u01a1n"),$ct$$.result_export_einvoice=$kh_pattern$$,await updateInvoice($ctrl$$,$ct$$),$kh_pattern$$;if($ct$$?.result_export_einvoice?.result?.invoiceNo)return $ct$$.result_export_einvoice;$kh_pattern$$=await global.getModel("customer").findOne({id_app:$app$$._id,ma_kh:$ct$$.ma_kh})||{};await $ct$$.details.filter($d$$=>$d$$.ma_vt).asyncJoinModel2($app$$._id.toString(),
5
- global.getModel("dmvt"),{where:"ma_vt",fields:"ten_vt"});let $itemInfo$$,$taxBreak$$={};$itemInfo$$=$ct$$.details.map(($detail_tien_ck$$,$index$$)=>{var $thue_suat$$=($detail_tien_ck$$.ma_thue?$detail_tien_ck$$.thue_suat:$ct$$.thue_suat)||0;let $unitPrice$$=$detail_tien_ck$$.gia_ban_ct_nt,$quantity$$=$detail_tien_ck$$.sl_xuat,$itemTotalAmountAfterDiscount$$=$detail_tien_ck$$.tien_ct_nt-0,$taxAmount$$=Math.round($detail_tien_ck$$.tien_ct_nt*$thue_suat$$/100),$itemTotalAmountWithTax$$=$itemTotalAmountAfterDiscount$$+
6
- $taxAmount$$;a:{var $JSCompiler_inline_result$jscomp$0_taxPercentage_tien_ct_nt$$=$detail_tien_ck$$.tien_ct_nt;switch($detail_tien_ck$$.ma_thue||$ct$$.ma_thue){case "KT":$JSCompiler_inline_result$jscomp$0_taxPercentage_tien_ct_nt$$=$JSCompiler_inline_result$jscomp$0_taxPercentage_tien_ct_nt$$<0?void 0:-1;break a;case "KK":$JSCompiler_inline_result$jscomp$0_taxPercentage_tien_ct_nt$$=$JSCompiler_inline_result$jscomp$0_taxPercentage_tien_ct_nt$$<0?void 0:-2;break a;case "TK":$JSCompiler_inline_result$jscomp$0_taxPercentage_tien_ct_nt$$=
7
- $JSCompiler_inline_result$jscomp$0_taxPercentage_tien_ct_nt$$<0?void 0:-3;break a;default:$JSCompiler_inline_result$jscomp$0_taxPercentage_tien_ct_nt$$=$thue_suat$$}}$taxBreak$$[$JSCompiler_inline_result$jscomp$0_taxPercentage_tien_ct_nt$$.toString()]?($taxBreak$$[$JSCompiler_inline_result$jscomp$0_taxPercentage_tien_ct_nt$$.toString()].t_tien+=$itemTotalAmountAfterDiscount$$,$taxBreak$$[$JSCompiler_inline_result$jscomp$0_taxPercentage_tien_ct_nt$$.toString()].t_thue+=$taxAmount$$,$taxBreak$$[$JSCompiler_inline_result$jscomp$0_taxPercentage_tien_ct_nt$$.toString()].t_tt+=
8
- $itemTotalAmountWithTax$$):$taxBreak$$[$JSCompiler_inline_result$jscomp$0_taxPercentage_tien_ct_nt$$.toString()]={t_tien:$itemTotalAmountAfterDiscount$$,t_thue:$taxAmount$$,t_tt:$itemTotalAmountWithTax$$};$index$$=`
9
- <Product>
10
- <Code>${$detail_tien_ck$$.ma_vt}</Code>
11
- <No>${$index$$+1}</No>
12
- <Feature></Feature>
13
- <ProdName>${$detail_tien_ck$$.ten_vt_vat||$detail_tien_ck$$.ten_vt}</ProdName>
14
- <ProdUnit>${$detail_tien_ck$$.tien_ct_nt<0?"":$detail_tien_ck$$.ma_dvt}</ProdUnit>
15
- <ProdQuantity>${$quantity$$}</ProdQuantity>
16
- <ProdPrice>${$unitPrice$$}</ProdPrice>
17
- <Discount>${0}</Discount>
18
- <DiscountAmount>${0}</DiscountAmount>
19
- <Total>${$itemTotalAmountAfterDiscount$$}</Total>
20
- <VATRate>${$JSCompiler_inline_result$jscomp$0_taxPercentage_tien_ct_nt$$} </VATRate>
21
- <VATRateOther>${$JSCompiler_inline_result$jscomp$0_taxPercentage_tien_ct_nt$$==-3?$thue_suat$$:""}</VATRateOther>
22
- <VATAmount>${$taxAmount$$}</VATAmount>
23
- <Amount>${$itemTotalAmountWithTax$$}</Amount>
24
- </Product>`;$detail_tien_ck$$=0-$detail_tien_ck$$.tien_ck_nt;$thue_suat$$=Math.round($detail_tien_ck$$*Math.max($JSCompiler_inline_result$jscomp$0_taxPercentage_tien_ct_nt$$,0)/100,0);$detail_tien_ck$$!=0&&($taxBreak$$[$JSCompiler_inline_result$jscomp$0_taxPercentage_tien_ct_nt$$.toString()].t_tien+=$detail_tien_ck$$,$taxBreak$$[$JSCompiler_inline_result$jscomp$0_taxPercentage_tien_ct_nt$$.toString()].t_thue+=$thue_suat$$,$taxBreak$$[$JSCompiler_inline_result$jscomp$0_taxPercentage_tien_ct_nt$$.toString()].t_tt=
25
- $taxBreak$$[$JSCompiler_inline_result$jscomp$0_taxPercentage_tien_ct_nt$$.toString()].t_tt+$detail_tien_ck$$+$thue_suat$$,$itemInfo$$.push(`
26
- <Product>
27
- <Code>discount</Code>
28
- <No>${$ct$$.details.length}</No>
29
- <Feature></Feature>
30
- <ProdName>Chi\u1ebft kh\u1ea5u</ProdName>
31
- <ProdUnit></ProdUnit>
32
- <ProdQuantity></ProdQuantity>
33
- <ProdPrice></ProdPrice>
34
- <Discount>${0}</Discount>
35
- <DiscountAmount>${0}</DiscountAmount>
36
- <Total>${$detail_tien_ck$$}</Total>
37
- <VATRate>${$JSCompiler_inline_result$jscomp$0_taxPercentage_tien_ct_nt$$} </VATRate>
38
- <VATAmount>${$thue_suat$$}</VATAmount>
39
- <Amount>${$detail_tien_ck$$+$thue_suat$$}</Amount>
40
- </Product>`));return $index$$});$ct$$.ngay_hd||($ct$$.ngay_hd=new Date);var $hinh_thuc_tt_so_seri$$=$ct$$.hinh_thuc_tt;$hinh_thuc_tt_so_seri$$=$hinh_thuc_tt_so_seri$$=="CK"?"Chuy\u1ec3n kho\u1ea3n":$hinh_thuc_tt_so_seri$$=="TM/CK"?"Ti\u1ec1n m\u1eb7t/Chuy\u1ec3n kho\u1ea3n":"Ti\u1ec1n m\u1eb7t";var $XmlData_data_t_tien$$=Object.values($taxBreak$$).map($v$$=>$v$$.t_tien).reduce(($a$$,$b$$)=>$a$$+$b$$,0);let $t_thue$$=Object.values($taxBreak$$).map($v$$=>$v$$.t_thue).reduce(($a$$,$b$$)=>
41
- $a$$+$b$$,0),$t_tt$$=Object.values($taxBreak$$).map($v$$=>$v$$.t_tt).reduce(($a$$,$b$$)=>$a$$+$b$$,0);$XmlData_data_t_tien$$=`
42
- <Invoices>
43
- <Inv>
44
- <Invoice>
45
- <Ikey>${$ct$$._id.toString()}</Ikey>
46
- <CusCode>${$ct$$.ma_kh}</CusCode>
47
- <Buyer>${$ct$$.ong_ba||""}</Buyer>
48
- <CusName>${$ct$$.ten_kh||$kh_pattern$$.ten_kh} </CusName>
49
- <Email>${$kh_pattern$$.email||""}</Email>
50
- <EmailCC></EmailCC>
51
- <CusAddress>${$ct$$.dia_chi||$kh_pattern$$.dia_chi}</CusAddress>
52
- <CusBankName>${$ct$$.ten_ngan_hang||$kh_pattern$$.ten_ngan_hang||""}</CusBankName>
53
- <CusBankNo>${$ct$$.tk_ngan_hang||$kh_pattern$$.tk_ngan_hang||""}</CusBankNo>
54
- <CusPhone>${$ct$$.dien_thoai||$kh_pattern$$.dien_thoai||""}</CusPhone>
55
- <CusTaxCode>${$ct$$.ma_so_thue||$kh_pattern$$.ma_so_thue||""}</CusTaxCode>
56
-
57
- <PaymentMethod>${$hinh_thuc_tt_so_seri$$}</PaymentMethod>
58
- <ArisingDate>${moment($ct$$.ngay_hd).format("DD/MM/YYYY")}</ArisingDate>
59
- <ExchangeRate>${$ct$$.ty_gia}</ExchangeRate>
60
- <CurrencyUnit>${$ct$$.ma_nt}</CurrencyUnit>
61
- <Extra></Extra>
62
- <Products>
63
- ${$itemInfo$$.join("")}
64
- </Products>
65
- <Total>${$XmlData_data_t_tien$$}</Total>
66
- <VATRate></VATRate>
67
- <VATRateOther></VATRateOther>
68
- <VATAmount>${$t_thue$$}</VATAmount>
69
- <Amount>${$t_tt$$}</Amount>
70
-
71
- <GrossValue>${$taxBreak$$["-1"]?.t_tien||0}</GrossValue>
72
- <GrossValue0>${$taxBreak$$["0"]?.t_tien||0}</GrossValue0>
73
- <GrossValue5>${$taxBreak$$["5"]?.t_tien||0}</GrossValue5>
74
-
75
- <GrossValue10>${$taxBreak$$["10"]?.t_tien||0}</GrossValue10>
76
- <GrossValueNDeclared>${$taxBreak$$["-2"]?.t_tien||0}</GrossValueNDeclared>
77
- <GrossValueContractor>${$taxBreak$$["-3"]?.t_tien||0}</GrossValueContractor>
78
-
79
- <VatAmount0>${$taxBreak$$["0"]?.t_tien||0}</VatAmount0>
80
- <VatAmount5>${$taxBreak$$["5"]?.t_tien||0}</VatAmount5>
81
-
82
- <VatAmount10>${$taxBreak$$["10"]?.t_tien||0}</VatAmount10>
83
-
84
- <VatAmountNDeclared>${$taxBreak$$["-2"]?.t_tien||0}</VatAmountNDeclared>
85
- <VatAmountContractor>${$taxBreak$$["-3"]?.t_tien||0}</VatAmountContractor>
86
-
87
- <Amount0>${$taxBreak$$["0"]?.t_tt||0}</Amount0>
88
- <Amount5>${$taxBreak$$["5"]?.t_tt||0}</Amount5>
89
-
90
- <Amount10>${$taxBreak$$["10"]?.t_tt||0}</Amount10>
91
-
92
- <AmountNDeclared>${$taxBreak$$["-2"]?.t_tt||0}</AmountNDeclared>
93
- <AmountOther>${$taxBreak$$["-3"]?.t_tt||0}</AmountOther>
94
-
95
- <GrossValue8>${$taxBreak$$["8"]?.t_tien||0}</GrossValue8>
96
- <VatAmount8>${$taxBreak$$["8"]?.t_tien||0}</VatAmount8>
97
- <Amount8>${$taxBreak$$["8"]?.t_tt||0}</Amount8>
98
-
99
- <AmountInWords>${numberToWord($t_tt$$)}</AmountInWords>
100
- </Invoice>
101
- </Inv>
102
- </Invoices>
103
- `;$kh_pattern$$=$ct$$.ky_hieu_hoa_don||$app$$.easy_ky_hieu_hoa_don||"";$hinh_thuc_tt_so_seri$$=$ct$$.so_seri||$app$$.easy_so_serial||"";$XmlData_data_t_tien$$={XmlData:$XmlData_data_t_tien$$,Pattern:$kh_pattern$$,Serial:$hinh_thuc_tt_so_seri$$};if($check_data$$)return $XmlData_data_t_tien$$;try{let $data_rs$$=(await axios({method:"post",url:`${$app$$.easy_url_service.trim()}/api/publish/importInvoice`,headers:{Authentication:generateEasyInvoiceToken("POST",$app$$.easy_user,$app$$.easy_password)},
104
- data:$XmlData_data_t_tien$$})).data;if($data_rs$$.Status==2){let $invoice$$=$data_rs$$.Data.Invoices[0];$invoice$$.invoiceNo=$invoice$$.No;$ct$$.result_export_einvoice={result:$invoice$$};$ct$$.so_hd=$ct$$.result_export_einvoice.result.invoiceNo;$ct$$.ky_hieu_hoa_don=$kh_pattern$$;$ct$$.so_seri=$hinh_thuc_tt_so_seri$$;await $ctrl$$.model.updateOne({_id:$ct$$._id},$ct$$);$ct$$.so_hd&&await global.getModel("tdttno").updateMany({id_ct:$ct$$._id.toString()},{so_hd:$ct$$.so_hd});$ct$$.so_hd&&await global.getModel("tdttno_tt").updateMany({id_hd:$ct$$._id.toString()},
105
- {so_hd:$ct$$.so_hd});await global.getModel("vatra").updateMany({id_ct:$ct$$._id.toString()},{so_hd:$ct$$.so_hd});const $controller$$=require("../controllers/controller");$controller$$.postData($ct$$,$ctrl$$,$e$$=>{if($e$$)return console.error("[utils] [exportInvoiceEasy] post data",$e$$);$controller$$.pushNotification($ctrl$$,$ct$$)});return $ct$$.result_export_einvoice}throw $data_rs$$.Message;}catch($e$$){throw console.error("[utils] [exportInvoiceEasy] export invoice",$e$$.response?.data||$e$$.response||
106
- $e$$),console.error("check data:"),console.error(JSON.stringify($XmlData_data_t_tien$$,null,2)),(($e$$.response||{}).data||{}).Message||$e$$.message||$e$$||"Kh\u00f4ng th\u1ec3 xu\u1ea5t ho\u00e1 \u0111\u01a1n";}};exports.exportInvoice=exportInvoice;
107
- const getInvoice=async($app$$,$ikey$$)=>{if(!$app$$)throw"Thi\u1ebfu th\u00f4ng tin c\u00f4ng ty";if(!$app$$.easy_url_service||!$app$$.easy_user||!$app$$.easy_password)throw"Ch\u01b0a khai b\u00e1o th\u00f4ng tin k\u1ebft n\u1ed1i invoice";if(!$app$$.ma_so_thue)throw"Ch\u01b0a khai b\u00e1o m\u00e3 s\u1ed1 thu\u1ebf c\u00f4ng ty";try{let $kq$$=(await axios({method:"post",url:`${$app$$.easy_url_service.trim()}/api/publish/getInvoicesByIkeys`,headers:{Authentication:generateEasyInvoiceToken("POST",
108
- $app$$.easy_user,$app$$.easy_password)},data:{Ikeys:[$ikey$$]}})).data;if($kq$$.Status==2){if($kq$$.Invoices&&$kq$$.Invoices.length==1){let $invoice$$=$kq$$.Invoices[0];$invoice$$.invoiceNo=$invoice$$.No;return{result:$invoice$$}}return null}throw $kq$$.Message;}catch($e$$){if($e$$.response?.data?.ErrorCode==128)return null;console.error("[utils] [getInvoiceEasy] get invoice",$e$$.response?.data||$e$$.response||$e$$,", ikey:",$ikey$$);throw(($e$$.response||{}).data||{}).Message||"Kh\u00f4ng th\u1ec3 l\u1ea5y th\u00f4ng tin ho\u00e1 \u0111\u01a1n n\u00e0y c\u1ee7a ikey "+
109
- $ikey$$;}};exports.getInvoice=getInvoice;
1
+ function _0xdaf2(_0x3c192d,_0x45495a){const _0x59feb7=_0x59fe();return _0xdaf2=function(_0xdaf2f0,_0x7c8bb4){_0xdaf2f0=_0xdaf2f0-0x170;let _0x35bb14=_0x59feb7[_0xdaf2f0];if(_0xdaf2['zJXIVN']===undefined){var _0x53e8b9=function(_0x151c73){const _0x2d4a32='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x14c875='',_0x195019='';for(let _0x3e8922=0x0,_0x58a655,_0x2de02f,_0xacb789=0x0;_0x2de02f=_0x151c73['charAt'](_0xacb789++);~_0x2de02f&&(_0x58a655=_0x3e8922%0x4?_0x58a655*0x40+_0x2de02f:_0x2de02f,_0x3e8922++%0x4)?_0x14c875+=String['fromCharCode'](0xff&_0x58a655>>(-0x2*_0x3e8922&0x6)):0x0){_0x2de02f=_0x2d4a32['indexOf'](_0x2de02f);}for(let _0xadeb0d=0x0,_0x49e9f4=_0x14c875['length'];_0xadeb0d<_0x49e9f4;_0xadeb0d++){_0x195019+='%'+('00'+_0x14c875['charCodeAt'](_0xadeb0d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x195019);};_0xdaf2['TIPLvR']=_0x53e8b9,_0x3c192d=arguments,_0xdaf2['zJXIVN']=!![];}const _0x44b28d=_0x59feb7[0x0],_0x143b3f=_0xdaf2f0+_0x44b28d,_0x269504=_0x3c192d[_0x143b3f];return!_0x269504?(_0x35bb14=_0xdaf2['TIPLvR'](_0x35bb14),_0x3c192d[_0x143b3f]=_0x35bb14):_0x35bb14=_0x269504,_0x35bb14;},_0xdaf2(_0x3c192d,_0x45495a);}const _0x3e3ae9=_0xdaf2;(function(_0x4fb971,_0x164e98){const _0x825bfc=_0xdaf2,_0x2150b9=_0x4fb971();while(!![]){try{const _0x318104=parseInt(_0x825bfc(0x240))/0x1*(parseInt(_0x825bfc(0x1ff))/0x2)+-parseInt(_0x825bfc(0x1e1))/0x3*(parseInt(_0x825bfc(0x1a5))/0x4)+-parseInt(_0x825bfc(0x20e))/0x5+parseInt(_0x825bfc(0x217))/0x6*(parseInt(_0x825bfc(0x18e))/0x7)+-parseInt(_0x825bfc(0x1a9))/0x8+parseInt(_0x825bfc(0x223))/0x9*(parseInt(_0x825bfc(0x234))/0xa)+parseInt(_0x825bfc(0x233))/0xb;if(_0x318104===_0x164e98)break;else _0x2150b9['push'](_0x2150b9['shift']());}catch(_0x128ef2){_0x2150b9['push'](_0x2150b9['shift']());}}}(_0x59fe,0xee47d));const axios=require(_0x3e3ae9(0x1ea)),moment=require('moment'),{updateInvoice,numberToWord}=require('./utils'),crypto=require('crypto');function generateEasyInvoiceToken(_0xbf84b4,_0x681b0b,_0x197add){const _0xeacae9=_0x3e3ae9,_0x33b729={'srbMC':_0xeacae9(0x1b0),'LgDtl':_0xeacae9(0x209),'haUxC':_0xeacae9(0x19d)},_0x2d6b21=Math['floor'](Date[_0xeacae9(0x1ba)]()/0x3e8)[_0xeacae9(0x1b6)](),_0x341497=crypto[_0xeacae9(0x225)]()[_0xeacae9(0x210)](/-/g,''),_0x2458b4=''+_0xbf84b4[_0xeacae9(0x170)]()+_0x2d6b21+_0x341497,_0x54527f=crypto[_0xeacae9(0x1c3)](_0x33b729[_0xeacae9(0x23f)])[_0xeacae9(0x1e8)](_0x2458b4,_0x33b729[_0xeacae9(0x201)])[_0xeacae9(0x232)](_0x33b729[_0xeacae9(0x1fa)]);return _0x54527f+':'+_0x341497+':'+_0x2d6b21+':'+_0x681b0b+':'+_0x197add;}const exportInvoice=async(_0x490156,_0x33561e,_0x33cf0b=![])=>{const _0x7f2e89=_0x3e3ae9,_0x25938b={'luSaL':function(_0x3da6ee,_0x150200){return _0x3da6ee<_0x150200;},'NVuOo':function(_0xe1a216,_0x31504e){return _0xe1a216<_0x31504e;},'jgXAa':function(_0x689ef7,_0x280234){return _0x689ef7<_0x280234;},'ANsDh':function(_0x1db527,_0x2d32a3){return _0x1db527-_0x2d32a3;},'xHzIJ':function(_0x1ba9f3,_0x48485e){return _0x1ba9f3/_0x48485e;},'jRrwp':function(_0x55b546,_0x3bbfd5){return _0x55b546*_0x3bbfd5;},'FtAwC':function(_0x2d614f,_0x31f3fc){return _0x2d614f+_0x31f3fc;},'CekWn':function(_0x30192e,_0x27b687){return _0x30192e===_0x27b687;},'MFmNc':'lLPbW','kUZoS':function(_0x169b6b,_0x561445){return _0x169b6b+_0x561445;},'syWMu':function(_0x14719a,_0xaddc93){return _0x14719a+_0xaddc93;},'qfyoH':function(_0x38ce9d,_0x20e798){return _0x38ce9d+_0x20e798;},'PlUiD':function(_0x5a8222,_0x5a9804){return _0x5a8222/_0x5a9804;},'WHRlq':function(_0x3e69c1,_0x422bd2){return _0x3e69c1!=_0x422bd2;},'AojcH':function(_0x29e50d,_0x5d802a){return _0x29e50d+_0x5d802a;},'rhWYC':function(_0x3cba49,_0x5b5261){return _0x3cba49+_0x5b5261;},'qfayC':function(_0x308c29,_0x29f8c4){return _0x308c29+_0x29f8c4;},'OFwVC':_0x7f2e89(0x242),'WgOdG':_0x7f2e89(0x23a),'yHpBU':'Không\x20tìm\x20thấy\x20công\x20ty\x20này','yKTHz':'OzbtN','ZZedl':'rxiYO','qzGXI':_0x7f2e89(0x19b),'CmYRv':_0x7f2e89(0x22a),'MwGJF':function(_0x43258b,_0x5b09d5,_0x42049f){return _0x43258b(_0x5b09d5,_0x42049f);},'gWJku':_0x7f2e89(0x1c6),'eJCIw':_0x7f2e89(0x1c2),'SJOeu':_0x7f2e89(0x1f9),'ybRiz':function(_0x1c74b9,_0x142398){return _0x1c74b9==_0x142398;},'PZIZW':_0x7f2e89(0x1d4),'cwttt':function(_0x11862a,_0x220421){return _0x11862a==_0x220421;},'OFmZo':_0x7f2e89(0x193),'zNewW':_0x7f2e89(0x17d),'vjRny':_0x7f2e89(0x1f7),'lsGHk':function(_0x3b59f3,_0x3b04e8){return _0x3b59f3(_0x3b04e8);},'XoDQI':function(_0x180db4,_0x4213dc){return _0x180db4!==_0x4213dc;},'uVpsS':_0x7f2e89(0x188),'QOsuF':'post','wISEx':function(_0x2c3cf5,_0x3f059b,_0x4e2a07,_0x2713e7){return _0x2c3cf5(_0x3f059b,_0x4e2a07,_0x2713e7);},'ONXVy':_0x7f2e89(0x1eb),'XAWGs':_0x7f2e89(0x199),'kzcmo':_0x7f2e89(0x1c7),'RVzfC':'[utils]\x20[exportInvoiceEasy]\x20export\x20invoice','PHRzC':_0x7f2e89(0x1e6)},_0x11138c=global[_0x7f2e89(0x1fe)][_0x33561e?.[_0x7f2e89(0x175)]?.[_0x7f2e89(0x170)]()];if(!_0x11138c)throw _0x25938b[_0x7f2e89(0x20d)](_0x25938b[_0x7f2e89(0x1e3)],_0x33561e?.[_0x7f2e89(0x175)]);if(!_0x490156)throw _0x25938b[_0x7f2e89(0x241)];if(!_0x490156['easy_url_service']||!_0x490156[_0x7f2e89(0x18c)]||!_0x490156['easy_password']){if(_0x25938b[_0x7f2e89(0x208)](_0x25938b['yKTHz'],_0x25938b['ZZedl']))switch(_0x352b67){case'KT':return _0x16eff1<0x0?_0x278a3a:-0x1;case'KK':return _0x25938b[_0x7f2e89(0x194)](_0x41a969,0x0)?_0x4357d3:-0x2;case'TK':return _0x25938b[_0x7f2e89(0x22c)](_0x3f3134,0x0)?_0x5ebc67:-0x3;default:return _0x3b9e24;}else throw _0x25938b[_0x7f2e89(0x179)];}if(!_0x490156[_0x7f2e89(0x1bc)])throw _0x25938b[_0x7f2e89(0x18d)];let _0x3bac41=_0x33561e[_0x7f2e89(0x173)][_0x7f2e89(0x1b6)](),_0x1f7579=await _0x25938b[_0x7f2e89(0x238)](getInvoice,_0x490156,_0x3bac41);if(_0x1f7579)return console['log'](_0x25938b['gWJku']),_0x33561e[_0x7f2e89(0x22d)]=_0x1f7579,await _0x25938b[_0x7f2e89(0x238)](updateInvoice,_0x11138c,_0x33561e),_0x1f7579;if(_0x33561e?.[_0x7f2e89(0x22d)]?.[_0x7f2e89(0x1d2)]?.[_0x7f2e89(0x1d0)])return _0x33561e[_0x7f2e89(0x22d)];const _0x22501e=await global[_0x7f2e89(0x1bb)](_0x25938b['eJCIw'])[_0x7f2e89(0x1fb)]({'id_app':_0x490156[_0x7f2e89(0x173)],'ma_kh':_0x33561e[_0x7f2e89(0x1d6)]})||{};await _0x33561e[_0x7f2e89(0x21a)][_0x7f2e89(0x1b2)](_0x20060b=>_0x20060b['ma_vt'])[_0x7f2e89(0x183)](_0x490156['_id'][_0x7f2e89(0x1b6)](),global[_0x7f2e89(0x1bb)](_0x7f2e89(0x1cb)),{'where':_0x7f2e89(0x202),'fields':_0x25938b[_0x7f2e89(0x214)]});const _0x4792eb=(_0x19d6ec,_0x431059,_0x3ee3bd)=>{const _0x52dc60=_0x7f2e89;switch(_0x19d6ec){case'KT':return _0x25938b['NVuOo'](_0x3ee3bd,0x0)?undefined:-0x1;case'KK':return _0x25938b[_0x52dc60(0x196)](_0x3ee3bd,0x0)?undefined:-0x2;case'TK':return _0x25938b[_0x52dc60(0x196)](_0x3ee3bd,0x0)?undefined:-0x3;default:return _0x431059;}};let _0x3fffb2,_0x3a990e={};_0x3fffb2=_0x33561e[_0x7f2e89(0x21a)][_0x7f2e89(0x171)]((_0x9ba038,_0x548a43)=>{const _0x135ad5=_0x7f2e89;let _0x3ce849=(!_0x9ba038[_0x135ad5(0x1f5)]?_0x33561e[_0x135ad5(0x219)]:_0x9ba038[_0x135ad5(0x219)])||0x0,_0x595390=_0x9ba038[_0x135ad5(0x1f5)]||_0x33561e['ma_thue'],_0x520ccd=_0x9ba038['gia_ban_ct_nt'],_0x331089=_0x9ba038[_0x135ad5(0x213)],_0x53995b=_0x9ba038[_0x135ad5(0x22b)],_0x130e6e=0x0,_0x1304f0=0x0,_0x5d2641=_0x25938b[_0x135ad5(0x215)](_0x53995b,_0x1304f0),_0xcb7c88=Math[_0x135ad5(0x18b)](_0x25938b['xHzIJ'](_0x25938b['jRrwp'](_0x9ba038[_0x135ad5(0x22b)],_0x3ce849),0x64)),_0x36235c=_0x25938b[_0x135ad5(0x231)](_0x5d2641,_0xcb7c88),_0x808672=_0x4792eb(_0x595390,_0x3ce849,_0x9ba038['tien_ct_nt']);if(!_0x3a990e[_0x808672[_0x135ad5(0x1b6)]()]){if(_0x25938b[_0x135ad5(0x208)](_0x25938b[_0x135ad5(0x1c1)],_0x135ad5(0x190))){if(_0x31189b['Invoices']&&_0x2a0bbd[_0x135ad5(0x20f)][_0x135ad5(0x1ae)]==0x1){let _0xaf5235=_0x3aeeeb[_0x135ad5(0x20f)][0x0];return _0xaf5235['invoiceNo']=_0xaf5235['No'],{'result':_0xaf5235};}return null;}else _0x3a990e[_0x808672[_0x135ad5(0x1b6)]()]={'t_tien':_0x5d2641,'t_thue':_0xcb7c88,'t_tt':_0x36235c};}else _0x3a990e[_0x808672[_0x135ad5(0x1b6)]()][_0x135ad5(0x19f)]=_0x25938b[_0x135ad5(0x231)](_0x3a990e[_0x808672[_0x135ad5(0x1b6)]()][_0x135ad5(0x19f)],_0x5d2641),_0x3a990e[_0x808672[_0x135ad5(0x1b6)]()][_0x135ad5(0x200)]=_0x25938b[_0x135ad5(0x203)](_0x3a990e[_0x808672[_0x135ad5(0x1b6)]()][_0x135ad5(0x200)],_0xcb7c88),_0x3a990e[_0x808672['toString']()][_0x135ad5(0x211)]=_0x25938b[_0x135ad5(0x1d5)](_0x3a990e[_0x808672[_0x135ad5(0x1b6)]()][_0x135ad5(0x211)],_0x36235c);let _0x33289e=_0x135ad5(0x1fd)+_0x9ba038['ma_vt']+_0x135ad5(0x1ed)+_0x25938b[_0x135ad5(0x1e0)](_0x548a43,0x1)+_0x135ad5(0x1b3)+(_0x9ba038[_0x135ad5(0x1b4)]||_0x9ba038[_0x135ad5(0x1f9)])+_0x135ad5(0x1fc)+(_0x9ba038[_0x135ad5(0x22b)]<0x0?'':_0x9ba038[_0x135ad5(0x177)])+_0x135ad5(0x205)+_0x331089+'</ProdQuantity>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<ProdPrice>'+_0x520ccd+'</ProdPrice>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<Discount>'+_0x130e6e+_0x135ad5(0x218)+_0x1304f0+'</DiscountAmount>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<Total>'+_0x5d2641+_0x135ad5(0x1b7)+_0x808672+_0x135ad5(0x1f4)+(_0x808672==-0x3?_0x3ce849:'')+_0x135ad5(0x195)+_0xcb7c88+_0x135ad5(0x230)+_0x36235c+_0x135ad5(0x192),_0x4bdbae=_0x25938b[_0x135ad5(0x215)](0x0,_0x9ba038['tien_ck_nt']),_0x2a77f0=Math[_0x135ad5(0x18b)](_0x25938b[_0x135ad5(0x1e9)](_0x25938b[_0x135ad5(0x1bf)](_0x4bdbae,Math[_0x135ad5(0x182)](_0x808672,0x0)),0x64),0x0);return _0x25938b[_0x135ad5(0x20a)](_0x4bdbae,0x0)&&(_0x3a990e[_0x808672[_0x135ad5(0x1b6)]()]['t_tien']=_0x3a990e[_0x808672[_0x135ad5(0x1b6)]()][_0x135ad5(0x19f)]+_0x4bdbae,_0x3a990e[_0x808672[_0x135ad5(0x1b6)]()][_0x135ad5(0x200)]=_0x25938b[_0x135ad5(0x20d)](_0x3a990e[_0x808672[_0x135ad5(0x1b6)]()][_0x135ad5(0x200)],_0x2a77f0),_0x3a990e[_0x808672[_0x135ad5(0x1b6)]()]['t_tt']=_0x25938b['rhWYC'](_0x3a990e[_0x808672['toString']()]['t_tt'],_0x4bdbae)+_0x2a77f0,_0x3fffb2['push'](_0x135ad5(0x184)+_0x33561e[_0x135ad5(0x21a)][_0x135ad5(0x1ae)]+_0x135ad5(0x1db)+0x0+_0x135ad5(0x17b)+0x0+_0x135ad5(0x206)+_0x4bdbae+'</Total>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<VATRate>'+_0x808672+_0x135ad5(0x1a1)+_0x2a77f0+_0x135ad5(0x1cf)+_0x25938b[_0x135ad5(0x180)](_0x4bdbae,_0x2a77f0)+_0x135ad5(0x17f))),_0x33289e;});!_0x33561e[_0x7f2e89(0x236)]&&(_0x33561e[_0x7f2e89(0x236)]=new Date());let _0x117fc5=_0x33561e['hinh_thuc_tt'];if(_0x25938b[_0x7f2e89(0x1d8)](_0x117fc5,'CK'))_0x117fc5=_0x25938b['PZIZW'];else _0x25938b[_0x7f2e89(0x176)](_0x117fc5,_0x25938b[_0x7f2e89(0x1ef)])?_0x117fc5=_0x7f2e89(0x198):_0x117fc5=_0x25938b[_0x7f2e89(0x229)];let _0x47df2c=Object[_0x7f2e89(0x18f)](_0x3a990e)['map'](_0x93a77e=>_0x93a77e[_0x7f2e89(0x19f)])[_0x7f2e89(0x191)]((_0x36da34,_0x298145)=>_0x36da34+_0x298145,0x0),_0xc90be9=Object['values'](_0x3a990e)[_0x7f2e89(0x171)](_0x2d1a67=>_0x2d1a67[_0x7f2e89(0x200)])['reduce']((_0x536d1e,_0x359686)=>_0x536d1e+_0x359686,0x0),_0x43d454=Object[_0x7f2e89(0x18f)](_0x3a990e)[_0x7f2e89(0x171)](_0x5969b1=>_0x5969b1[_0x7f2e89(0x211)])[_0x7f2e89(0x191)]((_0x5a6016,_0x3052bd)=>_0x5a6016+_0x3052bd,0x0);const _0x2dbe03=_0x7f2e89(0x1dd)+_0x33561e[_0x7f2e89(0x173)][_0x7f2e89(0x1b6)]()+_0x7f2e89(0x243)+_0x33561e[_0x7f2e89(0x1d6)]+_0x7f2e89(0x1b5)+(_0x33561e[_0x7f2e89(0x186)]||'')+_0x7f2e89(0x1c0)+(_0x33561e['ten_kh']||_0x22501e[_0x7f2e89(0x185)])+'\x20</CusName>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<Email>'+(_0x22501e[_0x7f2e89(0x1a8)]||'')+_0x7f2e89(0x1ec)+(_0x33561e[_0x7f2e89(0x17c)]||_0x22501e[_0x7f2e89(0x17c)])+'</CusAddress>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<CusBankName>'+(_0x33561e[_0x7f2e89(0x1e2)]||_0x22501e[_0x7f2e89(0x1e2)]||'')+_0x7f2e89(0x1cc)+(_0x33561e[_0x7f2e89(0x1f8)]||_0x22501e[_0x7f2e89(0x1f8)]||'')+'</CusBankNo>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<CusPhone>'+(_0x33561e['dien_thoai']||_0x22501e[_0x7f2e89(0x21c)]||'')+_0x7f2e89(0x1a2)+(_0x33561e[_0x7f2e89(0x1bc)]||_0x22501e[_0x7f2e89(0x1bc)]||'')+'</CusTaxCode>\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<PaymentMethod>'+_0x117fc5+_0x7f2e89(0x22f)+moment(_0x33561e[_0x7f2e89(0x236)])[_0x7f2e89(0x174)](_0x25938b['vjRny'])+'</ArisingDate>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<ExchangeRate>'+_0x33561e[_0x7f2e89(0x1be)]+'</ExchangeRate>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<CurrencyUnit>'+_0x33561e['ma_nt']+'</CurrencyUnit>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<Extra></Extra>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<Products>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3fffb2[_0x7f2e89(0x19e)]('')+_0x7f2e89(0x1aa)+_0x47df2c+'</Total>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<VATRate></VATRate>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<VATRateOther></VATRateOther>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<VATAmount>'+_0xc90be9+'</VATAmount>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<Amount>'+_0x43d454+_0x7f2e89(0x239)+(_0x3a990e['-1']?.[_0x7f2e89(0x19f)]||0x0)+_0x7f2e89(0x1ee)+(_0x3a990e['0']?.[_0x7f2e89(0x19f)]||0x0)+_0x7f2e89(0x23c)+(_0x3a990e['5']?.[_0x7f2e89(0x19f)]||0x0)+'</GrossValue5>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<GrossValue10>'+(_0x3a990e['10']?.[_0x7f2e89(0x19f)]||0x0)+_0x7f2e89(0x1f2)+(_0x3a990e['-2']?.['t_tien']||0x0)+_0x7f2e89(0x1bd)+(_0x3a990e['-3']?.['t_tien']||0x0)+_0x7f2e89(0x212)+(_0x3a990e['0']?.[_0x7f2e89(0x19f)]||0x0)+'</VatAmount0>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<VatAmount5>'+(_0x3a990e['5']?.[_0x7f2e89(0x19f)]||0x0)+_0x7f2e89(0x21f)+(_0x3a990e['10']?.[_0x7f2e89(0x19f)]||0x0)+_0x7f2e89(0x21e)+(_0x3a990e['-2']?.[_0x7f2e89(0x19f)]||0x0)+_0x7f2e89(0x1d9)+(_0x3a990e['-3']?.['t_tien']||0x0)+_0x7f2e89(0x23d)+(_0x3a990e['0']?.[_0x7f2e89(0x211)]||0x0)+_0x7f2e89(0x1f3)+(_0x3a990e['5']?.['t_tt']||0x0)+_0x7f2e89(0x18a)+(_0x3a990e['10']?.[_0x7f2e89(0x211)]||0x0)+'</Amount10>\x0a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<AmountNDeclared>'+(_0x3a990e['-2']?.['t_tt']||0x0)+_0x7f2e89(0x1e5)+(_0x3a990e['-3']?.[_0x7f2e89(0x211)]||0x0)+_0x7f2e89(0x17a)+(_0x3a990e['8']?.['t_tien']||0x0)+_0x7f2e89(0x207)+(_0x3a990e['8']?.[_0x7f2e89(0x19f)]||0x0)+'</VatAmount8>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<Amount8>'+(_0x3a990e['8']?.[_0x7f2e89(0x211)]||0x0)+'</Amount8>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<AmountInWords>'+_0x25938b[_0x7f2e89(0x1d7)](numberToWord,_0x43d454)+_0x7f2e89(0x1b1);let _0x3f300f=_0x33561e[_0x7f2e89(0x1a0)]||_0x490156['easy_ky_hieu_hoa_don']||'',_0x34bdf0=_0x33561e['so_seri']||_0x490156['easy_so_serial']||'',_0x429281={'XmlData':_0x2dbe03,'Pattern':_0x3f300f,'Serial':_0x34bdf0};if(_0x33cf0b){if(_0x25938b[_0x7f2e89(0x1a3)]('zLQaA',_0x25938b[_0x7f2e89(0x17e)])){if(_0x50db81)return _0x50c872['error'](_0x25938b[_0x7f2e89(0x1a6)],_0x2659e2);_0xa9c7c1[_0x7f2e89(0x1af)](_0x21581b,_0x23906a);}else return _0x429281;}try{let _0x191043=await _0x25938b['lsGHk'](axios,{'method':_0x25938b[_0x7f2e89(0x22e)],'url':_0x490156['easy_url_service'][_0x7f2e89(0x23e)]()+_0x7f2e89(0x1de),'headers':{'Authentication':_0x25938b[_0x7f2e89(0x1dc)](generateEasyInvoiceToken,_0x25938b['ONXVy'],_0x490156[_0x7f2e89(0x18c)],_0x490156['easy_password'])},'data':_0x429281}),_0x10553d=_0x191043['data'];if(_0x10553d[_0x7f2e89(0x19a)]==0x2){let _0x4de1cf=_0x10553d['Data'][_0x7f2e89(0x20f)][0x0];_0x4de1cf['invoiceNo']=_0x4de1cf['No'],_0x33561e['result_export_einvoice']={'result':_0x4de1cf},_0x33561e['so_hd']=_0x33561e[_0x7f2e89(0x22d)][_0x7f2e89(0x1d2)][_0x7f2e89(0x1d0)],_0x33561e[_0x7f2e89(0x1a0)]=_0x3f300f,_0x33561e[_0x7f2e89(0x1e7)]=_0x34bdf0,await _0x11138c[_0x7f2e89(0x1ac)][_0x7f2e89(0x197)]({'_id':_0x33561e[_0x7f2e89(0x173)]},_0x33561e);if(_0x33561e[_0x7f2e89(0x1d1)])await global[_0x7f2e89(0x1bb)]('tdttno')['updateMany']({'id_ct':_0x33561e['_id'][_0x7f2e89(0x1b6)]()},{'so_hd':_0x33561e[_0x7f2e89(0x1d1)]});if(_0x33561e[_0x7f2e89(0x1d1)])await global[_0x7f2e89(0x1bb)](_0x25938b[_0x7f2e89(0x1a7)])['updateMany']({'id_hd':_0x33561e[_0x7f2e89(0x173)][_0x7f2e89(0x1b6)]()},{'so_hd':_0x33561e['so_hd']});await global['getModel'](_0x25938b[_0x7f2e89(0x1df)])['updateMany']({'id_ct':_0x33561e[_0x7f2e89(0x173)]['toString']()},{'so_hd':_0x33561e[_0x7f2e89(0x1d1)]});const _0x2eb64d=require(_0x7f2e89(0x1ab));return _0x2eb64d[_0x7f2e89(0x1c9)](_0x33561e,_0x11138c,_0x5aaf30=>{const _0x32675a=_0x7f2e89;if(_0x5aaf30)return console[_0x32675a(0x220)](_0x25938b[_0x32675a(0x1a6)],_0x5aaf30);_0x2eb64d[_0x32675a(0x1af)](_0x11138c,_0x33561e);}),_0x33561e['result_export_einvoice'];}else throw _0x10553d[_0x7f2e89(0x237)];}catch(_0x56a4f6){console[_0x7f2e89(0x220)](_0x25938b[_0x7f2e89(0x226)],_0x56a4f6['response']?.[_0x7f2e89(0x227)]||_0x56a4f6[_0x7f2e89(0x20b)]||_0x56a4f6),console[_0x7f2e89(0x220)](_0x7f2e89(0x1da)),console['error'](JSON[_0x7f2e89(0x1a4)](_0x429281,null,0x2));throw((_0x56a4f6[_0x7f2e89(0x20b)]||{})[_0x7f2e89(0x227)]||{})[_0x7f2e89(0x237)]||_0x56a4f6[_0x7f2e89(0x1c8)]||_0x56a4f6||_0x25938b[_0x7f2e89(0x23b)];}};exports['exportInvoice']=exportInvoice;const getInvoice=async(_0x25bb5e,_0xf47b48)=>{const _0x1e46e1=_0x3e3ae9,_0x127e85={'RlsIr':function(_0x307670,_0x3828ab){return _0x307670==_0x3828ab;},'iwpjy':_0x1e46e1(0x20c),'iBSlg':function(_0x323c05,_0x2573c1){return _0x323c05+_0x2573c1;},'HeftH':_0x1e46e1(0x228),'vCBQu':_0x1e46e1(0x19b),'xoUAe':_0x1e46e1(0x17d),'vcARc':_0x1e46e1(0x216),'huSPv':function(_0x28ca6b,_0x57c2ce){return _0x28ca6b===_0x57c2ce;},'BwFlb':'iKroh','opKga':function(_0x229551,_0x5baa7d){return _0x229551!==_0x5baa7d;},'RaTty':_0x1e46e1(0x189),'Rghrw':function(_0x3d8a75,_0x5b5d50){return _0x3d8a75(_0x5b5d50);},'qVOhP':_0x1e46e1(0x1ad),'hwJdE':function(_0xa65677,_0x5b8195,_0x88c54e,_0x1e83ac){return _0xa65677(_0x5b8195,_0x88c54e,_0x1e83ac);},'JIMZH':_0x1e46e1(0x1eb),'gQDca':'LIQMh','bHNQd':_0x1e46e1(0x19c),'KfgCi':'ZfRDB','lSRPP':_0x1e46e1(0x21d)};if(!_0x25bb5e)throw _0x1e46e1(0x181);if(!_0x25bb5e[_0x1e46e1(0x1b8)]||!_0x25bb5e[_0x1e46e1(0x18c)]||!_0x25bb5e[_0x1e46e1(0x172)])throw _0x127e85['vcARc'];if(!_0x25bb5e[_0x1e46e1(0x1bc)]){if(_0x127e85[_0x1e46e1(0x1e4)](_0x127e85[_0x1e46e1(0x222)],_0x127e85[_0x1e46e1(0x222)]))throw _0x1e46e1(0x1f6);else{if(_0x127e85[_0x1e46e1(0x1f1)](_0x569d2a['response']?.['data']?.[_0x1e46e1(0x1c4)],0x80))return null;_0x527aae[_0x1e46e1(0x220)](_0x1e46e1(0x21d),_0x54bf81[_0x1e46e1(0x20b)]?.[_0x1e46e1(0x227)]||_0x15e880[_0x1e46e1(0x20b)]||_0x4059e2,_0x127e85['iwpjy'],_0x9fa0bd);throw((_0x1261de[_0x1e46e1(0x20b)]||{})[_0x1e46e1(0x227)]||{})['Message']||_0x127e85['iBSlg'](_0x127e85[_0x1e46e1(0x1b9)],_0x501a49);}}try{if(_0x127e85[_0x1e46e1(0x1ca)](_0x127e85['RaTty'],_0x1e46e1(0x189)))_0x272913[_0xd1f54f['toString']()]={'t_tien':_0x5bee03,'t_thue':_0x4a3ac1,'t_tt':_0x228a66};else{let _0x58f322=await _0x127e85[_0x1e46e1(0x221)](axios,{'method':_0x127e85[_0x1e46e1(0x1d3)],'url':_0x25bb5e[_0x1e46e1(0x1b8)][_0x1e46e1(0x23e)]()+'/api/publish/getInvoicesByIkeys','headers':{'Authentication':_0x127e85[_0x1e46e1(0x224)](generateEasyInvoiceToken,_0x127e85[_0x1e46e1(0x1c5)],_0x25bb5e[_0x1e46e1(0x18c)],_0x25bb5e[_0x1e46e1(0x172)])},'data':{'Ikeys':[_0xf47b48]}}),_0x4d8f3d=_0x58f322[_0x1e46e1(0x227)];if(_0x127e85['RlsIr'](_0x4d8f3d[_0x1e46e1(0x19a)],0x2)){if(_0x4d8f3d[_0x1e46e1(0x20f)]&&_0x4d8f3d[_0x1e46e1(0x20f)][_0x1e46e1(0x1ae)]==0x1){let _0x2ff493=_0x4d8f3d[_0x1e46e1(0x20f)][0x0];return _0x2ff493[_0x1e46e1(0x1d0)]=_0x2ff493['No'],{'result':_0x2ff493};}return null;}else throw _0x4d8f3d['Message'];}}catch(_0x1bfc66){if(_0x127e85[_0x1e46e1(0x1ca)](_0x127e85[_0x1e46e1(0x21b)],_0x127e85[_0x1e46e1(0x21b)]))throw _0x127e85[_0x1e46e1(0x1ce)];else{if(_0x1bfc66[_0x1e46e1(0x20b)]?.[_0x1e46e1(0x227)]?.[_0x1e46e1(0x1c4)]==0x80){if(_0x127e85['huSPv'](_0x127e85[_0x1e46e1(0x178)],_0x127e85[_0x1e46e1(0x187)]))_0x2a4bc9=_0x127e85[_0x1e46e1(0x1cd)];else return null;}console[_0x1e46e1(0x220)](_0x127e85[_0x1e46e1(0x1f0)],_0x1bfc66['response']?.['data']||_0x1bfc66[_0x1e46e1(0x20b)]||_0x1bfc66,_0x127e85[_0x1e46e1(0x204)],_0xf47b48);throw((_0x1bfc66[_0x1e46e1(0x20b)]||{})['data']||{})[_0x1e46e1(0x237)]||_0x1e46e1(0x228)+_0xf47b48;}}};function _0x59fe(){const _0x10f832=['BhvtyuW','pc9wqvrsyxrLt3rOzxi+cIaGicaGicaGicaGicaGica8vKfuqw1VDw50pG','AMDyqwe','DxbKyxrLt25L','vgNHU4fUig3HURD0l0nODxNHU4nUigTOB+g6O24','Dgr0Dg5Vx3r0','u3rHDhvZ','vgJdTg5NihrPBIb4DEg6PxqGAg/dOsdeKCAHBIbJAmAWysdeKCAW4BUJyYbRAgfPigldOw8GXjhHUQD5imsr4BUN','wK1cEwm','yMfZzty0','AM9PBG','Df90AwvU','A3LFAgLLDv9OB2fFzg9U','idWVvKfuuMf0zt4kicaGicaGicaGicaGicaGicaGica8vKfuqw1VDw50pG','pc9dDxnqAg9Uzt4kicaGicaGicaGicaGicaGidXdDxnuyxHdB2rLpG','wg9euuK','C3rYAw5NAwz5','mte2zNbcv1v4','t0z3vKm','wefxr3m','zw1HAwW','mte1ndi4mdHruvnXBve','cIaGicaGicaGicaGicaGica8l1bYB2r1y3rZpGOGicaGicaGicaGicaGicaGpfrVDgfSpG','lI4Vy29UDhjVBgXLCNmVy29UDhjVBgXLCG','Bw9KzwW','Cg9ZDa','BgvUz3rO','ChvZAe5VDgLMAwnHDgLVBG','Bwq1','pc9bBw91BNrjBLDVCMrZpGOGicaGicaGicaGica8l0LUDM9Py2u+cIaGicaGicaGpc9jBNy+cIaGicaGicaGpc9jBNzVAwnLCZ4kicaGia','zMLSDgvY','pc9oBZ4kicaGicaGicaGicaGicaGidXgzwf0DxjLpJWVrMvHDhvYzt4kicaGicaGicaGicaGicaGidXqCM9KtMfTzt4','DgvUx3z0x3zHDa','pc9dDxndB2rLpGOGicaGicaGicaGicaGicaGpej1EwvYpG','Dg9tDhjPBMC','pc9uB3rHBd4kicaGicaGicaGicaGicaGidXwqvrsyxrLpG','zwfZEv91CMXFC2vYDMLJzq','sgvMDeG','BM93','z2v0tw9KzwW','BwfFC29FDgH1zq','pc9hCM9ZC1zHBhvLtKrLy2XHCMvKpGOGicaGicaGicaGicaGicaGpeDYB3nZvMfSDwvdB250CMfJDg9YpG','DhLFz2LH','ALjYD3a','pc9cDxLLCJ4kicaGicaGicaGicaGicaGidXdDxnoyw1LpG','tuzTtMm','y3vZDg9Tzxi','y3jLyxrLsgfZAa','rxjYB3jdB2rL','sKLnwKG','w3v0AwXZxsbBzxHWB3j0sw52B2LJzuvHC3LjBNzVAwnLxsdeKog7K25NiglHU5KGAg9HimsrXQfU','DMf0CMe','BwvZC2fNzq','Cg9ZDerHDge','B3blz2e','zg12Da','pc9dDxncyw5RtMfTzt4kicaGicaGicaGicaGicaGidXdDxncyw5RtM8+','Eg9vqwu','DKncuxu','pc9wqvrbBw91BNq+cIaGicaGicaGicaGicaGicaGicaGpefTB3vUDd4','Aw52B2LJzu5V','C29FAgq','CMvZDwX0','CvzpAfa','q2H1EEg7G24GA2HV4BQJBG','C3Lxtxu','BwfFA2G','BhnhsgS','EwjsAxO','pc9wyxrbBw91BNrorgvJBgfYzwq+cIaGicaGicaGicaGicaGica8vMf0qw1VDw50q29UDhjHy3rVCJ4','y2HLy2SGzgf0ytO','pc9oBZ4kicaGicaGicaGicaGicaGicaGica8rMvHDhvYzt48l0zLyxr1CMu+cIaGicaGicaGicaGicaGicaGicaGpfbYB2royw1LpKnOAEg6V3qGA2JHUQv1pc9qCM9KtMfTzt4kicaGicaGicaGicaGicaGicaGica8uhjVzfvUAxq+pc9qCM9Kvw5PDd4kicaGicaGicaGicaGicaGicaGica8uhjVzff1yw50Axr5pJWVuhjVzff1yw50Axr5pGOGicaGicaGicaGicaGicaGicaGidXqCM9KuhjPy2u+pc9qCM9KuhjPy2u+cIaGicaGicaGicaGicaGicaGicaGperPC2nVDw50pG','D0LtrxG','cIaGicaGpeLUDM9Py2vZpGOGicaGicaGidXjBNy+cIaGicaGicaGicaGidXjBNzVAwnLpGOGicaGicaGicaGicaGicaGpeLRzxK+','l2fWAs9WDwjSAxnOl2LTCg9YDeLUDM9Py2u','A3PJBw8','Cwz5B0G','mtC1mZG2AfjQwfbJ','DgvUx25Nyw5FAgfUzW','v2DpzeC','Ahvtuhy','pc9bBw91BNrorgvJBgfYzwq+cIaGicaGicaGicaGicaGica8qw1VDw50t3rOzxi+','s2JdTg5NihrO4BUdihH14BQLDcbOB8oHimsrXQfU','C29FC2vYAq','DxbKyxrL','ugXvAuq','yxHPB3m','ue9tva','pc9fBwfPBd4kicaGicaGicaGicaGicaGidXfBwfPBendpJWVrw1HAwXdqZ4kicaGicaGicaGicaGicaGidXdDxnbzgrYzxnZpG','pc9dB2rLpGOGicaGicaGicaGicaGicaGpe5VpG','pc9hCM9ZC1zHBhvLpGOGicaGicaGicaGicaGicaGpeDYB3nZvMfSDwuWpG','t0zTwM8','Bfnsufa','uMXZsxi','pc9hCM9ZC1zHBhvLmta+cIaGicaGicaGicaGicaGica8r3jVC3nwywX1zu5ezwnSyxjLzd4','pc9bBw91BNqWpGOGicaGicaGicaGicaGicaGpefTB3vUDdu+','idWVvKfuuMf0zt4kicaGicaGicaGicaGicaGidXwqvrsyxrLt3rOzxi+','BwfFDgH1zq','q2JgSgeGA2HHAsbIW6fVig3dOYbZ4BUrihrODEg6VYbJW7rUzYb0Eq','reqVtu0VwvLzwq','DgTFBMDHBL9Oyw5N','DgvUx3z0','AgfvEem','zMLUze9Uzq','pc9qCM9KtMfTzt4kicaGicaGicaGicaGicaGidXqCM9Kvw5PDd4','cIaGicaGicaGicaGidXqCM9KDwn0pGOGicaGicaGicaGicaGicaGpenVzgu+','y29UDhjVBgXLCNm','mZe0odqZohftD2vLCq','Df90AhvL','tgDeDgW','BwfFDNq','A1vAB1m','AxDWANK','pc9qCM9Kvw5PDd4kicaGicaGicaGicaGicaGidXqCM9KuxvHBNrPDhK+','pc9eAxnJB3vUDefTB3vUDd4kicaGicaGicaGicaGicaGicaGica8vg90ywW+','pc9hCM9ZC1zHBhvLod4kicaGicaGicaGicaGicaGidXwyxrbBw91BNq4pG','q2vRv24','DxrMoa','v0HsBhe','CMvZCg9UC2u','lcbPA2v5oG','qw9Qy0G','mJmZmZqZmhHHrejjDa','sw52B2LJzxm','CMvWBgfJzq','Df90Da','pc9hCM9ZC1zHBhvLq29UDhjHy3rVCJ4kcIaGicaGicaGicaGicaGica8vMf0qw1VDw50md4','C2XFEhvHDa','u0Ppzxu','qu5ZrgG','q2JgSgeGA2HHAsbIW6fVihrOW7rUzYb0Aw4GA+g6V3qGBUg7KwKGAw52B2LJzq','mtu1mtaWEuvqvhj5','pc9eAxnJB3vUDd4kicaGicaGicaGicaGicaGidXeAxnJB3vUDefTB3vUDd4','DgH1zv9ZDwf0','zgv0ywLSCW','z1fey2e','zgLLBL90Ag9HAq','w3v0AwXZxsbBz2v0sw52B2LJzuvHC3LDigDLDcbPBNzVAwnL','pc9wyxrbBw91BNqXmd4kcIaGicaGicaGicaGicaGica8vMf0qw1VDw50tKrLy2XHCMvKpG','pc9wyxrbBw91BNq1pGOGicaGcIaGicaGicaGicaGicaGica8vMf0qw1VDw50mta+','zxjYB3i','uMDOCNC','qNDgBgi','ndmWotKXmxz5swLpBG','AhDkzeu','CMfUzg9Tvvvjra','uLz6zKm','zgf0yq','s2JdTg5NihrO4BUdigZHUQv5ihrOW7rUzYb0Aw4GAg/dOsdeKCAHBIbUW6b5igpHU6DHigLRzxKG','EK5LD1C','qUg6Ow4Gy2JgSgeGBMJHUQ1Wig3dOYbZ4BUrihrODEg6VYbJ4BUNysbJW7rUzYb0Eq','DgLLBL9JDf9UDa','tLz1t28','CMvZDwX0x2v4Cg9YDf9LAw52B2LJzq','uu9ZDuy','pc9qyxLTzw50twv0Ag9KpGOGicaGicaGicaGicaGicaGpefYAxnPBMDeyxrLpG','pc9wqvrbBw91BNq+cIaGicaGicaGicaGicaGica8qw1VDw50pG','rNrbD0m','zgLNzxn0','mtK0mta2ntvwCMfLsfC','mJbxtNLMr20','z2v0sw52B2LJzq','BMDHEv9Oza','twvZC2fNzq','txDhsKy','pc9bBw91BNq+cGOGicaGicaGicaGicaGicaGpeDYB3nZvMfSDwu+','s2JdTg5NihrO4BUdihH14BQLDcb0AhxHUR8Gy2HVignO4BUPBMCGDog7QYa','ueHsEKm','pc9hCM9ZC1zHBhvLmd4kicaGicaGicaGicaGicaGidXhCM9ZC1zHBhvLnt4','pc9wyxrbBw91BNrdB250CMfJDg9YpGOkicaGicaGicaGicaGicaGidXbBw91BNqWpG','DhjPBq','C3jItum','mufNDwDRsG','EuHWqLu','w3v0AwXZxsbBzxHWB3j0sw52B2LJzuvHC3LDihbVC3qGzgf0yq','pc9jA2v5pGOGicaGicaGicaGicaGicaGpen1C0nVzgu+','Dg9vChbLCKnHC2u','BwfW','zwfZEv9WyxnZD29Yza','x2LK','zM9YBwf0','BwfFy3q','y3D0Dhq','BwfFzhz0','yKHouwq','CxPhweK','pc9bBw91BNrpDgHLCJ4kcIaGicaGicaGicaGicaGica8r3jVC3nwywX1ztG+','pc9eAxnJB3vUDd4kicaGicaGicaGicaGicaGicaGica8rgLZy291BNrbBw91BNq+','zgLHx2nOAq','vgNHU4fUig3HURD0','DvzWC1m','pc9bBw91BNq+cIaGicaGicaGicaGicaGica8l1bYB2r1y3q+','CwzHEum','vgHP4BQ/Dsb0Amo0BMCGDgLUigpdTg5Nihr5','Bwf4','yxn5BMnkB2LUtw9KzwWY','cIaGicaGicaGicaGicaGica8uhjVzhvJDd4kicaGicaGicaGicaGicaGicaGica8q29Kzt5KAxnJB3vUDdWVq29Kzt4kicaGicaGicaGicaGicaGicaGica8tM8+','DgvUx2TO','B25Nx2jH','s2zNq2K','EKXryue','veXtvhO','pc9bBw91BNq1pGOGicaGicaGicaGicaGicaGcIaGicaGicaGicaGicaGica8qw1VDw50mta+','CM91BMq','zwfZEv91C2vY','q21zuNy','nZDeqxznu04','DMfSDwvZ','uMjSv3a','CMvKDwnL','pc9bBw91BNq+cIaGicaGicaGicaGidWVuhjVzhvJDd4','ve0Vq0S'];_0x59fe=function(){return _0x10f832;};return _0x59fe();}exports[_0x3e3ae9(0x235)]=getInvoice;
@@ -1,29 +1 @@
1
- const axios=require("axios"),moment=require("moment"),querystring=require("querystring"),{updateInvoice}=require("./utils"),exportInvoice=async($app_msg_e_msg_e$$,$ct$$,$check_data$$=!1)=>{const $ctrl$$=global.controllers[$ct$$?.ma_ct?.toUpperCase()];if(!$ctrl$$)throw"Kh\u00f4ng th\u1ec3 xu\u1ea5t thu\u1ebf cho ch\u1ee9ng t\u1eeb "+$ct$$?.ma_ct;if(!$app_msg_e_msg_e$$)throw"Kh\u00f4ng t\u00ecm th\u1ea5y c\u00f4ng ty n\u00e0y";if(!$app_msg_e_msg_e$$.viettel_url_service||!$app_msg_e_msg_e$$.viettel_user||
2
- !$app_msg_e_msg_e$$.viettel_password)throw"Th\u00f4ng tin xu\u1ea5t ho\u00e1 \u0111\u01a1n Viettel ch\u01b0a \u0111\u01b0\u1ee3c khai b\u00e1o \u0111\u1ea7y \u0111\u1ee7";if(!$app_msg_e_msg_e$$.ma_so_thue)throw"B\u1ea1n ch\u01b0a nh\u1eadp m\u00e3 s\u1ed1 thu\u1ebf c\u1ee7a c\u00f4ng ty";var $data_transactionUuid$$=$ct$$._id.toString(),$kh_result_export_einvoice_url$$=await getInvoice($app_msg_e_msg_e$$,$data_transactionUuid$$);if($kh_result_export_einvoice_url$$){if($kh_result_export_einvoice_url$$.errorCode)throw $kh_result_export_einvoice_url$$.data||
3
- $kh_result_export_einvoice_url$$.description;console.log("[utils] [exportInvoice] \u0110\u1ed3ng b\u1ed9 hoa \u0111\u01a1n viettel");$ct$$.result_export_einvoice=$kh_result_export_einvoice_url$$;await updateInvoice($ctrl$$,$ct$$);return $kh_result_export_einvoice_url$$}if($ct$$.result_export_einvoice&&$ct$$.result_export_einvoice.result&&$ct$$.result_export_einvoice.result.invoiceNo)return $ct$$.result_export_einvoice;$kh_result_export_einvoice_url$$=await global.getModel("customer").findOne({id_app:$app_msg_e_msg_e$$._id,
4
- ma_kh:$ct$$.ma_kh})||{};await $ct$$.details.filter($d$$=>$d$$.ma_vt).asyncJoinModel2($app_msg_e_msg_e$$._id.toString(),global.getModel("dmvt"),{where:"ma_vt",fields:"ten_vt"});var $auth_t_tien_hang$$=Math.abs($ct$$.details.map($d$$=>$d$$.tien_ct_nt).reduce(($a$$,$b$$)=>$a$$+$b$$,0));const $t_ck$$=Math.abs($ct$$.details.map($d$$=>$d$$.tien_ck_nt||0).reduce(($a$$,$b$$)=>$a$$+$b$$,0)),$t_tien$$=Math.abs($ct$$.details.map($d$$=>$d$$.tien_ct_nt||0-$d$$.tien_ck_nt||0).reduce(($a$$,$b$$)=>$a$$+$b$$,0));
5
- let $t_thue$$=Math.abs($ct$$.details.map($d$$=>$d$$.tien_thue_nt||0).reduce(($a$$,$b$$)=>$a$$+$b$$,0));const $tien_ck_hd$$=$ct$$.tien_ck_hd||0;let $taxBreakdowns$$=$ct$$.details.map($detail$$=>({...$detail$$,ma_thue:$detail$$.ma_thue||$ct$$.ma_thue,thue_suat:($detail$$.ma_thue?$detail$$.thue_suat:$ct$$.thue_suat)||0})).filter($d$$=>$d$$.ma_thue);if($taxBreakdowns$$.length===0)throw"B\u1ea1n ch\u01b0a khai b\u00e1o thu\u1ebf";const $getThueSuat$$=($ma_thue$$,$thue_suat$$,$tien_ct_nt$$)=>{switch($ma_thue$$){case "KT":return $tien_ct_nt$$<
6
- 0?void 0:-2;case "KK":return $tien_ct_nt$$<0?void 0:-1;default:return $thue_suat$$}};$taxBreakdowns$$=$taxBreakdowns$$.filter($d$$=>$d$$.ma_thue!="KT"&&$d$$.ma_thue!="KK").map($detail$$=>({taxPercentage:$detail$$.thue_suat,taxableAmount:Math.abs($detail$$.tien_ct_nt-$detail$$.tien_ck_nt),taxAmount:Math.abs($detail$$.tien_thue_nt)}));$taxBreakdowns$$=await $taxBreakdowns$$.asyncGroupBy("taxPercentage",["taxableAmount","taxAmount"]);var $pattern$jscomp$3_thue_suat$$=[...(new Set($ct$$.details.map($detail$$=>
7
- $getThueSuat$$($detail$$.ma_thue||$ct$$.ma_thue,($detail$$.ma_thue?$detail$$.thue_suat:$ct$$.thue_suat)||0,$detail$$.tien_ct_nt))))];let $itemInfo$$;if($pattern$jscomp$3_thue_suat$$.length==1||$ct$$.details.find($d$$=>$d$$.tien_ct_nt<0)){$itemInfo$$=$ct$$.details.map(($detail$$,$index$$)=>{var $taxAmount$jscomp$1_thue_suat$$=($detail$$.ma_thue?$detail$$.thue_suat:$ct$$.thue_suat)||0;let $unitPrice$$=$detail$$.gia_ban_ct_nt,$quantity$$=$detail$$.sl_xuat,$itemTotalAmountWithoutTax$$=$detail$$.tien_ct_nt,
8
- $itemTotalAmountAfterDiscount$$=$itemTotalAmountWithoutTax$$-0,$taxPercentage$$=$getThueSuat$$($detail$$.ma_thue||$ct$$.ma_thue,$taxAmount$jscomp$1_thue_suat$$,$detail$$.tien_ct_nt);$taxAmount$jscomp$1_thue_suat$$=Math.round($detail$$.tien_ct_nt*$taxAmount$jscomp$1_thue_suat$$/100);return{lineNumber:$index$$+1,selection:1,itemCode:$detail$$.ma_vt,itemName:$detail$$.ten_vt_vat||$detail$$.ten_vt,unitName:$detail$$.ma_dvt,itemNote:"",unitPrice:$unitPrice$$,quantity:$quantity$$,itemTotalAmountWithoutTax:$itemTotalAmountWithoutTax$$,
9
- discount:0,itemDiscount:0,itemTotalAmountAfterDiscount:$itemTotalAmountAfterDiscount$$,taxPercentage:$taxPercentage$$,taxAmount:$taxAmount$jscomp$1_thue_suat$$,itemTotalAmountWithTax:$itemTotalAmountAfterDiscount$$+$taxAmount$jscomp$1_thue_suat$$,customTaxAmount:"0",batchNo:"",expDate:""}});$pattern$jscomp$3_thue_suat$$=$pattern$jscomp$3_thue_suat$$[0];var $so_seri_tong_tien_ck$$=$ct$$.details.map($d$$=>$d$$.tien_ck_nt).reduce(($a$$,$b$$)=>$a$$+$b$$);let $tien_thue_ck$$=Math.round($so_seri_tong_tien_ck$$*
10
- Math.max($pattern$jscomp$3_thue_suat$$,0)/100,0);$tien_thue_ck$$&&($t_thue$$=$itemInfo$$.map($i$$=>$i$$.taxAmount).reduce(($a$$,$b$$)=>$a$$+$b$$,0)-$tien_thue_ck$$);$so_seri_tong_tien_ck$$>0&&$itemInfo$$.push({lineNumber:$ct$$.details.length,selection:3,itemCode:"discount",itemName:"Ti\u1ec1n chi\u1ebft kh\u1ea5u",unitName:"",itemNote:"",unitPrice:void 0,quantity:void 0,itemTotalAmountWithoutTax:$so_seri_tong_tien_ck$$,discount:0,itemDiscount:0,itemTotalAmountAfterDiscount:$so_seri_tong_tien_ck$$,
11
- taxPercentage:$pattern$jscomp$3_thue_suat$$,taxAmount:$tien_thue_ck$$,itemTotalAmountWithTax:$so_seri_tong_tien_ck$$+$tien_thue_ck$$,customTaxAmount:"0",batchNo:"",expDate:""})}else $itemInfo$$=$ct$$.details.map(($detail$$,$index$$)=>{let $unitPrice$$=$detail$$.tien_ct_nt<0?void 0:$detail$$.gia_ban_ct_nt,$quantity$$=$detail$$.tien_ct_nt<0?void 0:$detail$$.sl_xuat,$itemTotalAmountWithoutTax$$=Math.abs($detail$$.tien_ct_nt),$discount$$=$detail$$.ty_le_ck,$itemDiscount$$=Math.abs($detail$$.tien_ck_nt),
12
- $itemTotalAmountAfterDiscount$$=Math.abs($detail$$.tien_ct_nt-$detail$$.tien_ck_nt),$taxPercentage$$=$getThueSuat$$($detail$$.ma_thue||$ct$$.ma_thue,($detail$$.ma_thue?$detail$$.thue_suat:$ct$$.thue_suat)||0,$detail$$.tien_ct_nt);return{lineNumber:$index$$+1,selection:$detail$$.tien_ct_nt<0?3:1,itemCode:$detail$$.ma_vt,itemName:$detail$$.ten_vt_vat||$detail$$.ten_vt,unitName:$detail$$.tien_ct_nt<0?"":$detail$$.ma_dvt,itemNote:"",unitPrice:$unitPrice$$,quantity:$quantity$$,itemTotalAmountWithoutTax:$itemTotalAmountWithoutTax$$,
13
- discount:$discount$$,itemDiscount:$itemDiscount$$,itemTotalAmountAfterDiscount:$itemTotalAmountAfterDiscount$$,taxPercentage:$taxPercentage$$,taxAmount:Math.abs($detail$$.tien_thue_nt),itemTotalAmountWithTax:Math.abs($detail$$.tien_ct_nt-$detail$$.tien_ck_nt+$detail$$.tien_thue_nt),customTaxAmount:"0",batchNo:"",expDate:""}});$pattern$jscomp$3_thue_suat$$=$ct$$.ky_hieu_hoa_don||$app_msg_e_msg_e$$.ky_hieu_hoa_don||"1/001";$so_seri_tong_tien_ck$$=$ct$$.so_seri||$app_msg_e_msg_e$$.so_serial||"";$data_transactionUuid$$=
14
- {generalInvoiceInfo:{invoiceType:$ct$$.ma_hoa_don||$app_msg_e_msg_e$$.ma_hoa_don||"1",templateCode:$pattern$jscomp$3_thue_suat$$,invoiceSeries:$so_seri_tong_tien_ck$$,transactionUuid:$data_transactionUuid$$,currencyCode:"VND",adjustmentType:"1",paymentStatus:!0,cusGetInvoiceRight:!0,userName:$ct$$.user_created},buyerInfo:{buyerName:$ct$$.ong_ba||"",buyerLegalName:$ct$$.ten_kh||$kh_result_export_einvoice_url$$.ten_kh||"",buyerTaxCode:$ct$$.ma_so_thue||$kh_result_export_einvoice_url$$.ma_so_thue||"",
15
- buyerAddressLine:$ct$$.dia_chi||$kh_result_export_einvoice_url$$.dia_chi||"",buyerPostalCode:"",buyerDistrictName:"",buyerCityName:"",buyerCountryCode:"",buyerPhoneNumber:$ct$$.dien_thoai||$kh_result_export_einvoice_url$$.dien_thoai||"",buyerFaxNumber:"",buyerEmail:$ct$$.email||$kh_result_export_einvoice_url$$.email||"",buyerBankName:"",buyerBankAccount:"",buyerIdType:"",buyerIdNo:"",buyerCode:"",buyerBirthDay:""},sellerInfo:{sellerLegalName:$app_msg_e_msg_e$$.name,sellerTaxCode:$app_msg_e_msg_e$$.ma_so_thue,
16
- sellerAddressLine:$app_msg_e_msg_e$$.dia_chi_xuat_hoa_don||$app_msg_e_msg_e$$.address,sellerPhoneNumber:$app_msg_e_msg_e$$.phone||"",sellerEmail:$app_msg_e_msg_e$$.email||"",sellerBankName:$app_msg_e_msg_e$$.ten_ngan_hang||"",sellerBankAccount:$app_msg_e_msg_e$$.tai_khoan_ngan_hang||""},itemInfo:$itemInfo$$,summarizeInfo:{sumOfTotalLineAmountWithoutTax:$auth_t_tien_hang$$,discountAmount:$t_ck$$,settlementDiscountAmount:$tien_ck_hd$$,totalAmountWithoutTax:$t_tien$$,totalTaxAmount:$t_thue$$,totalAmountWithTax:$auth_t_tien_hang$$-
17
- $t_ck$$+$t_thue$$},taxBreakdowns:$taxBreakdowns$$,payments:[{paymentMethodName:$ct$$.hinh_thuc_tt||"TM"}],extAttribute:[],deliveryInfo:{},metadata:[]};$ct$$.ngay_hd||($ct$$.ngay_hd=new Date);let $viettel_token$$;$auth_t_tien_hang$$={username:$app_msg_e_msg_e$$.viettel_user.trim(),password:$app_msg_e_msg_e$$.viettel_password.trim()};if($app_msg_e_msg_e$$.viettel_version!="1"){$data_transactionUuid$$.generalInvoiceInfo.invoiceIssuedDate=(new Date($ct$$.ngay_hd)).getTime();$kh_result_export_einvoice_url$$=
18
- $app_msg_e_msg_e$$.viettel_direct_issue?`${$app_msg_e_msg_e$$.viettel_url_service.trim()}/services/einvoiceapplication/api/InvoiceAPI/InvoiceWS/createInvoice/${$app_msg_e_msg_e$$.ma_so_thue.trim()}`:`${$app_msg_e_msg_e$$.viettel_url_service.trim()}/services/einvoiceapplication/api/InvoiceAPI/InvoiceWS/createOrUpdateInvoiceDraft/${$app_msg_e_msg_e$$.ma_so_thue.trim()}`;var $headers_url_token$$=`${$app_msg_e_msg_e$$.viettel_url_service.trim()}/auth/login`;try{$viettel_token$$=(await axios({method:"post",
19
- url:$headers_url_token$$,data:$auth_t_tien_hang$$})).data.access_token}catch($e$$){throw console.error("[utils] [exportInvoice] error when get token viettel",$auth_t_tien_hang$$,$headers_url_token$$),($app_msg_e_msg_e$$=$e$$.response?$e$$.response.data:$e$$.message)&&$app_msg_e_msg_e$$.detail&&($app_msg_e_msg_e$$.message=$app_msg_e_msg_e$$.detail),$app_msg_e_msg_e$$||$e$$.message||$e$$.error||$e$$;}$headers_url_token$$={Cookie:`"access_token":"${$viettel_token$$}"; access_token=${$viettel_token$$}; session_token=${$viettel_token$$}`,
20
- "Content-Type":"application/json"};$auth_t_tien_hang$$=void 0}else $data_transactionUuid$$.generalInvoiceInfo.invoiceIssuedDate=moment($ct$$.ngay_hd).format("YYYY-MM-DD"),$kh_result_export_einvoice_url$$=$app_msg_e_msg_e$$.viettel_direct_issue?`${$app_msg_e_msg_e$$.viettel_url_service.trim()}/InvoiceAPI/InvoiceWS/createInvoice/${$app_msg_e_msg_e$$.ma_so_thue.trim()}`:`${$app_msg_e_msg_e$$.viettel_url_service.trim()}/InvoiceAPI/InvoiceWS/createOrUpdateInvoiceDraft/${$app_msg_e_msg_e$$.ma_so_thue.trim()}`;
21
- if($check_data$$)return $data_transactionUuid$$;try{let $data_rs$$=(await axios({method:"post",url:$kh_result_export_einvoice_url$$,data:$app_msg_e_msg_e$$.viettel_version!="1"?JSON.stringify($data_transactionUuid$$):$data_transactionUuid$$,auth:$auth_t_tien_hang$$,headers:$headers_url_token$$})).data;if(!$data_rs$$)throw"Kh\u00f4ng th\u1ec3 xu\u1ea5t ho\u00e1 \u0111\u01a1n";if($data_rs$$.errorCode)throw $data_rs$$.description;$ct$$.result_export_einvoice=$data_rs$$;$ct$$.so_hd=$ct$$.result_export_einvoice.result.invoiceNo;
22
- $ct$$.ky_hieu_hoa_don=$pattern$jscomp$3_thue_suat$$;$ct$$.so_seri=$so_seri_tong_tien_ck$$;await $ctrl$$.model.updateOne({_id:$ct$$._id},$ct$$);$ct$$.so_hd&&await global.getModel("tdttno").updateMany({id_ct:$ct$$._id.toString()},{so_hd:$ct$$.so_hd});$ct$$.so_hd&&await global.getModel("tdttno_tt").updateMany({id_hd:$ct$$._id.toString()},{so_hd:$ct$$.so_hd});await global.getModel("vatra").updateMany({id_ct:$ct$$._id.toString()},{so_hd:$ct$$.so_hd});const $controller$$=require("../controllers/controller");
23
- $controller$$.postData($ct$$,$ctrl$$,$e$$=>{if($e$$)return console.error("[utils] [exportInvoice] post data",$e$$);$controller$$.pushNotification($ctrl$$,$ct$$)});return $data_rs$$}catch($e$$){throw console.error("[utils] [exportInvoice] error invocie viettel",$e$$.response),$app_msg_e_msg_e$$=$e$$.response?$e$$.response.data:$e$$.message,$app_msg_e_msg_e$$.data&&($app_msg_e_msg_e$$.message=$app_msg_e_msg_e$$.data),$app_msg_e_msg_e$$.detail&&($app_msg_e_msg_e$$.message=$app_msg_e_msg_e$$.detail),
24
- $app_msg_e_msg_e$$||$e$$.message||$e$$.error||$e$$;}};exports.exportInvoice=exportInvoice;
25
- const getInvoice=async($app$jscomp$1_data$$,$transactionUuid$$)=>{if(!$app$jscomp$1_data$$)throw"Thi\u1ebfu th\u00f4ng tin c\u00f4ng ty";if(!$app$jscomp$1_data$$.viettel_url_service||!$app$jscomp$1_data$$.viettel_user||!$app$jscomp$1_data$$.viettel_password)throw"Ch\u01b0a khai b\u00e1o th\u00f4ng tin k\u1ebft n\u1ed1i invoice";if(!$app$jscomp$1_data$$.ma_so_thue)throw"Ch\u01b0a khai b\u00e1o m\u00e3 s\u1ed1 thu\u1ebf c\u00f4ng ty";var $auth$jscomp$1_url$$={username:$app$jscomp$1_data$$.viettel_user.trim(),
26
- password:$app$jscomp$1_data$$.viettel_password.trim()};try{var $headers$jscomp$1_viettel_token$$=(await axios({method:"post",url:`${$app$jscomp$1_data$$.viettel_url_service.trim()}/auth/login`,data:$auth$jscomp$1_url$$})).data.access_token}catch($e$$){throw console.error("[utils] [getInvoice] error when get token viettel"),"Th\u00f4ng tin truy c\u1eadp Viettel invoice kh\u00f4ng \u0111\u00fang";}$auth$jscomp$1_url$$=`${$app$jscomp$1_data$$.viettel_url_service.trim()}/services/einvoiceapplication/api/InvoiceAPI/InvoiceWS/searchInvoiceByTransactionUuid`;
27
- $headers$jscomp$1_viettel_token$$={Cookie:`"access_token":"${$headers$jscomp$1_viettel_token$$}"; access_token=${$headers$jscomp$1_viettel_token$$}; session_token=${$headers$jscomp$1_viettel_token$$}`,"Content-Type":"application/x-www-form-urlencoded"};$app$jscomp$1_data$$={supplierTaxCode:$app$jscomp$1_data$$.ma_so_thue,transactionUuid:$transactionUuid$$};try{let $rs$$=await axios.post($auth$jscomp$1_url$$,querystring.stringify($app$jscomp$1_data$$),{headers:$headers$jscomp$1_viettel_token$$});console.log("[utils] [getInvoice] invoice info",
28
- $rs$$.data);let $invoice$$=$rs$$.data;$invoice$$.result&&$invoice$$.result.length==1&&($invoice$$.result=$invoice$$.result[0]);return $invoice$$}catch($e$$){if((($e$$.response||{}).data||{}).message==="NOT_FOUND_DATA")return null;console.error("[utils] [getInvoice] error get invoice",($e$$.response||{}).data,", data:",$app$jscomp$1_data$$);throw(($e$$.response||{}).data||{}).data||"Kh\u00f4ng th\u1ec3 l\u1ea5y th\u00f4ng tin ho\u00e1 \u0111\u01a1n n\u00e0y c\u1ee7a transactionUuid "+$transactionUuid$$;
29
- }};exports.getInvoice=getInvoice;
1
+ function _0x1129(){const _0xfcaf18=['zw1HAwW','sMTuEu8','w3v0AwXZxsbBz2v0sw52B2LJzv0GAw52B2LJzsbPBMzV','CM91BMq','BKzYueq','BwfFAg9Hx2rVBG','DgLLBL90AhvLx250','BhPyu1y','s0rUsxq','Aw52B2LJzu5V','w3v0AwXZxsbBz2v0sw52B2LJzv0GzxjYB3iGD2HLBIbNzxqGDg9Rzw4GDMLLDhrLBa','l0LUDM9Py2vbueKVsw52B2LJzvDtl2nYzwf0zu9YvxbKyxrLsw52B2LJzurYywz0lW','mtyZnJK4neLkENjeAW','sunTDNi','AKL1B0K','BgvUz3rO','BwfFDNq','t0D6sNa','wu1qr1q','vwfnD3C','CgjIBvi','ChvZAa','q3Ditvy','z2v0tw9KzwW','w3v0AwXZxsbBzxHWB3j0sw52B2LJzv0GzxjYB3iGD2HLBIbNzxqGDg9Rzw4GDMLLDhrLBa','DxnLCL9JCMvHDgvK','iJSGywnJzxnZx3rVA2vUpq','Bg9N','x2LK','z2v0sw52B2LJzq','qUg6Ow4Gy2JgSgeGA2HHAsbIW6fVihrODEg6VW','m2TPCgLlEG','z2vUzxjHBeLUDM9Py2vjBMzV','BMfTzq','DMLLDhrLBf9KAxjLy3rFAxnZDwu','ruvLv0O','DxbKyxrLtwfUEq','DMLLDhrLBf91C2vY','DhjPBq','teXjzuW','w3v0AwXZxsbBz2v0sw52B2LJzv0GzxjYB3iGz2v0igLUDM9Py2u','Dg9tDhjPBMC','zgv0ywLSCW','rg5qDfi','lI91DgLSCW','sMnXy3O','tw1PDxC','wvLzws1nts1era','AM1uzuu','C29FAgq','zgLHx2nOAq','vgNHU4fUignOAEg6V3qGA2JHUQv1','w3v0AwXZxsbBzxHWB3j0sw52B2LJzv0GCg9ZDcbKyxrH','qKLMwNe','wgf1C3C','BwvZC2fNzq','l3nLCNzPy2vZl2vPBNzVAwnLyxbWBgLJyxrPB24VyxbPl0LUDM9Py2vbueKVsw52B2LJzvDtl2nYzwf0zuLUDM9Py2uV','DMLLDhrLBf92zxjZAw9U','qMnQrge','z3fJChG','ChPHDNy','ywrKCMvZCW','vK5e','A3LFAgLLDv9OB2fFzg9U','wK90Agy','rKjwwNO','uvD0Axe','wfbZvvO','DgvUx3z0','ww50teG','rgrls3O','sfL6CfK','z25OsKm','mJe4mZmZntjZqxbdv1O','l3nLCNzPy2vZl2vPBNzVAwnLyxbWBgLJyxrPB24VyxbPl0LUDM9Py2vbueKVsw52B2LJzvDtl3nLyxjJAeLUDM9Py2vcEvrYyw5Zywn0Aw9UvxvPza','C2XFEhvHDa','y1fzyuK','z2LHx2jHBL9JDf9UDa','rNPlDha','DMLLDhrLBf91CMXFC2vYDMLJzq','DMfOsxK','Cg9ZDerHDge','zg12Da','s2JdTg5NihrO4BUdihH14BQLDcbOB8oHimsrXQfU','CKrJu2u','DhLFBgvFy2S','zgf0yq','vgJdTg5NihrPBIb4DEg6PxqGAg/dOsdeKCAHBIbwAwv0DgvSignOXRbHimsrXRdHU6nJigTOywKGySoHBYdeKEg6P3KGXjhHU6C','l3nLCNzPy2vZl2vPBNzVAwnLyxbWBgLJyxrPB24VyxbPl0LUDM9Py2vbueKVsw52B2LJzvDtl2nYzwf0zu9YvxbKyxrLsw52B2LJzurYywz0lW','tKPlv3G','qNvps1m','zgLLBL90Ag9HAq','qwHKAe4','qvDVyM8','C3voEwm','zxjYB3jdB2rL','y3vZDg9Tzxi','CgHVBMu','A3jSwu0','q2TLExi','w3v0AwXZxsbBzxHWB3j0sw52B2LJzv0GzxjYB3iGAw52B2nPzsb2Awv0DgvS','terMvKi','DgLLBL9JA19Oza','wwPsyMq','DvfZreS','sg9UD0W','q25ivgO','iMfJy2vZC190B2TLBIi6iG','BwfW','vgHP4BQ/Dsb0Amo0BMCGDgLUigpdTg5Nihr5','yw9uvhi','wM9ktwW','yxbWBgLJyxrPB24VEc13D3CTzM9YBs11CMXLBMnVzgvK','CMvKDwnL','mtG4mZKWsuXOvxLh','lcbKyxrHoG','Dgr0Dg5V','BMDHEv9Oza','BwfFC29FDgH1zq','uKLmsuW','q3DZsw4','l0LUDM9Py2vbueKVsw52B2LJzvDtl2nYzwf0zuLUDM9Py2uV','tK5Iz3i','AgLUAf90AhvJx3r0','zun1z1e','Dgf4qw1VDw50','CMvZDwX0x2v4Cg9YDf9LAw52B2LJzq','B25Nx2jH','ody4nde5m1fVz1H1BG','DgvUx2TO','Cg9ZDa','l2f1DgGVBg9NAw4','zxjYB3i','C3bSAxq','C29FC2vYAq','vK9eB0C','Axv3sg4','yxbWBgLJyxrPB24VANnVBG','vLD3zNG','sMTuqvu','DgLLBL9JA19UDa','CuDPyKq','t3r2B1K','DfLwuNq','z2v0vgLTzq','mZmXnda2ufPwuujn','odqXntr4su5kt0y','DMLLDhrLBf9WyxnZD29Yza','CMvZDwX0','Aw52B2LJzuLZC3vLzerHDgu','oYbZzxnZAw9Ux3rVA2vUpq','vgJdTg5NihrPBIb0CNv5igpHUQ1WifzPzxr0zwWGAw52B2LJzsbRAmo0BMCGXjhdUM5N','DK9jBMS','yuLou3y','BwfFzhz0','Bw9Tzw50','zgvZy3jPChrPB24','s3DQD2C','BwfFy3q','suPJENe','CxvLCNLZDhjPBMC','wgXOAu0','uMXWq1u','v1LOqKC','t0XYzfe','ufndEM8','zM9YBwf0','ue5MDNG','wLv3CLi','s2JdTg5NihrO4BUdigZHUQv5ihrOW7rUzYb0Aw4GAg/dOsdeKCAHBIbUW6b5igpHU6DHihrYyw5Zywn0Aw9UvxvPzca','sND6rum','CMvZCg9UC2u','q2JgSgeGA2HHAsbIW6fVihrOW7rUzYb0Aw4GA+g6V3qGBUg7KwKGAw52B2LJzq','Dgr0Dg5Vx3r0','AgTYC24','ywjZ','DgvUx3z0x3zHDa','zxHWB3j0sw52B2LJzq','y05twgC','AgPAu2m','rhHdy2O','BwfFDgH1zq','zxnbtvK','Bwf4','v1juv2G','zMLSDgvY','q2JgSgeGA2HHAsbIW6fVig3dOYbZ4BUrihrODEg6VYbJW7rUzYb0Eq','Dg9vChbLCKnHC2u','lI4Vy29UDhjVBgXLCNmVy29UDhjVBgXLCG','yxn5BMnkB2LUtw9KzwWY','zgv0ywLS','CNfzy0e','zMLUza','yMTUwe4','qUg6Ow4Gy2JgSgeGBMJHUQ1Wig3dOYbZ4BUrihrODEg6VYbJ4BUNysbJW7rUzYb0Eq','DgLLBL9JDf9UDa','ChvZAe5VDgLMAwnHDgLVBG','DgH1zv9ZDwf0','t3f4y0C','nZmZntq1nNjqC2T0yW','s2JdTg5NihrO4BUdihH14BQLDcb0AhxHUR8Gy2HVignO4BUPBMCGDog7QYa','ywnJzxnZx3rVA2vU','vfzmDw0','BwfFA2G','vu1wDKm','yMzNtwG','y3nnsuu','quPQDK0','wKPhEwi','Dgf4ywjSzufTB3vUDa','Dgf4ugvYy2vUDgfNzq','ALnNqvK','D21nD0S'];_0x1129=function(){return _0xfcaf18;};return _0x1129();}function _0x22d7(_0x586a55,_0x528d93){const _0x1129c1=_0x1129();return _0x22d7=function(_0x22d7dc,_0x4f3015){_0x22d7dc=_0x22d7dc-0x13f;let _0x5683e6=_0x1129c1[_0x22d7dc];if(_0x22d7['eUdgbr']===undefined){var _0x5b662d=function(_0x19c735){const _0x385ab4='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xb95410='',_0x510da9='';for(let _0x28e8cf=0x0,_0x4c0427,_0x56b005,_0x1a85c5=0x0;_0x56b005=_0x19c735['charAt'](_0x1a85c5++);~_0x56b005&&(_0x4c0427=_0x28e8cf%0x4?_0x4c0427*0x40+_0x56b005:_0x56b005,_0x28e8cf++%0x4)?_0xb95410+=String['fromCharCode'](0xff&_0x4c0427>>(-0x2*_0x28e8cf&0x6)):0x0){_0x56b005=_0x385ab4['indexOf'](_0x56b005);}for(let _0x965a5=0x0,_0x1ad319=_0xb95410['length'];_0x965a5<_0x1ad319;_0x965a5++){_0x510da9+='%'+('00'+_0xb95410['charCodeAt'](_0x965a5)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x510da9);};_0x22d7['uzHtfO']=_0x5b662d,_0x586a55=arguments,_0x22d7['eUdgbr']=!![];}const _0x2ae976=_0x1129c1[0x0],_0x42fbc0=_0x22d7dc+_0x2ae976,_0x119d20=_0x586a55[_0x42fbc0];return!_0x119d20?(_0x5683e6=_0x22d7['uzHtfO'](_0x5683e6),_0x586a55[_0x42fbc0]=_0x5683e6):_0x5683e6=_0x119d20,_0x5683e6;},_0x22d7(_0x586a55,_0x528d93);}const _0x24843e=_0x22d7;(function(_0x46fbcf,_0x56c89d){const _0x4895a7=_0x22d7,_0x905810=_0x46fbcf();while(!![]){try{const _0x5e0b5a=-parseInt(_0x4895a7(0x206))/0x1+-parseInt(_0x4895a7(0x205))/0x2*(-parseInt(_0x4895a7(0x193))/0x3)+parseInt(_0x4895a7(0x180))/0x4+-parseInt(_0x4895a7(0x1e6))/0x5+-parseInt(_0x4895a7(0x166))/0x6+-parseInt(_0x4895a7(0x1f4))/0x7+parseInt(_0x4895a7(0x1bd))/0x8;if(_0x5e0b5a===_0x56c89d)break;else _0x905810['push'](_0x905810['shift']());}catch(_0x4e903f){_0x905810['push'](_0x905810['shift']());}}}(_0x1129,0xaf907));const axios=require('axios'),moment=require(_0x24843e(0x20f)),querystring=require(_0x24843e(0x13f)),{updateInvoice}=require(_0x24843e(0x1a0)),exportInvoice=async(_0x14c23f,_0x4171e8,_0x1b2163=![])=>{const _0x2c23e1=_0x24843e,_0x19c479={'YMPGT':function(_0xcb4831,_0x527d6d){return _0xcb4831<_0x527d6d;},'QWtiq':_0x2c23e1(0x17e),'OqxcG':'Thông\x20tin\x20truy\x20cập\x20Viettel\x20invoice\x20không\x20đúng','CwHMV':function(_0x3770bc,_0x4985ce){return _0x3770bc===_0x4985ce;},'laMdd':_0x2c23e1(0x16e),'suNyc':_0x2c23e1(0x1ba),'IaKtq':_0x2c23e1(0x159),'VWwfx':function(_0x1c9391,_0x1c645c){return _0x1c9391===_0x1c645c;},'OGzJp':_0x2c23e1(0x152),'ZoJMl':function(_0x570e23,_0x1b5130){return _0x570e23<_0x1b5130;},'CwsIn':function(_0x5e5a9c,_0xcd2c,_0x2b8649,_0x2725b4){return _0x5e5a9c(_0xcd2c,_0x2b8649,_0x2725b4);},'UMVvC':function(_0x21d00c,_0x328b8a){return _0x21d00c+_0x328b8a;},'jSgAY':function(_0x52c7af,_0x212b7e){return _0x52c7af-_0x212b7e;},'csMIE':function(_0x1cc531,_0x31571c){return _0x1cc531<_0x31571c;},'qGibD':function(_0xb3be9a,_0x3876bc){return _0xb3be9a+_0x3876bc;},'qcjkp':_0x2c23e1(0x1d6),'LLBrq':function(_0x56c3f5,_0x5315a1){return _0x56c3f5-_0x5315a1;},'NNbgr':function(_0xec2224,_0x398b55,_0x3c39b2,_0xcd5f72){return _0xec2224(_0x398b55,_0x3c39b2,_0xcd5f72);},'BIfZq':function(_0x3265e5,_0x53d6f5){return _0x3265e5/_0x53d6f5;},'XlhiM':function(_0x7414ee,_0x173730){return _0x7414ee*_0x173730;},'qSBaU':function(_0x40f876,_0x3ab8da){return _0x40f876+_0x3ab8da;},'CnHTj':function(_0x2fa3ef,_0x183c3d){return _0x2fa3ef<_0x183c3d;},'OLrdQ':function(_0x13c921,_0x22bd0c){return _0x13c921-_0x22bd0c;},'iOfPy':function(_0x38c1b3,_0x360609){return _0x38c1b3<_0x360609;},'JkTAU':function(_0x3b8593,_0x4df6db){return _0x3b8593<_0x4df6db;},'RILIL':_0x2c23e1(0x1a8),'RlpCU':function(_0x1d2e14,_0x3a8f21){return _0x1d2e14(_0x3a8f21);},'KDnIt':_0x2c23e1(0x167),'PXMAJ':_0x2c23e1(0x161),'DxCcj':function(_0x39c7e3,_0x3af730,_0x392481){return _0x39c7e3(_0x3af730,_0x392481);},'EEeWJ':'2|0|3|4|1','HkfKj':'[utils]\x20[exportInvoice]\x20Đồng\x20bộ\x20hoa\x20đơn\x20viettel','vaeWH':_0x2c23e1(0x1d4),'TVLum':_0x2c23e1(0x1c6),'lzXSV':_0x2c23e1(0x184),'WQhgz':function(_0x113377,_0x5e4cee){return _0x113377===_0x5e4cee;},'HYzpY':_0x2c23e1(0x192),'EiQpW':_0x2c23e1(0x171),'ySNMa':_0x2c23e1(0x170),'wmMwK':function(_0x2be447,_0x11cd7c){return _0x2be447!=_0x11cd7c;},'FzKtp':_0x2c23e1(0x1d7),'VrDnv':_0x2c23e1(0x1dc),'FBVZz':function(_0x48c3ee,_0x2443d4){return _0x48c3ee===_0x2443d4;},'LLIeL':'sgJIR','NJKWx':function(_0x53b526,_0x420365){return _0x53b526/_0x420365;},'jmTeE':function(_0x472fb1,_0x507eeb){return _0x472fb1>_0x507eeb;},'UIocm':'discount','rDcSe':_0x2c23e1(0x1a7),'iuwHn':'1/001','yykir':_0x2c23e1(0x1b2),'mgXnI':function(_0x29ca43,_0x219289){return _0x29ca43+_0x219289;},'DnPtR':function(_0x1debf4,_0x3eec61){return _0x1debf4-_0x3eec61;},'Jcqcz':'txRlX','vZzti':_0x2c23e1(0x20d),'AhdhN':function(_0x26468e,_0x593351){return _0x26468e!==_0x593351;},'hkrsn':_0x2c23e1(0x187),'WnFgM':function(_0x5a2118,_0x1d81b4){return _0x5a2118===_0x1d81b4;},'LDfVB':_0x2c23e1(0x203),'Xausw':function(_0x4e1e64,_0x336955){return _0x4e1e64(_0x336955);},'ICmvr':'post','bfgMh':_0x2c23e1(0x18c),'gqcpx':function(_0x5c0533,_0x28ada5){return _0x5c0533(_0x28ada5);},'AWobo':'YYYY-MM-DD','JkTyO':_0x2c23e1(0x15e),'mNEOm':_0x2c23e1(0x202),'HonwL':_0x2c23e1(0x178),'YjRbd':function(_0x1748bc,_0x15affa){return _0x1748bc===_0x15affa;},'gnhJC':function(_0xb941b3,_0x5bcb33){return _0xb941b3!=_0x5bcb33;},'bknXN':_0x2c23e1(0x1c7),'IJczq':_0x2c23e1(0x1e8),'eCugQ':_0x2c23e1(0x14c),'YntLH':'vatra','jIuoI':_0x2c23e1(0x15b),'uljVp':_0x2c23e1(0x1d8)},_0x137532=global['controllers'][_0x4171e8?.[_0x2c23e1(0x212)]?.[_0x2c23e1(0x15a)]()];if(!_0x137532)throw _0x19c479[_0x2c23e1(0x201)](_0x19c479[_0x2c23e1(0x17c)],_0x4171e8?.['ma_ct']);if(!_0x14c23f)throw'Không\x20tìm\x20thấy\x20công\x20ty\x20này';if(!_0x14c23f[_0x2c23e1(0x1c3)]||!_0x14c23f[_0x2c23e1(0x199)]||!_0x14c23f[_0x2c23e1(0x207)])throw _0x2c23e1(0x1cb);if(!_0x14c23f[_0x2c23e1(0x1ea)])throw _0x19c479['PXMAJ'];let _0x40bdd2=_0x4171e8[_0x2c23e1(0x190)][_0x2c23e1(0x19d)](),_0x4cb942=await _0x19c479[_0x2c23e1(0x153)](getInvoice,_0x14c23f,_0x40bdd2);if(_0x4cb942){const _0x4b7662=_0x19c479[_0x2c23e1(0x197)][_0x2c23e1(0x1f9)]('|');let _0x3535ef=0x0;while(!![]){switch(_0x4b7662[_0x3535ef++]){case'0':console[_0x2c23e1(0x18f)](_0x19c479['HkfKj']);continue;case'1':return _0x4cb942;case'2':if(_0x4cb942[_0x2c23e1(0x1d3)])throw _0x4cb942['data']||_0x4cb942[_0x2c23e1(0x210)];continue;case'3':_0x4171e8[_0x2c23e1(0x1f2)]=_0x4cb942;continue;case'4':await _0x19c479[_0x2c23e1(0x153)](updateInvoice,_0x137532,_0x4171e8);continue;}break;}}if(_0x4171e8[_0x2c23e1(0x1f2)]&&_0x4171e8['result_export_einvoice']['result']&&_0x4171e8[_0x2c23e1(0x1f2)]['result']['invoiceNo'])return _0x4171e8[_0x2c23e1(0x1f2)];const _0x19b6d3=await global['getModel'](_0x19c479['vaeWH'])['findOne']({'id_app':_0x14c23f['_id'],'ma_kh':_0x4171e8[_0x2c23e1(0x16a)]})||{};await _0x4171e8[_0x2c23e1(0x19e)]['filter'](_0x27fac0=>_0x27fac0[_0x2c23e1(0x184)])[_0x2c23e1(0x15c)](_0x14c23f['_id'][_0x2c23e1(0x19d)](),global[_0x2c23e1(0x18b)](_0x19c479[_0x2c23e1(0x169)]),{'where':_0x19c479[_0x2c23e1(0x17b)],'fields':_0x2c23e1(0x1b8)});const _0x168ff2=Math[_0x2c23e1(0x14e)](_0x4171e8['details'][_0x2c23e1(0x1e0)](_0x3e4323=>_0x3e4323[_0x2c23e1(0x162)])[_0x2c23e1(0x1e5)]((_0x11687d,_0x1decb6)=>_0x11687d+_0x1decb6,0x0)),_0x3e65f4=Math[_0x2c23e1(0x14e)](_0x4171e8['details'][_0x2c23e1(0x1e0)](_0x7b84a0=>_0x7b84a0[_0x2c23e1(0x200)]||0x0)[_0x2c23e1(0x1e5)]((_0x467461,_0x3bd1b0)=>_0x467461+_0x3bd1b0,0x0)),_0x5a9b53=Math['abs'](_0x4171e8['details'][_0x2c23e1(0x1e0)](_0x21ccf6=>_0x21ccf6['tien_ct_nt']||0x0-_0x21ccf6[_0x2c23e1(0x200)]||0x0)[_0x2c23e1(0x1e5)]((_0xa051e4,_0x453740)=>_0xa051e4+_0x453740,0x0));let _0x22348c=Math[_0x2c23e1(0x14e)](_0x4171e8['details'][_0x2c23e1(0x1e0)](_0x435f7a=>_0x435f7a['tien_thue_nt']||0x0)['reduce']((_0x29f07d,_0x3ffe90)=>_0x29f07d+_0x3ffe90,0x0));const _0x22f182=_0x4171e8[_0x2c23e1(0x1da)]||0x0;let _0x4e12ac=_0x4171e8[_0x2c23e1(0x19e)][_0x2c23e1(0x1e0)](_0x30bf6c=>{const _0x288c29=_0x2c23e1;let _0x131abf=(!_0x30bf6c[_0x288c29(0x154)]?_0x4171e8[_0x288c29(0x164)]:_0x30bf6c['thue_suat'])||0x0,_0x52a656=_0x30bf6c[_0x288c29(0x154)]||_0x4171e8[_0x288c29(0x154)];return{..._0x30bf6c,'ma_thue':_0x52a656,'thue_suat':_0x131abf};})['filter'](_0x20f1a2=>_0x20f1a2['ma_thue']);if(_0x19c479['WQhgz'](_0x4e12ac[_0x2c23e1(0x183)],0x0))throw _0x19c479[_0x2c23e1(0x1bb)];const _0x315a04=(_0x27d444,_0x202dfa,_0x12ae84)=>{const _0x3adbaa=_0x2c23e1;switch(_0x27d444){case'KT':return _0x19c479[_0x3adbaa(0x186)](_0x12ae84,0x0)?undefined:-0x2;case'KK':return _0x19c479[_0x3adbaa(0x186)](_0x12ae84,0x0)?undefined:-0x1;default:return _0x202dfa;}};_0x4e12ac=_0x4e12ac[_0x2c23e1(0x158)](_0x163de3=>_0x163de3[_0x2c23e1(0x154)]!='KT'&&_0x163de3['ma_thue']!='KK')[_0x2c23e1(0x1e0)](_0xc52115=>{const _0x37672e=_0x2c23e1;if(_0x19c479[_0x37672e(0x18a)](_0x19c479['laMdd'],_0x19c479[_0x37672e(0x1d2)])){_0x5db0fd[_0x37672e(0x1f8)](_0x19c479[_0x37672e(0x1b6)]);throw _0x19c479[_0x37672e(0x165)];}else return{'taxPercentage':_0xc52115[_0x37672e(0x164)],'taxableAmount':Math[_0x37672e(0x14e)](_0xc52115[_0x37672e(0x162)]-_0xc52115[_0x37672e(0x200)]),'taxAmount':Math['abs'](_0xc52115[_0x37672e(0x17a)])};}),_0x4e12ac=await _0x4e12ac['asyncGroupBy'](_0x19c479['EiQpW'],[_0x19c479['ySNMa'],_0x2c23e1(0x1f1)]);let _0x158e58=[...new Set(_0x4171e8[_0x2c23e1(0x19e)][_0x2c23e1(0x1e0)](_0x124286=>{const _0x1fe9b0=_0x2c23e1;if(_0x19c479[_0x1fe9b0(0x1fe)](_0x19c479[_0x1fe9b0(0x185)],_0x19c479[_0x1fe9b0(0x185)])){let _0x5e2dfa=(!_0x124286[_0x1fe9b0(0x154)]?_0x4171e8[_0x1fe9b0(0x164)]:_0x124286[_0x1fe9b0(0x164)])||0x0,_0x3e8c0a=_0x124286[_0x1fe9b0(0x154)]||_0x4171e8[_0x1fe9b0(0x154)];return _0x315a04(_0x3e8c0a,_0x5e2dfa,_0x124286[_0x1fe9b0(0x162)]);}else throw _0x19c479['IaKtq'];}))],_0x3fd780;if(_0x19c479[_0x2c23e1(0x173)](_0x158e58[_0x2c23e1(0x183)],0x1)&&!_0x4171e8['details'][_0x2c23e1(0x15f)](_0x5a9c97=>_0x5a9c97[_0x2c23e1(0x162)]<0x0))_0x19c479[_0x2c23e1(0x1c2)]!==_0x19c479['VrDnv']?_0x3fd780=_0x4171e8['details'][_0x2c23e1(0x1e0)]((_0xc8ad27,_0x592443)=>{const _0x1f8e29=_0x2c23e1;let _0x4e25c4=(!_0xc8ad27[_0x1f8e29(0x154)]?_0x4171e8[_0x1f8e29(0x164)]:_0xc8ad27['thue_suat'])||0x0,_0x49b1aa=_0xc8ad27[_0x1f8e29(0x154)]||_0x4171e8[_0x1f8e29(0x154)],_0x37ef67=_0xc8ad27[_0x1f8e29(0x162)]<0x0?undefined:_0xc8ad27[_0x1f8e29(0x1c1)],_0x321eb9=_0x19c479[_0x1f8e29(0x1e3)](_0xc8ad27[_0x1f8e29(0x162)],0x0)?undefined:_0xc8ad27['sl_xuat'],_0x2db098=Math['abs'](_0xc8ad27['tien_ct_nt']),_0x586f70=_0xc8ad27['ty_le_ck'],_0x21d427=Math[_0x1f8e29(0x14e)](_0xc8ad27[_0x1f8e29(0x200)]),_0x19792d=Math[_0x1f8e29(0x14e)](_0xc8ad27[_0x1f8e29(0x162)]-_0xc8ad27['tien_ck_nt']),_0x27c33b=_0x19c479['CwsIn'](_0x315a04,_0x49b1aa,_0x4e25c4,_0xc8ad27[_0x1f8e29(0x162)]),_0x302828=Math[_0x1f8e29(0x14e)](_0xc8ad27[_0x1f8e29(0x17a)]),_0x66f261=Math[_0x1f8e29(0x14e)](_0x19c479[_0x1f8e29(0x16b)](_0x19c479[_0x1f8e29(0x172)](_0xc8ad27[_0x1f8e29(0x162)],_0xc8ad27['tien_ck_nt']),_0xc8ad27[_0x1f8e29(0x17a)]));return{'lineNumber':_0x19c479[_0x1f8e29(0x16b)](_0x592443,0x1),'selection':_0x19c479[_0x1f8e29(0x16d)](_0xc8ad27['tien_ct_nt'],0x0)?0x3:0x1,'itemCode':_0xc8ad27[_0x1f8e29(0x184)],'itemName':_0xc8ad27['ten_vt_vat']||_0xc8ad27['ten_vt'],'unitName':_0x19c479[_0x1f8e29(0x1e3)](_0xc8ad27[_0x1f8e29(0x162)],0x0)?'':_0xc8ad27['ma_dvt'],'itemNote':'','unitPrice':_0x37ef67,'quantity':_0x321eb9,'itemTotalAmountWithoutTax':_0x2db098,'discount':_0x586f70,'itemDiscount':_0x21d427,'itemTotalAmountAfterDiscount':_0x19792d,'taxPercentage':_0x27c33b,'taxAmount':_0x302828,'itemTotalAmountWithTax':_0x66f261,'customTaxAmount':'0','batchNo':'','expDate':''};}):_0x31b09f=_0x469a31[_0x2c23e1(0x1c3)][_0x2c23e1(0x19a)]()+'/services/einvoiceapplication/api/InvoiceAPI/InvoiceWS/createOrUpdateInvoiceDraft/'+_0x3463a1[_0x2c23e1(0x1ea)]['trim']();else{if(_0x19c479[_0x2c23e1(0x1b5)](_0x19c479[_0x2c23e1(0x19b)],_0x19c479[_0x2c23e1(0x19b)])){_0x3fd780=_0x4171e8[_0x2c23e1(0x19e)][_0x2c23e1(0x1e0)]((_0x14e7d0,_0x531706)=>{const _0x58e0dd=_0x2c23e1,_0x48b476={'BcjDa':function(_0x35badc,_0x259ef1){return _0x35badc<_0x259ef1;},'ZUwrR':function(_0x5ad77d,_0x42cc39,_0x276fa1,_0x2267f0){const _0xcba4d4=_0x22d7;return _0x19c479[_0xcba4d4(0x1ec)](_0x5ad77d,_0x42cc39,_0x276fa1,_0x2267f0);},'VODoG':function(_0xf1ae05,_0x21e6cc){const _0x4e1ce7=_0x22d7;return _0x19c479[_0x4e1ce7(0x201)](_0xf1ae05,_0x21e6cc);},'pzavv':function(_0x3372a7,_0x44725f){const _0x15755a=_0x22d7;return _0x19c479[_0x15755a(0x16d)](_0x3372a7,_0x44725f);}};if(_0x19c479['qcjkp']!==_0x19c479['qcjkp']){let _0x1daf4f=(!_0x151181['ma_thue']?_0x2387ba['thue_suat']:_0x2a06a1[_0x58e0dd(0x164)])||0x0,_0x2cfc1e=_0x579ed7[_0x58e0dd(0x154)]||_0x38b7ff['ma_thue'],_0x2cc0b3=_0x40b06a['tien_ct_nt']<0x0?_0x5082b1:_0x2ca48b[_0x58e0dd(0x1c1)],_0x1676e2=_0x48b476[_0x58e0dd(0x1ae)](_0x2d75e6['tien_ct_nt'],0x0)?_0x5517a9:_0x29d737['sl_xuat'],_0x577972=_0xb6577e[_0x58e0dd(0x14e)](_0x5ea1f2[_0x58e0dd(0x162)]),_0x36c85c=_0x207aef['ty_le_ck'],_0x336de1=_0x3b6bd1[_0x58e0dd(0x14e)](_0xf57f1e[_0x58e0dd(0x200)]),_0x6866dd=_0x110c8c[_0x58e0dd(0x14e)](_0x21ea27[_0x58e0dd(0x162)]-_0x1e597f[_0x58e0dd(0x200)]),_0x39697e=_0x48b476[_0x58e0dd(0x147)](_0x2096f6,_0x2cfc1e,_0x1daf4f,_0xbc6e6e[_0x58e0dd(0x162)]),_0x5a7907=_0x596303[_0x58e0dd(0x14e)](_0x13c73b[_0x58e0dd(0x17a)]),_0x2fbd69=_0x2af829[_0x58e0dd(0x14e)](_0x48b476[_0x58e0dd(0x1fb)](_0x13cdb7['tien_ct_nt']-_0x4257e3[_0x58e0dd(0x200)],_0x1e78cf['tien_thue_nt']));return{'lineNumber':_0x22a003+0x1,'selection':_0x48b476[_0x58e0dd(0x1b0)](_0x4cdffa['tien_ct_nt'],0x0)?0x3:0x1,'itemCode':_0x130f85[_0x58e0dd(0x184)],'itemName':_0x9a9a59[_0x58e0dd(0x14f)]||_0x5b557a[_0x58e0dd(0x1b8)],'unitName':_0x56e8c7[_0x58e0dd(0x162)]<0x0?'':_0x51b6c9['ma_dvt'],'itemNote':'','unitPrice':_0x2cc0b3,'quantity':_0x1676e2,'itemTotalAmountWithoutTax':_0x577972,'discount':_0x36c85c,'itemDiscount':_0x336de1,'itemTotalAmountAfterDiscount':_0x6866dd,'taxPercentage':_0x39697e,'taxAmount':_0x5a7907,'itemTotalAmountWithTax':_0x2fbd69,'customTaxAmount':'0','batchNo':'','expDate':''};}else{let _0x58c7ac=(!_0x14e7d0[_0x58e0dd(0x154)]?_0x4171e8[_0x58e0dd(0x164)]:_0x14e7d0[_0x58e0dd(0x164)])||0x0,_0x1b2766=_0x14e7d0[_0x58e0dd(0x154)]||_0x4171e8[_0x58e0dd(0x154)],_0x3bb7f1=_0x14e7d0['gia_ban_ct_nt'],_0x4fc7a4=_0x14e7d0[_0x58e0dd(0x1bf)],_0x3ecd61=_0x14e7d0[_0x58e0dd(0x162)],_0x3f5311=0x0,_0x5eb8f9=0x0,_0x1f6235=_0x19c479['LLBrq'](_0x3ecd61,_0x5eb8f9),_0x28d4c8=_0x19c479[_0x58e0dd(0x1ee)](_0x315a04,_0x1b2766,_0x58c7ac,_0x14e7d0[_0x58e0dd(0x162)]),_0x591ce8=Math[_0x58e0dd(0x177)](_0x19c479[_0x58e0dd(0x1a9)](_0x19c479[_0x58e0dd(0x140)](_0x14e7d0[_0x58e0dd(0x162)],_0x58c7ac),0x64)),_0x2b1105=_0x19c479['qSBaU'](_0x1f6235,_0x591ce8);return{'lineNumber':_0x531706+0x1,'selection':0x1,'itemCode':_0x14e7d0[_0x58e0dd(0x184)],'itemName':_0x14e7d0[_0x58e0dd(0x14f)]||_0x14e7d0[_0x58e0dd(0x1b8)],'unitName':_0x14e7d0[_0x58e0dd(0x20e)],'itemNote':'','unitPrice':_0x3bb7f1,'quantity':_0x4fc7a4,'itemTotalAmountWithoutTax':_0x3ecd61,'discount':_0x3f5311,'itemDiscount':_0x5eb8f9,'itemTotalAmountAfterDiscount':_0x1f6235,'taxPercentage':_0x28d4c8,'taxAmount':_0x591ce8,'itemTotalAmountWithTax':_0x2b1105,'customTaxAmount':'0','batchNo':'','expDate':''};}});let _0x2ba0e3=_0x158e58[0x0],_0x4ca392=_0x4171e8[_0x2c23e1(0x19e)][_0x2c23e1(0x1e0)](_0x429081=>_0x429081[_0x2c23e1(0x200)])['reduce']((_0x4c5322,_0x339c14)=>_0x4c5322+_0x339c14),_0x187564=Math[_0x2c23e1(0x177)](_0x19c479[_0x2c23e1(0x1cd)](_0x4ca392*Math[_0x2c23e1(0x156)](_0x2ba0e3,0x0),0x64),0x0);if(_0x187564)_0x22348c=_0x3fd780[_0x2c23e1(0x1e0)](_0x527cbc=>_0x527cbc[_0x2c23e1(0x1f1)])[_0x2c23e1(0x1e5)]((_0x249797,_0x1bb4c9)=>_0x249797+_0x1bb4c9,0x0)-_0x187564;_0x19c479[_0x2c23e1(0x1a4)](_0x4ca392,0x0)&&_0x3fd780[_0x2c23e1(0x189)]({'lineNumber':_0x4171e8[_0x2c23e1(0x19e)][_0x2c23e1(0x183)],'selection':0x3,'itemCode':_0x19c479['UIocm'],'itemName':_0x19c479[_0x2c23e1(0x1c8)],'unitName':'','itemNote':'','unitPrice':undefined,'quantity':undefined,'itemTotalAmountWithoutTax':_0x4ca392,'discount':0x0,'itemDiscount':0x0,'itemTotalAmountAfterDiscount':_0x4ca392,'taxPercentage':_0x2ba0e3,'taxAmount':_0x187564,'itemTotalAmountWithTax':_0x4ca392+_0x187564,'customTaxAmount':'0','batchNo':'','expDate':''});}else _0x45d40f=_0x3a5170[_0x2c23e1(0x1c3)][_0x2c23e1(0x19a)]()+'/services/einvoiceapplication/api/InvoiceAPI/InvoiceWS/createInvoice/'+_0xb07fe2['ma_so_thue']['trim']();}let _0x8c940e=_0x4171e8[_0x2c23e1(0x1b3)]||_0x14c23f['ky_hieu_hoa_don']||_0x19c479[_0x2c23e1(0x1fc)],_0x53ff1d=_0x4171e8[_0x2c23e1(0x1fa)]||_0x14c23f['so_serial']||'';const _0x3589da={'generalInvoiceInfo':{'invoiceType':_0x4171e8[_0x2c23e1(0x179)]||_0x14c23f[_0x2c23e1(0x179)]||'1','templateCode':_0x8c940e,'invoiceSeries':_0x53ff1d,'transactionUuid':_0x40bdd2,'currencyCode':_0x19c479['yykir'],'adjustmentType':'1','paymentStatus':!![],'cusGetInvoiceRight':!![],'userName':_0x4171e8[_0x2c23e1(0x18d)]},'buyerInfo':{'buyerName':_0x4171e8[_0x2c23e1(0x1f3)]||'','buyerLegalName':_0x4171e8[_0x2c23e1(0x1f5)]||_0x19b6d3['ten_kh']||'','buyerTaxCode':_0x4171e8[_0x2c23e1(0x1ea)]||_0x19b6d3[_0x2c23e1(0x1ea)]||'','buyerAddressLine':_0x4171e8[_0x2c23e1(0x1a6)]||_0x19b6d3[_0x2c23e1(0x1a6)]||'','buyerPostalCode':'','buyerDistrictName':'','buyerCityName':'','buyerCountryCode':'','buyerPhoneNumber':_0x4171e8[_0x2c23e1(0x1cf)]||_0x19b6d3[_0x2c23e1(0x1cf)]||'','buyerFaxNumber':'','buyerEmail':_0x4171e8['email']||_0x19b6d3[_0x2c23e1(0x174)]||'','buyerBankName':'','buyerBankAccount':'','buyerIdType':'','buyerIdNo':'','buyerCode':'','buyerBirthDay':''},'sellerInfo':{'sellerLegalName':_0x14c23f[_0x2c23e1(0x195)],'sellerTaxCode':_0x14c23f[_0x2c23e1(0x1ea)],'sellerAddressLine':_0x14c23f['dia_chi_xuat_hoa_don']||_0x14c23f[_0x2c23e1(0x1b1)],'sellerPhoneNumber':_0x14c23f[_0x2c23e1(0x1d5)]||'','sellerEmail':_0x14c23f[_0x2c23e1(0x174)]||'','sellerBankName':_0x14c23f['ten_ngan_hang']||'','sellerBankAccount':_0x14c23f['tai_khoan_ngan_hang']||''},'itemInfo':_0x3fd780,'summarizeInfo':{'sumOfTotalLineAmountWithoutTax':_0x168ff2,'discountAmount':_0x3e65f4,'settlementDiscountAmount':_0x22f182,'totalAmountWithoutTax':_0x5a9b53,'totalTaxAmount':_0x22348c,'totalAmountWithTax':_0x19c479['mgXnI'](_0x19c479[_0x2c23e1(0x19f)](_0x168ff2,_0x3e65f4),_0x22348c)},'taxBreakdowns':_0x4e12ac,'payments':[{'paymentMethodName':_0x4171e8[_0x2c23e1(0x1ef)]||'TM'}],'extAttribute':[],'deliveryInfo':{},'metadata':[]};if(!_0x4171e8[_0x2c23e1(0x1e9)]){if(_0x19c479[_0x2c23e1(0x1a1)]===_0x19c479['vZzti']){_0x3397b0['error'](_0x2c23e1(0x1d8),_0x4b78f6[_0x2c23e1(0x14a)]);let _0x17eaa6=_0x21eeee[_0x2c23e1(0x14a)]?_0xc41d74[_0x2c23e1(0x14a)]['data']:_0x3ac8ff[_0x2c23e1(0x1ab)];if(_0x17eaa6[_0x2c23e1(0x1ca)])_0x17eaa6[_0x2c23e1(0x1ab)]=_0x17eaa6[_0x2c23e1(0x1ca)];if(_0x17eaa6[_0x2c23e1(0x15d)])_0x17eaa6['message']=_0x17eaa6[_0x2c23e1(0x15d)];throw _0x17eaa6||_0x996a90['message']||_0x449793[_0x2c23e1(0x1f8)]||_0x470f8d;}else _0x4171e8[_0x2c23e1(0x1e9)]=new Date();}let _0x5d21cf,_0x2597c7,_0x251758,_0x183199={'username':_0x14c23f[_0x2c23e1(0x199)][_0x2c23e1(0x19a)](),'password':_0x14c23f[_0x2c23e1(0x207)][_0x2c23e1(0x19a)]()};if(_0x19c479[_0x2c23e1(0x173)](_0x14c23f[_0x2c23e1(0x1ad)],'1')){_0x3589da[_0x2c23e1(0x194)][_0x2c23e1(0x209)]=new Date(_0x4171e8[_0x2c23e1(0x1e9)])[_0x2c23e1(0x204)]();if(_0x14c23f[_0x2c23e1(0x196)]){if(_0x19c479[_0x2c23e1(0x1d0)]('UwNwJ',_0x19c479[_0x2c23e1(0x14d)]))_0x2597c7=_0x14c23f[_0x2c23e1(0x1c3)][_0x2c23e1(0x19a)]()+_0x2c23e1(0x1ac)+_0x14c23f[_0x2c23e1(0x1ea)][_0x2c23e1(0x19a)]();else throw _0x2c23e1(0x161);}else _0x19c479['WnFgM'](_0x19c479[_0x2c23e1(0x1d9)],_0x19c479[_0x2c23e1(0x1d9)])?_0x2597c7=_0x14c23f['viettel_url_service']['trim']()+_0x2c23e1(0x1cc)+_0x14c23f[_0x2c23e1(0x1ea)]['trim']():_0xad7a8f[_0x2c23e1(0x208)]=_0x38b0e5[_0x2c23e1(0x208)][0x0];let _0x34b213=_0x14c23f[_0x2c23e1(0x1c3)][_0x2c23e1(0x19a)]()+'/auth/login';try{let _0x342dac=await _0x19c479[_0x2c23e1(0x1aa)](axios,{'method':_0x19c479[_0x2c23e1(0x181)],'url':_0x34b213,'data':_0x183199});_0x251758=_0x342dac[_0x2c23e1(0x1ca)]['access_token'];}catch(_0xa88eb){console[_0x2c23e1(0x1f8)](_0x19c479[_0x2c23e1(0x16c)],_0x183199,_0x34b213);let _0xe11a6a=_0xa88eb['response']?_0xa88eb['response'][_0x2c23e1(0x1ca)]:_0xa88eb[_0x2c23e1(0x1ab)];if(_0xe11a6a&&_0xe11a6a[_0x2c23e1(0x15d)])_0xe11a6a[_0x2c23e1(0x1ab)]=_0xe11a6a[_0x2c23e1(0x15d)];throw _0xe11a6a||_0xa88eb['message']||_0xa88eb[_0x2c23e1(0x1f8)]||_0xa88eb;}_0x5d21cf={'Cookie':_0x2c23e1(0x1df)+_0x251758+_0x2c23e1(0x18e)+_0x251758+_0x2c23e1(0x20a)+_0x251758,'Content-Type':_0x2c23e1(0x1fd)},_0x183199=undefined;}else{_0x3589da[_0x2c23e1(0x194)]['invoiceIssuedDate']=_0x19c479[_0x2c23e1(0x1af)](moment,_0x4171e8[_0x2c23e1(0x1e9)])[_0x2c23e1(0x145)](_0x19c479[_0x2c23e1(0x1d1)]);if(_0x14c23f[_0x2c23e1(0x196)]){if(_0x19c479[_0x2c23e1(0x175)]===_0x19c479[_0x2c23e1(0x175)])_0x2597c7=_0x14c23f['viettel_url_service'][_0x2c23e1(0x19a)]()+_0x2c23e1(0x1ed)+_0x14c23f[_0x2c23e1(0x1ea)]['trim']();else return null;}else _0x19c479['mNEOm']===_0x19c479[_0x2c23e1(0x1dd)]?_0x123653=_0x4fe4e4[_0x2c23e1(0x19e)]['map']((_0x33ab6f,_0xf77c47)=>{const _0x4265f0=_0x2c23e1;let _0x2e1441=(!_0x33ab6f[_0x4265f0(0x154)]?_0x4d5a07[_0x4265f0(0x164)]:_0x33ab6f['thue_suat'])||0x0,_0x90d3dc=_0x33ab6f[_0x4265f0(0x154)]||_0x35e6f1[_0x4265f0(0x154)],_0x2374d1=_0x33ab6f['tien_ct_nt']<0x0?_0x16b6d1:_0x33ab6f[_0x4265f0(0x1c1)],_0x152170=_0x19c479[_0x4265f0(0x1de)](_0x33ab6f[_0x4265f0(0x162)],0x0)?_0x3a21f9:_0x33ab6f[_0x4265f0(0x1bf)],_0x97e053=_0x488c95[_0x4265f0(0x14e)](_0x33ab6f['tien_ct_nt']),_0x491a84=_0x33ab6f[_0x4265f0(0x1c9)],_0x1a19e7=_0x18058a[_0x4265f0(0x14e)](_0x33ab6f[_0x4265f0(0x200)]),_0x44f7f9=_0x204e42['abs'](_0x19c479[_0x4265f0(0x143)](_0x33ab6f[_0x4265f0(0x162)],_0x33ab6f['tien_ck_nt'])),_0x337b67=_0x19c479[_0x4265f0(0x1ec)](_0x6b4bd5,_0x90d3dc,_0x2e1441,_0x33ab6f[_0x4265f0(0x162)]),_0x2d5c2a=_0x349ff4['abs'](_0x33ab6f[_0x4265f0(0x17a)]),_0x1b9993=_0x3dbc31[_0x4265f0(0x14e)](_0x19c479[_0x4265f0(0x201)](_0x33ab6f['tien_ct_nt']-_0x33ab6f[_0x4265f0(0x200)],_0x33ab6f[_0x4265f0(0x17a)]));return{'lineNumber':_0xf77c47+0x1,'selection':_0x19c479['iOfPy'](_0x33ab6f[_0x4265f0(0x162)],0x0)?0x3:0x1,'itemCode':_0x33ab6f[_0x4265f0(0x184)],'itemName':_0x33ab6f[_0x4265f0(0x14f)]||_0x33ab6f['ten_vt'],'unitName':_0x19c479[_0x4265f0(0x1ff)](_0x33ab6f[_0x4265f0(0x162)],0x0)?'':_0x33ab6f['ma_dvt'],'itemNote':'','unitPrice':_0x2374d1,'quantity':_0x152170,'itemTotalAmountWithoutTax':_0x97e053,'discount':_0x491a84,'itemDiscount':_0x1a19e7,'itemTotalAmountAfterDiscount':_0x44f7f9,'taxPercentage':_0x337b67,'taxAmount':_0x2d5c2a,'itemTotalAmountWithTax':_0x1b9993,'customTaxAmount':'0','batchNo':'','expDate':''};}):_0x2597c7=_0x14c23f[_0x2c23e1(0x1c3)]['trim']()+_0x2c23e1(0x17f)+_0x14c23f[_0x2c23e1(0x1ea)][_0x2c23e1(0x19a)]();}if(_0x1b2163)return _0x3589da;try{if(_0x19c479[_0x2c23e1(0x1db)](_0x2c23e1(0x155),'esAMY')){let _0xd6c116=await axios({'method':_0x19c479[_0x2c23e1(0x181)],'url':_0x2597c7,'data':_0x19c479[_0x2c23e1(0x1bc)](_0x14c23f[_0x2c23e1(0x1ad)],'1')?JSON['stringify'](_0x3589da):_0x3589da,'auth':_0x183199,'headers':_0x5d21cf}),_0x448f89=_0xd6c116['data'];if(!_0x448f89)throw _0x19c479[_0x2c23e1(0x160)];if(_0x448f89['errorCode'])throw _0x448f89['description'];_0x4171e8['result_export_einvoice']=_0x448f89,_0x4171e8[_0x2c23e1(0x1a5)]=_0x4171e8['result_export_einvoice'][_0x2c23e1(0x208)][_0x2c23e1(0x17d)],_0x4171e8[_0x2c23e1(0x1b3)]=_0x8c940e,_0x4171e8[_0x2c23e1(0x1fa)]=_0x53ff1d,await _0x137532['model']['updateOne']({'_id':_0x4171e8[_0x2c23e1(0x190)]},_0x4171e8);if(_0x4171e8['so_hd'])await global['getModel'](_0x19c479[_0x2c23e1(0x213)])[_0x2c23e1(0x198)]({'id_ct':_0x4171e8[_0x2c23e1(0x190)][_0x2c23e1(0x19d)]()},{'so_hd':_0x4171e8[_0x2c23e1(0x1a5)]});if(_0x4171e8[_0x2c23e1(0x1a5)])await global[_0x2c23e1(0x18b)](_0x19c479[_0x2c23e1(0x1f0)])[_0x2c23e1(0x198)]({'id_hd':_0x4171e8[_0x2c23e1(0x190)][_0x2c23e1(0x19d)]()},{'so_hd':_0x4171e8[_0x2c23e1(0x1a5)]});await global[_0x2c23e1(0x18b)](_0x19c479[_0x2c23e1(0x1b9)])[_0x2c23e1(0x198)]({'id_ct':_0x4171e8['_id'][_0x2c23e1(0x19d)]()},{'so_hd':_0x4171e8[_0x2c23e1(0x1a5)]});const _0x2cf6fc=_0x19c479['gqcpx'](require,_0x19c479[_0x2c23e1(0x182)]);return _0x2cf6fc[_0x2c23e1(0x1c5)](_0x4171e8,_0x137532,_0x2c9b70=>{const _0x580415=_0x2c23e1;if(_0x2c9b70)return console['error'](_0x19c479[_0x580415(0x1eb)],_0x2c9b70);_0x2cf6fc[_0x580415(0x163)](_0x137532,_0x4171e8);}),_0x448f89;}else _0x397cbd[_0x2c23e1(0x194)][_0x2c23e1(0x209)]=_0x19c479[_0x2c23e1(0x141)](_0x1d66aa,_0x233549['ngay_hd'])[_0x2c23e1(0x145)](_0x2c23e1(0x1a3)),_0x292da5[_0x2c23e1(0x196)]?_0xa801b1=_0xd2012c[_0x2c23e1(0x1c3)][_0x2c23e1(0x19a)]()+'/InvoiceAPI/InvoiceWS/createInvoice/'+_0x53d6dc[_0x2c23e1(0x1ea)][_0x2c23e1(0x19a)]():_0x389ea3=_0x31a256[_0x2c23e1(0x1c3)][_0x2c23e1(0x19a)]()+_0x2c23e1(0x17f)+_0x5e712a[_0x2c23e1(0x1ea)][_0x2c23e1(0x19a)]();}catch(_0x18a898){console[_0x2c23e1(0x1f8)](_0x19c479['uljVp'],_0x18a898[_0x2c23e1(0x14a)]);let _0x30b1aa=_0x18a898[_0x2c23e1(0x14a)]?_0x18a898[_0x2c23e1(0x14a)][_0x2c23e1(0x1ca)]:_0x18a898['message'];if(_0x30b1aa[_0x2c23e1(0x1ca)])_0x30b1aa[_0x2c23e1(0x1ab)]=_0x30b1aa[_0x2c23e1(0x1ca)];if(_0x30b1aa[_0x2c23e1(0x15d)])_0x30b1aa[_0x2c23e1(0x1ab)]=_0x30b1aa[_0x2c23e1(0x15d)];throw _0x30b1aa||_0x18a898['message']||_0x18a898[_0x2c23e1(0x1f8)]||_0x18a898;}};exports[_0x24843e(0x150)]=exportInvoice;const getInvoice=async(_0x593c89,_0x5160e5)=>{const _0x14c612=_0x24843e,_0x25ced2={'dTfRe':function(_0x169c6f,_0x145a61,_0x2d99fa,_0x111e24){return _0x169c6f(_0x145a61,_0x2d99fa,_0x111e24);},'ZOthf':function(_0x4ea4bb,_0x4f6d25){return _0x4ea4bb-_0x4f6d25;},'pbbmR':function(_0x278f3a,_0x6b6cc3){return _0x278f3a!==_0x6b6cc3;},'Mmiuw':_0x14c612(0x20c),'vahIy':_0x14c612(0x151),'BuOKS':_0x14c612(0x14b),'NtkfB':_0x14c612(0x159),'Kwjwg':_0x14c612(0x146),'aoTTr':function(_0x2f3253,_0x447956){return _0x2f3253(_0x447956);},'JwzEC':_0x14c612(0x1f6),'cQYaI':_0x14c612(0x17e),'WYhBG':_0x14c612(0x176),'XPsUZ':'NOT_FOUND_DATA','ZJGyb':_0x14c612(0x19c),'PSCzo':_0x14c612(0x1e7),'WRTWh':function(_0x3954d7,_0x5144ea){return _0x3954d7+_0x5144ea;},'OMNjL':_0x14c612(0x148)};if(!_0x593c89)throw _0x14c612(0x1e1);if(!_0x593c89[_0x14c612(0x1c3)]||!_0x593c89[_0x14c612(0x199)]||!_0x593c89[_0x14c612(0x207)]){if(_0x25ced2[_0x14c612(0x188)](_0x25ced2[_0x14c612(0x1a2)],_0x25ced2[_0x14c612(0x1c4)]))throw _0x25ced2[_0x14c612(0x1ce)];else{let _0x2adba1=(!_0xc37825['ma_thue']?_0x658e9e[_0x14c612(0x164)]:_0x41eb35[_0x14c612(0x164)])||0x0,_0x13ce93=_0x68b03d[_0x14c612(0x154)]||_0x1a05b8[_0x14c612(0x154)];return _0x25ced2['dTfRe'](_0x3e3341,_0x13ce93,_0x2adba1,_0x420b59[_0x14c612(0x162)]);}}if(!_0x593c89[_0x14c612(0x1ea)])throw _0x25ced2['NtkfB'];let _0x437c85,_0x5ab257={'username':_0x593c89['viettel_user'][_0x14c612(0x19a)](),'password':_0x593c89[_0x14c612(0x207)][_0x14c612(0x19a)]()};try{if(_0x14c612(0x146)!==_0x25ced2[_0x14c612(0x211)])return{'taxPercentage':_0x5f2591[_0x14c612(0x164)],'taxableAmount':_0xd39ab4[_0x14c612(0x14e)](_0x25ced2[_0x14c612(0x1b4)](_0x3614fe[_0x14c612(0x162)],_0x32e5e3[_0x14c612(0x200)])),'taxAmount':_0x5e5f11[_0x14c612(0x14e)](_0x163c7c[_0x14c612(0x17a)])};else{let _0x311fab=await _0x25ced2[_0x14c612(0x1e2)](axios,{'method':_0x25ced2[_0x14c612(0x149)],'url':_0x593c89[_0x14c612(0x1c3)]['trim']()+_0x14c612(0x1f7),'data':_0x5ab257});_0x437c85=_0x311fab[_0x14c612(0x1ca)][_0x14c612(0x168)];}}catch(_0x2624c0){console[_0x14c612(0x1f8)](_0x25ced2[_0x14c612(0x1c0)]);throw _0x14c612(0x20b);}const _0x97764d=_0x593c89['viettel_url_service'][_0x14c612(0x19a)]()+_0x14c612(0x1be),_0x1a1935={'Cookie':_0x14c612(0x1df)+_0x437c85+_0x14c612(0x18e)+_0x437c85+';\x20session_token='+_0x437c85,'Content-Type':_0x14c612(0x1e4)};let _0x29822b={'supplierTaxCode':_0x593c89['ma_so_thue'],'transactionUuid':_0x5160e5};try{let _0xb1778c=await axios[_0x14c612(0x1f6)](_0x97764d,querystring['stringify'](_0x29822b),{'headers':_0x1a1935});console[_0x14c612(0x18f)](_0x25ced2[_0x14c612(0x142)],_0xb1778c[_0x14c612(0x1ca)]);let _0x1f02bd=_0xb1778c[_0x14c612(0x1ca)];return _0x1f02bd['result']&&_0x1f02bd[_0x14c612(0x208)][_0x14c612(0x183)]==0x1&&(_0x1f02bd[_0x14c612(0x208)]=_0x1f02bd[_0x14c612(0x208)][0x0]),_0x1f02bd;}catch(_0x5f4189){let _0x33a443=((_0x5f4189[_0x14c612(0x14a)]||{})[_0x14c612(0x1ca)]||{})[_0x14c612(0x1ab)];if(_0x33a443===_0x25ced2[_0x14c612(0x1b7)])return null;console[_0x14c612(0x1f8)](_0x25ced2[_0x14c612(0x16f)],(_0x5f4189[_0x14c612(0x14a)]||{})[_0x14c612(0x1ca)],_0x25ced2[_0x14c612(0x144)],_0x29822b);throw((_0x5f4189[_0x14c612(0x14a)]||{})[_0x14c612(0x1ca)]||{})[_0x14c612(0x1ca)]||_0x25ced2[_0x14c612(0x157)](_0x25ced2['OMNjL'],_0x5160e5);}};exports[_0x24843e(0x191)]=getInvoice;
@@ -1,22 +1 @@
1
- const axios=require("axios"),async=require("async"),moment=require("moment"),{xml2json,base64toJSON}=require("./utils"),exportInvoice=async($app$$,$ct$$,$check_data$$)=>{throw"Ch\u01b0a tri\u1ec3n khai";};exports.exportInvoice=exportInvoice;const getInvoice=async($app$$,$transactionUuid$$)=>{throw"Ch\u01b0a tri\u1ec3n khai";};exports.getInvoice=getInvoice;
2
- const getInvoices=async($app$jscomp$2_str$$,$condition_data$$={})=>{if(!$app$jscomp$2_str$$)throw"Thi\u1ebfu th\u00f4ng tin c\u00f4ng ty";if(!$app$jscomp$2_str$$.vnpt_url_service||!$app$jscomp$2_str$$.vnpt_user||!$app$jscomp$2_str$$.vnpt_password)throw"Ch\u01b0a khai b\u00e1o th\u00f4ng tin k\u1ebft n\u1ed1i VNPT invoice";if(!$app$jscomp$2_str$$.ma_so_thue)throw"Ch\u01b0a khai b\u00e1o m\u00e3 s\u1ed1 thu\u1ebf c\u00f4ng ty";if(!$condition_data$$.ky_hieu_hoa_don&&!$app$jscomp$2_str$$.vnpt_ky_hieu_hoa_don)throw"Ch\u01b0a khai b\u00e1o m\u1eabu ho\u00e1 \u0111\u01a1n";
3
- if(!$condition_data$$.so_serial&&!$app$jscomp$2_str$$.so_serial)throw"Ch\u01b0a khai b\u00e1o k\u00ed hi\u1ec7u ho\u00e1 \u0111\u01a1n";if(!$condition_data$$.tu_ngay)throw"\u0110i\u1ec1u ki\u1ec7n thi\u1ebfu t\u1eeb ng\u00e0y (tu_ngay)";if(!$condition_data$$.den_ngay)throw"\u0110i\u1ec1u ki\u1ec7n thi\u1ebfu t\u1eeb ng\u00e0y (den_ngay)";const $ERRORS$$={"ERR:1":"T\u00e0i kho\u1ea3n \u0111\u0103ng nh\u1eadp sai ho\u1eb7c kh\u00f4ng c\u00f3 quy\u1ec1n ServiceRole","ERR:2":"Kh\u00f4ng t\u00ecm th\u1ea5y h\u00f3a \u0111\u01a1n",
4
- "ERR:3":"Sai \u0111\u1ecbnh d\u1ea1ng ng\u00e0y th\u00e1ng","ERR:4":"Kh\u00f4ng l\u1ea5y \u0111\u01b0\u1ee3c b\u1ea3ng h\u00f3a \u0111\u01a1n (sai m\u1eabu s\u1ed1)","ERR:6":"V\u01b0\u1ee3t qu\u00e1 gi\u1edbi h\u1ea1n s\u1ed1 l\u01b0\u1ee3ng h\u00f3a \u0111\u01a1n \u0111\u01b0\u1ee3c ph\u00e9p l\u1ea5y (500 h\u00f3a \u0111\u01a1n)","ERR:5":"C\u00f3 l\u1ed7i x\u1ea3y ra","ERR:7":"V\u01b0\u1ee3t qu\u00e1 gi\u1edbi h\u1ea1n 7 ng\u00e0y"};$condition_data$$=`<?xml version="1.0" encoding="utf-8"?>
5
- <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
6
- <soap:Body>
7
- <GetInvViewByDate xmlns="http://tempuri.org/">
8
- <userName>${$app$jscomp$2_str$$.vnpt_user}</userName>
9
- <userPass>${$app$jscomp$2_str$$.vnpt_password}</userPass>
10
- <pattern>${$condition_data$$.ky_hieu_hoa_don||$app$jscomp$2_str$$.vnpt_ky_hieu_hoa_don}</pattern>
11
- <serial>${$condition_data$$.so_serial||$app$jscomp$2_str$$.so_serial}</serial>
12
- <fromDate>${moment($condition_data$$.tu_ngay).format("DD/MM/YYYY")}</fromDate>
13
- <toDate>${moment($condition_data$$.den_ngay).format("DD/MM/YYYY")}</toDate>
14
- </GetInvViewByDate>
15
- </soap:Body>
16
- </soap:Envelope>`;$app$jscomp$2_str$$=(await axios.request({method:"post",maxBodyLength:Infinity,url:$app$jscomp$2_str$$.vnpt_url_service,headers:{SOAPAction:"http://tempuri.org/GetInvViewByDate","Content-Type":"text/xml; charset=utf-8"},data:$condition_data$$})).data;let $rs$$=await xml2json($app$jscomp$2_str$$);return new Promise(($resolve$$,$reject$$)=>{try{let $GetInvViewByDateResult$$=($rs$$["soap:Envelope"]||{})["soap:Body"][0].GetInvViewByDateResponse[0].GetInvViewByDateResult;if($GetInvViewByDateResult$$.length>=
17
- 0&&$GetInvViewByDateResult$$[0].indexOf("ERR:")>=0)return $reject$$($ERRORS$$[$GetInvViewByDateResult$$[0]]);async.map($GetInvViewByDateResult$$,($d$$,$cb$$)=>{setImmediate(async()=>{try{var $bufferObj_rs$$=Buffer.from($d$$,"base64"),$hinh_thuc_tt_invs$$=(await xml2json($bufferObj_rs$$.toString("utf8"))).DSHDon.HDon;$bufferObj_rs$$=[];for(let $inv$$ of $hinh_thuc_tt_invs$$){let $dl$$=$inv$$.DLieu[0];$dl$$=(await base64toJSON($dl$$)).HDon.DLHDon[0];$dl$$.Fkey=$inv$$.Fkey[0];$dl$$.TTChung=$dl$$.TTChung[0];
18
- $dl$$.NDHDon=$dl$$.NDHDon[0];$dl$$.NDHDon.NBan=$dl$$.NDHDon.NBan[0];$dl$$.NDHDon.NMua=$dl$$.NDHDon.NMua[0];$dl$$.NDHDon.TToan=$dl$$.NDHDon.TToan[0];delete $dl$$.$;$hinh_thuc_tt_invs$$="";$dl$$.TTChung.TTKhac&&$dl$$.TTChung.TTKhac.length>0&&$dl$$.TTChung.TTKhac[0].TTin&&$dl$$.TTChung.TTKhac[0].TTin.length>0&&$dl$$.TTChung.TTKhac[0].TTin[0].TTruong[0]=="HTTToan"&&($hinh_thuc_tt_invs$$=$dl$$.TTChung.TTKhac[0].TTin[0].DLieu[0]);let $fdata$$={id_invoice:$inv$$.Fkey[0],so_ct:$dl$$.TTChung.SHDon[0],ngay_ct:new Date($dl$$.TTChung.NLap[0]),
19
- so_hd:$dl$$.TTChung.SHDon[0],ngay_hd:new Date($dl$$.TTChung.NLap[0]),ky_hieu_hoa_don:$dl$$.TTChung.KHMSHDon[0],so_serial:$dl$$.TTChung.KHHDon[0],hinh_thuc_tt:$hinh_thuc_tt_invs$$,ma_nt:"VND",ty_gia:1,ten_kh:$dl$$.NDHDon.NMua.Ten[0],ma_so_thue:$dl$$.NDHDon.NMua.MST?$dl$$.NDHDon.NMua.MST[0]:void 0,dia_chi:$dl$$.NDHDon.NMua.DChi?$dl$$.NDHDon.NMua.DChi[0]:void 0,dien_thoai:$dl$$.NDHDon.NMua.SDThoai?$dl$$.NDHDon.NMua.SDThoai[0]:void 0,details:[]};for(let $dv$$ of $dl$$.NDHDon.DSHHDVu)for(let $hd$$ of $dv$$.HHDVu){let $detail$$=
20
- {ma_tc:$hd$$.TChat[0],ma_vt:$hd$$.MHHDVu[0],ten_vt:$hd$$.THHDVu[0],ma_dvt:$hd$$.DVTinh[0]||"",sl_xuat:Number($hd$$.SLuong[0]||0),gia_ban_ct:Number($hd$$.DGia[0]||0),gia_ban_ct_nt:Number($hd$$.DGia[0]||0),ty_le_ck:Number($hd$$.TLCKhau[0]||0),tien_ck:Number($hd$$.STCKhau[0]||0),tien_ck_nt:Number($hd$$.STCKhau[0]||0),ma_thue:($hd$$.TSuat[0]||"").replace("%","")};$detail$$.tien_ct=$detail$$.tien_ct_nt=Number($hd$$.ThTien[0]||0);$detail$$.thue_suat=Number($detail$$.ma_thue||0);$detail$$.tien_thue_nt=$detail$$.tien_thue=
21
- Math.round($detail$$.thue_suat*$detail$$.tien_ct_nt/100);$detail$$.tien=$detail$$.tien_nt=$detail$$.tien_ct_nt-$detail$$.tien_ck_nt+$detail$$.tien_thue_nt;$fdata$$.details.push($detail$$)}$fdata$$.t_tien_nt=$fdata$$.t_tien=$fdata$$.details.map($d$$=>$d$$.tien_ct_nt).reduce(($a$$,$b$$)=>$a$$+$b$$,0);$fdata$$.t_thue_nt=$fdata$$.t_thue=$fdata$$.details.map($d$$=>$d$$.tien_thue_nt).reduce(($a$$,$b$$)=>$a$$+$b$$,0);$bufferObj_rs$$.push($fdata$$)}$cb$$(null,$bufferObj_rs$$)}catch($e$$){$cb$$($e$$)}})},
22
- ($e$jscomp$1_invs$$,$rs$$)=>{if($e$jscomp$1_invs$$)return $reject$$($e$jscomp$1_invs$$);$e$jscomp$1_invs$$=$rs$$.reduce(($a$$,$b$$)=>$a$$.concat($b$$),[]);$resolve$$($e$jscomp$1_invs$$)})}catch($e$$){$reject$$($e$$)}})};exports.getInvoices=getInvoices;
1
+ const _0x1da1a4=_0x51c4;(function(_0x2a5ed9,_0x5f511a){const _0xfb72af=_0x51c4,_0x5b437d=_0x2a5ed9();while(!![]){try{const _0x196082=-parseInt(_0xfb72af(0x11f))/0x1*(-parseInt(_0xfb72af(0xdf))/0x2)+-parseInt(_0xfb72af(0x10a))/0x3*(-parseInt(_0xfb72af(0x9d))/0x4)+parseInt(_0xfb72af(0x103))/0x5*(-parseInt(_0xfb72af(0xa1))/0x6)+parseInt(_0xfb72af(0x95))/0x7+-parseInt(_0xfb72af(0x114))/0x8+parseInt(_0xfb72af(0xf8))/0x9+parseInt(_0xfb72af(0xbc))/0xa;if(_0x196082===_0x5f511a)break;else _0x5b437d['push'](_0x5b437d['shift']());}catch(_0x15b0a2){_0x5b437d['push'](_0x5b437d['shift']());}}}(_0x23e0,0xe8e6f));const axios=require('axios'),async=require(_0x1da1a4(0xb5)),moment=require(_0x1da1a4(0x9e)),{xml2json,base64toJSON}=require('./utils'),exportInvoice=async(_0x2115a7,_0x2dabb9,_0x2ddc78=![])=>{const _0x18dca0=_0x1da1a4,_0x5da8c1={'VEPlk':_0x18dca0(0xbb)};throw _0x5da8c1[_0x18dca0(0xb8)];};exports[_0x1da1a4(0x12f)]=exportInvoice;const getInvoice=async(_0x442a6d,_0x4d580f)=>{const _0x3ea39d=_0x1da1a4,_0x18cfc0={'NNWHT':'Chưa\x20triển\x20khai'};throw _0x18cfc0[_0x3ea39d(0xc8)];};exports['getInvoice']=getInvoice;const getInvoices=async(_0x3d2e63,_0x36d792={})=>{const _0x5bfdea=_0x1da1a4,_0x33586b={'VLAkI':_0x5bfdea(0xbb),'nRJaQ':function(_0x3f9a53,_0x5ca816){return _0x3f9a53(_0x5ca816);},'UpwGr':_0x5bfdea(0x127),'DdkZi':function(_0x3c3f7b,_0x52e850){return _0x3c3f7b(_0x52e850);},'DECCM':_0x5bfdea(0x92),'tinjP':'base64','xScWL':function(_0x2fe696,_0x2c056c){return _0x2fe696(_0x2c056c);},'EdFjE':_0x5bfdea(0x115),'PYheM':'DSHDon','QxxfH':_0x5bfdea(0xf0),'ssNyh':function(_0x5a294b,_0x3567cf){return _0x5a294b>_0x3567cf;},'VpjcK':function(_0x2a7e86,_0x2c1786){return _0x2a7e86==_0x2c1786;},'BXwOf':function(_0x4256d0,_0x4d2306){return _0x4256d0!==_0x4d2306;},'TyFHm':_0x5bfdea(0xa6),'KwFKP':_0x5bfdea(0xd0),'oyuKA':function(_0x5ecd3e,_0x3571d6){return _0x5ecd3e*_0x3571d6;},'ObHxP':function(_0x7a5711,_0x33187c){return _0x7a5711===_0x33187c;},'Nqrqu':'IixuX','THYoQ':_0x5bfdea(0xe0),'KckOR':'GetInvViewByDateResponse','YDutD':function(_0x130dc1,_0x10b688){return _0x130dc1>=_0x10b688;},'CTeWV':_0x5bfdea(0x139),'HNkZi':'MbzsX','hZzyV':_0x5bfdea(0xda),'NFZUU':'Chưa\x20khai\x20báo\x20mẫu\x20hoá\x20đơn','xMyJo':_0x5bfdea(0xd1),'DEwfP':_0x5bfdea(0xea),'FIVoJ':_0x5bfdea(0xfc),'aroSj':'Không\x20tìm\x20thấy\x20hóa\x20đơn','vNefo':_0x5bfdea(0x111),'DkFsv':_0x5bfdea(0xdb),'gBAtv':'Có\x20lỗi\x20xảy\x20ra','ZLDIA':_0x5bfdea(0xa3),'ajAAC':_0x5bfdea(0xb4),'caYEk':_0x5bfdea(0x10b),'GPUiF':'text/xml;\x20charset=utf-8'};if(!_0x3d2e63)throw _0x5bfdea(0xd6);if(!_0x3d2e63[_0x5bfdea(0x11a)]||!_0x3d2e63[_0x5bfdea(0x122)]||!_0x3d2e63[_0x5bfdea(0x9a)])throw _0x33586b[_0x5bfdea(0xc7)];if(!_0x3d2e63[_0x5bfdea(0xc5)]){if(_0x33586b[_0x5bfdea(0xcb)]('nFUVi',_0x33586b[_0x5bfdea(0xd2)]))throw _0x33586b['VLAkI'];else throw _0x33586b[_0x5bfdea(0x136)];}if(!_0x36d792[_0x5bfdea(0x12e)]&&!_0x3d2e63[_0x5bfdea(0x96)])throw _0x33586b[_0x5bfdea(0xbf)];if(!_0x36d792[_0x5bfdea(0xde)]&&!_0x3d2e63[_0x5bfdea(0xde)])throw _0x33586b[_0x5bfdea(0x130)];if(!_0x36d792['tu_ngay'])throw _0x33586b['DEwfP'];if(!_0x36d792[_0x5bfdea(0x129)])throw _0x33586b[_0x5bfdea(0xbe)];const _0x478afd={'ERR:1':_0x5bfdea(0xed),'ERR:2':_0x33586b['aroSj'],'ERR:3':_0x5bfdea(0x104),'ERR:4':_0x33586b['vNefo'],'ERR:6':_0x33586b[_0x5bfdea(0xac)],'ERR:5':_0x33586b[_0x5bfdea(0x128)],'ERR:7':_0x33586b[_0x5bfdea(0xee)]};let _0x475ccb='<?xml\x20version=\x221.0\x22\x20encoding=\x22utf-8\x22?>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<soap:Envelope\x20xmlns:xsi=\x22http://www.w3.org/2001/XMLSchema-instance\x22\x20xmlns:xsd=\x22http://www.w3.org/2001/XMLSchema\x22\x20xmlns:soap=\x22http://schemas.xmlsoap.org/soap/envelope/\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20<soap:Body>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<GetInvViewByDate\x20xmlns=\x22http://tempuri.org/\x22>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<userName>'+_0x3d2e63[_0x5bfdea(0x122)]+_0x5bfdea(0x11e)+_0x3d2e63[_0x5bfdea(0x9a)]+_0x5bfdea(0xf3)+(_0x36d792[_0x5bfdea(0x12e)]||_0x3d2e63[_0x5bfdea(0x96)])+_0x5bfdea(0x10e)+(_0x36d792[_0x5bfdea(0xde)]||_0x3d2e63['so_serial'])+'</serial>\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20<fromDate>'+_0x33586b['xScWL'](moment,_0x36d792['tu_ngay'])['format'](_0x33586b[_0x5bfdea(0xfd)])+_0x5bfdea(0x135)+moment(_0x36d792[_0x5bfdea(0x129)])[_0x5bfdea(0x99)](_0x33586b[_0x5bfdea(0xfd)])+_0x5bfdea(0x105),_0x362f2b={'method':_0x33586b['caYEk'],'maxBodyLength':Infinity,'url':_0x3d2e63[_0x5bfdea(0x11a)],'headers':{'SOAPAction':_0x5bfdea(0xfe),'Content-Type':_0x33586b[_0x5bfdea(0xef)]},'data':_0x475ccb},_0x3bb82a=(await axios[_0x5bfdea(0xad)](_0x362f2b))[_0x5bfdea(0x126)],_0x566ef2=await _0x33586b[_0x5bfdea(0xb3)](xml2json,_0x3bb82a);return new Promise((_0x3c305f,_0x1a3bb0)=>{const _0x5abf6f=_0x5bfdea,_0x476d33={'IJJMm':function(_0x55104d,_0x5aa12d){const _0x455c72=_0x51c4;return _0x33586b[_0x455c72(0xb3)](_0x55104d,_0x5aa12d);},'SyuOm':_0x33586b[_0x5abf6f(0xc7)],'wJYbF':_0x33586b[_0x5abf6f(0xa7)],'YGLVf':function(_0x425fde,_0x40676e){const _0x378015=_0x5abf6f;return _0x33586b[_0x378015(0x116)](_0x425fde,_0x40676e);},'qkxjn':_0x33586b[_0x5abf6f(0xb0)],'mZnLU':_0x33586b['PYheM'],'UUWGa':function(_0x1d53e6,_0xfdcd37){return _0x1d53e6===_0xfdcd37;},'xsLLQ':_0x5abf6f(0xec),'SoImK':_0x33586b['QxxfH'],'HFTRb':_0x5abf6f(0xa2),'VvoNV':function(_0x48c468,_0x58f999){const _0x5a48fe=_0x5abf6f;return _0x33586b[_0x5a48fe(0x93)](_0x48c468,_0x58f999);},'mrDap':function(_0x56de18,_0x11fb2b){const _0x5834a5=_0x5abf6f;return _0x33586b[_0x5834a5(0xdd)](_0x56de18,_0x11fb2b);},'ILtZr':function(_0xe4286d,_0x32bf07){const _0x450d5b=_0x5abf6f;return _0x33586b[_0x450d5b(0xcb)](_0xe4286d,_0x32bf07);},'YJgFB':_0x33586b[_0x5abf6f(0x117)],'xFxHk':_0x33586b['KwFKP'],'VbwHJ':function(_0x3653e8,_0x48ad52){const _0x318280=_0x5abf6f;return _0x33586b[_0x318280(0xb9)](_0x3653e8,_0x48ad52);},'MYkMu':function(_0x32ef83,_0x207686){const _0x24e64d=_0x5abf6f;return _0x33586b[_0x24e64d(0x10c)](_0x32ef83,_0x207686);},'wUnmn':_0x33586b[_0x5abf6f(0x10f)],'TLDKa':_0x5abf6f(0x12a)};try{let _0x459411=(_0x566ef2[_0x33586b[_0x5abf6f(0xae)]]||{})[_0x5abf6f(0xe2)][0x0][_0x33586b[_0x5abf6f(0xe3)]][0x0][_0x5abf6f(0x110)];if(_0x459411[_0x5abf6f(0xab)]>=0x0&&_0x33586b[_0x5abf6f(0x94)](_0x459411[0x0][_0x5abf6f(0x13c)](_0x33586b[_0x5abf6f(0xd8)]),0x0))return _0x33586b[_0x5abf6f(0xf2)](_0x1a3bb0,_0x478afd[_0x459411[0x0]]);async[_0x5abf6f(0x11d)](_0x459411,(_0x46764a,_0x1ff6e0)=>{const _0x2c0755=_0x5abf6f,_0x29c73b={'GFchz':_0x476d33[_0x2c0755(0x124)],'XRXCN':_0x476d33['wJYbF'],'AwRDb':function(_0x13263b,_0x5839c9){const _0x5a57af=_0x2c0755;return _0x476d33[_0x5a57af(0xe7)](_0x13263b,_0x5839c9);},'ekUyY':_0x476d33[_0x2c0755(0xeb)],'KRMem':_0x476d33[_0x2c0755(0xd5)],'gdpok':function(_0x1591e0,_0x2db365){const _0x115cb6=_0x2c0755;return _0x476d33[_0x115cb6(0xd3)](_0x1591e0,_0x2db365);},'YLhVo':_0x476d33[_0x2c0755(0xaa)],'pRZBZ':_0x476d33[_0x2c0755(0xbd)],'CmZLM':_0x476d33['HFTRb'],'PZLoB':function(_0x1f3f0f,_0x58edbb){const _0xfcbedf=_0x2c0755;return _0x476d33[_0xfcbedf(0x123)](_0x1f3f0f,_0x58edbb);},'ziuRl':function(_0x2e26ce,_0x5e9cf2){const _0x52fdc3=_0x2c0755;return _0x476d33[_0x52fdc3(0xb6)](_0x2e26ce,_0x5e9cf2);},'CsKvg':function(_0x30fc4b,_0x538505){const _0x104cb0=_0x2c0755;return _0x476d33[_0x104cb0(0xa8)](_0x30fc4b,_0x538505);},'IetjE':_0x476d33[_0x2c0755(0xfb)],'QMstd':_0x476d33[_0x2c0755(0x12d)],'hRRBB':function(_0x190cb0,_0xf14bcf){const _0x42a8cd=_0x2c0755;return _0x476d33[_0x42a8cd(0x118)](_0x190cb0,_0xf14bcf);},'NOWNy':function(_0xfe9b95,_0x387fae){return _0xfe9b95(_0x387fae);},'tNgLx':function(_0x13b367,_0x507e2a){const _0x3b2a62=_0x2c0755;return _0x476d33[_0x3b2a62(0x134)](_0x13b367,_0x507e2a);},'DNAIV':function(_0x55aecf,_0x30e571){return _0x55aecf+_0x30e571;},'nOxsi':function(_0x200792,_0x8e322d){return _0x200792-_0x8e322d;},'YUdpG':function(_0x547da9,_0x569ea6){const _0x331925=_0x2c0755;return _0x476d33[_0x331925(0x118)](_0x547da9,_0x569ea6);}};_0x476d33[_0x2c0755(0xe4)](_0x476d33[_0x2c0755(0x131)],_0x476d33[_0x2c0755(0xba)])?_0x476d33['IJJMm'](_0x20a1fe,_0x561aef):_0x476d33[_0x2c0755(0x118)](setImmediate,async()=>{const _0x5a7657=_0x2c0755;try{let _0x2bd8b7=Buffer[_0x5a7657(0xff)](_0x46764a,_0x29c73b[_0x5a7657(0xca)]),_0x4dfca6=(await _0x29c73b[_0x5a7657(0xe1)](xml2json,_0x2bd8b7[_0x5a7657(0x120)](_0x29c73b[_0x5a7657(0xf4)])))[_0x29c73b[_0x5a7657(0x13b)]][_0x5a7657(0x9b)],_0x598acc=[];for(let _0x2fe5d9 of _0x4dfca6){if(_0x29c73b[_0x5a7657(0x12c)](_0x29c73b[_0x5a7657(0xcf)],_0x29c73b['pRZBZ']))_0x47d23c=_0x16dac3[_0x5a7657(0xd7)]['TTKhac'][0x0][_0x5a7657(0xc6)][0x0][_0x5a7657(0xa2)][0x0];else{let _0xda60fb=_0x2fe5d9[_0x29c73b['CmZLM']][0x0];_0xda60fb=(await base64toJSON(_0xda60fb))[_0x5a7657(0x9b)][_0x5a7657(0xf6)][0x0],_0xda60fb[_0x5a7657(0xf7)]=_0x2fe5d9[_0x5a7657(0xf7)][0x0],_0xda60fb[_0x5a7657(0xd7)]=_0xda60fb[_0x5a7657(0xd7)][0x0],_0xda60fb['NDHDon']=_0xda60fb[_0x5a7657(0xc2)][0x0],_0xda60fb[_0x5a7657(0xc2)][_0x5a7657(0x107)]=_0xda60fb[_0x5a7657(0xc2)][_0x5a7657(0x107)][0x0],_0xda60fb[_0x5a7657(0xc2)][_0x5a7657(0xdc)]=_0xda60fb[_0x5a7657(0xc2)][_0x5a7657(0xdc)][0x0],_0xda60fb[_0x5a7657(0xc2)][_0x5a7657(0x133)]=_0xda60fb['NDHDon'][_0x5a7657(0x133)][0x0],delete _0xda60fb['$'];let _0x4a3823='';if(_0xda60fb['TTChung'][_0x5a7657(0x132)]&&_0x29c73b[_0x5a7657(0x112)](_0xda60fb[_0x5a7657(0xd7)]['TTKhac'][_0x5a7657(0xab)],0x0)&&_0xda60fb[_0x5a7657(0xd7)][_0x5a7657(0x132)][0x0][_0x5a7657(0xc6)]&&_0x29c73b[_0x5a7657(0x112)](_0xda60fb['TTChung'][_0x5a7657(0x132)][0x0][_0x5a7657(0xc6)]['length'],0x0)&&_0x29c73b[_0x5a7657(0xc3)](_0xda60fb[_0x5a7657(0xd7)][_0x5a7657(0x132)][0x0][_0x5a7657(0xc6)][0x0][_0x5a7657(0xc4)][0x0],_0x5a7657(0x109))){if(_0x29c73b[_0x5a7657(0xd4)](_0x29c73b['IetjE'],_0x29c73b[_0x5a7657(0xd9)]))throw _0x29c73b[_0x5a7657(0x9c)];else _0x4a3823=_0xda60fb[_0x5a7657(0xd7)][_0x5a7657(0x132)][0x0]['TTin'][0x0][_0x5a7657(0xa2)][0x0];}let _0x560374={'id_invoice':_0x2fe5d9[_0x5a7657(0xf7)][0x0],'so_ct':_0xda60fb[_0x5a7657(0xd7)][_0x5a7657(0x113)][0x0],'ngay_ct':new Date(_0xda60fb['TTChung']['NLap'][0x0]),'so_hd':_0xda60fb[_0x5a7657(0xd7)][_0x5a7657(0x113)][0x0],'ngay_hd':new Date(_0xda60fb[_0x5a7657(0xd7)][_0x5a7657(0x137)][0x0]),'ky_hieu_hoa_don':_0xda60fb['TTChung'][_0x5a7657(0x121)][0x0],'so_serial':_0xda60fb[_0x5a7657(0xd7)][_0x5a7657(0x11c)][0x0],'hinh_thuc_tt':_0x4a3823,'ma_nt':_0x29c73b['QMstd'],'ty_gia':0x1,'ten_kh':_0xda60fb['NDHDon']['NMua'][_0x5a7657(0xc9)][0x0],'ma_so_thue':_0xda60fb['NDHDon'][_0x5a7657(0xdc)]['MST']?_0xda60fb[_0x5a7657(0xc2)][_0x5a7657(0xdc)][_0x5a7657(0x108)][0x0]:undefined,'dia_chi':_0xda60fb['NDHDon'][_0x5a7657(0xdc)][_0x5a7657(0xe8)]?_0xda60fb['NDHDon'][_0x5a7657(0xdc)][_0x5a7657(0xe8)][0x0]:undefined,'dien_thoai':_0xda60fb[_0x5a7657(0xc2)]['NMua'][_0x5a7657(0xa9)]?_0xda60fb[_0x5a7657(0xc2)][_0x5a7657(0xdc)]['SDThoai'][0x0]:undefined,'details':[]};for(let _0x174ff7 of _0xda60fb[_0x5a7657(0xc2)][_0x5a7657(0x9f)]){for(let _0x184f7d of _0x174ff7[_0x5a7657(0xa4)]){let _0x3a8298={'ma_tc':_0x184f7d['TChat'][0x0],'ma_vt':_0x184f7d[_0x5a7657(0x13a)][0x0],'ten_vt':_0x184f7d[_0x5a7657(0xc0)][0x0],'ma_dvt':_0x184f7d[_0x5a7657(0xf1)][0x0]||'','sl_xuat':Number(_0x184f7d[_0x5a7657(0xa5)][0x0]||0x0),'gia_ban_ct':_0x29c73b[_0x5a7657(0xce)](Number,_0x184f7d[_0x5a7657(0xb1)][0x0]||0x0),'gia_ban_ct_nt':_0x29c73b[_0x5a7657(0xe1)](Number,_0x184f7d['DGia'][0x0]||0x0),'ty_le_ck':_0x29c73b['NOWNy'](Number,_0x184f7d[_0x5a7657(0xcc)][0x0]||0x0),'tien_ck':_0x29c73b[_0x5a7657(0xc1)](Number,_0x184f7d[_0x5a7657(0x98)][0x0]||0x0),'tien_ck_nt':Number(_0x184f7d[_0x5a7657(0x98)][0x0]||0x0),'ma_thue':(_0x184f7d[_0x5a7657(0xcd)][0x0]||'')[_0x5a7657(0x138)]('%','')};_0x3a8298['tien_ct']=_0x3a8298[_0x5a7657(0x106)]=_0x29c73b[_0x5a7657(0xc1)](Number,_0x184f7d[_0x5a7657(0xa0)][0x0]||0x0),_0x3a8298[_0x5a7657(0x101)]=Number(_0x3a8298[_0x5a7657(0xf5)]||0x0),_0x3a8298['tien_thue_nt']=_0x3a8298[_0x5a7657(0x119)]=Math['round'](_0x29c73b['tNgLx'](_0x3a8298[_0x5a7657(0x101)],_0x3a8298[_0x5a7657(0x106)])/0x64),_0x3a8298[_0x5a7657(0xfa)]=_0x3a8298[_0x5a7657(0xe5)]=_0x29c73b[_0x5a7657(0xe6)](_0x29c73b[_0x5a7657(0x90)](_0x3a8298[_0x5a7657(0x106)],_0x3a8298[_0x5a7657(0x13d)]),_0x3a8298[_0x5a7657(0xf9)]),_0x560374[_0x5a7657(0x12b)][_0x5a7657(0x102)](_0x3a8298);}}_0x560374[_0x5a7657(0x100)]=_0x560374[_0x5a7657(0xb7)]=_0x560374[_0x5a7657(0x12b)][_0x5a7657(0x11d)](_0xd0b9ad=>_0xd0b9ad[_0x5a7657(0x106)])[_0x5a7657(0xe9)]((_0x176623,_0x2798aa)=>_0x176623+_0x2798aa,0x0),_0x560374[_0x5a7657(0x125)]=_0x560374[_0x5a7657(0x10d)]=_0x560374[_0x5a7657(0x12b)][_0x5a7657(0x11d)](_0x2ee8d0=>_0x2ee8d0[_0x5a7657(0xf9)])['reduce']((_0x460dad,_0x5ef5b9)=>_0x460dad+_0x5ef5b9,0x0),_0x598acc[_0x5a7657(0x102)](_0x560374);}}_0x1ff6e0(null,_0x598acc);}catch(_0x466d4b){_0x29c73b[_0x5a7657(0x97)](_0x1ff6e0,_0x466d4b);}});},(_0x3846a3,_0x58677f)=>{const _0x23a176=_0x5abf6f;if(_0x3846a3)return _0x1a3bb0(_0x3846a3);let _0x5cb666=_0x58677f['reduce']((_0x499b42,_0x26601c)=>_0x499b42[_0x23a176(0xaf)](_0x26601c),[]);_0x33586b[_0x23a176(0xf2)](_0x3c305f,_0x5cb666);});}catch(_0x35b740){if(_0x33586b[_0x5abf6f(0x10c)](_0x33586b[_0x5abf6f(0x11b)],_0x5abf6f(0x91)))throw _0x33586b[_0x5abf6f(0x136)];else _0x1a3bb0(_0x35b740);}});};function _0x51c4(_0x5861c7,_0x2265b2){const _0x23e096=_0x23e0();return _0x51c4=function(_0x51c4d4,_0x12c882){_0x51c4d4=_0x51c4d4-0x90;let _0x21fff1=_0x23e096[_0x51c4d4];if(_0x51c4['GxXHQR']===undefined){var _0x340e2a=function(_0x1b0c1c){const _0x23c741='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x47d23c='',_0x16dac3='';for(let _0x26a05f=0x0,_0x19cd2e,_0x3d1b63,_0xc112fc=0x0;_0x3d1b63=_0x1b0c1c['charAt'](_0xc112fc++);~_0x3d1b63&&(_0x19cd2e=_0x26a05f%0x4?_0x19cd2e*0x40+_0x3d1b63:_0x3d1b63,_0x26a05f++%0x4)?_0x47d23c+=String['fromCharCode'](0xff&_0x19cd2e>>(-0x2*_0x26a05f&0x6)):0x0){_0x3d1b63=_0x23c741['indexOf'](_0x3d1b63);}for(let _0x22f209=0x0,_0x354fba=_0x47d23c['length'];_0x22f209<_0x354fba;_0x22f209++){_0x16dac3+='%'+('00'+_0x47d23c['charCodeAt'](_0x22f209)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x16dac3);};_0x51c4['apienK']=_0x340e2a,_0x5861c7=arguments,_0x51c4['GxXHQR']=!![];}const _0x27bb8e=_0x23e096[0x0],_0x52da9c=_0x51c4d4+_0x27bb8e,_0x861afb=_0x5861c7[_0x52da9c];return!_0x861afb?(_0x21fff1=_0x51c4['apienK'](_0x21fff1),_0x5861c7[_0x52da9c]=_0x21fff1):_0x21fff1=_0x861afb,_0x21fff1;},_0x51c4(_0x5861c7,_0x2265b2);}exports[_0x1da1a4(0xb2)]=getInvoices;function _0x23e0(){const _0x52c5be=['Df90AhvL','pc9Wyxr0zxjUpGOGicaGicaGicaGica8C2vYAwfSpG','tNfYCxu','r2v0sw52vMLLD0j5rgf0zvjLC3vSDa','s2JdTg5NigZHUQv5imsrXRdHU6nJiglHUQnUzYbOW7nHimsrXQfUicHZywKGBEg6Q3uGC+g7KsK','ufPmB0i','u0HeB24','mtuYmte5mJbPzwHAyK8','DxrMoa','EfnJv0W','vhLgsg0','suPktw0','DgLLBL90AhvL','DM5WDf91CMXFC2vYDMLJzq','se5RwMK','s0Hirg9U','BwfW','pc91C2vYtMfTzt4kicaGicaGicaGicaGphvZzxjqyxnZpG','mJuZoxzzB2ftBG','Dg9tDhjPBMC','s0Hnu0HeB24','DM5WDf91C2vY','vNzVtLy','u3L1t20','Df90AhvLx250','zgf0yq','q2JgSgeGA2HHAsbIW6fVig3dOYbZ4BUrihrODEg6VYbJW7rUzYb0Eq','z0jbDhy','zgvUx25NyxK','uNblru8','zgv0ywLSCW','z2rWB2S','Eez4sgS','A3LFAgLLDv9OB2fFzg9U','zxHWB3j0sw52B2LJzq','Ee15sM8','D1vUBw4','vfrlAgfJ','vfrVyw4','vMj3seO','pc9MCM9Trgf0zt4kicaGicaGicaGicaGphrVrgf0zt4','vxb3r3i','tKXHCa','CMvWBgfJzq','rvjsoG','tuHirfz1','s1jnzw0','Aw5KzxHpzG','DgLLBL9JA19UDa','BK94C2K','sKnwDKm','q2JgSgeGA2HHAsbIW6fVihrOW7rUzYb0Aw4GA+g6V3qGBUg7KwKGvK5qvcbPBNzVAwnL','C3noEwG','wur1Deq','mJa4odeYmxP1D29jvG','DM5WDf9REv9OAwv1x2HVyv9KB24','wvvKCeC','u1rds2HHDq','zM9YBwf0','DM5WDf9WyxnZD29Yza','serVBG','r0zJAhO','mJaYnJmYnevsyvfurW','Bw9Tzw50','rfniserwDq','vgHuAwvU','mtjKEuDuDLe','reXPzxu','vSAW4BUJDcbXDCoHigDP4BUBAsbO4BQHBIa3ig5NW6b5','seHevNu','u0X1B25N','B2ner3O','DgLUALa','suX0wNi','u0ruAg9HAq','Ehnmtfe','BgvUz3rO','rgTgC3y','CMvXDwvZDa','veHzB1e','y29Uy2f0','rwrgAKu','reDPyq','z2v0sw52B2LJzxm','rgrRwMK','reqVtu0VwvLzwq','yxn5BMm','Bxjeyxa','Df90AwvU','vKvqBgS','B3L1s0e','veXes2e','q2JgSgeGDhjP4BUdBIbRAgfP','mte0mJqWotbfvhbzDvu','u29jBuS','rKLwB0O','tKzAvvu','veHirfz1','tK9xtNK','tKrirg9U','EML1uMW','vfrYDw9UzW','BwfFC29FDgH1zq','vfrPBG','revdq00','tK5xsfq','vgvU','wfjyq04','qLH3t2y','veXds2HHDq','vfn1yxq','AfjsqKi','wuXOvM8','vK5e','q2JgSgeGA2HHAsbIW6fVigVdRsbOAEg7H3uGAg/dOsdeKCAHBG','AfP6Evy','vvvxr2e','q3nlDMC','BvPUtfu','vgHP4BQ/Dsb0Amo0BMCGDgLUigpdTg5Nihr5','vfrdAhvUzW','q1rLv1y','swv0AKu','BKzvvMK','vSAW4BUJDcbXDCoHigDP4BUBAsbO4BQHBIbZ4BUrigZgSog7O25NigJdS2eGXjhgOw4GXjhgSog7O2mGCgJdQxaGBog6PxKGkduWmcbOW7nHimsrXQfUkq','tK11yq','vNbQy0S','C29FC2vYAwfS','mtKWr3beCu1Z','C29HCdPfBNzLBg9Wzq','qxDsrgi','C29HCdPcB2r5','s2nRt1i','tvLRtxu','DgLLBL9UDa','re5bsvy','wuDmvMy','renOAq','CMvKDwnL','XjbP4BUbDsbRAEg7H24GDgHP4BQ/Dsb04BURig5NW6b5icH0Dv9Uz2f5kq','CwT4AM4','t29hC2S','vmoGAsbRAg/HUQnUimsrXinUzYbUAog6RxaGC2fPigHV4BQ3yYbRAmo0BMCGy8oZihf1EEg7Gw4Gu2vYDMLJzvjVBgu','wKXesue','r1bvAuy','z25OA2e','rfzuAw5O','BLjkyve','pc91C2vYugfZCZ4kicaGicaGicaGicaGphbHDhrLCM4+','zwTvEvK','BwfFDgH1zq','reXirg9U','rMTLEq','nJi2nJKWn2vlqNnLrW','DgLLBL90AhvLx250','DgLLBG','wuPNrKi','XjbP4BUbDsbRAEg7H24GDgHP4BQ/Dsb04BURig5NW6b5icHKzw5FBMDHEsK','ywPbqum','Ahr0CdOVl3rLBxb1CMKUB3jNl0DLDeLUDLzPzxDcEurHDgu','zNjVBq','Df90AwvUx250','DgH1zv9ZDwf0','ChvZAa','nZm0mtb6yLvbrge','u2fPimsr4BUlBMGGzog6Ow5Nig5NW6b5ihrOW6fUzW','pc90B0rHDgu+cIaGicaGicaGicaGidWVr2v0sw52vMLLD0j5rgf0zt4kicaGicaGica8l3nVyxa6qM9KEt4kicaGicaGica8l3nVyxa6rw52zwXVCgu+','DgLLBL9JDf9UDa','tKjHBG','tvnu','sfruvg9HBG','m3PnuMzOuG','Cg9ZDa','t2jiEfa'];_0x23e0=function(){return _0x52c5be;};return _0x23e0();}