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,17 +1 @@
|
|
|
1
|
-
const databanle=require("./databanlenpp"),async=require("async");
|
|
2
|
-
module.exports=async function($query_user$$,$condition$$,$callback$$){if(!$condition$$.tu_ngay||!$condition$$.den_ngay)return $callback$$("B\u00e1o c\u00e1o n\u00e0y y\u00eau c\u1ea7u c\u00e1c tham s\u1ed1:tu_ngay,den_ngay");$query_user$$={id_app:$condition$$.id_app};var $condition_kh_custs_ma_kho$$=$condition$$.ma_kho;$condition_kh_custs_ma_kho$$&&($query_user$$.$and||($query_user$$.$and=[]),$query_user$$.$and||($query_user$$.$and=[]),typeof $condition_kh_custs_ma_kho$$=="string"&&($condition_kh_custs_ma_kho$$=
|
|
3
|
-
[$condition_kh_custs_ma_kho$$]),$query_user$$.$and.push({$or:[{ma_kho:{$in:$condition_kh_custs_ma_kho$$}},{"details.ma_kho":{$in:$condition_kh_custs_ma_kho$$}}]}));$query_user$$.ngay_ct={$gte:$condition$$.tu_ngay,$lte:$condition$$.den_ngay};$condition$$.ma_dvcs&&($query_user$$.ma_dvcs=$condition$$.ma_dvcs);$condition$$.user_nv&&($query_user$$.user_nv=$condition$$.user_nv);$condition$$.user_ctv&&($query_user$$.user_ctv=$condition$$.user_ctv);$condition$$.user&&($query_user$$.$or?($query_user$$.$and||
|
|
4
|
-
($query_user$$.$and=[]),$query_user$$.$and.push({$or:[{user_nv:$condition$$.user},{user_ctv:$condition$$.user}]})):$query_user$$.$or=[{user_nv:$condition$$.user},{user_ctv:$condition$$.user}]);$condition$$.tinh_thanh&&($query_user$$.tinh_thanh=$condition$$.tinh_thanh);if($condition$$.ma_kh)$query_user$$.ma_kh=$condition$$.ma_kh;else{$condition_kh_custs_ma_kho$$={};if($condition$$.nh_kh){var $nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$=await global.getModel("group").getAllChildrenGroup($condition$$.id_app,
|
|
5
|
-
$condition$$.nh_kh,{status:!0});$condition_kh_custs_ma_kho$$.nh_kh={$in:$nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$}}$condition$$.nh_kh2&&($nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$=await global.getModel("group").getAllChildrenGroup($condition$$.id_app,$condition$$.nh_kh2,{status:!0}),$condition_kh_custs_ma_kho$$.nh_kh2={$in:$nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$});$condition$$.nh_kh3&&($nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$=await global.getModel("group").getAllChildrenGroup($condition$$.id_app,
|
|
6
|
-
$condition$$.nh_kh3,{status:!0}),$condition_kh_custs_ma_kho$$.nh_kh3={$in:$nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$});$condition$$.nh_kh4&&($nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$=await global.getModel("group").getAllChildrenGroup($condition$$.id_app,$condition$$.nh_kh4,{status:!0}),$condition_kh_custs_ma_kho$$.nh_kh4={$in:$nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$});$condition$$.nh_kh5&&($nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$=await global.getModel("group").getAllChildrenGroup($condition$$.id_app,
|
|
7
|
-
$condition$$.nh_kh5,{status:!0}),$condition_kh_custs_ma_kho$$.nh_kh5={$in:$nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$});Object.keys($condition_kh_custs_ma_kho$$).length>0&&($condition_kh_custs_ma_kho$$.id_app=$condition$$.id_app,$condition_kh_custs_ma_kho$$=await global.getModel("customer").find($condition_kh_custs_ma_kho$$,{ma_kh:1}).lean(),$query_user$$.ma_kh={$in:$condition_kh_custs_ma_kho$$.map($c$$=>$c$$.ma_kh)})}$condition$$.ma_ct&&($query_user$$.ma_ct=$condition$$.ma_ct);$condition$$.user_hoa_hong&&
|
|
8
|
-
($query_user$$.$or?($query_user$$.$and||($query_user$$.$and=[]),$query_user$$.$and.push({$or:[{user_nv:$condition$$.user_hoa_hong},{user_ctv:$condition$$.user_hoa_hong},{user_ctv2:$condition$$.user_hoa_hong},{user_kho:$condition$$.user_hoa_hong},{user_gt:$condition$$.user_hoa_hong},{user_ql:$condition$$.user_hoa_hong},{"details.user_nv":$condition$$.user_hoa_hong},{"details.user_ctv":$condition$$.user_hoa_hong},{"details.user_ctv2":$condition$$.user_hoa_hong},{"details.user_kho":$condition$$.user_hoa_hong},
|
|
9
|
-
{"details.user_gt":$condition$$.user_hoa_hong},{"details.user_ql":$condition$$.user_hoa_hong}]})):$query_user$$.$or=[{user_nv:$condition$$.user_hoa_hong},{user_ctv:$condition$$.user_hoa_hong},{user_ctv2:$condition$$.user_hoa_hong},{user_kho:$condition$$.user_hoa_hong},{user_gt:$condition$$.user_hoa_hong},{user_ql:$condition$$.user_hoa_hong},{"details.user_nv":$condition$$.user_hoa_hong},{"details.user_ctv":$condition$$.user_hoa_hong},{"details.user_ctv2":$condition$$.user_hoa_hong},{"details.user_kho":$condition$$.user_hoa_hong},
|
|
10
|
-
{"details.user_gt":$condition$$.user_hoa_hong},{"details.user_ql":$condition$$.user_hoa_hong}]);databanle($query_user$$,function($error$$,$rs$$,$ptthanhtoans$$){if($error$$)return $callback$$($error$$);const $thanh_toan$$=$ptthanhtoans$$.map($pt$$=>({name:$pt$$.ma,value:$pt$$.ma,ma:$pt$$.ma,ten:$pt$$.ten}));async.mapSeries($rs$$,function($r$$,$callback$$){$r$$.t_sl_xuat=$r$$.details.csum("sl_xuat");$r$$.t_tien_hang=$r$$.details.csum("tien_hang");$r$$.t_tien_hang_ct=$r$$.details.csum("tien_hang_ct");
|
|
11
|
-
$r$$.t_thue=$r$$.details.csum("tien_thue");$r$$.t_tien_ck=$r$$.details.csum("tien_ck");$r$$.t_tien_cp=$r$$.details.csum("tien_cp");$r$$.t_tien=$r$$.details.csum("tien");$r$$.tien_ck_hd=$r$$.tien_ck_hd||0;$r$$.t_tien_xuat=$r$$.details.csum("tien_xuat");$r$$.t_tien_hoa_hong=$r$$.details.csum("tien_hoa_hong");$r$$.t_tien_hoa_hong_gt=$r$$.details.csum("tien_hoa_hong_gt");$r$$.t_tien_hoa_hong_ctv=$r$$.details.csum("tien_hoa_hong_ctv");$r$$.t_tien_hoa_hong_ql=$r$$.details.csum("tien_hoa_hong_ql");$r$$.tien_freeship=
|
|
12
|
-
$r$$.tien_freeship||0;$r$$.tien_phi_vc=$r$$.tien_phi_vc||0;$r$$.details_tl?($r$$.t_tien_tl=$r$$.details_tl.csum("tien_hang_ct")-$r$$.details_tl.csum("tien_ck"),$r$$.t_tien_thue_tl=$r$$.details_tl.csum("tien_thue"),$r$$.t_tien_nhap=$r$$.details_tl.csum("tien_nhap"),$r$$.t_sl_nhap=$r$$.details_tl.csum("sl_nhap"),$r$$.t_tien_hoa_hong-=$r$$.details_tl.csum("tien_hoa_hong"),$r$$.t_tien_hoa_hong_gt-=$r$$.details_tl.csum("tien_hoa_hong_gt"),$r$$.t_tien_hoa_hong_ctv-=$r$$.details_tl.csum("tien_hoa_hong_ctv"),
|
|
13
|
-
$r$$.t_tien_hoa_hong_ql-=$r$$.details_tl.csum("tien_hoa_hong_ql")):($r$$.t_tien_tl=0,$r$$.t_sl_nhap=0,$r$$.t_tien_nhap=0);$callback$$(null,$r$$)},function($error$$,$rs$$){if($error$$)return $callback$$($error$$);$error$$=$condition$$.groupby||$condition$$.group_by||["ma_kho"];typeof $error$$=="string"&&($error$$=[$error$$]);$rs$$.groupBy($error$$,[{name:"t_sl_xuat",value:"t_sl_xuat"},{name:"t_tien_hang",value:"t_tien_hang"},{name:"t_tien_hang_ct",value:"t_tien_hang_ct"},{name:"t_thue",value:"t_thue"},
|
|
14
|
-
{name:"t_tien_cp",value:"t_tien_cp"},{name:"t_tien_ck",value:"t_tien_ck"},{name:"t_tien",value:"t_tien"},{name:"tien_ck_hd",value:"tien_ck_hd"},{name:"tien_freeship",value:"tien_freeship"},{name:"tien_phi_vc",value:"tien_phi_vc"},{name:"tien_evoucher",value:"tien_evoucher"},{name:"tien_thu",value:"tien_thu"},{name:"tien_thu2",value:"tien_thu2"},{name:"tien_paymentByPoints",value:"tien_paymentByPoints"},{name:"t_tien_xuat",value:"t_tien_xuat"},{name:"t_sl_nhap",value:"t_sl_nhap"},{name:"t_tien_tl",
|
|
15
|
-
value:"t_tien_tl"},{name:"t_tien_thue_tl",value:"t_tien_thue_tl"},{name:"t_tien_nhap",value:"t_tien_nhap"},{name:"phai_tra",value:"phai_tra"},{name:"t_tien_hoa_hong",value:"t_tien_hoa_hong"},{name:"t_tien_hoa_hong_gt",value:"t_tien_hoa_hong_gt"},{name:"t_tien_hoa_hong_ctv",value:"t_tien_hoa_hong_ctv"},{name:"t_tien_hoa_hong_ql",value:"t_tien_hoa_hong_ql"},...$thanh_toan$$],async function($error$$,$report$$){if($error$$)return $callback$$($error$$);let $i$$=1;$report$$.forEach(function($r$$){$r$$.stt=
|
|
16
|
-
$i$$;$r$$.bold=!1;$r$$.t_phai_thu=$r$$.t_tien_hang_ct-($r$$.t_tien_ck||0)+($r$$.t_thue||0)+($r$$.tien_phi_vc||0)-($r$$.tien_freeship||0)-($r$$.tien_ck_hd||0)-($r$$.tien_evoucher||0);$r$$.t_doanh_thu=$r$$.t_tien_hang_ct-($r$$.t_tien_ck||0)+($r$$.tien_phi_vc||0)-($r$$.tien_freeship||0)-($r$$.tien_ck_hd||0)-($r$$.tien_evoucher||0);$r$$.t_doanh_thu_thuan=$r$$.t_doanh_thu-$r$$.t_tien_tl;$r$$.t_lai=$r$$.t_doanh_thu-$r$$.t_tien_xuat-($r$$.t_tien_tl-$r$$.t_tien_nhap);$r$$.t_tien_thu=$thanh_toan$$.map($pt$$=>
|
|
17
|
-
$r$$[$pt$$.ma]||0).reduce(($a$$,$b$$)=>$a$$+$b$$,0);$r$$.t_tien_paymentByPoints=$r$$.tien_paymentByPoints||0;$r$$.t_tien_phai_tl=$r$$.t_tien_tl+$r$$.t_tien_thue_tl;$i$$++});$report$$.forEach($r$$=>{$r$$.t_tien_phai_tl=$r$$.t_tien_tl+$r$$.t_tien_thue_tl});$callback$$(null,$report$$)})})})};
|
|
1
|
+
const _0x2d89d7=_0x36da;(function(_0x1c3511,_0x32320a){const _0x54d0da=_0x36da,_0x49a654=_0x1c3511();while(!![]){try{const _0x1d3db6=-parseInt(_0x54d0da(0xe7))/0x1+-parseInt(_0x54d0da(0xd9))/0x2*(-parseInt(_0x54d0da(0x181))/0x3)+-parseInt(_0x54d0da(0xf5))/0x4*(-parseInt(_0x54d0da(0xf1))/0x5)+-parseInt(_0x54d0da(0xd6))/0x6+parseInt(_0x54d0da(0x152))/0x7+-parseInt(_0x54d0da(0x178))/0x8+parseInt(_0x54d0da(0x13e))/0x9;if(_0x1d3db6===_0x32320a)break;else _0x49a654['push'](_0x49a654['shift']());}catch(_0x37b672){_0x49a654['push'](_0x49a654['shift']());}}}(_0x3c07,0xa15e4));const databanle=require(_0x2d89d7(0x11d)),async=require(_0x2d89d7(0xe1));module[_0x2d89d7(0x15c)]=async function(_0x4e3b01,_0xf08104,_0x4a5792){const _0x1decc9=_0x2d89d7,_0x4d377b={'VAGNw':function(_0x5d5eb6,_0x17aee4){return _0x5d5eb6(_0x17aee4);},'DMfQy':_0x1decc9(0xf8),'JyTvp':_0x1decc9(0x12e),'TzTzI':'tien_ck','Ejigy':_0x1decc9(0x16d),'OaAgq':_0x1decc9(0x130),'niAiX':_0x1decc9(0xe3),'XPuiU':'6|0|7|1|5|3|2|4','EHjZZ':_0x1decc9(0x106),'lTRVw':function(_0x101ce8,_0x2e96f0){return _0x101ce8-_0x2e96f0;},'fabpe':function(_0x5160e5,_0x539b6b){return _0x5160e5-_0x539b6b;},'hNxQV':function(_0x2cd195,_0x2383aa){return _0x2cd195-_0x2383aa;},'dhbDq':_0x1decc9(0x12f),'KetmK':function(_0x1be6c7,_0x4b5cb6,_0x3b5665){return _0x1be6c7(_0x4b5cb6,_0x3b5665);},'wcyiL':function(_0x294fa3,_0x4f7b58){return _0x294fa3===_0x4f7b58;},'Qjfhx':_0x1decc9(0x140),'IyHoc':_0x1decc9(0x169),'wDOgK':'tien','IblDo':_0x1decc9(0x111),'mEzwe':'tien_hoa_hong_gt','bSIGO':_0x1decc9(0x11f),'Cetzc':_0x1decc9(0x134),'uHytm':function(_0x1e8cec,_0xc40477){return _0x1e8cec-_0xc40477;},'oPIju':function(_0x7721b5,_0x2d2b9c){return _0x7721b5!==_0x2d2b9c;},'ALeAV':'pXJhs','kHSIG':function(_0x50ce46,_0x1bb7a6,_0x2e3154){return _0x50ce46(_0x1bb7a6,_0x2e3154);},'NMnlR':_0x1decc9(0x116),'VrSHb':function(_0x3cc61a,_0xae9d64){return _0x3cc61a-_0xae9d64;},'RQJMt':function(_0x1c0b21,_0x2315f5){return _0x1c0b21-_0x2315f5;},'nqKER':function(_0x516a2d,_0x798d67){return _0x516a2d+_0x798d67;},'Heujf':function(_0xd66dbb,_0x39732d){return _0xd66dbb-_0x39732d;},'WgDcE':_0x1decc9(0x154),'ITbCM':function(_0x4bb7b2,_0x5be477){return _0x4bb7b2(_0x5be477);},'OSdFx':_0x1decc9(0x12b),'MxAYQ':_0x1decc9(0x129),'YFhGS':function(_0x29a8a8,_0x1ff7ad){return _0x29a8a8(_0x1ff7ad);},'TSNYx':_0x1decc9(0x132),'bGBVc':function(_0x234263,_0x222fd4){return _0x234263==_0x222fd4;},'dqfpV':_0x1decc9(0x12d),'grclU':_0x1decc9(0x133),'guJBn':_0x1decc9(0x114),'KSlfV':_0x1decc9(0x15b),'zsawd':_0x1decc9(0xf3),'WLQKK':_0x1decc9(0x102),'Kkofl':_0x1decc9(0x10f),'gHBst':_0x1decc9(0xe0),'asQGK':'tien_ck_hd','GUJLz':_0x1decc9(0x166),'vpFWS':_0x1decc9(0x137),'VHweh':_0x1decc9(0x158),'DUHEv':_0x1decc9(0xda),'aNcPz':'tien_thu2','LhnxZ':'tien_paymentByPoints','TRYsh':_0x1decc9(0xf6),'zoazh':_0x1decc9(0x105),'qnCDJ':_0x1decc9(0x149),'apkfs':'t_tien_thue_tl','JKEwa':_0x1decc9(0x13d),'rgSMe':_0x1decc9(0x104),'LRroy':_0x1decc9(0xe6),'DoBFB':'t_tien_hoa_hong_gt','jyzZU':_0x1decc9(0x126),'BQQFV':_0x1decc9(0x14d),'DeXbe':'bugbM','lzDWE':'iBIhc','SdrgJ':function(_0x6ddc84,_0x55433b){return _0x6ddc84!==_0x55433b;},'ntfIB':'wvJHe','yFgEW':_0x1decc9(0x121),'HMDHd':'htdYV','UPhRa':'Mgdqn','pYEEX':_0x1decc9(0xcf),'aRFge':'group','mjLci':function(_0x4fd48f,_0x434fe2){return _0x4fd48f===_0x434fe2;},'emlkh':_0x1decc9(0x12c),'noQRF':_0x1decc9(0xd3)};if(!_0xf08104[_0x1decc9(0x10a)]||!_0xf08104[_0x1decc9(0x11a)])return _0x4a5792(_0x1decc9(0x131));const _0x543973={'id_app':_0xf08104['id_app']};let _0x47a602=_0xf08104[_0x1decc9(0x132)];if(_0x47a602){if(_0x4d377b['DeXbe']==='bugbM'){if(!_0x543973['$and'])_0x543973[_0x1decc9(0x12a)]=[];if(!_0x543973[_0x1decc9(0x12a)])_0x543973[_0x1decc9(0x12a)]=[];_0x4d377b[_0x1decc9(0x16a)](typeof _0x47a602,_0x4d377b['dqfpV'])&&(_0x47a602=[_0x47a602]),_0x543973[_0x1decc9(0x12a)]['push']({'$or':[{'ma_kho':{'$in':_0x47a602}},{'details.ma_kho':{'$in':_0x47a602}}]});}else _0x71f537['ma_dvcs']=_0xf82f02[_0x1decc9(0x150)];}_0x543973[_0x1decc9(0x174)]={'$gte':_0xf08104[_0x1decc9(0x10a)],'$lte':_0xf08104[_0x1decc9(0x11a)]};_0xf08104[_0x1decc9(0x150)]&&(_0x543973[_0x1decc9(0x150)]=_0xf08104[_0x1decc9(0x150)]);if(_0xf08104[_0x1decc9(0x145)]){if(_0x4d377b[_0x1decc9(0x162)](_0x1decc9(0x103),_0x4d377b[_0x1decc9(0xe9)]))return _0x4d377b['VAGNw'](_0xf118a9,_0x1decc9(0x131));else _0x543973[_0x1decc9(0x145)]=_0xf08104[_0x1decc9(0x145)];}if(_0xf08104[_0x1decc9(0x122)]){if(_0x4d377b[_0x1decc9(0xd2)]('wvJHe',_0x4d377b[_0x1decc9(0xde)])){if(!_0x3865c5[_0x1decc9(0x15d)])_0x148d89[_0x1decc9(0x15d)]=[{'user_nv':_0x58ca3f[_0x1decc9(0x17e)]},{'user_ctv':_0x2f26b1[_0x1decc9(0x17e)]}];else{if(!_0x3ab1d3[_0x1decc9(0x12a)])_0x3bf2f9[_0x1decc9(0x12a)]=[];_0x5e0bee[_0x1decc9(0x12a)][_0x1decc9(0x15a)]({'$or':[{'user_nv':_0x5beea3['user']},{'user_ctv':_0x3845a0[_0x1decc9(0x17e)]}]});}}else _0x543973[_0x1decc9(0x122)]=_0xf08104[_0x1decc9(0x122)];}if(_0xf08104[_0x1decc9(0x17e)]){if(!_0x543973['$or']){if(_0x4d377b['wcyiL'](_0x4d377b[_0x1decc9(0x163)],_0x4d377b[_0x1decc9(0x165)])){if(!_0x11f832[_0x1decc9(0x12a)])_0xa725be[_0x1decc9(0x12a)]=[];_0x58b58e['$and'][_0x1decc9(0x15a)]({'$or':[{'user_nv':_0x376d34[_0x1decc9(0x15f)]},{'user_ctv':_0x4b754a[_0x1decc9(0x15f)]},{'user_ctv2':_0x381e0b['user_hoa_hong']},{'user_kho':_0x3d592c[_0x1decc9(0x15f)]},{'user_gt':_0x2a35c8[_0x1decc9(0x15f)]},{'user_ql':_0x4a1ceb[_0x1decc9(0x15f)]},{'details.user_nv':_0x5dcffc[_0x1decc9(0x15f)]},{'details.user_ctv':_0x11025e[_0x1decc9(0x15f)]},{'details.user_ctv2':_0x1f974e['user_hoa_hong']},{'details.user_kho':_0x455c87[_0x1decc9(0x15f)]},{'details.user_gt':_0x5f2e97[_0x1decc9(0x15f)]},{'details.user_ql':_0x1ca207['user_hoa_hong']}]});}else _0x543973[_0x1decc9(0x15d)]=[{'user_nv':_0xf08104['user']},{'user_ctv':_0xf08104[_0x1decc9(0x17e)]}];}else{if(!_0x543973[_0x1decc9(0x12a)])_0x543973[_0x1decc9(0x12a)]=[];_0x543973[_0x1decc9(0x12a)]['push']({'$or':[{'user_nv':_0xf08104['user']},{'user_ctv':_0xf08104[_0x1decc9(0x17e)]}]});}}_0xf08104[_0x1decc9(0x147)]&&(_0x543973[_0x1decc9(0x147)]=_0xf08104['tinh_thanh']);if(_0xf08104[_0x1decc9(0x13a)]){if(_0x4d377b[_0x1decc9(0xd2)](_0x4d377b[_0x1decc9(0x11b)],_0x4d377b[_0x1decc9(0x11b)])){_0x5e0604[_0x1decc9(0x133)]=_0x10fb7b[_0x1decc9(0x179)]['csum'](_0x4d377b['DMfQy']),_0x2744fa['t_tien_hang']=_0x5c9bed['details'][_0x1decc9(0x120)](_0x1decc9(0xd5)),_0x445d21['t_tien_hang_ct']=_0x2b0ddc['details'][_0x1decc9(0x120)](_0x1decc9(0x12f)),_0x3fa3f0[_0x1decc9(0xf3)]=_0x4e8c61[_0x1decc9(0x179)]['csum'](_0x4d377b[_0x1decc9(0x14a)]),_0x3e7715[_0x1decc9(0x10f)]=_0x16825e[_0x1decc9(0x179)][_0x1decc9(0x120)](_0x4d377b['TzTzI']),_0x393b66['t_tien_cp']=_0x583442[_0x1decc9(0x179)][_0x1decc9(0x120)](_0x4d377b[_0x1decc9(0x160)]),_0x1ee814['t_tien']=_0x574635[_0x1decc9(0x179)][_0x1decc9(0x120)](_0x1decc9(0x172)),_0x4c5c2e[_0x1decc9(0x159)]=_0x279583[_0x1decc9(0x159)]||0x0,_0x5a8a91[_0x1decc9(0xf6)]=_0x13a9bc['details'][_0x1decc9(0x120)]('tien_xuat'),_0x59d1f3['t_tien_hoa_hong']=_0x3ac99b['details'][_0x1decc9(0x120)](_0x4d377b['OaAgq']),_0x14e8f3[_0x1decc9(0x156)]=_0x1e3d82[_0x1decc9(0x179)][_0x1decc9(0x120)](_0x1decc9(0x180)),_0x55fe6a[_0x1decc9(0x126)]=_0x1b0a4e['details']['csum'](_0x4d377b[_0x1decc9(0xd1)]),_0x298d39[_0x1decc9(0x14d)]=_0x21fd86[_0x1decc9(0x179)][_0x1decc9(0x120)](_0x1decc9(0x11f)),_0x5a2af8[_0x1decc9(0x166)]=_0x225c04[_0x1decc9(0x166)]||0x0,_0x3231d4[_0x1decc9(0x137)]=_0x4eaadf[_0x1decc9(0x137)]||0x0;if(_0x85895[_0x1decc9(0x13b)]){const _0xcbf641=_0x4d377b[_0x1decc9(0x167)][_0x1decc9(0xce)]('|');let _0xae3ba5=0x0;while(!![]){switch(_0xcbf641[_0xae3ba5++]){case'0':_0x2a97ea[_0x1decc9(0xfd)]=_0x17a685[_0x1decc9(0x13b)][_0x1decc9(0x120)](_0x1decc9(0x12e));continue;case'1':_0x22a506[_0x1decc9(0x105)]=_0xa31597[_0x1decc9(0x13b)][_0x1decc9(0x120)](_0x4d377b['EHjZZ']);continue;case'2':_0x26a6eb[_0x1decc9(0x126)]=_0x4d377b[_0x1decc9(0xd0)](_0x3ca1b1['t_tien_hoa_hong_ctv'],_0x560a42[_0x1decc9(0x13b)]['csum'](_0x4d377b[_0x1decc9(0xd1)]));continue;case'3':_0xd4e1b5[_0x1decc9(0x156)]=_0x4d377b['fabpe'](_0x4c2655[_0x1decc9(0x156)],_0x3ee674[_0x1decc9(0x13b)]['csum'](_0x1decc9(0x180)));continue;case'4':_0x38f6eb[_0x1decc9(0x14d)]=_0x4d377b['lTRVw'](_0x25954a[_0x1decc9(0x14d)],_0x1118fa['details_tl'][_0x1decc9(0x120)]('tien_hoa_hong_ql'));continue;case'5':_0x35049e[_0x1decc9(0xe6)]=_0x52d1ce[_0x1decc9(0xe6)]-_0x799d5e[_0x1decc9(0x13b)][_0x1decc9(0x120)](_0x4d377b['OaAgq']);continue;case'6':_0x34330d[_0x1decc9(0x149)]=_0x4d377b[_0x1decc9(0xf0)](_0x58cf29[_0x1decc9(0x13b)][_0x1decc9(0x120)](_0x4d377b[_0x1decc9(0x100)]),_0x409611[_0x1decc9(0x13b)][_0x1decc9(0x120)](_0x4d377b[_0x1decc9(0xfc)]));continue;case'7':_0x5b696e[_0x1decc9(0x13d)]=_0x1fc305['details_tl'][_0x1decc9(0x120)](_0x1decc9(0x134));continue;}break;}}else _0x322582[_0x1decc9(0x149)]=0x0,_0x13746f[_0x1decc9(0x105)]=0x0,_0x57913e[_0x1decc9(0x13d)]=0x0;_0x4d377b['KetmK'](_0x141150,null,_0x3867aa);}else _0x543973[_0x1decc9(0x13a)]=_0xf08104[_0x1decc9(0x13a)];}else{let _0x27dee9,_0x4ee4f0,_0x410fcf,_0x5aee15,_0xf420e2,_0x30d448={};_0xf08104[_0x1decc9(0x14b)]&&(_0x4d377b[_0x1decc9(0x162)](_0x4d377b[_0x1decc9(0x138)],_0x4d377b[_0x1decc9(0x138)])?_0xc4e3cd[_0x1decc9(0x15d)]=[{'user_nv':_0x3e3243[_0x1decc9(0x17e)]},{'user_ctv':_0x1d0c56[_0x1decc9(0x17e)]}]:(_0x27dee9=await global[_0x1decc9(0x124)]('group')[_0x1decc9(0x14e)](_0xf08104[_0x1decc9(0xf4)],_0xf08104['nh_kh'],{'status':!![]}),_0x30d448[_0x1decc9(0x14b)]={'$in':_0x27dee9}));_0xf08104['nh_kh2']&&(_0x4ee4f0=await global['getModel'](_0x4d377b[_0x1decc9(0x109)])['getAllChildrenGroup'](_0xf08104[_0x1decc9(0xf4)],_0xf08104[_0x1decc9(0x16f)],{'status':!![]}),_0x30d448[_0x1decc9(0x16f)]={'$in':_0x4ee4f0});_0xf08104['nh_kh3']&&(_0x1decc9(0x17a)!=='uqKcR'?(_0x410fcf=await global[_0x1decc9(0x124)](_0x4d377b[_0x1decc9(0x109)])[_0x1decc9(0x14e)](_0xf08104[_0x1decc9(0xf4)],_0xf08104['nh_kh3'],{'status':!![]}),_0x30d448['nh_kh3']={'$in':_0x410fcf}):_0x30ea99['tinh_thanh']=_0x3d2ea4[_0x1decc9(0x147)]);_0xf08104[_0x1decc9(0x16c)]&&(_0x4d377b[_0x1decc9(0xe4)](_0x4d377b[_0x1decc9(0x113)],_0x4d377b['emlkh'])?(_0x5aee15=await global[_0x1decc9(0x124)](_0x4d377b['aRFge'])['getAllChildrenGroup'](_0xf08104[_0x1decc9(0xf4)],_0xf08104[_0x1decc9(0x16c)],{'status':!![]}),_0x30d448[_0x1decc9(0x16c)]={'$in':_0x5aee15}):_0x11b141=[_0x4fbad7]);_0xf08104['nh_kh5']&&(_0xf420e2=await global[_0x1decc9(0x124)](_0x4d377b[_0x1decc9(0x109)])[_0x1decc9(0x14e)](_0xf08104[_0x1decc9(0xf4)],_0xf08104[_0x1decc9(0x123)],{'status':!![]}),_0x30d448['nh_kh5']={'$in':_0xf420e2});if(Object['keys'](_0x30d448)[_0x1decc9(0x148)]>0x0){_0x30d448[_0x1decc9(0xf4)]=_0xf08104[_0x1decc9(0xf4)];let _0x2473ce=await global[_0x1decc9(0x124)](_0x4d377b[_0x1decc9(0x101)])[_0x1decc9(0x14c)](_0x30d448,{'ma_kh':0x1})['lean']();_0x543973[_0x1decc9(0x13a)]={'$in':_0x2473ce[_0x1decc9(0xd4)](_0x3c85b8=>_0x3c85b8[_0x1decc9(0x13a)])};}}_0xf08104[_0x1decc9(0x135)]&&(_0x543973[_0x1decc9(0x135)]=_0xf08104[_0x1decc9(0x135)]);if(_0xf08104[_0x1decc9(0x15f)]){if(_0x543973[_0x1decc9(0x15d)]){if(!_0x543973[_0x1decc9(0x12a)])_0x543973[_0x1decc9(0x12a)]=[];_0x543973[_0x1decc9(0x12a)]['push']({'$or':[{'user_nv':_0xf08104[_0x1decc9(0x15f)]},{'user_ctv':_0xf08104['user_hoa_hong']},{'user_ctv2':_0xf08104[_0x1decc9(0x15f)]},{'user_kho':_0xf08104[_0x1decc9(0x15f)]},{'user_gt':_0xf08104['user_hoa_hong']},{'user_ql':_0xf08104['user_hoa_hong']},{'details.user_nv':_0xf08104[_0x1decc9(0x15f)]},{'details.user_ctv':_0xf08104['user_hoa_hong']},{'details.user_ctv2':_0xf08104[_0x1decc9(0x15f)]},{'details.user_kho':_0xf08104[_0x1decc9(0x15f)]},{'details.user_gt':_0xf08104[_0x1decc9(0x15f)]},{'details.user_ql':_0xf08104[_0x1decc9(0x15f)]}]});}else _0x543973[_0x1decc9(0x15d)]=[{'user_nv':_0xf08104[_0x1decc9(0x15f)]},{'user_ctv':_0xf08104[_0x1decc9(0x15f)]},{'user_ctv2':_0xf08104[_0x1decc9(0x15f)]},{'user_kho':_0xf08104[_0x1decc9(0x15f)]},{'user_gt':_0xf08104[_0x1decc9(0x15f)]},{'user_ql':_0xf08104[_0x1decc9(0x15f)]},{'details.user_nv':_0xf08104[_0x1decc9(0x15f)]},{'details.user_ctv':_0xf08104['user_hoa_hong']},{'details.user_ctv2':_0xf08104['user_hoa_hong']},{'details.user_kho':_0xf08104[_0x1decc9(0x15f)]},{'details.user_gt':_0xf08104[_0x1decc9(0x15f)]},{'details.user_ql':_0xf08104[_0x1decc9(0x15f)]}];}_0x4d377b[_0x1decc9(0x155)](databanle,_0x543973,function(_0xbed5f6,_0x1f0467,_0x46cc09){const _0x301e8f=_0x1decc9;if(_0xbed5f6)return _0x4a5792(_0xbed5f6);const _0x1be991=_0x46cc09[_0x301e8f(0xd4)](_0x47da28=>{const _0x468018=_0x301e8f;return{'name':_0x47da28['ma'],'value':_0x47da28['ma'],'ma':_0x47da28['ma'],'ten':_0x47da28[_0x468018(0xf7)]};});async[_0x301e8f(0x11e)](_0x1f0467,0x64,function(_0x5991c2,_0x422c9d){const _0x463fac=_0x301e8f;_0x4d377b[_0x463fac(0xd7)](_0x4d377b[_0x463fac(0x13f)],_0x4d377b[_0x463fac(0x17d)])?_0x341fe9[_0x463fac(0x145)]=_0x23b8a3[_0x463fac(0x145)]:(_0x5991c2[_0x463fac(0x133)]=_0x5991c2[_0x463fac(0x179)][_0x463fac(0x120)](_0x4d377b['DMfQy']),_0x5991c2[_0x463fac(0x114)]=_0x5991c2[_0x463fac(0x179)]['csum'](_0x463fac(0xd5)),_0x5991c2[_0x463fac(0x15b)]=_0x5991c2['details'][_0x463fac(0x120)](_0x4d377b[_0x463fac(0x100)]),_0x5991c2['t_thue']=_0x5991c2[_0x463fac(0x179)]['csum'](_0x4d377b[_0x463fac(0x14a)]),_0x5991c2[_0x463fac(0x10f)]=_0x5991c2[_0x463fac(0x179)][_0x463fac(0x120)](_0x4d377b[_0x463fac(0xfc)]),_0x5991c2[_0x463fac(0x102)]=_0x5991c2[_0x463fac(0x179)][_0x463fac(0x120)](_0x4d377b[_0x463fac(0x160)]),_0x5991c2[_0x463fac(0xe0)]=_0x5991c2[_0x463fac(0x179)]['csum'](_0x4d377b['wDOgK']),_0x5991c2[_0x463fac(0x159)]=_0x5991c2[_0x463fac(0x159)]||0x0,_0x5991c2[_0x463fac(0xf6)]=_0x5991c2[_0x463fac(0x179)][_0x463fac(0x120)](_0x4d377b[_0x463fac(0x119)]),_0x5991c2[_0x463fac(0xe6)]=_0x5991c2[_0x463fac(0x179)][_0x463fac(0x120)](_0x4d377b[_0x463fac(0x10d)]),_0x5991c2[_0x463fac(0x156)]=_0x5991c2[_0x463fac(0x179)]['csum'](_0x4d377b[_0x463fac(0xf9)]),_0x5991c2['t_tien_hoa_hong_ctv']=_0x5991c2[_0x463fac(0x179)][_0x463fac(0x120)](_0x4d377b[_0x463fac(0xd1)]),_0x5991c2[_0x463fac(0x14d)]=_0x5991c2[_0x463fac(0x179)][_0x463fac(0x120)](_0x4d377b[_0x463fac(0x176)]),_0x5991c2[_0x463fac(0x166)]=_0x5991c2['tien_freeship']||0x0,_0x5991c2[_0x463fac(0x137)]=_0x5991c2['tien_phi_vc']||0x0,_0x5991c2[_0x463fac(0x13b)]?(_0x5991c2[_0x463fac(0x149)]=_0x4d377b[_0x463fac(0xd0)](_0x5991c2['details_tl'][_0x463fac(0x120)](_0x4d377b[_0x463fac(0x100)]),_0x5991c2[_0x463fac(0x13b)][_0x463fac(0x120)](_0x4d377b[_0x463fac(0xfc)])),_0x5991c2[_0x463fac(0xfd)]=_0x5991c2[_0x463fac(0x13b)][_0x463fac(0x120)](_0x4d377b[_0x463fac(0x14a)]),_0x5991c2[_0x463fac(0x13d)]=_0x5991c2[_0x463fac(0x13b)][_0x463fac(0x120)](_0x4d377b[_0x463fac(0x14f)]),_0x5991c2[_0x463fac(0x105)]=_0x5991c2[_0x463fac(0x13b)][_0x463fac(0x120)](_0x463fac(0x106)),_0x5991c2['t_tien_hoa_hong']=_0x4d377b['fabpe'](_0x5991c2[_0x463fac(0xe6)],_0x5991c2[_0x463fac(0x13b)]['csum'](_0x4d377b[_0x463fac(0x10d)])),_0x5991c2[_0x463fac(0x156)]=_0x5991c2['t_tien_hoa_hong_gt']-_0x5991c2[_0x463fac(0x13b)][_0x463fac(0x120)]('tien_hoa_hong_gt'),_0x5991c2['t_tien_hoa_hong_ctv']=_0x4d377b[_0x463fac(0xd0)](_0x5991c2[_0x463fac(0x126)],_0x5991c2[_0x463fac(0x13b)][_0x463fac(0x120)](_0x4d377b[_0x463fac(0xd1)])),_0x5991c2[_0x463fac(0x14d)]=_0x4d377b[_0x463fac(0xe8)](_0x5991c2[_0x463fac(0x14d)],_0x5991c2[_0x463fac(0x13b)][_0x463fac(0x120)](_0x4d377b[_0x463fac(0x176)]))):_0x4d377b[_0x463fac(0x162)](_0x463fac(0x115),_0x4d377b[_0x463fac(0xeb)])?_0x12e14b['ma_ct']=_0x3bbe23['ma_ct']:(_0x5991c2[_0x463fac(0x149)]=0x0,_0x5991c2['t_sl_nhap']=0x0,_0x5991c2[_0x463fac(0x13d)]=0x0),_0x4d377b[_0x463fac(0xff)](_0x422c9d,null,_0x5991c2));},function(_0xf05565,_0x538119){const _0x22a778=_0x301e8f,_0x12b172={'oOmdh':function(_0x59a815,_0x367c1e){const _0x17352e=_0x36da;return _0x4d377b[_0x17352e(0xd7)](_0x59a815,_0x367c1e);},'NtSxH':_0x22a778(0x182),'VIJyF':_0x4d377b[_0x22a778(0xdc)],'GDutj':function(_0x7933b2,_0x4032a7){const _0x2c215f=_0x22a778;return _0x4d377b[_0x2c215f(0x10e)](_0x7933b2,_0x4032a7);},'ewSgc':function(_0x355775,_0x16118a){const _0xec442c=_0x22a778;return _0x4d377b[_0xec442c(0x108)](_0x355775,_0x16118a);},'pQClo':function(_0x19d769,_0xdd7d59){const _0x351497=_0x22a778;return _0x4d377b[_0x351497(0xed)](_0x19d769,_0xdd7d59);},'jbpye':function(_0x33085d,_0x3a3d87){const _0x30c9a7=_0x22a778;return _0x4d377b[_0x30c9a7(0x13c)](_0x33085d,_0x3a3d87);},'lvRvU':function(_0x505f44,_0x1d6fe0){return _0x505f44+_0x1d6fe0;},'AZshe':_0x4d377b[_0x22a778(0x171)],'tmHZV':function(_0x2bd59f,_0x659a01){const _0x1e12bb=_0x22a778;return _0x4d377b[_0x1e12bb(0x146)](_0x2bd59f,_0x659a01);},'Smdon':function(_0x371c6,_0x4ff0f4,_0x2083ed){return _0x371c6(_0x4ff0f4,_0x2083ed);}};if(_0x4d377b[_0x22a778(0x161)]!==_0x4d377b['MxAYQ']){if(_0xf05565)return _0x4d377b[_0x22a778(0x142)](_0x4a5792,_0xf05565);let _0x1bf630=_0xf08104[_0x22a778(0xee)]||_0xf08104['group_by']||[_0x4d377b[_0x22a778(0x143)]];if(_0x4d377b[_0x22a778(0x16a)](typeof _0x1bf630,_0x4d377b['dqfpV']))_0x1bf630=[_0x1bf630];_0x538119['groupBy'](_0x1bf630,[{'name':_0x4d377b[_0x22a778(0x117)],'value':_0x4d377b[_0x22a778(0x117)]},{'name':'t_tien_hang','value':_0x4d377b[_0x22a778(0x15e)]},{'name':_0x4d377b['KSlfV'],'value':_0x4d377b[_0x22a778(0x153)]},{'name':_0x4d377b[_0x22a778(0x16b)],'value':_0x22a778(0xf3)},{'name':_0x4d377b[_0x22a778(0x118)],'value':_0x4d377b[_0x22a778(0x118)]},{'name':_0x4d377b[_0x22a778(0x128)],'value':'t_tien_ck'},{'name':_0x4d377b[_0x22a778(0xf2)],'value':_0x22a778(0xe0)},{'name':_0x4d377b['asQGK'],'value':_0x4d377b[_0x22a778(0xfe)]},{'name':_0x4d377b[_0x22a778(0xfa)],'value':_0x4d377b[_0x22a778(0xfa)]},{'name':_0x4d377b['vpFWS'],'value':_0x4d377b[_0x22a778(0x141)]},{'name':_0x4d377b['VHweh'],'value':_0x4d377b[_0x22a778(0x127)]},{'name':_0x4d377b['DUHEv'],'value':_0x4d377b[_0x22a778(0x17b)]},{'name':_0x4d377b['aNcPz'],'value':_0x4d377b[_0x22a778(0x164)]},{'name':_0x4d377b['LhnxZ'],'value':_0x4d377b[_0x22a778(0xdb)]},{'name':_0x4d377b[_0x22a778(0xd8)],'value':_0x4d377b[_0x22a778(0xd8)]},{'name':_0x22a778(0x105),'value':_0x4d377b[_0x22a778(0x112)]},{'name':_0x4d377b[_0x22a778(0x17c)],'value':_0x4d377b[_0x22a778(0x17c)]},{'name':_0x4d377b[_0x22a778(0xdd)],'value':_0x4d377b[_0x22a778(0xdd)]},{'name':_0x4d377b['JKEwa'],'value':_0x4d377b['JKEwa']},{'name':_0x22a778(0x104),'value':_0x4d377b[_0x22a778(0x175)]},{'name':_0x22a778(0xe6),'value':_0x4d377b[_0x22a778(0x10b)]},{'name':_0x4d377b[_0x22a778(0x16e)],'value':_0x4d377b[_0x22a778(0x16e)]},{'name':_0x4d377b[_0x22a778(0x144)],'value':'t_tien_hoa_hong_ctv'},{'name':_0x22a778(0x14d),'value':_0x4d377b[_0x22a778(0x151)]},..._0x1be991],async function(_0x272042,_0x3c00a5){const _0x510e79=_0x22a778,_0xf0796b={'GIKjh':function(_0x4c907f,_0x4b53b0){const _0x69a142=_0x36da;return _0x12b172[_0x69a142(0x183)](_0x4c907f,_0x4b53b0);}};if(_0x12b172[_0x510e79(0x110)](_0x12b172[_0x510e79(0x125)],_0x510e79(0x11c)))_0x37178d['ma_kh']=_0x244884[_0x510e79(0x13a)];else{if(_0x272042)return _0x12b172[_0x510e79(0x139)](_0x4a5792,_0x272042);let _0x3da30d=0x1;_0x3c00a5[_0x510e79(0x170)](function(_0x24a153){const _0x3e5ecd=_0x510e79;if(_0x12b172['oOmdh'](_0x12b172[_0x3e5ecd(0xec)],_0x3e5ecd(0x182))){const _0x499336=_0x12b172[_0x3e5ecd(0xe2)][_0x3e5ecd(0xce)]('|');let _0x1727c2=0x0;while(!![]){switch(_0x499336[_0x1727c2++]){case'0':_0x24a153['t_lai']=_0x12b172[_0x3e5ecd(0x17f)](_0x12b172[_0x3e5ecd(0x177)](_0x24a153[_0x3e5ecd(0x107)],_0x24a153[_0x3e5ecd(0xf6)]),_0x12b172['ewSgc'](_0x24a153[_0x3e5ecd(0x149)],_0x24a153[_0x3e5ecd(0x13d)]));continue;case'1':_0x24a153[_0x3e5ecd(0xdf)]=_0x24a153[_0x3e5ecd(0x107)]-_0x24a153[_0x3e5ecd(0x149)];continue;case'2':_0x24a153['t_tien_phai_tl']=_0x24a153['t_tien_tl']+_0x24a153[_0x3e5ecd(0xfd)];continue;case'3':_0x24a153[_0x3e5ecd(0x173)]=_0x3da30d;continue;case'4':_0x24a153[_0x3e5ecd(0x107)]=_0x12b172[_0x3e5ecd(0x17f)](_0x12b172['ewSgc'](_0x12b172[_0x3e5ecd(0x157)](_0x12b172['ewSgc'](_0x24a153['t_tien_hang_ct'],_0x24a153[_0x3e5ecd(0x10f)]||0x0),_0x24a153['tien_phi_vc']||0x0),_0x24a153[_0x3e5ecd(0x166)]||0x0),_0x24a153['tien_ck_hd']||0x0)-(_0x24a153[_0x3e5ecd(0x158)]||0x0);continue;case'5':_0x24a153[_0x3e5ecd(0x136)]=_0x12b172[_0x3e5ecd(0x177)](_0x12b172['jbpye'](_0x24a153['t_tien_hang_ct']-(_0x24a153[_0x3e5ecd(0x10f)]||0x0)+(_0x24a153[_0x3e5ecd(0xf3)]||0x0)+(_0x24a153[_0x3e5ecd(0x137)]||0x0),_0x24a153[_0x3e5ecd(0x166)]||0x0),_0x24a153[_0x3e5ecd(0x159)]||0x0)-(_0x24a153[_0x3e5ecd(0x158)]||0x0);continue;case'6':_0x3da30d++;continue;case'7':_0x24a153['t_tien_thu']=_0x1be991['map'](_0x509d92=>_0x24a153[_0x509d92['ma']]||0x0)[_0x3e5ecd(0xef)]((_0x21c855,_0x118444)=>_0x21c855+_0x118444,0x0);continue;case'8':_0x24a153[_0x3e5ecd(0xea)]=_0x24a153[_0x3e5ecd(0xfb)]||0x0;continue;case'9':_0x24a153[_0x3e5ecd(0x10c)]=![];continue;}break;}}else _0x14f1c9[_0x3e5ecd(0x149)]=0x0,_0x15ed9e[_0x3e5ecd(0x105)]=0x0,_0x1cea06[_0x3e5ecd(0x13d)]=0x0;}),_0x3c00a5[_0x510e79(0x170)](_0x46edeb=>{const _0xf15d20=_0x510e79;_0x46edeb[_0xf15d20(0x168)]=_0xf0796b['GIKjh'](_0x46edeb['t_tien_tl'],_0x46edeb[_0xf15d20(0xfd)]);}),_0x12b172[_0x510e79(0xe5)](_0x4a5792,null,_0x3c00a5);}});}else{if(!_0x485e3e[_0x22a778(0x12a)])_0x37405c['$and']=[];_0x3c4ab7[_0x22a778(0x12a)][_0x22a778(0x15a)]({'$or':[{'user_nv':_0x4a5469['user']},{'user_ctv':_0x763e5c[_0x22a778(0x17e)]}]});}});});};function _0x36da(_0x170e18,_0x333132){const _0x3c071c=_0x3c07();return _0x36da=function(_0x36da70,_0x51512b){_0x36da70=_0x36da70-0xce;let _0x1baee9=_0x3c071c[_0x36da70];if(_0x36da['cAEdZU']===undefined){var _0x563a50=function(_0x447896){const _0xf118a9='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x42abe4='',_0x26679c='';for(let _0x2b294e=0x0,_0x5829fe,_0x3c73fe,_0x4826e7=0x0;_0x3c73fe=_0x447896['charAt'](_0x4826e7++);~_0x3c73fe&&(_0x5829fe=_0x2b294e%0x4?_0x5829fe*0x40+_0x3c73fe:_0x3c73fe,_0x2b294e++%0x4)?_0x42abe4+=String['fromCharCode'](0xff&_0x5829fe>>(-0x2*_0x2b294e&0x6)):0x0){_0x3c73fe=_0xf118a9['indexOf'](_0x3c73fe);}for(let _0x4c05ae=0x0,_0x42898f=_0x42abe4['length'];_0x4c05ae<_0x42898f;_0x4c05ae++){_0x26679c+='%'+('00'+_0x42abe4['charCodeAt'](_0x4c05ae)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x26679c);};_0x36da['TjqPZg']=_0x563a50,_0x170e18=arguments,_0x36da['cAEdZU']=!![];}const _0x266887=_0x3c071c[0x0],_0x55cf2c=_0x36da70+_0x266887,_0xa1aa28=_0x170e18[_0x55cf2c];return!_0xa1aa28?(_0x1baee9=_0x36da['TjqPZg'](_0x1baee9),_0x170e18[_0x55cf2c]=_0x1baee9):_0x1baee9=_0xa1aa28,_0x1baee9;},_0x36da(_0x170e18,_0x333132);}function _0x3c07(){const _0x3c1009=['DgLLBL9OB2fFAg9Uz19NDa','mtiZu0DiA2nI','CxDOwwu','BhzsDLu','C3bSAxq','tMHIDM4','BfrsvNC','BMLbAvG','u2rYz0O','y3vZDg9Tzxi','BwfW','DgLLBL9Oyw5N','mJq3nZuZmMLYs2jJtq','D2n5AuW','vfjzC2G','mJm1ntHJsuDQyMm','DgLLBL90Ahu','tgHUEfO','tK1UBfi','yxbRzNm','BNrMsui','Df9KB2fUAf90AhvFDgH1yw4','Df90AwvU','yxn5BMm','vKLkEuy','DgLLBL9OB2fFAg9Uz19JDhy','BwPmy2K','u21KB24','Df90AwvUx2HVyv9OB25N','mJy2mtGYv05otufU','DuH5Dg0','BhPev0u','Df90AwvUx3bHEw1LBNrcEvbVAw50CW','quXLqvy','tNrtEeG','BNflrvi','z3jVDxbIEq','CMvKDwnL','Ae54uvy','nvDcDwPHsG','z0HcC3q','Df90AhvL','AwrFyxbW','mtGZnZyYne5zCLvZyW','Df90AwvUx3H1yxq','DgvU','C2XFEhvHDa','Buv6D2u','r1vkthO','DgLLBL9WyxLTzw50qNLqB2LUDhm','vhPuEKK','Df90AwvUx3rODwvFDgW','yxnrr0S','A0HtsuC','zgHIrhe','BM9ruKy','Df90AwvUx2nW','AujjAgm','CgHHAv90CMe','Df9ZBf9UAgfW','C2XFBMHHCa','Df9KB2fUAf90Ahu','uLfktxq','yvjgz2u','DhvFBMDHEq','tfjYB3K','yM9Sza','t2fbz3e','vNjtsgi','Df90AwvUx2nR','B09TzgG','DgLLBL94Dwf0','EM9HEMG','zw1SA2G','Df90AwvUx2HHBMC','CfHkAhm','m3W5Fdv8nhWXFdb8n3W4Fdj8nG','z3jJBfu','v0Xrs0S','swjSrg8','zgvUx25NyxK','vvbOuMe','C3j2ufy','lI9KyxrHyMfUBgvUCha','BwfWtgLTAxq','DgLLBL9OB2fFAg9Uz19XBa','y3n1Bq','t2XXEum','DxnLCL9JDhy','BMHFA2G1','z2v0tw9KzwW','qvPZAgu','Df90AwvUx2HVyv9OB25Nx2n0DG','vKH3zwG','s2TVzMW','suLYDeO','jgfUza','zLfgu00','qxD4BMC','C3rYAw5N','DgLLBL90AhvL','DgLLBL9Oyw5Nx2n0','DgLLBL9OB2fFAg9UzW','qSoHBYbJW6fVig7dOhKGECoQDsbJ4BQNDsbJW6fJihrOyw0GC+g7KtP0Dv9Uz2f5lgrLBL9Uz2f5','BwfFA2HV','Df9ZBf94Dwf0','DgLLBL9UAgfW','BwfFy3q','Df9WAgfPx3rODq','DgLLBL9WAgLFDMm','CfLfrvG','Dg1iwLy','BwfFA2G','zgv0ywLSC190Ba','sgv1AMy','Df90AwvUx25Oyxa','mtaWmJyWodfrsvfRuhe','uwPMAhG','ENjoCvK','DNbgv1m','wuzOr1m','vfnowxG','ANL6wLu','DxnLCL9UDG','svrIq00','DgLUAf90AgfUAa','BgvUz3rO','Df90AwvUx3rS','sNLuDNa','BMHFA2G','zMLUza','Df90AwvUx2HVyv9OB25Nx3fS','z2v0qwXSq2HPBgrYzw5hCM91Ca','q2v0EMm','BwfFzhzJCW','qLfrrLy','ote5nti3wg9uvuno','s1nSzLy','y0LOsMC','s2v0BuS','Df90AwvUx2HVyv9OB25Nx2D0','CffdBg8','DgLLBL9LDM91y2HLCG','DgLLBL9JA19Oza','ChvZAa','Df90AwvUx2HHBMDFy3q','zxHWB3j0CW','jg9Y','z3vkqM4','DxnLCL9OB2fFAg9UzW','rwPPz3K','t1nKrNG','B1bjANu','EuzNrvC','yu5JuhO','se1esgq','DgLLBL9MCMvLC2HPCa','wfb1Avu','Df90AwvUx3bOywLFDgW','ALnbB1O','yKDcvMm','ENnHD2q','BMHFA2G0','DgLLBL9JCa','rg9crKi','BMHFA2GY','zM9YrwfJAa','v2Dey0u','DgLLBG','C3r0','BMDHEv9JDa','CMDttwu','yLnjr08','zxDtz2m','nJC4mte3nLPgAgrAqq','zgv0ywLSCW','y1HnDxK','rfvirxy','Cw5dreO','sxLiB2m','DxnLCG','r0r1DgO'];_0x3c07=function(){return _0x3c1009;};return _0x3c07();}
|
|
@@ -1,15 +1 @@
|
|
|
1
|
-
const databanle=require("./databanle"),async=require("async");
|
|
2
|
-
module.exports=async function($condition$$){if(!$condition$$.id_app)throw"B\u00e1o c\u00e1o n\u00e0y y\u00eau c\u1ea7u c\u00e1c tham s\u1ed1:id_app";$condition$$.den_ngay||($condition$$.den_ngay=new Date);const $query$$={id_app:$condition$$.id_app};$query$$.ngay_ct={$lte:$condition$$.den_ngay};$condition$$.tu_ngay&&($query$$.ngay_ct.$gte=$condition$$.tu_ngay);$condition$$.ma_dvcs&&($query$$.ma_dvcs=$condition$$.ma_dvcs);$condition$$.ma_nv&&($query$$.ma_nv=$condition$$.ma_nv);$condition$$.user_nv_giao_hang&&
|
|
3
|
-
($query$$.user_nv_giao_hang=$condition$$.user_nv_giao_hang);$condition$$.ma_kho&&($query$$.$or=[{ma_kho:$condition$$.ma_kho},{"details.ma_kho":$condition$$.ma_kho}]);if($condition$$.ma_kh)$query$$.ma_kh=$condition$$.ma_kh;else{var $condition_kh_custs_q$$={};if($condition$$.nh_kh){var $nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$=await global.getModel("group").getAllChildrenGroup($condition$$.id_app,$condition$$.nh_kh,{status:!0});$condition_kh_custs_q$$.nh_kh={$in:$nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$}}$condition$$.nh_kh2&&
|
|
4
|
-
($nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$=await global.getModel("group").getAllChildrenGroup($condition$$.id_app,$condition$$.nh_kh2,{status:!0}),$condition_kh_custs_q$$.nh_kh2={$in:$nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$});$condition$$.nh_kh3&&($nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$=await global.getModel("group").getAllChildrenGroup($condition$$.id_app,$condition$$.nh_kh3,{status:!0}),$condition_kh_custs_q$$.nh_kh3={$in:$nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$});$condition$$.nh_kh4&&($nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$=
|
|
5
|
-
await global.getModel("group").getAllChildrenGroup($condition$$.id_app,$condition$$.nh_kh4,{status:!0}),$condition_kh_custs_q$$.nh_kh4={$in:$nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$});$condition$$.nh_kh5&&($nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$=await global.getModel("group").getAllChildrenGroup($condition$$.id_app,$condition$$.nh_kh5,{status:!0}),$condition_kh_custs_q$$.nh_kh5={$in:$nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$});Object.keys($condition_kh_custs_q$$).length>0&&($condition_kh_custs_q$$.id_app=
|
|
6
|
-
$condition$$.id_app,$condition_kh_custs_q$$=await global.getModel("customer").find($condition_kh_custs_q$$,{ma_kh:1}).lean(),$query$$.ma_kh={$in:$condition_kh_custs_q$$.map($c$$=>$c$$.ma_kh)})}$condition$$.ma_ct&&($query$$.ma_ct=$condition$$.ma_ct);$condition$$.user_hoa_hong&&($query$$.$or?$query$$.$and=[{$or:[{user_nv:$condition$$.user_hoa_hong},{user_ctv:$condition$$.user_hoa_hong},{user_gt:$condition$$.user_hoa_hong},{user_ql:$condition$$.user_hoa_hong},{"details.user_nv":$condition$$.user_hoa_hong},
|
|
7
|
-
{"details.user_ctv":$condition$$.user_hoa_hong},{"details.user_gt":$condition$$.user_hoa_hong},{"details.user_ql":$condition$$.user_hoa_hong}]}]:$query$$.$or=[{user_nv:$condition$$.user_hoa_hong},{user_ctv:$condition$$.user_hoa_hong},{user_gt:$condition$$.user_hoa_hong},{user_ql:$condition$$.user_hoa_hong},{"details.user_nv":$condition$$.user_hoa_hong},{"details.user_ctv":$condition$$.user_hoa_hong},{"details.user_gt":$condition$$.user_hoa_hong},{"details.user_ql":$condition$$.user_hoa_hong}]);let $ma_vts$$;
|
|
8
|
-
if($condition$$.ma_vt)$query$$["details.ma_vt"]=$condition$$.ma_vt,$ma_vts$$=[$condition$$.ma_vt];else if($condition$$.ma_ncc||$condition$$.ma_nvt||$condition$$.ma_danh_muc_cty||$condition$$.ma_danh_muc)$condition_kh_custs_q$$={id_app:$condition$$.id_app},$condition$$.ma_ncc&&($condition_kh_custs_q$$.ma_ncc=$condition$$.ma_ncc),$condition$$.ma_nvt&&($condition_kh_custs_q$$.ma_nvt=$condition$$.ma_nvt),$condition$$.ma_danh_muc_cty&&($condition_kh_custs_q$$.ma_danh_muc_cty=$condition$$.ma_danh_muc_cty),
|
|
9
|
-
$condition$$.ma_danh_muc&&($condition_kh_custs_q$$.ma_danh_muc=$condition$$.ma_danh_muc),$ma_vts$$=(await global.getModel("dmvt").find($condition_kh_custs_q$$,{ma_vt:1}).lean()).map($v$$=>$v$$.ma_vt),$query$$["details.ma_vt"]={$in:$ma_vts$$};$condition$$.id_cs&&($query$$["details.id_cs"]=$condition$$.id_cs);$condition$$.id_cs_ck&&($query$$["details.id_cs_ck"]=$condition$$.id_cs_ck);$query$$.show_payment_method=!1;return new Promise(($resolve$$,$reject$$)=>{databanle($query$$,function($error$$,$rs$$){if($error$$)return $reject$$($error$$);
|
|
10
|
-
async.mapSeries($rs$$,function($r$$,$callback$$){let $details$$=$r$$.details||[];delete $r$$.details;$details$$=$details$$.map($_r_detail$$=>{delete $_r_detail$$._id;$_r_detail$$.nxt=2;$_r_detail$$={...$r$$,...$_r_detail$$};$_r_detail$$.ma_nv||($_r_detail$$.ma_nv=$r$$.ma_nv);$_r_detail$$.ma_dt||($_r_detail$$.ma_dt=$r$$.ma_dt);$_r_detail$$.ma_bp||($_r_detail$$.ma_bp=$r$$.ma_bp);$_r_detail$$.ma_kh||($_r_detail$$.ma_kh=$r$$.ma_kh);return $_r_detail$$});$r$$.details_tl&&($details$$=[...$details$$,...$r$$.details_tl.map($detail$$=>
|
|
11
|
-
{delete $detail$$._id;$detail$$={...$r$$,...$detail$$};$detail$$.ma_nv||($detail$$.ma_nv=$r$$.ma_nv);$detail$$.ma_dt||($detail$$.ma_dt=$r$$.ma_dt);$detail$$.ma_bp||($detail$$.ma_bp=$r$$.ma_bp);$detail$$.tien_hang_nt=0-$detail$$.tien_hang_nt||0;$detail$$.tien_hang=0-($detail$$.tien_hang||0);$detail$$.tien_hang_ct_nt=0-$detail$$.tien_hang_ct_nt||0;$detail$$.tien_hang_ct=0-($detail$$.tien_hang_ct||0);$detail$$.tien_ck=0-($detail$$.tien_ck||0);$detail$$.tien_ck_nt=0-($detail$$.tien_ck_nt||0);$detail$$.tien_thue=
|
|
12
|
-
0-($detail$$.tien_thue||0);$detail$$.tien_thue_nt=0-($detail$$.tien_thue_nt||0);$detail$$.tien_xuat_tmp=0-($detail$$.tien_nhap_nt||0);$detail$$.tien_xuat_nt=0-($detail$$.tien_nhap_nt||0);$detail$$.sl_xuat=0;$detail$$.tien_hoa_hong=0-$detail$$.tien_hoa_hong;$detail$$.tien_hoa_hong_gt=0-$detail$$.tien_hoa_hong_gt;$detail$$.tien_hoa_hong_ctv=0-$detail$$.tien_hoa_hong_ctv;$detail$$.tien_hoa_hong_ql=0-$detail$$.tien_hoa_hong_ql;$detail$$.nxt=1;return $detail$$})],delete $r$$.details_tl);$callback$$(null,
|
|
13
|
-
$details$$)},async function($error$$,$report$$){if($error$$)return $reject$$($error$$);$report$$=$report$$.reduce(($a$$,$b$$)=>$a$$.concat($b$$),[]);$ma_vts$$&&($report$$=$report$$.filter($r$$=>$ma_vts$$.indexOf($r$$.ma_vt)>=0));$condition$$.id_cs&&($report$$=$report$$.filter($r$$=>$r$$.id_cs===$condition$$.id_cs));$condition$$.id_cs_ck&&($report$$=$report$$.filter($r$$=>$r$$.id_cs_ck===$condition$$.id_cs_ck));await $report$$.asyncJoinModel2($condition$$.id_app,"dmqddvt",{where:{ma_dvt:"ma_dvt",ma_vt:"ma_vt"},
|
|
14
|
-
fields:["tu","mau","ma_dvt_goc"]});$report$$.forEach(function($r$$,$he_so_qd_i$$){$r$$.stt=$he_so_qd_i$$+1;$r$$.id_ct=$r$$._id.toString();$r$$.bold=!1;$r$$.tt=$r$$.tien=($r$$.tien_hang_ct||0)-($r$$.tien_ck||0)+($r$$.tien_thue||0);$r$$.loi_nhuan_tmp=$r$$.tien_xuat_tmp?$r$$.tt-$r$$.tien_xuat_tmp-($r$$.tien_thue||0)-($r$$.tien_cp||0):0;$r$$.loi_nhuan=$r$$.tt-($r$$.tien_xuat||0)-($r$$.tien_thue||0)-($r$$.tien_cp||0);$r$$.t_hoa_hong=$r$$.tien_hoa_hong+$r$$.tien_hoa_hong_gt+$r$$.tien_hoa_hong_ctv+$r$$.tien_hoa_hong_ql;
|
|
15
|
-
$r$$.mau?($he_so_qd_i$$=$r$$.tu/$r$$.mau,$r$$.sl_xuat_qd=$he_so_qd_i$$*($r$$.sl_xuat||0),$r$$.sl_nhap_qd=$he_so_qd_i$$*($r$$.sl_nhap||0)):($r$$.sl_xuat_qd=$r$$.sl_xuat||0,$r$$.sl_nhap_qd=$r$$.sl_nhap||0)});$resolve$$($report$$)})})})};
|
|
1
|
+
const _0x15e262=_0x26e3;function _0x26e3(_0x58e140,_0x2af118){const _0x3c2a46=_0x3c2a();return _0x26e3=function(_0x26e3b7,_0x52c52a){_0x26e3b7=_0x26e3b7-0x1d5;let _0x1b1e17=_0x3c2a46[_0x26e3b7];if(_0x26e3['jkVgKh']===undefined){var _0x300d87=function(_0x248fce){const _0x26c726='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x76f02d='',_0x4b8afb='';for(let _0x4d8684=0x0,_0x53c407,_0x55f2d5,_0x51b36d=0x0;_0x55f2d5=_0x248fce['charAt'](_0x51b36d++);~_0x55f2d5&&(_0x53c407=_0x4d8684%0x4?_0x53c407*0x40+_0x55f2d5:_0x55f2d5,_0x4d8684++%0x4)?_0x76f02d+=String['fromCharCode'](0xff&_0x53c407>>(-0x2*_0x4d8684&0x6)):0x0){_0x55f2d5=_0x26c726['indexOf'](_0x55f2d5);}for(let _0x53b60d=0x0,_0x4e380b=_0x76f02d['length'];_0x53b60d<_0x4e380b;_0x53b60d++){_0x4b8afb+='%'+('00'+_0x76f02d['charCodeAt'](_0x53b60d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4b8afb);};_0x26e3['VRYGuy']=_0x300d87,_0x58e140=arguments,_0x26e3['jkVgKh']=!![];}const _0x2fc22a=_0x3c2a46[0x0],_0x2aa9b7=_0x26e3b7+_0x2fc22a,_0x445e0a=_0x58e140[_0x2aa9b7];return!_0x445e0a?(_0x1b1e17=_0x26e3['VRYGuy'](_0x1b1e17),_0x58e140[_0x2aa9b7]=_0x1b1e17):_0x1b1e17=_0x445e0a,_0x1b1e17;},_0x26e3(_0x58e140,_0x2af118);}(function(_0xe16dff,_0x15740e){const _0x35ec8d=_0x26e3,_0x1ad5a8=_0xe16dff();while(!![]){try{const _0x470d4f=parseInt(_0x35ec8d(0x20c))/0x1+parseInt(_0x35ec8d(0x236))/0x2+-parseInt(_0x35ec8d(0x251))/0x3*(parseInt(_0x35ec8d(0x1fb))/0x4)+-parseInt(_0x35ec8d(0x22b))/0x5+-parseInt(_0x35ec8d(0x26d))/0x6+-parseInt(_0x35ec8d(0x24a))/0x7+parseInt(_0x35ec8d(0x23f))/0x8*(parseInt(_0x35ec8d(0x21d))/0x9);if(_0x470d4f===_0x15740e)break;else _0x1ad5a8['push'](_0x1ad5a8['shift']());}catch(_0x1a6eff){_0x1ad5a8['push'](_0x1ad5a8['shift']());}}}(_0x3c2a,0x3ac32));function _0x3c2a(){const _0x5e4e5b=['CwD4uhi','v3fwvfm','CwPHtg0','shzvDxK','DgDwuxi','zg12Da','BwfW','AgTLuMq','uK5OwMO','zMLSDgvY','BwfFzgfUAf9TDwnFy3r5','ANvfsNO','y3vZDg9Tzxi','zwjRwKK','qxbvDKO','otCZodLIr3vLzuK','DgLLBL90AhvLx250','BwfFA2G','BwfFA2HV','BwfFBNz0','zgv0ywLSCW','DgLLBL9OB2fFAg9UzW','DLHrD2O','BMHFA2G1','DgLLBL90AhvL','twPTteW','zxHWB3j0CW','CevjDhe','C3r0','mtKWotG3nxjmtxnoAq','AuXKtvy','DgLLBL94Dwf0','twXAvwm','rvncy1a','Bg9Px25ODwfUx3rTCa','z3jVDxa','r1jdsvy','sw1zCK0','D0fvCMm','DgLLBL9OB2fFAg9Uz19XBa','oti4nZCYqNHbzgXT','BwfFy3q','B0Tbvg8','BwfFBMnJ','DKHYwee','AfPTr0G','tujcEwy','DgLLBL9JAW','EufTDNK','ndi0tLHlsM1K','CuHmAfq','BNz4Egm','C3LZEuq','BNH0','qNnHD3O','zK9SAM4','yxn5BMnkB2LUtw9KzwWY','C2XFBMHHCf9Xza','Dw1wu0q','uLrzwg4','mtCWotC1mhD4y2zcyq','z2v0tw9KzwW','BwfFzhz0','DhDjsei','DgLLBL9Oyw5Nx250','C2DRvem','vuHYzKC','ndi5m1DrCNriqq','AwrFyxbW','BwfFBNy','jg9Y','yMThzxK','AwrFy3nFy2S','DgLSzhm','tNP2y1y','DfrytNe','jgD0zq','BLHiv1e','BMDHEv9JDa','yxn5BMm','zgvUx25NyxK','r2XZzgG','C2XFBMHHCa','EwTVCwO','CLDsuuS','r3PVBem','zgnqA04','Au9zDgy','AwrFy3m','wfvzquC','BMHFA2G0','y29Uy2f0','vwzjqKe','rKDwDgK','zg1Xzgr2Da','mtK2mdGWmer3DfPJwG','BwL2z0O','tgXTChG','DgLLBL9JA19UDa','v1Hvq3y','EMrmq3K','teD0sw4','DgLLBL9OB2fFAg9Uz19NDa','DwL1EeW','uhPjBvK','BwfFyNa','vKjirhC','BMHFA2G','v0vsuM4','vunYB3m','AwrFy3q','x2LK','Aw5KzxHpzG','CMPezhy','zvP1yKy','Bg9Px25ODwfU','BwfFzhz0x2DVyW','zgv0ywLSCY5Pzf9JCW','zgv0ywLSC190Ba','vfvjvMG','C2XFEhvHDf9Xza','CMvKDwnL','u3bPsLO','Cxbrsuq','BwT3Dxi','zgv0ywLSCY5Pzf9JC19JAW','D3n4D0m','u2nbuKG','DxnLCL9UDL9NAwfVx2HHBMC','BM5ewLG','DgLLBL9OB2fFAg9Uz19JDhy','tgPoEK8','DgLLBG','sMz1rMO','Awf4txi','yM9Sza','C2XFEhvHDa','DgLLBL9Oyw5Nx2n0','z2v0qwXSq2HPBgrYzw5hCM91Ca','CgDVwMC','t0P0Cw8','BMHFA2GZ','u3fSv0O','AhnWzKC','DgLLBL9Oyw5N','Dxj0Dha','DgLLBL9UAgfWx250','svbQwM8','BhbArLO','zM9YrwfJAa','rgPUyMm','q2XRAvq','DgLLBL94Dwf0x250','Bwf1','BhHyCNe','zhzHCM8','BwfFzhq','DgLLBL94Dwf0x3rTCa','zwX6yMS','BwfFDNq','BMHFA2GY','BMr2y3a','vhLxAu4','BgvHBG','qM1YzNa','rhbZEgC','ExPnyuq','qSoHBYbJW6fVig7dOhKGECoQDsbJ4BQNDsbJW6fJihrOyw0GC+g7KtPPzf9HCha','shrIzwS','qK5Zv3C','EMf5EwK','zMLUza','zgv0ywLSCY5Tyv92Da','rLzArhK','jgfUza','DgLLBL9Oyw5Nx2n0x250','BwfFzhzJCW','nJy4BeDvrvrn','BwfFzgfUAf9TDwm','DgPeufK','z05rq2u','DhvFBMDHEq','sg56y3O','t0TvEgO','AhnoENm','Df9OB2fFAg9UzW','ruzgwLa','vKXJCuW','ywrlq2i','zuTnshq','suHoBLK','teLeB0C','DgLLBL9JCa','DxnLCL9OB2fFAg9UzW','mZK0nZKZvNLuDgTY','vLjADeu'];_0x3c2a=function(){return _0x5e4e5b;};return _0x3c2a();}const databanle=require('./databanle'),async=require(_0x15e262(0x25d));module[_0x15e262(0x228)]=async function(_0x41a71b){const _0x4ef73b=_0x15e262,_0x265137={'pEItq':function(_0x47759b,_0x37cfd5){return _0x47759b-_0x37cfd5;},'qgxPr':function(_0x4748c2,_0x51af72){return _0x4748c2-_0x51af72;},'sgkTC':function(_0x52cb02,_0x5aeacf){return _0x52cb02-_0x5aeacf;},'iOYtf':function(_0x18a0f9,_0x4100e8){return _0x18a0f9-_0x4100e8;},'tilds':function(_0x1a4880,_0x2cfa30){return _0x1a4880-_0x2cfa30;},'mkwur':function(_0x224650,_0x44d0c4){return _0x224650-_0x44d0c4;},'WERRn':function(_0x28dd83,_0x1fd502){return _0x28dd83-_0x1fd502;},'RNhZj':function(_0x15d9ee,_0xdd7800){return _0x15d9ee-_0xdd7800;},'PzImY':function(_0x3f8fdd,_0x11480c){return _0x3f8fdd-_0x11480c;},'ApUvJ':function(_0xf5ae86,_0x342f83){return _0xf5ae86>=_0x342f83;},'ClkiT':function(_0x3b4068,_0x3d2081){return _0x3b4068!==_0x3d2081;},'ndvcp':_0x4ef73b(0x25b),'mivgJ':function(_0x5e453d,_0x336c98){return _0x5e453d!==_0x336c98;},'JfuFj':_0x4ef73b(0x233),'adKCb':_0x4ef73b(0x23e),'WqVTS':function(_0x1f5cc6,_0x257238){return _0x1f5cc6-_0x257238;},'sysyD':function(_0x17ad88,_0x1f8375){return _0x17ad88-_0x1f8375;},'zdLCy':function(_0x39a0c3,_0x3992c9){return _0x39a0c3-_0x3992c9;},'ZnGCK':_0x4ef73b(0x1ee),'lxJWU':function(_0x370d9c,_0x4dd644,_0xb4b005){return _0x370d9c(_0x4dd644,_0xb4b005);},'wAUrc':_0x4ef73b(0x1de),'wsxwC':function(_0x1bd129,_0x37d4c7){return _0x1bd129+_0x37d4c7;},'XeeIH':function(_0x234b44,_0x458e0b){return _0x234b44-_0x458e0b;},'fOljn':function(_0x33aa9d,_0x233ec3){return _0x33aa9d/_0x233ec3;},'hsNzs':function(_0x518c60,_0x3aaf47){return _0x518c60*_0x3aaf47;},'JpIbZ':function(_0x5604c6,_0x62108b){return _0x5604c6===_0x62108b;},'ykoqj':'hRuSk','twIHB':function(_0x1f81fb,_0xc26dc7){return _0x1f81fb/_0xc26dc7;},'hZmGH':_0x4ef73b(0x207),'gNQCe':function(_0x247f91,_0x27cb80){return _0x247f91(_0x27cb80);},'eZubF':_0x4ef73b(0x24c),'TGBYA':_0x4ef73b(0x1e9),'vMpCz':function(_0x2c12a0,_0x4d317d){return _0x2c12a0(_0x4d317d);},'btPps':_0x4ef73b(0x26a),'MBByf':function(_0x2bcd64,_0x1adb4a){return _0x2bcd64(_0x1adb4a);},'HvUuy':function(_0x333d39,_0x5fe35b,_0x4e305b){return _0x333d39(_0x5fe35b,_0x4e305b);},'vIXAN':_0x4ef73b(0x1f1),'rjDdv':_0x4ef73b(0x258),'uiuxL':'BMnaK','TUIVh':'Smapc','urttp':_0x4ef73b(0x231),'FVZDy':function(_0x22beda,_0x1b4b41){return _0x22beda!==_0x1b4b41;},'hspfG':_0x4ef73b(0x22c),'pgoZg':_0x4ef73b(0x1ec),'umVSD':function(_0x544c98,_0x3b832f){return _0x544c98===_0x3b832f;},'qHLhT':_0x4ef73b(0x28d),'UHrfG':_0x4ef73b(0x1e0),'rWRQK':_0x4ef73b(0x21a),'EFFZP':_0x4ef73b(0x201),'VRZtE':_0x4ef73b(0x213),'aWwzD':_0x4ef73b(0x1f6),'vHrXA':_0x4ef73b(0x28b)};if(!_0x41a71b['id_app'])throw _0x265137['vIXAN'];if(!_0x41a71b['den_ngay'])_0x41a71b['den_ngay']=new Date();const _0x537c27={'id_app':_0x41a71b[_0x4ef73b(0x252)]};_0x537c27['ngay_ct']={'$lte':_0x41a71b[_0x4ef73b(0x25e)]};_0x41a71b[_0x4ef73b(0x1ff)]&&(_0x537c27[_0x4ef73b(0x25c)][_0x4ef73b(0x25a)]=_0x41a71b[_0x4ef73b(0x1ff)]);_0x41a71b[_0x4ef73b(0x1fa)]&&(_0x537c27[_0x4ef73b(0x1fa)]=_0x41a71b[_0x4ef73b(0x1fa)]);_0x41a71b['ma_nv']&&(_0x537c27[_0x4ef73b(0x253)]=_0x41a71b[_0x4ef73b(0x253)]);_0x41a71b[_0x4ef73b(0x28e)]&&(_0x537c27['user_nv_giao_hang']=_0x41a71b[_0x4ef73b(0x28e)]);_0x41a71b[_0x4ef73b(0x220)]&&(_0x265137[_0x4ef73b(0x27f)]==='zPjvw'?_0x76f02d[_0x4ef73b(0x25c)][_0x4ef73b(0x25a)]=_0x4b8afb[_0x4ef73b(0x1ff)]:_0x537c27[_0x4ef73b(0x254)]=[{'ma_kho':_0x41a71b['ma_kho']},{'details.ma_kho':_0x41a71b[_0x4ef73b(0x220)]}]);if(_0x41a71b[_0x4ef73b(0x21f)])_0x537c27[_0x4ef73b(0x21f)]=_0x41a71b[_0x4ef73b(0x21f)];else{let _0xd3f3c,_0x2e0125,_0x44ea5b,_0x1c7fd0,_0x578369,_0x26bcea={};if(_0x41a71b['nh_kh']){if(_0x265137[_0x4ef73b(0x1e1)](_0x265137[_0x4ef73b(0x275)],_0x265137[_0x4ef73b(0x285)]))_0xd3f3c=await global['getModel'](_0x265137[_0x4ef73b(0x1db)])[_0x4ef73b(0x298)](_0x41a71b[_0x4ef73b(0x252)],_0x41a71b[_0x4ef73b(0x279)],{'status':!![]}),_0x26bcea[_0x4ef73b(0x279)]={'$in':_0xd3f3c};else{delete _0x16f3f9[_0x4ef73b(0x27d)];let _0x3162ed={..._0x4491c1,..._0x57fb30};return!_0x3162ed[_0x4ef73b(0x253)]&&(_0x3162ed[_0x4ef73b(0x253)]=_0x3320d0[_0x4ef73b(0x253)]),!_0x3162ed[_0x4ef73b(0x1e6)]&&(_0x3162ed['ma_dt']=_0x12035c[_0x4ef73b(0x1e6)]),!_0x3162ed[_0x4ef73b(0x277)]&&(_0x3162ed[_0x4ef73b(0x277)]=_0x2e264c[_0x4ef73b(0x277)]),_0x3162ed[_0x4ef73b(0x24e)]=_0x265137['pEItq'](0x0,_0x3162ed['tien_hang_nt'])||0x0,_0x3162ed['tien_hang']=_0x265137[_0x4ef73b(0x20e)](0x0,_0x3162ed[_0x4ef73b(0x1da)]||0x0),_0x3162ed[_0x4ef73b(0x1f9)]=_0x265137['sgkTC'](0x0,_0x3162ed[_0x4ef73b(0x1f9)])||0x0,_0x3162ed[_0x4ef73b(0x297)]=0x0-(_0x3162ed[_0x4ef73b(0x297)]||0x0),_0x3162ed['tien_ck']=_0x265137[_0x4ef73b(0x24f)](0x0,_0x3162ed['tien_ck']||0x0),_0x3162ed[_0x4ef73b(0x270)]=_0x265137[_0x4ef73b(0x265)](0x0,_0x3162ed['tien_ck_nt']||0x0),_0x3162ed[_0x4ef73b(0x226)]=_0x265137[_0x4ef73b(0x257)](0x0,_0x3162ed[_0x4ef73b(0x226)]||0x0),_0x3162ed['tien_thue_nt']=_0x265137[_0x4ef73b(0x265)](0x0,_0x3162ed['tien_thue_nt']||0x0),_0x3162ed['tien_xuat_tmp']=_0x265137[_0x4ef73b(0x28a)](0x0,_0x3162ed[_0x4ef73b(0x1dc)]||0x0),_0x3162ed[_0x4ef73b(0x1e2)]=_0x265137[_0x4ef73b(0x27a)](0x0,_0x3162ed[_0x4ef73b(0x1dc)]||0x0),_0x3162ed[_0x4ef73b(0x296)]=0x0,_0x3162ed[_0x4ef73b(0x223)]=_0x265137[_0x4ef73b(0x216)](0x0,_0x3162ed[_0x4ef73b(0x223)]),_0x3162ed['tien_hoa_hong_gt']=_0x265137[_0x4ef73b(0x265)](0x0,_0x3162ed[_0x4ef73b(0x274)]),_0x3162ed[_0x4ef73b(0x290)]=0x0-_0x3162ed['tien_hoa_hong_ctv'],_0x3162ed[_0x4ef73b(0x235)]=_0x265137[_0x4ef73b(0x276)](0x0,_0x3162ed[_0x4ef73b(0x235)]),_0x3162ed[_0x4ef73b(0x243)]=0x1,_0x3162ed;}}_0x41a71b[_0x4ef73b(0x1ea)]&&(_0x265137[_0x4ef73b(0x1f7)](_0x265137[_0x4ef73b(0x1d9)],_0x265137[_0x4ef73b(0x1d9)])?_0x971044=_0x4c4d58[_0x4ef73b(0x217)](_0xd8206e=>_0xd8206e[_0x4ef73b(0x256)]===_0x2cef59['id_cs_ck']):(_0x2e0125=await global[_0x4ef73b(0x24b)](_0x4ef73b(0x231))[_0x4ef73b(0x298)](_0x41a71b['id_app'],_0x41a71b[_0x4ef73b(0x1ea)],{'status':!![]}),_0x26bcea[_0x4ef73b(0x1ea)]={'$in':_0x2e0125}));_0x41a71b['nh_kh3']&&(_0x44ea5b=await global[_0x4ef73b(0x24b)](_0x265137['urttp'])[_0x4ef73b(0x298)](_0x41a71b[_0x4ef73b(0x252)],_0x41a71b['nh_kh3'],{'status':!![]}),_0x26bcea[_0x4ef73b(0x1d7)]={'$in':_0x44ea5b});if(_0x41a71b[_0x4ef73b(0x268)]){if(_0x265137['JpIbZ'](_0x265137[_0x4ef73b(0x1d5)],_0x4ef73b(0x1f2)))return _0x265137[_0x4ef73b(0x21c)](_0x34b042[_0x4ef73b(0x27e)](_0x4bba8['ma_vt']),0x0);else _0x1c7fd0=await global[_0x4ef73b(0x24b)](_0x265137['urttp'])['getAllChildrenGroup'](_0x41a71b['id_app'],_0x41a71b['nh_kh4'],{'status':!![]}),_0x26bcea[_0x4ef73b(0x268)]={'$in':_0x1c7fd0};}_0x41a71b[_0x4ef73b(0x225)]&&(_0x265137[_0x4ef73b(0x248)](_0x265137[_0x4ef73b(0x240)],_0x265137[_0x4ef73b(0x250)])?_0x3b1425[_0x4ef73b(0x237)]=_0x2cd4a1[_0x4ef73b(0x237)]:(_0x578369=await global[_0x4ef73b(0x24b)](_0x265137[_0x4ef73b(0x1db)])[_0x4ef73b(0x298)](_0x41a71b[_0x4ef73b(0x252)],_0x41a71b['nh_kh5'],{'status':!![]}),_0x26bcea[_0x4ef73b(0x225)]={'$in':_0x578369}));if(Object['keys'](_0x26bcea)['length']>0x0){_0x26bcea[_0x4ef73b(0x252)]=_0x41a71b[_0x4ef73b(0x252)];let _0x1bdfb8=await global[_0x4ef73b(0x24b)](_0x265137[_0x4ef73b(0x262)])[_0x4ef73b(0x1f5)](_0x26bcea,{'ma_kh':0x1})[_0x4ef73b(0x1ed)]();_0x537c27['ma_kh']={'$in':_0x1bdfb8['map'](_0x17e766=>_0x17e766[_0x4ef73b(0x21f)])};}}_0x41a71b['ma_ct']&&(_0x537c27[_0x4ef73b(0x237)]=_0x41a71b['ma_ct']);_0x41a71b['user_hoa_hong']&&(_0x537c27[_0x4ef73b(0x254)]?_0x537c27[_0x4ef73b(0x1f8)]=[{'$or':[{'user_nv':_0x41a71b[_0x4ef73b(0x20b)]},{'user_ctv':_0x41a71b[_0x4ef73b(0x20b)]},{'user_gt':_0x41a71b[_0x4ef73b(0x20b)]},{'user_ql':_0x41a71b[_0x4ef73b(0x20b)]},{'details.user_nv':_0x41a71b[_0x4ef73b(0x20b)]},{'details.user_ctv':_0x41a71b['user_hoa_hong']},{'details.user_gt':_0x41a71b[_0x4ef73b(0x20b)]},{'details.user_ql':_0x41a71b[_0x4ef73b(0x20b)]}]}]:'sMraZ'===_0x265137[_0x4ef73b(0x204)]?(_0x5c1487[_0x4ef73b(0x286)]=_0x52c0ca[_0x4ef73b(0x296)]||0x0,_0x51d7b7[_0x4ef73b(0x247)]=_0x4b9767['sl_nhap']||0x0):_0x537c27['$or']=[{'user_nv':_0x41a71b[_0x4ef73b(0x20b)]},{'user_ctv':_0x41a71b[_0x4ef73b(0x20b)]},{'user_gt':_0x41a71b[_0x4ef73b(0x20b)]},{'user_ql':_0x41a71b[_0x4ef73b(0x20b)]},{'details.user_nv':_0x41a71b[_0x4ef73b(0x20b)]},{'details.user_ctv':_0x41a71b[_0x4ef73b(0x20b)]},{'details.user_gt':_0x41a71b[_0x4ef73b(0x20b)]},{'details.user_ql':_0x41a71b[_0x4ef73b(0x20b)]}]);let _0x18fd66;if(_0x41a71b[_0x4ef73b(0x1e9)])_0x537c27[_0x4ef73b(0x1f6)]=_0x41a71b[_0x4ef73b(0x1e9)],_0x18fd66=[_0x41a71b[_0x4ef73b(0x1e9)]];else{if(_0x41a71b[_0x4ef73b(0x239)]||_0x41a71b[_0x4ef73b(0x221)]||_0x41a71b[_0x4ef73b(0x218)]||_0x41a71b[_0x4ef73b(0x1fc)]){let _0x28ed8f={'id_app':_0x41a71b[_0x4ef73b(0x252)]};if(_0x41a71b['ma_ncc'])_0x28ed8f[_0x4ef73b(0x239)]=_0x41a71b[_0x4ef73b(0x239)];if(_0x41a71b['ma_nvt'])_0x28ed8f['ma_nvt']=_0x41a71b[_0x4ef73b(0x221)];if(_0x41a71b[_0x4ef73b(0x218)])_0x28ed8f[_0x4ef73b(0x218)]=_0x41a71b['ma_danh_muc_cty'];if(_0x41a71b['ma_danh_muc'])_0x28ed8f[_0x4ef73b(0x1fc)]=_0x41a71b[_0x4ef73b(0x1fc)];let _0x4b8874=await global['getModel'](_0x265137[_0x4ef73b(0x20d)])['find'](_0x28ed8f,{'ma_vt':0x1})[_0x4ef73b(0x1ed)]();_0x18fd66=_0x4b8874['map'](_0x54e0e=>_0x54e0e[_0x4ef73b(0x1e9)]),_0x537c27[_0x265137['aWwzD']]={'$in':_0x18fd66};}}return _0x41a71b[_0x4ef73b(0x266)]&&(_0x537c27[_0x4ef73b(0x283)]=_0x41a71b[_0x4ef73b(0x266)]),_0x41a71b[_0x4ef73b(0x256)]&&(_0x537c27[_0x265137[_0x4ef73b(0x23a)]]=_0x41a71b[_0x4ef73b(0x256)]),_0x537c27['show_payment_method']=![],new Promise((_0xbc29a1,_0x12d528)=>{const _0x6b448d=_0x4ef73b;_0x265137[_0x6b448d(0x211)](databanle,_0x537c27,function(_0x1a5df0,_0x142a22){const _0x3a5f42=_0x6b448d,_0x22aa5e={'GzolC':function(_0x5bb1a6,_0x31b669){const _0x4ba622=_0x26e3;return _0x265137[_0x4ba622(0x1e1)](_0x5bb1a6,_0x31b669);},'ykduB':_0x265137[_0x3a5f42(0x1eb)],'hkeRd':function(_0x354188,_0x1def11){const _0x58dd45=_0x3a5f42;return _0x265137[_0x58dd45(0x26e)](_0x354188,_0x1def11);},'Llmpx':_0x265137[_0x3a5f42(0x293)],'vXQwj':_0x265137[_0x3a5f42(0x206)],'tjDPY':function(_0x1c353c,_0x12bab7){const _0x115bbc=_0x3a5f42;return _0x265137[_0x115bbc(0x257)](_0x1c353c,_0x12bab7);},'UCros':function(_0x10bf5d,_0x4aea88){const _0x1c38a9=_0x3a5f42;return _0x265137[_0x1c38a9(0x229)](_0x10bf5d,_0x4aea88);},'VLcqL':function(_0x140ae7,_0x41dff4){const _0x13799d=_0x3a5f42;return _0x265137[_0x13799d(0x20f)](_0x140ae7,_0x41dff4);},'qpQID':function(_0x5bba02,_0x2992a9){return _0x265137['RNhZj'](_0x5bba02,_0x2992a9);},'nvxxc':function(_0x4a2200,_0x585631){const _0x4f2b76=_0x3a5f42;return _0x265137[_0x4f2b76(0x242)](_0x4a2200,_0x585631);},'dcPkN':function(_0x1fc91e,_0x88a480){const _0x1c0cad=_0x3a5f42;return _0x265137[_0x1c0cad(0x272)](_0x1fc91e,_0x88a480);},'GRCIV':function(_0x2b3c0a,_0x3308d2){return _0x2b3c0a-_0x3308d2;},'dvaro':_0x265137['ZnGCK'],'dcgOu':function(_0x4c82ab,_0x1ef636){const _0x66ffc5=_0x3a5f42;return _0x265137[_0x66ffc5(0x26e)](_0x4c82ab,_0x1ef636);},'VBHDw':'FFnGL','OJtqo':function(_0x1348b3,_0x4cfb34,_0x12a932){return _0x265137['lxJWU'](_0x1348b3,_0x4cfb34,_0x12a932);},'qjaLm':function(_0x38af95,_0x24b755){return _0x265137['ClkiT'](_0x38af95,_0x24b755);},'XUYAG':_0x265137[_0x3a5f42(0x234)],'MlZUc':function(_0x4bedef,_0x212d8b){const _0x17c29f=_0x3a5f42;return _0x265137[_0x17c29f(0x28c)](_0x4bedef,_0x212d8b);},'iaxMr':function(_0x85a2ec,_0x4c7f0a){const _0x54a0f0=_0x3a5f42;return _0x265137[_0x54a0f0(0x24f)](_0x85a2ec,_0x4c7f0a);},'tTXNq':function(_0x9e48ca,_0x5aec32){return _0x265137['XeeIH'](_0x9e48ca,_0x5aec32);},'zayyi':function(_0x3ca016,_0x1897d3){const _0x3b4836=_0x3a5f42;return _0x265137[_0x3b4836(0x245)](_0x3ca016,_0x1897d3);},'LIDoG':function(_0x5bab72,_0x371e86){const _0x342e8d=_0x3a5f42;return _0x265137[_0x342e8d(0x202)](_0x5bab72,_0x371e86);},'LGtIn':function(_0x112456,_0x51d93f){return _0x265137['JpIbZ'](_0x112456,_0x51d93f);},'bkGey':_0x3a5f42(0x1e4),'zflYD':_0x3a5f42(0x238),'Glsdh':_0x265137[_0x3a5f42(0x261)],'ZTCDk':function(_0x32f735,_0x12136b){const _0x595889=_0x3a5f42;return _0x265137[_0x595889(0x24d)](_0x32f735,_0x12136b);},'ASJzl':_0x265137[_0x3a5f42(0x23b)],'tgVQr':function(_0x408140,_0x1c0d18){const _0x82caa2=_0x3a5f42;return _0x265137[_0x82caa2(0x1fe)](_0x408140,_0x1c0d18);},'WXUCv':_0x265137[_0x3a5f42(0x280)],'FGVti':_0x265137['TGBYA'],'ESBcP':_0x3a5f42(0x282),'IPjZo':function(_0xc572dc,_0x5eaa99){return _0x265137['vMpCz'](_0xc572dc,_0x5eaa99);}};if(_0x265137[_0x3a5f42(0x1e1)](_0x265137['btPps'],_0x265137['btPps']))_0x525d73['ma_kh']=_0x599cd1[_0x3a5f42(0x21f)];else{if(_0x1a5df0)return _0x265137[_0x3a5f42(0x23c)](_0x12d528,_0x1a5df0);async['mapLimit'](_0x142a22,0x64,function(_0x3ab9a6,_0x2342f2){const _0x47d6a1=_0x3a5f42,_0xaca89a={'yzMaD':function(_0x500259,_0x47d5a4){return _0x500259*_0x47d5a4;}};if(_0x22aa5e['dvaro']===_0x22aa5e[_0x47d6a1(0x1e5)]){let _0x431c48=_0x3ab9a6['details']||[];delete _0x3ab9a6[_0x47d6a1(0x222)],_0x431c48=_0x431c48[_0x47d6a1(0x214)](_0x1df1ea=>{const _0x3d4c07=_0x47d6a1;delete _0x1df1ea[_0x3d4c07(0x27d)],_0x1df1ea[_0x3d4c07(0x243)]=0x2;let _0x3539bb={..._0x3ab9a6,..._0x1df1ea};return!_0x3539bb[_0x3d4c07(0x253)]&&(_0x3539bb[_0x3d4c07(0x253)]=_0x3ab9a6[_0x3d4c07(0x253)]),!_0x3539bb[_0x3d4c07(0x1e6)]&&(_0x22aa5e[_0x3d4c07(0x263)](_0x3d4c07(0x25b),_0x22aa5e['ykduB'])?_0x5d185c[_0x3d4c07(0x254)]=[{'ma_kho':_0x39cf9d[_0x3d4c07(0x220)]},{'details.ma_kho':_0x4d0e78[_0x3d4c07(0x220)]}]:_0x3539bb[_0x3d4c07(0x1e6)]=_0x3ab9a6['ma_dt']),!_0x3539bb[_0x3d4c07(0x277)]&&(_0x22aa5e[_0x3d4c07(0x263)](_0x3d4c07(0x249),'RayHY')?_0x3539bb[_0x3d4c07(0x277)]=_0x3ab9a6[_0x3d4c07(0x277)]:_0x2b5e58[_0x3d4c07(0x253)]=_0x576b6c['ma_nv']),!_0x3539bb['ma_kh']&&(_0x3539bb['ma_kh']=_0x3ab9a6[_0x3d4c07(0x21f)]),_0x3539bb;}),_0x3ab9a6['details_tl']&&(_0x22aa5e['dcgOu'](_0x47d6a1(0x288),_0x22aa5e[_0x47d6a1(0x278)])?(_0x431c48=[..._0x431c48,..._0x3ab9a6[_0x47d6a1(0x284)][_0x47d6a1(0x214)](_0xe55c46=>{const _0x449750=_0x47d6a1;if(_0x22aa5e[_0x449750(0x215)](_0x449750(0x28f),_0x449750(0x244))){delete _0xe55c46[_0x449750(0x27d)];let _0x1c10bc={..._0x3ab9a6,..._0xe55c46};return!_0x1c10bc[_0x449750(0x253)]&&(_0x22aa5e[_0x449750(0x215)](_0x22aa5e[_0x449750(0x26f)],_0x22aa5e[_0x449750(0x224)])?_0x1c10bc['ma_nv']=_0x3ab9a6[_0x449750(0x253)]:_0x1118ab['ma_bp']=_0x192ab4[_0x449750(0x277)]),!_0x1c10bc[_0x449750(0x1e6)]&&(_0x1c10bc['ma_dt']=_0x3ab9a6[_0x449750(0x1e6)]),!_0x1c10bc['ma_bp']&&(_0x1c10bc[_0x449750(0x277)]=_0x3ab9a6[_0x449750(0x277)]),_0x1c10bc[_0x449750(0x24e)]=_0x22aa5e[_0x449750(0x1fd)](0x0,_0x1c10bc[_0x449750(0x24e)])||0x0,_0x1c10bc['tien_hang']=_0x22aa5e[_0x449750(0x27b)](0x0,_0x1c10bc[_0x449750(0x1da)]||0x0),_0x1c10bc[_0x449750(0x1f9)]=_0x22aa5e[_0x449750(0x1fd)](0x0,_0x1c10bc[_0x449750(0x1f9)])||0x0,_0x1c10bc[_0x449750(0x297)]=_0x22aa5e[_0x449750(0x1fd)](0x0,_0x1c10bc['tien_hang_ct']||0x0),_0x1c10bc[_0x449750(0x23d)]=0x0-(_0x1c10bc['tien_ck']||0x0),_0x1c10bc[_0x449750(0x270)]=_0x22aa5e[_0x449750(0x27b)](0x0,_0x1c10bc[_0x449750(0x270)]||0x0),_0x1c10bc[_0x449750(0x226)]=_0x22aa5e['VLcqL'](0x0,_0x1c10bc[_0x449750(0x226)]||0x0),_0x1c10bc[_0x449750(0x21e)]=_0x22aa5e[_0x449750(0x289)](0x0,_0x1c10bc[_0x449750(0x21e)]||0x0),_0x1c10bc[_0x449750(0x1e7)]=_0x22aa5e['qpQID'](0x0,_0x1c10bc[_0x449750(0x1dc)]||0x0),_0x1c10bc['tien_xuat_nt']=_0x22aa5e[_0x449750(0x241)](0x0,_0x1c10bc['tien_nhap_nt']||0x0),_0x1c10bc[_0x449750(0x296)]=0x0,_0x1c10bc[_0x449750(0x223)]=_0x22aa5e[_0x449750(0x264)](0x0,_0x1c10bc['tien_hoa_hong']),_0x1c10bc[_0x449750(0x274)]=0x0-_0x1c10bc[_0x449750(0x274)],_0x1c10bc[_0x449750(0x290)]=_0x22aa5e[_0x449750(0x232)](0x0,_0x1c10bc[_0x449750(0x290)]),_0x1c10bc['tien_hoa_hong_ql']=_0x22aa5e['qpQID'](0x0,_0x1c10bc[_0x449750(0x235)]),_0x1c10bc[_0x449750(0x243)]=0x1,_0x1c10bc;}else _0x481526['$or']?_0x4d3715[_0x449750(0x1f8)]=[{'$or':[{'user_nv':_0x4fd672[_0x449750(0x20b)]},{'user_ctv':_0x4020de[_0x449750(0x20b)]},{'user_gt':_0x481fc8[_0x449750(0x20b)]},{'user_ql':_0x32cb15[_0x449750(0x20b)]},{'details.user_nv':_0x2007e0[_0x449750(0x20b)]},{'details.user_ctv':_0x4e71a7[_0x449750(0x20b)]},{'details.user_gt':_0x261f43[_0x449750(0x20b)]},{'details.user_ql':_0x13518a['user_hoa_hong']}]}]:_0x4d4a16[_0x449750(0x254)]=[{'user_nv':_0x92d0fa['user_hoa_hong']},{'user_ctv':_0x49fc4a[_0x449750(0x20b)]},{'user_gt':_0x44a514['user_hoa_hong']},{'user_ql':_0x15be94[_0x449750(0x20b)]},{'details.user_nv':_0x3ddff9[_0x449750(0x20b)]},{'details.user_ctv':_0x55dc82[_0x449750(0x20b)]},{'details.user_gt':_0x3e9051['user_hoa_hong']},{'details.user_ql':_0x8d7d3c[_0x449750(0x20b)]}];})],delete _0x3ab9a6[_0x47d6a1(0x284)]):_0x35a0d5[_0x47d6a1(0x21f)]=_0xf9537f[_0x47d6a1(0x21f)]),_0x22aa5e[_0x47d6a1(0x1d6)](_0x2342f2,null,_0x431c48);}else{let _0x1a52ee=_0x1df524['tu']/_0x504451[_0x47d6a1(0x1e3)];_0x2f11b4['sl_xuat_qd']=_0xaca89a[_0x47d6a1(0x1f0)](_0x1a52ee,_0x5598cb[_0x47d6a1(0x296)]||0x0),_0x3b1085[_0x47d6a1(0x247)]=_0xaca89a['yzMaD'](_0x1a52ee,_0xb9ace6[_0x47d6a1(0x260)]||0x0);}},async function(_0x4e5e59,_0x3524bf){const _0xdf6498=_0x3a5f42,_0x72cc83={'Iibes':function(_0x584e39,_0x270899){return _0x22aa5e['hkeRd'](_0x584e39,_0x270899);},'elzbk':_0x22aa5e['zflYD'],'IHNnY':_0x22aa5e[_0xdf6498(0x25f)],'SqlWJ':function(_0x5e1e1a,_0x47d374){return _0x5e1e1a+_0x47d374;},'MjmLL':function(_0x2222a2,_0xd3571b){const _0x36bac8=_0xdf6498;return _0x22aa5e[_0x36bac8(0x1fd)](_0x2222a2,_0xd3571b);},'ebkZI':function(_0x23a2eb,_0x373ce9){const _0xa6faaa=_0xdf6498;return _0x22aa5e[_0xa6faaa(0x1fd)](_0x23a2eb,_0x373ce9);},'LjNzO':function(_0x24d547,_0x48ce94){return _0x22aa5e['MlZUc'](_0x24d547,_0x48ce94);},'juEJz':function(_0x28aaaa,_0x194913){return _0x22aa5e['ZTCDk'](_0x28aaaa,_0x194913);},'Hnzcz':function(_0x4ce75e,_0x57a362){return _0x4ce75e*_0x57a362;}};if(_0x22aa5e[_0xdf6498(0x273)](_0x22aa5e['ASJzl'],_0xdf6498(0x1ef)))_0x475697[_0xdf6498(0x28b)]=_0x3caaf5[_0xdf6498(0x256)];else{if(_0x4e5e59)return _0x22aa5e[_0xdf6498(0x212)](_0x12d528,_0x4e5e59);_0x3524bf=_0x3524bf[_0xdf6498(0x287)]((_0x56c949,_0x288f7b)=>_0x56c949[_0xdf6498(0x269)](_0x288f7b),[]),_0x18fd66&&(_0x3524bf=_0x3524bf[_0xdf6498(0x217)](_0x1051d9=>{const _0x50edca=_0xdf6498;if(_0x72cc83['Iibes'](_0x72cc83[_0x50edca(0x1e8)],_0x72cc83[_0x50edca(0x208)]))return _0x18fd66[_0x50edca(0x27e)](_0x1051d9[_0x50edca(0x1e9)])>=0x0;else _0x3c9114[_0x50edca(0x283)]=_0x4502bc['id_cs'];})),_0x41a71b[_0xdf6498(0x266)]&&(_0x3524bf=_0x3524bf[_0xdf6498(0x217)](_0x3440fa=>_0x3440fa[_0xdf6498(0x266)]===_0x41a71b[_0xdf6498(0x266)])),_0x41a71b[_0xdf6498(0x256)]&&(_0x3524bf=_0x3524bf[_0xdf6498(0x217)](_0x42b745=>_0x42b745[_0xdf6498(0x256)]===_0x41a71b[_0xdf6498(0x256)])),await _0x3524bf[_0xdf6498(0x246)](_0x41a71b[_0xdf6498(0x252)],_0xdf6498(0x26c),{'where':{'ma_dvt':_0x22aa5e[_0xdf6498(0x271)],'ma_vt':_0x22aa5e[_0xdf6498(0x26b)]},'fields':['tu',_0xdf6498(0x1e3),_0x22aa5e[_0xdf6498(0x22f)]]}),_0x3524bf[_0xdf6498(0x1df)](function(_0x11a422,_0x15d0b4){const _0x2b7814=_0xdf6498;if(_0x22aa5e[_0x2b7814(0x210)](_0x22aa5e[_0x2b7814(0x267)],_0x22aa5e['XUYAG']))_0x56ab73[_0x2b7814(0x1f8)]=[{'$or':[{'user_nv':_0x422b87[_0x2b7814(0x20b)]},{'user_ctv':_0x310735['user_hoa_hong']},{'user_gt':_0x3c079d['user_hoa_hong']},{'user_ql':_0x4f7608['user_hoa_hong']},{'details.user_nv':_0xe540e[_0x2b7814(0x20b)]},{'details.user_ctv':_0xd3484a[_0x2b7814(0x20b)]},{'details.user_gt':_0x20c55f[_0x2b7814(0x20b)]},{'details.user_ql':_0x188459[_0x2b7814(0x20b)]}]}];else{_0x11a422[_0x2b7814(0x22a)]=_0x22aa5e[_0x2b7814(0x22e)](_0x15d0b4,0x1),_0x11a422['id_ct']=_0x11a422[_0x2b7814(0x27d)]['toString'](),_0x11a422[_0x2b7814(0x295)]=![],_0x11a422['tt']=_0x11a422[_0x2b7814(0x292)]=_0x22aa5e[_0x2b7814(0x22e)](_0x22aa5e[_0x2b7814(0x205)](_0x11a422[_0x2b7814(0x297)]||0x0,_0x11a422['tien_ck']||0x0),_0x11a422[_0x2b7814(0x226)]||0x0),_0x11a422['loi_nhuan_tmp']=_0x11a422[_0x2b7814(0x1e7)]?_0x22aa5e['dcPkN'](_0x22aa5e[_0x2b7814(0x294)](_0x22aa5e['GRCIV'](_0x11a422['tt'],_0x11a422[_0x2b7814(0x1e7)]),_0x11a422['tien_thue']||0x0),_0x11a422[_0x2b7814(0x20a)]||0x0):0x0,_0x11a422[_0x2b7814(0x281)]=_0x22aa5e[_0x2b7814(0x259)](_0x22aa5e[_0x2b7814(0x289)](_0x11a422['tt'],_0x11a422[_0x2b7814(0x22d)]||0x0),_0x11a422[_0x2b7814(0x226)]||0x0)-(_0x11a422[_0x2b7814(0x20a)]||0x0),_0x11a422[_0x2b7814(0x203)]=_0x22aa5e[_0x2b7814(0x22e)](_0x22aa5e[_0x2b7814(0x22e)](_0x22aa5e['MlZUc'](_0x11a422[_0x2b7814(0x223)],_0x11a422['tien_hoa_hong_gt']),_0x11a422[_0x2b7814(0x290)]),_0x11a422[_0x2b7814(0x235)]);if(_0x11a422[_0x2b7814(0x1e3)]){if(_0x2b7814(0x1f3)==='uFbiN')_0x3e8f33['ma_bp']=_0x59e746['ma_bp'];else{let _0x2f0a4f=_0x22aa5e[_0x2b7814(0x1f4)](_0x11a422['tu'],_0x11a422[_0x2b7814(0x1e3)]);_0x11a422[_0x2b7814(0x286)]=_0x2f0a4f*(_0x11a422['sl_xuat']||0x0),_0x11a422[_0x2b7814(0x247)]=_0x22aa5e[_0x2b7814(0x209)](_0x2f0a4f,_0x11a422[_0x2b7814(0x260)]||0x0);}}else{if(_0x22aa5e[_0x2b7814(0x273)](_0x22aa5e[_0x2b7814(0x255)],_0x22aa5e['bkGey']))_0x11a422[_0x2b7814(0x286)]=_0x11a422[_0x2b7814(0x296)]||0x0,_0x11a422['sl_nhap_qd']=_0x11a422[_0x2b7814(0x260)]||0x0;else{_0x167f0['stt']=_0x72cc83[_0x2b7814(0x1d8)](_0x275094,0x1),_0x5d3420[_0x2b7814(0x27c)]=_0xa2f68[_0x2b7814(0x27d)]['toString'](),_0x57487e['bold']=![],_0xd3a55a['tt']=_0x296058[_0x2b7814(0x292)]=_0x72cc83[_0x2b7814(0x1d8)](_0x72cc83[_0x2b7814(0x227)](_0x2e4f78[_0x2b7814(0x297)]||0x0,_0x487c97[_0x2b7814(0x23d)]||0x0),_0x12e7cd['tien_thue']||0x0),_0x25395f[_0x2b7814(0x230)]=_0x517d13['tien_xuat_tmp']?_0x72cc83[_0x2b7814(0x227)](_0x72cc83[_0x2b7814(0x227)](_0x72cc83[_0x2b7814(0x21b)](_0x1ea38d['tt'],_0x4ccdb0[_0x2b7814(0x1e7)]),_0x2d0e7e['tien_thue']||0x0),_0x27e150[_0x2b7814(0x20a)]||0x0):0x0,_0xf01199[_0x2b7814(0x281)]=_0x72cc83['ebkZI'](_0x72cc83[_0x2b7814(0x21b)](_0x72cc83[_0x2b7814(0x227)](_0x2622ba['tt'],_0x266ae9[_0x2b7814(0x22d)]||0x0),_0x2f6c79[_0x2b7814(0x226)]||0x0),_0x4a4af3['tien_cp']||0x0),_0x1c1d0a[_0x2b7814(0x203)]=_0x72cc83[_0x2b7814(0x1d8)](_0x72cc83['LjNzO'](_0x72cc83[_0x2b7814(0x291)](_0x3a6269[_0x2b7814(0x223)],_0x4e1220[_0x2b7814(0x274)]),_0x54548a[_0x2b7814(0x290)]),_0x5a3851['tien_hoa_hong_ql']);if(_0x2ecb81[_0x2b7814(0x1e3)]){let _0x14aab8=_0x72cc83[_0x2b7814(0x219)](_0x6a8dfe['tu'],_0x988bec[_0x2b7814(0x1e3)]);_0x3be12a[_0x2b7814(0x286)]=_0x14aab8*(_0x24d81a[_0x2b7814(0x296)]||0x0),_0x218a61[_0x2b7814(0x247)]=_0x72cc83[_0x2b7814(0x200)](_0x14aab8,_0x422cba['sl_nhap']||0x0);}else _0x338ec3['sl_xuat_qd']=_0x8dbaff[_0x2b7814(0x296)]||0x0,_0x461cdc['sl_nhap_qd']=_0x56f84a['sl_nhap']||0x0;}}}}),_0x22aa5e[_0xdf6498(0x1dd)](_0xbc29a1,_0x3524bf);}});}});});};
|
|
@@ -1,15 +1 @@
|
|
|
1
|
-
const databanle=require("./databanlenpp"),async=require("async");
|
|
2
|
-
module.exports=async function($condition$$){if(!$condition$$.id_app)throw"B\u00e1o c\u00e1o n\u00e0y y\u00eau c\u1ea7u c\u00e1c tham s\u1ed1:id_app";$condition$$.den_ngay||($condition$$.den_ngay=new Date);const $query$$={id_app:$condition$$.id_app};$query$$.ngay_ct={$lte:$condition$$.den_ngay};$condition$$.tu_ngay&&($query$$.ngay_ct.$gte=$condition$$.tu_ngay);$condition$$.ma_dvcs&&($query$$.ma_dvcs=$condition$$.ma_dvcs);$condition$$.user_nv&&($query$$.user_nv=$condition$$.user_nv);$condition$$.user_ctv&&
|
|
3
|
-
($query$$.user_ctv=$condition$$.user_ctv);$condition$$.tinh_thanh&&($query$$.tinh_thanh=$condition$$.tinh_thanh);$condition$$.ma_nv&&($query$$.ma_nv=$condition$$.ma_nv);$condition$$.ma_kho&&($query$$.$or=[{ma_kho:$condition$$.ma_kho},{"details.ma_kho":$condition$$.ma_kho}]);if($condition$$.ma_kh)$query$$.ma_kh=$condition$$.ma_kh;else{var $condition_kh_custs_q$$={};if($condition$$.nh_kh){var $nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$=await global.getModel("group").getAllChildrenGroup($condition$$.id_app,
|
|
4
|
-
$condition$$.nh_kh,{status:!0});$condition_kh_custs_q$$.nh_kh={$in:$nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$}}$condition$$.nh_kh2&&($nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$=await global.getModel("group").getAllChildrenGroup($condition$$.id_app,$condition$$.nh_kh2,{status:!0}),$condition_kh_custs_q$$.nh_kh2={$in:$nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$});$condition$$.nh_kh3&&($nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$=await global.getModel("group").getAllChildrenGroup($condition$$.id_app,$condition$$.nh_kh3,
|
|
5
|
-
{status:!0}),$condition_kh_custs_q$$.nh_kh3={$in:$nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$});$condition$$.nh_kh4&&($nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$=await global.getModel("group").getAllChildrenGroup($condition$$.id_app,$condition$$.nh_kh4,{status:!0}),$condition_kh_custs_q$$.nh_kh4={$in:$nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$});$condition$$.nh_kh5&&($nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$=await global.getModel("group").getAllChildrenGroup($condition$$.id_app,$condition$$.nh_kh5,{status:!0}),
|
|
6
|
-
$condition_kh_custs_q$$.nh_kh5={$in:$nh_khs_nh_khs2_nh_khs3_nh_khs4_nh_khs5$$});Object.keys($condition_kh_custs_q$$).length>0&&($condition_kh_custs_q$$.id_app=$condition$$.id_app,$condition_kh_custs_q$$=await global.getModel("customer").find($condition_kh_custs_q$$,{ma_kh:1}).lean(),$query$$.ma_kh={$in:$condition_kh_custs_q$$.map($c$$=>$c$$.ma_kh)})}$condition$$.ma_ct&&($query$$.ma_ct=$condition$$.ma_ct);$condition$$.user_hoa_hong&&($query$$.$or?$query$$.$and=[{$or:[{user_nv:$condition$$.user_hoa_hong},
|
|
7
|
-
{user_ctv:$condition$$.user_hoa_hong},{user_gt:$condition$$.user_hoa_hong},{user_ql:$condition$$.user_hoa_hong},{"details.user_nv":$condition$$.user_hoa_hong},{"details.user_ctv":$condition$$.user_hoa_hong},{"details.user_gt":$condition$$.user_hoa_hong},{"details.user_ql":$condition$$.user_hoa_hong}]}]:$query$$.$or=[{user_nv:$condition$$.user_hoa_hong},{user_ctv:$condition$$.user_hoa_hong},{user_gt:$condition$$.user_hoa_hong},{user_ql:$condition$$.user_hoa_hong},{"details.user_nv":$condition$$.user_hoa_hong},
|
|
8
|
-
{"details.user_ctv":$condition$$.user_hoa_hong},{"details.user_gt":$condition$$.user_hoa_hong},{"details.user_ql":$condition$$.user_hoa_hong}]);let $ma_vts$$;if($condition$$.ma_vt)$query$$["details.ma_vt"]=$condition$$.ma_vt,$ma_vts$$=[$condition$$.ma_vt];else if($condition$$.ma_ncc||$condition$$.ma_nvt||$condition$$.ma_danh_muc_cty||$condition$$.ma_danh_muc)$condition_kh_custs_q$$={id_app:$condition$$.id_app},$condition$$.ma_ncc&&($condition_kh_custs_q$$.ma_ncc=$condition$$.ma_ncc),$condition$$.ma_nvt&&
|
|
9
|
-
($condition_kh_custs_q$$.ma_nvt=$condition$$.ma_nvt),$condition$$.ma_danh_muc_cty&&($condition_kh_custs_q$$.ma_danh_muc_cty=$condition$$.ma_danh_muc_cty),$condition$$.ma_danh_muc&&($condition_kh_custs_q$$.ma_danh_muc=$condition$$.ma_danh_muc),$ma_vts$$=(await global.getModel("dmvt").find($condition_kh_custs_q$$,{ma_vt:1}).lean()).map($v$$=>$v$$.ma_vt),$query$$["details.ma_vt"]={$in:$ma_vts$$};$condition$$.id_cs&&($query$$["details.id_cs"]=$condition$$.id_cs);$condition$$.id_cs_ck&&($query$$["details.id_cs_ck"]=
|
|
10
|
-
$condition$$.id_cs_ck);$query$$.show_payment_method=!1;return new Promise(($resolve$$,$reject$$)=>{databanle($query$$,function($error$$,$rs$$){if($error$$)return $reject$$($error$$);async.mapSeries($rs$$,function($r$$,$callback$$){let $details$$=$r$$.details||[];delete $r$$.details;$details$$=$details$$.map($_r_detail$$=>{delete $_r_detail$$._id;$_r_detail$$.nxt=2;$_r_detail$$={...$r$$,...$_r_detail$$};$_r_detail$$.ma_nv||($_r_detail$$.ma_nv=$r$$.ma_nv);$_r_detail$$.ma_dt||($_r_detail$$.ma_dt=$r$$.ma_dt);
|
|
11
|
-
$_r_detail$$.ma_bp||($_r_detail$$.ma_bp=$r$$.ma_bp);return $_r_detail$$});$r$$.details_tl&&($details$$=[...$details$$,...$r$$.details_tl.map($detail$$=>{delete $detail$$._id;$detail$$={...$r$$,...$detail$$};$detail$$.ma_nv||($detail$$.ma_nv=$r$$.ma_nv);$detail$$.ma_dt||($detail$$.ma_dt=$r$$.ma_dt);$detail$$.ma_bp||($detail$$.ma_bp=$r$$.ma_bp);$detail$$.tien_hang_nt=0-$detail$$.tien_hang_nt||0;$detail$$.tien_hang=0-($detail$$.tien_hang||0);$detail$$.tien_hang_ct_nt=0-$detail$$.tien_hang_ct_nt||0;$detail$$.tien_hang_ct=
|
|
12
|
-
0-($detail$$.tien_hang_ct||0);$detail$$.tien_ck=0-($detail$$.tien_ck||0);$detail$$.tien_ck_nt=0-($detail$$.tien_ck_nt||0);$detail$$.tien_thue=0-($detail$$.tien_thue||0);$detail$$.tien_thue_nt=0-($detail$$.tien_thue_nt||0);$detail$$.tien_xuat_tmp=0-($detail$$.tien_nhap_nt||0);$detail$$.sl_xuat=0;$detail$$.tien_hoa_hong=0-$detail$$.tien_hoa_hong;$detail$$.tien_hoa_hong_gt=0-$detail$$.tien_hoa_hong_gt;$detail$$.tien_hoa_hong_ctv=0-$detail$$.tien_hoa_hong_ctv;$detail$$.tien_hoa_hong_ql=0-$detail$$.tien_hoa_hong_ql;
|
|
13
|
-
$detail$$.nxt=1;return $detail$$})],delete $r$$.details_tl);$callback$$(null,$details$$)},async function($error$$,$report$$){if($error$$)return $reject$$($error$$);$report$$=$report$$.reduce(($a$$,$b$$)=>$a$$.concat($b$$),[]);$ma_vts$$&&($report$$=$report$$.filter($r$$=>$ma_vts$$.indexOf($r$$.ma_vt)>=0));$condition$$.id_cs&&($report$$=$report$$.filter($r$$=>$r$$.id_cs===$condition$$.id_cs));$condition$$.id_cs_ck&&($report$$=$report$$.filter($r$$=>$r$$.id_cs_ck===$condition$$.id_cs_ck));await $report$$.asyncJoinModel2($condition$$.id_app,
|
|
14
|
-
"dmqddvt",{where:{ma_dvt:"ma_dvt",ma_vt:"ma_vt"},fields:["tu","mau","ma_dvt_goc"]});$report$$.forEach(function($r$$,$he_so_qd_i$$){$r$$.stt=$he_so_qd_i$$+1;$r$$.id_ct=$r$$._id.toString();$r$$.bold=!1;$r$$.tt=$r$$.tien=($r$$.tien_hang_ct||0)-($r$$.tien_ck||0)+($r$$.tien_thue||0);$r$$.loi_nhuan_tmp=$r$$.tien_xuat_tmp?$r$$.tt-$r$$.tien_xuat_tmp-($r$$.tien_thue||0):0;$r$$.t_hoa_hong=$r$$.tien_hoa_hong+$r$$.tien_hoa_hong_gt+$r$$.tien_hoa_hong_ctv+$r$$.tien_hoa_hong_ql;$r$$.mau?($he_so_qd_i$$=$r$$.tu/$r$$.mau,
|
|
15
|
-
$r$$.sl_xuat_qd=$he_so_qd_i$$*($r$$.sl_xuat||0),$r$$.sl_nhap_qd=$he_so_qd_i$$*($r$$.sl_nhap||0)):($r$$.sl_xuat_qd=$r$$.sl_xuat||0,$r$$.sl_nhap_qd=$r$$.sl_nhap||0)});$resolve$$($report$$)})})})};
|
|
1
|
+
function _0x386b(){const _0x3d7949=['zgv0ywLSCY5Pzf9JCW','sfbKyM8','BwfFA2G','BwfFzhq','A1nPuuW','s210t0y','sw1Mrwi','BwfFzhz0x2DVyW','C2XFEhvHDf9Xza','zfbXD1G','DgLLBL9JA19UDa','mZm0nJi2mgTfCevLBa','BwfFyNa','BMHFA2GZ','DgLLBL90AhvL','zMLUza','teLnzhO','DfLvu3K','u1f4zei','BwfFzhz0','s2XRA3O','BMDHEv9JDa','DxnLCL9OB2fFAg9UzW','zhr0vfO','y05Ls2y','owvhBNrdvq','B09evwO','DgLLBL9Oyw5Nx2n0','twXpzee','u2vPweC','C2XFEhvHDa','DgLLBL9OB2fFAg9UzW','BgvHBG','A2v5CW','mJq5ndu5mNLstwrQrG','zgv0ywLSC190Ba','BwfFzgfUAf9TDwnFy3r5','ufzoDgq','y3vZDg9Tzxi','ENv0zeu','Be9SBMO','zgv0ywLSCW','DMf1DeK','yLDoqK0','mtKXmtG1ogn6v1LwDq','tgf5z2e','yM9Sza','BMHFA2G','zxHWB3j0CW','Bxfuuxy','tez5v3y','BNH0','qw1XtKq','D2D1q2m','whz5D1K','BwfFBNy','CMvKDwnL','DgLLBL94Dwf0x3rTCa','zhvmr1O','BwfFBNz0','uM9PtNC','rhHTreW','BwfFy3q','mZe5mtm0mMjdDuj3ra','rgTcv1u','DNnTDwG','Bg9Px25ODwfUx3rTCa','Cwr4Dwq','DhvFBMDHEq','DxnLCL9UDG','Du5pyMC','r3LiuLi','jg9Y','DgLUAf90AgfUAa','t1jVDui','tgXYzLG','zMLSDgvY','z2v0tw9KzwW','zg1Xzgr2Da','uNPhzKy','DgLLBL9UAgfWx250','zu5sA1e','zwPfEhm','AwrFy3m','z3vMAxG','z3jVDxa','mtzuEhzPuhe','AwrFyxbW','EhvJEfm','DgLLBL9OB2fFAg9Uz19XBa','sLPKB2O','ueX1sMW','DgLLBL9Oyw5Nx250','nMTAEvbSBW','zuPcvfK','BfvwA3K','Aw5KzxHpzG','yurgrva','wgrAu0e','C2XFBMHHCf9Xza','mtfWDe9YAuW','vxD4B2W','zgv0ywLSCY5Tyv92Da','zLfeDLe','jgfUza','Bwf1','wKzbywq','mty4sxzPyNLt','lI9KyxrHyMfUBgvUCha','jgD0zq','vLbTu3G','BwfW','mZC5mdqXzw9XAKPe','Cxz3qNm','zgnnuw0','t2DowNe','nvP2zMfuzq','zg12Da','A3PQree','BwfFDNq','yxniChe','D1nlu2S','DxnLCL9JDhy','qKvXEe8','DLjRzey','ELDxwfG','BgvUz3rO','wffwshO','DgLLBL9OB2fFAg9Uz19NDa','BMHFA2GY','Df9OB2fFAg9UzW','DgLLBL9OB2fFAg9Uz19JDhy','BMHFA2G1','BwfFzgfUAf9TDwm','mtq2odu5qKHRug1j','zgv0ywLSCY5Pzf9JC19JAW','C2XFBMHHCa','yxnsvxC','BwfFA2HV','wMfPBNu','D1fZzK8','AwrFy3nFy2S','DgLLBL9JAW','y2vkvw4','Bvn0yKC','x2LK','BufUwNa','DgLLBL9Oyw5Nx2n0x250','EgrNqw4','C2PWAvG','ywXTBKO','DgLLBG','vhfiueW','BMHFA2G0','BwfFBMnJ','tMHgAuy','z2v0qwXSq2HPBgrYzw5hCM91Ca','DgLLBL90AhvLx250','C3r0','AwrFy3q','y29Uy2f0','C2HVD19WyxLTzw50x21LDgHVza','ze5MAhG','mtq4ndyYuLPxBhjT','BwfFzhzJCW','zgvUx25NyxK','DgLLBL9Oyw5N','vNj1A0u','rKLuD2u','seLxDxO'];_0x386b=function(){return _0x3d7949;};return _0x386b();}const _0x942289=_0x3499;(function(_0x533500,_0x36a345){const _0x3c2357=_0x3499,_0x32ea67=_0x533500();while(!![]){try{const _0x362481=-parseInt(_0x3c2357(0x1a1))/0x1*(-parseInt(_0x3c2357(0x1e7))/0x2)+-parseInt(_0x3c2357(0x1ca))/0x3*(-parseInt(_0x3c2357(0x19a))/0x4)+-parseInt(_0x3c2357(0x1b8))/0x5*(-parseInt(_0x3c2357(0x170))/0x6)+-parseInt(_0x3c2357(0x183))/0x7+-parseInt(_0x3c2357(0x166))/0x8*(parseInt(_0x3c2357(0x15d))/0x9)+-parseInt(_0x3c2357(0x14f))/0xa*(parseInt(_0x3c2357(0x1a8))/0xb)+parseInt(_0x3c2357(0x1af))/0xc*(parseInt(_0x3c2357(0x1b4))/0xd);if(_0x362481===_0x36a345)break;else _0x32ea67['push'](_0x32ea67['shift']());}catch(_0x2393f2){_0x32ea67['push'](_0x32ea67['shift']());}}}(_0x386b,0x40dd3));const databanle=require(_0x942289(0x1b0)),async=require('async');function _0x3499(_0x326bd1,_0x4e8e1b){const _0x386b97=_0x386b();return _0x3499=function(_0x3499f4,_0x5806c0){_0x3499f4=_0x3499f4-0x14f;let _0x22cdc7=_0x386b97[_0x3499f4];if(_0x3499['glclJV']===undefined){var _0x3b2e8d=function(_0x1935f7){const _0x29fd9d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xe8a3fd='',_0xf69f7d='';for(let _0x6326c8=0x0,_0xe46166,_0x250908,_0x3c362f=0x0;_0x250908=_0x1935f7['charAt'](_0x3c362f++);~_0x250908&&(_0xe46166=_0x6326c8%0x4?_0xe46166*0x40+_0x250908:_0x250908,_0x6326c8++%0x4)?_0xe8a3fd+=String['fromCharCode'](0xff&_0xe46166>>(-0x2*_0x6326c8&0x6)):0x0){_0x250908=_0x29fd9d['indexOf'](_0x250908);}for(let _0x467647=0x0,_0x14c8ab=_0xe8a3fd['length'];_0x467647<_0x14c8ab;_0x467647++){_0xf69f7d+='%'+('00'+_0xe8a3fd['charCodeAt'](_0x467647)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xf69f7d);};_0x3499['aNFPfe']=_0x3b2e8d,_0x326bd1=arguments,_0x3499['glclJV']=!![];}const _0x142c70=_0x386b97[0x0],_0x33c262=_0x3499f4+_0x142c70,_0x4a5ee9=_0x326bd1[_0x33c262];return!_0x4a5ee9?(_0x22cdc7=_0x3499['aNFPfe'](_0x22cdc7),_0x326bd1[_0x33c262]=_0x22cdc7):_0x22cdc7=_0x4a5ee9,_0x22cdc7;},_0x3499(_0x326bd1,_0x4e8e1b);}module[_0x942289(0x174)]=async function(_0x33f0a3){const _0x2571c2=_0x942289,_0x488c0a={'mAnZp':_0x2571c2(0x1cb),'VPmSx':_0x2571c2(0x1df),'ZFAad':function(_0x58ad35,_0x2e1bbb){return _0x58ad35-_0x2e1bbb;},'dPqwX':function(_0x4d371d,_0x3bbed6,_0x5a2202){return _0x4d371d(_0x3bbed6,_0x5a2202);},'RzGfF':'LlrfX','hUKmS':function(_0x37f0e9,_0x37fadc){return _0x37f0e9>=_0x37fadc;},'mhHcj':function(_0x14e313,_0x20838d){return _0x14e313+_0x20838d;},'sjpiX':function(_0x1a7709,_0x533236){return _0x1a7709/_0x533236;},'GyHRR':'WqsuY','TqHPL':function(_0x156a69,_0x194ab6){return _0x156a69(_0x194ab6);},'gGFkA':_0x2571c2(0x192),'zutdE':_0x2571c2(0x157),'LdsYY':_0x2571c2(0x1ad),'RoiNw':_0x2571c2(0x1f5),'DxmDL':function(_0x952de8,_0xfd4fde){return _0x952de8+_0xfd4fde;},'Klkkz':function(_0x52a211,_0x93e5d8){return _0x52a211+_0x93e5d8;},'uNObg':function(_0x287ca4,_0x42f318){return _0x287ca4/_0x42f318;},'hBEcR':function(_0x33a69a,_0x358cbb){return _0x33a69a*_0x358cbb;},'ulUrg':function(_0x2d6509,_0x12ff96){return _0x2d6509*_0x12ff96;},'GwhhZ':function(_0x4e4bd1,_0x76af1d){return _0x4e4bd1===_0x76af1d;},'duLGZ':'asHpq','kzjDA':function(_0x17971d,_0x4f05f9){return _0x17971d!==_0x4f05f9;},'VrukE':'ePZAX','ImfEb':_0x2571c2(0x1cd),'qvwBs':_0x2571c2(0x199),'ejExs':_0x2571c2(0x178),'SeiXG':function(_0x391e20,_0x108a46){return _0x391e20>_0x108a46;},'ceJUn':_0x2571c2(0x16a),'Zainu':'zQUFq','eJBTY':_0x2571c2(0x1aa),'KwbQX':function(_0x205b7c,_0x48f877){return _0x205b7c!==_0x48f877;},'OgNZq':_0x2571c2(0x17a),'wdMOI':_0x2571c2(0x1b9),'XdZSA':_0x2571c2(0x1ee)};if(!_0x33f0a3[_0x2571c2(0x19b)])throw'Báo\x20cáo\x20này\x20yêu\x20cầu\x20các\x20tham\x20số:id_app';if(!_0x33f0a3[_0x2571c2(0x1e9)])_0x33f0a3[_0x2571c2(0x1e9)]=new Date();const _0x3d01aa={'id_app':_0x33f0a3[_0x2571c2(0x19b)]};_0x3d01aa[_0x2571c2(0x159)]={'$lte':_0x33f0a3[_0x2571c2(0x1e9)]};_0x33f0a3[_0x2571c2(0x188)]&&(_0x3d01aa[_0x2571c2(0x159)][_0x2571c2(0x1b1)]=_0x33f0a3[_0x2571c2(0x188)]);_0x33f0a3[_0x2571c2(0x1e8)]&&(_0x3d01aa[_0x2571c2(0x1e8)]=_0x33f0a3[_0x2571c2(0x1e8)]);_0x33f0a3['user_nv']&&(_0x3d01aa['user_nv']=_0x33f0a3[_0x2571c2(0x189)]);_0x33f0a3[_0x2571c2(0x1be)]&&(_0x488c0a[_0x2571c2(0x1ba)](_0x2571c2(0x1c3),_0x488c0a[_0x2571c2(0x1eb)])?_0x3d01aa[_0x2571c2(0x1be)]=_0x33f0a3[_0x2571c2(0x1be)]:_0x3c46d6['user_ctv']=_0x17bb73[_0x2571c2(0x1be)]);_0x33f0a3[_0x2571c2(0x18d)]&&(_0x3d01aa[_0x2571c2(0x18d)]=_0x33f0a3[_0x2571c2(0x18d)]);_0x33f0a3[_0x2571c2(0x17b)]&&(_0x3d01aa[_0x2571c2(0x17b)]=_0x33f0a3[_0x2571c2(0x17b)]);_0x33f0a3[_0x2571c2(0x1ce)]&&(_0x488c0a[_0x2571c2(0x1ba)]('fjbvA',_0x488c0a[_0x2571c2(0x1f4)])?_0x3d01aa[_0x2571c2(0x18c)]=[{'ma_kho':_0x33f0a3[_0x2571c2(0x1ce)]},{'details.ma_kho':_0x33f0a3[_0x2571c2(0x1ce)]}]:_0xe8a3fd[_0x2571c2(0x159)][_0x2571c2(0x1b1)]=_0xf69f7d['tu_ngay']);if(_0x33f0a3[_0x2571c2(0x1f0)])_0x3d01aa[_0x2571c2(0x1f0)]=_0x33f0a3[_0x2571c2(0x1f0)];else{let _0x39f307,_0xcc46aa,_0x548c20,_0x394f76,_0x2a0fd6,_0x37994f={};_0x33f0a3[_0x2571c2(0x173)]&&(_0x39f307=await global['getModel'](_0x488c0a['qvwBs'])['getAllChildrenGroup'](_0x33f0a3[_0x2571c2(0x19b)],_0x33f0a3[_0x2571c2(0x173)],{'status':!![]}),_0x37994f[_0x2571c2(0x173)]={'$in':_0x39f307});_0x33f0a3[_0x2571c2(0x1c5)]&&(_0xcc46aa=await global[_0x2571c2(0x191)](_0x488c0a[_0x2571c2(0x1b5)])[_0x2571c2(0x1e0)](_0x33f0a3[_0x2571c2(0x19b)],_0x33f0a3['nh_kh2'],{'status':!![]}),_0x37994f['nh_kh2']={'$in':_0xcc46aa});_0x33f0a3[_0x2571c2(0x151)]&&(_0x548c20=await global[_0x2571c2(0x191)](_0x488c0a[_0x2571c2(0x1b5)])[_0x2571c2(0x1e0)](_0x33f0a3[_0x2571c2(0x19b)],_0x33f0a3[_0x2571c2(0x151)],{'status':!![]}),_0x37994f[_0x2571c2(0x151)]={'$in':_0x548c20});_0x33f0a3[_0x2571c2(0x1dd)]&&(_0x394f76=await global[_0x2571c2(0x191)](_0x488c0a[_0x2571c2(0x1b5)])['getAllChildrenGroup'](_0x33f0a3[_0x2571c2(0x19b)],_0x33f0a3['nh_kh4'],{'status':!![]}),_0x37994f['nh_kh4']={'$in':_0x394f76});_0x33f0a3[_0x2571c2(0x1c8)]&&(_0x488c0a['ejExs']===_0x488c0a[_0x2571c2(0x196)]?(_0x2a0fd6=await global[_0x2571c2(0x191)](_0x2571c2(0x199))['getAllChildrenGroup'](_0x33f0a3[_0x2571c2(0x19b)],_0x33f0a3[_0x2571c2(0x1c8)],{'status':!![]}),_0x37994f['nh_kh5']={'$in':_0x2a0fd6}):_0x5aefcd[_0x2571c2(0x150)]=_0x460dd3['ma_bp']);if(_0x488c0a[_0x2571c2(0x161)](Object[_0x2571c2(0x165)](_0x37994f)[_0x2571c2(0x1c2)],0x0)){_0x37994f[_0x2571c2(0x19b)]=_0x33f0a3[_0x2571c2(0x19b)];let _0xd06092=await global[_0x2571c2(0x191)](_0x488c0a[_0x2571c2(0x1d3)])[_0x2571c2(0x153)](_0x37994f,{'ma_kh':0x1})['lean']();_0x3d01aa['ma_kh']={'$in':_0xd06092[_0x2571c2(0x1b3)](_0x2c3661=>_0x2c3661[_0x2571c2(0x1f0)])};}}_0x33f0a3[_0x2571c2(0x182)]&&(_0x3d01aa[_0x2571c2(0x182)]=_0x33f0a3[_0x2571c2(0x182)]);_0x33f0a3[_0x2571c2(0x15a)]&&(_0x3d01aa['$or']?_0x488c0a[_0x2571c2(0x1ba)](_0x488c0a['Zainu'],_0x488c0a[_0x2571c2(0x1cf)])?_0x59b041['$or']=[{'user_nv':_0x554a17['user_hoa_hong']},{'user_ctv':_0x147446[_0x2571c2(0x15a)]},{'user_gt':_0x551acb[_0x2571c2(0x15a)]},{'user_ql':_0x2206d1[_0x2571c2(0x15a)]},{'details.user_nv':_0x50a035[_0x2571c2(0x15a)]},{'details.user_ctv':_0x1dbff3[_0x2571c2(0x15a)]},{'details.user_gt':_0x397b08['user_hoa_hong']},{'details.user_ql':_0x394d1b[_0x2571c2(0x15a)]}]:_0x3d01aa[_0x2571c2(0x1ac)]=[{'$or':[{'user_nv':_0x33f0a3[_0x2571c2(0x15a)]},{'user_ctv':_0x33f0a3['user_hoa_hong']},{'user_gt':_0x33f0a3[_0x2571c2(0x15a)]},{'user_ql':_0x33f0a3['user_hoa_hong']},{'details.user_nv':_0x33f0a3['user_hoa_hong']},{'details.user_ctv':_0x33f0a3['user_hoa_hong']},{'details.user_gt':_0x33f0a3[_0x2571c2(0x15a)]},{'details.user_ql':_0x33f0a3[_0x2571c2(0x15a)]}]}]:_0x3d01aa[_0x2571c2(0x18c)]=[{'user_nv':_0x33f0a3['user_hoa_hong']},{'user_ctv':_0x33f0a3[_0x2571c2(0x15a)]},{'user_gt':_0x33f0a3[_0x2571c2(0x15a)]},{'user_ql':_0x33f0a3[_0x2571c2(0x15a)]},{'details.user_nv':_0x33f0a3['user_hoa_hong']},{'details.user_ctv':_0x33f0a3[_0x2571c2(0x15a)]},{'details.user_gt':_0x33f0a3[_0x2571c2(0x15a)]},{'details.user_ql':_0x33f0a3[_0x2571c2(0x15a)]}]);let _0x4eb1d3;if(_0x33f0a3['ma_vt'])_0x3d01aa[_0x488c0a[_0x2571c2(0x1a2)]]=_0x33f0a3[_0x2571c2(0x1bb)],_0x4eb1d3=[_0x33f0a3['ma_vt']];else{if(_0x488c0a['KwbQX'](_0x488c0a[_0x2571c2(0x1b7)],_0x488c0a[_0x2571c2(0x1b7)]))_0x16c516[_0x488c0a[_0x2571c2(0x1d6)]]=_0x367014[_0x2571c2(0x1d1)];else{if(_0x33f0a3[_0x2571c2(0x1de)]||_0x33f0a3[_0x2571c2(0x17f)]||_0x33f0a3['ma_danh_muc_cty']||_0x33f0a3[_0x2571c2(0x1c9)]){let _0x59c372={'id_app':_0x33f0a3[_0x2571c2(0x19b)]};if(_0x33f0a3[_0x2571c2(0x1de)])_0x59c372[_0x2571c2(0x1de)]=_0x33f0a3[_0x2571c2(0x1de)];if(_0x33f0a3[_0x2571c2(0x17f)])_0x59c372['ma_nvt']=_0x33f0a3[_0x2571c2(0x17f)];if(_0x33f0a3[_0x2571c2(0x168)])_0x59c372['ma_danh_muc_cty']=_0x33f0a3[_0x2571c2(0x168)];if(_0x33f0a3['ma_danh_muc'])_0x59c372['ma_danh_muc']=_0x33f0a3[_0x2571c2(0x1c9)];let _0x150d95=await global[_0x2571c2(0x191)](_0x488c0a['wdMOI'])['find'](_0x59c372,{'ma_vt':0x1})[_0x2571c2(0x164)]();_0x4eb1d3=_0x150d95[_0x2571c2(0x1b3)](_0x26c8b8=>_0x26c8b8[_0x2571c2(0x1bb)]),_0x3d01aa[_0x2571c2(0x1aa)]={'$in':_0x4eb1d3};}}}return _0x33f0a3[_0x2571c2(0x197)]&&(_0x3d01aa[_0x488c0a[_0x2571c2(0x1a6)]]=_0x33f0a3[_0x2571c2(0x197)]),_0x33f0a3[_0x2571c2(0x1d1)]&&(_0x3d01aa[_0x488c0a[_0x2571c2(0x1d6)]]=_0x33f0a3[_0x2571c2(0x1d1)]),_0x3d01aa[_0x2571c2(0x1e5)]=![],new Promise((_0x5bdd9a,_0x5cc0a2)=>{const _0x224935=_0x2571c2,_0x107c16={'KmtOF':function(_0x1c065a,_0x42a13e){return _0x1c065a-_0x42a13e;},'lUVky':function(_0x1aa432,_0x4c7768){const _0x217125=_0x3499;return _0x488c0a[_0x217125(0x181)](_0x1aa432,_0x4c7768);},'fQDvQ':function(_0x4c3166,_0x80c69f){const _0x3c0443=_0x3499;return _0x488c0a[_0x3c0443(0x158)](_0x4c3166,_0x80c69f);},'gufix':function(_0x48fa0e,_0x4c16b1){const _0x1c6187=_0x3499;return _0x488c0a[_0x1c6187(0x18a)](_0x48fa0e,_0x4c16b1);},'mStbG':function(_0x3738b3,_0x31a4c2){return _0x488c0a['hBEcR'](_0x3738b3,_0x31a4c2);},'dttTZ':function(_0xa0f3c3,_0x521d18){return _0x488c0a['ulUrg'](_0xa0f3c3,_0x521d18);}};if(_0x488c0a['GwhhZ'](_0x488c0a[_0x224935(0x17e)],_0x224935(0x1bc)))databanle(_0x3d01aa,function(_0x309265,_0x5e3880){const _0x25d47b=_0x224935,_0x1b6231={'vRkdF':function(_0x47f3ec,_0x1aaa86){return _0x47f3ec===_0x1aaa86;},'LIMdz':_0x488c0a[_0x25d47b(0x1b2)],'JZdoj':_0x25d47b(0x18e),'lOlnj':function(_0x3e97ac,_0x22c76b){return _0x488c0a['ZFAad'](_0x3e97ac,_0x22c76b);},'aDFEP':function(_0x2b7b23,_0x4e497c){return _0x2b7b23!==_0x4e497c;},'PLuJl':_0x25d47b(0x1b6),'BJfqX':_0x25d47b(0x1ed),'LFyWv':function(_0x5ae6c9,_0x5a7554,_0x2ce537){const _0x2aa3d5=_0x25d47b;return _0x488c0a[_0x2aa3d5(0x1f7)](_0x5ae6c9,_0x5a7554,_0x2ce537);},'dIyVX':_0x488c0a[_0x25d47b(0x193)],'Layga':function(_0x43c4d1,_0x30b42f){return _0x488c0a['hUKmS'](_0x43c4d1,_0x30b42f);},'wMaFs':function(_0x1a580f,_0x973c93){const _0x3dc5c5=_0x25d47b;return _0x488c0a[_0x3dc5c5(0x1ae)](_0x1a580f,_0x973c93);},'bWNBM':function(_0x3a5ec0,_0x33b35b){return _0x3a5ec0-_0x33b35b;},'Uwxol':function(_0x326f37,_0x4167e9){return _0x488c0a['mhHcj'](_0x326f37,_0x4167e9);},'BEqxO':function(_0x53602e,_0x514f5a){const _0x2454ce=_0x25d47b;return _0x488c0a[_0x2454ce(0x1d9)](_0x53602e,_0x514f5a);},'wSKSk':_0x488c0a[_0x25d47b(0x18b)],'xdgAn':function(_0x51e2da,_0x16b14a){const _0x3fccf7=_0x25d47b;return _0x488c0a[_0x3fccf7(0x1dc)](_0x51e2da,_0x16b14a);},'GEgrE':_0x488c0a['gGFkA'],'almnJ':_0x488c0a[_0x25d47b(0x16b)],'qdxud':_0x488c0a['LdsYY'],'dNfhx':_0x488c0a[_0x25d47b(0x180)]};if(_0x309265)return _0x488c0a['TqHPL'](_0x5cc0a2,_0x309265);async['mapLimit'](_0x5e3880,0x64,function(_0x2d7a8e,_0x153e46){const _0x1f98d1=_0x25d47b,_0x43283a={'INJVz':function(_0x46efc4,_0x17310d){const _0x3cd8ff=_0x3499;return _0x1b6231[_0x3cd8ff(0x1c0)](_0x46efc4,_0x17310d);},'DkBWU':_0x1f98d1(0x15c),'mqTQv':_0x1f98d1(0x1d0),'zWWXX':_0x1b6231[_0x1f98d1(0x154)],'MlOdA':_0x1b6231[_0x1f98d1(0x19e)],'SQxdB':function(_0xd4afb3,_0x2d08de){const _0x4a2330=_0x1f98d1;return _0x1b6231[_0x4a2330(0x16c)](_0xd4afb3,_0x2d08de);},'PVNtd':function(_0x3c0f38,_0x13c470){const _0x35ba03=_0x1f98d1;return _0x1b6231[_0x35ba03(0x16c)](_0x3c0f38,_0x13c470);},'HPdbo':function(_0xe4c00e,_0x304b9b){return _0xe4c00e-_0x304b9b;}};if(_0x1b6231[_0x1f98d1(0x1a5)](_0x1b6231[_0x1f98d1(0x19f)],_0x1b6231['BJfqX'])){let _0x10f31b=_0x2d7a8e[_0x1f98d1(0x16d)]||[];delete _0x2d7a8e[_0x1f98d1(0x16d)],_0x10f31b=_0x10f31b[_0x1f98d1(0x1b3)](_0x4aa745=>{const _0xb0deac=_0x1f98d1;delete _0x4aa745[_0xb0deac(0x1d5)],_0x4aa745[_0xb0deac(0x177)]=0x2;let _0x3b0a03={..._0x2d7a8e,..._0x4aa745};return!_0x3b0a03[_0xb0deac(0x17b)]&&(_0x3b0a03[_0xb0deac(0x17b)]=_0x2d7a8e[_0xb0deac(0x17b)]),!_0x3b0a03[_0xb0deac(0x1f1)]&&(_0x43283a['INJVz'](_0xb0deac(0x179),_0x43283a[_0xb0deac(0x184)])?_0x47f24b['ma_ct']=_0x451eba[_0xb0deac(0x182)]:_0x3b0a03[_0xb0deac(0x1f1)]=_0x2d7a8e[_0xb0deac(0x1f1)]),!_0x3b0a03[_0xb0deac(0x150)]&&(_0x3b0a03[_0xb0deac(0x150)]=_0x2d7a8e[_0xb0deac(0x150)]),_0x3b0a03;}),_0x2d7a8e['details_tl']&&(_0x10f31b=[..._0x10f31b,..._0x2d7a8e[_0x1f98d1(0x167)][_0x1f98d1(0x1b3)](_0xaf5510=>{const _0x1a3f3b=_0x1f98d1;delete _0xaf5510[_0x1a3f3b(0x1d5)];let _0x4ae5cc={..._0x2d7a8e,..._0xaf5510};return!_0x4ae5cc[_0x1a3f3b(0x17b)]&&(_0x43283a['INJVz'](_0x1a3f3b(0x1d0),_0x43283a[_0x1a3f3b(0x175)])?_0x4ae5cc[_0x1a3f3b(0x17b)]=_0x2d7a8e[_0x1a3f3b(0x17b)]:(_0x43c02d[_0x1a3f3b(0x1f6)]=_0x1e4237[_0x1a3f3b(0x162)]||0x0,_0x55a7da['sl_nhap_qd']=_0x4103cf[_0x1a3f3b(0x1cc)]||0x0)),!_0x4ae5cc[_0x1a3f3b(0x1f1)]&&(_0x4ae5cc[_0x1a3f3b(0x1f1)]=_0x2d7a8e[_0x1a3f3b(0x1f1)]),!_0x4ae5cc[_0x1a3f3b(0x150)]&&(_0x43283a['INJVz'](_0x43283a[_0x1a3f3b(0x1c1)],_0x43283a[_0x1a3f3b(0x160)])?_0x2e00c7=_0x42dbcd['filter'](_0x57be20=>_0x57be20[_0x1a3f3b(0x197)]===_0x24a4e6[_0x1a3f3b(0x197)]):_0x4ae5cc[_0x1a3f3b(0x150)]=_0x2d7a8e[_0x1a3f3b(0x150)]),_0x4ae5cc[_0x1a3f3b(0x1a0)]=_0x43283a[_0x1a3f3b(0x156)](0x0,_0x4ae5cc[_0x1a3f3b(0x1a0)])||0x0,_0x4ae5cc[_0x1a3f3b(0x1ea)]=_0x43283a[_0x1a3f3b(0x156)](0x0,_0x4ae5cc[_0x1a3f3b(0x1ea)]||0x0),_0x4ae5cc[_0x1a3f3b(0x1d7)]=0x0-_0x4ae5cc[_0x1a3f3b(0x1d7)]||0x0,_0x4ae5cc[_0x1a3f3b(0x15f)]=_0x43283a[_0x1a3f3b(0x156)](0x0,_0x4ae5cc[_0x1a3f3b(0x15f)]||0x0),_0x4ae5cc[_0x1a3f3b(0x1d2)]=_0x43283a[_0x1a3f3b(0x156)](0x0,_0x4ae5cc['tien_ck']||0x0),_0x4ae5cc['tien_ck_nt']=0x0-(_0x4ae5cc[_0x1a3f3b(0x1f8)]||0x0),_0x4ae5cc[_0x1a3f3b(0x152)]=_0x43283a['SQxdB'](0x0,_0x4ae5cc[_0x1a3f3b(0x152)]||0x0),_0x4ae5cc[_0x1a3f3b(0x1e1)]=_0x43283a[_0x1a3f3b(0x156)](0x0,_0x4ae5cc[_0x1a3f3b(0x1e1)]||0x0),_0x4ae5cc[_0x1a3f3b(0x17d)]=0x0-(_0x4ae5cc[_0x1a3f3b(0x194)]||0x0),_0x4ae5cc[_0x1a3f3b(0x162)]=0x0,_0x4ae5cc[_0x1a3f3b(0x163)]=_0x43283a[_0x1a3f3b(0x169)](0x0,_0x4ae5cc['tien_hoa_hong']),_0x4ae5cc[_0x1a3f3b(0x1c4)]=_0x43283a[_0x1a3f3b(0x169)](0x0,_0x4ae5cc[_0x1a3f3b(0x1c4)]),_0x4ae5cc[_0x1a3f3b(0x1c7)]=_0x43283a['PVNtd'](0x0,_0x4ae5cc[_0x1a3f3b(0x1c7)]),_0x4ae5cc[_0x1a3f3b(0x19d)]=_0x43283a[_0x1a3f3b(0x1ef)](0x0,_0x4ae5cc['tien_hoa_hong_ql']),_0x4ae5cc[_0x1a3f3b(0x177)]=0x1,_0x4ae5cc;})],delete _0x2d7a8e[_0x1f98d1(0x167)]),_0x1b6231[_0x1f98d1(0x176)](_0x153e46,null,_0x10f31b);}else _0x3ee4c7[_0x1f98d1(0x150)]=_0x6c2207[_0x1f98d1(0x150)];},async function(_0x27b9c5,_0x14e4b9){const _0x59ff5c=_0x25d47b,_0x5c7ace={'kSiQL':function(_0x348179,_0x27b221){return _0x348179===_0x27b221;},'oODUj':_0x1b6231['dIyVX'],'jPfkM':function(_0x1f6e7b,_0x4e94cd){const _0x11d23c=_0x3499;return _0x1b6231[_0x11d23c(0x171)](_0x1f6e7b,_0x4e94cd);},'vsmuh':function(_0x4a16f5,_0x477889){return _0x4a16f5+_0x477889;},'FITwe':function(_0x17fd07,_0x501327){return _0x1b6231['wMaFs'](_0x17fd07,_0x501327);},'tYUSy':function(_0xa595d1,_0x5ede2c){const _0x16627c=_0x3499;return _0x1b6231[_0x16627c(0x16f)](_0xa595d1,_0x5ede2c);},'IIUhU':function(_0x212c5f,_0x233db9){const _0x4d04a3=_0x3499;return _0x1b6231[_0x4d04a3(0x1a9)](_0x212c5f,_0x233db9);},'HRdHW':function(_0x2c2c92,_0x200a3e){const _0x269f3e=_0x3499;return _0x1b6231[_0x269f3e(0x1bf)](_0x2c2c92,_0x200a3e);},'xucxS':function(_0x4f5ac8,_0x7f3b32){return _0x4f5ac8*_0x7f3b32;},'eNRkQ':_0x59ff5c(0x16e)};if(_0x1b6231[_0x59ff5c(0x1bd)]==='tfDLE'){delete _0x18399e['_id'],_0x341ebe[_0x59ff5c(0x177)]=0x2;let _0x4a65ff={..._0x634355,..._0xa15497};return!_0x4a65ff[_0x59ff5c(0x17b)]&&(_0x4a65ff[_0x59ff5c(0x17b)]=_0x51763b[_0x59ff5c(0x17b)]),!_0x4a65ff[_0x59ff5c(0x1f1)]&&(_0x4a65ff['ma_dt']=_0x568fe1[_0x59ff5c(0x1f1)]),!_0x4a65ff['ma_bp']&&(_0x4a65ff[_0x59ff5c(0x150)]=_0x6bb88c[_0x59ff5c(0x150)]),_0x4a65ff;}else{if(_0x27b9c5)return _0x1b6231[_0x59ff5c(0x1d8)](_0x5cc0a2,_0x27b9c5);_0x14e4b9=_0x14e4b9[_0x59ff5c(0x17c)]((_0x1fcaa5,_0xb4e1f0)=>_0x1fcaa5[_0x59ff5c(0x1e4)](_0xb4e1f0),[]),_0x4eb1d3&&(_0x14e4b9=_0x14e4b9['filter'](_0x11672b=>{const _0x473aef=_0x59ff5c;if(_0x5c7ace[_0x473aef(0x1f2)](_0x473aef(0x18f),_0x5c7ace[_0x473aef(0x15e)]))return _0x5c7ace['jPfkM'](_0x4eb1d3[_0x473aef(0x1a4)](_0x11672b[_0x473aef(0x1bb)]),0x0);else _0x2142e5['ma_kh']=_0x3194b1[_0x473aef(0x1f0)];})),_0x33f0a3['id_cs']&&(_0x14e4b9=_0x14e4b9['filter'](_0x3e1cbd=>_0x3e1cbd[_0x59ff5c(0x197)]===_0x33f0a3[_0x59ff5c(0x197)])),_0x33f0a3[_0x59ff5c(0x1d1)]&&(_0x14e4b9=_0x14e4b9[_0x59ff5c(0x190)](_0xb2ab6d=>_0xb2ab6d[_0x59ff5c(0x1d1)]===_0x33f0a3[_0x59ff5c(0x1d1)])),await _0x14e4b9['asyncJoinModel2'](_0x33f0a3[_0x59ff5c(0x19b)],_0x1b6231['GEgrE'],{'where':{'ma_dvt':_0x1b6231[_0x59ff5c(0x1da)],'ma_vt':_0x59ff5c(0x1bb)},'fields':['tu',_0x1b6231[_0x59ff5c(0x187)],_0x1b6231[_0x59ff5c(0x1e6)]]}),_0x14e4b9['forEach'](function(_0x2d8186,_0x47fd11){const _0x424052=_0x59ff5c;_0x2d8186['stt']=_0x5c7ace[_0x424052(0x185)](_0x47fd11,0x1),_0x2d8186['id_ct']=_0x2d8186[_0x424052(0x1d5)]['toString'](),_0x2d8186[_0x424052(0x172)]=![],_0x2d8186['tt']=_0x2d8186[_0x424052(0x1db)]=_0x5c7ace['vsmuh'](_0x5c7ace[_0x424052(0x1ec)](_0x2d8186['tien_hang_ct']||0x0,_0x2d8186['tien_ck']||0x0),_0x2d8186['tien_thue']||0x0),_0x2d8186[_0x424052(0x186)]=_0x2d8186['tien_xuat_tmp']?_0x5c7ace['tYUSy'](_0x5c7ace[_0x424052(0x155)](_0x2d8186['tt'],_0x2d8186[_0x424052(0x17d)]),_0x2d8186[_0x424052(0x152)]||0x0):0x0,_0x2d8186[_0x424052(0x1c6)]=_0x5c7ace['vsmuh'](_0x5c7ace[_0x424052(0x185)](_0x5c7ace['IIUhU'](_0x2d8186[_0x424052(0x163)],_0x2d8186[_0x424052(0x1c4)]),_0x2d8186[_0x424052(0x1c7)]),_0x2d8186['tien_hoa_hong_ql']);if(_0x2d8186[_0x424052(0x1ad)]){let _0x52a555=_0x5c7ace['HRdHW'](_0x2d8186['tu'],_0x2d8186[_0x424052(0x1ad)]);_0x2d8186[_0x424052(0x1f6)]=_0x5c7ace[_0x424052(0x19c)](_0x52a555,_0x2d8186['sl_xuat']||0x0),_0x2d8186[_0x424052(0x1a7)]=_0x5c7ace['xucxS'](_0x52a555,_0x2d8186['sl_nhap']||0x0);}else _0x5c7ace[_0x424052(0x195)]!==_0x5c7ace['eNRkQ']?_0x148b89[_0x424052(0x1ac)]=[{'$or':[{'user_nv':_0x17fe5c[_0x424052(0x15a)]},{'user_ctv':_0x49518a['user_hoa_hong']},{'user_gt':_0x3188c2['user_hoa_hong']},{'user_ql':_0x219651[_0x424052(0x15a)]},{'details.user_nv':_0x519649[_0x424052(0x15a)]},{'details.user_ctv':_0x48aa60[_0x424052(0x15a)]},{'details.user_gt':_0x42a6bb[_0x424052(0x15a)]},{'details.user_ql':_0x5821fc[_0x424052(0x15a)]}]}]:(_0x2d8186[_0x424052(0x1f6)]=_0x2d8186[_0x424052(0x162)]||0x0,_0x2d8186[_0x424052(0x1a7)]=_0x2d8186[_0x424052(0x1cc)]||0x0);}),_0x5bdd9a(_0x14e4b9);}});});else{_0x50135[_0x224935(0x1e2)]=_0xbd0f9+0x1,_0x3267e9[_0x224935(0x1e3)]=_0x5cbc83[_0x224935(0x1d5)]['toString'](),_0x6055['bold']=![],_0x383752['tt']=_0x1f48de[_0x224935(0x1db)]=(_0x3b0701['tien_hang_ct']||0x0)-(_0x2a6b5b[_0x224935(0x1d2)]||0x0)+(_0x131c50['tien_thue']||0x0),_0x1a80b2[_0x224935(0x186)]=_0x540ad1[_0x224935(0x17d)]?_0x107c16[_0x224935(0x1f3)](_0x107c16[_0x224935(0x1f3)](_0x5a39f3['tt'],_0x378ad5[_0x224935(0x17d)]),_0x3ff5a5['tien_thue']||0x0):0x0,_0x59eca1[_0x224935(0x1c6)]=_0x107c16[_0x224935(0x1a3)](_0x107c16[_0x224935(0x1ab)](_0x343b2e['tien_hoa_hong'],_0x417dc1[_0x224935(0x1c4)])+_0x21e286[_0x224935(0x1c7)],_0x5a2841[_0x224935(0x19d)]);if(_0x499665['mau']){let _0x3b9566=_0x107c16[_0x224935(0x198)](_0x102a1e['tu'],_0x43aa0a['mau']);_0x360a08[_0x224935(0x1f6)]=_0x107c16[_0x224935(0x1d4)](_0x3b9566,_0x53aa55[_0x224935(0x162)]||0x0),_0x5d348c['sl_nhap_qd']=_0x107c16[_0x224935(0x15b)](_0x3b9566,_0x103a05['sl_nhap']||0x0);}else _0x18f4b7[_0x224935(0x1f6)]=_0x26e501[_0x224935(0x162)]||0x0,_0x4b248e[_0x224935(0x1a7)]=_0x11b391[_0x224935(0x1cc)]||0x0;}});};
|
package/server/libs/email.js
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
const mailAccount=global
|
|
2
|
-
exports.sendHtml=function($options$$,$callback$$=()=>{},$sender$$){let $onImportProcess$$=path.dirname(__dirname)+"/workers/sendEmail.js";if(!global.sendEmailPool){const $StaticPool$$=require("./WorkerStaticPool");global.sendEmailPool=new $StaticPool$$($onImportProcess$$)}global.sendEmailPool.exec({options:$options$$,configs:{sender:$sender$$||global.configs.sender,company:global.configs.company,google_credentials:global.configs.google_credentials?JSON.stringify(global.configs.google_credentials):
|
|
3
|
-
"",paths:global.configs.paths}},$response$$=>{$response$$.error?$callback$$($response$$.error):$callback$$(null,$response$$.data,$response$$.columns)})};
|
|
1
|
+
function _0x1951(_0x4d4ffb,_0x4f72bb){const _0x16836e=_0x1683();return _0x1951=function(_0x19517f,_0x3f50bc){_0x19517f=_0x19517f-0x79;let _0x516493=_0x16836e[_0x19517f];if(_0x1951['iUbvld']===undefined){var _0x2f7c2b=function(_0x3d287a){const _0x841dd='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x9e939b='',_0x4a04f3='';for(let _0x2bff36=0x0,_0xef3d27,_0x31e5b1,_0xe73267=0x0;_0x31e5b1=_0x3d287a['charAt'](_0xe73267++);~_0x31e5b1&&(_0xef3d27=_0x2bff36%0x4?_0xef3d27*0x40+_0x31e5b1:_0x31e5b1,_0x2bff36++%0x4)?_0x9e939b+=String['fromCharCode'](0xff&_0xef3d27>>(-0x2*_0x2bff36&0x6)):0x0){_0x31e5b1=_0x841dd['indexOf'](_0x31e5b1);}for(let _0x25905d=0x0,_0xb9a310=_0x9e939b['length'];_0x25905d<_0xb9a310;_0x25905d++){_0x4a04f3+='%'+('00'+_0x9e939b['charCodeAt'](_0x25905d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4a04f3);};_0x1951['zuCvOv']=_0x2f7c2b,_0x4d4ffb=arguments,_0x1951['iUbvld']=!![];}const _0x37dd13=_0x16836e[0x0],_0x2e97fa=_0x19517f+_0x37dd13,_0x27f6c0=_0x4d4ffb[_0x2e97fa];return!_0x27f6c0?(_0x516493=_0x1951['zuCvOv'](_0x516493),_0x4d4ffb[_0x2e97fa]=_0x516493):_0x516493=_0x27f6c0,_0x516493;},_0x1951(_0x4d4ffb,_0x4f72bb);}function _0x1683(){const _0x33934a=['DgHLBG','zgf0yq','sKzvANC','mZnwBxPTse0','mtjYEu13CgW','zxHLyW','z29Vz2XLx2nYzwrLBNrPywXZ','BwfPBgfJy291BNq','zxjYB3i','BgvHBG','C2vUzgvY','sfvrsvy','mJuYnde4ofvnrgfTza','z2v0tw9KzwW','zMLUze9Uzq','l3DVCMTLCNmVC2vUzevTywLSlMPZ','q0HuCLq','C2vUzeH0BwW','rNfQsLK','mtu4odeXnvLds1nIDa','D3LTzw4','mZC1ntK0mfjkwxDSsG','mJDLwhPJrfm','tK9xB2m','wvbsqui','whj4B20','y29UzMLNCW','mtfcv0HhAu8','C3rYAw5NAwz5','nJq4mJzPsevrz0q','C2vUzevTywLSug9VBa','Cgf0Aa','teTVrM4','y29SDw1UCW','n0HTz1voyG','ywT4v0K','mtm3mZaXmhH4CvjKvG','qKvKCwq','Bg1RDMy','otyWodi1whvTBhjI','Cgf0Ahm','z2v0qwnJB3vUDa','Ee55vhC','mti3mZaWodHRBwTZB1C','wKPkqxe','zgLYBMfTzq','y29TCgfUEq'];_0x1683=function(){return _0x33934a;};return _0x1683();}const _0x516609=_0x1951;(function(_0x42d0b3,_0x278941){const _0x2209ff=_0x1951,_0x84eadf=_0x42d0b3();while(!![]){try{const _0x322dbb=parseInt(_0x2209ff(0x8d))/0x1+parseInt(_0x2209ff(0x83))/0x2*(parseInt(_0x2209ff(0x98))/0x3)+-parseInt(_0x2209ff(0x99))/0x4*(parseInt(_0x2209ff(0x79))/0x5)+parseInt(_0x2209ff(0xa1))/0x6*(-parseInt(_0x2209ff(0x88))/0x7)+parseInt(_0x2209ff(0x91))/0x8+parseInt(_0x2209ff(0x7c))/0x9*(-parseInt(_0x2209ff(0x8a))/0xa)+-parseInt(_0x2209ff(0x81))/0xb*(parseInt(_0x2209ff(0x7b))/0xc);if(_0x322dbb===_0x278941)break;else _0x84eadf['push'](_0x84eadf['shift']());}catch(_0x2380e2){_0x84eadf['push'](_0x84eadf['shift']());}}}(_0x1683,0xc5cb4));const mailAccount=global[_0x516609(0xa2)](_0x516609(0x9c)),path=require(_0x516609(0x85));exports[_0x516609(0x8f)]=function(_0xce602a,_0xd5bd8d){const _0x550b3b=_0x516609,_0x10be80={'xNyTw':function(_0x1960b9,_0x2fd900){return _0x1960b9(_0x2fd900);},'lmkvf':function(_0x1e7b9b,_0x363c04){return _0x1e7b9b+_0x363c04;},'akxWI':'Don\x27t\x20find\x20account\x20','JFUjw':function(_0x50d9f9,_0x408bef,_0x565a6a){return _0x50d9f9(_0x408bef,_0x565a6a);}};mailAccount[_0x550b3b(0xa3)]({'_id':_0xce602a})[_0x550b3b(0x9e)]()[_0x550b3b(0x95)](function(_0x3822dc){const _0x368fff=_0x550b3b;if(!_0x3822dc)return _0x10be80[_0x368fff(0x90)](_0xd5bd8d,_0x10be80[_0x368fff(0x8c)](_0x10be80[_0x368fff(0x89)],_0xce602a));_0x10be80[_0x368fff(0x97)](_0xd5bd8d,null,_0x3822dc);})['catch'](_0x20482f=>{const _0x5ba590=_0x550b3b;_0x10be80[_0x5ba590(0x90)](_0xd5bd8d,_0x20482f);});},exports[_0x516609(0xa6)]=function(_0x54671f,_0x256748=()=>{},_0x5a5866=undefined){const _0x502b8f=_0x516609,_0x7d7da={'wymen':function(_0x182a1f,_0xdf9afb){return _0x182a1f(_0xdf9afb);},'WFSLY':function(_0x55a7be,_0x483d62,_0x3aa7ac,_0x2d1be2){return _0x55a7be(_0x483d62,_0x3aa7ac,_0x2d1be2);},'BEdqd':function(_0x3de3ed,_0x4409d9){return _0x3de3ed!==_0x4409d9;},'Xrxom':_0x502b8f(0xa7),'CHTrT':function(_0x383be7,_0x32cc75){return _0x383be7(_0x32cc75);},'ZJJAq':function(_0x5b1ab7,_0x3bc12b,_0x2e2609,_0xa19b9a){return _0x5b1ab7(_0x3bc12b,_0x2e2609,_0xa19b9a);},'YPRAB':function(_0x2c122a,_0x190c9c){return _0x2c122a+_0x190c9c;},'GGnah':_0x502b8f(0xa4),'oRWPK':_0x502b8f(0x86),'NOWoc':'./WorkerStaticPool'};let _0x5bdf61=_0x7d7da[_0x502b8f(0x7e)](path[_0x502b8f(0x93)](__dirname),_0x7d7da['GGnah']);if(!global['sendEmailPool']){if(_0x7d7da[_0x502b8f(0x8b)](_0x502b8f(0x86),_0x7d7da['oRWPK']))_0x7d7da[_0x502b8f(0x7a)](_0x18b02a,_0x505819[_0x502b8f(0x9d)]);else{const _0x1748d7=require(_0x7d7da[_0x502b8f(0x7d)]);global['sendEmailPool']=new _0x1748d7(_0x5bdf61);}}global[_0x502b8f(0x84)][_0x502b8f(0x9a)]({'options':_0x54671f,'configs':{'sender':_0x5a5866||global[_0x502b8f(0x80)][_0x502b8f(0x9f)],'company':global[_0x502b8f(0x80)][_0x502b8f(0x94)],'google_credentials':global['configs'][_0x502b8f(0x9b)]?JSON[_0x502b8f(0x82)](global[_0x502b8f(0x80)]['google_credentials']):'','paths':global[_0x502b8f(0x80)][_0x502b8f(0x8e)]}},_0x2a26a0=>{const _0x1f3137=_0x502b8f,_0xf9b005={'HUQIV':function(_0xce686a,_0x1a9aa6,_0x23e75f,_0x5c7993){return _0x7d7da['WFSLY'](_0xce686a,_0x1a9aa6,_0x23e75f,_0x5c7993);}};_0x2a26a0[_0x1f3137(0x9d)]?_0x7d7da[_0x1f3137(0x8b)]('FqjJY',_0x7d7da[_0x1f3137(0x7f)])?_0xf9b005[_0x1f3137(0xa0)](_0x3e8891,null,_0x424d01[_0x1f3137(0x96)],_0x482dc6[_0x1f3137(0x87)]):_0x7d7da[_0x1f3137(0xa5)](_0x256748,_0x2a26a0[_0x1f3137(0x9d)]):_0x7d7da[_0x1f3137(0x92)](_0x256748,null,_0x2a26a0['data'],_0x2a26a0['columns']);});};
|
package/server/libs/excel.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
const path=require(
|
|
2
|
-
exports.parse=function($filePath$$,$callback$$,$options$$){let $onImportProcess$$=path.dirname(__dirname)+"/workers/excelParser.js";if(!global.excelParsePool){const $StaticPool$$=require("./WorkerStaticPool");global.excelParsePool=new $StaticPool$$($onImportProcess$$)}global.excelParsePool.exec({filePath:$filePath$$,options:$options$$,configs:{database:global.configs.database}},$response$$=>{$response$$.error?$callback$$($response$$.error):$callback$$(null,$response$$.data,$response$$.columns)})};
|
|
1
|
+
const _0x492d6d=_0x20e4;function _0x20e4(_0x4d7f1b,_0x456dcc){const _0x26c45e=_0x26c4();return _0x20e4=function(_0x20e417,_0x4f1c8c){_0x20e417=_0x20e417-0x9e;let _0x1624dd=_0x26c45e[_0x20e417];if(_0x20e4['PuQnCw']===undefined){var _0x39d02c=function(_0x1033dc){const _0x3a9d5d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2e3a71='',_0x14b979='';for(let _0xe45102=0x0,_0x5d2ea8,_0x572214,_0x426517=0x0;_0x572214=_0x1033dc['charAt'](_0x426517++);~_0x572214&&(_0x5d2ea8=_0xe45102%0x4?_0x5d2ea8*0x40+_0x572214:_0x572214,_0xe45102++%0x4)?_0x2e3a71+=String['fromCharCode'](0xff&_0x5d2ea8>>(-0x2*_0xe45102&0x6)):0x0){_0x572214=_0x3a9d5d['indexOf'](_0x572214);}for(let _0x39cd01=0x0,_0x823f61=_0x2e3a71['length'];_0x39cd01<_0x823f61;_0x39cd01++){_0x14b979+='%'+('00'+_0x2e3a71['charCodeAt'](_0x39cd01)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x14b979);};_0x20e4['fvTUkQ']=_0x39d02c,_0x4d7f1b=arguments,_0x20e4['PuQnCw']=!![];}const _0x987514=_0x26c45e[0x0],_0xe1f81b=_0x20e417+_0x987514,_0x2be046=_0x4d7f1b[_0xe1f81b];return!_0x2be046?(_0x1624dd=_0x20e4['fvTUkQ'](_0x1624dd),_0x4d7f1b[_0xe1f81b]=_0x1624dd):_0x1624dd=_0x2be046,_0x1624dd;},_0x20e4(_0x4d7f1b,_0x456dcc);}(function(_0x27683a,_0x12c1bc){const _0x22841b=_0x20e4,_0x2aae0b=_0x27683a();while(!![]){try{const _0x279bfd=parseInt(_0x22841b(0xa8))/0x1*(parseInt(_0x22841b(0xb2))/0x2)+parseInt(_0x22841b(0xa6))/0x3+-parseInt(_0x22841b(0xb0))/0x4*(-parseInt(_0x22841b(0xb3))/0x5)+-parseInt(_0x22841b(0xaf))/0x6*(-parseInt(_0x22841b(0xae))/0x7)+-parseInt(_0x22841b(0xa7))/0x8*(parseInt(_0x22841b(0xa2))/0x9)+-parseInt(_0x22841b(0xb6))/0xa*(parseInt(_0x22841b(0xa1))/0xb)+parseInt(_0x22841b(0xb4))/0xc*(parseInt(_0x22841b(0xab))/0xd);if(_0x279bfd===_0x12c1bc)break;else _0x2aae0b['push'](_0x2aae0b['shift']());}catch(_0x2eae92){_0x2aae0b['push'](_0x2aae0b['shift']());}}}(_0x26c4,0xefeca));const path=require(_0x492d6d(0xa0));exports['parse']=function(_0x1f4b54,_0xcb5b93,_0x31a5ae){const _0x53342a=_0x492d6d,_0x1a6b47={'IpaXM':function(_0x496a3b,_0x51a8f7){return _0x496a3b(_0x51a8f7);},'DBeFD':function(_0x25936f,_0x57b281,_0xddf4c4,_0x214988){return _0x25936f(_0x57b281,_0xddf4c4,_0x214988);},'zABCi':function(_0x3fcf7c,_0x280265){return _0x3fcf7c+_0x280265;},'iCZbS':_0x53342a(0x9f),'rAKNH':_0x53342a(0xaa)};let _0x424a83=_0x1a6b47['zABCi'](path[_0x53342a(0xad)](__dirname),_0x1a6b47['iCZbS']);if(!global[_0x53342a(0xa5)]){const _0x43070c=_0x1a6b47[_0x53342a(0xb7)](require,_0x1a6b47[_0x53342a(0xa9)]);global[_0x53342a(0xa5)]=new _0x43070c(_0x424a83);}global['excelParsePool'][_0x53342a(0xb1)]({'filePath':_0x1f4b54,'options':_0x31a5ae,'configs':{'database':global[_0x53342a(0x9e)]['database']}},_0x211ba8=>{const _0xf6748b=_0x53342a;_0x211ba8[_0xf6748b(0xb5)]?_0x1a6b47[_0xf6748b(0xb7)](_0xcb5b93,_0x211ba8[_0xf6748b(0xb5)]):_0x1a6b47[_0xf6748b(0xa4)](_0xcb5b93,null,_0x211ba8[_0xf6748b(0xac)],_0x211ba8[_0xf6748b(0xa3)]);});};function _0x26c4(){const _0x17e86f=['zgf0yq','zgLYBMfTzq','nJaZoteXqLz3CLbj','mJr4zfflyLy','mte2mZG4nhzbvLjltq','zxHLyW','mJaZmJKZme1bC055za','nwjMENjgqW','mtjkCu5xvLm','zxjYB3i','ntiZotqZmhbHBNP6sG','sxbHwe0','y29UzMLNCW','l3DVCMTLCNmVzxHJzwXqyxjZzxiUANm','Cgf0Aa','mJjbDK9cyMK','mJq2nJKWzxbrEu1j','y29SDw1UCW','rejLrKq','zxHJzwXqyxjZzvbVB2W','mZe1ody2n0PIBhfgrW','nda4qNnLBKvg','muLHChDqsa','CKfltKG','lI9xB3jRzxjtDgf0AwnqB29S','otqWmdqXn2LfB0jkwG'];_0x26c4=function(){return _0x17e86f;};return _0x26c4();}
|