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.
- package/package.json +2 -1
- package/server/app.js +1 -22
- package/server/auths/bearer.js +1 -3
- package/server/auths/facebook.js +1 -12
- package/server/auths/google.js +1 -13
- package/server/auths/local.js +1 -64
- package/server/cluster.js +1 -27
- package/server/controllers/controller.js +1 -107
- package/server/controllers/controllerRPT.js +1 -27
- package/server/controllers/controllerUtils.js +1 -76
- package/server/controllers/createHandler.js +1 -35
- package/server/controllers/createRouteHandler.js +1 -4
- package/server/controllers/deleteHandler.js +1 -11
- package/server/controllers/deleteManyHandler.js +1 -2
- package/server/controllers/exportHandler.js +1 -17
- package/server/controllers/findHandler.js +1 -53
- package/server/controllers/handlers.js +1 -3
- package/server/controllers/historyHandler.js +1 -5
- package/server/controllers/importFromExcelHandler.js +1 -14
- package/server/controllers/importFromGsHandler.js +1 -10
- package/server/controllers/importFromJsonHandler.js +1 -7
- package/server/controllers/importHandler.js +1 -21
- package/server/controllers/logHandler.js +1 -5
- package/server/controllers/rptCreateRouteHandler.js +1 -4
- package/server/controllers/rptExcelHandler.js +1 -32
- package/server/controllers/rptHandler.js +1 -13
- package/server/controllers/updateBookHandler.js +1 -10
- package/server/controllers/updateFieldHandler.js +1 -12
- package/server/controllers/updateHandler.js +1 -39
- package/server/controllers/updateKeyHandler.js +1 -14
- package/server/controllers/viewHandler.js +1 -13
- package/server/flow/FlowEngine.js +1 -64
- package/server/flow/WebhookManager.js +1 -26
- package/server/flow/handlers.js +1 -3
- package/server/flow/nodes/aiAnalysis.js +1 -9
- package/server/flow/nodes/customer.js +1 -15
- package/server/flow/nodes/data.js +1 -14
- package/server/flow/nodes/debug.js +1 -2
- package/server/flow/nodes/delay.js +1 -3
- package/server/flow/nodes/email.js +1 -9
- package/server/flow/nodes/event.js +1 -11
- package/server/flow/nodes/facebook.js +1 -3
- package/server/flow/nodes/facebookConversations.js +1 -5
- package/server/flow/nodes/facebookCreatePost.js +1 -10
- package/server/flow/nodes/facebookSendMessage.js +1 -12
- package/server/flow/nodes/forEachItem.js +1 -8
- package/server/flow/nodes/function.js +1 -4
- package/server/flow/nodes/httprequest.js +1 -7
- package/server/flow/nodes/inject.js +1 -12
- package/server/flow/nodes/pushNotification.js +1 -5
- package/server/flow/nodes/report.js +1 -6
- package/server/flow/nodes/saveData.js +1 -2
- package/server/flow/nodes/switch.js +1 -20
- package/server/flow/nodes/webhook.js +1 -1
- package/server/flow/nodes/zaloSendMessage.js +1 -4
- package/server/flow/utils.js +1 -2
- package/server/global.js +1 -23
- package/server/libs/BlockchainTransactionPool.js +1 -3
- package/server/libs/WorkerPool.js +1 -4
- package/server/libs/WorkerStaticPool.js +1 -16
- package/server/libs/WorkerStaticPool_v1.js +1 -5
- package/server/libs/assbonus.js +1 -7
- package/server/libs/backup.js +1 -2
- package/server/libs/blockchainconnect.js +1 -12
- package/server/libs/cdpsdiem.js +1 -5
- package/server/libs/cdpsdt.js +1 -7
- package/server/libs/cdpskh.js +1 -9
- package/server/libs/cdpsnphep.js +1 -6
- package/server/libs/cdpstk.js +1 -11
- package/server/libs/ckcn.js +1 -12
- package/server/libs/ckdiem.js +1 -5
- package/server/libs/ckdt.js +1 -6
- package/server/libs/cknphep.js +1 -6
- package/server/libs/cktk.js +1 -4
- package/server/libs/cktt.js +1 -9
- package/server/libs/ckvt.js +1 -12
- package/server/libs/ckvtcapphat.js +1 -6
- package/server/libs/ckvtnpp.js +1 -8
- package/server/libs/ckvttt.js +1 -11
- package/server/libs/createSocaitheongay.js +1 -9
- package/server/libs/ctdiem.js +1 -5
- package/server/libs/ctvt.js +1 -7
- package/server/libs/ctvtnpp.js +1 -7
- package/server/libs/ctvttt.js +1 -7
- package/server/libs/databanle.js +1 -17
- package/server/libs/databanlenpp.js +1 -8
- package/server/libs/databanletheongay.js +1 -27
- package/server/libs/dkcn.js +1 -10
- package/server/libs/dkdiem.js +1 -5
- package/server/libs/dkdt.js +1 -6
- package/server/libs/dknphep.js +1 -7
- package/server/libs/dktk.js +1 -4
- package/server/libs/dktt.js +1 -8
- package/server/libs/dkvt.js +1 -9
- package/server/libs/dkvtnpp.js +1 -7
- package/server/libs/dkvttt.js +1 -7
- package/server/libs/dncn.js +1 -6
- package/server/libs/dntk.js +1 -4
- package/server/libs/dntt.js +1 -6
- package/server/libs/docs.js +1 -452
- package/server/libs/dstkcn.js +1 -1
- package/server/libs/dstktt.js +1 -1
- package/server/libs/dtbanletheonpp.js +1 -17
- package/server/libs/dtbanletheosp.js +1 -15
- package/server/libs/dtbanletheospnpp.js +1 -15
- package/server/libs/email.js +1 -3
- package/server/libs/excel.js +1 -2
- package/server/libs/getGiaban.js +1 -67
- package/server/libs/getGiabanAsync.js +1 -1
- package/server/libs/getNotifies.js +1 -1
- package/server/libs/htmlReport.js +1 -9
- package/server/libs/initDatabase.js +1 -9
- package/server/libs/invoiceEasy.js +1 -109
- package/server/libs/invoiceViettel.js +1 -29
- package/server/libs/invoiceVnpt.js +1 -22
- package/server/libs/kpistatus.js +1 -32
- package/server/libs/load-template.js +1 -3
- package/server/libs/mailmanagement.js +1 -13
- package/server/libs/mongooseDeletePost.js +1 -6
- package/server/libs/mongooseLeanId.js +1 -1
- package/server/libs/mongoosePatch.js +1 -8
- package/server/libs/onepay-payment.js +1 -4
- package/server/libs/optimizeBookkeeping.js +1 -14
- package/server/libs/parse-template.js +1 -5
- package/server/libs/permission.js +1 -51
- package/server/libs/phanbokh.js +1 -3
- package/server/libs/post-book.js +1 -23
- package/server/libs/post-socai.js +1 -25
- package/server/libs/post-sokho.js +1 -27
- package/server/libs/prototypes.js +1 -29
- package/server/libs/psdt.js +1 -1
- package/server/libs/pskh.js +1 -1
- package/server/libs/pstk.js +1 -1
- package/server/libs/redis-cache.js +1 -17
- package/server/libs/restore.js +1 -1
- package/server/libs/schedule.js +1 -18
- package/server/libs/sessionContext.js +2 -14
- package/server/libs/textReport.js +1 -3
- package/server/libs/thnxt.js +1 -9
- package/server/libs/thnxtnpp.js +1 -9
- package/server/libs/thnxttt.js +1 -8
- package/server/libs/tinhGt.js +1 -7
- package/server/libs/tinhGtCapnhatPNK.js +1 -7
- package/server/libs/tinhGtPhanboHeSo.js +1 -12
- package/server/libs/tinhGtPhanboSltp.js +1 -10
- package/server/libs/tinhGtPhanboYtcp.js +1 -11
- package/server/libs/tinhGtSltk.js +1 -9
- package/server/libs/tinhGtThcppstk.js +1 -10
- package/server/libs/tinhGtTrucTiep.js +1 -7
- package/server/libs/tinhGtXoa.js +1 -3
- package/server/libs/tinhgiatb.js +1 -38
- package/server/libs/tinhgiatb1vt.js +1 -5
- package/server/libs/tinhhoahong.js +1 -64
- package/server/libs/tinhhoahongnpp.js +1 -46
- package/server/libs/tinhkhauhao1ts.js +1 -12
- package/server/libs/tinhkhauhaots.js +1 -8
- package/server/libs/tuoinophaithu.js +1 -10
- package/server/libs/tuoinophaitra.js +1 -11
- package/server/libs/utils.js +1 -78
- package/server/libs/validate.js +1 -4
- package/server/libs/validator-acc-cust.js +1 -1
- package/server/libs/validator-account.js +1 -4
- package/server/libs/validator-vt.js +1 -2
- package/server/libs/validator.js +1 -11
- package/server/libs/vsocai.js +1 -8
- package/server/models/account.js +1 -7
- package/server/models/afflink.js +1 -2
- package/server/models/app.js +1 -15
- package/server/models/approve.js +1 -93
- package/server/models/assabcihandler.js +1 -35
- package/server/models/assbank.js +1 -19
- package/server/models/assbooking.js +1 -4
- package/server/models/assbuy.js +1 -3
- package/server/models/asscashwithdraw.js +1 -4
- package/server/models/assfindhash.js +1 -2
- package/server/models/assinvestment.js +1 -13
- package/server/models/assissue.js +1 -2
- package/server/models/asskey.js +1 -15
- package/server/models/assneedtobuy.js +1 -6
- package/server/models/assperiod.js +1 -7
- package/server/models/assproduct.js +1 -13
- package/server/models/assprofitsharing.js +1 -4
- package/server/models/assreceiver.js +1 -2
- package/server/models/assrequest.js +1 -11
- package/server/models/asssell.js +1 -7
- package/server/models/asstransaction.js +1 -3
- package/server/models/asstransfer.js +1 -4
- package/server/models/assuser_identity.js +1 -4
- package/server/models/asswithdraw.js +1 -4
- package/server/models/attend.js +1 -2
- package/server/models/banggiaban.js +1 -8
- package/server/models/bangtinhluong.js +1 -6
- package/server/models/base.js +1 -1
- package/server/models/bds_area.js +1 -4
- package/server/models/bds_block.js +1 -3
- package/server/models/bds_building.js +1 -4
- package/server/models/bds_floor.js +1 -3
- package/server/models/bds_floordetail.js +1 -9
- package/server/models/bds_nhadat.js +1 -11
- package/server/models/bds_nhomnhadat.js +1 -4
- package/server/models/bds_phanloainhadat.js +1 -3
- package/server/models/bg1.js +1 -9
- package/server/models/bg2.js +1 -10
- package/server/models/cache.js +1 -3
- package/server/models/calllog.js +1 -4
- package/server/models/campaign.js +1 -6
- package/server/models/cart.js +1 -5
- package/server/models/cddiem.js +1 -2
- package/server/models/cddt.js +1 -3
- package/server/models/cdkh.js +1 -5
- package/server/models/cdkhtheongay.js +1 -5
- package/server/models/cdnphep.js +1 -2
- package/server/models/cdtk.js +1 -3
- package/server/models/cdtktheongay.js +1 -3
- package/server/models/cdvt.js +1 -5
- package/server/models/cdvtnpp.js +1 -6
- package/server/models/cdvttheongay.js +1 -5
- package/server/models/chamcong.js +1 -7
- package/server/models/checkin.js +1 -4
- package/server/models/checkinactivity.js +1 -3
- package/server/models/checkinkpi.js +1 -4
- package/server/models/checkinlocation.js +1 -2
- package/server/models/chitieukpi.js +1 -3
- package/server/models/chudethaoluan.js +1 -3
- package/server/models/ckgtluong.js +1 -2
- package/server/models/colleague.js +1 -2
- package/server/models/comment.js +1 -4
- package/server/models/congdoansx.js +1 -4
- package/server/models/congtacvien.js +1 -4
- package/server/models/congthuctinhgiaban.js +1 -8
- package/server/models/consultant.js +1 -4
- package/server/models/contract.js +1 -6
- package/server/models/counter.js +1 -2
- package/server/models/ctds.js +1 -5
- package/server/models/ctds2.js +1 -6
- package/server/models/currency.js +1 -3
- package/server/models/customer.js +1 -31
- package/server/models/databanle.js +1 -8
- package/server/models/datlich.js +1 -4
- package/server/models/department.js +1 -4
- package/server/models/dh2.js +1 -20
- package/server/models/diagram.js +1 -2
- package/server/models/dinhmucsx.js +1 -8
- package/server/models/dkhoc.js +1 -6
- package/server/models/dknphep.js +1 -2
- package/server/models/dmban.js +1 -4
- package/server/models/dmbp.js +1 -12
- package/server/models/dmca.js +1 -2
- package/server/models/dmchietkhau.js +1 -9
- package/server/models/dmchietkhauhd.js +1 -20
- package/server/models/dmcpmh.js +1 -2
- package/server/models/dmdiemthuong.js +1 -5
- package/server/models/dmdoi.js +1 -4
- package/server/models/dmdoituongdanhgia.js +1 -2
- package/server/models/dmdt.js +1 -8
- package/server/models/dmdvt.js +1 -3
- package/server/models/dmgiaban.js +1 -9
- package/server/models/dmgiamua.js +1 -5
- package/server/models/dmgiathitruong.js +1 -5
- package/server/models/dmgiathitruong_ngay.js +1 -2
- package/server/models/dmgiathitruong_theodoi.js +1 -2
- package/server/models/dmhoahonghd.js +1 -9
- package/server/models/dmhoahongnpp.js +1 -9
- package/server/models/dmkc.js +1 -3
- package/server/models/dmkho.js +1 -6
- package/server/models/dmkhuyenmai.js +1 -9
- package/server/models/dmkhuyenmaihd.js +1 -11
- package/server/models/dmletet.js +1 -2
- package/server/models/dmlo.js +1 -4
- package/server/models/dmloaicong.js +1 -4
- package/server/models/dmloaitask.js +1 -2
- package/server/models/dmloaits.js +1 -2
- package/server/models/dmnckkm.js +1 -4
- package/server/models/dmnghiepvu.js +1 -4
- package/server/models/dmnguonvon.js +1 -2
- package/server/models/dmnhnv.js +1 -4
- package/server/models/dmnv.js +1 -17
- package/server/models/dmnvt.js +1 -9
- package/server/models/dmphatdichvu.js +1 -5
- package/server/models/dmphi.js +1 -3
- package/server/models/dmqct.js +1 -3
- package/server/models/dmqddvt.js +1 -3
- package/server/models/dmtanggiamts.js +1 -3
- package/server/models/dmto.js +1 -4
- package/server/models/dmtt.js +1 -6
- package/server/models/dmvt.js +1 -17
- package/server/models/dmyt.js +1 -4
- package/server/models/dn0.js +1 -13
- package/server/models/dnm.js +1 -11
- package/server/models/dokho.js +1 -2
- package/server/models/domain.js +1 -2
- package/server/models/dvcs.js +1 -3
- package/server/models/ecomcategories.js +1 -3
- package/server/models/ecomcategories_cty.js +1 -3
- package/server/models/ecomproductlines.js +1 -2
- package/server/models/ecompromotion_flashsales.js +1 -2
- package/server/models/ecompromotion_freeships.js +1 -2
- package/server/models/email.js +1 -2
- package/server/models/endpoint.js +1 -1
- package/server/models/events.js +1 -3
- package/server/models/evoucher.js +1 -5
- package/server/models/experiencejourney.js +1 -2
- package/server/models/experiencejourneydata.js +1 -4
- package/server/models/experiencejourneypersona.js +1 -3
- package/server/models/experiencejourneystage.js +1 -2
- package/server/models/exportexceltemplate.js +1 -2
- package/server/models/fbconversation.js +1 -15
- package/server/models/fbmessage.js +1 -2
- package/server/models/fbpage.js +1 -2
- package/server/models/fbpost.js +1 -2
- package/server/models/fieldright.js +1 -2
- package/server/models/file.js +1 -4
- package/server/models/financialroadmap.js +1 -3
- package/server/models/flow.js +1 -2
- package/server/models/flowdata.js +1 -3
- package/server/models/folder.js +1 -4
- package/server/models/follow.js +1 -2
- package/server/models/form.js +1 -3
- package/server/models/forminfo.js +1 -5
- package/server/models/formvalue.js +1 -3
- package/server/models/giaoca.js +1 -4
- package/server/models/giatb.js +1 -3
- package/server/models/group.js +1 -11
- package/server/models/gt_ctgt.js +1 -4
- package/server/models/gt_hspb.js +1 -3
- package/server/models/gt_sltk.js +1 -3
- package/server/models/gt_thcppstk.js +1 -3
- package/server/models/hanmucton.js +1 -4
- package/server/models/hd1.js +1 -11
- package/server/models/hd2.js +1 -27
- package/server/models/hd3.js +1 -18
- package/server/models/hd4.js +1 -13
- package/server/models/hd7.js +1 -17
- package/server/models/hd8.js +1 -12
- package/server/models/hde.js +1 -11
- package/server/models/hlink.js +1 -2
- package/server/models/hlinkvalue.js +1 -2
- package/server/models/hmcn.js +1 -3
- package/server/models/hmcnct.js +1 -2
- package/server/models/hspbts.js +1 -4
- package/server/models/htl.js +1 -13
- package/server/models/importexceltemplate.js +1 -2
- package/server/models/introducebonus.js +1 -4
- package/server/models/introducecode.js +1 -3
- package/server/models/introducer.js +1 -4
- package/server/models/kbbtpb.js +1 -7
- package/server/models/kbmPttct.js +1 -4
- package/server/models/kbmTkgtgt.js +1 -5
- package/server/models/kbm_bcdkt.js +1 -4
- package/server/models/kbm_kqhdkd.js +1 -3
- package/server/models/kbm_lcttgt.js +1 -5
- package/server/models/kbm_lctttt.js +1 -4
- package/server/models/kbm_pttct.js +1 -4
- package/server/models/kbm_tkgtgt.js +1 -5
- package/server/models/kbmbcdkt.js +1 -4
- package/server/models/kbmbcqt.js +1 -4
- package/server/models/kbmkqhdkd.js +1 -3
- package/server/models/kbmlcttgt.js +1 -6
- package/server/models/kbmlctttt.js +1 -4
- package/server/models/kbmtmbctc.js +1 -4
- package/server/models/kehoachdtcp.js +1 -3
- package/server/models/kehoachmh.js +1 -8
- package/server/models/keyresult.js +1 -7
- package/server/models/khunghangthanhvien.js +1 -3
- package/server/models/label.js +1 -2
- package/server/models/labelinfo.js +1 -2
- package/server/models/lenhcapphat.js +1 -8
- package/server/models/lenhsx.js +1 -8
- package/server/models/lienhe.js +1 -4
- package/server/models/like_module.js +1 -2
- package/server/models/link.js +1 -2
- package/server/models/loaidiem.js +1 -2
- package/server/models/lock.js +1 -2
- package/server/models/log.js +1 -5
- package/server/models/mailaccount.js +1 -3
- package/server/models/mailgroup.js +1 -3
- package/server/models/mailreceived.js +1 -2
- package/server/models/mailschedule.js +1 -2
- package/server/models/mailsent.js +1 -2
- package/server/models/mailtemplate.js +1 -2
- package/server/models/maudanhgia.js +1 -2
- package/server/models/menuinfo.js +1 -2
- package/server/models/message.js +1 -8
- package/server/models/message2.js +1 -4
- package/server/models/message2setting.js +1 -3
- package/server/models/moduleinfo.js +1 -4
- package/server/models/momo.js +1 -17
- package/server/models/news.js +1 -3
- package/server/models/newsfeed.js +1 -4
- package/server/models/note.js +1 -2
- package/server/models/notification.js +1 -7
- package/server/models/okr.js +1 -4
- package/server/models/okrdiagram.js +1 -3
- package/server/models/onepay.js +1 -24
- package/server/models/opportunity.js +1 -4
- package/server/models/options.js +1 -2
- package/server/models/originimportid.js +1 -1
- package/server/models/otp.js +1 -1
- package/server/models/parameter.js +1 -2
- package/server/models/participant.js +1 -20
- package/server/models/partner.js +1 -1
- package/server/models/payload.js +1 -1
- package/server/models/pbl.js +1 -16
- package/server/models/pc0.js +1 -13
- package/server/models/pc1.js +1 -14
- package/server/models/pc2.js +1 -13
- package/server/models/pc3.js +1 -13
- package/server/models/pc5.js +1 -8
- package/server/models/pc6.js +1 -14
- package/server/models/pcl.js +1 -6
- package/server/models/pdn.js +1 -9
- package/server/models/pdx.js +1 -9
- package/server/models/pgh.js +1 -5
- package/server/models/phieudanhgia.js +1 -3
- package/server/models/pht.js +1 -8
- package/server/models/phucap.js +1 -4
- package/server/models/pkc.js +1 -6
- package/server/models/pkh.js +1 -6
- package/server/models/pkk.js +1 -10
- package/server/models/pkt.js +1 -12
- package/server/models/pn1.js +1 -17
- package/server/models/pn2.js +1 -11
- package/server/models/pn3.js +1 -13
- package/server/models/pn5.js +1 -14
- package/server/models/pn6.js +1 -14
- package/server/models/pn9.js +1 -17
- package/server/models/pnc.js +1 -10
- package/server/models/pnh.js +1 -12
- package/server/models/pnk.js +1 -10
- package/server/models/po1.js +1 -19
- package/server/models/ppb.js +1 -6
- package/server/models/profile.js +1 -4
- package/server/models/pt1.js +1 -12
- package/server/models/pt5.js +1 -8
- package/server/models/ptl.js +1 -6
- package/server/models/ptthanhtoan.js +1 -6
- package/server/models/purchase_contract.js +1 -17
- package/server/models/pxc.js +1 -9
- package/server/models/pxh.js +1 -12
- package/server/models/pxk.js +1 -10
- package/server/models/qts.js +1 -14
- package/server/models/qts_dieuchinh.js +1 -3
- package/server/models/qts_dieuchuyen.js +1 -4
- package/server/models/quanhuyen.js +1 -2
- package/server/models/reason.js +1 -2
- package/server/models/receivedinvoice.js +1 -2
- package/server/models/reportinfo.js +1 -5
- package/server/models/right.js +1 -4
- package/server/models/rpt.js +1 -2
- package/server/models/rptform.js +1 -5
- package/server/models/rptobject.js +1 -2
- package/server/models/sale_contract.js +1 -9
- package/server/models/schedule.js +1 -16
- package/server/models/schedule_log.js +1 -2
- package/server/models/service.js +1 -4
- package/server/models/shipbook.js +1 -12
- package/server/models/shortcut.js +1 -2
- package/server/models/smsaccount.js +1 -10
- package/server/models/smssend.js +1 -2
- package/server/models/so1.js +1 -22
- package/server/models/so2.js +1 -10
- package/server/models/so3.js +1 -9
- package/server/models/so5.js +1 -15
- package/server/models/so9.js +1 -19
- package/server/models/socai.js +1 -26
- package/server/models/socainpp.js +1 -18
- package/server/models/socaitc.js +1 -6
- package/server/models/socaitmp.js +1 -16
- package/server/models/socaitt.js +1 -4
- package/server/models/sodiemthuong.js +1 -4
- package/server/models/sokho.js +1 -28
- package/server/models/sokhocapphat.js +1 -18
- package/server/models/sokhokhongton.js +1 -19
- package/server/models/sokhonpp.js +1 -19
- package/server/models/sokhotc.js +1 -8
- package/server/models/sokhott.js +1 -18
- package/server/models/sophanbokh.js +1 -3
- package/server/models/sosanxuat.js +1 -5
- package/server/models/sotinhkh.js +1 -2
- package/server/models/spdd_ck.js +1 -3
- package/server/models/spdd_dk.js +1 -3
- package/server/models/step.js +1 -2
- package/server/models/strategicdiagram.js +1 -3
- package/server/models/strategicgoal.js +1 -4
- package/server/models/strategickpi.js +1 -6
- package/server/models/strategicobjective.js +1 -5
- package/server/models/strategicplan.js +1 -5
- package/server/models/subscribe.js +1 -2
- package/server/models/support.js +1 -2
- package/server/models/synctime.js +1 -2
- package/server/models/sysconfig.js +1 -2
- package/server/models/sysgroup.js +1 -2
- package/server/models/tableinfo.js +1 -3
- package/server/models/task.js +1 -9
- package/server/models/taskreg.js +1 -4
- package/server/models/tc.js +1 -2
- package/server/models/tdttco.js +1 -8
- package/server/models/tdttco_tt.js +1 -5
- package/server/models/tdttno.js +1 -8
- package/server/models/tdttno_tt.js +1 -5
- package/server/models/templaterpt.js +1 -2
- package/server/models/templatestore.js +1 -3
- package/server/models/templatevoucher.js +1 -3
- package/server/models/tinhthanh.js +1 -2
- package/server/models/tokens.js +1 -2
- package/server/models/tontucthoi.js +1 -9
- package/server/models/trangthai.js +1 -4
- package/server/models/trangthaiapp.js +1 -4
- package/server/models/transaction.js +1 -16
- package/server/models/trialinfo.js +1 -2
- package/server/models/user.js +1 -38
- package/server/models/usergroup.js +1 -7
- package/server/models/vanchuyen.js +1 -12
- package/server/models/vat.js +1 -3
- package/server/models/vatra.js +1 -6
- package/server/models/vatvao.js +1 -6
- package/server/models/versioninfo.js +1 -2
- package/server/models/vietqrbanks.js +1 -2
- package/server/models/vsocai.js +1 -6
- package/server/models/waitevent.js +1 -2
- package/server/models/wallet.js +1 -8
- package/server/models/warranty.js +1 -3
- package/server/models/warrantyclaim.js +1 -2
- package/server/models/warrantypolicy.js +1 -1
- package/server/models/xaphuong.js +1 -2
- package/server/models/xhd.js +1 -10
- package/server/models/ytdd_ck.js +1 -4
- package/server/models/ytdd_dk.js +1 -4
- package/server/models/zalo.js +1 -17
- package/server/modules/lists/bg-cddiem.js +1 -6
- package/server/modules/lists/bg-cddt.js +1 -7
- package/server/modules/lists/bg-cdkh.js +1 -11
- package/server/modules/lists/bg-cdnphep.js +1 -6
- package/server/modules/lists/bg-cdtk.js +1 -9
- package/server/modules/lists/bg-cdvt.js +1 -8
- package/server/modules/lists/bg-cdvtnpp.js +1 -8
- package/server/modules/lists/ls-account.js +1 -4
- package/server/modules/lists/ls-afflink.js +1 -3
- package/server/modules/lists/ls-approve.js +1 -4
- package/server/modules/lists/ls-assabcihandler.js +1 -3
- package/server/modules/lists/ls-assbank.js +1 -3
- package/server/modules/lists/ls-assbooking.js +1 -20
- package/server/modules/lists/ls-assbuy.js +1 -8
- package/server/modules/lists/ls-asscashwithdraw.js +1 -8
- package/server/modules/lists/ls-assinvestment.js +1 -31
- package/server/modules/lists/ls-assissue.js +1 -3
- package/server/modules/lists/ls-asskey.js +1 -41
- package/server/modules/lists/ls-assneedtobuy.js +1 -10
- package/server/modules/lists/ls-assperiod.js +1 -19
- package/server/modules/lists/ls-assproduct.js +1 -9
- package/server/modules/lists/ls-assprofitsharing.js +1 -8
- package/server/modules/lists/ls-assreceiver.js +1 -3
- package/server/modules/lists/ls-assrequest.js +1 -4
- package/server/modules/lists/ls-asssell.js +1 -13
- package/server/modules/lists/ls-asstransaction.js +1 -3
- package/server/modules/lists/ls-asstransfer.js +1 -3
- package/server/modules/lists/ls-assuser_identity.js +1 -1
- package/server/modules/lists/ls-asswithdraw.js +1 -12
- package/server/modules/lists/ls-bangtinhluong.js +1 -2
- package/server/modules/lists/ls-bds_area.js +1 -3
- package/server/modules/lists/ls-bds_block.js +1 -1
- package/server/modules/lists/ls-bds_building.js +1 -3
- package/server/modules/lists/ls-bds_dmnhbds.js +1 -6
- package/server/modules/lists/ls-bds_floor.js +1 -2
- package/server/modules/lists/ls-bds_floordetail.js +1 -19
- package/server/modules/lists/ls-bds_nhadat.js +1 -16
- package/server/modules/lists/ls-bds_nhomnhadat.js +1 -1
- package/server/modules/lists/ls-bds_phanloainhadat.js +1 -1
- package/server/modules/lists/ls-calllog.js +1 -4
- package/server/modules/lists/ls-campaign.js +1 -1
- package/server/modules/lists/ls-cart.js +1 -14
- package/server/modules/lists/ls-chamcong.js +1 -3
- package/server/modules/lists/ls-checkin.js +1 -12
- package/server/modules/lists/ls-checkinactivity.js +1 -8
- package/server/modules/lists/ls-checkinkpi.js +1 -3
- package/server/modules/lists/ls-checkinlocation.js +1 -1
- package/server/modules/lists/ls-chitieukpi.js +1 -1
- package/server/modules/lists/ls-chudethaoluan.js +1 -1
- package/server/modules/lists/ls-ckgtluong.js +1 -1
- package/server/modules/lists/ls-comment.js +1 -9
- package/server/modules/lists/ls-congdoansx.js +1 -3
- package/server/modules/lists/ls-congtacvien.js +1 -5
- package/server/modules/lists/ls-consultant.js +1 -2
- package/server/modules/lists/ls-contract.js +1 -7
- package/server/modules/lists/ls-ctds.js +1 -4
- package/server/modules/lists/ls-ctds2.js +1 -4
- package/server/modules/lists/ls-currency.js +1 -1
- package/server/modules/lists/ls-customer.js +1 -21
- package/server/modules/lists/ls-datlich.js +1 -9
- package/server/modules/lists/ls-dckhauhaots.js +1 -3
- package/server/modules/lists/ls-department.js +1 -3
- package/server/modules/lists/ls-diagram.js +1 -1
- package/server/modules/lists/ls-dkhoc.js +1 -6
- package/server/modules/lists/ls-dknphep.js +1 -1
- package/server/modules/lists/ls-dmban.js +1 -4
- package/server/modules/lists/ls-dmbp.js +1 -7
- package/server/modules/lists/ls-dmca.js +1 -1
- package/server/modules/lists/ls-dmchietkhau.js +1 -19
- package/server/modules/lists/ls-dmchietkhauhd.js +1 -4
- package/server/modules/lists/ls-dmchucvu.js +1 -2
- package/server/modules/lists/ls-dmcpmh.js +1 -1
- package/server/modules/lists/ls-dmdiemthuong.js +1 -4
- package/server/modules/lists/ls-dmdoi.js +1 -4
- package/server/modules/lists/ls-dmdoituongdanhgia.js +1 -1
- package/server/modules/lists/ls-dmdt.js +1 -11
- package/server/modules/lists/ls-dmdvt.js +1 -2
- package/server/modules/lists/ls-dmgiaban.js +1 -4
- package/server/modules/lists/ls-dmgiamua.js +1 -4
- package/server/modules/lists/ls-dmgiathitruong.js +1 -15
- package/server/modules/lists/ls-dmgiathitruong_ngay.js +1 -2
- package/server/modules/lists/ls-dmgiathitruong_theodoi.js +1 -1
- package/server/modules/lists/ls-dmhoahonghd.js +1 -1
- package/server/modules/lists/ls-dmhoahongnpp.js +1 -1
- package/server/modules/lists/ls-dmkc.js +1 -3
- package/server/modules/lists/ls-dmkho.js +1 -1
- package/server/modules/lists/ls-dmkhuyenmai.js +1 -5
- package/server/modules/lists/ls-dmkhuyenmaihd.js +1 -3
- package/server/modules/lists/ls-dmletet.js +1 -1
- package/server/modules/lists/ls-dmlo.js +1 -1
- package/server/modules/lists/ls-dmloaicong.js +1 -1
- package/server/modules/lists/ls-dmloaits.js +1 -1
- package/server/modules/lists/ls-dmnckkm.js +1 -7
- package/server/modules/lists/ls-dmnghiepvu.js +1 -1
- package/server/modules/lists/ls-dmnguonvon.js +1 -1
- package/server/modules/lists/ls-dmnhnv.js +1 -6
- package/server/modules/lists/ls-dmnhtask.js +1 -5
- package/server/modules/lists/ls-dmnkh.js +1 -6
- package/server/modules/lists/ls-dmntt.js +1 -6
- package/server/modules/lists/ls-dmnv.js +1 -17
- package/server/modules/lists/ls-dmnvt.js +1 -8
- package/server/modules/lists/ls-dmphatdichvu.js +1 -3
- package/server/modules/lists/ls-dmphi.js +1 -6
- package/server/modules/lists/ls-dmqct.js +1 -2
- package/server/modules/lists/ls-dmqddvt.js +1 -3
- package/server/modules/lists/ls-dmtanggiamts.js +1 -1
- package/server/modules/lists/ls-dmto.js +1 -5
- package/server/modules/lists/ls-dmtt.js +1 -7
- package/server/modules/lists/ls-dmvt.js +1 -68
- package/server/modules/lists/ls-dmyt.js +1 -1
- package/server/modules/lists/ls-dokho.js +1 -1
- package/server/modules/lists/ls-dvcs.js +1 -1
- package/server/modules/lists/ls-ecomcategories.js +1 -5
- package/server/modules/lists/ls-ecomcategories_cty.js +1 -5
- package/server/modules/lists/ls-email.js +1 -4
- package/server/modules/lists/ls-events.js +1 -3
- package/server/modules/lists/ls-evoucher.js +1 -3
- package/server/modules/lists/ls-experiencejourney.js +1 -1
- package/server/modules/lists/ls-experiencejourneydata.js +1 -3
- package/server/modules/lists/ls-experiencejourneypersona.js +1 -4
- package/server/modules/lists/ls-experiencejourneystage.js +1 -1
- package/server/modules/lists/ls-fbconversation.js +1 -2
- package/server/modules/lists/ls-fbmessage.js +1 -2
- package/server/modules/lists/ls-fbpage.js +1 -11
- package/server/modules/lists/ls-fbpost.js +1 -2
- package/server/modules/lists/ls-file.js +1 -31
- package/server/modules/lists/ls-financialroadmap.js +1 -3
- package/server/modules/lists/ls-flow.js +1 -6
- package/server/modules/lists/ls-flowdata.js +1 -1
- package/server/modules/lists/ls-folder.js +1 -1
- package/server/modules/lists/ls-form.js +1 -1
- package/server/modules/lists/ls-forminfo.js +1 -1
- package/server/modules/lists/ls-formvalue.js +1 -1
- package/server/modules/lists/ls-giaoca.js +1 -4
- package/server/modules/lists/ls-group.js +1 -5
- package/server/modules/lists/ls-hlink.js +1 -1
- package/server/modules/lists/ls-hlinkvalue.js +1 -1
- package/server/modules/lists/ls-hmcn.js +1 -2
- package/server/modules/lists/ls-hspbts.js +1 -3
- package/server/modules/lists/ls-introducebonus.js +1 -4
- package/server/modules/lists/ls-introducecode.js +1 -10
- package/server/modules/lists/ls-introducer.js +1 -20
- package/server/modules/lists/ls-kbm-bcdkt.js +1 -1
- package/server/modules/lists/ls-kbm-bcqt.js +1 -5
- package/server/modules/lists/ls-kbm-kqhdkd.js +1 -1
- package/server/modules/lists/ls-kbm-lcttgt.js +1 -1
- package/server/modules/lists/ls-kbm-lctttt.js +1 -1
- package/server/modules/lists/ls-kbm-pttct.js +1 -3
- package/server/modules/lists/ls-kbm-tkgtgt.js +1 -3
- package/server/modules/lists/ls-kbm-tmbctc.js +1 -3
- package/server/modules/lists/ls-kehoachdtcp.js +1 -4
- package/server/modules/lists/ls-keyresult.js +1 -7
- package/server/modules/lists/ls-khunghangthanhvien.js +1 -1
- package/server/modules/lists/ls-kygui.js +1 -19
- package/server/modules/lists/ls-label.js +1 -1
- package/server/modules/lists/ls-lienhe.js +1 -4
- package/server/modules/lists/ls-like-module.js +1 -1
- package/server/modules/lists/ls-link.js +1 -1
- package/server/modules/lists/ls-loaidiem.js +1 -1
- package/server/modules/lists/ls-lock.js +1 -1
- package/server/modules/lists/ls-log.js +1 -3
- package/server/modules/lists/ls-mailaccount.js +1 -5
- package/server/modules/lists/ls-mailreceived.js +1 -5
- package/server/modules/lists/ls-mailschedule.js +1 -7
- package/server/modules/lists/ls-mailsent.js +1 -4
- package/server/modules/lists/ls-mailtemplate.js +1 -4
- package/server/modules/lists/ls-maudanhgia.js +1 -3
- package/server/modules/lists/ls-message2.js +1 -8
- package/server/modules/lists/ls-message2setting.js +1 -5
- package/server/modules/lists/ls-news.js +1 -7
- package/server/modules/lists/ls-newsfeed.js +1 -4
- package/server/modules/lists/ls-note.js +1 -6
- package/server/modules/lists/ls-okr.js +1 -5
- package/server/modules/lists/ls-okrdiagram.js +1 -1
- package/server/modules/lists/ls-opportunity.js +1 -5
- package/server/modules/lists/ls-options.js +1 -4
- package/server/modules/lists/ls-parameter.js +1 -3
- package/server/modules/lists/ls-participant.js +1 -10
- package/server/modules/lists/ls-phieudanhgia.js +1 -7
- package/server/modules/lists/ls-phucap.js +1 -2
- package/server/modules/lists/ls-profile.js +1 -1
- package/server/modules/lists/ls-ptthanhtoan.js +1 -3
- package/server/modules/lists/ls-qts-dieuchinh.js +1 -2
- package/server/modules/lists/ls-qts-dieuchuyen.js +1 -8
- package/server/modules/lists/ls-reason.js +1 -1
- package/server/modules/lists/ls-rpt.js +1 -5
- package/server/modules/lists/ls-rptform.js +1 -4
- package/server/modules/lists/ls-service.js +1 -3
- package/server/modules/lists/ls-shortcut.js +1 -1
- package/server/modules/lists/ls-smsaccount.js +1 -1
- package/server/modules/lists/ls-smssend.js +1 -3
- package/server/modules/lists/ls-sosanxuat.js +1 -4
- package/server/modules/lists/ls-step.js +1 -1
- package/server/modules/lists/ls-strategicdiagram.js +1 -1
- package/server/modules/lists/ls-strategicgoal.js +1 -3
- package/server/modules/lists/ls-strategickpi.js +1 -7
- package/server/modules/lists/ls-strategicobjective.js +1 -3
- package/server/modules/lists/ls-strategicplan.js +1 -6
- package/server/modules/lists/ls-support.js +1 -3
- package/server/modules/lists/ls-task.js +1 -34
- package/server/modules/lists/ls-taskreg.js +1 -2
- package/server/modules/lists/ls-tc.js +1 -1
- package/server/modules/lists/ls-templaterpt.js +1 -5
- package/server/modules/lists/ls-templatevoucher.js +1 -1
- package/server/modules/lists/ls-tontucthoi.js +1 -3
- package/server/modules/lists/ls-trangthaiapp.js +1 -3
- package/server/modules/lists/ls-transaction.js +1 -4
- package/server/modules/lists/ls-usergroup.js +1 -7
- package/server/modules/lists/ls-vat.js +1 -1
- package/server/modules/lists/ls-vatra.js +1 -5
- package/server/modules/lists/ls-vatvao.js +1 -6
- package/server/modules/lists/ls-waitevent.js +1 -1
- package/server/modules/lists/ls-warranty.js +1 -4
- package/server/modules/lists/ls_hanmucton.js +1 -3
- package/server/modules/lists/ls_hspb.js +1 -4
- package/server/modules/lists/ls_spdd_ck.js +1 -3
- package/server/modules/lists/ls_spdd_dk.js +1 -3
- package/server/modules/lists/ls_ytdd_ck.js +1 -4
- package/server/modules/lists/ls_ytdd_dk.js +1 -4
- package/server/modules/lists/sys-attend.js +1 -4
- package/server/modules/lists/sys-follow.js +1 -4
- package/server/modules/lists/sys-right.js +1 -2
- package/server/modules/public/app.js +1 -4
- package/server/modules/public/approve.js +1 -37
- package/server/modules/public/callin.js +1 -7
- package/server/modules/public/comment.js +1 -5
- package/server/modules/public/dmnvt.js +1 -4
- package/server/modules/public/dmvt.js +1 -9
- package/server/modules/public/file.js +1 -11
- package/server/modules/public/form.js +1 -7
- package/server/modules/public/forminfo.js +1 -1
- package/server/modules/public/group.js +1 -4
- package/server/modules/public/hlink.js +1 -3
- package/server/modules/public/introducecode.js +1 -1
- package/server/modules/public/listinfo.js +1 -1
- package/server/modules/public/media-webhook.js +1 -1
- package/server/modules/public/partner.js +1 -1
- package/server/modules/public/paymentCallback.js +1 -32
- package/server/modules/public/province.js +1 -1
- package/server/modules/public/ptthanhtoan.js +1 -4
- package/server/modules/public/subscribe.js +1 -30
- package/server/modules/public/support.js +1 -3
- package/server/modules/public/tableinfo.js +1 -1
- package/server/modules/public/trialinfo.js +1 -4
- package/server/modules/public/versioninfo.js +1 -1
- package/server/modules/reports/calc-tinhgiatb.js +1 -6
- package/server/modules/reports/calc-tinhgiathanh.js +1 -6
- package/server/modules/reports/calc-tinhkhauhaots.js +1 -3
- package/server/modules/reports/calc-tinhluong.js +1 -37
- package/server/modules/reports/rp-analyzedata.js +1 -6
- package/server/modules/reports/rp-assbonus.js +1 -4
- package/server/modules/reports/rp-assinterest.js +1 -8
- package/server/modules/reports/rp-assproductowners.js +1 -3
- package/server/modules/reports/rp-asssupply.js +1 -1
- package/server/modules/reports/rp-asstransferlog.js +1 -10
- package/server/modules/reports/rp-banggiatb.js +1 -3
- package/server/modules/reports/rp-bangtinhkhauhao.js +1 -6
- package/server/modules/reports/rp-baocaokhachhang.js +1 -6
- package/server/modules/reports/rp-bcdkt.js +1 -11
- package/server/modules/reports/rp-bcintroducebonus.js +1 -4
- package/server/modules/reports/rp-bckhtiemnang.js +1 -3
- package/server/modules/reports/rp-bcqt.js +1 -85
- package/server/modules/reports/rp-bkct.js +1 -13
- package/server/modules/reports/rp-bkshipbook.js +1 -8
- package/server/modules/reports/rp-bkvanchuyen.js +1 -8
- package/server/modules/reports/rp-bkvatra.js +1 -7
- package/server/modules/reports/rp-bkvatvao.js +1 -7
- package/server/modules/reports/rp-capnhatsocaitc.js +1 -4
- package/server/modules/reports/rp-cdpsdiem.js +1 -4
- package/server/modules/reports/rp-cdpsdt.js +1 -5
- package/server/modules/reports/rp-cdpskh.js +1 -7
- package/server/modules/reports/rp-cdpsnphep.js +1 -3
- package/server/modules/reports/rp-cdpstk.js +1 -4
- package/server/modules/reports/rp-chitietchitientheohoadon.js +1 -12
- package/server/modules/reports/rp-chitiettaisan.js +1 -13
- package/server/modules/reports/rp-chitietthutientheohoadon.js +1 -13
- package/server/modules/reports/rp-ckcn.js +1 -3
- package/server/modules/reports/rp-ckdiem.js +1 -2
- package/server/modules/reports/rp-cktk.js +1 -3
- package/server/modules/reports/rp-ckvt.js +1 -10
- package/server/modules/reports/rp-ckvttheokho.js +1 -4
- package/server/modules/reports/rp-ckvttheotg.js +1 -4
- package/server/modules/reports/rp-ckvttt.js +1 -3
- package/server/modules/reports/rp-congnophaithutheotuoino.js +1 -3
- package/server/modules/reports/rp-congnophaitratheotuoino.js +1 -3
- package/server/modules/reports/rp-congnosapthu.js +1 -4
- package/server/modules/reports/rp-congnosaptra.js +1 -4
- package/server/modules/reports/rp-congviectheobp.js +1 -9
- package/server/modules/reports/rp-congviectheodt.js +1 -8
- package/server/modules/reports/rp-congviectheokh.js +1 -8
- package/server/modules/reports/rp-congviectheonv.js +1 -9
- package/server/modules/reports/rp-congviectheotimeline.js +1 -6
- package/server/modules/reports/rp-ctbanle.js +1 -15
- package/server/modules/reports/rp-ctbanle2.js +1 -20
- package/server/modules/reports/rp-ctbanlectv.js +1 -20
- package/server/modules/reports/rp-ctbanlenpp.js +1 -24
- package/server/modules/reports/rp-ctdanhgianhanvien.js +1 -8
- package/server/modules/reports/rp-cthangbanbitralai.js +1 -4
- package/server/modules/reports/rp-ctmuahang.js +1 -7
- package/server/modules/reports/rp-cttralaihang.js +1 -4
- package/server/modules/reports/rp-databanle.js +1 -10
- package/server/modules/reports/rp-diemthuong.js +1 -2
- package/server/modules/reports/rp-dkcn.js +1 -3
- package/server/modules/reports/rp-dktk.js +1 -2
- package/server/modules/reports/rp-dsnhanviencm.js +1 -9
- package/server/modules/reports/rp-dsnhanvientb.js +1 -9
- package/server/modules/reports/rp-dtbanlekempk.js +1 -9
- package/server/modules/reports/rp-dtbanletheoct.js +1 -23
- package/server/modules/reports/rp-dtbanletheoctkempk.js +1 -25
- package/server/modules/reports/rp-dtbanletheokh.js +1 -20
- package/server/modules/reports/rp-dtbanletheokhnpp.js +1 -19
- package/server/modules/reports/rp-dtbanletheokho.js +1 -18
- package/server/modules/reports/rp-dtbanletheonam.js +1 -3
- package/server/modules/reports/rp-dtbanletheongay.js +1 -1
- package/server/modules/reports/rp-dtbanletheonpp.js +1 -23
- package/server/modules/reports/rp-dtbanletheonv.js +1 -19
- package/server/modules/reports/rp-dtbanletheoquy.js +1 -3
- package/server/modules/reports/rp-dtbanletheosp.js +1 -8
- package/server/modules/reports/rp-dtbanletheospnpp.js +1 -6
- package/server/modules/reports/rp-dtbanletheothang.js +1 -3
- package/server/modules/reports/rp-dtbanletheothungan.js +1 -12
- package/server/modules/reports/rp-dtbanletheovt.js +1 -2
- package/server/modules/reports/rp-dtbanletheovtnpp.js +1 -2
- package/server/modules/reports/rp-dutoanthuchitheodt.js +1 -4
- package/server/modules/reports/rp-getPXC2PNC.js +1 -8
- package/server/modules/reports/rp-getariseofaccountsbymonth.js +1 -4
- package/server/modules/reports/rp-getbtpb.js +1 -6
- package/server/modules/reports/rp-getcashbycashier.js +1 -7
- package/server/modules/reports/rp-getcschietkhau.js +1 -5
- package/server/modules/reports/rp-getdinhmuc4lenhcp.js +1 -7
- package/server/modules/reports/rp-getdinhmuc4pxk.js +1 -9
- package/server/modules/reports/rp-getdk4pht.js +1 -8
- package/server/modules/reports/rp-getdk4pkc.js +1 -9
- package/server/modules/reports/rp-getdttheoca.js +1 -5
- package/server/modules/reports/rp-getinvoice2pay.js +1 -4
- package/server/modules/reports/rp-getinvoice2receive.js +1 -4
- package/server/modules/reports/rp-getinvoice2return.js +1 -5
- package/server/modules/reports/rp-getinvoice2return_bl.js +1 -6
- package/server/modules/reports/rp-getkehoachmh4lenhcp.js +1 -4
- package/server/modules/reports/rp-getkhauhao.js +1 -7
- package/server/modules/reports/rp-getluong.js +1 -8
- package/server/modules/reports/rp-getluongchuyen.js +1 -5
- package/server/modules/reports/rp-getpn2fee.js +1 -5
- package/server/modules/reports/rp-getpn2return.js +1 -5
- package/server/modules/reports/rp-getthanhpham4pnk.js +1 -7
- package/server/modules/reports/rp-getvc2xhd.js +1 -11
- package/server/modules/reports/rp-gt_cpnvltt.js +1 -6
- package/server/modules/reports/rp-hangbanbitralai.js +1 -5
- package/server/modules/reports/rp-hangthanhvien.js +1 -3
- package/server/modules/reports/rp-hoadonbanhangtheohantt.js +1 -5
- package/server/modules/reports/rp-hoadonmuahangtheohantt.js +1 -5
- package/server/modules/reports/rp-hoahong.js +1 -15
- package/server/modules/reports/rp-kcsns.js +1 -19
- package/server/modules/reports/rp-kgchamcong.js +1 -7
- package/server/modules/reports/rp-khoaso.js +1 -12
- package/server/modules/reports/rp-kiemtrasocaitcvssocai.js +1 -6
- package/server/modules/reports/rp-kqdanhgianhanvien.js +1 -5
- package/server/modules/reports/rp-kqhdkd.js +1 -7
- package/server/modules/reports/rp-lcttgt.js +1 -17
- package/server/modules/reports/rp-lctttt.js +1 -11
- package/server/modules/reports/rp-linkslist.js +1 -4
- package/server/modules/reports/rp-phanbochitienchohoadon.js +1 -11
- package/server/modules/reports/rp-phanbothutienchohoadon.js +1 -10
- package/server/modules/reports/rp-ptbitralai.js +1 -7
- package/server/modules/reports/rp-ptcttct.js +1 -22
- package/server/modules/reports/rp-ptdonhang.js +1 -8
- package/server/modules/reports/rp-pttct.js +1 -49
- package/server/modules/reports/rp-pttctkho.js +1 -32
- package/server/modules/reports/rp-pttctkho2.js +1 -29
- package/server/modules/reports/rp-referredusers.js +1 -1
- package/server/modules/reports/rp-sctbhxh.js +1 -4
- package/server/modules/reports/rp-sctcnkh.js +1 -17
- package/server/modules/reports/rp-sctdiem.js +1 -3
- package/server/modules/reports/rp-sctdt.js +1 -7
- package/server/modules/reports/rp-sctdtcp.js +1 -11
- package/server/modules/reports/rp-sctluong.js +1 -4
- package/server/modules/reports/rp-sctthuetncn.js +1 -4
- package/server/modules/reports/rp-scttk.js +1 -7
- package/server/modules/reports/rp-sctvt.js +1 -5
- package/server/modules/reports/rp-sctvt_sl.js +1 -5
- package/server/modules/reports/rp-sctvtnpp.js +1 -6
- package/server/modules/reports/rp-sctvttt.js +1 -5
- package/server/modules/reports/rp-search.js +1 -4
- package/server/modules/reports/rp-socai.js +1 -6
- package/server/modules/reports/rp-socaitk.js +1 -7
- package/server/modules/reports/rp-sochut.js +1 -7
- package/server/modules/reports/rp-sokho.js +1 -7
- package/server/modules/reports/rp-sokhott.js +1 -5
- package/server/modules/reports/rp-sonkbh.js +1 -5
- package/server/modules/reports/rp-sonkc.js +1 -6
- package/server/modules/reports/rp-sonkct.js +1 -5
- package/server/modules/reports/rp-sonkmh.js +1 -5
- package/server/modules/reports/rp-sonktt.js +1 -5
- package/server/modules/reports/rp-soquy.js +1 -11
- package/server/modules/reports/rp-sosanhkhvatt.js +1 -13
- package/server/modules/reports/rp-sosanhkhvatt2.js +1 -6
- package/server/modules/reports/rp-sotaisan.js +1 -13
- package/server/modules/reports/rp-sotiengui.js +1 -7
- package/server/modules/reports/rp-taodinhmuctudkhoc.js +1 -5
- package/server/modules/reports/rp-thbanhangkempk.js +1 -28
- package/server/modules/reports/rp-thdanhgianhanvien.js +1 -9
- package/server/modules/reports/rp-thgt.js +1 -6
- package/server/modules/reports/rp-thnxt.js +1 -12
- package/server/modules/reports/rp-thnxt_sl.js +1 -9
- package/server/modules/reports/rp-thnxtnpp.js +1 -10
- package/server/modules/reports/rp-thnxttt.js +1 -9
- package/server/modules/reports/rp-tkbanhangtheogioithieu.js +1 -9
- package/server/modules/reports/rp-tkgioithieukh.js +1 -4
- package/server/modules/reports/rp-tkgtgt.js +1 -7
- package/server/modules/reports/rp-tmbctc.js +1 -20
- package/server/modules/reports/rp-tonghopbanhang.js +1 -6
- package/server/modules/reports/rp-tonghopmuahang.js +1 -5
- package/server/modules/reports/rp-tonghoptralaihang.js +1 -5
- package/server/modules/reports/rp-tongquanbanle.js +1 -20
- package/server/modules/reports/rp-tongquanbds.js +1 -3
- package/server/modules/reports/rp-tongquancongty.js +1 -6
- package/server/modules/reports/rp-tongquanctvnpp.js +1 -12
- package/server/modules/reports/rp-tongquannvbh.js +1 -14
- package/server/modules/reports/rp-tongquannvnpp.js +1 -5
- package/server/modules/reports/rp-uoctinhnvl.js +1 -11
- package/server/modules/reports/rp-wallet.js +1 -3
- package/server/modules/reports/rpt-tkdiemtichluy.js +1 -9
- package/server/modules/systems/sys-app.js +1 -30
- package/server/modules/systems/sys-colleague.js +1 -11
- package/server/modules/systems/sys-domain.js +1 -4
- package/server/modules/systems/sys-ecomproductlines.js +1 -1
- package/server/modules/systems/sys-exportexceltemplate.js +1 -4
- package/server/modules/systems/sys-fieldright.js +1 -3
- package/server/modules/systems/sys-importexceltemplate.js +1 -4
- package/server/modules/systems/sys-labelinfo.js +1 -4
- package/server/modules/systems/sys-listinfo.js +1 -10
- package/server/modules/systems/sys-menuinfo.js +1 -4
- package/server/modules/systems/sys-message.js +1 -14
- package/server/modules/systems/sys-moduleinfo.js +1 -4
- package/server/modules/systems/sys-notification.js +1 -8
- package/server/modules/systems/sys-quanhuyen.js +1 -4
- package/server/modules/systems/sys-reportinfo.js +1 -4
- package/server/modules/systems/sys-rptobject.js +1 -3
- package/server/modules/systems/sys-schedule.js +1 -11
- package/server/modules/systems/sys-sysconfig.js +1 -3
- package/server/modules/systems/sys-sysgroup.js +1 -3
- package/server/modules/systems/sys-tableinfo.js +1 -3
- package/server/modules/systems/sys-templatestore.js +1 -5
- package/server/modules/systems/sys-tinhthanh.js +1 -4
- package/server/modules/systems/sys-token.js +1 -3
- package/server/modules/systems/sys-trangthai.js +1 -4
- package/server/modules/systems/sys-trialinfo.js +1 -3
- package/server/modules/systems/sys-user.js +1 -45
- package/server/modules/systems/sys-users.js +1 -10
- package/server/modules/systems/sys-versioninfo.js +1 -3
- package/server/modules/systems/sys-vietqrbanks.js +1 -4
- package/server/modules/systems/sys-xaphuong.js +1 -4
- package/server/modules/vouchers/vo-banggiaban.js +1 -5
- package/server/modules/vouchers/vo-bc1.js +1 -33
- package/server/modules/vouchers/vo-bc5.js +1 -15
- package/server/modules/vouchers/vo-bg1.js +1 -10
- package/server/modules/vouchers/vo-bg2.js +1 -12
- package/server/modules/vouchers/vo-bn1.js +1 -35
- package/server/modules/vouchers/vo-bn5.js +1 -15
- package/server/modules/vouchers/vo-dh2.js +1 -35
- package/server/modules/vouchers/vo-dinhmucsx.js +1 -6
- package/server/modules/vouchers/vo-dkb.js +1 -21
- package/server/modules/vouchers/vo-dn0.js +1 -9
- package/server/modules/vouchers/vo-dnm.js +1 -21
- package/server/modules/vouchers/vo-hd1.js +1 -36
- package/server/modules/vouchers/vo-hd2.js +1 -107
- package/server/modules/vouchers/vo-hd3.js +1 -44
- package/server/modules/vouchers/vo-hd4.js +1 -13
- package/server/modules/vouchers/vo-hd7.js +1 -29
- package/server/modules/vouchers/vo-hd8.js +1 -29
- package/server/modules/vouchers/vo-hde.js +1 -40
- package/server/modules/vouchers/vo-htl.js +1 -11
- package/server/modules/vouchers/vo-kbbtpb.js +1 -6
- package/server/modules/vouchers/vo-kehoachmh.js +1 -13
- package/server/modules/vouchers/vo-lenhcapphat.js +1 -10
- package/server/modules/vouchers/vo-lenhsx.js +1 -12
- package/server/modules/vouchers/vo-pbl.js +1 -93
- package/server/modules/vouchers/vo-pc0.js +1 -14
- package/server/modules/vouchers/vo-pc1.js +1 -31
- package/server/modules/vouchers/vo-pc2.js +1 -24
- package/server/modules/vouchers/vo-pc3.js +1 -14
- package/server/modules/vouchers/vo-pc5.js +1 -15
- package/server/modules/vouchers/vo-pc6.js +1 -19
- package/server/modules/vouchers/vo-pcl.js +1 -7
- package/server/modules/vouchers/vo-pdn.js +1 -11
- package/server/modules/vouchers/vo-pdx.js +1 -9
- package/server/modules/vouchers/vo-pgh.js +1 -19
- package/server/modules/vouchers/vo-pht.js +1 -7
- package/server/modules/vouchers/vo-pkc.js +1 -7
- package/server/modules/vouchers/vo-pkh.js +1 -10
- package/server/modules/vouchers/vo-pkk.js +1 -12
- package/server/modules/vouchers/vo-pkt.js +1 -13
- package/server/modules/vouchers/vo-pn1.js +1 -33
- package/server/modules/vouchers/vo-pn2.js +1 -16
- package/server/modules/vouchers/vo-pn3.js +1 -18
- package/server/modules/vouchers/vo-pn5.js +1 -19
- package/server/modules/vouchers/vo-pn6.js +1 -18
- package/server/modules/vouchers/vo-pn9.js +1 -22
- package/server/modules/vouchers/vo-pnc.js +1 -20
- package/server/modules/vouchers/vo-pnh.js +1 -20
- package/server/modules/vouchers/vo-pnk.js +1 -14
- package/server/modules/vouchers/vo-pnknpp.js +1 -12
- package/server/modules/vouchers/vo-po1.js +1 -15
- package/server/modules/vouchers/vo-ppb.js +1 -8
- package/server/modules/vouchers/vo-pt1.js +1 -21
- package/server/modules/vouchers/vo-pt5.js +1 -15
- package/server/modules/vouchers/vo-ptl.js +1 -8
- package/server/modules/vouchers/vo-purchase_contract.js +1 -9
- package/server/modules/vouchers/vo-pxc.js +1 -22
- package/server/modules/vouchers/vo-pxh.js +1 -28
- package/server/modules/vouchers/vo-pxk.js +1 -15
- package/server/modules/vouchers/vo-pxknpp.js +1 -14
- package/server/modules/vouchers/vo-qts.js +1 -12
- package/server/modules/vouchers/vo-sale_contract.js +1 -11
- package/server/modules/vouchers/vo-shipbook.js +1 -17
- package/server/modules/vouchers/vo-so1.js +1 -126
- package/server/modules/vouchers/vo-so2.js +1 -37
- package/server/modules/vouchers/vo-so3.js +1 -41
- package/server/modules/vouchers/vo-so5.js +1 -57
- package/server/modules/vouchers/vo-so7.js +1 -97
- package/server/modules/vouchers/vo-so9.js +1 -119
- package/server/modules/vouchers/vo-vanchuyen.js +1 -14
- package/server/modules/vouchers/vo-xhd.js +1 -33
- package/server/route.js +1 -51
- package/server/services/invoiceFetcher.js +1 -15
- package/server/sslConfig.js +1 -2
- package/server/transactionMiddleware.js +1 -5
- package/server/workers/backupApp.js +1 -9
- package/server/workers/calcGrid.js +1 -9
- package/server/workers/customerOnImport.js +1 -8
- package/server/workers/dmvtOnImport.js +1 -9
- package/server/workers/excelParser.js +1 -9
- package/server/workers/inputWorker.js +1 -6
- package/server/workers/pushNotify.js +1 -10
- package/server/workers/reportWorker.js +1 -7
- package/server/workers/restoreApp.js +1 -23
- package/server/workers/runScript.js +1 -4
- package/server/workers/sendEmail.js +1 -13
- package/server/workers/webhook.js +1 -5
|
@@ -1,57 +1 @@
|
|
|
1
|
-
const PostBook=require("../../libs/post-book"),options=global.getModel("options"),PostSocai=require("../../libs/post-socai"),User=global.getModel("user"),Sodiemthuong=global.getModel("sodiemthuong"),transaction=global.getModel("transaction"),Evoucher=global.getModel("evoucher"),dvcs=global.getModel("dvcs"),dmvt=global.getModel("dmvt"),dmtt=global.getModel("dmtt"),dmcpmh=global.getModel("dmcpmh"),customer=global.getModel("customer"),dmdt=global.getModel("dmdt"),dmphi=global.getModel("dmphi"),contract=
|
|
2
|
-
global.getModel("contract"),trangthai=global.getModel("trangthai"),currency=global.getModel("currency"),ptthanhtoan=global.getModel("ptthanhtoan"),dmdiemthuong=global.getModel("dmdiemthuong"),model=global.getModel("so5"),pt1=global.getModel("pt1"),controller=require("../../controllers/controller"),async=require("async"),ma_ct="SO5",ckdiem=require("../../libs/ckdiem"),blockchainconnect=require("../../libs/blockchainconnect"),moment=require("moment"),App=global.getModel("app"),Introducer=global.getModel("introducer"),
|
|
3
|
-
getPointBalance=async($id_app$$,$sender_email$$)=>new Promise(($resolve$$,$reject$$)=>{ckdiem({id_app:$id_app$$,email:$sender_email$$},($e$$,$rs$$)=>{if($e$$)return $reject$$(Error($e$$));$resolve$$($rs$$.length===0?0:$rs$$[0].ton00)})}),getWalletBalanceOfApp=async($app_bl_id_app$$,$denom$$)=>{$app_bl_id_app$$=await App.findOne({_id:$app_bl_id_app$$});return $app_bl_id_app$$.wallet_address&&$app_bl_id_app$$.wallet_token?($app_bl_id_app$$=await blockchainconnect.bankBalancesGet($app_bl_id_app$$.wallet_address))?
|
|
4
|
-
$app_bl_id_app$$.filter($r$$=>$r$$.denom==$denom$$).map($r$$=>Number($r$$.amount)).reduce(($a$$,$b$$)=>$a$$+$b$$,0):0:0},createTransactionBonus=async function($obj$$){if($obj$$.trang_thai!="5"&&$obj$$.trang_thai!="6")return await transaction.deleteTrans({id_ct:$obj$$._id.toString()+":bonus"},"Tr\u1ea3 l\u1ea1i \u0111i\u1ec3m th\u01b0\u1edfng \u0111\u1ec3 t\u00ednh l\u1ea1i"),await transaction.deleteTrans({id_ct:$obj$$._id.toString()+":introduce"},"Tr\u1ea3 l\u1ea1i \u0111i\u1ec3m th\u01b0\u1edfng gi\u1edbi thi\u1ec7u th\u00e0nh vi\u00ean m\u1edbi \u0111\u1ec3 t\u00ednh l\u1ea1i"),
|
|
5
|
-
null;let $kh$$=await customer.findOne({id_app:$obj$$.id_app,ma_kh:$obj$$.ma_kh})||{},$lan_mua$$=(await model.find({id_app:$obj$$.id_app,ma_kh:$obj$$.ma_kh,ngay_ct:{$lte:$obj$$.ngay_ct}})).length+1;var $_app_diem_thuong_gioi_thieu_old_trans$$=await App.findOne({_id:$obj$$.id_app}),$_intro_amount_calcDiemThuong$$=await Introducer.findOne({id_app:$obj$$.id_app,be_introduced:$obj$$.email||$obj$$.user_created});$_app_diem_thuong_gioi_thieu_old_trans$$=$_app_diem_thuong_gioi_thieu_old_trans$$.exfields.diem_thuong_gioi_thieu;
|
|
6
|
-
$lan_mua$$===1&&$_app_diem_thuong_gioi_thieu_old_trans$$&&$_intro_amount_calcDiemThuong$$&&await transaction.createTrans({id_app:$obj$$.id_app,sender_email:$obj$$.id_app,receiver_email:$_intro_amount_calcDiemThuong$$.be_introduced_by,amount:$_app_diem_thuong_gioi_thieu_old_trans$$,description:"\u0110i\u1ec3m th\u01b0\u1edfng gi\u1edbi thi\u1ec7u kh\u00e1ch h\u00e0ng",otherData:{ma_ct:$obj$$.ma_ct,so_ct:$obj$$.so_ct,ngay_ct:$obj$$.ngay_ct,id_ct:$obj$$._id.toString()+":introduce"}});if(!$obj$$.exfields.survey)return null;
|
|
7
|
-
let $now$$=moment(new Date).startOf("date").toDate();$_intro_amount_calcDiemThuong$$=$obj$$.details.filter($d$$=>$d$$.tien_hang).map(async $d$$=>{var $amount$$=await dmvt.findOne({ma_vt:$d$$.ma_vt,id_app:$obj$$.id_app}),$ckdiemthuong_ty_le_diem_thuong$$=await dmdiemthuong.find({id_app:$obj$$.id_app,status:!0,ma_kh:{$in:[null,"",$kh$$.ma_kh]},ma_kho:{$in:[null,"",$obj$$.ma_kho]},nh_kh:{$in:[null,"",$kh$$.nh_kh]},hieu_luc_tu:{$lte:$now$$},hieu_luc_den:{$gte:$now$$},ap_dung_lan_mua_thu:{$in:[0,$lan_mua$$]},
|
|
8
|
-
ma_vt:{$in:[null,"",void 0,$d$$.ma_vt]},ma_nvt:{$in:[null,"",void 0,$amount$$?$amount$$.ma_nvt:""]}}).sort({ma_vt:-1,ma_nvt:-1,hieu_luc_tu:-1}).limit(1);return $ckdiemthuong_ty_le_diem_thuong$$.length>0?($amount$$=0,$ckdiemthuong_ty_le_diem_thuong$$[0].tien?($ckdiemthuong_ty_le_diem_thuong$$=$ckdiemthuong_ty_le_diem_thuong$$[0].diem/$ckdiemthuong_ty_le_diem_thuong$$[0].tien)||($amount$$=Math.roundBy(($d$$.tien_hang-($d$$.tien_ck||0))*$ckdiemthuong_ty_le_diem_thuong$$,0)):$amount$$=$ckdiemthuong_ty_le_diem_thuong$$[0].diem*
|
|
9
|
-
($d$$.sl_xuat||1),$amount$$):0});if($_intro_amount_calcDiemThuong$$=(await Promise.all($_intro_amount_calcDiemThuong$$)).reduce(($a$$,$b$$)=>$a$$+$b$$,0)){if($_app_diem_thuong_gioi_thieu_old_trans$$=await transaction.findOne({id_ct:$obj$$._id.toString()+":bonus"}),!$_app_diem_thuong_gioi_thieu_old_trans$$||$_app_diem_thuong_gioi_thieu_old_trans$$.amount!==$_intro_amount_calcDiemThuong$$)return await transaction.deleteTrans({id_ct:$obj$$._id.toString()+":bonus"},"Tr\u1ea3 l\u1ea1i \u0111i\u1ec3m th\u01b0\u1edfng \u0111\u1ec3 t\u00ednh l\u1ea1i"),
|
|
10
|
-
await transaction.createTrans({id_app:$obj$$.id_app,sender_email:$obj$$.id_app,receiver_email:$obj$$.user_created,amount:$_intro_amount_calcDiemThuong$$,description:"\u0110i\u1ec3m th\u01b0\u1edfng mua h\u00e0ng",otherData:{ma_ct:$obj$$.ma_ct,so_ct:$obj$$.so_ct,ngay_ct:$obj$$.ngay_ct,id_ct:$obj$$._id.toString()+":bonus"}})}else await transaction.deleteTrans({id_ct:$obj$$._id.toString()+":bonus"},"Tr\u1ea3 l\u1ea1i \u0111i\u1ec3m th\u01b0\u1edfng \u0111\u1ec3 t\u00ednh l\u1ea1i")},createTransactionPayment=
|
|
11
|
-
async function($obj$$){await transaction.deleteTrans({id_ct:$obj$$._id.toString()});$obj$$.paymentByPoints&&await transaction.createTrans({id_app:$obj$$.id_app,sender_email:$obj$$.user_created,receiver_email:$obj$$.id_app,amount:$obj$$.paymentByPoints,description:"Thanh to\u00e1n cho \u0111\u01a1n h\u00e0ng s\u1ed1 "+$obj$$.so_ct,otherData:{ma_ct:$obj$$.ma_ct,so_ct:$obj$$.so_ct,ngay_ct:$obj$$.ngay_ct,id_ct:$obj$$._id.toString()}})},BuyPoint=async function($obj$$){await transaction.deleteTrans({id_ct:$obj$$._id.toString()+
|
|
12
|
-
":buy"});let $amount$$=$obj$$.details.filter($d$$=>$d$$.is_point).map($d$$=>$d$$.sl_xuat).reduce(($a$$,$b$$)=>$a$$+$b$$,0);$amount$$&&await transaction.createTrans({id_app:$obj$$.id_app,sender_email:$obj$$.id_app,receiver_email:$obj$$.user_created,amount:$amount$$,description:$obj$$.dien_giai||"N\u1ed9p ti\u1ec1n m\u1eb7t v\u00e0o v\u00ed",otherData:{ma_ct:$obj$$.ma_ct,so_ct:$obj$$.so_ct,ngay_ct:$obj$$.ngay_ct,id_ct:$obj$$._id.toString()+":buy"}})},checkEvoucher=($user$$,$obj$$,$pre_obj$$)=>($obj$$.evouchers||
|
|
13
|
-
[]).map($ev$$=>new Promise(($resolve$$,$reject$$)=>{(async()=>{const $_e$$=await Evoucher.findOne({ma:$ev$$.ma,id_app:$user$$.current_id_app});if(!$_e$$)return console.error("Th\u1ebb mua h\u00e0ng kh\u00f4ng t\u1ed3n t\u1ea1i",$ev$$),$reject$$(Error(`Th\u1ebb mua h\u00e0ng ${$ev$$.ma} kh\u00f4ng t\u1ed3n t\u1ea1i`));if($_e$$.id_ct_used&&$_e$$.id_ct_used!==($obj$$._id||"").toString())return $reject$$(Error(`Th\u1ebb mua h\u00e0ng ${$ev$$.ma} \u0111\u00e3 \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng`));if($_e$$.so_lan_sd>=
|
|
14
|
-
1&&$_e$$.id_ct_useds&&$_e$$.id_ct_useds.length>0){if($pre_obj$$&&$_e$$.id_ct_useds.indexOf($pre_obj$$._id.toString())>=0)return $resolve$$(!0);if($_e$$.id_ct_useds.length>$_e$$.so_lan_sd)return $reject$$(Error(`Th\u1ebb mua h\u00e0ng ${$ev$$.ma} \u0111\u00e3 \u0111\u01b0\u1ee3c s\u1eed d\u1ee5ng h\u1ebft`))}if($_e$$.user&&$_e$$.user!==($obj$$.user_created||$user$$.email))return $reject$$(Error(`Th\u1ebb mua h\u00e0ng ${$ev$$.ma} kh\u00f4ng h\u1ee3p l\u1ec7`));var $date_created_so_tien_giam$$=new Date($obj$$.date_created);
|
|
15
|
-
if(moment($_e$$.hieu_luc_den).endOf("date").toDate().getTime()<$date_created_so_tien_giam$$.getTime())return $reject$$(Error(`Th\u1ebb mua h\u00e0ng ${$ev$$.ma} \u0111\u00e3 h\u1ebft h\u1ea1n s\u1eed d\u1ee5ng`));$date_created_so_tien_giam$$=$_e$$.so_tien;$_e$$.ty_le&&($date_created_so_tien_giam$$=Math.roundBy($obj$$.details.map($d$$=>$d$$.tien_hang_nt).reduce(($a$$,$b$$)=>$a$$+$b$$,0)*$_e$$.ty_le/100));$_e$$.so_tien_max&&$date_created_so_tien_giam$$>$_e$$.so_tien_max&&($date_created_so_tien_giam$$=
|
|
16
|
-
$_e$$.so_tien_max);if($ev$$.so_tien_giam!==$date_created_so_tien_giam$$)return $reject$$(Error(`S\u1ed1 ti\u1ec1n gi\u1ea3m cho th\u1ebb ${$ev$$.ma} kh\u00f4ng h\u1ee3p l\u1ec7`));$resolve$$(!0)})()})),updateEvoucher=async($id_app$$,$evoucher_code$$,$id_ct_rs$$)=>{if($evoucher_code$$){$id_ct_rs$$=$id_ct_rs$$.toString();var $e$$=await Evoucher.findOne({ma:$evoucher_code$$,id_app:$id_app$$});$e$$?($id_app$$=$e$$.id_ct_useds||[],$id_app$$.push($id_ct_rs$$),$id_app$$=[...(new Set($id_app$$))],$id_ct_rs$$=
|
|
17
|
-
await Evoucher.findOneAndUpdate({_id:$e$$._id},{id_ct_useds:$id_app$$}),console.log("update id_ct_useds",$evoucher_code$$,$id_app$$,$id_ct_rs$$)):console.error("can't find evoucher",$evoucher_code$$)}},deleteEvoucher=async($id_app$jscomp$3_id_ct_useds$$,$evoucher_code$$,$id_ct$$)=>{if($evoucher_code$$){$id_ct$$=$id_ct$$.toString();var $e$jscomp$2_rs$$=await Evoucher.findOne({id_app:$id_app$jscomp$3_id_ct_useds$$,ma:$evoucher_code$$});$e$jscomp$2_rs$$&&($id_app$jscomp$3_id_ct_useds$$=($e$jscomp$2_rs$$.id_ct_useds||
|
|
18
|
-
[]).filter($ct$$=>$ct$$!==$id_ct$$),$e$jscomp$2_rs$$=await Evoucher.findOneAndUpdate({_id:$e$jscomp$2_rs$$._id},{id_ct_useds:$id_app$jscomp$3_id_ct_useds$$}),console.log("update id_ct_useds",$evoucher_code$$,$id_app$jscomp$3_id_ct_useds$$,$e$jscomp$2_rs$$))}},valid=async function($user$$,$obj$$,$next$$,$_opt_detail$jscomp$1_pre_obj$$){try{const $_checkEvoucher$$=checkEvoucher($user$$,$obj$$,$_opt_detail$jscomp$1_pre_obj$$);await Promise.all($_checkEvoucher$$)}catch($e$$){return $next$$($e$$.message)}if($obj$$.tien_evoucher&&
|
|
19
|
-
($_opt_detail$jscomp$1_pre_obj$$=await options.findOne({id_app:$obj$$.id_app,id_func:$obj$$.ma_ct.toLowerCase()}).lean())&&$_opt_detail$jscomp$1_pre_obj$$.option&&$_opt_detail$jscomp$1_pre_obj$$.option.phan_bo_evoucher){let $tien_evoucher_da_phan_bo$$=0,$tien_evoucher$$=$obj$$.tien_evoucher,$tien_evoucher_con_lai$$=$tien_evoucher$$-$tien_evoucher_da_phan_bo$$;($obj$$.details||[]).forEach($detail$$=>{if($tien_evoucher_con_lai$$>0){var $tien_evoucher_duoc_pb_tien_hang_con_lai$$=$detail$$.tien_hang_nt-
|
|
20
|
-
($detail$$.tien_ck_nt||0);$tien_evoucher_duoc_pb_tien_hang_con_lai$$=$tien_evoucher_con_lai$$>$tien_evoucher_duoc_pb_tien_hang_con_lai$$?$tien_evoucher_duoc_pb_tien_hang_con_lai$$:$tien_evoucher_con_lai$$;$detail$$.tien_evoucher_duoc_pb=$tien_evoucher_duoc_pb_tien_hang_con_lai$$;$tien_evoucher_da_phan_bo$$+=$tien_evoucher_duoc_pb_tien_hang_con_lai$$;$tien_evoucher_con_lai$$=$tien_evoucher$$-$tien_evoucher_da_phan_bo$$}else $tien_evoucher_con_lai$$=0})}await ($obj$$.details||[]).asyncJoinModel2($user$$.current_id_app,
|
|
21
|
-
dmvt,{where:"ma_vt",fields:"is_coin"});if($obj$$.paymentByPoints)try{var $he_so_qd_i$$=await currency.getRate($obj$$.id_app,$obj$$.ma_nt);$obj$$.tien_paymentByPoints=$obj$$.paymentByPoints*$he_so_qd_i$$}catch($e$$){return $next$$($e$$.message)}for($he_so_qd_i$$=0;$he_so_qd_i$$<($obj$$.details||[]).length;$he_so_qd_i$$++)$_opt_detail$jscomp$1_pre_obj$$=($obj$$.details||[])[$he_so_qd_i$$],$_opt_detail$jscomp$1_pre_obj$$.line=$he_so_qd_i$$,$obj$$.ma_nt==="VND"&&($_opt_detail$jscomp$1_pre_obj$$.tien=
|
|
22
|
-
$_opt_detail$jscomp$1_pre_obj$$.tien_nt,$_opt_detail$jscomp$1_pre_obj$$.tien_hang=$_opt_detail$jscomp$1_pre_obj$$.tien_hang_nt,$_opt_detail$jscomp$1_pre_obj$$.tien_ck=$_opt_detail$jscomp$1_pre_obj$$.tien_ck_nt,$_opt_detail$jscomp$1_pre_obj$$.gia_ban=$_opt_detail$jscomp$1_pre_obj$$.gia_ban_nt),$_opt_detail$jscomp$1_pre_obj$$.tien_xuat=$_opt_detail$jscomp$1_pre_obj$$.tien_xuat_nt;$obj$$.ma_dvcs?$next$$(null,$obj$$):dvcs.findOne({id_app:$user$$.current_id_app},{_id:1},function($error$$,$dv$$){return $error$$?
|
|
23
|
-
$next$$($error$$):$dv$$?($obj$$.ma_dvcs=$dv$$._id.toString(),$next$$(null,$obj$$)):$next$$("C\u00f4ng ty/c\u1eeda h\u00e0ng n\u00e0y ch\u01b0a c\u00f3 m\u1ed9t \u0111\u01a1n v\u1ecb c\u01a1 s\u1edf n\u00e0o")})};
|
|
24
|
-
module.exports=function($contr_router$$){$contr_router$$=new controller($contr_router$$,model,ma_ct.toLowerCase(),{isVoucher:!0,requireRecaptchaToken:!1,requireOtp:$data$$=>$data$$.trang_thai=="0"||$data$$.trang_thai=="2"||$data$$.trang_thai=="8"?!1:!0,unique:["so_ct"],sort:{ngay_ct:-1,so_ct:-1},onEmitEvent:async($obj$$,$users_will_receive$$,$next$$)=>{$obj$$.user_nv_giao_hang&&$users_will_receive$$.push($obj$$.user_nv_giao_hang);$next$$(null,$users_will_receive$$)}});$contr_router$$.route();$contr_router$$.handleAfterPayment=
|
|
25
|
-
async $obj$$=>{console.log("xu ly nap tien vao vi",$obj$$.details);let $app$$=await App.findOne({_id:$obj$$.id_app});if($app$$.wallet_address&&$app$$.wallet_token&&$obj$$.details){try{await Promise.all($obj$$.details.filter($d$$=>$d$$.is_coin&&!$d$$.transferred&&$d$$.wallet_receiver).map($detail$$=>(async()=>{let $memo$$=$obj$$.dien_giai||"N\u1ea1p ti\u1ec1n v\u00e0o v\u00ed",$amount$$=$detail$$.sl_xuat,$denom$$=$detail$$.ma_vt.toLowerCase();console.log("chuyen tien vao vi nguoi nap",{amount:$amount$$,
|
|
26
|
-
denom:$denom$$,receiver:$detail$$.wallet_receiver});let $rs$$=await blockchainconnect.spend($obj$$.id_app,$app$$.wallet_token,$app$$.wallet_address,$detail$$.wallet_receiver,{amount:$amount$$,denom:$denom$$,memo:$memo$$});console.log("buy point result",$rs$$,$amount$$,$denom$$,$memo$$);$detail$$.transferred=!0})())),await model.findOneAndUpdate({_id:$obj$$._id},{details:$obj$$.details,trang_thai:"5"}),$obj$$.trang_thai="5"}catch($e$$){console.error($e$$),await model.findOneAndUpdate({_id:$obj$$._id},
|
|
27
|
-
{trang_thai:"7"}),$obj$$.trang_thai="7"}let $ctrlSO5$$=global.controllers.SO5;$ctrlSO5$$&&controller.postData($obj$$,$ctrlSO5$$,$e$$=>{if($e$$)return console.error($e$$);controller.pushNotification($ctrlSO5$$,$obj$$)})}return null};$contr_router$$.post=async function($obj$$,$fn$$){$fn$$||=function(){};let $he_so_qd$$=await currency.getRate($obj$$.id_app,$obj$$.ma_nt)||1;await ($obj$$.details||[]).asyncJoinModel2($obj$$.id_app,dmvt,{where:"ma_vt",fields:["is_point","is_coin"]});async.series({BuyPoint:$callback$$=>
|
|
28
|
-
{BuyPoint($obj$$).then(()=>{$callback$$()}).catch($e$$=>{$callback$$($e$$)})},post_sodiemthuong:function($callback$$){const $details$$=[];$obj$$.details.filter($d$$=>$d$$.diem_thuong).forEach($d$jscomp$7_detail$$=>{$d$jscomp$7_detail$$={...$d$jscomp$7_detail$$};$d$jscomp$7_detail$$.ngay_ct=$obj$$.ngay_ct;$d$jscomp$7_detail$$.ma_kh=$obj$$.ma_kh;$d$jscomp$7_detail$$.sl_nhan=$d$jscomp$7_detail$$.diem_thuong;$details$$.push($d$jscomp$7_detail$$)});(new PostBook($obj$$,$details$$,Sodiemthuong)).run(function($e$$,
|
|
29
|
-
$rs$$){$callback$$($e$$,$rs$$)})},post_socai:function($callback$$){if(!$obj$$.virtual_payment_client_url)return $callback$$();options.findOne({id_app:$obj$$.id_app,id_func:ma_ct.toLowerCase()}).lean().exec(async($error$jscomp$3_tt_tt$$,$rs$$)=>{let $option$$;$option$$=$rs$$?$rs$$.option||{}:{};let $pt$$;$obj$$.pt_thanh_toan&&global.mongoose.Types.ObjectId.isValid($obj$$.pt_thanh_toan)&&($pt$$=await ptthanhtoan.findOne({id_app:$obj$$.id_app,_id:$obj$$.pt_thanh_toan}).lean());$pt$$=$pt$$||{};$pt$$.ma_kh&&
|
|
30
|
-
($pt$$.tk_tien=$pt$$.tk_cn);console.log("phuong thuc thanh toan so5",$obj$$.pt_thanh_toan,$pt$$);$option$$.tk_tien=$pt$$.tk_tien||$option$$.tk_tien||"1111";$option$$.tk_cn=$pt$$.tk_cn||$option$$.tk_cn||"131111";$option$$.tk_dt=$pt$$.tk_dt||$option$$.tk_dt||"51111";$option$$.tk_tl=$pt$$.tk_tl||$option$$.tk_tl||"52131";$option$$.tk_ck=$pt$$.tk_ck||$option$$.tk_ck||"52111";$option$$.tk_cp_bh=$pt$$.tk_cp_bh||$option$$.tk_cp_bh||$option$$.tk_ck;$option$$.ma_kh=$pt$$.ma_kh||$obj$$.ma_kh;const $details$$=
|
|
31
|
-
[];$obj$$.details.forEach(function($d$jscomp$8_detail$$){$d$jscomp$8_detail$$={...$d$jscomp$8_detail$$};$d$jscomp$8_detail$$.tk_co=$option$$.tk_dt;$d$jscomp$8_detail$$.tk_no=$option$$.tk_tien;$d$jscomp$8_detail$$.ma_kh_co=$obj$$.ma_kh;$d$jscomp$8_detail$$.ma_kh_no=$option$$.ma_kh;$d$jscomp$8_detail$$.tien_nt=$d$jscomp$8_detail$$.tien_hang_nt-($d$jscomp$8_detail$$.tien_ck_nt||0);$d$jscomp$8_detail$$.tien=$d$jscomp$8_detail$$.tien_hang-($d$jscomp$8_detail$$.tien_ck||0);$details$$.push($d$jscomp$8_detail$$)});
|
|
32
|
-
$obj$$.details.filter($d$$=>$d$$.diem_thuong&&$d$$.tk_km_no&&$d$$.tk_km_co).forEach(function($d$$){let $detail$$={...$d$$};$detail$$.tk_co=$option$$.tk_km_co||$d$$.tk_km_co;$detail$$.tk_no=$option$$.tk_km_no||$d$$.tk_km_no;$detail$$.ma_kh=$obj$$.ma_kh;$detail$$.tien=$detail$$.tien_nt=$detail$$.diem_thuong*$he_so_qd$$;$details$$.push($detail$$)});$obj$$.tt_tien_thuong&&($error$jscomp$3_tt_tt$$={},$error$jscomp$3_tt_tt$$.tk_no=$option$$.tk_cp_bh,$error$jscomp$3_tt_tt$$.tk_co=$option$$.tk_tien,$error$jscomp$3_tt_tt$$.tien_nt=
|
|
33
|
-
$obj$$.tt_tien_thuong||0,$error$jscomp$3_tt_tt$$.tien=$error$jscomp$3_tt_tt$$.tien_nt,$error$jscomp$3_tt_tt$$.ma_kh_no=$obj$$.ma_kh,$error$jscomp$3_tt_tt$$.ma_kh_co=$option$$.ma_kh,$details$$.push($error$jscomp$3_tt_tt$$));if($obj$$.tien_ck_hd||$obj$$.tien_evoucher)$error$jscomp$3_tt_tt$$={},$error$jscomp$3_tt_tt$$.tk_no=$option$$.tk_ck,$error$jscomp$3_tt_tt$$.tk_co=$option$$.tk_tien,$error$jscomp$3_tt_tt$$.tien_nt=($obj$$.tien_ck_hd||0)+($obj$$.tien_evoucher||0),$error$jscomp$3_tt_tt$$.tien=$error$jscomp$3_tt_tt$$.tien_nt,
|
|
34
|
-
$error$jscomp$3_tt_tt$$.ma_kh_no=$obj$$.ma_kh,$error$jscomp$3_tt_tt$$.ma_kh_co=$option$$.ma_kh,$error$jscomp$3_tt_tt$$.check_balance=!1,$details$$.push($error$jscomp$3_tt_tt$$);(new PostSocai($obj$$,$details$$)).run(function($e$$,$rs$$){$callback$$($e$$,$rs$$)})})}},function($e$$,$rs$$){$fn$$($e$$,$rs$$)})};$contr_router$$.creating=async function($user$$,$obj$$,$next$$){$obj$$.details||($obj$$.details=[]);$obj$$.virtual_payment_client_url=void 0;if(!$obj$$.ma_kh){let $cust$$=await global.getModel("customer").findOne({id_app:$user$$.current_id_app,
|
|
35
|
-
of_user:$user$$.email},{ma_kh:1,ten_kh:1}).lean();$cust$$&&($obj$$.ma_kh=$cust$$.ma_kh)}valid($user$$,$obj$$,async $error$$=>{if($error$$)return $next$$($error$$);if(!$obj$$.paymentByPoints)return $next$$(null,$obj$$);try{let $detail_buy_coins$$=$obj$$.details.filter($d$$=>$d$$.is_coin&&!$d$$.transferred&&$d$$.wallet_receiver).asyncGroupBy(["ma_vt"],["sl_xuat"]);if($detail_buy_coins$$.length==1&&await getWalletBalanceOfApp($user$$.current_id_app,$detail_buy_coins$$[0].ma_vt.toLowerCase())<$detail_buy_coins$$[0].sl_xuat)return $next$$("B\u1ea1n kh\u00f4ng th\u1ec3 n\u1ea1p ti\u1ec1n th\u1eddi gian n\u00e0y. Hay th\u1eed l\u1ea1i sau");
|
|
36
|
-
if($detail_buy_coins$$.length>1)return $next$$("M\u1ed7i l\u1ea7n ch\u1ec9 \u0111\u01b0\u1ee3c mua m\u1ed9t lo\u1ea1i coin");if(await getPointBalance($user$$.current_id_app,$user$$.email)<$obj$$.paymentByPoints)return $next$$("B\u1ea1n kh\u00f4ng c\u00f3 \u0111\u1ee7 \u0111i\u1ec3m \u0111\u1ec3 th\u1ef1c hi\u1ec7n giao d\u1ecbch n\u00e0y.");$next$$(null,$obj$$)}catch($e$$){$next$$($e$$.message)}})};$contr_router$$.created=async function($user$$,$obj$$,$next$$){if($obj$$.pt_thanh_toan&&global.mongoose.Types.ObjectId.isValid($obj$$.pt_thanh_toan))try{const $pt_thanh_toan$$=
|
|
37
|
-
await global.getModel("ptthanhtoan").findOne({_id:$obj$$.pt_thanh_toan});if($pt_thanh_toan$$.payment_service){let $paymentServiceModel$$=global.getModel($pt_thanh_toan$$.payment_service);$obj$$.amount=$obj$$.t_tt_nt-($obj$$.tien_paymentByPoints||0);if($obj$$.amount&&$paymentServiceModel$$.createVirtualPaymentClientURL){let $virtual_payment_client_url$$=await $paymentServiceModel$$.createVirtualPaymentClientURL($obj$$,$user$$.clientIp,$pt_thanh_toan$$);$obj$$.virtual_payment_client_url=$virtual_payment_client_url$$;
|
|
38
|
-
$obj$$.payment_service=$pt_thanh_toan$$.payment_service;$obj$$.payment_id=((await $paymentServiceModel$$.findOne({$or:[{id_ct:$obj$$._id.toString()},{request_id:$obj$$._id.toString()},{order_id:$obj$$._id.toString()}]})||{})._id||"").toString()}else $obj$$.virtual_payment_client_url="",$obj$$.payment_service="",$obj$$.payment_id=""}else $obj$$.virtual_payment_client_url=""}catch($e$$){return console.error($e$$),$next$$("Kh\u00f4ng tao li\u00ean k\u1ebft thanh to\u00e1n:"+($e$$.message||$e$$.error||
|
|
39
|
-
$e$$))}else console.log("Chua nhap phuong thuc thanh toan"),$obj$$.virtual_payment_client_url="";model.findOneAndUpdate({_id:$obj$$._id},{virtual_payment_client_url:$obj$$.virtual_payment_client_url,payment_id:$obj$$.payment_id,payment_service:$obj$$.payment_service},$e$$=>{$e$$&&(console.error($e$$),console.log("error create Virtual Payment ClientURL",$e$$.message))});await createTransactionPayment($obj$$);await createTransactionBonus($obj$$);$obj$$.evouchers&&await Promise.all($obj$$.evouchers.map($e$$=>
|
|
40
|
-
updateEvoucher($e$$.id_app,$e$$.ma,$obj$$._id)));$next$$(null,$obj$$)};$contr_router$$.updating=async($user$$,$data$$,$obj$$,$next$$)=>{$data$$.pt_thanh_toan&&$data$$.pt_thanh_toan!=$obj$$.pt_thanh_toan&&($data$$.virtual_payment_client_url="",$data$$.payment_service="",$data$$.payment_id="");valid($user$$,$data$$,async $detail_buy_coins$jscomp$1_error$$=>{if($detail_buy_coins$jscomp$1_error$$)return $next$$($detail_buy_coins$jscomp$1_error$$);if(($obj$$.paymentByPoints||0)!==($data$$.paymentByPoints||
|
|
41
|
-
0))return $next$$("B\u1ea1n kh\u00f4ng th\u1ec3 c\u1eadp nh\u1eadt s\u1ed1 \u0111i\u1ec3m thanh to\u00e1n.");$detail_buy_coins$jscomp$1_error$$=$data$$.details.filter($d$$=>$d$$.is_coin&&!$d$$.transferred&&$d$$.wallet_receiver).asyncGroupBy(["ma_vt"],["sl_xuat"]);if($detail_buy_coins$jscomp$1_error$$.length==1&&await getWalletBalanceOfApp($user$$.current_id_app,$detail_buy_coins$jscomp$1_error$$[0].ma_vt.toLowerCase())<$detail_buy_coins$jscomp$1_error$$[0].sl_xuat)return $next$$("B\u1ea1n kh\u00f4ng th\u1ec3 n\u1ea1p ti\u1ec1n th\u1eddi gian n\u00e0y. Hay th\u1eed l\u1ea1i sau");
|
|
42
|
-
if($detail_buy_coins$jscomp$1_error$$.length>1)return $next$$("M\u1ed7i l\u1ea7n ch\u1ec9 \u0111\u01b0\u1ee3c mua m\u1ed9t lo\u1ea1i coin");await transaction.deleteTrans({id_ct:$obj$$._id.toString()+":buy"});$next$$(null,$data$$,$obj$$)},$obj$$)};$contr_router$$.updated=async function($evouchers_user$$,$obj$$,$next$$){if(!$obj$$.virtual_payment_client_url&&($obj$$.trang_thai==="1"||$obj$$.trang_thai==="0")){if($obj$$.pt_thanh_toan&&global.mongoose.Types.ObjectId.isValid($obj$$.pt_thanh_toan))try{const $pt_thanh_toan$$=
|
|
43
|
-
await global.getModel("ptthanhtoan").findOne({_id:$obj$$.pt_thanh_toan});if($pt_thanh_toan$$.payment_service){let $paymentServiceModel$$=global.getModel($pt_thanh_toan$$.payment_service);$obj$$.amount=$obj$$.t_tt_nt-($obj$$.tien_paymentByPoints||0);if($obj$$.amount&&$paymentServiceModel$$.createVirtualPaymentClientURL){let $virtual_payment_client_url$$=await $paymentServiceModel$$.createVirtualPaymentClientURL($obj$$,$evouchers_user$$.clientIp,$pt_thanh_toan$$);$obj$$.virtual_payment_client_url=$virtual_payment_client_url$$;
|
|
44
|
-
$obj$$.payment_service=$pt_thanh_toan$$.payment_service;$obj$$.payment_id=((await $paymentServiceModel$$.findOne({$or:[{id_ct:$obj$$._id.toString()},{request_id:$obj$$._id.toString()},{order_id:$obj$$._id.toString()}]})||{})._id||"").toString()}else $obj$$.virtual_payment_client_url="",$obj$$.payment_service="",$obj$$.payment_id=""}else $obj$$.virtual_payment_client_url=""}catch($e$$){return console.error($e$$),$next$$("Error create Virtual Payment ClientURL:"+($e$$.message||$e$$.error||$e$$))}else $obj$$.virtual_payment_client_url=
|
|
45
|
-
"";model.findOneAndUpdate({_id:$obj$$._id},{virtual_payment_client_url:$obj$$.virtual_payment_client_url,payment_id:$obj$$.payment_id,payment_service:$obj$$.payment_service},$e$$=>{$e$$&&console.log("error create Virtual Payment ClientURL",$e$$.message)})}$obj$$.trang_thai==="9"?(await transaction.deleteTrans({id_ct:$obj$$._id.toString()}),await transaction.deleteTrans({id_ct:$obj$$._id.toString()+":bonus"},"Tr\u1ea3 l\u1ea1i \u0111i\u1ec3m th\u01b0\u1edfng"),await transaction.deleteTrans({id_ct:$obj$$._id.toString()+
|
|
46
|
-
":buy"})):(await createTransactionPayment($obj$$),createTransactionBonus($obj$$));await Evoucher.updateMany({id_ct_used:$obj$$._id.toString()},{id_ct_used:null});$evouchers_user$$=await Evoucher.find({id_ct_useds:$obj$$._id.toString()});await Promise.all($evouchers_user$$.map($e$$=>deleteEvoucher($e$$.id_app,$e$$.ma,$obj$$._id)));$obj$$.evouchers&&await Promise.all($obj$$.evouchers.map($e$$=>updateEvoucher($e$$.id_app,$e$$.ma,$obj$$._id)));$next$$(null,$obj$$)};$contr_router$$.deleting=function($user$$,
|
|
47
|
-
$obj$$,$next$$){$next$$(null,$obj$$)};$contr_router$$.deleted=async function($user$$,$obj$$,$next$$){await transaction.deleteTrans({id_ct:$obj$$._id.toString()});await transaction.deleteTrans({id_ct:$obj$$._id.toString()+":bonus"},"Tr\u1ea3 l\u1ea1i \u0111i\u1ec3m th\u01b0\u1edfng");await transaction.deleteTrans({id_ct:$obj$$._id.toString()+":buy"});$obj$$.evouchers&&await Promise.all($obj$$.evouchers.map($e$$=>deleteEvoucher($e$$.id_app,$e$$.ma,$obj$$._id)));$next$$(null,$obj$$)};$contr_router$$.view=
|
|
48
|
-
async function($user$$,$items$$,$fn$$){let $id_app$$=$user$$.current_id_app;await Promise.all($items$$.filter($item$$=>$item$$.trang_thai=="0"||$item$$.trang_thai=="2"||$item$$.trang_thai=="7").map($inv$$=>(async()=>{let $tg_hien_tai$$=(new Date).getTime(),$tg_tao$$=(new Date($inv$$.date_created)).getTime();($tg_hien_tai$$-$tg_tao$$)/864E5>1&&($inv$$.trang_thai="9",await model.findOneAndUpdate({_id:$inv$$._id},{trang_thai:9}))})()));async.series({kh:function($callback$$){$items$$.filter($item$$=>
|
|
49
|
-
$item$$.ma_kh).joinModel2($id_app$$,customer,[{where:"ma_kh",fields:"ten_kh"}],function(){$callback$$()})},nhan_vien_giao_hang:function($callback$$){$items$$.filter($item$$=>$item$$.nhan_vien_giao_hang).joinModel2($id_app$$,customer,[{where:{nhan_vien_giao_hang:"ma_kh"},fields:[{ten_nhan_vien_giao_hang:"ten_kh"}]}],function(){$callback$$()})},nv_giao_hang:function($callback$$){$items$$.filter($item$$=>$item$$.user_nv_giao_hang).joinModel2(null,User,{where:{user_nv_giao_hang:"email"},fields:{ten_nv_giao_hang:"name"}},
|
|
50
|
-
function(){$callback$$()})},trangthai:function($callback$$){$items$$.filter($item$$=>$item$$.trang_thai).joinModel2(null,trangthai,[{where:{trang_thai:"ma_trang_thai",ma_ct:"ma_ct"},fields:["ten_trang_thai","color"]}],function(){$callback$$()})},ptthanhtoan:function($callback$$){$items$$.filter($item$$=>$item$$.pt_thanh_toan).joinModel2($id_app$$,ptthanhtoan,[{where:{pt_thanh_toan:"_id"},fields:[{ten_pt_thanh_toan:"ten"},{tk_cn_thanhtoan:"tk_cn"}]}],function(){$callback$$()})},pt1:function($callback$$){$items$$.joinModel2($id_app$$,
|
|
51
|
-
pt1,[{where:{_id:"id_so5"},fields:[{id_pt1:"_id"},{so_ct_pt1:"so_ct"},{ma_ct_pt1:"ma_ct"},{ngay_ct_pt1:"ngay_ct"}]}],function(){$callback$$()})},t_tien:function($callback$$){$items$$.forEach(function($r$$){$r$$.details?($r$$.t_sl=$r$$.details.csum("sl_xuat"),$r$$.t_tien_hang=$r$$.details.csum("tien_hang"),$r$$.t_tien_hang_nt=$r$$.details.csum("tien_hang_nt"),$r$$.t_tien=$r$$.t_tien_hang-$r$$.details.csum("tien_ck_nt"),$r$$.t_tien_nt=$r$$.t_tien_hang_nt-$r$$.details.csum("tien_ck"),$r$$.t_ck_nt=$r$$.t_ck=
|
|
52
|
-
$r$$.tien_ck_hd+($r$$.tien_evoucher||0)):($r$$.t_sl=0,$r$$.t_tien_hang=0,$r$$.t_tien_hang_nt=0,$r$$.t_ck=0,$r$$.t_ck_nt=0,$r$$.t_tien=$r$$.t_tien_hang,$r$$.t_tien_nt=$r$$.t_tien_hang_nt);$r$$.ctcpbhs?($r$$.t_cp_cpb_nt=$r$$.ctcpbhs.csum("tien_cp_nt"),$r$$.t_cp_cpb=$r$$.ctcpbhs.csum("tien_cp")):($r$$.t_cp_cpb_nt=0,$r$$.t_cp_cpb=0);$r$$.t_tt_nt=$r$$.t_tien_nt+$r$$.t_cp_cpb_nt-$r$$.t_ck_nt-($r$$.tt_tien_thuong||0)+($r$$.tien_phi_vc||0)-($r$$.tien_freeship||0);$r$$.t_tt=$r$$.t_tien+$r$$.t_cp_cpb-$r$$.t_ck-
|
|
53
|
-
($r$$.tt_tien_thuong||0)+($r$$.tien_phi_vc||0)-($r$$.tien_freeship||0)});$callback$$()},details_vt:function($callback$$){async.each($items$$,function($details$jscomp$2_r$$,$callback1$$){$details$jscomp$2_r$$=$details$jscomp$2_r$$.details;if(!$details$jscomp$2_r$$)return $callback1$$();$details$jscomp$2_r$$.joinModel2($id_app$$,dmvt,[{where:"ma_vt",fields:["ten_vt"]}],function(){$callback1$$()})},function(){$callback$$()})},details_tt1:function($callback$$){async.mapSeries($items$$,function($r$$,$callback1$$){($r$$.details||
|
|
54
|
-
[]).filter($item$$=>$item$$.ma_tt1).joinModel2($id_app$$,dmtt,[{where:{ma_vt:"ma_vt",ma_tt1:"ma_tt"},setFields:($item$$,$ref$$)=>{$item$$.ten_vt=$item$$.ten_vt+" - "+$ref$$.ten_tt}}],function(){$callback1$$()})},function(){$callback$$()})},details_dt:function($callback$$){async.mapSeries($items$$,function($details$jscomp$4_r$$,$callback1$$){$details$jscomp$4_r$$=$details$jscomp$4_r$$.details;if(!$details$jscomp$4_r$$)return $callback1$$();$details$jscomp$4_r$$.filter($item$$=>$item$$.ma_dt).joinModel2($id_app$$,
|
|
55
|
-
dmdt,[{where:"ma_dt",fields:["ten_dt"]}],function(){$callback1$$()})},function(){$callback$$()})},details_contract:function($callback$$){async.mapSeries($items$$,function($details$jscomp$5_r$$,$callback1$$){$details$jscomp$5_r$$=$details$jscomp$5_r$$.details;if(!$details$jscomp$5_r$$)return $callback1$$();$details$jscomp$5_r$$.filter($item$$=>$item$$.ma_hd).joinModel2($id_app$$,contract,[{where:{ma_hd:"so_hd"},fields:["ten_hd"]}],function(){$callback1$$()})},function(){$callback$$()})},details_phi:function($callback$$){async.mapSeries($items$$,
|
|
56
|
-
function($details$jscomp$6_r$$,$callback1$$){$details$jscomp$6_r$$=$details$jscomp$6_r$$.details;if(!$details$jscomp$6_r$$)return $callback1$$();$details$jscomp$6_r$$.filter($item$$=>$item$$.ma_phi).joinModel2($id_app$$,dmphi,[{where:"ma_phi",fields:["ten_phi"]}],function(){$callback1$$()})},function(){$callback$$()})},details_cpbh:function($callback$$){async.each($items$$,function($ctcpbhs_r$$,$callback1$$){$ctcpbhs_r$$=$ctcpbhs_r$$.ctcpbhs;if(!$ctcpbhs_r$$)return $callback1$$();$ctcpbhs_r$$?$ctcpbhs_r$$.filter($item$$=>
|
|
57
|
-
$item$$.ma_cp).joinModel2($id_app$$,dmcpmh,[{where:"ma_cp",fields:["ten_cp"]}],function(){$callback1$$()}):$callback1$$()},function(){$callback$$()})}},function(){$fn$$(null,$items$$)})}};
|
|
1
|
+
function _0x2280(_0x4118dd,_0x43f25c){const _0x3a58a8=_0x3a58();return _0x2280=function(_0x228091,_0x6ef930){_0x228091=_0x228091-0x14c;let _0x2da095=_0x3a58a8[_0x228091];if(_0x2280['BrPWQt']===undefined){var _0x578af5=function(_0x10f5dd){const _0x3a20eb='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x34340a='',_0x16e2d8='';for(let _0x43d7d7=0x0,_0x497018,_0x28cb09,_0x347444=0x0;_0x28cb09=_0x10f5dd['charAt'](_0x347444++);~_0x28cb09&&(_0x497018=_0x43d7d7%0x4?_0x497018*0x40+_0x28cb09:_0x28cb09,_0x43d7d7++%0x4)?_0x34340a+=String['fromCharCode'](0xff&_0x497018>>(-0x2*_0x43d7d7&0x6)):0x0){_0x28cb09=_0x3a20eb['indexOf'](_0x28cb09);}for(let _0x47d8e3=0x0,_0x38bd59=_0x34340a['length'];_0x47d8e3<_0x38bd59;_0x47d8e3++){_0x16e2d8+='%'+('00'+_0x34340a['charCodeAt'](_0x47d8e3)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x16e2d8);};_0x2280['SfOzrj']=_0x578af5,_0x4118dd=arguments,_0x2280['BrPWQt']=!![];}const _0x2f41b0=_0x3a58a8[0x0],_0x403f4e=_0x228091+_0x2f41b0,_0x38b9ff=_0x4118dd[_0x403f4e];return!_0x38b9ff?(_0x2da095=_0x2280['SfOzrj'](_0x2da095),_0x4118dd[_0x403f4e]=_0x2da095):_0x2da095=_0x38b9ff,_0x2da095;},_0x2280(_0x4118dd,_0x43f25c);}const _0x6145f7=_0x2280;(function(_0x49c818,_0x5a3611){const _0x5ad9b4=_0x2280,_0x2ad4c4=_0x49c818();while(!![]){try{const _0x11f180=-parseInt(_0x5ad9b4(0x242))/0x1+parseInt(_0x5ad9b4(0x3a4))/0x2+-parseInt(_0x5ad9b4(0x16d))/0x3*(parseInt(_0x5ad9b4(0x1a6))/0x4)+parseInt(_0x5ad9b4(0x1bc))/0x5+-parseInt(_0x5ad9b4(0x27a))/0x6*(parseInt(_0x5ad9b4(0x22f))/0x7)+parseInt(_0x5ad9b4(0x3ae))/0x8+parseInt(_0x5ad9b4(0x1ec))/0x9*(parseInt(_0x5ad9b4(0x2f3))/0xa);if(_0x11f180===_0x5a3611)break;else _0x2ad4c4['push'](_0x2ad4c4['shift']());}catch(_0x16e786){_0x2ad4c4['push'](_0x2ad4c4['shift']());}}}(_0x3a58,0xaa3c3));function _0x3a58(){const _0x3b2d5a=['rfbhs08','zxzVDwnOzxjZ','vK5e','s2JdTg5NihrHBYbSACoQBIbR4BQ/Dcb0AgfUAcb0B8oHBJO','q2vYuMW','A1jdugC','C29FDgLLBL9TyxG','rxHtt24','Chbzwuq','DgTFzhq','C29FBgfUx3nK','z2LHx2jHBL9UDa','whb5Avy','q2H6r1q','BMDHEv9JDa','uwr2CeC','y2XWv3i','txDUzNu','yxDdsuy','qM1QEwy','DgjOs1a','DenNA3G','q3vevLe','zg10Da','AxnFCg9PBNq','D2fSBgv0x3rVA2vU','C3r1A0i','vgvjCKu','zMLUze9UzufUzfvWzgf0zq','t2DOAKe','AgfUzgXLqwz0zxjqyxLTzw50','oMjVBNvZ','vuLOvhK','C1Pmzfq','Dg9eyxrL','v2LuAhi','ywLHrgu','ruzczhK','BwfFA2HV','vgvwDNm','t1jlEKG','Dg9RDgS','ufnHzwi','Dg9Umda','zMLUza','yw1VDw50','AwTOsfm','v3PVqLO','BwfFDNq','Dg9mB3DLCKnHC2u','uuTnu3q','z0flBem','XjbP4BUdBsb0AmAW4BUFBMCGz2NHU5TPihrOAEg7H3uGA2JdOwnOigJdOg5N','mtHirLLxEfi','DhjHBNnHy3rPB24','Df9JCf9JCgjFBNq','ufL6shy','re9RDu8','shr3C1i','B1D6veu','uKr6sMm','v0vYwMu','wvjTy0S','DxbKyxrLza','DgvUx3z0','vfzgwuy','rfbiBg8','B0zvALu','rxjYB3iGy3jLyxrLifzPCNr1ywWGugf5BwvUDcbdBgLLBNrvuKW6','DMLLDW','uvfADMG','vKnuDLK','BwfFzhq','tfvvEK8','wKPvAwO','s1neyK0','BfrvBxm','BfDRseO','EMftAuC','C29FDgLLBG','BxvSEwO','AwPjq3y','tfvQvhK','yxr5EKi','z1vhzK0','BwfFDhjHBMDFDgHHAq','Dunqsfy','BMLYEKe','DgLLBL9JAW','uwfQqNu','yvjKDwO','zgvSzxrPBMC','AhLgBw0','y2fUj3qGzMLUzcbLDM91y2HLCG','DgTFA21FBM8','zeH0EKq','y2L0BM8','y1P2wge','ntiXmZe','tvbSqM0','CwzwEw4','Df90Da','wwjhs3G','vhLWzxm','CLPpy3K','ENPuEMu','yNLjBgy','lI4VlI4VBgLICY9JA2rPzw0','vurluwK','BwvZC2fNzq','uhfZzw4','u05AAey','C2vYAwvZ','AKPWALy','zwfJAa','CNvU','qxrNrfa','thf4rLK','DgLLBL9UDa','DgLLBL9Oyw5Nx250','tNjUzM8','Df9JA19UDa','BgvHBG','wffTtwK','tNDXD28','BMz5z1m','CKHqAxq','vxfLvfC','v2L4sK0','Ae5xAMy','CLjzENu','z2v0vgLTzq','qUg6Ow4GA2JdTg5NihrO4BUdig7HUQfWihrP4BUbBIb0Aog7NwKGz2LHBIbUW6b5lIbiyxKGDgJHU60GBog6OwKGC2f1','yxvIAwm','u081','zgD2BNC','A0rdv3C','rfPruLq','BKzsBxq','t1byCe4','t0Pgy2m','qvDitKq','zM12A04','zLLWyMi','qMjQyuO','ywHTy0K','BgLUzq','ywDnB1G','EezxDxi','DgLLBL9LDM91y2HLCG','r1vHzMm','x2LK','tgrpDuW','A1DUq2C','Dg9cBui','r2LICeK','AxL3DNG','BMfTzq','ChvZAe5VDgLMAwnHDgLVBG','uuLuyKC','A2zctNK','DgTFy3bFyMG','qNflsu0','AwrFy3rFDxnLzhm','zgLLBv90AhvVBMC','Ag5yCwS','vMTOquy','C0P3ALe','CgHHBL9IB19LDM91y2HLCG','Ewf1Euy','rhDlvfu','uersqM4','rxPNre8','yNbfAMm','mtKYmJaZntbwswrZBue','C29FAgq','y3n1Bq','ExHXwvO','DgTFA21Fy28','Dhzjq2u','qw9kvNa','ufLvqKC','DgLLBL9LDM91y2HLCL9KDw9Jx3bI','CM91BMrcEq','sePREMi','sxjdreW','C0PKt0O','zNjrExy','ExD1ENe','Au1PCNK','tNDds3O','zgf0zv9JCMvHDgvK','uwXXsue','txPkueW','AeXry1u','zw1HAwW','ELDSDxe','y29UDhjHy3q','AKT5quq','Axf6Dey','wgn1BNG','tKjJtKu','t3PeyLq','Bg9N','uwvuyw4','u0npAwu','BwfW','A0DeqLe','uunZA2i','AM9PBK1VzgvSmG','zgLLBv90AhvVBMDFz2LVAv90AgLLDq','vLnirfK','rLPqr1u','rNDmCeG','igTOW7rUzYbO4BUJCcbS4BUh','ugDgvKe','ANPcA1K','Aw5KzxHpzG','Dujou2e','uvfYDfq','DMLYDhvHBf9WyxLTzw50x2nSAwvUDf91CMW','v0vszM0','zxHMAwvSzhm','q3r6D2y','A0X4rfe','yKnHu0e','Df90Df9UDa','vMnbrNK','v2vIqMe','rMrnEKq','C3rHCNrpzG','CezJCgS','vMjLCxi','CMX2wMq','uu1mBLK','lI4VlI4VBgLICY9IBg9JA2nOywLUy29UBMvJDa','q8o0BMCGDhKVy+g7RweGAmoGBMCGBSoGEsbJAmAWysbJW7mGBEg7MxqGXjhgOw4GDUg7IYbJXQeGC+g7NYbUW6bV','DgLLBL9JA19Oza','CvLvExa','CMnhwKy','svjXs0q','BxHmDNe','C2XjC2i','Cg9ZDerHDge','vg1jthu','DgvUx2nW','yxn5BMm','vgJHURSGBxvHigJdOg5Nia','C2XFBMHHBG','BwfFDhqX','DeHyvui','zg1JCg1O','vhfjBg0','tNnrthi','EKzMve8','ic0G','tezOuwe','y3jLyxrLza','BwfFy3q','zgvUB20','u0nVu2q','wgzjC2u','D1PbuLe','y1rktuC','shbwz2K','CMvKDwnL','ExnHCNK','Aw50CM9KDwnLCG','BwfFA2HFy28','qwvnEg4','zg1WAgK','CevNCei','zxzPt2q','Dg9vChbLCKnHC2u','Dw1AEge','B1HQt2W','DgTFy24','weHvBwi','Egn4sLC','s2rRshu','A0TQvgS','DgLLBL9WyxLTzw50qNLqB2LUDhm','rwHmz0K','tEg7L2KGBog6P24Gy2JHU4KGXjhgSog7O2mGBxvHig3HU5L0igXV4BQHAsbJB2LU','ntiXmte','sMHsD0G','q2HRtw8','y2HLy2TFyMfSyw5Jzq','tgrUEhK','C29KAwvTDgH1B25N','ChvZAa','vMrurNm','vgHHBMGGDg/dOw4Gy2HVimsrXQfUigJdOg5NihpHU5eG','we5Ly1q','uenzv3y','D2fSBgv0x2fKzhjLC3m','zgvSzxrLvhjHBNm','r0fIwvG','qLDuuuS','AxnwywXPza','uuHUA3G','sMPwtfi','rxHSEhe','Ce9HDe0','Df90AwvU','tNbdAM0','tLrcDLq','zwrwzeq','tNDkyKO','sNvOzfO','tfbAqu0','DgvUx3rYyw5Nx3rOywK','sxHtt0y','A1n5uKS','DMv0ENy','y29SB3i','svDVq1G','uNPYCxu','u1fNBwK','CuPIrNi','igTOW7rUzYb04BUtBIb04BQHAq','imsrW6mGXjhgSog7O2mGC+g7RsbK4BULBMC','ruTzshm','y3jLyxrLvMLYDhvHBfbHEw1LBNrdBgLLBNrvuKW','CevcD2q','uLn5sxi','zxjYB3i','tuDsrNy','uNvwrKS','AwrFy3rFDxnLza','z29JsMy','tMfcvNu','tuXsseG','uLjds1y','vhlHUQmGBog6OwKGXjfP4BUdBsb0AmAW4BUFBMCGXjhHU4mGDmoTBMGGBog6OwK','quDlsK4','EKDVzMy','Cgf5BwvUDf9Pza','r3roAxm','rKnpwuS','u2fXzee','thjvq1a','Df90AwvUx2HHBMDFBNq','DvvTs04','Df9JAW','qNvSr2i','uhfQu2W','CvPPDue','rujjr2G','DgDMrfK','AhHtr0q','ntq5otHhEgL2D0u','DgvUx3bOAq','whnUvhi','q1jnteS','Dez0uw8','s0PgtKG','vNLSu2C','y2nVwxy','BeLXqLa','qxvuzeS','mtaZndy3ndr6B0rTzNi','DxnLCL9JCMvHDgvK','BwfFA2G','zw5Kt2y','we5HB2W','ywTVA3e','ANPQC2G','zND3r2W','s096z2u','DgLLBL9JA19UDa','wgnXzey','wxzUwee','qUg6Ow4GA2JdTg5NihrO4BUdigpHUQ1Wig5O4BQTDcbZ4BUrimsrAEg7G20GDgHHBMGGDg/dOw4U','uKLuD0i','B3b0Aw9U','AMrLz0q','BwfFBNq','DgTFBM8','CffuAfK','EwHuzwG','vgJHURSGBxvHigJdOg5NigTOW7rUzYb04BUtBIb04BQHAq','DvLcy3G','rK1bDhK','tNbIAwO','rhDKv3q','CffADxi','DgvUx3r0','svf1AMy','D2fSBgv0x3jLy2vPDMvY','qMjzExa','BvnKBxa','DxbKyxrPBMC','yxn5BMnhCM91Cej5','DLDkr3O','CNPTugC','Egv6BhO','uNDywwK','z1rdEeK','A1fzqu4','t05Vy3G','DfLVEMO','y3vZDg9Tzxi','sgP6BhO','sMvZrK4','BwX2t1e','ChqX','thLtDxa','ExrKz3O','A2TTD1q','DhjHBNnMzxjYzwq','Df90AwvUx2HHBMC','rvLhv2q','uNPiqM4','zvv6y1q','C281','nteXmte','DxnLCG','Cgf5BwvUDf9Zzxj2AwnL','EwnPBxC','u3LcrfC','v2HdrfC','zxHLyW','z0PlCLO','mtmXmteX','Ag14rMC','ALPjyvi','rMj3EKq','BwfFCgHP','ywXS','q1j1ze8','DxbKyxrLtwfUEq','qLrOBeK','A2vvz2q','q2H1ysbUAgfWihbODw9UzYb0AhvJihrOyw5OihrVyw4','tKf1y2i','zgDQwKW','vwX6qKu','yxn5BMnkB2LUtw9KzwWY','oMj1Eq','uNb6B3y','A2DNA0G','vgXnwMS','Cu1kD2u','mteXmq','z01MD2O','vejWweC','rffRswW','twTABLi','yuHoquS','C3bLBMq','AvzZB2K','EgPHBgu','t2Dewxe','uKflq1O','EMrxuKq','lI4VlI4VBgLICY9WB3n0lwjVB2S','zxjYB3iGy3jLyxrLifzPCNr1ywWGugf5BwvUDcbdBgLLBNrvuKW','vMfrrgG','BgjKu04','C29Fy3q','uwzbv24','AxnFy29PBG','shrkAfK','C1flvhC','mtGXnwTru3DKta','BwfFy3a','EM1YBK0','z2LHx2jHBG','A3fItue','vuz0su8','DgTFy28','tg9zA3e','D0P0u1O','z2v0uMf0zq','z2fYsNO','v0fOB2O','Befuz3y','DgLLBL9Oyw5N','Bfz0sgK','vhrtDKG','C0HVBfO','ALbztgu','zgLLBq','CKXiq2C','C2z1DMW','AwrFyxbW','yMfUA0jHBgfUy2vZr2v0','wufkuhm','vwPrvhu','BwfFzhzJCW','BvHNs1C','Bw9Uz29VC2u','DLfQAxu','qLLKv0S','uMrmru0','zvrysw4','D2zbAxG','uNDfzxO','u+g7Ksb0AEg7Gw4Gz2NHUQnTignOBYb0Aog6UYa','sg11AfK','BhzPsLm','C3nYrfy','re1UCMq','yvvcq00','tw5sqMW','qvvgzMi','DKLIqKK','Cef6DvO','yvrkD04','zKvesgy','C29FDgLLBL9NAwfT','Cu9ptva','DgLLBL94Dwf0x250','vwDQq0G','BMHHBL92AwvUx2DPyw9FAgfUzW','t0LxsuK','yNnwqKC','y3jLyxrLvhjHBNm','r2vore4','zMLUze9Uzq','vhlHUQmGBog6OwKGXjfP4BUdBsb0AmAW4BUFBMCGz2NHU5TPihrOAEg7H3uGDgJdOg5OihzPW6PUig3HU5TPimsr4BUdihtdRw5OigZHUQfP','ntm4nfv6vu9xwG','rejpCge','Df90AwvUx250','rMLvDgm','wKHTu3G','B1f6BKO','qvPJAKu','ALbiwxm','vwfhv24','imsrW6mGAog6V3qGAog6Ow4GC+g7RsbK4BULBMC','ExH1D24','vKD1r1O','yLDAsMq','yNHxBLu','yNv5ihbVAw50ihjLC3vSDa','Aefsq0K','C3zHqvm','ELbbyuO','lI4VlI4Vy29UDhjVBgXLCNmVy29UDhjVBgXLCG','C29YDa','DgTFDgW','BgvUz3rO','mZu0mtC0mgvMvLjTwa','y3vYCMvUDf9Pzf9HCha','tw1pEfK','Df9ZBa','zgvSzxrLza','ExHfCKW','Dg9tDhjPBMC','vhvut1K','EvDwsLC','DvverMW','lI4VlI4VBgLICY9WB3n0lxnVy2fP','EfjpqNu','uhrizMy','A1nythi','EfDQvuC','s2Pkvvu','BMHFA2G','uhrZthm','qufOyM0','shDbshi','y2XPzw50sxa','BLzMBNO','q1fMwxu','DhrFDgLLBL90AhvVBMC','z2v0tw9KzwW','EffyAve','DgvUx2TO','Cgr4ALq','wM1TA2e','BwfWu2vYAwvZ','DxnLCL9UDL9NAwfVx2HHBMC','swHjrxa','imsrW6mGXjhgSog7O2mGC+g7RsbK4BULBMCGAog6V3q','suLbrM0','sKPSruG','wMz2CgC','y1DVCfK','rxjtsNm','sKzSD1y','r25KwMG','BwfFDhq','v1fiqvm','ze1jEMC','DgLLBL9JCf9UDa','A1f6tKW','rLLgs3y','y3jLyxrPBMC','CM91Dgu','ownPyNP1za','vwfyDuC','y29UDhjVBgXLCNm','sxrTquu','DgTFDgLLBG','zhzJCW','BMLAuvy','tLvXrfu','zg1KAwvTDgH1B25N','DhLFBgu','CxntsfK','wNPMqNG','CLzrywC','DNLywxO','Cgf5BwvUDej5ug9PBNrZ','tezXCg4','DgvU','DNPNtuu','zgf0zq','CgH1B25NihrODwmGDgHHBMGGDg9HBIbZBZu','DgLLBL94Dwf0','rvz6vxi','ru5mEvG','v0PNtNe','D2XtENK','XjbP4BUdBsb0AmAW4BUFBMCGBxvHigJdOg5N','DgLLBL9WAgLFDMm','vgLqyxq','vKPWyu8','zxbNuwq','wvjpwgi','q1D2uM4','BwfFA2HFBM8','zgnTzhK','v2vxvMS','Cuf1Dwy','BK1MrMi','rNrQCvC','y3vYCMvUy3K','BwD4shm','zMLSDgvY','seT4Aw0','yxbW','uNPZsuq','swHnwKm','y3rJCgjOCW','A2Lqswi','wK9bzey','EhjeEKe','t2jQzwn0swq','BwnxyuS','qxbhvfi','zgLLBL9NAwfP','u3zRz1a','qKTkvvC','y2f0y2G','Du1Rtgm','DgHLBG','wuzAv3C','u1DLveS','DhjHBMDFDgHHAq','DxbKyxrLigLKx2n0x3vZzwrZ','zM9YrwfJAa','vg9QvNe','DgLLBG','sNDkzeG','AuPNBwq','mZa5mtm1ngnLCxj4CG','BuDuC3e','t1rqwu8','Be5izLm','Df9JCf9JCgi','DgTFy2S','shzXzwG','z3ndBuu','ChPhu2G','ChrFDgHHBMHFDg9HBG','swDcBgG','v29UCvC','zgv0ywLSCW','wuLtzNm','C2XFEhvHDa','z0fAAeu','t0jpy20','vM1mtMW','zNHbtLa','mteXndC0nLPlwLbxDq','B21Rs2O','wLvvDxG'];_0x3a58=function(){return _0x3b2d5a;};return _0x3a58();}const PostBook=require(_0x6145f7(0x164)),options=global[_0x6145f7(0x1d4)]('options'),PostSocai=require(_0x6145f7(0x1c6)),User=global[_0x6145f7(0x1d4)](_0x6145f7(0x3e6)),Sodiemthuong=global[_0x6145f7(0x1d4)](_0x6145f7(0x366)),transaction=global[_0x6145f7(0x1d4)](_0x6145f7(0x27b)),Evoucher=global['getModel']('evoucher'),dvcs=global['getModel'](_0x6145f7(0x1f1)),dmvt=global[_0x6145f7(0x1d4)]('dmvt'),dmtt=global[_0x6145f7(0x1d4)](_0x6145f7(0x25c)),dmcpmh=global[_0x6145f7(0x1d4)](_0x6145f7(0x340)),customer=global[_0x6145f7(0x1d4)](_0x6145f7(0x3d7)),dmdt=global[_0x6145f7(0x1d4)]('dmdt'),dmphi=global[_0x6145f7(0x1d4)](_0x6145f7(0x353)),contract=global['getModel'](_0x6145f7(0x30a)),trangthai=global[_0x6145f7(0x1d4)]('trangthai'),currency=global[_0x6145f7(0x1d4)](_0x6145f7(0x212)),ptthanhtoan=global[_0x6145f7(0x1d4)]('ptthanhtoan'),dmdiemthuong=global[_0x6145f7(0x1d4)](_0x6145f7(0x1f4)),model=global[_0x6145f7(0x1d4)](_0x6145f7(0x3e4)),pt1=global[_0x6145f7(0x1d4)](_0x6145f7(0x3db)),controller=require(_0x6145f7(0x1b8)),async=require(_0x6145f7(0x33b)),ma_ct=_0x6145f7(0x2cb),ckdiem=require(_0x6145f7(0x2b0)),blockchainconnect=require(_0x6145f7(0x330)),moment=require('moment'),App=global[_0x6145f7(0x1d4)](_0x6145f7(0x216)),Introducer=global[_0x6145f7(0x1d4)](_0x6145f7(0x350)),getPointBalance=async(_0x3a6f4e,_0x5a58f7)=>{const _0x201d54=_0x6145f7,_0x58e684={'WiThr':function(_0x2e7c5f){return _0x2e7c5f();},'qJbFr':_0x201d54(0x16e),'xgMnx':_0x201d54(0x33a),'lviJS':function(_0x5cd49c,_0x4bae0a){return _0x5cd49c(_0x4bae0a);},'dZVtV':function(_0x4f3a14,_0x54da1d){return _0x4f3a14===_0x54da1d;},'stukB':_0x201d54(0x39f),'eviOd':_0x201d54(0x252),'DDWVF':function(_0x40f2bd,_0x574e75,_0x3d7f74){return _0x40f2bd(_0x574e75,_0x3d7f74);}};return new Promise((_0x454730,_0x3ad8a7)=>{const _0x40084c=_0x201d54,_0x2fd310={'rZOcy':function(_0x36ebb1){const _0x415c69=_0x2280;return _0x58e684[_0x415c69(0x268)](_0x36ebb1);},'XsnTr':_0x58e684[_0x40084c(0x384)],'qOOMP':_0x58e684['xgMnx'],'kQzNL':function(_0x5be1b8,_0x1db8b5){return _0x58e684['lviJS'](_0x5be1b8,_0x1db8b5);},'IWoCX':function(_0x217137,_0x236d1e){const _0x7e9d8c=_0x40084c;return _0x58e684[_0x7e9d8c(0x191)](_0x217137,_0x236d1e);},'KSDbM':function(_0xba6ca2,_0x3b429d){return _0x58e684['dZVtV'](_0xba6ca2,_0x3b429d);},'NsQLr':_0x40084c(0x349)};if(_0x58e684[_0x40084c(0x25f)]===_0x58e684[_0x40084c(0x355)]){let _0x48408d=_0x57a389[_0x40084c(0x219)];if(!_0x48408d)return _0x3c91dd();_0x48408d?_0x48408d[_0x40084c(0x214)](_0x10c943=>_0x10c943[_0x40084c(0x16e)])[_0x40084c(0x316)](_0xeb83cd,_0x1759b8,[{'where':_0x2fd310[_0x40084c(0x3a6)],'fields':[_0x2fd310[_0x40084c(0x19c)]]}],function(){const _0x47d32c=_0x40084c;_0x2fd310[_0x47d32c(0x2ad)](_0xc4359b);}):_0x2fd310[_0x40084c(0x2ad)](_0x125017);}else _0x58e684['DDWVF'](ckdiem,{'id_app':_0x3a6f4e,'email':_0x5a58f7},(_0x5490a0,_0x230ba2)=>{const _0x37a819=_0x40084c,_0x501402={'heeAn':function(_0x2326f4){return _0x2326f4();},'OBOcm':function(_0x322445,_0x1fe34b){const _0x41124d=_0x2280;return _0x2fd310[_0x41124d(0x381)](_0x322445,_0x1fe34b);}};if(_0x2fd310[_0x37a819(0x290)](_0x2fd310[_0x37a819(0x342)],_0x2fd310[_0x37a819(0x342)])){if(_0x5490a0)return _0x2fd310[_0x37a819(0x381)](_0x3ad8a7,new Error(_0x5490a0));_0x2fd310[_0x37a819(0x381)](_0x454730,_0x230ba2[_0x37a819(0x1bb)]===0x0?0x0:_0x230ba2[0x0][_0x37a819(0x270)]);}else _0x2fd310[_0x37a819(0x1e8)](_0x3658fd,_0x21864b)[_0x37a819(0x225)](()=>{_0x501402['heeAn'](_0x475e3f);})[_0x37a819(0x223)](_0x1cb4d5=>{const _0x5c3506=_0x37a819;_0x501402[_0x5c3506(0x23f)](_0x3f7245,_0x1cb4d5);});});});},getWalletBalanceOfApp=async(_0x2e1320,_0x2aada7)=>{const _0x5e7d7b=_0x6145f7,_0x154364={'Ctzwf':function(_0x3e4be3,_0x5e71b9){return _0x3e4be3!==_0x5e71b9;},'sQKTw':function(_0x312cac,_0x1d082e){return _0x312cac===_0x1d082e;}};let _0x5f43d3=await App[_0x5e7d7b(0x1a4)]({'_id':_0x2e1320});if(_0x5f43d3[_0x5e7d7b(0x36c)]&&_0x5f43d3[_0x5e7d7b(0x25e)]){if(_0x154364[_0x5e7d7b(0x324)](_0x5e7d7b(0x387),_0x5e7d7b(0x3a0))){let _0x570905=await blockchainconnect[_0x5e7d7b(0x183)](_0x5f43d3['wallet_address']);return _0x570905?_0x570905[_0x5e7d7b(0x214)](_0x5c2ea3=>_0x5c2ea3['denom']==_0x2aada7)[_0x5e7d7b(0x313)](_0x219db8=>Number(_0x219db8[_0x5e7d7b(0x272)]))[_0x5e7d7b(0x34e)]((_0x18cf73,_0x2fab6e)=>_0x18cf73+_0x2fab6e,0x0):0x0;}else return 0x0;}else return _0x154364[_0x5e7d7b(0x16c)](_0x5e7d7b(0x2f1),_0x5e7d7b(0x2f1))?0x0:_0x25bd70[_0x5e7d7b(0x214)](_0x1dddd4=>_0x1dddd4[_0x5e7d7b(0x348)]==_0xf9987a)['map'](_0x347c8a=>_0x4a45df(_0x347c8a[_0x5e7d7b(0x272)]))[_0x5e7d7b(0x34e)]((_0x46e8e1,_0x1c8614)=>_0x46e8e1+_0x1c8614,0x0);},createTransactionBonus=async function(_0x274e06){const _0x268a46=_0x6145f7,_0x35dde1={'BxhXz':function(_0x3e6fd0,_0x25bf74){return _0x3e6fd0>_0x25bf74;},'IhIEp':function(_0x3689b4,_0x490a83){return _0x3689b4*_0x490a83;},'vJXko':function(_0x3d2df3,_0x205b50,_0x2c5d65,_0x331eee){return _0x3d2df3(_0x205b50,_0x2c5d65,_0x331eee);},'NpCjm':function(_0x4b1e75,_0x22c9d0){return _0x4b1e75===_0x22c9d0;},'CuDVQ':_0x268a46(0x172),'WJgNq':'ZyQBV','omkKj':function(_0x4b5aef,_0x23066f){return _0x4b5aef+_0x23066f;},'BYdWK':_0x268a46(0x393),'XcqdF':function(_0x142f6e,_0x231d1f){return _0x142f6e+_0x231d1f;},'iRHaY':_0x268a46(0x1a5),'xcxJW':_0x268a46(0x279),'qixMn':':introduce','mGYiP':function(_0x2b7b81,_0xee7fcc){return _0x2b7b81(_0xee7fcc);},'fxANP':_0x268a46(0x1fe),'IxSOF':function(_0x27e44d,_0x118314){return _0x27e44d!==_0x118314;},'MbNIz':'wzAFw','DOkuO':_0x268a46(0x362),'pQThY':_0x268a46(0x205),'vQjiu':_0x268a46(0x264)};if(!(_0x274e06[_0x268a46(0x228)]=='5'||_0x274e06[_0x268a46(0x228)]=='6'))return _0x35dde1[_0x268a46(0x376)](_0x35dde1[_0x268a46(0x25b)],_0x35dde1[_0x268a46(0x203)])?0x0:(await transaction[_0x268a46(0x36d)]({'id_ct':_0x35dde1[_0x268a46(0x243)](_0x274e06[_0x268a46(0x2dc)][_0x268a46(0x1c2)](),':bonus')},_0x35dde1[_0x268a46(0x18a)]),await transaction['deleteTrans']({'id_ct':_0x35dde1[_0x268a46(0x3b8)](_0x274e06[_0x268a46(0x2dc)][_0x268a46(0x1c2)](),':introduce')},_0x35dde1['iRHaY']),null);let _0x4480bc=await customer['findOne']({'id_app':_0x274e06[_0x268a46(0x182)],'ma_kh':_0x274e06['ma_kh']})||{},_0x23ac71=_0x35dde1[_0x268a46(0x3b8)]((await model[_0x268a46(0x271)]({'id_app':_0x274e06[_0x268a46(0x182)],'ma_kh':_0x274e06[_0x268a46(0x3b0)],'ngay_ct':{'$lte':_0x274e06[_0x268a46(0x253)]}}))[_0x268a46(0x1bb)],0x1),_0x5099ee=await App['findOne']({'_id':_0x274e06['id_app']}),_0x1d66ea=await Introducer[_0x268a46(0x1a4)]({'id_app':_0x274e06['id_app'],'be_introduced':_0x274e06['email']||_0x274e06[_0x268a46(0x3af)]}),_0x156496=_0x5099ee[_0x268a46(0x323)][_0x268a46(0x317)];_0x35dde1[_0x268a46(0x376)](_0x23ac71,0x1)&&_0x156496&&_0x1d66ea&&await transaction[_0x268a46(0x1a2)]({'id_app':_0x274e06['id_app'],'sender_email':_0x274e06[_0x268a46(0x182)],'receiver_email':_0x1d66ea['be_introduced_by'],'amount':_0x156496,'description':_0x35dde1[_0x268a46(0x35b)],'otherData':{'ma_ct':_0x274e06[_0x268a46(0x347)],'so_ct':_0x274e06[_0x268a46(0x168)],'ngay_ct':_0x274e06[_0x268a46(0x253)],'id_ct':_0x35dde1['XcqdF'](_0x274e06['_id'][_0x268a46(0x1c2)](),_0x35dde1['qixMn'])}});if(!_0x274e06[_0x268a46(0x323)]['survey'])return null;let _0x2bdd68,_0x32a823=_0x35dde1['mGYiP'](moment,new Date())[_0x268a46(0x32b)](_0x35dde1[_0x268a46(0x241)])[_0x268a46(0x267)](),_0x141e46=_0x274e06['details']['filter'](_0x76e1f8=>_0x76e1f8[_0x268a46(0x17a)])[_0x268a46(0x313)](async _0xa1b38c=>{const _0x36d9cb=_0x268a46;let _0x2397cd=await dmvt[_0x36d9cb(0x1a4)]({'ma_vt':_0xa1b38c[_0x36d9cb(0x275)],'id_app':_0x274e06[_0x36d9cb(0x182)]}),_0x220675={'id_app':_0x274e06['id_app'],'status':!![],'ma_kh':{'$in':[null,'',_0x4480bc[_0x36d9cb(0x3b0)]]},'ma_kho':{'$in':[null,'',_0x274e06[_0x36d9cb(0x26b)]]},'nh_kh':{'$in':[null,'',_0x4480bc[_0x36d9cb(0x1cc)]]},'hieu_luc_tu':{'$lte':_0x32a823},'hieu_luc_den':{'$gte':_0x32a823},'ap_dung_lan_mua_thu':{'$in':[0x0,_0x23ac71]},'ma_vt':{'$in':[null,'',undefined,_0xa1b38c[_0x36d9cb(0x275)]]},'ma_nvt':{'$in':[null,'',undefined,_0x2397cd?_0x2397cd['ma_nvt']:'']}},_0x4d76d4=await dmdiemthuong['find'](_0x220675)[_0x36d9cb(0x1b9)]({'ma_vt':-0x1,'ma_nvt':-0x1,'hieu_luc_tu':-0x1})['limit'](0x1);if(_0x35dde1['BxhXz'](_0x4d76d4[_0x36d9cb(0x1bb)],0x0)){let _0x3f0e96=0x0;if(!_0x4d76d4[0x0][_0x36d9cb(0x22c)])_0x3f0e96=_0x35dde1[_0x36d9cb(0x1db)](_0x4d76d4[0x0][_0x36d9cb(0x17f)],_0xa1b38c[_0x36d9cb(0x23d)]||0x1);else{let _0x22448d=_0x4d76d4[0x0][_0x36d9cb(0x17f)]/_0x4d76d4[0x0]['tien'];if(!_0x22448d){let _0x53d7ba=_0xa1b38c['tien_hang']-(_0xa1b38c['tien_ck']||0x0);_0x3f0e96=Math[_0x36d9cb(0x2fc)](_0x35dde1[_0x36d9cb(0x1db)](_0x53d7ba,_0x22448d),0x0);}}return _0x3f0e96;}else return 0x0;}),_0xd383e3=await Promise['all'](_0x141e46);_0x2bdd68=_0xd383e3[_0x268a46(0x34e)]((_0xb4548f,_0x5510d5)=>_0xb4548f+_0x5510d5,0x0);if(!_0x2bdd68){if(_0x35dde1[_0x268a46(0x37d)](_0x35dde1['MbNIz'],_0x35dde1[_0x268a46(0x27e)])){await transaction['deleteTrans']({'id_ct':_0x274e06[_0x268a46(0x2dc)]['toString']()+_0x268a46(0x264)},_0x35dde1[_0x268a46(0x18a)]);return;}else return _0x35dde1['vJXko'](_0x359c9c,_0x1dd791[_0x268a46(0x182)],_0x1bca34['ma'],_0x4db197[_0x268a46(0x2dc)]);}let _0x42a6f4=await transaction['findOne']({'id_ct':_0x35dde1[_0x268a46(0x243)](_0x274e06[_0x268a46(0x2dc)][_0x268a46(0x1c2)](),':bonus')});if(_0x42a6f4&&_0x35dde1[_0x268a46(0x376)](_0x42a6f4['amount'],_0x2bdd68))return;await transaction[_0x268a46(0x36d)]({'id_ct':_0x35dde1[_0x268a46(0x243)](_0x274e06[_0x268a46(0x2dc)][_0x268a46(0x1c2)](),_0x268a46(0x264))},_0x268a46(0x393));let _0x26aaba=await transaction[_0x268a46(0x1a2)]({'id_app':_0x274e06[_0x268a46(0x182)],'sender_email':_0x274e06[_0x268a46(0x182)],'receiver_email':_0x274e06[_0x268a46(0x3af)],'amount':_0x2bdd68,'description':_0x35dde1[_0x268a46(0x3c0)],'otherData':{'ma_ct':_0x274e06[_0x268a46(0x347)],'so_ct':_0x274e06[_0x268a46(0x168)],'ngay_ct':_0x274e06[_0x268a46(0x253)],'id_ct':_0x274e06[_0x268a46(0x2dc)]['toString']()+_0x35dde1[_0x268a46(0x189)]}});return _0x26aaba;},createTransactionPayment=async function(_0x5f6cec){const _0x18b6c3=_0x6145f7,_0x2d05b6={'hyFmm':function(_0x2bc3c4,_0x66ffc){return _0x2bc3c4+_0x66ffc;},'lbdSN':_0x18b6c3(0x369)};await transaction['deleteTrans']({'id_ct':_0x5f6cec[_0x18b6c3(0x2dc)][_0x18b6c3(0x1c2)]()});if(_0x5f6cec[_0x18b6c3(0x1fa)]){let _0x6e6901=_0x2d05b6[_0x18b6c3(0x2a1)](_0x2d05b6[_0x18b6c3(0x167)],_0x5f6cec[_0x18b6c3(0x168)]);await transaction['createTrans']({'id_app':_0x5f6cec[_0x18b6c3(0x182)],'sender_email':_0x5f6cec[_0x18b6c3(0x3af)],'receiver_email':_0x5f6cec[_0x18b6c3(0x182)],'amount':_0x5f6cec['paymentByPoints'],'description':_0x6e6901,'otherData':{'ma_ct':_0x5f6cec[_0x18b6c3(0x347)],'so_ct':_0x5f6cec['so_ct'],'ngay_ct':_0x5f6cec['ngay_ct'],'id_ct':_0x5f6cec['_id'][_0x18b6c3(0x1c2)]()}});}},BuyPoint=async function(_0x3f235b){const _0x5bdaca=_0x6145f7,_0x45d87f={'MzJPL':function(_0x100ceb,_0x3768){return _0x100ceb+_0x3768;},'mGTsq':function(_0x3cc13e,_0x448f97){return _0x3cc13e+_0x448f97;},'kNctH':_0x5bdaca(0x153)};await transaction[_0x5bdaca(0x36d)]({'id_ct':_0x45d87f[_0x5bdaca(0x306)](_0x3f235b['_id'][_0x5bdaca(0x1c2)](),_0x5bdaca(0x153))});let _0x12ff53=_0x3f235b[_0x5bdaca(0x23b)]['filter'](_0x3ed847=>_0x3ed847[_0x5bdaca(0x25d)])[_0x5bdaca(0x313)](_0x15a431=>_0x15a431[_0x5bdaca(0x23d)])['reduce']((_0x133c09,_0x4578a7)=>_0x133c09+_0x4578a7,0x0);_0x12ff53&&await transaction[_0x5bdaca(0x1a2)]({'id_app':_0x3f235b[_0x5bdaca(0x182)],'sender_email':_0x3f235b['id_app'],'receiver_email':_0x3f235b['user_created'],'amount':_0x12ff53,'description':_0x3f235b[_0x5bdaca(0x220)]||'Nộp\x20tiền\x20mặt\x20vào\x20ví','otherData':{'ma_ct':_0x3f235b[_0x5bdaca(0x347)],'so_ct':_0x3f235b[_0x5bdaca(0x168)],'ngay_ct':_0x3f235b[_0x5bdaca(0x253)],'id_ct':_0x45d87f[_0x5bdaca(0x230)](_0x3f235b[_0x5bdaca(0x2dc)]['toString'](),_0x45d87f['kNctH'])}});},checkEvoucher=(_0x241f15,_0xc8cc4a,_0x1ea4ee)=>{const _0x4b54c7=_0x6145f7,_0x297dab={'QfAWn':function(_0x3134b7,_0x2a437c){return _0x3134b7(_0x2a437c);},'awCIF':'Mỗi\x20lần\x20chỉ\x20được\x20mua\x20một\x20loại\x20coin','zTAmI':function(_0x53e0c7,_0x1b7e3e,_0x5f173f){return _0x53e0c7(_0x1b7e3e,_0x5f173f);},'tFtQo':function(_0x7ac44){return _0x7ac44();},'HtJhY':_0x4b54c7(0x3a5),'lxhNU':function(_0x548f4e,_0x3eb5e8){return _0x548f4e===_0x3eb5e8;},'frQyv':function(_0x286a8e,_0x17970a){return _0x286a8e>=_0x17970a;},'szzIr':function(_0x57d825,_0x37652e){return _0x57d825>=_0x37652e;},'wlVCR':function(_0x5932e5,_0x4a1aa4){return _0x5932e5!==_0x4a1aa4;},'cTJMG':'yKEIX','XiiQt':function(_0x2d0cf2,_0x42bd1d){return _0x2d0cf2<_0x42bd1d;},'WixJM':'date','ysary':_0x4b54c7(0x2c4),'rzmPg':function(_0xa26ebb,_0x5b1591){return _0xa26ebb*_0x5b1591;},'yauyF':_0x4b54c7(0x28e),'FbwzD':function(_0x5884e2,_0x1a3cae){return _0x5884e2>_0x1a3cae;},'ikhHS':function(_0x638753,_0x5992a5){return _0x638753!==_0x5992a5;}};return(_0xc8cc4a[_0x4b54c7(0x246)]||[])[_0x4b54c7(0x313)](_0x56b2ab=>{return new Promise((_0x10c2db,_0x4e0e77)=>{const _0x7e745a=_0x2280,_0x49f7ca={'AoJVp':function(_0x9b44fd,_0x5326ef){const _0x191144=_0x2280;return _0x297dab[_0x191144(0x169)](_0x9b44fd,_0x5326ef);},'tuenK':_0x297dab[_0x7e745a(0x257)],'wJtSZ':function(_0x227fff,_0x31a76f,_0x56ab0e){return _0x297dab['zTAmI'](_0x227fff,_0x31a76f,_0x56ab0e);},'PtsLs':function(_0x38e9bf){const _0x2f7535=_0x7e745a;return _0x297dab[_0x2f7535(0x3a8)](_0x38e9bf);},'xmUwt':_0x297dab[_0x7e745a(0x16b)],'uUDFl':function(_0x5e8813,_0xb02212){return _0x297dab['lxhNU'](_0x5e8813,_0xb02212);},'vWJGz':_0x7e745a(0x2d4),'FWdZq':function(_0xaf58f5,_0x4da108){const _0x176b25=_0x7e745a;return _0x297dab[_0x176b25(0x300)](_0xaf58f5,_0x4da108);},'rHPit':function(_0x2bf706,_0x4f50ce){return _0x2bf706>_0x4f50ce;},'GgdbI':function(_0x123fd5,_0x4a74f5){return _0x297dab['szzIr'](_0x123fd5,_0x4a74f5);},'PtHff':function(_0x17531a,_0x3332ca){return _0x297dab['wlVCR'](_0x17531a,_0x3332ca);},'RzHBn':_0x297dab[_0x7e745a(0x34c)],'cQbEZ':function(_0x1efb57,_0xfc9833){const _0x8f2e67=_0x7e745a;return _0x297dab[_0x8f2e67(0x169)](_0x1efb57,_0xfc9833);},'UlzBE':function(_0x5d543b,_0xb92201){return _0x297dab['XiiQt'](_0x5d543b,_0xb92201);},'NwCKz':function(_0x29df0a,_0x73e90){return _0x297dab['QfAWn'](_0x29df0a,_0x73e90);},'ssrDV':_0x297dab[_0x7e745a(0x2c5)],'YROXb':_0x297dab[_0x7e745a(0x34f)],'nMfFb':function(_0x195eef,_0x31539a){const _0xd323ad=_0x7e745a;return _0x297dab[_0xd323ad(0x169)](_0x195eef,_0x31539a);},'mlvOQ':function(_0x8e4e24,_0x2cdb4d){const _0x215be0=_0x7e745a;return _0x297dab[_0x215be0(0x3d0)](_0x8e4e24,_0x2cdb4d);},'xWjUG':_0x297dab[_0x7e745a(0x2ee)],'LPZAM':function(_0x32a6dd,_0x16bc00){const _0xbf3d42=_0x7e745a;return _0x297dab[_0xbf3d42(0x3f0)](_0x32a6dd,_0x16bc00);},'cgfds':function(_0x590bbf,_0x442991){const _0x703dff=_0x7e745a;return _0x297dab[_0x703dff(0x273)](_0x590bbf,_0x442991);}};((async()=>{const _0x59b7a1=_0x7e745a,_0x15da6a=await Evoucher[_0x59b7a1(0x1a4)]({'ma':_0x56b2ab['ma'],'id_app':_0x241f15[_0x59b7a1(0x1bd)]});if(!_0x15da6a)return _0x49f7ca[_0x59b7a1(0x1c5)](_0x59b7a1(0x18e),_0x49f7ca[_0x59b7a1(0x3cf)])?_0x49f7ca[_0x59b7a1(0x2f9)](_0x27cbc4,_0x49f7ca['tuenK']):(console['error'](_0x59b7a1(0x3c2),_0x56b2ab),_0x4e0e77(new Error(_0x59b7a1(0x33c)+_0x56b2ab['ma']+_0x59b7a1(0x385))));if(_0x15da6a['id_ct_used']&&_0x15da6a[_0x59b7a1(0x38e)]!==(_0xc8cc4a['_id']||'')[_0x59b7a1(0x1c2)]())return _0x49f7ca['AoJVp'](_0x4e0e77,new Error(_0x59b7a1(0x33c)+_0x56b2ab['ma']+_0x59b7a1(0x386)));if(_0x49f7ca['FWdZq'](_0x15da6a[_0x59b7a1(0x24f)],0x1)&&_0x15da6a['id_ct_useds']&&_0x49f7ca[_0x59b7a1(0x2c3)](_0x15da6a[_0x59b7a1(0x2e8)]['length'],0x0)){if(_0x1ea4ee&&_0x49f7ca['GgdbI'](_0x15da6a['id_ct_useds'][_0x59b7a1(0x31e)](_0x1ea4ee[_0x59b7a1(0x2dc)][_0x59b7a1(0x1c2)]()),0x0))return _0x10c2db(!![]);let _0x1784ae=_0x15da6a[_0x59b7a1(0x2e8)][_0x59b7a1(0x1bb)];if(_0x1784ae>_0x15da6a[_0x59b7a1(0x24f)]){if(_0x49f7ca[_0x59b7a1(0x1c8)](_0x59b7a1(0x15f),_0x49f7ca[_0x59b7a1(0x3e2)]))return _0x49f7ca['cQbEZ'](_0x4e0e77,new Error(_0x59b7a1(0x33c)+_0x56b2ab['ma']+_0x59b7a1(0x1dc)));else _0x49f7ca[_0x59b7a1(0x175)](_0x5c32ea,null,_0x303e56);}}if(_0x15da6a[_0x59b7a1(0x3e6)]&&_0x49f7ca[_0x59b7a1(0x1c8)](_0x15da6a[_0x59b7a1(0x3e6)],_0xc8cc4a[_0x59b7a1(0x3af)]||_0x241f15[_0x59b7a1(0x308)]))return _0x4e0e77(new Error(_0x59b7a1(0x33c)+_0x56b2ab['ma']+'\x20không\x20hợp\x20lệ'));const _0xa39e9d=new Date(_0xc8cc4a[_0x59b7a1(0x304)]);if(_0x49f7ca[_0x59b7a1(0x151)](_0x49f7ca[_0x59b7a1(0x303)](moment,_0x15da6a['hieu_luc_den'])[_0x59b7a1(0x3b1)](_0x49f7ca[_0x59b7a1(0x192)])[_0x59b7a1(0x267)]()[_0x59b7a1(0x2c8)](),_0xa39e9d[_0x59b7a1(0x2c8)]())){if(_0x49f7ca['YROXb']!==_0x49f7ca[_0x59b7a1(0x20a)]){const _0x2bc30f={'NAucb':function(_0x358025){return _0x49f7ca['PtsLs'](_0x358025);}},_0xc3ac59=_0x2245c['details'];if(!_0xc3ac59)return _0x49f7ca[_0x59b7a1(0x1cd)](_0x486a2d);_0xc3ac59[_0x59b7a1(0x214)](_0x3b29c9=>_0x3b29c9[_0x59b7a1(0x3f1)])['joinModel2'](_0x5c2023,_0x4c1a31,[{'where':_0x59b7a1(0x3f1),'fields':[_0x49f7ca['xmUwt']]}],function(){const _0x4c5359=_0x59b7a1;_0x2bc30f[_0x4c5359(0x14f)](_0x1cdbd0);});}else return _0x49f7ca[_0x59b7a1(0x210)](_0x4e0e77,new Error(_0x59b7a1(0x33c)+_0x56b2ab['ma']+_0x59b7a1(0x1af)));}let _0x5cc791=_0x15da6a[_0x59b7a1(0x294)];_0x15da6a['ty_le']&&(_0x5cc791=Math['roundBy'](_0x49f7ca[_0x59b7a1(0x3da)](_0xc8cc4a[_0x59b7a1(0x23b)][_0x59b7a1(0x313)](_0x1098f6=>_0x1098f6[_0x59b7a1(0x2bc)])[_0x59b7a1(0x34e)]((_0x4c46e2,_0x475096)=>_0x4c46e2+_0x475096,0x0),_0x15da6a[_0x59b7a1(0x1f5)])/0x64));if(_0x15da6a[_0x59b7a1(0x24b)]){if(_0x49f7ca[_0x59b7a1(0x1c5)](_0x49f7ca['xWjUG'],_0x49f7ca[_0x59b7a1(0x1ca)])){if(_0x49f7ca[_0x59b7a1(0x37b)](_0x5cc791,_0x15da6a[_0x59b7a1(0x24b)]))_0x5cc791=_0x15da6a[_0x59b7a1(0x24b)];}else _0x5c6847();}if(_0x49f7ca['cgfds'](_0x56b2ab[_0x59b7a1(0x19b)],_0x5cc791))return _0x4e0e77(new Error(_0x59b7a1(0x18f)+_0x56b2ab['ma']+'\x20không\x20hợp\x20lệ'));_0x10c2db(!![]);})());});});},updateEvoucher=async(_0x439a5c,_0x2eb139,_0x2c2d31)=>{const _0x57fb5d=_0x6145f7,_0x311e75={'Pqsen':_0x57fb5d(0x2a2),'aubic':_0x57fb5d(0x229)};if(!_0x2eb139)return;_0x2c2d31=_0x2c2d31[_0x57fb5d(0x1c2)]();const _0x43dcbe=await Evoucher[_0x57fb5d(0x1a4)]({'ma':_0x2eb139,'id_app':_0x439a5c});if(!_0x43dcbe){console[_0x57fb5d(0x38b)](_0x311e75[_0x57fb5d(0x2b3)],_0x2eb139);return;}let _0x15f581=_0x43dcbe[_0x57fb5d(0x2e8)]||[];_0x15f581[_0x57fb5d(0x367)](_0x2c2d31),_0x15f581=[...new Set(_0x15f581)];let _0x3c8f89=await Evoucher[_0x57fb5d(0x261)]({'_id':_0x43dcbe[_0x57fb5d(0x2dc)]},{'id_ct_useds':_0x15f581});console[_0x57fb5d(0x310)](_0x311e75[_0x57fb5d(0x2ca)],_0x2eb139,_0x15f581,_0x3c8f89);},deleteEvoucher=async(_0x39693f,_0x31cbd2,_0x729cc9)=>{const _0x593118=_0x6145f7,_0x23eb39={'lTUms':_0x593118(0x229)};if(!_0x31cbd2)return;_0x729cc9=_0x729cc9[_0x593118(0x1c2)]();const _0x2bf4e8=await Evoucher[_0x593118(0x1a4)]({'id_app':_0x39693f,'ma':_0x31cbd2});if(!_0x2bf4e8)return;let _0xc86b1b=(_0x2bf4e8[_0x593118(0x2e8)]||[])[_0x593118(0x214)](_0x41379a=>_0x41379a!==_0x729cc9),_0x2deb6c=await Evoucher['findOneAndUpdate']({'_id':_0x2bf4e8['_id']},{'id_ct_useds':_0xc86b1b});console[_0x593118(0x310)](_0x23eb39[_0x593118(0x291)],_0x31cbd2,_0xc86b1b,_0x2deb6c);},valid=async function(_0x14d82a,_0x18e342,_0x47c939,_0x5d69b1){const _0x5029d9=_0x6145f7,_0x49b78c={'YISfs':function(_0x4d1bd3,_0x38e5a0){return _0x4d1bd3-_0x38e5a0;},'zdWRD':function(_0x379223,_0x5ae293,_0x194dcc){return _0x379223(_0x5ae293,_0x194dcc);},'SaqdA':function(_0x19c4c4,_0x3fc802){return _0x19c4c4+_0x3fc802;},'TtSvH':'error\x20create\x20Virtual\x20Payment\x20ClientURL','kfBNy':function(_0x416c37,_0x53610c){return _0x416c37===_0x53610c;},'uBNSa':'HmaEc','HKxim':_0x5029d9(0x2f8),'QdvpG':function(_0x330916,_0x12f762){return _0x330916(_0x12f762);},'dHtzD':function(_0x5187ec,_0x187839,_0x543302){return _0x5187ec(_0x187839,_0x543302);},'EYGWd':_0x5029d9(0x331),'WERih':function(_0x5b9cd4){return _0x5b9cd4();},'XHUmb':function(_0x2a1b3e,_0x44349b,_0x23e4c0,_0x303c0f){return _0x2a1b3e(_0x44349b,_0x23e4c0,_0x303c0f);},'tITqG':_0x5029d9(0x25a),'Xcunx':function(_0x4c34a8,_0x41bcce){return _0x4c34a8!==_0x41bcce;},'aMysF':'rxnBW','GtNis':_0x5029d9(0x16a),'YRmcK':function(_0x4e27b5,_0xdcb069){return _0x4e27b5*_0xdcb069;},'WeWVk':'iEGwN','zFaaF':'BHvgc','oFUjU':_0x5029d9(0x247),'epgQd':function(_0x38a941,_0x31c6b2){return _0x38a941!==_0x31c6b2;},'MkZnR':'nUuPp','ZKRHL':_0x5029d9(0x2ab)};try{const _0x2ebefd=_0x49b78c[_0x5029d9(0x35a)](checkEvoucher,_0x14d82a,_0x18e342,_0x5d69b1);await Promise[_0x5029d9(0x3f2)](_0x2ebefd);}catch(_0x38c9dc){if(_0x49b78c[_0x5029d9(0x2e5)](_0x49b78c['tITqG'],_0x5029d9(0x25a)))return _0x49b78c[_0x5029d9(0x254)](_0x47c939,_0x38c9dc[_0x5029d9(0x2b2)]);else{let _0x4ca6e6=_0x49b78c[_0x5029d9(0x23c)](_0x160f18[_0x5029d9(0x17a)],_0x296974[_0x5029d9(0x29d)]||0x0);_0x324da0=_0x349bbc[_0x5029d9(0x2fc)](_0x4ca6e6*_0x32003a,0x0);}}if(_0x18e342[_0x5029d9(0x2da)]){const _0x2aed13=await options['findOne']({'id_app':_0x18e342[_0x5029d9(0x182)],'id_func':_0x18e342[_0x5029d9(0x347)][_0x5029d9(0x276)]()})['lean']();if(_0x2aed13&&_0x2aed13[_0x5029d9(0x3bc)]&&_0x2aed13[_0x5029d9(0x3bc)][_0x5029d9(0x2ed)]){if(_0x49b78c[_0x5029d9(0x30d)]('rxnBW',_0x49b78c['aMysF']))_0x49b78c[_0x5029d9(0x163)](_0x10f1fc,_0x20a268,_0x3a92e5);else{let _0x239315=0x0,_0x117e91=_0x18e342[_0x5029d9(0x2da)],_0x2149e7=_0x49b78c[_0x5029d9(0x23c)](_0x117e91,_0x239315);(_0x18e342[_0x5029d9(0x23b)]||[])[_0x5029d9(0x22a)](_0x26750d=>{const _0x1194a0=_0x5029d9;if(_0x2149e7>0x0){let _0x58444c=_0x49b78c[_0x1194a0(0x23c)](_0x26750d[_0x1194a0(0x2bc)],_0x26750d[_0x1194a0(0x3b7)]||0x0),_0x4d5445=_0x2149e7>_0x58444c?_0x58444c:_0x2149e7;_0x26750d[_0x1194a0(0x2fb)]=_0x4d5445,_0x239315=_0x49b78c[_0x1194a0(0x399)](_0x239315,_0x4d5445),_0x2149e7=_0x117e91-_0x239315;}else _0x2149e7=0x0;});}}}await(_0x18e342[_0x5029d9(0x23b)]||[])[_0x5029d9(0x152)](_0x14d82a[_0x5029d9(0x1bd)],dmvt,{'where':'ma_vt','fields':_0x49b78c[_0x5029d9(0x397)]});if(_0x18e342[_0x5029d9(0x1fa)]){if(_0x5029d9(0x36f)===_0x5029d9(0x1f8)){if(_0x147c68)_0x28e91e[_0x5029d9(0x310)](_0x49b78c[_0x5029d9(0x17c)],_0x132877[_0x5029d9(0x2b2)]);}else try{let _0x5a6a1a=await currency[_0x5029d9(0x176)](_0x18e342['id_app'],_0x18e342[_0x5029d9(0x3be)]);_0x18e342[_0x5029d9(0x35e)]=_0x49b78c[_0x5029d9(0x283)](_0x18e342['paymentByPoints'],_0x5a6a1a);}catch(_0x15c817){if(_0x49b78c[_0x5029d9(0x2e5)](_0x49b78c[_0x5029d9(0x20e)],_0x49b78c['zFaaF'])){const _0x409546={'aTJwN':function(_0x426311,_0x2d0066){return _0x426311>_0x2d0066;},'GAbYX':function(_0x5bdfa6,_0x2dec28){return _0x5bdfa6-_0x2dec28;},'gAKlC':function(_0x15a772,_0xbc76f2){return _0x15a772+_0xbc76f2;},'yxqYZ':function(_0x504518,_0x2a0949){return _0x504518-_0x2a0949;}};let _0x567903=0x0,_0x29b741=_0x55969a[_0x5029d9(0x2da)],_0x3c410c=_0x49b78c['YISfs'](_0x29b741,_0x567903);(_0x43c53c[_0x5029d9(0x23b)]||[])[_0x5029d9(0x22a)](_0x4bc120=>{const _0x30ec34=_0x5029d9;if(_0x409546[_0x30ec34(0x199)](_0x3c410c,0x0)){let _0x2d0799=_0x409546[_0x30ec34(0x36e)](_0x4bc120[_0x30ec34(0x2bc)],_0x4bc120[_0x30ec34(0x3b7)]||0x0),_0xd65576=_0x409546[_0x30ec34(0x199)](_0x3c410c,_0x2d0799)?_0x2d0799:_0x3c410c;_0x4bc120[_0x30ec34(0x2fb)]=_0xd65576,_0x567903=_0x409546[_0x30ec34(0x278)](_0x567903,_0xd65576),_0x3c410c=_0x409546[_0x30ec34(0x2f6)](_0x29b741,_0x567903);}else _0x3c410c=0x0;});}else return _0x47c939(_0x15c817['message']);}}for(let _0x4031f9=0x0;_0x4031f9<(_0x18e342[_0x5029d9(0x23b)]||[])[_0x5029d9(0x1bb)];_0x4031f9++){const _0x59044f=(_0x18e342[_0x5029d9(0x23b)]||[])[_0x4031f9];_0x59044f[_0x5029d9(0x2d7)]=_0x4031f9,_0x49b78c['kfBNy'](_0x18e342['ma_nt'],_0x49b78c[_0x5029d9(0x288)])&&(_0x59044f[_0x5029d9(0x22c)]=_0x59044f[_0x5029d9(0x2bb)],_0x59044f[_0x5029d9(0x17a)]=_0x59044f[_0x5029d9(0x2bc)],_0x59044f['tien_ck']=_0x59044f[_0x5029d9(0x3b7)],_0x59044f[_0x5029d9(0x170)]=_0x59044f[_0x5029d9(0x250)]),_0x59044f[_0x5029d9(0x200)]=_0x59044f[_0x5029d9(0x19d)];}!_0x18e342[_0x5029d9(0x186)]?dvcs['findOne']({'id_app':_0x14d82a[_0x5029d9(0x1bd)]},{'_id':0x1},function(_0x499cd5,_0x224060){const _0x175565=_0x5029d9;if(_0x49b78c[_0x175565(0x2e5)](_0x49b78c[_0x175565(0x31f)],_0x49b78c[_0x175565(0x215)]))_0x429bcd[_0x175565(0x27c)]=0x0,_0x168f00['t_cp_cpb']=0x0;else{if(_0x499cd5)return _0x49b78c[_0x175565(0x254)](_0x47c939,_0x499cd5);return _0x224060?(_0x18e342[_0x175565(0x186)]=_0x224060['_id'][_0x175565(0x1c2)](),_0x49b78c[_0x175565(0x2a4)](_0x47c939,null,_0x18e342)):_0x49b78c[_0x175565(0x254)](_0x47c939,_0x49b78c[_0x175565(0x3e1)]);}}):_0x49b78c[_0x5029d9(0x209)](_0x49b78c[_0x5029d9(0x15c)],_0x49b78c['ZKRHL'])?_0x47c939(null,_0x18e342):_0x49b78c['WERih'](_0x32e997);};module['exports']=function(_0x18af0d){const _0xba0522=_0x6145f7,_0x33ca1a={'awpwx':function(_0x1d01b4,_0x157506,_0x3bcd0c){return _0x1d01b4(_0x157506,_0x3bcd0c);},'XNecT':function(_0x195282,_0x1f7725){return _0x195282*_0x1f7725;},'JesFN':function(_0x2a4d26,_0x30b752){return _0x2a4d26!==_0x30b752;},'QHnkx':_0xba0522(0x2bd),'Hvqeh':function(_0x13e894,_0x2586b6){return _0x13e894==_0x2586b6;},'PYzHv':function(_0x489e83,_0x50a756){return _0x489e83==_0x50a756;},'yxuwn':function(_0x492799,_0x13927f){return _0x492799==_0x13927f;},'bsVBG':function(_0xa55704,_0x1b524d){return _0xa55704!==_0x1b524d;},'SyBDW':_0xba0522(0x221),'iMUPt':_0xba0522(0x292),'svaAS':function(_0x5f3fe1){return _0x5f3fe1();},'pzGSh':_0xba0522(0x275),'OPXpN':function(_0x55875e){return _0x55875e();},'pdxjT':_0xba0522(0x1d8),'QITbG':'chuyen\x20tien\x20vao\x20vi\x20nguoi\x20nap','MnRBl':_0xba0522(0x1b4),'QQZvh':function(_0x56f12d){return _0x56f12d();},'FZPGU':function(_0x49d81a,_0x18688c){return _0x49d81a===_0x18688c;},'ecdKc':'VylSg','ovhya':'ENLyX','SNZhF':_0xba0522(0x3e4),'ZUUux':'ten_vt','FwLpH':function(_0x187295,_0x32538f){return _0x187295!==_0x32538f;},'lIqBP':_0xba0522(0x224),'FtjqW':function(_0x5236bf,_0x17661b){return _0x5236bf(_0x17661b);},'XpyiV':_0xba0522(0x3c7),'NBcNE':function(_0x48afe6){return _0x48afe6();},'OIWII':function(_0x1c12bc,_0x1f47ef,_0x4f3263){return _0x1c12bc(_0x1f47ef,_0x4f3263);},'RdLEM':function(_0x20b626,_0x169789){return _0x20b626(_0x169789);},'eUzcT':_0xba0522(0x2a2),'KOzge':_0xba0522(0x331),'TmILu':function(_0x4115d8,_0x3a68d0){return _0x4115d8-_0x3a68d0;},'kggkH':'ten_dt','pFcpk':function(_0x443185,_0x236d82){return _0x443185===_0x236d82;},'jdegD':_0xba0522(0x24a),'NUqDU':function(_0x16691e,_0x550402){return _0x16691e||_0x550402;},'OghjA':_0xba0522(0x1ff),'GUafc':_0xba0522(0x158),'atyzB':_0xba0522(0x3ed),'fwwGl':_0xba0522(0x3e5),'ZTnlZ':_0xba0522(0x361),'yUhln':function(_0x33c43f,_0x46786e){return _0x33c43f+_0x46786e;},'kLxDQ':function(_0x1a0ed8,_0x1ccccd){return _0x1a0ed8===_0x1ccccd;},'zFfTO':_0xba0522(0x22b),'kiPIb':_0xba0522(0x25d),'rlvZd':_0xba0522(0x16a),'Rpzov':'email','iywvx':_0xba0522(0x2e2),'lHIEJ':function(_0x223327,_0x571178){return _0x223327===_0x571178;},'clpWr':function(_0x46e637,_0x362344){return _0x46e637(_0x362344);},'RDzJc':_0xba0522(0x360),'tgfDY':function(_0x457f80,_0x437c56){return _0x457f80<_0x437c56;},'Vbeqr':_0xba0522(0x3ab),'uNPMZ':'lcQyM','vzgME':function(_0x10318a,_0x2dd6b){return _0x10318a===_0x2dd6b;},'DwdWt':_0xba0522(0x157),'wlSzy':function(_0x57e626,_0x31fe48,_0x2969ed,_0x1c9a4f){return _0x57e626(_0x31fe48,_0x2969ed,_0x1c9a4f);},'XrfqZ':function(_0x59dad4){return _0x59dad4();},'DMnrd':function(_0x27797f,_0x17fc07){return _0x27797f*_0x17fc07;},'edVdD':function(_0x3c54b6,_0x3ecc22){return _0x3c54b6/_0x3ecc22;},'JuhdZ':function(_0x5b2453,_0x3a7f47){return _0x5b2453*_0x3a7f47;},'GoDMm':function(_0x29c0c8){return _0x29c0c8();},'aiaDe':_0xba0522(0x165),'QCjIU':function(_0x4b5d8f,_0x3b03a3,_0x10bf85,_0x215b24){return _0x4b5d8f(_0x3b03a3,_0x10bf85,_0x215b24);},'FiUtc':'ptthanhtoan','PCYWv':'FNaVu','TVFYF':function(_0x557cb7,_0x1e1223){return _0x557cb7-_0x1e1223;},'VmLNl':_0xba0522(0x352),'AtgDP':_0xba0522(0x302),'DwKTU':function(_0x233f20,_0x3af748){return _0x233f20+_0x3af748;},'nVfnz':_0xba0522(0x14e),'zaSiG':function(_0x396b7d,_0x3ab6a5,_0x2dc0b7){return _0x396b7d(_0x3ab6a5,_0x2dc0b7);},'LdOuL':function(_0x5af183,_0xe44c40){return _0x5af183+_0xe44c40;},'kSyRK':function(_0x72b03b,_0x1c430e){return _0x72b03b===_0x1c430e;},'JJlEH':'naarh','tHXUB':function(_0x2e0ea2,_0x334146){return _0x2e0ea2!==_0x334146;},'rcGZF':'UrdSQ','TyDbM':_0xba0522(0x23d),'UDKQi':function(_0x166db5,_0xf2418){return _0x166db5==_0xf2418;},'nFRmt':function(_0x27cab9,_0x1d2be3){return _0x27cab9!==_0x1d2be3;},'TujPu':_0xba0522(0x3d1),'Uvwyn':function(_0x1a0af2,_0x4589e1,_0x264211){return _0x1a0af2(_0x4589e1,_0x264211);},'NTBvT':function(_0x4050f8,_0x1f33e7){return _0x4050f8<_0x1f33e7;},'WebBa':_0xba0522(0x2c9),'FdMzD':function(_0x240140,_0x5d76e3){return _0x240140>_0x5d76e3;},'SQgmi':function(_0x5dbe28,_0x380d51){return _0x5dbe28(_0x380d51);},'TeIrE':function(_0x131e0d,_0x47a4c7){return _0x131e0d+_0x47a4c7;},'WAhoj':function(_0x788968,_0x532cca){return _0x788968!=_0x532cca;},'sJwjQ':function(_0x3c17aa,_0x52d6ad,_0x2b57c7,_0xc30b88,_0x5d8fc0){return _0x3c17aa(_0x52d6ad,_0x2b57c7,_0xc30b88,_0x5d8fc0);},'RITwB':function(_0x4c359f,_0x343fd1,_0x2532bf,_0xdbc3ed){return _0x4c359f(_0x343fd1,_0x2532bf,_0xdbc3ed);},'kkmwT':function(_0x35547f,_0x5efc77,_0x468b8d,_0x502946){return _0x35547f(_0x5efc77,_0x468b8d,_0x502946);},'RRCKV':function(_0x52ab3a,_0x48e71c){return _0x52ab3a(_0x48e71c);},'sJdOJ':function(_0x56f82a,_0x18aaa6){return _0x56f82a!==_0x18aaa6;},'cVxdf':_0xba0522(0x1b7),'tYozj':function(_0x3646e2,_0x26d6de){return _0x3646e2===_0x26d6de;},'xQXiQ':_0xba0522(0x2df),'gTCxI':function(_0x3be1b2,_0xb2faf){return _0x3be1b2-_0xb2faf;},'aRduj':function(_0x1b386a,_0x57f3ea){return _0x1b386a===_0x57f3ea;},'qvICD':_0xba0522(0x2eb),'lecLj':_0xba0522(0x265),'sHolZ':function(_0x5ab7eb,_0x22b93b){return _0x5ab7eb+_0x22b93b;},'iJgmd':':bonus','OgDYq':'Trả\x20lại\x20điểm\x20thưởng','jZIaR':_0xba0522(0x153),'dOcfe':function(_0x104d29,_0x461194){return _0x104d29(_0x461194);},'rRYzu':function(_0x1a84c7,_0x43d0e6){return _0x1a84c7*_0x43d0e6;},'MGRFv':'SWeTK','cUUJU':_0xba0522(0x3b4),'IrCDL':function(_0x5ccbca,_0x4ad6ba){return _0x5ccbca+_0x4ad6ba;},'zWluq':function(_0x209cff,_0x428282,_0x306d21){return _0x209cff(_0x428282,_0x306d21);},'GndZh':function(_0x36cc75,_0x3d9935,_0x1fdee6,_0x1fa9c6){return _0x36cc75(_0x3d9935,_0x1fdee6,_0x1fa9c6);},'FCOYK':'sxDCR','akokq':'ma_kh','UgjCH':_0xba0522(0x1d6),'ZuTdh':function(_0x1a933a){return _0x1a933a();},'bxWnU':_0xba0522(0x1a3),'jPYLe':_0xba0522(0x29a),'gAZhE':_0xba0522(0x347),'VJpaO':_0xba0522(0x37c),'qfVyn':_0xba0522(0x2dc),'XQmMi':_0xba0522(0x359),'AUFfb':_0xba0522(0x2f2),'XxmFi':'cHWSe','qnOQx':'id_so5','mSdmp':_0xba0522(0x168),'byIlf':_0xba0522(0x253),'lNHfS':function(_0x4f778f,_0x158664){return _0x4f778f>_0x158664;},'BbYyp':_0xba0522(0x1e9),'HtwsR':_0xba0522(0x3a3),'HwAHr':_0xba0522(0x20b),'BqVDV':_0xba0522(0x17a),'yxErL':_0xba0522(0x2bc),'qsSHY':_0xba0522(0x3b7),'KJFNH':function(_0xdd22ca,_0x76dd74){return _0xdd22ca-_0x76dd74;},'fIZua':function(_0x4e6618,_0x5ef978){return _0x4e6618!==_0x5ef978;},'WQHAS':_0xba0522(0x295),'ORZhC':'SfKmi','ORKzH':_0xba0522(0x21e),'zlGRi':function(_0x5df776,_0x321717){return _0x5df776+_0x321717;},'vetzv':function(_0x2d0b6d,_0x5cd290){return _0x2d0b6d-_0x5cd290;},'ywuzq':function(_0x1253c4){return _0x1253c4();},'WErZe':function(_0x2a4688,_0x5b7148){return _0x2a4688===_0x5b7148;},'cWopY':_0xba0522(0x184),'CerRl':_0xba0522(0x24d),'rEWYN':'NcMsa','WhCDW':_0xba0522(0x2de),'limOS':function(_0x2af9d3){return _0x2af9d3();},'tgcke':function(_0x17fc18,_0x1fbaed){return _0x17fc18!==_0x1fbaed;},'tdQcN':_0xba0522(0x1c3),'IRqKD':function(_0x43f643){return _0x43f643();},'gsCmE':function(_0x1af50c,_0x2f1c4e){return _0x1af50c(_0x2f1c4e);},'TnDDO':_0xba0522(0x35f),'jPnPn':'zYMFu','WzoBZ':function(_0x3519e7,_0x42f4a2){return _0x3519e7===_0x42f4a2;},'AuTdK':_0xba0522(0x3b2),'VSHDY':function(_0x1762f3,_0x30b57e){return _0x1762f3!==_0x30b57e;},'EVzUr':_0xba0522(0x1e4),'AZcjE':_0xba0522(0x16e),'oXjOl':function(_0x131306,_0x1ff5dd){return _0x131306===_0x1ff5dd;},'aHNAK':_0xba0522(0x18c),'MbnEA':function(_0x3161f7){return _0x3161f7();},'ZzfBx':'ten_hd','QeTan':function(_0x143522){return _0x143522();},'wPeew':_0xba0522(0x3e8),'ChkMo':_0xba0522(0x3f1),'MPlBm':_0xba0522(0x1c4),'JFlwV':function(_0x1d1b56,_0x149320,_0x3d56ef){return _0x1d1b56(_0x149320,_0x3d56ef);},'CRMLK':function(_0x36d908,_0x2d1bef){return _0x36d908===_0x2d1bef;},'WonqW':_0xba0522(0x1b2),'IhMZC':_0xba0522(0x280)},_0x3f4e9a=new controller(_0x18af0d,model,ma_ct[_0xba0522(0x276)](),{'isVoucher':!![],'requireRecaptchaToken':![],'requireOtp':_0x4264c9=>{const _0x4d5c70=_0xba0522,_0x128303={'TlMZk':function(_0x3ad768,_0x50e5fd){return _0x33ca1a['XNecT'](_0x3ad768,_0x50e5fd);}};if(_0x33ca1a[_0x4d5c70(0x3d9)](_0x33ca1a[_0x4d5c70(0x371)],_0x4d5c70(0x2bd)))_0x1d115a=_0x343ace['roundBy'](_0x128303[_0x4d5c70(0x156)](_0xe6e327[_0x4d5c70(0x23b)][_0x4d5c70(0x313)](_0x26d80a=>_0x26d80a[_0x4d5c70(0x2bc)])[_0x4d5c70(0x34e)]((_0x430790,_0x31700d)=>_0x430790+_0x31700d,0x0),_0x5a22e7[_0x4d5c70(0x1f5)])/0x64);else{if(_0x33ca1a[_0x4d5c70(0x235)](_0x4264c9[_0x4d5c70(0x228)],'0')||_0x33ca1a[_0x4d5c70(0x27d)](_0x4264c9[_0x4d5c70(0x228)],'2')||_0x33ca1a[_0x4d5c70(0x1b0)](_0x4264c9[_0x4d5c70(0x228)],'8')){if(_0x33ca1a['bsVBG'](_0x33ca1a[_0x4d5c70(0x3e9)],_0x33ca1a['iMUPt']))return![];else _0x33ca1a['awpwx'](_0x272f1f,null,_0x162267);}return!![];}},'unique':['so_ct'],'sort':{'ngay_ct':-0x1,'so_ct':-0x1},'onEmitEvent':async(_0x1ef448,_0x4a55ad,_0x2089bd)=>{const _0x346ff0=_0xba0522,_0x505780={'RwXYi':function(_0x357353){return _0x33ca1a['OPXpN'](_0x357353);}};if(_0x1ef448[_0x346ff0(0x1da)]){if(_0x33ca1a[_0x346ff0(0x1a1)](_0x33ca1a[_0x346ff0(0x1d7)],_0x346ff0(0x3d5)))_0x4a55ad['push'](_0x1ef448[_0x346ff0(0x1da)]);else{const _0x1d30c5={'CRudO':function(_0x3dfaaf){const _0x3d9b80=_0x346ff0;return _0x33ca1a[_0x3d9b80(0x1b6)](_0x3dfaaf);},'PDRBn':_0x33ca1a[_0x346ff0(0x237)]};_0x244353['each'](_0x44cb8c,function(_0xeecf47,_0x41d025){const _0x20b57a=_0x346ff0,_0x2bc9fb=_0xeecf47[_0x20b57a(0x23b)];if(!_0x2bc9fb)return _0x1d30c5[_0x20b57a(0x3f3)](_0x41d025);_0x2bc9fb[_0x20b57a(0x316)](_0x1a270c,_0x10c161,[{'where':_0x1d30c5[_0x20b57a(0x2f0)],'fields':['ten_vt']}],function(){_0x41d025();});},function(){const _0x134025=_0x346ff0;_0x505780[_0x134025(0x3d2)](_0x2af750);});}}_0x2089bd(null,_0x4a55ad);}});_0x3f4e9a[_0xba0522(0x1eb)](),_0x3f4e9a[_0xba0522(0x263)]=async _0xd5fc8f=>{const _0x4cfc1b=_0xba0522,_0x4216b0={'JjVLR':function(_0x378302){return _0x33ca1a['svaAS'](_0x378302);},'FMAty':function(_0x106a2d){return _0x33ca1a['QQZvh'](_0x106a2d);},'QlqIA':'ten_phi'};if(_0x33ca1a[_0x4cfc1b(0x319)](_0x4cfc1b(0x3aa),_0x33ca1a['ecdKc'])){console[_0x4cfc1b(0x310)]('xu\x20ly\x20nap\x20tien\x20vao\x20vi',_0xd5fc8f['details']);let _0x5d9439=await App['findOne']({'_id':_0xd5fc8f[_0x4cfc1b(0x182)]});if(_0x5d9439[_0x4cfc1b(0x36c)]&&_0x5d9439[_0x4cfc1b(0x25e)]&&_0xd5fc8f[_0x4cfc1b(0x23b)]){try{_0x33ca1a[_0x4cfc1b(0x319)](_0x33ca1a['ovhya'],_0x4cfc1b(0x202))?(await Promise[_0x4cfc1b(0x3f2)](_0xd5fc8f[_0x4cfc1b(0x23b)][_0x4cfc1b(0x214)](_0x2b868e=>_0x2b868e['is_coin']&&!_0x2b868e[_0x4cfc1b(0x3df)]&&_0x2b868e['wallet_receiver'])['map'](_0x32ccb4=>{const _0x5c009a=_0x4cfc1b,_0x3cab41={'DZQRT':_0x33ca1a[_0x5c009a(0x2e4)],'rLHCg':_0x33ca1a[_0x5c009a(0x195)]};return((async()=>{const _0x48d250=_0x5c009a;let _0x24db8c=_0xd5fc8f[_0x48d250(0x220)]||'Nạp\x20tiền\x20vào\x20ví',_0x3151de=_0x32ccb4[_0x48d250(0x23d)],_0x27099d=_0x32ccb4[_0x48d250(0x275)][_0x48d250(0x276)]();console[_0x48d250(0x310)](_0x3cab41[_0x48d250(0x2ce)],{'amount':_0x3151de,'denom':_0x27099d,'receiver':_0x32ccb4[_0x48d250(0x3ca)]});let _0x58b99f=await blockchainconnect[_0x48d250(0x15e)](_0xd5fc8f['id_app'],_0x5d9439[_0x48d250(0x25e)],_0x5d9439[_0x48d250(0x36c)],_0x32ccb4[_0x48d250(0x3ca)],{'amount':_0x3151de,'denom':_0x27099d,'memo':_0x24db8c});console[_0x48d250(0x310)](_0x3cab41[_0x48d250(0x180)],_0x58b99f,_0x3151de,_0x27099d,_0x24db8c),_0x32ccb4[_0x48d250(0x3df)]=!![];})());})),await model['findOneAndUpdate']({'_id':_0xd5fc8f[_0x4cfc1b(0x2dc)]},{'details':_0xd5fc8f[_0x4cfc1b(0x23b)],'trang_thai':'5'}),_0xd5fc8f['trang_thai']='5'):_0xd80764(_0xf8e39c);}catch(_0xa43756){console[_0x4cfc1b(0x38b)](_0xa43756),await model['findOneAndUpdate']({'_id':_0xd5fc8f[_0x4cfc1b(0x2dc)]},{'trang_thai':'7'}),_0xd5fc8f['trang_thai']='7';}let _0x128573=global[_0x4cfc1b(0x1ee)][_0x33ca1a[_0x4cfc1b(0x2b4)][_0x4cfc1b(0x356)]()];_0x128573&&controller[_0x4cfc1b(0x338)](_0xd5fc8f,_0x128573,_0x2a0721=>{const _0x5f4ff5=_0x4cfc1b;if(_0x2a0721)return console[_0x5f4ff5(0x38b)](_0x2a0721);controller['pushNotification'](_0x128573,_0xd5fc8f);});}return null;}else{const _0x30dfaf={'UysDx':function(_0xb2d0c){const _0x45161c=_0x4cfc1b;return _0x33ca1a[_0x45161c(0x2d0)](_0xb2d0c);}};_0x37771b['mapSeries'](_0x3d818b,function(_0x4b995e,_0x23f4ec){const _0x27d494=_0x4cfc1b,_0xab80dd={'umZxa':function(_0x5320dc){const _0x246aa8=_0x2280;return _0x4216b0[_0x246aa8(0x372)](_0x5320dc);}},_0x30d27e=_0x4b995e[_0x27d494(0x23b)];if(!_0x30d27e)return _0x4216b0[_0x27d494(0x3c4)](_0x23f4ec);_0x30d27e[_0x27d494(0x214)](_0x50afde=>_0x50afde[_0x27d494(0x3f1)])['joinModel2'](_0x36f19a,_0x5633bf,[{'where':_0x27d494(0x3f1),'fields':[_0x4216b0[_0x27d494(0x305)]]}],function(){const _0x46ef49=_0x27d494;_0xab80dd[_0x46ef49(0x357)](_0x23f4ec);});},function(){_0x30dfaf['UysDx'](_0xb146a2);});}},_0x3f4e9a['post']=async function(_0x6bccc8,_0xc5cb30){const _0x734826=_0xba0522,_0x8648fd={'lVtHi':function(_0x1c01f4,_0x2b0536){const _0x262973=_0x2280;return _0x33ca1a[_0x262973(0x18b)](_0x1c01f4,_0x2b0536);},'EFBdy':_0x33ca1a[_0x734826(0x3e3)],'HJkzb':function(_0xeaf953,_0x2cf8c2,_0x5e8670){return _0xeaf953(_0x2cf8c2,_0x5e8670);},'gUGfM':function(_0x2aea78,_0x2ee7b1){const _0x3e9a3f=_0x734826;return _0x33ca1a[_0x3e9a3f(0x18b)](_0x2aea78,_0x2ee7b1);},'DQkIl':_0x33ca1a['KOzge'],'cInsB':_0x734826(0x39e),'KdkHu':function(_0x1e8a26,_0x183f3c){return _0x33ca1a['TmILu'](_0x1e8a26,_0x183f3c);},'BqKIM':function(_0x334bca,_0x39eced){const _0xa56c70=_0x734826;return _0x33ca1a[_0xa56c70(0x339)](_0x334bca,_0x39eced);},'PgFVA':function(_0x1bf3b2){return _0x33ca1a['QQZvh'](_0x1bf3b2);},'OzDbT':'ma_dt','Mzuub':_0x33ca1a[_0x734826(0x155)],'QPHZQ':function(_0x34deaa,_0x1f1565){return _0x33ca1a['XNecT'](_0x34deaa,_0x1f1565);},'jzBkY':function(_0x1ad051,_0x50dd29){const _0x29c836=_0x734826;return _0x33ca1a[_0x29c836(0x32c)](_0x1ad051,_0x50dd29);},'kXOzK':'QTlaq','Npbij':_0x33ca1a[_0x734826(0x3bd)],'LqxFY':function(_0x28c39f,_0x23ad85){const _0x35da9b=_0x734826;return _0x33ca1a[_0x35da9b(0x1f3)](_0x28c39f,_0x23ad85);},'RSyIr':_0x33ca1a[_0x734826(0x262)],'WstRv':_0x33ca1a[_0x734826(0x2db)],'RzsID':_0x33ca1a[_0x734826(0x298)],'yhTeh':_0x33ca1a[_0x734826(0x3b5)],'hefEc':_0x33ca1a['ZTnlZ'],'YvnXA':function(_0x7111bb,_0x14c7b9){return _0x33ca1a['yUhln'](_0x7111bb,_0x14c7b9);}};if(_0x33ca1a[_0x734826(0x325)](_0x33ca1a[_0x734826(0x343)],_0x734826(0x22b))){if(!_0xc5cb30)_0xc5cb30=function(){};let _0x431246=await currency[_0x734826(0x176)](_0x6bccc8['id_app'],_0x6bccc8[_0x734826(0x3be)])||0x1;await(_0x6bccc8[_0x734826(0x23b)]||[])[_0x734826(0x152)](_0x6bccc8['id_app'],dmvt,{'where':_0x33ca1a[_0x734826(0x237)],'fields':[_0x33ca1a[_0x734826(0x21a)],_0x33ca1a[_0x734826(0x32e)]]}),async[_0x734826(0x2b5)]({'BuyPoint':_0x200f97=>{const _0x1841f8=_0x734826,_0x4ea9fc={'toktk':function(_0x58b2eb){const _0x2974d7=_0x2280;return _0x33ca1a[_0x2974d7(0x28b)](_0x58b2eb);},'VdTFs':_0x33ca1a['pzGSh'],'ApGTR':_0x33ca1a[_0x1841f8(0x244)],'NuHEM':function(_0x36ea7f){const _0x27922e=_0x1841f8;return _0x33ca1a[_0x27922e(0x2d0)](_0x36ea7f);}};if(_0x33ca1a[_0x1841f8(0x31a)](_0x33ca1a[_0x1841f8(0x3ac)],_0x33ca1a[_0x1841f8(0x3ac)])){const _0x424e5c=_0x19668a['details'];if(!_0x424e5c)return _0x4ea9fc[_0x1841f8(0x26e)](_0x23d296);_0x424e5c[_0x1841f8(0x316)](_0x3ef302,_0x39df60,[{'where':_0x4ea9fc[_0x1841f8(0x368)],'fields':[_0x4ea9fc[_0x1841f8(0x21f)]]}],function(){_0x3c0f81();});}else _0x33ca1a[_0x1841f8(0x211)](BuyPoint,_0x6bccc8)[_0x1841f8(0x225)](()=>{_0x4ea9fc['NuHEM'](_0x200f97);})[_0x1841f8(0x223)](_0x253eee=>{const _0x4e920e=_0x1841f8;_0x8648fd[_0x4e920e(0x17b)](_0x200f97,_0x253eee);});},'post_sodiemthuong':function(_0x2e7f62){const _0x4a8db4=_0x734826,_0x44eab9=[];_0x6bccc8['details'][_0x4a8db4(0x214)](_0x47ad2d=>_0x47ad2d[_0x4a8db4(0x2e9)])[_0x4a8db4(0x22a)](_0x43e4a7=>{const _0x32bb56=_0x4a8db4;let _0x29f373={..._0x43e4a7};_0x29f373[_0x32bb56(0x253)]=_0x6bccc8['ngay_ct'],_0x29f373[_0x32bb56(0x3b0)]=_0x6bccc8[_0x32bb56(0x3b0)],_0x29f373[_0x32bb56(0x33d)]=_0x29f373['diem_thuong'],_0x44eab9[_0x32bb56(0x367)](_0x29f373);});const _0x505319=new PostBook(_0x6bccc8,_0x44eab9,Sodiemthuong);_0x505319['run'](function(_0x39ab3f,_0x572d7a){_0x2e7f62(_0x39ab3f,_0x572d7a);});},'post_socai':function(_0x41aa53){const _0x3ef8f4=_0x734826,_0x1b3ceb={'xFWur':function(_0x2fb0ef){const _0x5befd4=_0x2280;return _0x33ca1a[_0x5befd4(0x1b6)](_0x2fb0ef);}};if(_0x33ca1a[_0x3ef8f4(0x31a)](_0x3ef8f4(0x3c7),_0x33ca1a[_0x3ef8f4(0x251)]))_0x1b3ceb[_0x3ef8f4(0x2d9)](_0x158080);else{if(!_0x6bccc8['virtual_payment_client_url'])return _0x33ca1a[_0x3ef8f4(0x30e)](_0x41aa53);options[_0x3ef8f4(0x1a4)]({'id_app':_0x6bccc8[_0x3ef8f4(0x182)],'id_func':ma_ct[_0x3ef8f4(0x276)]()})[_0x3ef8f4(0x2bf)]()[_0x3ef8f4(0x3eb)](async(_0x4d2094,_0x3a6c89)=>{const _0x3b034c=_0x3ef8f4,_0x55a583={'YivIk':_0x8648fd[_0x3b034c(0x26a)],'vIbBI':function(_0x1ace84,_0x35c769,_0x3be80d){const _0x1d5e71=_0x3b034c;return _0x8648fd[_0x1d5e71(0x2fd)](_0x1ace84,_0x35c769,_0x3be80d);},'AWHND':function(_0x2c1a55,_0x2b1caf){const _0x197271=_0x3b034c;return _0x8648fd[_0x197271(0x299)](_0x2c1a55,_0x2b1caf);},'CvewZ':_0x8648fd[_0x3b034c(0x15b)],'TqIlm':function(_0x386f32,_0x5e3806){return _0x386f32+_0x5e3806;},'qcPau':_0x8648fd['cInsB'],'TBpXG':_0x3b034c(0x2e0),'tbhKP':function(_0x5d9587,_0x28c2a7){const _0x3bb0d0=_0x3b034c;return _0x8648fd[_0x3bb0d0(0x35c)](_0x5d9587,_0x28c2a7);},'LUjTy':function(_0x61d5c2,_0x1914e6){const _0x47c262=_0x3b034c;return _0x8648fd[_0x47c262(0x2e7)](_0x61d5c2,_0x1914e6);},'hCxJe':function(_0x4c1211){const _0x232b88=_0x3b034c;return _0x8648fd[_0x232b88(0x31c)](_0x4c1211);},'ijICv':_0x8648fd[_0x3b034c(0x30f)],'ZHmSx':_0x8648fd['Mzuub'],'ZJUij':_0x3b034c(0x1b5),'UaXuG':function(_0x3f8c58,_0x532708){return _0x8648fd['QPHZQ'](_0x3f8c58,_0x532708);}};let _0x46db6b;if(!_0x3a6c89){if(_0x8648fd[_0x3b034c(0x31d)]('QTlaq',_0x8648fd['kXOzK']))_0x46db6b={};else{_0x1d7b3b[_0x3b034c(0x38b)](_0x55a583['YivIk'],_0x34703e);return;}}else _0x8648fd[_0x3b034c(0x3c5)]!==_0x8648fd['Npbij']?_0x278e76[_0x3b034c(0x1a4)]({'id_app':_0x39853b[_0x3b034c(0x1bd)]},{'_id':0x1},function(_0x514fd1,_0x47a5fc){const _0xe7d5b4=_0x3b034c;if(_0x514fd1)return _0x53cecd(_0x514fd1);return _0x47a5fc?(_0x455883[_0xe7d5b4(0x186)]=_0x47a5fc['_id'][_0xe7d5b4(0x1c2)](),_0x55a583['vIbBI'](_0x334161,null,_0x506767)):_0x55a583[_0xe7d5b4(0x2d2)](_0x1e4116,_0x55a583['CvewZ']);}):_0x46db6b=_0x3a6c89[_0x3b034c(0x3bc)]||{};let _0x34b97b;_0x6bccc8[_0x3b034c(0x238)]&&global[_0x3b034c(0x188)][_0x3b034c(0x2ac)][_0x3b034c(0x21d)]['isValid'](_0x6bccc8[_0x3b034c(0x238)])&&(_0x34b97b=await ptthanhtoan[_0x3b034c(0x1a4)]({'id_app':_0x6bccc8['id_app'],'_id':_0x6bccc8[_0x3b034c(0x238)]})['lean']());_0x34b97b=_0x8648fd[_0x3b034c(0x2ba)](_0x34b97b,{});_0x34b97b[_0x3b034c(0x3b0)]&&(_0x34b97b[_0x3b034c(0x1f0)]=_0x34b97b[_0x3b034c(0x359)]);console[_0x3b034c(0x310)](_0x8648fd[_0x3b034c(0x38a)],_0x6bccc8['pt_thanh_toan'],_0x34b97b),_0x46db6b[_0x3b034c(0x1f0)]=_0x34b97b[_0x3b034c(0x1f0)]||_0x46db6b[_0x3b034c(0x1f0)]||_0x8648fd['WstRv'],_0x46db6b[_0x3b034c(0x359)]=_0x34b97b[_0x3b034c(0x359)]||_0x46db6b[_0x3b034c(0x359)]||_0x8648fd[_0x3b034c(0x217)],_0x46db6b[_0x3b034c(0x24e)]=_0x34b97b[_0x3b034c(0x24e)]||_0x46db6b['tk_dt']||_0x8648fd[_0x3b034c(0x3c1)],_0x46db6b[_0x3b034c(0x1ba)]=_0x34b97b[_0x3b034c(0x1ba)]||_0x46db6b['tk_tl']||_0x3b034c(0x2a7),_0x46db6b['tk_ck']=_0x34b97b[_0x3b034c(0x234)]||_0x46db6b[_0x3b034c(0x234)]||_0x8648fd['hefEc'],_0x46db6b[_0x3b034c(0x2e6)]=_0x34b97b[_0x3b034c(0x2e6)]||_0x46db6b[_0x3b034c(0x2e6)]||_0x46db6b['tk_ck'],_0x46db6b[_0x3b034c(0x3b0)]=_0x34b97b[_0x3b034c(0x3b0)]||_0x6bccc8[_0x3b034c(0x3b0)];const _0x51701b=[];_0x6bccc8[_0x3b034c(0x23b)]['forEach'](function(_0x32cd12){const _0x1765c4=_0x3b034c,_0x484582={'PYUBG':function(_0x29a180,_0x17b1cd){const _0x1ea4a1=_0x2280;return _0x55a583[_0x1ea4a1(0x341)](_0x29a180,_0x17b1cd);}};if(_0x55a583['qcPau']===_0x55a583[_0x1765c4(0x15a)]){let _0xd1e392={};_0xd1e392[_0x1765c4(0x3bf)]=_0x468fb6['tk_ck'],_0xd1e392[_0x1765c4(0x173)]=_0x3e759d[_0x1765c4(0x1f0)],_0xd1e392[_0x1765c4(0x2bb)]=_0x484582[_0x1765c4(0x2fa)](_0x1f14e5[_0x1765c4(0x332)]||0x0,_0x30b1d4[_0x1765c4(0x2da)]||0x0),_0xd1e392[_0x1765c4(0x22c)]=_0xd1e392[_0x1765c4(0x2bb)],_0xd1e392['ma_kh_no']=_0xff46ee[_0x1765c4(0x3b0)],_0xd1e392[_0x1765c4(0x351)]=_0x19410a[_0x1765c4(0x3b0)],_0xd1e392[_0x1765c4(0x364)]=![],_0x1909bc[_0x1765c4(0x367)](_0xd1e392);}else{let _0x4b19df={..._0x32cd12};_0x4b19df[_0x1765c4(0x173)]=_0x46db6b[_0x1765c4(0x24e)],_0x4b19df[_0x1765c4(0x3bf)]=_0x46db6b[_0x1765c4(0x1f0)],_0x4b19df[_0x1765c4(0x351)]=_0x6bccc8[_0x1765c4(0x3b0)],_0x4b19df[_0x1765c4(0x20c)]=_0x46db6b['ma_kh'],_0x4b19df['tien_nt']=_0x55a583[_0x1765c4(0x259)](_0x4b19df[_0x1765c4(0x2bc)],_0x4b19df[_0x1765c4(0x3b7)]||0x0),_0x4b19df[_0x1765c4(0x22c)]=_0x55a583[_0x1765c4(0x297)](_0x4b19df[_0x1765c4(0x17a)],_0x4b19df[_0x1765c4(0x29d)]||0x0),_0x51701b[_0x1765c4(0x367)](_0x4b19df);}}),_0x6bccc8[_0x3b034c(0x23b)][_0x3b034c(0x214)](_0x4bd528=>_0x4bd528['diem_thuong']&&_0x4bd528['tk_km_no']&&_0x4bd528[_0x3b034c(0x2f7)])['forEach'](function(_0x2e1149){const _0x3b521=_0x3b034c;if(_0x55a583[_0x3b521(0x28f)]!==_0x55a583[_0x3b521(0x28f)]){const _0x9b9267={'oQznJ':function(_0x2a06b5){return _0x55a583['hCxJe'](_0x2a06b5);}},_0x2fbd2a=_0x256989[_0x3b521(0x23b)];if(!_0x2fbd2a)return _0x2c0958();_0x2fbd2a[_0x3b521(0x214)](_0x23d364=>_0x23d364[_0x3b521(0x28d)])[_0x3b521(0x316)](_0x237da5,_0x5a21ac,[{'where':_0x55a583[_0x3b521(0x296)],'fields':[_0x55a583[_0x3b521(0x1aa)]]}],function(){const _0x38c0a9=_0x3b521;_0x9b9267[_0x38c0a9(0x1ab)](_0x505e15);});}else{let _0x3849c7={..._0x2e1149};_0x3849c7[_0x3b521(0x173)]=_0x46db6b[_0x3b521(0x2f7)]||_0x2e1149[_0x3b521(0x2f7)],_0x3849c7['tk_no']=_0x46db6b[_0x3b521(0x2a3)]||_0x2e1149['tk_km_no'],_0x3849c7[_0x3b521(0x3b0)]=_0x6bccc8['ma_kh'],_0x3849c7[_0x3b521(0x22c)]=_0x3849c7[_0x3b521(0x2bb)]=_0x55a583[_0x3b521(0x1ed)](_0x3849c7[_0x3b521(0x2e9)],_0x431246),_0x51701b[_0x3b521(0x367)](_0x3849c7);}});if(_0x6bccc8[_0x3b034c(0x1d3)]){let _0x59a4fe={};_0x59a4fe[_0x3b034c(0x3bf)]=_0x46db6b[_0x3b034c(0x2e6)],_0x59a4fe[_0x3b034c(0x173)]=_0x46db6b[_0x3b034c(0x1f0)],_0x59a4fe[_0x3b034c(0x2bb)]=_0x6bccc8[_0x3b034c(0x1d3)]||0x0,_0x59a4fe[_0x3b034c(0x22c)]=_0x59a4fe[_0x3b034c(0x2bb)],_0x59a4fe[_0x3b034c(0x20c)]=_0x6bccc8[_0x3b034c(0x3b0)],_0x59a4fe[_0x3b034c(0x351)]=_0x46db6b[_0x3b034c(0x3b0)],_0x51701b['push'](_0x59a4fe);}if(_0x6bccc8[_0x3b034c(0x332)]||_0x6bccc8[_0x3b034c(0x2da)]){let _0x2aa62={};_0x2aa62['tk_no']=_0x46db6b[_0x3b034c(0x234)],_0x2aa62['tk_co']=_0x46db6b[_0x3b034c(0x1f0)],_0x2aa62[_0x3b034c(0x2bb)]=_0x8648fd[_0x3b034c(0x3b9)](_0x6bccc8[_0x3b034c(0x332)]||0x0,_0x6bccc8['tien_evoucher']||0x0),_0x2aa62[_0x3b034c(0x22c)]=_0x2aa62[_0x3b034c(0x2bb)],_0x2aa62[_0x3b034c(0x20c)]=_0x6bccc8[_0x3b034c(0x3b0)],_0x2aa62[_0x3b034c(0x351)]=_0x46db6b[_0x3b034c(0x3b0)],_0x2aa62[_0x3b034c(0x364)]=![],_0x51701b['push'](_0x2aa62);}const _0x246c6f=new PostSocai(_0x6bccc8,_0x51701b);_0x246c6f[_0x3b034c(0x2b8)](function(_0x20104e,_0x50699f){const _0x148960=_0x3b034c;_0x55a583[_0x148960(0x197)](_0x41aa53,_0x20104e,_0x50699f);});});}}},function(_0x3d14a3,_0x3bf615){const _0x552661=_0x734826;_0x33ca1a[_0x552661(0x1a0)](_0xc5cb30,_0x3d14a3,_0x3bf615);});}else _0x8648fd['PgFVA'](_0x4ed4b2);},_0x3f4e9a[_0xba0522(0x1ea)]=async function(_0x33992a,_0x876686,_0x508a8b){const _0x55254f=_0xba0522,_0x49d900={'dgvnw':function(_0x40d735,_0x3fff92,_0x270527){return _0x40d735(_0x3fff92,_0x270527);},'mgxHs':function(_0x3ec4f8,_0x18089c){return _0x33ca1a['lHIEJ'](_0x3ec4f8,_0x18089c);},'QajBu':function(_0x506af6,_0x22bcbe){return _0x506af6==_0x22bcbe;},'fEDHf':function(_0x37312e,_0x409df6){return _0x37312e(_0x409df6);},'NwJbJ':_0x55254f(0x2c9),'LFqpn':function(_0x5c050c,_0x186b01){const _0x1d1504=_0x55254f;return _0x33ca1a[_0x1d1504(0x255)](_0x5c050c,_0x186b01);},'dMIzg':_0x33ca1a[_0x55254f(0x281)],'SCOie':function(_0x46f1a6,_0x245892){const _0x1cbd8b=_0x55254f;return _0x33ca1a[_0x1cbd8b(0x3a2)](_0x46f1a6,_0x245892);},'XfIse':function(_0x291deb,_0x22bb88){const _0x306852=_0x55254f;return _0x33ca1a[_0x306852(0x255)](_0x291deb,_0x22bb88);},'kJgaZ':_0x33ca1a[_0x55254f(0x32d)],'ErSJs':_0x33ca1a['uNPMZ'],'kKjTk':function(_0x3819da,_0x5a9e53){return _0x3819da(_0x5a9e53);}};if(_0x33ca1a[_0x55254f(0x1fd)](_0x55254f(0x157),_0x33ca1a[_0x55254f(0x3c6)])){if(!_0x876686[_0x55254f(0x23b)])_0x876686[_0x55254f(0x23b)]=[];_0x876686[_0x55254f(0x321)]=undefined;if(!_0x876686[_0x55254f(0x3b0)]){let _0x310871=await global[_0x55254f(0x1d4)](_0x55254f(0x3d7))['findOne']({'id_app':_0x33992a['current_id_app'],'of_user':_0x33992a['email']},{'ma_kh':0x1,'ten_kh':0x1})[_0x55254f(0x2bf)]();if(_0x310871)_0x876686['ma_kh']=_0x310871['ma_kh'];}_0x33ca1a[_0x55254f(0x204)](valid,_0x33992a,_0x876686,async _0x280d3f=>{const _0xab349b=_0x55254f,_0x503e2e={'zmrnM':function(_0x3dafa8,_0x5b21c8,_0x202328){const _0x1af1d6=_0x2280;return _0x49d900[_0x1af1d6(0x2cc)](_0x3dafa8,_0x5b21c8,_0x202328);}};if(_0x49d900[_0xab349b(0x213)](_0xab349b(0x160),'kXTrC'))_0x503e2e[_0xab349b(0x16f)](_0x35beec,_0x3a2ffc,_0x4df741);else{if(_0x280d3f)return _0x508a8b(_0x280d3f);if(!_0x876686['paymentByPoints'])return _0x49d900[_0xab349b(0x2cc)](_0x508a8b,null,_0x876686);try{let _0x2378a1=_0x876686['details'][_0xab349b(0x214)](_0x3f0905=>_0x3f0905['is_coin']&&!_0x3f0905[_0xab349b(0x3df)]&&_0x3f0905[_0xab349b(0x3ca)])[_0xab349b(0x3ce)]([_0xab349b(0x275)],[_0xab349b(0x23d)]);if(_0x49d900[_0xab349b(0x29e)](_0x2378a1[_0xab349b(0x1bb)],0x1)){let _0x2374c8=await _0x49d900[_0xab349b(0x2cc)](getWalletBalanceOfApp,_0x33992a[_0xab349b(0x1bd)],_0x2378a1[0x0][_0xab349b(0x275)]['toLowerCase']()),_0xa20c77=_0x2378a1[0x0][_0xab349b(0x23d)];if(_0x2374c8<_0xa20c77)return _0x49d900[_0xab349b(0x19a)](_0x508a8b,_0x49d900[_0xab349b(0x379)]);}if(_0x2378a1['length']>0x1)return _0x49d900[_0xab349b(0x1fb)](_0x508a8b,_0x49d900[_0xab349b(0x1e6)]);let _0x4f68a1=await getPointBalance(_0x33992a['current_id_app'],_0x33992a[_0xab349b(0x308)]);if(_0x49d900[_0xab349b(0x312)](_0x4f68a1,_0x876686['paymentByPoints']))return _0x49d900[_0xab349b(0x34a)](_0x508a8b,'Bạn\x20không\x20có\x20đủ\x20điểm\x20để\x20thực\x20hiện\x20giao\x20dịch\x20này.');_0x508a8b(null,_0x876686);}catch(_0x3747c2){if(_0x49d900['kJgaZ']===_0x49d900[_0xab349b(0x1e1)])return _0x27c90f(!![]);else _0x49d900[_0xab349b(0x35d)](_0x508a8b,_0x3747c2[_0xab349b(0x2b2)]);}}});}else{const _0x37b056={'PSaeb':function(_0x22328a){const _0x492b99=_0x55254f;return _0x33ca1a[_0x492b99(0x2d0)](_0x22328a);}};_0x4545a0[_0x55254f(0x214)](_0x539e8f=>_0x539e8f[_0x55254f(0x1da)])['joinModel2'](null,_0x2f56c0,{'where':{'user_nv_giao_hang':_0x33ca1a[_0x55254f(0x154)]},'fields':{'ten_nv_giao_hang':_0x33ca1a[_0x55254f(0x2e1)]}},function(){const _0x35ad21=_0x55254f;_0x37b056[_0x35ad21(0x26f)](_0xf44653);});}},_0x3f4e9a[_0xba0522(0x346)]=async function(_0x10df4d,_0x3214ea,_0x2f1535){const _0x38fc17=_0xba0522;if(_0x3214ea[_0x38fc17(0x238)]&&global[_0x38fc17(0x188)][_0x38fc17(0x2ac)][_0x38fc17(0x21d)]['isValid'](_0x3214ea['pt_thanh_toan']))try{const _0x1024ec=await global[_0x38fc17(0x1d4)](_0x33ca1a[_0x38fc17(0x1a9)])[_0x38fc17(0x1a4)]({'_id':_0x3214ea[_0x38fc17(0x238)]});if(_0x1024ec['payment_service']){if(_0x33ca1a['lHIEJ'](_0x38fc17(0x39a),_0x33ca1a[_0x38fc17(0x36b)])){let _0x586048={..._0x14dfdb};_0x586048[_0x38fc17(0x253)]=_0x3e7bee[_0x38fc17(0x253)],_0x586048[_0x38fc17(0x3b0)]=_0x2b823f[_0x38fc17(0x3b0)],_0x586048[_0x38fc17(0x33d)]=_0x586048[_0x38fc17(0x2e9)],_0x4a9f58[_0x38fc17(0x367)](_0x586048);}else{let _0x543f60=global['getModel'](_0x1024ec[_0x38fc17(0x3e7)]);_0x3214ea[_0x38fc17(0x272)]=_0x33ca1a[_0x38fc17(0x286)](_0x3214ea['t_tt_nt'],_0x3214ea[_0x38fc17(0x35e)]||0x0);if(_0x3214ea['amount']&&_0x543f60[_0x38fc17(0x388)]){if(_0x33ca1a[_0x38fc17(0x1a1)](_0x38fc17(0x190),_0x33ca1a[_0x38fc17(0x240)])){let _0x3689a3=await _0x543f60[_0x38fc17(0x388)](_0x3214ea,_0x10df4d[_0x38fc17(0x1d0)],_0x1024ec);_0x3214ea[_0x38fc17(0x321)]=_0x3689a3,_0x3214ea[_0x38fc17(0x3e7)]=_0x1024ec[_0x38fc17(0x3e7)],_0x3214ea['payment_id']=((await _0x543f60[_0x38fc17(0x1a4)]({'$or':[{'id_ct':_0x3214ea[_0x38fc17(0x2dc)][_0x38fc17(0x1c2)]()},{'request_id':_0x3214ea['_id'][_0x38fc17(0x1c2)]()},{'order_id':_0x3214ea['_id'][_0x38fc17(0x1c2)]()}]})||{})[_0x38fc17(0x2dc)]||'')[_0x38fc17(0x1c2)]();}else _0x33ca1a['XrfqZ'](_0x596d21);}else _0x3214ea['virtual_payment_client_url']='',_0x3214ea[_0x38fc17(0x3e7)]='',_0x3214ea[_0x38fc17(0x396)]='';}}else _0x3214ea['virtual_payment_client_url']='';}catch(_0x350e24){if(_0x33ca1a[_0x38fc17(0x2b9)]===_0x33ca1a['AtgDP'])return console[_0x38fc17(0x38b)](_0x350e24),_0x33ca1a['clpWr'](_0x2f1535,_0x33ca1a[_0x38fc17(0x2ef)](_0x38fc17(0x248),_0x350e24[_0x38fc17(0x2b2)]||_0x350e24[_0x38fc17(0x38b)]||_0x350e24));else{let _0x30491d=0x0;if(!_0x2a64cb[0x0][_0x38fc17(0x22c)])_0x30491d=_0x33ca1a[_0x38fc17(0x193)](_0x38d3bb[0x0][_0x38fc17(0x17f)],_0x3249ca[_0x38fc17(0x23d)]||0x1);else{let _0x4eaf6c=_0x33ca1a[_0x38fc17(0x378)](_0x582e4f[0x0][_0x38fc17(0x17f)],_0x23f4a6[0x0][_0x38fc17(0x22c)]);if(!_0x4eaf6c){let _0x32b4ac=_0x3ef75f[_0x38fc17(0x17a)]-(_0x3e58ee[_0x38fc17(0x29d)]||0x0);_0x30491d=_0x5b4946['roundBy'](_0x33ca1a[_0x38fc17(0x37a)](_0x32b4ac,_0x4eaf6c),0x0);}}return _0x30491d;}}else console[_0x38fc17(0x310)](_0x33ca1a[_0x38fc17(0x1d1)]),_0x3214ea[_0x38fc17(0x321)]='';model[_0x38fc17(0x261)]({'_id':_0x3214ea[_0x38fc17(0x2dc)]},{'virtual_payment_client_url':_0x3214ea['virtual_payment_client_url'],'payment_id':_0x3214ea[_0x38fc17(0x396)],'payment_service':_0x3214ea[_0x38fc17(0x3e7)]},_0x585b80=>{const _0x2b46cc=_0x38fc17,_0x506098={'YFZWw':function(_0x6253d2){return _0x33ca1a['GoDMm'](_0x6253d2);}};_0x2b46cc(0x3d4)==='ufVEL'?_0x506098[_0x2b46cc(0x226)](_0x6c76fb):_0x585b80&&(console[_0x2b46cc(0x38b)](_0x585b80),console[_0x2b46cc(0x310)](_0x33ca1a[_0x2b46cc(0x269)],_0x585b80['message']));}),await _0x33ca1a[_0x38fc17(0x211)](createTransactionPayment,_0x3214ea),await _0x33ca1a[_0x38fc17(0x211)](createTransactionBonus,_0x3214ea),_0x3214ea[_0x38fc17(0x246)]&&await Promise[_0x38fc17(0x3f2)](_0x3214ea[_0x38fc17(0x246)][_0x38fc17(0x313)](_0x11bd83=>{const _0x4be052=_0x38fc17;return _0x33ca1a['QCjIU'](updateEvoucher,_0x11bd83[_0x4be052(0x182)],_0x11bd83['ma'],_0x3214ea[_0x4be052(0x2dc)]);})),_0x33ca1a['awpwx'](_0x2f1535,null,_0x3214ea);},_0x3f4e9a[_0xba0522(0x3cd)]=async(_0x39bcb3,_0x5707b3,_0x19268a,_0xaaf83b)=>{const _0x278736=_0xba0522;_0x5707b3[_0x278736(0x238)]&&_0x33ca1a[_0x278736(0x178)](_0x5707b3['pt_thanh_toan'],_0x19268a[_0x278736(0x238)])&&(_0x5707b3['virtual_payment_client_url']='',_0x5707b3[_0x278736(0x3e7)]='',_0x5707b3[_0x278736(0x396)]=''),_0x33ca1a[_0x278736(0x2ec)](valid,_0x39bcb3,_0x5707b3,async _0x404aaa=>{const _0x7a101c=_0x278736,_0x4e8a97={'oekeK':function(_0x4e6f6c,_0x277643,_0x1c431f){const _0x49b5d1=_0x2280;return _0x33ca1a[_0x49b5d1(0x293)](_0x4e6f6c,_0x277643,_0x1c431f);},'pAzuZ':function(_0x11e012,_0x40078f){return _0x33ca1a['LdOuL'](_0x11e012,_0x40078f);},'LySup':_0x7a101c(0x344),'nirzA':function(_0x9d8228){const _0x35a8df=_0x7a101c;return _0x33ca1a[_0x35a8df(0x30e)](_0x9d8228);},'nfygS':_0x33ca1a[_0x7a101c(0x237)]};if(_0x33ca1a[_0x7a101c(0x37e)]('naarh',_0x33ca1a[_0x7a101c(0x1de)])){if(_0x404aaa)return _0x33ca1a[_0x7a101c(0x18b)](_0xaaf83b,_0x404aaa);if(_0x33ca1a[_0x7a101c(0x33f)](_0x19268a[_0x7a101c(0x1fa)]||0x0,_0x5707b3['paymentByPoints']||0x0))return'UOxIL'!==_0x33ca1a[_0x7a101c(0x334)]?_0xaaf83b(_0x7a101c(0x3ba)):(_0x5b4c0c[_0x7a101c(0x186)]=_0x24aaa2[_0x7a101c(0x2dc)][_0x7a101c(0x1c2)](),_0x4e8a97['oekeK'](_0x2bae67,null,_0x10f73d));let _0x529ac3=_0x5707b3[_0x7a101c(0x23b)][_0x7a101c(0x214)](_0xd98fa2=>_0xd98fa2['is_coin']&&!_0xd98fa2['transferred']&&_0xd98fa2[_0x7a101c(0x3ca)])[_0x7a101c(0x3ce)]([_0x33ca1a[_0x7a101c(0x237)]],[_0x33ca1a['TyDbM']]);if(_0x33ca1a[_0x7a101c(0x2b1)](_0x529ac3['length'],0x1)){if(_0x33ca1a[_0x7a101c(0x2cf)]('xezlz',_0x33ca1a['TujPu'])){const _0x38a1b0={'hnXqk':function(_0x57716b,_0x29b30c){const _0x35c8f0=_0x7a101c;return _0x4e8a97[_0x35c8f0(0x198)](_0x57716b,_0x29b30c);},'zzTze':_0x4e8a97[_0x7a101c(0x3dc)],'VGuGZ':function(_0x476ad6){const _0x4ab667=_0x7a101c;return _0x4e8a97[_0x4ab667(0x29c)](_0x476ad6);}},_0x1fb51a=_0x500e94['details']||[];_0x1fb51a[_0x7a101c(0x214)](_0x4d82dc=>_0x4d82dc[_0x7a101c(0x33e)])['joinModel2'](_0x21dd7e,_0x5c86a9,[{'where':{'ma_vt':_0x4e8a97[_0x7a101c(0x2c2)],'ma_tt1':_0x7a101c(0x1e4)},'setFields':(_0x2f4c65,_0x30a761)=>{const _0x93304b=_0x7a101c;_0x2f4c65[_0x93304b(0x285)]=_0x38a1b0[_0x93304b(0x2ea)](_0x38a1b0[_0x93304b(0x2ea)](_0x2f4c65[_0x93304b(0x285)],_0x38a1b0[_0x93304b(0x2ae)]),_0x30a761[_0x93304b(0x3c8)]);}}],function(){const _0x55c850=_0x7a101c;_0x38a1b0[_0x55c850(0x1b1)](_0x12e52d);});}else{let _0x2d2d01=await _0x33ca1a['Uvwyn'](getWalletBalanceOfApp,_0x39bcb3['current_id_app'],_0x529ac3[0x0]['ma_vt']['toLowerCase']()),_0x416b05=_0x529ac3[0x0][_0x7a101c(0x23d)];if(_0x33ca1a[_0x7a101c(0x377)](_0x2d2d01,_0x416b05))return _0xaaf83b(_0x33ca1a[_0x7a101c(0x329)]);}}if(_0x33ca1a[_0x7a101c(0x32a)](_0x529ac3[_0x7a101c(0x1bb)],0x1))return _0x33ca1a[_0x7a101c(0x383)](_0xaaf83b,'Mỗi\x20lần\x20chỉ\x20được\x20mua\x20một\x20loại\x20coin');await transaction[_0x7a101c(0x36d)]({'id_ct':_0x33ca1a[_0x7a101c(0x260)](_0x19268a[_0x7a101c(0x2dc)][_0x7a101c(0x1c2)](),_0x7a101c(0x153))}),_0x33ca1a[_0x7a101c(0x204)](_0xaaf83b,null,_0x5707b3,_0x19268a);}else _0xa23ec=0x0;},_0x19268a);},_0x3f4e9a[_0xba0522(0x284)]=async function(_0x24fc18,_0x241acb,_0x40ae93){const _0x4b66fb=_0xba0522;if(_0x33ca1a[_0x4b66fb(0x2ff)](_0x33ca1a['cVxdf'],_0x4b66fb(0x194))){if(!_0x241acb['virtual_payment_client_url']&&(_0x241acb['trang_thai']==='1'||_0x33ca1a[_0x4b66fb(0x319)](_0x241acb[_0x4b66fb(0x228)],'0'))){if(_0x241acb['pt_thanh_toan']&&global[_0x4b66fb(0x188)]['Types'][_0x4b66fb(0x21d)][_0x4b66fb(0x370)](_0x241acb['pt_thanh_toan'])){if(_0x33ca1a[_0x4b66fb(0x3d6)](_0x33ca1a[_0x4b66fb(0x1d5)],_0x33ca1a[_0x4b66fb(0x1d5)]))try{const _0x238cda=await global[_0x4b66fb(0x1d4)](_0x33ca1a[_0x4b66fb(0x1a9)])['findOne']({'_id':_0x241acb[_0x4b66fb(0x238)]});if(_0x238cda[_0x4b66fb(0x3e7)]){let _0x3ab51f=global[_0x4b66fb(0x1d4)](_0x238cda[_0x4b66fb(0x3e7)]);_0x241acb['amount']=_0x33ca1a[_0x4b66fb(0x3d3)](_0x241acb[_0x4b66fb(0x327)],_0x241acb['tien_paymentByPoints']||0x0);if(_0x241acb[_0x4b66fb(0x272)]&&_0x3ab51f[_0x4b66fb(0x388)]){let _0x2e76f1=await _0x3ab51f['createVirtualPaymentClientURL'](_0x241acb,_0x24fc18[_0x4b66fb(0x1d0)],_0x238cda);_0x241acb[_0x4b66fb(0x321)]=_0x2e76f1,_0x241acb[_0x4b66fb(0x3e7)]=_0x238cda['payment_service'],_0x241acb['payment_id']=((await _0x3ab51f['findOne']({'$or':[{'id_ct':_0x241acb[_0x4b66fb(0x2dc)][_0x4b66fb(0x1c2)]()},{'request_id':_0x241acb[_0x4b66fb(0x2dc)][_0x4b66fb(0x1c2)]()},{'order_id':_0x241acb['_id']['toString']()}]})||{})[_0x4b66fb(0x2dc)]||'')[_0x4b66fb(0x1c2)]();}else _0x33ca1a[_0x4b66fb(0x29f)](_0x33ca1a['qvICD'],_0x33ca1a['lecLj'])?_0x42a204[_0x4b66fb(0x321)]='':(_0x241acb[_0x4b66fb(0x321)]='',_0x241acb['payment_service']='',_0x241acb[_0x4b66fb(0x396)]='');}else _0x241acb[_0x4b66fb(0x321)]='';}catch(_0x1ff75f){return console['error'](_0x1ff75f),_0x40ae93(_0x33ca1a[_0x4b66fb(0x17d)](_0x4b66fb(0x289),_0x1ff75f[_0x4b66fb(0x2b2)]||_0x1ff75f[_0x4b66fb(0x38b)]||_0x1ff75f));}else return _0x33ca1a['RdLEM'](_0x1ecb0e,_0x2a2d41['message']);}else _0x241acb['virtual_payment_client_url']='';model['findOneAndUpdate']({'_id':_0x241acb[_0x4b66fb(0x2dc)]},{'virtual_payment_client_url':_0x241acb['virtual_payment_client_url'],'payment_id':_0x241acb['payment_id'],'payment_service':_0x241acb[_0x4b66fb(0x3e7)]},_0x1ff095=>{const _0x416b6d=_0x4b66fb;if(_0x1ff095)console['log'](_0x33ca1a[_0x416b6d(0x269)],_0x1ff095[_0x416b6d(0x2b2)]);});}_0x33ca1a[_0x4b66fb(0x325)](_0x241acb[_0x4b66fb(0x228)],'9')?(await transaction[_0x4b66fb(0x36d)]({'id_ct':_0x241acb[_0x4b66fb(0x2dc)][_0x4b66fb(0x1c2)]()}),await transaction['deleteTrans']({'id_ct':_0x33ca1a[_0x4b66fb(0x2dd)](_0x241acb[_0x4b66fb(0x2dc)][_0x4b66fb(0x1c2)](),_0x33ca1a[_0x4b66fb(0x22e)])},_0x33ca1a[_0x4b66fb(0x161)]),await transaction['deleteTrans']({'id_ct':_0x33ca1a[_0x4b66fb(0x260)](_0x241acb[_0x4b66fb(0x2dc)][_0x4b66fb(0x1c2)](),_0x33ca1a[_0x4b66fb(0x3ef)])})):(await _0x33ca1a[_0x4b66fb(0x255)](createTransactionPayment,_0x241acb),_0x33ca1a['dOcfe'](createTransactionBonus,_0x241acb));await Evoucher[_0x4b66fb(0x3f4)]({'id_ct_used':_0x241acb['_id'][_0x4b66fb(0x1c2)]()},{'id_ct_used':null});let _0x5ec1d0=await Evoucher[_0x4b66fb(0x271)]({'id_ct_useds':_0x241acb['_id']['toString']()});await Promise[_0x4b66fb(0x3f2)](_0x5ec1d0[_0x4b66fb(0x313)](_0x21def5=>{const _0x27d33b=_0x4b66fb;return _0x33ca1a[_0x27d33b(0x3bb)](deleteEvoucher,_0x21def5[_0x27d33b(0x182)],_0x21def5['ma'],_0x241acb['_id']);})),_0x241acb[_0x4b66fb(0x246)]&&await Promise['all'](_0x241acb[_0x4b66fb(0x246)]['map'](_0x454ea1=>{const _0x2afdf6=_0x4b66fb;return _0x33ca1a[_0x2afdf6(0x3de)](updateEvoucher,_0x454ea1[_0x2afdf6(0x182)],_0x454ea1['ma'],_0x241acb['_id']);})),_0x33ca1a[_0x4b66fb(0x293)](_0x40ae93,null,_0x241acb);}else{const _0x10c551={'Bmjyf':function(_0x16c604,_0x4cbdd3){const _0x43170c=_0x4b66fb;return _0x33ca1a[_0x43170c(0x392)](_0x16c604,_0x4cbdd3);},'gocJf':function(_0x2a8416,_0x3414ce){return _0x2a8416===_0x3414ce;}};return new _0x497018((_0x38d2c7,_0x42ffb0)=>{_0x4dd28d({'id_app':_0x241f5b,'email':_0x38d4b1},(_0x478fb1,_0x3476a5)=>{const _0x36961e=_0x2280;if(_0x478fb1)return _0x42ffb0(new _0x46f96c(_0x478fb1));_0x10c551[_0x36961e(0x258)](_0x38d2c7,_0x10c551[_0x36961e(0x38f)](_0x3476a5[_0x36961e(0x1bb)],0x0)?0x0:_0x3476a5[0x0][_0x36961e(0x270)]);});});}},_0x3f4e9a[_0xba0522(0x2a0)]=function(_0x4b3206,_0x32c13b,_0xfd8ef9){const _0x4ff2d0=_0xba0522;if(_0x33ca1a[_0x4ff2d0(0x38c)]!==_0x4ff2d0(0x227)){let _0x5a4e5c={..._0x1fcab8};_0x5a4e5c[_0x4ff2d0(0x173)]=_0x191f2e[_0x4ff2d0(0x2f7)]||_0x3a354f[_0x4ff2d0(0x2f7)],_0x5a4e5c[_0x4ff2d0(0x3bf)]=_0x386cd9[_0x4ff2d0(0x2a3)]||_0x53b746[_0x4ff2d0(0x2a3)],_0x5a4e5c[_0x4ff2d0(0x3b0)]=_0x55418b[_0x4ff2d0(0x3b0)],_0x5a4e5c[_0x4ff2d0(0x22c)]=_0x5a4e5c[_0x4ff2d0(0x2bb)]=_0x33ca1a[_0x4ff2d0(0x2c7)](_0x5a4e5c[_0x4ff2d0(0x2e9)],_0x169377),_0x173c85[_0x4ff2d0(0x367)](_0x5a4e5c);}else _0xfd8ef9(null,_0x32c13b);},_0x3f4e9a[_0xba0522(0x1c0)]=async function(_0xb155df,_0x1530e0,_0x2c9655){const _0x2417cb=_0xba0522,_0x3512ed={'ExSOn':function(_0x6e3b76,_0x49249d,_0x4c5de1,_0x3bb486){const _0x2da3d4=_0x2280;return _0x33ca1a[_0x2da3d4(0x3bb)](_0x6e3b76,_0x49249d,_0x4c5de1,_0x3bb486);}};if(_0x2417cb(0x374)!==_0x33ca1a['cUUJU'])await transaction[_0x2417cb(0x36d)]({'id_ct':_0x1530e0[_0x2417cb(0x2dc)][_0x2417cb(0x1c2)]()}),await transaction[_0x2417cb(0x36d)]({'id_ct':_0x33ca1a[_0x2417cb(0x260)](_0x1530e0[_0x2417cb(0x2dc)][_0x2417cb(0x1c2)](),_0x33ca1a[_0x2417cb(0x22e)])},_0x33ca1a[_0x2417cb(0x161)]),await transaction['deleteTrans']({'id_ct':_0x33ca1a[_0x2417cb(0x2fe)](_0x1530e0[_0x2417cb(0x2dc)][_0x2417cb(0x1c2)](),_0x2417cb(0x153))}),_0x1530e0[_0x2417cb(0x246)]&&await Promise[_0x2417cb(0x3f2)](_0x1530e0[_0x2417cb(0x246)][_0x2417cb(0x313)](_0x386d66=>{const _0x14e927=_0x2417cb;return _0x3512ed[_0x14e927(0x24c)](deleteEvoucher,_0x386d66['id_app'],_0x386d66['ma'],_0x1530e0['_id']);})),_0x33ca1a[_0x2417cb(0x309)](_0x2c9655,null,_0x1530e0);else{if(_0x4e8085)return _0x1caefe['error'](_0x53f4f2);_0x378199[_0x2417cb(0x2e3)](_0x5bdbc4,_0x58df4e);}},_0x3f4e9a[_0xba0522(0x28a)]=async function(_0x330d01,_0x56f3e4,_0x444bcc){const _0x2ff5c1=_0xba0522,_0x520876={'zGoff':function(_0x4e4b71,_0x2f4860){return _0x4e4b71/_0x2f4860;},'kGDBQ':function(_0x3a8884,_0x543e10){return _0x3a8884-_0x543e10;},'kDCWw':function(_0x150767,_0x39ddae){const _0x1f5001=_0x2280;return _0x33ca1a[_0x1f5001(0x2c7)](_0x150767,_0x39ddae);},'Hjzlz':function(_0x1d96b4,_0x3f6558){return _0x33ca1a['rRYzu'](_0x1d96b4,_0x3f6558);},'jKyAD':function(_0x4b827a,_0x4775a9){const _0x4e298f=_0x2280;return _0x33ca1a[_0x4e298f(0x32a)](_0x4b827a,_0x4775a9);},'Nrslu':function(_0x1e8ac7,_0x266d9d){return _0x33ca1a['tgcke'](_0x1e8ac7,_0x266d9d);},'MLRHH':_0x33ca1a['tdQcN'],'lAwia':function(_0x19cebd,_0x5ca89d){return _0x19cebd/_0x5ca89d;},'DBOpa':function(_0x2f357e,_0x5c5eb3){const _0x1e6ddd=_0x2280;return _0x33ca1a[_0x1e6ddd(0x36a)](_0x2f357e,_0x5c5eb3);},'MmOxY':_0x2ff5c1(0x345),'hLQcU':_0x33ca1a[_0x2ff5c1(0x3b3)],'keUgd':_0x33ca1a[_0x2ff5c1(0x19e)],'wfAix':function(_0x5074e8){const _0x2be496=_0x2ff5c1;return _0x33ca1a[_0x2be496(0x335)](_0x5074e8);},'DPGKO':function(_0x436f99){return _0x436f99();},'Azood':_0x33ca1a[_0x2ff5c1(0x3b6)],'xROBu':function(_0x404b2a){return _0x404b2a();},'BThlI':function(_0x2084b6,_0x1ffada){const _0x5068c7=_0x2ff5c1;return _0x33ca1a[_0x5068c7(0x236)](_0x2084b6,_0x1ffada);},'fmvkN':_0x33ca1a['TnDDO'],'uWTtb':_0x33ca1a['jPnPn'],'Zfvpg':_0x33ca1a['ZUUux'],'sUOFi':function(_0x1dc1ae,_0x5eeccd){const _0x3c9550=_0x2ff5c1;return _0x33ca1a[_0x3c9550(0x274)](_0x1dc1ae,_0x5eeccd);},'niZQV':_0x33ca1a[_0x2ff5c1(0x3ad)],'UjQTu':function(_0x1a83b8){return _0x1a83b8();},'IoZLZ':_0x33ca1a[_0x2ff5c1(0x1d1)],'Rzrqu':function(_0x24c109,_0x266042){const _0x1a937a=_0x2ff5c1;return _0x33ca1a[_0x1a937a(0x318)](_0x24c109,_0x266042);},'mXgKW':_0x33ca1a[_0x2ff5c1(0x237)],'OJFcc':_0x33ca1a[_0x2ff5c1(0x201)],'QMLnY':_0x33ca1a[_0x2ff5c1(0x1ac)],'qAuuf':_0x2ff5c1(0x1cb),'sfuvl':_0x2ff5c1(0x30c),'QKMSt':function(_0x3330c5,_0x1e79cf){const _0x25344d=_0x2ff5c1;return _0x33ca1a[_0x25344d(0x358)](_0x3330c5,_0x1e79cf);},'TeVvs':_0x33ca1a[_0x2ff5c1(0x15d)],'GvyoO':_0x2ff5c1(0x28d),'IIAFm':'ten_dt','xrDzA':function(_0x1c3272){return _0x33ca1a['MbnEA'](_0x1c3272);},'ahmcI':function(_0x9bc712){return _0x9bc712();},'HStfz':function(_0x3c76b3,_0x243e20){const _0x59d4c9=_0x2ff5c1;return _0x33ca1a[_0x59d4c9(0x319)](_0x3c76b3,_0x243e20);},'QCskb':_0x33ca1a[_0x2ff5c1(0x1f7)],'JwJdH':function(_0x1269e0){const _0x1863bd=_0x2ff5c1;return _0x33ca1a[_0x1863bd(0x311)](_0x1269e0);},'Mwnfu':_0x33ca1a['wPeew'],'uUmKN':_0x33ca1a[_0x2ff5c1(0x363)],'mxLvq':'ten_phi','HpVgi':_0x2ff5c1(0x33a),'gMfwj':function(_0x108aa9,_0x453b9b){const _0x115332=_0x2ff5c1;return _0x33ca1a[_0x115332(0x319)](_0x108aa9,_0x453b9b);},'IgBlh':_0x33ca1a[_0x2ff5c1(0x2a8)],'citno':function(_0x38b99e,_0x1cc362,_0x318ea9){const _0x235acc=_0x2ff5c1;return _0x33ca1a[_0x235acc(0x1e2)](_0x38b99e,_0x1cc362,_0x318ea9);}};if(_0x33ca1a[_0x2ff5c1(0x3a7)](_0x33ca1a[_0x2ff5c1(0x23a)],_0x33ca1a[_0x2ff5c1(0x218)]))return _0x33ca1a[_0x2ff5c1(0x1e3)](_0x54b68b,_0x33575e['id_app'],_0x4a0942['ma'],_0x13847a[_0x2ff5c1(0x2dc)]);else{let _0x2e619a=_0x330d01[_0x2ff5c1(0x1bd)];await Promise[_0x2ff5c1(0x3f2)](_0x56f3e4[_0x2ff5c1(0x214)](_0x375f38=>_0x375f38[_0x2ff5c1(0x228)]=='0'||_0x375f38[_0x2ff5c1(0x228)]=='2'||_0x375f38[_0x2ff5c1(0x228)]=='7')[_0x2ff5c1(0x313)](_0x58faf7=>{const _0x6d643f=_0x2ff5c1,_0x3ddc36={'humOK':function(_0x413376,_0x1e7508){return _0x33ca1a['FtjqW'](_0x413376,_0x1e7508);}};if(_0x33ca1a[_0x6d643f(0x31a)](_0x33ca1a[_0x6d643f(0x398)],_0x33ca1a[_0x6d643f(0x398)]))_0x11760a[_0x6d643f(0x321)]='';else return((async()=>{const _0x349bae=_0x6d643f;let _0x3b129e=new Date()[_0x349bae(0x2c8)](),_0x5b8381=new Date(_0x58faf7[_0x349bae(0x304)])['getTime'](),_0x5f0f5a=_0x520876[_0x349bae(0x395)](_0x520876[_0x349bae(0x314)](_0x3b129e,_0x5b8381),_0x520876[_0x349bae(0x2cd)](_0x520876[_0x349bae(0x2cd)](_0x520876[_0x349bae(0x3d8)](0x18,0x3c),0x3c),0x3e8));if(_0x520876[_0x349bae(0x30b)](_0x5f0f5a,0x1)){if(_0x520876['Nrslu'](_0x520876[_0x349bae(0x391)],_0x520876[_0x349bae(0x391)]))return _0x3ddc36['humOK'](_0x23e76f,_0x349bae(0x360));else _0x58faf7[_0x349bae(0x228)]='9',await model[_0x349bae(0x261)]({'_id':_0x58faf7[_0x349bae(0x2dc)]},{'trang_thai':0x9});}})());})),async[_0x2ff5c1(0x2b5)]({'kh':function(_0x3a2678){const _0xbfda1e=_0x2ff5c1,_0x13e06a={'AehJv':_0x33ca1a['akokq'],'gJKrZ':_0x33ca1a[_0xbfda1e(0x19e)],'BKJUW':function(_0x2c247c){return _0x33ca1a['ZuTdh'](_0x2c247c);},'hmxFg':function(_0x4c22c8,_0xd17bad){const _0x1904a3=_0xbfda1e;return _0x33ca1a[_0x1904a3(0x31a)](_0x4c22c8,_0xd17bad);},'AAhbm':_0x33ca1a[_0xbfda1e(0x1b3)]};_0x56f3e4[_0xbfda1e(0x214)](_0x1a89bc=>_0x1a89bc[_0xbfda1e(0x3b0)])[_0xbfda1e(0x316)](_0x2e619a,customer,[{'where':_0x33ca1a[_0xbfda1e(0x3b3)],'fields':_0x33ca1a['UgjCH']}],function(){const _0x56cc0=_0xbfda1e,_0xb49e7e={'dcmdy':function(_0xcd5702){const _0x342f50=_0x2280;return _0x13e06a[_0x342f50(0x222)](_0xcd5702);}};_0x13e06a[_0x56cc0(0x3ee)](_0x13e06a[_0x56cc0(0x1ce)],'gNhBu')?_0x13e06a[_0x56cc0(0x222)](_0x3a2678):_0x19362a[_0x56cc0(0x214)](_0x4ef0d5=>_0x4ef0d5[_0x56cc0(0x19f)])[_0x56cc0(0x316)](_0x4cf433,_0x2f1b02,[{'where':{'nhan_vien_giao_hang':_0x13e06a['AehJv']},'fields':[{'ten_nhan_vien_giao_hang':_0x13e06a[_0x56cc0(0x3ec)]}]}],function(){const _0x11783c=_0x56cc0;_0xb49e7e[_0x11783c(0x20d)](_0x114af4);});});},'nhan_vien_giao_hang':function(_0x450eb0){const _0x4e7a35=_0x2ff5c1;if(_0x520876[_0x4e7a35(0x1be)]!=='LFhQa'){let _0x74fa5c=_0x520876['lAwia'](_0x2f1af5[0x0][_0x4e7a35(0x17f)],_0x3a7aff[0x0]['tien']);if(!_0x74fa5c){let _0x28f357=_0x375e42[_0x4e7a35(0x17a)]-(_0x3935b7[_0x4e7a35(0x29d)]||0x0);_0x2f3b22=_0xd7c6b6['roundBy'](_0x520876[_0x4e7a35(0x1a7)](_0x28f357,_0x74fa5c),0x0);}}else _0x56f3e4[_0x4e7a35(0x214)](_0x146853=>_0x146853[_0x4e7a35(0x19f)])[_0x4e7a35(0x316)](_0x2e619a,customer,[{'where':{'nhan_vien_giao_hang':_0x520876[_0x4e7a35(0x307)]},'fields':[{'ten_nhan_vien_giao_hang':_0x520876[_0x4e7a35(0x14d)]}]}],function(){_0x450eb0();});},'nv_giao_hang':function(_0x255f42){const _0x452425=_0x2ff5c1,_0xd73827={'sZLdT':function(_0xebecba){return _0x520876['wfAix'](_0xebecba);}};_0x56f3e4[_0x452425(0x214)](_0x1f23d8=>_0x1f23d8[_0x452425(0x1da)])[_0x452425(0x316)](null,User,{'where':{'user_nv_giao_hang':_0x452425(0x308)},'fields':{'ten_nv_giao_hang':_0x452425(0x2e2)}},function(){const _0x3706da=_0x452425;_0xd73827[_0x3706da(0x266)](_0x255f42);});},'trangthai':function(_0x4a7c1e){const _0x44f8b0=_0x2ff5c1;_0x56f3e4[_0x44f8b0(0x214)](_0xbc4484=>_0xbc4484[_0x44f8b0(0x228)])[_0x44f8b0(0x316)](null,trangthai,[{'where':{'trang_thai':_0x33ca1a[_0x44f8b0(0x17e)],'ma_ct':_0x33ca1a[_0x44f8b0(0x23e)]},'fields':[_0x33ca1a[_0x44f8b0(0x208)],_0x44f8b0(0x380)]}],function(){const _0x300cda=_0x44f8b0;_0x520876[_0x300cda(0x245)](_0x4a7c1e);});},'ptthanhtoan':function(_0x43ebab){const _0x9140d1=_0x2ff5c1,_0x2526f2={'qYUyp':function(_0x2c3f1a){return _0x2c3f1a();}};_0x56f3e4['filter'](_0x4627de=>_0x4627de[_0x9140d1(0x238)])[_0x9140d1(0x316)](_0x2e619a,ptthanhtoan,[{'where':{'pt_thanh_toan':_0x33ca1a[_0x9140d1(0x2a9)]},'fields':[{'ten_pt_thanh_toan':_0x9140d1(0x1fc)},{'tk_cn_thanhtoan':_0x33ca1a[_0x9140d1(0x2c0)]}]}],function(){const _0x41ac2e=_0x9140d1;_0x2526f2[_0x41ac2e(0x333)](_0x43ebab);});},'pt1':function(_0x2cfdd5){const _0x3bb34c=_0x2ff5c1;if(_0x33ca1a[_0x3bb34c(0x3d9)](_0x33ca1a[_0x3bb34c(0x196)],_0x33ca1a['XxmFi']))_0x56f3e4[_0x3bb34c(0x316)](_0x2e619a,pt1,[{'where':{'_id':_0x33ca1a['qnOQx']},'fields':[{'id_pt1':_0x33ca1a[_0x3bb34c(0x2a9)]},{'so_ct_pt1':_0x33ca1a[_0x3bb34c(0x3cc)]},{'ma_ct_pt1':_0x33ca1a[_0x3bb34c(0x23e)]},{'ngay_ct_pt1':_0x33ca1a[_0x3bb34c(0x2af)]}]}],function(){const _0x392731=_0x3bb34c;_0x520876[_0x392731(0x18d)](_0x2cfdd5);});else return _0x1b8bb4(_0x520876['Azood']);},'t_tien':function(_0x3ace80){const _0x2abd8d=_0x2ff5c1,_0x261696={'kSXLr':function(_0x1dd151,_0x5f5b46){const _0x226c6f=_0x2280;return _0x33ca1a[_0x226c6f(0x232)](_0x1dd151,_0x5f5b46);},'gOnJZ':_0x33ca1a[_0x2abd8d(0x3cb)],'kGVBc':_0x33ca1a[_0x2abd8d(0x27f)],'kqbMA':_0x33ca1a[_0x2abd8d(0x1cf)],'EBIGh':_0x2abd8d(0x23d),'VJnIC':_0x33ca1a['BqVDV'],'jPHYs':_0x33ca1a[_0x2abd8d(0x1c1)],'pZPgT':_0x33ca1a[_0x2abd8d(0x1f6)],'VCTvY':function(_0x3e840e,_0x124ce8){const _0x2ab7d8=_0x2abd8d;return _0x33ca1a[_0x2ab7d8(0x3a9)](_0x3e840e,_0x124ce8);},'Ldnxy':_0x2abd8d(0x29d),'slIsb':function(_0x406a42,_0x4c6b98){return _0x406a42+_0x4c6b98;},'wZARQ':function(_0x50ce2d,_0x4f3d8b){return _0x33ca1a['fIZua'](_0x50ce2d,_0x4f3d8b);},'agMoX':_0x33ca1a[_0x2abd8d(0x1e5)],'VbWhz':_0x33ca1a['ORZhC'],'ZigEe':_0x33ca1a[_0x2abd8d(0x26d)],'cKrQU':function(_0x1a3a21,_0x514eda){return _0x33ca1a['zlGRi'](_0x1a3a21,_0x514eda);},'jJpjV':function(_0x4f1487,_0x490fef){const _0x454f0a=_0x2abd8d;return _0x33ca1a[_0x454f0a(0x37f)](_0x4f1487,_0x490fef);},'bCaSA':function(_0x21d878,_0x4b05c2){const _0x38d66a=_0x2abd8d;return _0x33ca1a[_0x38d66a(0x260)](_0x21d878,_0x4b05c2);},'RuVFK':function(_0x48a2a4,_0xf9a048){return _0x48a2a4+_0xf9a048;}};_0x56f3e4[_0x2abd8d(0x22a)](function(_0x287172){const _0x3c05fb=_0x2abd8d;if(_0x261696['gOnJZ']!=='FYFKv')_0x2438ab=_0x3cc3e9[_0x3c05fb(0x3bc)]||{};else{if(_0x287172[_0x3c05fb(0x23b)]){if(_0x261696['kGVBc']===_0x261696[_0x3c05fb(0x171)]){if(_0x261696[_0x3c05fb(0x1c9)](_0x346689,_0x47b252[_0x3c05fb(0x24b)]))_0x3e7352=_0x5d9455[_0x3c05fb(0x24b)];}else _0x287172[_0x3c05fb(0x1bf)]=_0x287172[_0x3c05fb(0x23b)][_0x3c05fb(0x2f5)](_0x261696[_0x3c05fb(0x3a1)]),_0x287172[_0x3c05fb(0x3e0)]=_0x287172['details'][_0x3c05fb(0x2f5)](_0x261696['VJnIC']),_0x287172[_0x3c05fb(0x39b)]=_0x287172[_0x3c05fb(0x23b)][_0x3c05fb(0x2f5)](_0x261696[_0x3c05fb(0x1ad)]),_0x287172[_0x3c05fb(0x375)]=_0x287172[_0x3c05fb(0x3e0)]-_0x287172[_0x3c05fb(0x23b)]['csum'](_0x261696['pZPgT']),_0x287172[_0x3c05fb(0x1a8)]=_0x261696[_0x3c05fb(0x28c)](_0x287172[_0x3c05fb(0x39b)],_0x287172[_0x3c05fb(0x23b)][_0x3c05fb(0x2f5)](_0x261696[_0x3c05fb(0x365)])),_0x287172[_0x3c05fb(0x2be)]=_0x287172[_0x3c05fb(0x39d)]=_0x261696[_0x3c05fb(0x337)](_0x287172['tien_ck_hd'],_0x287172[_0x3c05fb(0x2da)]||0x0);}else{if(_0x261696[_0x3c05fb(0x34b)](_0x261696[_0x3c05fb(0x2d8)],_0x261696['VbWhz']))_0x287172['t_sl']=0x0,_0x287172[_0x3c05fb(0x3e0)]=0x0,_0x287172[_0x3c05fb(0x39b)]=0x0,_0x287172[_0x3c05fb(0x39d)]=0x0,_0x287172[_0x3c05fb(0x2be)]=0x0,_0x287172['t_tien']=_0x287172[_0x3c05fb(0x3e0)],_0x287172[_0x3c05fb(0x1a8)]=_0x287172[_0x3c05fb(0x39b)];else return _0x486084(new _0x1da767(_0x3c05fb(0x33c)+_0x23705e['ma']+_0x3c05fb(0x31b)));}_0x287172['ctcpbhs']?'mcWaK'!==_0x261696['ZigEe']?(_0x8c7516[_0x3c05fb(0x321)]='',_0x2edaa7[_0x3c05fb(0x3e7)]='',_0x2ee2be[_0x3c05fb(0x396)]=''):(_0x287172[_0x3c05fb(0x27c)]=_0x287172[_0x3c05fb(0x219)][_0x3c05fb(0x2f5)](_0x3c05fb(0x1e7)),_0x287172[_0x3c05fb(0x233)]=_0x287172[_0x3c05fb(0x219)][_0x3c05fb(0x2f5)]('tien_cp')):(_0x287172[_0x3c05fb(0x27c)]=0x0,_0x287172['t_cp_cpb']=0x0),_0x287172[_0x3c05fb(0x327)]=_0x261696['cKrQU'](_0x261696[_0x3c05fb(0x28c)](_0x261696[_0x3c05fb(0x2b6)](_0x261696[_0x3c05fb(0x326)](_0x287172[_0x3c05fb(0x1a8)],_0x287172[_0x3c05fb(0x27c)]),_0x287172[_0x3c05fb(0x2be)]),_0x287172[_0x3c05fb(0x1d3)]||0x0),_0x287172[_0x3c05fb(0x206)]||0x0)-(_0x287172['tien_freeship']||0x0),_0x287172[_0x3c05fb(0x2aa)]=_0x261696[_0x3c05fb(0x38d)](_0x261696[_0x3c05fb(0x2b6)](_0x261696['VCTvY'](_0x261696['bCaSA'](_0x287172[_0x3c05fb(0x375)],_0x287172[_0x3c05fb(0x233)]),_0x287172[_0x3c05fb(0x39d)]),_0x287172['tt_tien_thuong']||0x0),_0x287172['tien_phi_vc']||0x0)-(_0x287172['tien_freeship']||0x0);}}),_0x33ca1a[_0x2abd8d(0x301)](_0x3ace80);},'details_vt':function(_0x3eb079){const _0x27994c=_0x2ff5c1,_0x1f0024={'garJz':function(_0x2bdc4f){const _0x422612=_0x2280;return _0x520876[_0x422612(0x1c7)](_0x2bdc4f);},'ItmAE':function(_0x3622db,_0x243bdd){const _0x290b25=_0x2280;return _0x520876[_0x290b25(0x14c)](_0x3622db,_0x243bdd);},'cZvXa':function(_0x4e7453,_0x31c4a7){return _0x4e7453!==_0x31c4a7;},'BbjaJ':_0x520876[_0x27994c(0x2d3)],'WERfm':_0x520876['uWTtb'],'ytdgz':_0x520876[_0x27994c(0x1df)]};_0x520876['sUOFi'](_0x520876[_0x27994c(0x1f2)],_0x27994c(0x1d2))?_0x1f0024[_0x27994c(0x177)](_0x2f1c4f):async[_0x27994c(0x2b7)](_0x56f3e4,function(_0x98b7be,_0x59c193){const _0x28e59c=_0x27994c,_0x46c45f={'LoYkq':function(_0x32e2c0,_0x46a28f){const _0x3ad62c=_0x2280;return _0x1f0024[_0x3ad62c(0x1ef)](_0x32e2c0,_0x46a28f);},'hNWjf':function(_0x2a7331,_0x197084){const _0x8bd113=_0x2280;return _0x1f0024[_0x8bd113(0x2a6)](_0x2a7331,_0x197084);},'lATgv':_0x1f0024[_0x28e59c(0x2d5)],'IQujf':_0x1f0024[_0x28e59c(0x322)]},_0x3ab766=_0x98b7be[_0x28e59c(0x23b)];if(!_0x3ab766)return _0x1f0024[_0x28e59c(0x177)](_0x59c193);_0x3ab766[_0x28e59c(0x316)](_0x2e619a,dmvt,[{'where':_0x28e59c(0x275),'fields':[_0x1f0024[_0x28e59c(0x3dd)]]}],function(){const _0x3960ad=_0x28e59c;if(_0x46c45f[_0x3960ad(0x2c6)](_0x46c45f[_0x3960ad(0x179)],_0x46c45f[_0x3960ad(0x3c9)]))_0x59c193();else return _0x46c45f[_0x3960ad(0x174)](_0x4097ea,new _0x2bacb1('Thẻ\x20mua\x20hàng\x20'+_0x50214d['ma']+_0x3960ad(0x1af)));});},function(){const _0x1f56c3=_0x27994c;_0x520876[_0x1f56c3(0x18d)](_0x3eb079);});},'details_tt1':function(_0x52bf79){const _0x5431b4=_0x2ff5c1,_0x327910={'RAKCZ':function(_0x4ac88d,_0x1ceac2){const _0x21f09c=_0x2280;return _0x33ca1a[_0x21f09c(0x282)](_0x4ac88d,_0x1ceac2);},'nDuDO':_0x33ca1a[_0x5431b4(0x1e0)],'QQrtT':_0x33ca1a[_0x5431b4(0x249)]};async['mapSeries'](_0x56f3e4,function(_0x206c6d,_0x2d70b2){const _0xb338f3=_0x5431b4,_0x5f0569={'uCPHV':function(_0x572091){const _0x13d5b0=_0x2280;return _0x520876[_0x13d5b0(0x185)](_0x572091);},'lxvqP':_0x520876['IoZLZ']};if(_0x520876[_0xb338f3(0x382)](_0xb338f3(0x287),_0xb338f3(0x394))){const _0x5b6185=_0x206c6d[_0xb338f3(0x23b)]||[];_0x5b6185[_0xb338f3(0x214)](_0x5acfe2=>_0x5acfe2['ma_tt1'])['joinModel2'](_0x2e619a,dmtt,[{'where':{'ma_vt':_0x520876[_0xb338f3(0x187)],'ma_tt1':_0x520876[_0xb338f3(0x2d1)]},'setFields':(_0x2e71f6,_0x5056ea)=>{const _0x598bc7=_0xb338f3,_0xa5ac0d={'csSdu':'tien_cp'};_0x327910[_0x598bc7(0x162)](_0x327910['nDuDO'],_0x327910[_0x598bc7(0x320)])?(_0x3c1d09[_0x598bc7(0x27c)]=_0x4962be[_0x598bc7(0x219)][_0x598bc7(0x2f5)](_0x598bc7(0x1e7)),_0x14ba63[_0x598bc7(0x233)]=_0x1ab406[_0x598bc7(0x219)]['csum'](_0xa5ac0d['csSdu'])):_0x2e71f6[_0x598bc7(0x285)]=_0x2e71f6[_0x598bc7(0x285)]+_0x598bc7(0x344)+_0x5056ea[_0x598bc7(0x3c8)];}}],function(){const _0x51a622=_0xb338f3;_0x5f0569[_0x51a622(0x29b)](_0x2d70b2);});}else _0x3e5353['log'](_0x5f0569['lxvqP']),_0x146206[_0xb338f3(0x321)]='';},function(){const _0x2a3c43=_0x5431b4,_0x20618f={'vyXYz':_0x520876['QMLnY']};if(_0x520876[_0x2a3c43(0x382)](_0x520876[_0x2a3c43(0x20f)],_0x520876[_0x2a3c43(0x181)]))_0x52bf79();else{const _0x4f2444={'vSaPv':function(_0x1bdbc0){return _0x1bdbc0();}};_0x51aeae[_0x2a3c43(0x214)](_0x51f920=>_0x51f920[_0x2a3c43(0x16e)])[_0x2a3c43(0x316)](_0x31e918,_0x9dc7fc,[{'where':_0x20618f[_0x2a3c43(0x1f9)],'fields':['ten_cp']}],function(){_0x4f2444['vSaPv'](_0x5da586);});}});},'details_dt':function(_0x43a74e){const _0x2d20a5=_0x2ff5c1,_0x5be0c4={'NaBVu':function(_0x59e8b1){const _0x249b2a=_0x2280;return _0x520876[_0x249b2a(0x2d6)](_0x59e8b1);},'VaQDh':'ma_dt','ZOAdF':_0x520876[_0x2d20a5(0x1dd)]};if(_0x520876['HStfz']('fDdIR','fDdIR'))async[_0x2d20a5(0x1d9)](_0x56f3e4,function(_0x27faa0,_0x182736){const _0x2ffd91=_0x2d20a5,_0x2de336={'Nwqwo':function(_0x562ce8,_0x2bb164){const _0x508021=_0x2280;return _0x520876[_0x508021(0x277)](_0x562ce8,_0x2bb164);},'Exlxq':function(_0x54025c){return _0x54025c();}};if(_0x520876[_0x2ffd91(0x277)](_0x2ffd91(0x354),_0x520876[_0x2ffd91(0x26c)])){const _0x43bafe={'BRbIx':function(_0x2400d2,_0x422004){return _0x2400d2(_0x422004);},'pEBwd':function(_0x2bbe21,_0x1a9831){const _0x9665c=_0x2ffd91;return _0x2de336[_0x9665c(0x2c1)](_0x2bbe21,_0x1a9831);}};_0x140e48({'id_app':_0x408481,'email':_0x586b7b},(_0x57c5c1,_0x1dda39)=>{const _0x34ef95=_0x2ffd91;if(_0x57c5c1)return _0x43bafe['BRbIx'](_0x58f324,new _0x227967(_0x57c5c1));_0x4bc50a(_0x43bafe[_0x34ef95(0x389)](_0x1dda39[_0x34ef95(0x1bb)],0x0)?0x0:_0x1dda39[0x0][_0x34ef95(0x270)]);});}else{const _0x2c03a9=_0x27faa0[_0x2ffd91(0x23b)];if(!_0x2c03a9)return _0x520876[_0x2ffd91(0x1c7)](_0x182736);_0x2c03a9['filter'](_0x5bdd9f=>_0x5bdd9f[_0x2ffd91(0x28d)])[_0x2ffd91(0x316)](_0x2e619a,dmdt,[{'where':_0x520876['GvyoO'],'fields':[_0x520876[_0x2ffd91(0x1dd)]]}],function(){const _0x562291=_0x2ffd91;_0x2de336[_0x562291(0x373)](_0x182736);});}},function(){const _0x12a6cc=_0x2d20a5;_0x5be0c4[_0x12a6cc(0x390)](_0x43a74e);});else{const _0x6094bc={'TiPat':function(_0x200979){const _0x219938=_0x2d20a5;return _0x520876[_0x219938(0x21c)](_0x200979);}};_0x2fd0d7[_0x2d20a5(0x1d9)](_0x23402c,function(_0x403f6d,_0x1c57bb){const _0x3aa46f=_0x2d20a5,_0x5a3ccc={'paMef':function(_0x9177ac){const _0x11e706=_0x2280;return _0x5be0c4[_0x11e706(0x390)](_0x9177ac);}},_0x284631=_0x403f6d[_0x3aa46f(0x23b)];if(!_0x284631)return _0x5be0c4['NaBVu'](_0x1c57bb);_0x284631[_0x3aa46f(0x214)](_0x2bb2ad=>_0x2bb2ad[_0x3aa46f(0x28d)])[_0x3aa46f(0x316)](_0x1d13da,_0x4a54ba,[{'where':_0x5be0c4[_0x3aa46f(0x166)],'fields':[_0x5be0c4[_0x3aa46f(0x21b)]]}],function(){_0x5a3ccc['paMef'](_0x1c57bb);});},function(){const _0x2c79c0=_0x2d20a5;_0x6094bc[_0x2c79c0(0x207)](_0x24cce7);});}},'details_contract':function(_0x7862aa){const _0x3623f0=_0x2ff5c1,_0x4e3ff8={'OTPYO':function(_0x2be6d5,_0x39c5ed){return _0x33ca1a['WErZe'](_0x2be6d5,_0x39c5ed);},'pZyqB':_0x33ca1a['rEWYN'],'UaGWn':_0x33ca1a[_0x3623f0(0x3ea)],'uYBcx':function(_0x22bfd7){const _0x555f4d=_0x3623f0;return _0x33ca1a[_0x555f4d(0x30e)](_0x22bfd7);}};async[_0x3623f0(0x1d9)](_0x56f3e4,function(_0x311af2,_0x37e32a){const _0x475dfc=_0x3623f0,_0xe5477c=_0x311af2['details'];if(!_0xe5477c)return _0x37e32a();_0xe5477c['filter'](_0x22ed1=>_0x22ed1['ma_hd'])[_0x475dfc(0x316)](_0x2e619a,contract,[{'where':{'ma_hd':_0x475dfc(0x2f4)},'fields':[_0x520876[_0x475dfc(0x315)]]}],function(){const _0x5336f8=_0x475dfc;_0x4e3ff8[_0x5336f8(0x231)](_0x4e3ff8['pZyqB'],_0x4e3ff8[_0x5336f8(0x1ae)])?_0x58ed57[_0x5336f8(0x367)](_0x4fe56c['user_nv_giao_hang']):_0x4e3ff8['uYBcx'](_0x37e32a);});},function(){const _0x50b641=_0x3623f0;_0x4e3ff8[_0x50b641(0x3c3)](_0x7862aa);});},'details_phi':function(_0x2b7c40){const _0x29a340=_0x2ff5c1,_0x5f3874={'dgjZL':function(_0x299c6e){return _0x33ca1a['limOS'](_0x299c6e);}};async[_0x29a340(0x1d9)](_0x56f3e4,function(_0x82aaa8,_0x1ca029){const _0x151418=_0x29a340,_0x5b6acf={'jqmhB':function(_0x5f3fda){const _0x1a3c33=_0x2280;return _0x520876[_0x1a3c33(0x22d)](_0x5f3fda);}};if(_0x151418(0x328)===_0x520876[_0x151418(0x256)])return _0x38bba2(null,_0x4fcbd2);else{const _0x14099d=_0x82aaa8[_0x151418(0x23b)];if(!_0x14099d)return _0x520876['JwJdH'](_0x1ca029);_0x14099d[_0x151418(0x214)](_0x153585=>_0x153585[_0x151418(0x3f1)])[_0x151418(0x316)](_0x2e619a,dmphi,[{'where':_0x520876[_0x151418(0x39c)],'fields':[_0x520876[_0x151418(0x336)]]}],function(){_0x5b6acf['jqmhB'](_0x1ca029);});}},function(){const _0x422f8d=_0x29a340;_0x5f3874[_0x422f8d(0x150)](_0x2b7c40);});},'details_cpbh':function(_0xf6152a){const _0x2178a5=_0x2ff5c1;_0x520876[_0x2178a5(0x159)](_0x520876[_0x2178a5(0x239)],_0x520876[_0x2178a5(0x239)])?async[_0x2178a5(0x2b7)](_0x56f3e4,function(_0x13df31,_0x5ea9e4){const _0x4fbbf1=_0x2178a5;let _0x31edc0=_0x13df31[_0x4fbbf1(0x219)];if(!_0x31edc0)return _0x5ea9e4();_0x31edc0?_0x31edc0[_0x4fbbf1(0x214)](_0x237240=>_0x237240['ma_cp'])[_0x4fbbf1(0x316)](_0x2e619a,dmcpmh,[{'where':_0x520876[_0x4fbbf1(0x32f)],'fields':[_0x520876[_0x4fbbf1(0x34d)]]}],function(){_0x5ea9e4();}):_0x520876[_0x4fbbf1(0x21c)](_0x5ea9e4);},function(){_0xf6152a();}):_0x20d4b2();}},function(){const _0x34558b=_0x2ff5c1;_0x520876[_0x34558b(0x2a5)](_0x444bcc,null,_0x56f3e4);});}};};
|