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,12 +1 @@
|
|
|
1
|
-
const qts=global.getModel("qts"),qtsdieuchinh=global.getModel("qts_dieuchinh"),sotinhkh=global.getModel("sotinhkh"),async=require("async"),moment=require("moment");
|
|
2
|
-
module.exports=async function($app_condition$$,$fn$$){if($app_condition$$&&$app_condition$$.id_ts&&$app_condition$$.thang&&$app_condition$$.nam){var $id_ts$$=$app_condition$$.id_ts,$thang$$=Number($app_condition$$.thang),$nam$$=Number($app_condition$$.nam),$id_app$$=$app_condition$$.id_app,$tinh_kh_theo_ngay$$=$app_condition$$.tinh_kh_theo_ngay,$ngay_dau_thang$$=moment([$nam$$,$thang$$-1,1]).startOf("month").toDate(),$ngay_cuoi_thang$$=moment($ngay_dau_thang$$).endOf("month").toDate();$app_condition$$=
|
|
3
|
-
await global.getModel("app").findOne({_id:$app_condition$$.id_app},{options:1}).lean();if(!$app_condition$$)return $fn$$("C\u00f4ng ty n\u00e0y kh\u00f4ng t\u1ed3n t\u1ea1i");var $f_tien$$=($app_condition$$.options||{}).f_tien||0;if(await sotinhkh.findOne({id_app:$id_app$$,id_ts:$id_ts$$,ngay_cuoi_thang:{$gt:$ngay_cuoi_thang$$}}))$fn$$("K\u1ef3 t\u00ednh kh\u1ea5u hao ph\u1ea3i l\u1edbn h\u01a1n ho\u1eb7c b\u1eb1ng k\u1ef3 t\u00ednh tr\u01b0\u1edbc \u0111\u00f3");else{var $tinhgiatridakhauhao$$=function($ts$$,
|
|
4
|
-
$callback$$){setImmediate(()=>{let $query$$={id_ts:$ts$$.id_ts,id_app:$id_app$$,ngay_cuoi_thang:{$lte:$ngay_dau_thang$$}};$query$$.id_ct_tang_giam_ts=$ts$$.id_ct_tang_giam_ts;$ts$$.dieuchinh|=0;$query$$.dieuchinh=$ts$$.dieuchinh;sotinhkh.find($query$$).lean().then(function($gia_tri_da_kh_stl$$){let $gia_tri_con_lai$$;var $nguyen_gia_so_ky_da_kh$$=$gia_tri_da_kh_stl$$.length;$nguyen_gia_so_ky_da_kh$$>0?($gia_tri_da_kh_stl$$=$gia_tri_da_kh_stl$$.csum("gia_tri_kh_ky"),$gia_tri_con_lai$$=$ts$$.gia_tri_con_lai-
|
|
5
|
-
$gia_tri_da_kh_stl$$,$gia_tri_da_kh_stl$$=$ts$$.gia_tri_da_kh+$gia_tri_da_kh_stl$$):($gia_tri_da_kh_stl$$=$ts$$.gia_tri_da_kh,$gia_tri_con_lai$$=$ts$$.gia_tri_con_lai);var $gia_tri_kh_ky_so_ky_kh_con_lai$$=$ts$$.so_ky_kh-$nguyen_gia_so_ky_da_kh$$;if($gia_tri_kh_ky_so_ky_kh_con_lai$$<0||$gia_tri_con_lai$$<=0)return $callback$$(null,null);$nguyen_gia_so_ky_da_kh$$=$ts$$.nguyen_gia;$gia_tri_kh_ky_so_ky_kh_con_lai$$===0?$gia_tri_kh_ky_so_ky_kh_con_lai$$=$gia_tri_con_lai$$:($gia_tri_kh_ky_so_ky_kh_con_lai$$=
|
|
6
|
-
$ts$$.tinh_kh_gia_tri_con_lai?Math.roundBy($gia_tri_con_lai$$/$gia_tri_kh_ky_so_ky_kh_con_lai$$,$f_tien$$):$ts$$.gia_tri_kh_ky,$tinh_kh_theo_ngay$$&&$ts$$.so_ngay_of_thang!=$ts$$.so_ngay_kh&&($gia_tri_kh_ky_so_ky_kh_con_lai$$=Math.roundBy($gia_tri_kh_ky_so_ky_kh_con_lai$$/$ts$$.so_ngay_of_thang*$ts$$.so_ngay_kh,$f_tien$$)),$ts$$.lam_tron_kh<=0&&($ts$$.lam_tron_kh=1),$gia_tri_con_lai$$-$gia_tri_kh_ky_so_ky_kh_con_lai$$<=$ts$$.lam_tron_kh&&($gia_tri_kh_ky_so_ky_kh_con_lai$$=$gia_tri_con_lai$$));$callback$$(null,
|
|
7
|
-
{nguyen_gia:$nguyen_gia_so_ky_da_kh$$,gia_tri_da_kh:$gia_tri_da_kh_stl$$,gia_tri_con_lai:$gia_tri_con_lai$$,gia_tri_kh_ky:$gia_tri_kh_ky_so_ky_kh_con_lai$$,id_ts:$ts$$.id_ts,dieuchinh:$ts$$.dieuchinh,ngay_dau_thang:$ngay_dau_thang$$,ngay_cuoi_thang:$ngay_cuoi_thang$$,so_ngay_kh:$ts$$.so_ngay_kh,id_ct_tang_giam_ts:$ts$$.id_ct_tang_giam_ts,ma_tang_giam_ts:$ts$$.ma_tang_giam_ts})}).catch($e$$=>{$callback$$($e$$)})})};async.parallel({ts:function($callback$$){setImmediate(()=>{qts.findOne({_id:$id_ts$$,
|
|
8
|
-
id_app:$id_app$$}).lean().then(function($ts$$){if(!$ts$$)return $callback$$("T\u00e0i s\u1ea3n n\u00e0y kh\u00f4ng t\u1ed3n t\u1ea1i");if($ts$$.so_ky_kh<=0||$ts$$.ngay_tinh_kh>$ngay_cuoi_thang$$)return $callback$$(null,null);$ts$$.ngay_giam&&!$ts$$.ngay_thoi_kh&&($ts$$.ngay_thoi_kh=$ts$$.ngay_giam);if($ts$$.ngay_thoi_kh&&$ts$$.ngay_thoi_kh<$ngay_dau_thang$$)return $callback$$(null,null);$ts$$.ngay_thoi_kh&&$ts$$.ngay_thoi_kh<$ngay_cuoi_thang$$&&($ngay_cuoi_thang$$=$ts$$.ngay_thoi_kh);$ts$$.ngay_kh.getFullYear()==
|
|
9
|
-
$ngay_dau_thang$$.getFullYear()&&$ts$$.ngay_kh.getMonth()==$ngay_dau_thang$$.getMonth()&&($ngay_dau_thang$$=$ts$$.ngay_kh);let $so_ngay_of_thang$$=$ngay_cuoi_thang$$.getDate();$ts$$.so_ngay_of_thang=$so_ngay_of_thang$$;$ts$$.so_ngay_kh=$so_ngay_of_thang$$-$ngay_dau_thang$$.getDate()+1;$ts$$.nguyen_gia=$ts$$.details.csum("nguyen_gia");$ts$$.gia_tri_da_kh=$ts$$.details.csum("gia_tri_da_kh");$ts$$.gia_tri_con_lai=$ts$$.details.csum("gia_tri_con_lai");$ts$$.gia_tri_kh_ky=$ts$$.details.csum("gia_tri_kh_ky");
|
|
10
|
-
$ts$$.id_ts=$ts$$._id;$tinhgiatridakhauhao$$($ts$$,function($e$$,$rs$$){$callback$$($e$$,$rs$$)})}).catch($e$$=>{$callback$$($e$$)})})},dieuchinh:function($callback$$){setImmediate(()=>{let $query_dieu_chinh$$={id_ts:$id_ts$$,id_app:$id_app$$};$query_dieu_chinh$$.$or=[{nam:{$lt:$nam$$}},{nam:$nam$$,ky:{$lte:$thang$$}}];qtsdieuchinh.find($query_dieu_chinh$$).sort({ngay_ct:-1}).lean().then(async function($dieuchinhs$$){if($dieuchinhs$$.length===0)return $callback$$(null,[]);async.mapSeries($dieuchinhs$$,
|
|
11
|
-
function($dieuchinh$$,$callback$$){setImmediate(()=>{$dieuchinh$$.dieuchinh=!0;$dieuchinh$$.so_ngay_of_thang=$ngay_cuoi_thang$$.getDate();$dieuchinh$$.so_ngay_kh=$dieuchinh$$.so_ngay_of_thang;$dieuchinh$$.id_ct_tang_giam_ts=$dieuchinh$$._id.toString();$tinhgiatridakhauhao$$($dieuchinh$$,function($e$$,$rs$$){$callback$$($e$$,$rs$$)})})},async function($e$$,$rs$$){if($e$$)return $callback$$($e$$);$rs$$=$rs$$.filter($r$$=>$r$$);$callback$$(null,$rs$$)})}).catch($e$$=>{$callback$$($e$$)})})}},function($e$$,
|
|
12
|
-
$rs$$){if($e$$)return $fn$$($e$$);const $result$$=[];$rs$$.ts&&$result$$.push($rs$$.ts);$rs$$.dieuchinh&&$rs$$.dieuchinh.forEach(function($d$$){$result$$.push($d$$)});$fn$$(null,$result$$)})}}else $fn$$("L\u1ed7i: B\u00e1o c\u00e1o n\u00e0y y\u00eau c\u1ea7u c\u00e1c tham s\u1ed1: id_ts,thang,nam")};
|
|
1
|
+
const _0xc6443f=_0x2502;(function(_0x45cddd,_0x163900){const _0x27dc94=_0x2502,_0x3157fd=_0x45cddd();while(!![]){try{const _0x262ec2=parseInt(_0x27dc94(0x1ea))/0x1+parseInt(_0x27dc94(0x1f2))/0x2+-parseInt(_0x27dc94(0x21b))/0x3*(parseInt(_0x27dc94(0x28e))/0x4)+parseInt(_0x27dc94(0x261))/0x5+-parseInt(_0x27dc94(0x266))/0x6+parseInt(_0x27dc94(0x26b))/0x7+parseInt(_0x27dc94(0x274))/0x8*(-parseInt(_0x27dc94(0x267))/0x9);if(_0x262ec2===_0x163900)break;else _0x3157fd['push'](_0x3157fd['shift']());}catch(_0x5a6056){_0x3157fd['push'](_0x3157fd['shift']());}}}(_0x5983,0x8b807));function _0x5983(){const _0x24b9ef=['vfj6sLy','zLzevxm','Dg9eyxrL','z2LHx3rYAv9Kyv9RAa','AxjXAvi','wfjrDNe','t21vuu4','DvjOtey','CM91BMrcEq','ENH6zgm','DgLUAf9RAf90AgvVx25NyxK','B3b0Aw9UCW','refjz3e','D3Pnsg0','Evf5vg4','zMXTAgG','AvrZEhq','Ae5TrNC','uezZvva','t2n2uKW','z2LHx3rYAv9JB25FBgfP','ze1suuu','zgv0ywLSCW','C290Aw5OA2G','zfrgAK0','q3HKteS','BMD1EwvUx2DPyq','z2LHx3rYAv9RAf9REq','z2v0rgf0zq','tog7L2K6ieldOw8Gy8oHBYbUW6b5ihNdQNuGy+g6P3uGy8oHyYb0AgfTihpHU5e6igLKx3rZlhrOyw5Nlg5HBq','r1zXuM8','txbsqvC','z2v0tw9KzwW','tLz6Dxa','ugLoBuy','vM1jzfK','D3HWue8','zxP6weq','uK5juuC','CxrZ','qvnjEhK','uhH5vKm','Bw9Tzw50','AwrFDhm','vevKwuO','DgHHBMC','CgfYywXSzwW','ALLlv2G','CMvTufq','BMfT','y3n1Bq','BMDHEv90Ag9Px2TO','rxbIAvq','AwrFy3rFDgfUz19NAwfTx3rZ','DLvZDey','qvHit3i','s2TpyuS','Cfzpru0','svblB2m','mtm3oduWwu11ruf4','zfv5Exa','uLHwAwO','uxD5Eei','vunYzKu','ntm2mZqZmfvqCwjmuG','odu4ntfSvwT5AhC','ChvZAa','AwrFyxbW','y2f0y2G','mZyXmJu2meLdBwLYsa','C2LeC24','Dg9ut2W','u05ZuNe','wunnB0K','C3bSAxq','q3j6uwe','BMDHEv9NAwfT','s+g7SYb0W61UAcbRAog6PxuGAgfVihbO4BQJAsbS4BUBBIbOXQfUigHV4BQ3yYbI4BQXBMCGA+g7SYb0W61UAcb0CSAW4BUByYdeKCoZ','mtC2EgnREKri','q3DIwuy','D0nZrgG','Cej1yK4','nhWZFdb8mNWX','yLj0Ehe','zgLLDwnOAw5O','Dxbtu0u','sMLfAhK','yxbW','D2D1A2u','BMDHEv90Aw5Ox2TO','C29FBMDHEv9RAa','C29FBMDHEv9VzL90AgfUzW','tfDlD0K','DMfotgG','rNbtzK0','qvnoAfi','q3LpwLi','y3DlAKG','C3rHCNrpzG','u21OA28','DgLUAf9RAf9NAwfFDhjPx2nVBL9SywK','Ee50EgS','vg9cy2y','y0nLy1a','nJa0mJHQwgzTA2y','C0H2s3O','tKj1AwW','uxPQsKO','BgfTx3rYB25FA2G','BgvUz3rO','shvttfC','C1PKEfm','EefNwwu','BwfWu2vYAwvZ','qw5LyLa','nJuYmdLrDLHMu08','Dg9tDhjPBMC','Cg1SrwK','DwHNq3i','DK9ws3i','DvvHBxy','uLHyyKC','Bwjstve','mJi4mZy3nKP1shrTCW','C29FA3LFA2G','zMLUze9Uzq','u29zqwO','uMTQA20','vmoGAsbZ4BQJBIbUW6b5igTOW7rUzYb04BUtBIb04BQHAq','rvHmtxa','zM9YrwfJAa','wwvPzhO','tMLVtKe','zfPWANq','CKLeEvi','Bwz4Ee0','sgrrtgC','wxnez3a','ruzRquC','sxrtvu8','y3jnD0O','rLvrDxe','wNv1uu8','zMLSDgvY','CuzhwKC','zvfuDgm','zL90AwvU','txHHzeq','BgvHBG','vvHgDhO','zMLUza','EMjmBNa','q3rdAfe','BfnstKC','BhjdBg4','zxHWB3j0CW','BMDHEv9RAa','DgHLBG','x2LK','qNjfAeS','q2LbqwC','seviAge','s1zKAuW','zMnrCwG','mtv5EgTMyM0','zw5Kt2y','BuX0D0q','jg9Y','B0DLEvG','shndy1u','ug9tAuu','qMPOs3i','z2v0rNvSBfLLyxi','q8o0BMCGDhKGBSoGEsbRAmo0BMCGDog7K24GDog6OwK','sgLQzhu'];_0x5983=function(){return _0x24b9ef;};return _0x5983();}const qts=global['getModel'](_0xc6443f(0x24d)),qtsdieuchinh=global[_0xc6443f(0x246)]('qts_dieuchinh'),sotinhkh=global[_0xc6443f(0x246)](_0xc6443f(0x23d)),async=require('async'),moment=require(_0xc6443f(0x250));function _0x2502(_0x3d1036,_0xb74745){const _0x5983a9=_0x5983();return _0x2502=function(_0x250216,_0x3dc45e){_0x250216=_0x250216-0x1e0;let _0x34b70d=_0x5983a9[_0x250216];if(_0x2502['VJnYAg']===undefined){var _0x398e3a=function(_0x27109a){const _0xbfa267='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xd04a6b='',_0x23faef='';for(let _0x17eb7a=0x0,_0x53cd14,_0x549fb1,_0x355c37=0x0;_0x549fb1=_0x27109a['charAt'](_0x355c37++);~_0x549fb1&&(_0x53cd14=_0x17eb7a%0x4?_0x53cd14*0x40+_0x549fb1:_0x549fb1,_0x17eb7a++%0x4)?_0xd04a6b+=String['fromCharCode'](0xff&_0x53cd14>>(-0x2*_0x17eb7a&0x6)):0x0){_0x549fb1=_0xbfa267['indexOf'](_0x549fb1);}for(let _0x395d20=0x0,_0x67c27b=_0xd04a6b['length'];_0x395d20<_0x67c27b;_0x395d20++){_0x23faef+='%'+('00'+_0xd04a6b['charCodeAt'](_0x395d20)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x23faef);};_0x2502['DISXnx']=_0x398e3a,_0x3d1036=arguments,_0x2502['VJnYAg']=!![];}const _0x48bd04=_0x5983a9[0x0],_0x448893=_0x250216+_0x48bd04,_0x41680b=_0x3d1036[_0x448893];return!_0x41680b?(_0x34b70d=_0x2502['DISXnx'](_0x34b70d),_0x3d1036[_0x448893]=_0x34b70d):_0x34b70d=_0x41680b,_0x34b70d;},_0x2502(_0x3d1036,_0xb74745);}module[_0xc6443f(0x212)]=async function(_0x5ab105,_0x4129fc){const _0xed3511=_0xc6443f,_0x558bdc={'nFVBY':function(_0x571dd1,_0x13be21,_0x49dd93){return _0x571dd1(_0x13be21,_0x49dd93);},'YsDgp':function(_0x39691d,_0x345727){return _0x39691d(_0x345727);},'xgBdY':function(_0x158267,_0x4f9f32,_0x3865ae){return _0x158267(_0x4f9f32,_0x3865ae);},'pFMvy':_0xed3511(0x1f7),'PoSiE':function(_0x210ea5,_0x421930){return _0x210ea5-_0x421930;},'mfxxM':function(_0x4a2293,_0x27b996){return _0x4a2293+_0x27b996;},'QwyxB':'jzNQV','bRtxq':_0xed3511(0x203),'zxzdc':function(_0x267402,_0x7ae4e4){return _0x267402<=_0x7ae4e4;},'wCsDh':function(_0x250ce3,_0x5c8f9f){return _0x250ce3(_0x5c8f9f);},'mLtwD':function(_0x2d660b,_0x553247){return _0x2d660b(_0x553247);},'SoYAj':function(_0x40b6c8,_0x28f059,_0x4a690a){return _0x40b6c8(_0x28f059,_0x4a690a);},'wxpPO':function(_0x5246c3,_0x111513){return _0x5246c3!==_0x111513;},'fVDUs':_0xed3511(0x244),'aiykT':function(_0x1d5f8d,_0x5680d2){return _0x1d5f8d!==_0x5680d2;},'eQTtc':function(_0x5f4177,_0x29b3e0,_0x3a37fe){return _0x5f4177(_0x29b3e0,_0x3a37fe);},'wlOep':function(_0x23f98c,_0x10c7be){return _0x23f98c>_0x10c7be;},'lmWNK':function(_0x41df7c,_0x380330){return _0x41df7c===_0x380330;},'TuvCR':_0xed3511(0x225),'RXXbG':_0xed3511(0x1f8),'ToBcf':function(_0x508c89,_0x105b3f){return _0x508c89<_0x105b3f;},'MpRAW':_0xed3511(0x25a),'EnmGC':function(_0x22b767,_0x4abae4){return _0x22b767+_0x4abae4;},'NifIA':function(_0x3066fb,_0x37a5a2){return _0x3066fb-_0x37a5a2;},'HuSLW':_0xed3511(0x229),'FUQuq':'gia_tri_con_lai','XRQvq':function(_0x2c61f9,_0x433ffc,_0x16de4a){return _0x2c61f9(_0x433ffc,_0x16de4a);},'LWKwI':_0xed3511(0x23e),'toTOl':_0xed3511(0x236),'nQZVV':_0xed3511(0x235),'ZuuQO':_0xed3511(0x1fd),'CyOZR':_0xed3511(0x278),'SNsRq':function(_0x33a9be,_0x1968ca){return _0x33a9be(_0x1968ca);},'wzMHm':function(_0x1c2880,_0x15dc92){return _0x1c2880===_0x15dc92;},'TEdYJ':'OjwCQ','MxadD':function(_0x3ec0c4,_0x42bc37){return _0x3ec0c4(_0x42bc37);},'PiNmF':_0xed3511(0x1fa),'krnZl':_0xed3511(0x1f6),'dZpjt':function(_0x4ecddf,_0x33c70d){return _0x4ecddf(_0x33c70d);},'IPKoc':'month','CiAAg':_0xed3511(0x27d),'HsCcU':_0xed3511(0x224),'PxyVC':'vFxXX','CwbYF':_0xed3511(0x27c)};if(!_0x5ab105||!_0x5ab105[_0xed3511(0x251)]||!_0x5ab105[_0xed3511(0x253)]||!_0x5ab105['nam']){if(_0x558bdc[_0xed3511(0x248)]===_0x558bdc['krnZl'])return _0x558bdc['nFVBY'](_0x3d6078,null,null);else{_0x558bdc[_0xed3511(0x1fc)](_0x4129fc,_0xed3511(0x243));return;}}let _0x59b446=_0x5ab105[_0xed3511(0x251)],_0x1a0fe0=Number(_0x5ab105[_0xed3511(0x253)]),_0x4ce896=Number(_0x5ab105[_0xed3511(0x257)]),_0x5d3e5c=_0x5ab105['id_app'],_0x5da5a2=_0x5ab105[_0xed3511(0x230)],_0x37b97c=_0x558bdc[_0xed3511(0x26e)](moment,[_0x4ce896,_0x558bdc[_0xed3511(0x221)](_0x1a0fe0,0x1),0x1])[_0xed3511(0x288)](_0x558bdc[_0xed3511(0x260)])[_0xed3511(0x228)](),_0x3688bd=moment(_0x37b97c)[_0xed3511(0x21c)](_0x558bdc[_0xed3511(0x260)])[_0xed3511(0x228)]();const _0x13039a=await global[_0xed3511(0x246)](_0x558bdc[_0xed3511(0x217)])['findOne']({'_id':_0x5ab105[_0xed3511(0x269)]},{'options':0x1})[_0xed3511(0x20b)]();if(!_0x13039a)return _0x4129fc(_0x558bdc[_0xed3511(0x220)]);const _0x52f4b8=(_0x13039a[_0xed3511(0x231)]||{})[_0xed3511(0x209)]||0x0;let _0x20a3ce={'id_app':_0x5d3e5c,'id_ts':_0x59b446,'ngay_cuoi_thang':{'$gt':_0x3688bd}},_0x29b9fe=await sotinhkh[_0xed3511(0x1f4)](_0x20a3ce);if(_0x29b9fe){if(_0x558bdc[_0xed3511(0x24f)]===_0x558bdc[_0xed3511(0x275)])_0x2715f7(_0x10e273,_0x46264d);else{_0x558bdc['YsDgp'](_0x4129fc,_0xed3511(0x273));return;}}const _0x21a10d=function(_0x252393,_0x58d7f2){const _0x3d7b39=_0xed3511,_0x309022={'uRhLF':function(_0x3dfd57,_0x36a802){const _0x15f891=_0x2502;return _0x558bdc[_0x15f891(0x200)](_0x3dfd57,_0x36a802);},'pVOEM':function(_0x50b517,_0x1027df,_0x34f5b0){return _0x558bdc['xgBdY'](_0x50b517,_0x1027df,_0x34f5b0);},'gHGtq':_0x558bdc['pFMvy'],'RNIQG':function(_0x115d20,_0x44cc4a){return _0x558bdc['PoSiE'](_0x115d20,_0x44cc4a);},'RXVij':function(_0x3ea695,_0x4c340c){const _0x28ac3d=_0x2502;return _0x558bdc[_0x28ac3d(0x1fe)](_0x3ea695,_0x4c340c);},'qFGZG':function(_0x46cec7,_0x1d6fa8){return _0x46cec7===_0x1d6fa8;},'cbVsr':_0x3d7b39(0x265),'uhgCr':_0x558bdc[_0x3d7b39(0x264)],'NioNA':function(_0x11c7b8,_0x2bca86){return _0x11c7b8===_0x2bca86;},'zbLnp':_0x558bdc[_0x3d7b39(0x279)],'FpSfM':function(_0x5583e2,_0x549374){const _0x6c1461=_0x3d7b39;return _0x558bdc[_0x6c1461(0x22f)](_0x5583e2,_0x549374);},'mbRMQ':function(_0x14c641,_0x3b25b9){return _0x14c641<=_0x3b25b9;},'BPMzT':function(_0x4f21f5,_0x3076f8){const _0x399ea5=_0x3d7b39;return _0x558bdc[_0x399ea5(0x221)](_0x4f21f5,_0x3076f8);}};_0x558bdc[_0x3d7b39(0x276)](setImmediate,()=>{const _0x1992ed=_0x3d7b39,_0x3113bf={'OjKrB':function(_0x4e8cc1,_0x187e7f){return _0x309022['uRhLF'](_0x4e8cc1,_0x187e7f);},'yQyTn':function(_0x7499d8,_0x56f07e,_0x4996f1){const _0x323c95=_0x2502;return _0x309022[_0x323c95(0x25f)](_0x7499d8,_0x56f07e,_0x4996f1);},'kosYg':_0x309022['gHGtq'],'AXHOr':function(_0x1c6fe1,_0x5c894c){const _0x2547b4=_0x2502;return _0x309022[_0x2547b4(0x24c)](_0x1c6fe1,_0x5c894c);},'lSRNG':function(_0x23cd7a,_0x336ba4){const _0x53e277=_0x2502;return _0x309022[_0x53e277(0x263)](_0x23cd7a,_0x336ba4);},'ezzXD':function(_0x5b6a33,_0x323814){return _0x5b6a33!==_0x323814;},'PFsUP':_0x1992ed(0x1ec),'lhjKV':function(_0x50f19a,_0x4cf450){const _0x3a68b3=_0x1992ed;return _0x309022[_0x3a68b3(0x24c)](_0x50f19a,_0x4cf450);},'OmUQN':function(_0x1364f5,_0x6be42a){return _0x1364f5<_0x6be42a;},'irqiR':function(_0x314b12,_0x170311){return _0x314b12<=_0x170311;},'dUyyp':function(_0x527750,_0x484523){return _0x527750===_0x484523;},'ASNhR':function(_0x201e6f,_0x512781){const _0x20e673=_0x1992ed;return _0x309022[_0x20e673(0x207)](_0x201e6f,_0x512781);},'HEHha':_0x309022['cbVsr'],'OyOOU':_0x309022[_0x1992ed(0x1ed)],'siDsn':function(_0x514bb8,_0x3d25e7){const _0x503c6d=_0x1992ed;return _0x309022[_0x503c6d(0x1fb)](_0x514bb8,_0x3d25e7);},'iGmih':_0x309022[_0x1992ed(0x20e)],'OcvRL':function(_0x4382e1,_0x360105){return _0x4382e1!=_0x360105;},'vaNLh':function(_0x152afc,_0x16c946){return _0x152afc/_0x16c946;},'yWdRV':function(_0x2c47b6,_0x5a2557){const _0x457512=_0x1992ed;return _0x309022[_0x457512(0x284)](_0x2c47b6,_0x5a2557);},'kxfUw':_0x1992ed(0x249),'SoIZD':function(_0x1363af,_0x10bb2){const _0xbdbfc2=_0x1992ed;return _0x309022[_0xbdbfc2(0x1f1)](_0x1363af,_0x10bb2);},'cwKjH':function(_0x2b315c,_0x101dfe){return _0x309022['BPMzT'](_0x2b315c,_0x101dfe);},'xNtxk':_0x1992ed(0x1e7)};let _0x118edd={'id_ts':_0x252393['id_ts'],'id_app':_0x5d3e5c,'ngay_cuoi_thang':{'$lte':_0x37b97c}};_0x118edd[_0x1992ed(0x25b)]=_0x252393[_0x1992ed(0x25b)],_0x252393['dieuchinh']=_0x252393[_0x1992ed(0x27a)]|![],_0x118edd[_0x1992ed(0x27a)]=_0x252393[_0x1992ed(0x27a)],sotinhkh[_0x1992ed(0x20d)](_0x118edd)[_0x1992ed(0x20b)]()[_0x1992ed(0x214)](function(_0x5a7bc5){const _0x384fab=_0x1992ed,_0x1da918={'AnebP':_0x384fab(0x241),'fcQqh':function(_0x4f3a86,_0x12bc57){return _0x3113bf['AXHOr'](_0x4f3a86,_0x12bc57);},'VpMqj':function(_0x5967ef,_0x4fd61e){const _0xdb7f70=_0x384fab;return _0x3113bf[_0xdb7f70(0x210)](_0x5967ef,_0x4fd61e);},'vlDvt':function(_0x1d03a7,_0x36e22e,_0x25b7e7){return _0x1d03a7(_0x36e22e,_0x25b7e7);}};let _0x230f14=0x0,_0x39d32e=0x0,_0x50fd9e=_0x5a7bc5[_0x384fab(0x1e4)];_0x50fd9e>0x0?_0x3113bf[_0x384fab(0x24b)](_0x3113bf[_0x384fab(0x238)],'OjcKd')?(_0x230f14=_0x5a7bc5['csum']('gia_tri_kh_ky'),_0x39d32e=_0x3113bf['lhjKV'](_0x252393[_0x384fab(0x23a)],_0x230f14),_0x230f14=_0x252393[_0x384fab(0x229)]+_0x230f14):(_0x46c88d=_0x1a882b['gia_tri_da_kh'],_0x52d058=_0x5d5b1d[_0x384fab(0x23a)]):(_0x230f14=_0x252393[_0x384fab(0x229)],_0x39d32e=_0x252393[_0x384fab(0x23a)]);let _0x3a8ad7=_0x3113bf[_0x384fab(0x25d)](_0x252393[_0x384fab(0x1f3)],_0x50fd9e);if(_0x3113bf[_0x384fab(0x22c)](_0x3a8ad7,0x0)||_0x3113bf[_0x384fab(0x22a)](_0x39d32e,0x0))return _0x58d7f2(null,null);let _0x24b0f1=_0x252393[_0x384fab(0x240)],_0x10c4a2=0x0;if(_0x3113bf[_0x384fab(0x262)](_0x3a8ad7,0x0))_0x10c4a2=_0x39d32e;else{if(_0x3113bf[_0x384fab(0x285)](_0x3113bf[_0x384fab(0x218)],_0x384fab(0x265))){_0x252393[_0x384fab(0x28a)]?'tnIAX'!==_0x3113bf['OyOOU']?_0x10c4a2=Math[_0x384fab(0x22e)](_0x39d32e/_0x3a8ad7,_0x52f4b8):(_0x3c7254=_0x67b063['csum'](_0x1da918[_0x384fab(0x1e9)]),_0xca17bc=_0x1da918[_0x384fab(0x21a)](_0x2298a8[_0x384fab(0x23a)],_0x3e671f),_0x5f2cf8=_0x1da918['VpMqj'](_0x4e4505[_0x384fab(0x229)],_0x42b3ce)):_0x3113bf[_0x384fab(0x26c)](_0x3113bf['iGmih'],_0x384fab(0x21f))?_0x3113bf['OjKrB'](_0x5ed25b,()=>{const _0x5ceb2f=_0x384fab,_0x2e86b0={'veaPG':function(_0x5b3c68,_0x3cd8eb,_0x452ae2){return _0x5b3c68(_0x3cd8eb,_0x452ae2);}};_0x4c9ecb[_0x5ceb2f(0x27a)]=!![],_0xea58db[_0x5ceb2f(0x281)]=_0x481468[_0x5ceb2f(0x242)](),_0x1f6c3b[_0x5ceb2f(0x280)]=_0x2391c6[_0x5ceb2f(0x281)],_0x4b87dc['id_ct_tang_giam_ts']=_0xab05f7[_0x5ceb2f(0x215)]['toString'](),_0x1da918['vlDvt'](_0x25a369,_0x5d3403,function(_0x31bd82,_0x366ad5){_0x2e86b0['veaPG'](_0x10597d,_0x31bd82,_0x366ad5);});}):_0x10c4a2=_0x252393['gia_tri_kh_ky'];_0x5da5a2&&_0x3113bf[_0x384fab(0x239)](_0x252393[_0x384fab(0x281)],_0x252393['so_ngay_kh'])&&(_0x10c4a2=Math[_0x384fab(0x22e)](_0x3113bf[_0x384fab(0x283)](_0x10c4a2,_0x252393['so_ngay_of_thang'])*_0x252393['so_ngay_kh'],_0x52f4b8));if(_0x3113bf['yWdRV'](_0x252393[_0x384fab(0x1e3)],0x0)){if(_0x3113bf[_0x384fab(0x24b)](_0x3113bf['kxfUw'],_0x384fab(0x247)))_0x252393['lam_tron_kh']=0x1;else return _0x3113bf[_0x384fab(0x234)](_0x2b81a2,null,null);}if(_0x3113bf['SoIZD'](_0x3113bf[_0x384fab(0x287)](_0x39d32e,_0x10c4a2),_0x252393[_0x384fab(0x1e3)])){if(_0x3113bf[_0x384fab(0x26c)](_0x384fab(0x1e2),_0x3113bf[_0x384fab(0x28b)]))return _0x76f146(_0x3113bf['kosYg']);else _0x10c4a2=_0x39d32e;}}else _0x2ec322[_0x384fab(0x259)]=_0x5dfbd6[_0x384fab(0x272)];}_0x3113bf['yQyTn'](_0x58d7f2,null,{'nguyen_gia':_0x24b0f1,'gia_tri_da_kh':_0x230f14,'gia_tri_con_lai':_0x39d32e,'gia_tri_kh_ky':_0x10c4a2,'id_ts':_0x252393['id_ts'],'dieuchinh':_0x252393['dieuchinh'],'ngay_dau_thang':_0x37b97c,'ngay_cuoi_thang':_0x3688bd,'so_ngay_kh':_0x252393['so_ngay_kh'],'id_ct_tang_giam_ts':_0x252393[_0x384fab(0x25b)],'ma_tang_giam_ts':_0x252393['ma_tang_giam_ts']});})[_0x1992ed(0x26a)](_0x5340ae=>{const _0xb9d6f8=_0x1992ed;_0x309022[_0xb9d6f8(0x22d)](_0x58d7f2,_0x5340ae);});});};async[_0xed3511(0x254)]({'ts':function(_0xd69d07){const _0x22326b=_0xed3511,_0x305a11={'BrEhK':function(_0x478f3b,_0x369dcc){const _0x40c91f=_0x2502;return _0x558bdc[_0x40c91f(0x21d)](_0x478f3b,_0x369dcc);},'BjhKr':function(_0x2785ba,_0x495172,_0x2893b4){const _0x550b65=_0x2502;return _0x558bdc[_0x550b65(0x1f5)](_0x2785ba,_0x495172,_0x2893b4);},'ItSUO':function(_0x5071a4,_0x139fe3){const _0x1dc106=_0x2502;return _0x558bdc[_0x1dc106(0x24a)](_0x5071a4,_0x139fe3);},'IVkHu':_0x558bdc[_0x22326b(0x227)],'CtChQ':function(_0x3b62db,_0x3383a4){return _0x558bdc['aiykT'](_0x3b62db,_0x3383a4);},'ASIxy':'AjnuX','sHvKz':function(_0x451940,_0x2464f9){return _0x451940<=_0x2464f9;},'Smhko':function(_0x1a0283,_0x1a9cb8,_0x26f528){const _0x5814e9=_0x22326b;return _0x558bdc[_0x5814e9(0x208)](_0x1a0283,_0x1a9cb8,_0x26f528);},'DAIgq':function(_0x1c1018,_0x3cfbbc){return _0x558bdc['wlOep'](_0x1c1018,_0x3cfbbc);},'jYKWh':function(_0x3d96b5,_0x231198){return _0x558bdc['lmWNK'](_0x3d96b5,_0x231198);},'YCMoI':_0x558bdc['TuvCR'],'gbMhf':_0x558bdc[_0x22326b(0x1f0)],'KVdiL':function(_0x561181,_0x2a5f61,_0x3f982a){return _0x558bdc['SoYAj'](_0x561181,_0x2a5f61,_0x3f982a);},'SwALF':function(_0x133f0a,_0x154d39){const _0x58c8bc=_0x22326b;return _0x558bdc[_0x58c8bc(0x28c)](_0x133f0a,_0x154d39);},'wNqgp':_0x558bdc[_0x22326b(0x245)],'hNmFw':function(_0xbb3052,_0x5d3e7c){return _0x558bdc['EnmGC'](_0xbb3052,_0x5d3e7c);},'cCecP':function(_0x4a2079,_0x24ae71){return _0x558bdc['NifIA'](_0x4a2079,_0x24ae71);},'NBuil':_0x22326b(0x240),'GvXhi':_0x558bdc[_0x22326b(0x1e5)],'upSSE':_0x558bdc[_0x22326b(0x204)],'HdQLg':_0x22326b(0x241),'CrzQa':function(_0x457867,_0x747576,_0x1fff7c){const _0x14c6b8=_0x22326b;return _0x558bdc[_0x14c6b8(0x22b)](_0x457867,_0x747576,_0x1fff7c);},'WzqBl':function(_0xb5d984,_0x2d7418){const _0x2fd9f0=_0x22326b;return _0x558bdc[_0x2fd9f0(0x24a)](_0xb5d984,_0x2d7418);},'EFkAG':_0x558bdc[_0x22326b(0x282)],'BJEDF':_0x558bdc[_0x22326b(0x26d)]};_0x558bdc[_0x22326b(0x21d)](setImmediate,()=>{const _0x3d7774=_0x22326b,_0x503bf7={'uUamv':function(_0x543608,_0x3d6f49,_0x4a0f8a){const _0xa2e8e3=_0x2502;return _0x305a11[_0xa2e8e3(0x289)](_0x543608,_0x3d6f49,_0x4a0f8a);}};qts[_0x3d7774(0x1f4)]({'_id':_0x59b446,'id_app':_0x5d3e5c})['lean']()[_0x3d7774(0x214)](function(_0x56e0ad){const _0x3cc95d=_0x3d7774,_0x151ebf={'dfyyl':function(_0x2cbd45,_0x2a5138){const _0x33e817=_0x2502;return _0x305a11[_0x33e817(0x216)](_0x2cbd45,_0x2a5138);},'KioQH':function(_0x20225c,_0x95e490,_0x134a2d){const _0x2097cd=_0x2502;return _0x305a11[_0x2097cd(0x222)](_0x20225c,_0x95e490,_0x134a2d);}};if(_0x305a11[_0x3cc95d(0x202)](_0x3cc95d(0x256),_0x305a11['IVkHu'])){if(!_0x56e0ad)return _0x305a11[_0x3cc95d(0x20f)](_0x305a11[_0x3cc95d(0x24e)],_0x3cc95d(0x23f))?_0x305a11[_0x3cc95d(0x216)](_0xd69d07,_0x3cc95d(0x1f7)):_0x503bf7[_0x3cc95d(0x1ef)](_0x29ab4a,null,null);if(_0x305a11[_0x3cc95d(0x1e0)](_0x56e0ad[_0x3cc95d(0x1f3)],0x0))return _0x305a11[_0x3cc95d(0x289)](_0xd69d07,null,null);if(_0x305a11[_0x3cc95d(0x232)](_0x56e0ad[_0x3cc95d(0x27f)],_0x3688bd)){if(_0x305a11['jYKWh'](_0x305a11[_0x3cc95d(0x26f)],_0x305a11['gbMhf']))_0x4d69d6(_0x561d02);else return _0x305a11[_0x3cc95d(0x219)](_0xd69d07,null,null);}_0x56e0ad[_0x3cc95d(0x272)]&&!_0x56e0ad[_0x3cc95d(0x259)]&&(_0x56e0ad[_0x3cc95d(0x259)]=_0x56e0ad[_0x3cc95d(0x272)]);if(_0x56e0ad['ngay_thoi_kh']&&_0x305a11['SwALF'](_0x56e0ad[_0x3cc95d(0x259)],_0x37b97c))return _0x305a11['Smhko'](_0xd69d07,null,null);if(_0x56e0ad['ngay_thoi_kh']&&_0x56e0ad['ngay_thoi_kh']<_0x3688bd){if(_0x305a11[_0x3cc95d(0x255)]('eqWtq',_0x305a11['wNqgp'])){if(_0x2463d2)return _0x151ebf['dfyyl'](_0x49ccdb,_0x52aa1b);const _0x22133f=[];if(_0x10f04d['ts'])_0x22133f[_0x3cc95d(0x268)](_0x2625e3['ts']);_0x4db268[_0x3cc95d(0x27a)]&&_0x21c20c[_0x3cc95d(0x27a)]['forEach'](function(_0x3f6498){const _0x700364=_0x3cc95d;_0x22133f[_0x700364(0x268)](_0x3f6498);}),_0x151ebf['KioQH'](_0xc28fa9,null,_0x22133f);}else _0x3688bd=_0x56e0ad[_0x3cc95d(0x259)];}_0x56e0ad[_0x3cc95d(0x213)]['getFullYear']()==_0x37b97c[_0x3cc95d(0x223)]()&&_0x56e0ad[_0x3cc95d(0x213)]['getMonth']()==_0x37b97c['getMonth']()&&(_0x37b97c=_0x56e0ad[_0x3cc95d(0x213)]);let _0x34908b=_0x3688bd[_0x3cc95d(0x242)]();_0x56e0ad[_0x3cc95d(0x281)]=_0x34908b,_0x56e0ad[_0x3cc95d(0x280)]=_0x305a11[_0x3cc95d(0x237)](_0x305a11[_0x3cc95d(0x28d)](_0x34908b,_0x37b97c[_0x3cc95d(0x242)]()),0x1),_0x56e0ad[_0x3cc95d(0x240)]=_0x56e0ad['details'][_0x3cc95d(0x258)](_0x305a11[_0x3cc95d(0x1e1)]),_0x56e0ad[_0x3cc95d(0x229)]=_0x56e0ad[_0x3cc95d(0x23c)]['csum'](_0x305a11['GvXhi']),_0x56e0ad[_0x3cc95d(0x23a)]=_0x56e0ad[_0x3cc95d(0x23c)][_0x3cc95d(0x258)](_0x305a11[_0x3cc95d(0x27b)]),_0x56e0ad[_0x3cc95d(0x241)]=_0x56e0ad[_0x3cc95d(0x23c)][_0x3cc95d(0x258)](_0x305a11[_0x3cc95d(0x1ff)]),_0x56e0ad[_0x3cc95d(0x251)]=_0x56e0ad[_0x3cc95d(0x215)],_0x305a11[_0x3cc95d(0x271)](_0x21a10d,_0x56e0ad,function(_0x396938,_0x2966ee){_0xd69d07(_0x396938,_0x2966ee);});}else _0x199c6a=_0x4e70b4['roundBy'](_0x10febd/_0x221a1d[_0x3cc95d(0x281)]*_0x28b7f1[_0x3cc95d(0x280)],_0x4d62c1);})[_0x3d7774(0x26a)](_0x28d85b=>{const _0x48c970=_0x3d7774;_0x305a11['WzqBl'](_0x305a11[_0x48c970(0x201)],_0x305a11['BJEDF'])?_0x305a11['BrEhK'](_0xd69d07,_0x28d85b):_0x4e1931=_0x31f60a[_0x48c970(0x241)];});});},'dieuchinh':function(_0x6127f4){const _0x345fbd=_0xed3511,_0x1a1db5={'PFuWr':_0x558bdc['nQZVV'],'dMRQE':_0x558bdc[_0x345fbd(0x205)],'sZdxS':_0x558bdc[_0x345fbd(0x286)],'TRzJV':function(_0x54fe89,_0x9f2f22,_0x2850e0){return _0x54fe89(_0x9f2f22,_0x2850e0);},'lrCln':function(_0x4ff9d3,_0x314a4b){return _0x558bdc['SNsRq'](_0x4ff9d3,_0x314a4b);}};_0x558bdc[_0x345fbd(0x26e)](setImmediate,()=>{const _0x2312dc=_0x345fbd,_0x416f5d={'vUstF':function(_0xe9506a,_0x281115){const _0x85d474=_0x2502;return _0x1a1db5[_0x85d474(0x211)](_0xe9506a,_0x281115);}};let _0x9230e8={'id_ts':_0x59b446,'id_app':_0x5d3e5c};_0x9230e8[_0x2312dc(0x21e)]=[{'nam':{'$lt':_0x4ce896}},{'nam':_0x4ce896,'ky':{'$lte':_0x1a0fe0}}],qtsdieuchinh['find'](_0x9230e8)['sort']({'ngay_ct':-0x1})[_0x2312dc(0x20b)]()[_0x2312dc(0x214)](async function(_0x57b14a){const _0xa0bc3b=_0x2312dc,_0x1ddb9f={'UXFtz':_0x1a1db5['PFuWr'],'KkOaK':_0x1a1db5[_0xa0bc3b(0x23b)],'wguke':_0x1a1db5[_0xa0bc3b(0x1e6)],'whoXl':function(_0x2a2946,_0x4035ea,_0x5128f1){const _0x5b9873=_0xa0bc3b;return _0x1a1db5[_0x5b9873(0x226)](_0x2a2946,_0x4035ea,_0x5128f1);},'vOVKr':function(_0x1c4b7e,_0x195817){const _0x1c1fa5=_0xa0bc3b;return _0x1a1db5[_0x1c1fa5(0x211)](_0x1c4b7e,_0x195817);}};if(_0x57b14a['length']===0x0)return _0x6127f4(null,[]);async[_0xa0bc3b(0x1e8)](_0x57b14a,function(_0x147715,_0x4510d3){const _0x509ea5=_0xa0bc3b,_0x89b5ef={'pBubN':function(_0x5845d1,_0x7e0d95,_0x2b24cb){return _0x1ddb9f['whoXl'](_0x5845d1,_0x7e0d95,_0x2b24cb);}};_0x1ddb9f[_0x509ea5(0x1ee)](setImmediate,()=>{const _0x489e01=_0x509ea5;if(_0x1ddb9f[_0x489e01(0x20c)]===_0x1ddb9f[_0x489e01(0x25e)])_0x30c1d2=_0x415ab4[_0x489e01(0x259)];else{const _0x5d2abe=_0x1ddb9f[_0x489e01(0x27e)][_0x489e01(0x270)]('|');let _0x2fac03=0x0;while(!![]){switch(_0x5d2abe[_0x2fac03++]){case'0':_0x147715[_0x489e01(0x280)]=_0x147715[_0x489e01(0x281)];continue;case'1':_0x1ddb9f['whoXl'](_0x21a10d,_0x147715,function(_0x6ee0b6,_0x38d76b){const _0x598478=_0x489e01;_0x89b5ef[_0x598478(0x277)](_0x4510d3,_0x6ee0b6,_0x38d76b);});continue;case'2':_0x147715[_0x489e01(0x25b)]=_0x147715['_id'][_0x489e01(0x1eb)]();continue;case'3':_0x147715[_0x489e01(0x281)]=_0x3688bd[_0x489e01(0x242)]();continue;case'4':_0x147715['dieuchinh']=!![];continue;}break;}}});},async function(_0x5bca83,_0x1b7288){const _0xd27ff7=_0xa0bc3b;if(_0x5bca83)return _0x6127f4(_0x5bca83);_0x1b7288=_0x1b7288[_0xd27ff7(0x206)](_0x4b4509=>_0x4b4509),_0x6127f4(null,_0x1b7288);});})[_0x2312dc(0x26a)](_0x56205e=>{const _0x409125=_0x2312dc;_0x416f5d[_0x409125(0x25c)](_0x6127f4,_0x56205e);});});}},function(_0x2b88bf,_0x44b4f5){const _0x7149f2=_0xed3511;if(_0x558bdc[_0x7149f2(0x233)](_0x558bdc[_0x7149f2(0x252)],'OjwCQ')){if(_0x2b88bf)return _0x558bdc[_0x7149f2(0x20a)](_0x4129fc,_0x2b88bf);const _0x28b896=[];if(_0x44b4f5['ts'])_0x28b896[_0x7149f2(0x268)](_0x44b4f5['ts']);_0x44b4f5[_0x7149f2(0x27a)]&&_0x44b4f5[_0x7149f2(0x27a)][_0x7149f2(0x1f9)](function(_0x1e333b){const _0x226d92=_0x7149f2;_0x28b896[_0x226d92(0x268)](_0x1e333b);}),_0x558bdc[_0x7149f2(0x1f5)](_0x4129fc,null,_0x28b896);}else _0x33afe2(_0xa98591);});};
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
const qts=global.getModel("qts"),sotinhkh=global.getModel("sotinhkh"),tinhkhauhao1ts=require("./tinhkhauhao1ts"),async=require("async"),underscore=require("underscore"),moment=require("moment");
|
|
2
|
-
module.exports=async function($condition$$,$fn$$){if($condition$$&&$condition$$.thang&&$condition$$.nam&&$condition$$.id_app){var $ngay_dau_thang_query_check_query_ts$$=moment([$condition$$.nam,$condition$$.thang-1,1]).startOf("month").toDate(),$ngay_cuoi_thang$$=moment($ngay_dau_thang_query_check_query_ts$$).endOf("month").toDate();$ngay_dau_thang_query_check_query_ts$$={id_app:$condition$$.id_app,ngay_cuoi_thang:{$gt:$ngay_cuoi_thang$$}};$condition$$.id_ts&&($ngay_dau_thang_query_check_query_ts$$.id_ts=
|
|
3
|
-
$condition$$.id_ts);await sotinhkh.findOne($ngay_dau_thang_query_check_query_ts$$)?$fn$$("K\u1ef3 t\u00ednh kh\u1ea5u hao ph\u1ea3i l\u1edbn h\u01a1n ho\u1eb7c b\u1eb1ng k\u1ef3 t\u00ednh tr\u01b0\u1edbc \u0111\u00f3"):($condition$$.tinh_kh_theo_ngay===void 0&&($condition$$.tinh_kh_theo_ngay=!0),$ngay_dau_thang_query_check_query_ts$$={id_app:$condition$$.id_app,ngay_kh:{$lte:$ngay_cuoi_thang$$}},$condition$$.id_ts&&($ngay_dau_thang_query_check_query_ts$$._id=$condition$$.id_ts),qts.find($ngay_dau_thang_query_check_query_ts$$).lean().then(function($tss$$){async.map($tss$$,
|
|
4
|
-
function($ts$$,$callback$$){setImmediate(()=>{const $c$$={};underscore.extend($c$$,$condition$$);$c$$.id_ts=$ts$$._id;sotinhkh.findOne({id_app:$c$$.id_app,id_ts:$c$$.id_ts,nam:$c$$.nam,thang:$c$$.thang},function($error$$,$stkh$$){if($error$$)return $callback$$($error$$);if($stkh$$&&$stkh$$.sua_kh)return $callback$$(null,$stkh$$);sotinhkh.deleteMany({id_app:$c$$.id_app,id_ts:$c$$.id_ts,nam:$c$$.nam,thang:$c$$.thang},function($error$$){if($error$$)return $callback$$($error$$);tinhkhauhao1ts($c$$,function($error$$,
|
|
5
|
-
$rs$$){if($error$$)return $callback$$($error$$);if(!$rs$$)return $callback$$(null,null);async.mapSeries($rs$$,function($r$$,$callback$$){setImmediate(()=>{$r$$.id_app=$c$$.id_app;$r$$.nam=$c$$.nam;$r$$.thang=$c$$.thang;sotinhkh.create($r$$,function($error$$,$kq$$){if($error$$)return $callback$$($error$$);$kq$$=$kq$$.toObject();$kq$$.ten_ts=$ts$$.ten_ts;$kq$$.ma_ct=$ts$$.ma_ct;$kq$$.tk_cp=$ts$$.tk_cp;$kq$$.tk_kh=$ts$$.tk_kh;$kq$$.ma_bp=$ts$$.ma_bp;$kq$$.ma_phi=$ts$$.ma_phi;$kq$$.ma_dt=$ts$$.ma_dt;
|
|
6
|
-
$kq$$.ma_hd=$ts$$.ma_hd;$kq$$.ma_kho=$ts$$.ma_kho;$callback$$(null,$kq$$)})})},function($e$$,$rs$$){$callback$$($e$$,$rs$$)})})})})})},function($error$$,$rs$$){if($error$$)return $fn$$($error$$);setImmediate(async()=>{const $result$$=[];$rs$$.forEach(function($r$$){$r$$.forEach(function($r1$$){$result$$.push($r1$$)})});await $result$$.filter($r$$=>$r$$.ma_tang_giam_ts).asyncJoinModel2($condition$$.id_app,"dmtanggiamts",{where:"ma_tang_giam_ts",fields:{kieu_dc:"kieu"}});$result$$.forEach($r$$=>{$r$$.kieu_dc==
|
|
7
|
-
"2"&&($r$$.nguyen_gia=0-$r$$.nguyen_gia,$r$$.gia_tri_da_kh=0-$r$$.gia_tri_da_kh,$r$$.gia_tri_con_lai=0-$r$$.gia_tri_con_lai,$r$$.gia_tri_kh_ky=0-$r$$.gia_tri_kh_ky)});async.map($result$$,($t$$,$callback$$)=>{setImmediate(async()=>{let $bpsd$$;try{$bpsd$$=await qts.bophansudung($t$$.id_app,$t$$.id_ts,$ngay_cuoi_thang$$)}catch($e$$){$bpsd$$=[{ma_bp:$t$$.ma_bp,so_luong:$t$$.so_luong||1}]}$bpsd$$=await $bpsd$$.asyncGroupBy(["ma_bp"],["so_luong"]);$bpsd$$=$bpsd$$.map($bp$$=>{let $he_so$$=$bp$$.so_luong/
|
|
8
|
-
($t$$.so_luong||1);$bp$$={...$t$$,...$bp$$};$bp$$.nguyen_gia*=$he_so$$;$bp$$.gia_tri_da_kh*=$he_so$$;$bp$$.gia_tri_con_lai*=$he_so$$;$bp$$.gia_tri_kh_ky*=$he_so$$;return $bp$$});$callback$$(null,$bpsd$$)})},async($e$$,$rs$$)=>{if($e$$)return $fn$$($e$$);$e$$=$rs$$.reduce(($a$$,$b$$)=>$a$$.concat($b$$),[]);$fn$$(null,$e$$)})})})}).catch($e$$=>{$fn$$($e$$)}))}else $fn$$("L\u1ed7i: B\u00e1o c\u00e1o n\u00e0y y\u00eau c\u1ea7u c\u00e1c tham s\u1ed1: so_the_ts,thang,nam,id_app")};
|
|
1
|
+
function _0xeaaa(_0x5bfd40,_0x38139a){const _0x5baa6b=_0x5baa();return _0xeaaa=function(_0xeaaabc,_0x2abe51){_0xeaaabc=_0xeaaabc-0x1d0;let _0x29672c=_0x5baa6b[_0xeaaabc];if(_0xeaaa['lgSXxr']===undefined){var _0x4dc5c7=function(_0x534c87){const _0x3c1dfe='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xf0db57='',_0x3eb615='';for(let _0x47a5b2=0x0,_0x4a6c0f,_0x4cc679,_0x4d06ae=0x0;_0x4cc679=_0x534c87['charAt'](_0x4d06ae++);~_0x4cc679&&(_0x4a6c0f=_0x47a5b2%0x4?_0x4a6c0f*0x40+_0x4cc679:_0x4cc679,_0x47a5b2++%0x4)?_0xf0db57+=String['fromCharCode'](0xff&_0x4a6c0f>>(-0x2*_0x47a5b2&0x6)):0x0){_0x4cc679=_0x3c1dfe['indexOf'](_0x4cc679);}for(let _0x1257ff=0x0,_0x4a14f2=_0xf0db57['length'];_0x1257ff<_0x4a14f2;_0x1257ff++){_0x3eb615+='%'+('00'+_0xf0db57['charCodeAt'](_0x1257ff)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3eb615);};_0xeaaa['LetmQw']=_0x4dc5c7,_0x5bfd40=arguments,_0xeaaa['lgSXxr']=!![];}const _0x3e435b=_0x5baa6b[0x0],_0x243f31=_0xeaaabc+_0x3e435b,_0x1a1627=_0x5bfd40[_0x243f31];return!_0x1a1627?(_0x29672c=_0xeaaa['LetmQw'](_0x29672c),_0x5bfd40[_0x243f31]=_0x29672c):_0x29672c=_0x1a1627,_0x29672c;},_0xeaaa(_0x5bfd40,_0x38139a);}const _0x454fb3=_0xeaaa;(function(_0x52bc1e,_0x436b7a){const _0x273e15=_0xeaaa,_0x212816=_0x52bc1e();while(!![]){try{const _0x2055b1=-parseInt(_0x273e15(0x1d7))/0x1+-parseInt(_0x273e15(0x1e2))/0x2*(parseInt(_0x273e15(0x26e))/0x3)+parseInt(_0x273e15(0x209))/0x4+parseInt(_0x273e15(0x26b))/0x5*(-parseInt(_0x273e15(0x22c))/0x6)+parseInt(_0x273e15(0x1dd))/0x7*(-parseInt(_0x273e15(0x230))/0x8)+parseInt(_0x273e15(0x259))/0x9*(parseInt(_0x273e15(0x215))/0xa)+parseInt(_0x273e15(0x221))/0xb*(parseInt(_0x273e15(0x1dc))/0xc);if(_0x2055b1===_0x436b7a)break;else _0x212816['push'](_0x212816['shift']());}catch(_0x21f1bd){_0x212816['push'](_0x212816['shift']());}}}(_0x5baa,0x585ba));const qts=global['getModel'](_0x454fb3(0x1de)),sotinhkh=global[_0x454fb3(0x1d9)](_0x454fb3(0x23c)),tinhkhauhao1ts=require('./tinhkhauhao1ts'),async=require(_0x454fb3(0x1f2)),underscore=require(_0x454fb3(0x20a)),moment=require(_0x454fb3(0x1d4));module[_0x454fb3(0x228)]=async function(_0xb9fba7,_0x2b9864){const _0x4acac2=_0x454fb3,_0x29b312={'SUvCf':function(_0x203eb7,_0x59a9c4){return _0x203eb7(_0x59a9c4);},'sHesD':function(_0x7f80db,_0x3bf5de){return _0x7f80db(_0x3bf5de);},'TBtCw':_0x4acac2(0x204),'ycVuw':'7|8|1|10|6|11|9|3|4|2|5|0','ETniW':'ncZZY','wMTlW':function(_0x2dd8ff,_0x41a472){return _0x2dd8ff!==_0x41a472;},'GywoL':_0x4acac2(0x24f),'nWPnD':function(_0x152ad9,_0x43ed32){return _0x152ad9===_0x43ed32;},'meQBF':function(_0x54add4,_0x2ee215){return _0x54add4-_0x2ee215;},'cWzHm':function(_0x24f276,_0x51ef90){return _0x24f276*_0x51ef90;},'jTBfE':_0x4acac2(0x1df),'docbL':'zfvrA','IYpSn':_0x4acac2(0x256),'VMrwm':_0x4acac2(0x1fc),'gHSXm':function(_0x1701ee,_0xc31447){return _0x1701ee!==_0xc31447;},'ebYMi':'wiXhF','gvkFw':function(_0x5b0a93,_0x78b519){return _0x5b0a93(_0x78b519);},'ziZSs':_0x4acac2(0x21d),'AlcuW':function(_0xa83c32,_0x9431b6){return _0xa83c32-_0x9431b6;},'pwPTf':_0x4acac2(0x223),'mcOYk':_0x4acac2(0x251),'sxrjE':function(_0x35147e,_0xba53ba){return _0x35147e===_0xba53ba;}};if(!_0xb9fba7||!_0xb9fba7[_0x4acac2(0x23e)]||!_0xb9fba7[_0x4acac2(0x24d)]||!_0xb9fba7[_0x4acac2(0x205)]){if(_0x29b312['gHSXm'](_0x29b312[_0x4acac2(0x265)],_0x29b312['ebYMi']))_0x29b312[_0x4acac2(0x225)](_0x41db91,_0xe9cec5);else{_0x29b312[_0x4acac2(0x1ff)](_0x2b9864,_0x29b312[_0x4acac2(0x220)]);return;}}const _0xb85c2a=moment([_0xb9fba7['nam'],_0x29b312['AlcuW'](_0xb9fba7[_0x4acac2(0x23e)],0x1),0x1])[_0x4acac2(0x1d6)](_0x29b312[_0x4acac2(0x22a)])['toDate'](),_0x4c6d1f=_0x29b312[_0x4acac2(0x1ff)](moment,_0xb85c2a)[_0x4acac2(0x222)](_0x29b312[_0x4acac2(0x22a)])[_0x4acac2(0x20d)]();let _0x22168b={'id_app':_0xb9fba7[_0x4acac2(0x205)],'ngay_cuoi_thang':{'$gt':_0x4c6d1f}};_0xb9fba7['id_ts']&&(_0x22168b[_0x4acac2(0x232)]=_0xb9fba7[_0x4acac2(0x232)]);let _0x3d21aa=await sotinhkh[_0x4acac2(0x237)](_0x22168b);if(_0x3d21aa){if(_0x29b312[_0x4acac2(0x1e7)](_0x29b312['mcOYk'],_0x4acac2(0x251))){_0x29b312[_0x4acac2(0x225)](_0x2b9864,_0x4acac2(0x1d8));return;}else{_0x29b312[_0x4acac2(0x1d0)](_0x4d06ae,'Kỳ\x20tính\x20khấu\x20hao\x20phải\x20lớn\x20hơn\x20hoặc\x20bằng\x20kỳ\x20tính\x20trước\x20đó');return;}}_0x29b312[_0x4acac2(0x1d3)](_0xb9fba7[_0x4acac2(0x25c)],undefined)&&(_0xb9fba7[_0x4acac2(0x25c)]=!![]);let _0x4adf6c={'id_app':_0xb9fba7[_0x4acac2(0x205)],'ngay_kh':{'$lte':_0x4c6d1f}};_0xb9fba7[_0x4acac2(0x232)]&&(_0x4adf6c['_id']=_0xb9fba7[_0x4acac2(0x232)]),qts['find'](_0x4adf6c)[_0x4acac2(0x1fd)]()[_0x4acac2(0x22f)](function(_0x2cea04){const _0x11bfb6=_0x4acac2,_0x350258={'TmFgu':_0x29b312['TBtCw'],'oRdVF':_0x29b312['ycVuw'],'QqGBY':function(_0x2ab0a4,_0x5bc368){const _0x56c2e9=_0xeaaa;return _0x29b312[_0x56c2e9(0x1d0)](_0x2ab0a4,_0x5bc368);},'tDJCT':_0x29b312[_0x11bfb6(0x21f)],'PpVoA':function(_0x349aab,_0x412bb1,_0x4d61b8){return _0x349aab(_0x412bb1,_0x4d61b8);},'DeLjz':function(_0x481ab8,_0x392ef2){const _0x55241=_0x11bfb6;return _0x29b312[_0x55241(0x219)](_0x481ab8,_0x392ef2);},'PXuEn':_0x11bfb6(0x1ee),'vGaCr':'IAJJc','cWTFb':_0x29b312[_0x11bfb6(0x1ed)],'aOneG':function(_0x204477,_0x33492d){return _0x29b312['nWPnD'](_0x204477,_0x33492d);},'nOYIJ':'iGtqz','CZdKl':'mcbuI','KzPtS':function(_0x11f555,_0x512233){const _0x4e95e8=_0x11bfb6;return _0x29b312[_0x4e95e8(0x231)](_0x11f555,_0x512233);},'xsTSW':function(_0x8fe31,_0xd1dd34){return _0x8fe31/_0xd1dd34;},'XmBSt':function(_0x12c6e3,_0x1b4e69){const _0x21c960=_0x11bfb6;return _0x29b312[_0x21c960(0x233)](_0x12c6e3,_0x1b4e69);},'URHVI':_0x29b312[_0x11bfb6(0x1f5)],'NCNUO':_0x29b312[_0x11bfb6(0x1e9)],'czqSX':_0x29b312['IYpSn'],'IAdje':_0x29b312['VMrwm'],'SLcHv':'ma_tang_giam_ts','nTANm':'kieu'};async[_0x11bfb6(0x1f3)](_0x2cea04,function(_0x1a7849,_0x53ec1b){const _0x46c810=_0x11bfb6,_0x385e04={'bXRcy':_0x350258[_0x46c810(0x26c)],'rCPnk':_0x350258[_0x46c810(0x236)],'aBzSz':function(_0x24ca6c,_0x51562f){const _0x524b9b=_0x46c810;return _0x350258[_0x524b9b(0x224)](_0x24ca6c,_0x51562f);},'jyAkJ':_0x350258[_0x46c810(0x26f)],'ZtDIx':function(_0x4da0ea,_0x5c683c,_0x2f4fde){const _0x352009=_0x46c810;return _0x350258[_0x352009(0x212)](_0x4da0ea,_0x5c683c,_0x2f4fde);},'FgHsJ':function(_0x3b6dd7,_0x1e2991){return _0x350258['DeLjz'](_0x3b6dd7,_0x1e2991);},'whxDD':function(_0x33b131,_0x46f4a4){return _0x33b131===_0x46f4a4;},'JTMyG':_0x350258[_0x46c810(0x263)]};_0x350258[_0x46c810(0x254)](_0x350258[_0x46c810(0x216)],_0x350258['cWTFb'])?setImmediate(()=>{const _0xfcc502=_0x46c810,_0x2b0268={'MKWtg':_0x385e04[_0xfcc502(0x240)],'UqHfg':function(_0x5cab35,_0x5ae572){const _0x1f8653=_0xfcc502;return _0x385e04[_0x1f8653(0x1d2)](_0x5cab35,_0x5ae572);},'KhYNS':_0x385e04['jyAkJ'],'rqtlQ':function(_0x5bda4f,_0x245215,_0x4552fd){const _0x38b4c8=_0xfcc502;return _0x385e04[_0x38b4c8(0x1f6)](_0x5bda4f,_0x245215,_0x4552fd);},'qJdcK':function(_0x352d9c,_0x5e9c55){return _0x352d9c(_0x5e9c55);},'fYjtk':function(_0xc3f914,_0x1258da){const _0x25798=_0xfcc502;return _0x385e04[_0x25798(0x268)](_0xc3f914,_0x1258da);},'sLpLY':_0xfcc502(0x218)};if(_0x385e04[_0xfcc502(0x24c)](_0x385e04[_0xfcc502(0x253)],_0x385e04[_0xfcc502(0x253)])){const _0x2a77c6={};underscore[_0xfcc502(0x25a)](_0x2a77c6,_0xb9fba7),_0x2a77c6[_0xfcc502(0x232)]=_0x1a7849['_id'],sotinhkh[_0xfcc502(0x237)]({'id_app':_0x2a77c6['id_app'],'id_ts':_0x2a77c6[_0xfcc502(0x232)],'nam':_0x2a77c6['nam'],'thang':_0x2a77c6[_0xfcc502(0x23e)]},function(_0x55842a,_0x2e151c){const _0x55e815=_0xfcc502,_0x2751f7={'SDCjz':_0x2b0268['MKWtg'],'sEXgP':function(_0x30bd05,_0x381a0b,_0x16c0b8){return _0x30bd05(_0x381a0b,_0x16c0b8);},'jKlVr':function(_0x473647,_0xb912aa){const _0xb1f3d3=_0xeaaa;return _0x2b0268[_0xb1f3d3(0x1f9)](_0x473647,_0xb912aa);},'tkIHi':_0x2b0268['KhYNS'],'Anvrs':function(_0x49fb99,_0x417cf7,_0xbaa603){const _0x38af84=_0xeaaa;return _0x2b0268[_0x38af84(0x262)](_0x49fb99,_0x417cf7,_0xbaa603);},'IQiXj':function(_0x119efe,_0x2299ee){const _0x543310=_0xeaaa;return _0x2b0268[_0x543310(0x21e)](_0x119efe,_0x2299ee);},'BdYQR':function(_0x55e0a3,_0x125788,_0x49331b){return _0x2b0268['rqtlQ'](_0x55e0a3,_0x125788,_0x49331b);}};if(_0x2b0268[_0x55e815(0x22e)](_0x2b0268[_0x55e815(0x21c)],_0x2b0268[_0x55e815(0x21c)]))_0x44d9ec[_0x55e815(0x205)]=_0x1337c9['id_app'],_0x32cb4a['nam']=_0x319bdc[_0x55e815(0x24d)],_0x4efc59[_0x55e815(0x23e)]=_0x5906c3[_0x55e815(0x23e)],_0x83454c[_0x55e815(0x229)](_0x54356a,function(_0x427d8b,_0x566511){const _0x553f03=_0x55e815,_0x1f62c0=_0x2751f7[_0x553f03(0x213)][_0x553f03(0x260)]('|');let _0x4a0d3a=0x0;while(!![]){switch(_0x1f62c0[_0x4a0d3a++]){case'0':_0x2751f7['sEXgP'](_0x5d7f03,null,_0x566511);continue;case'1':_0x566511[_0x553f03(0x226)]=_0x163dc5[_0x553f03(0x226)];continue;case'2':_0x566511[_0x553f03(0x255)]=_0x259e94[_0x553f03(0x255)];continue;case'3':_0x566511[_0x553f03(0x1e6)]=_0x4094fc['ma_phi'];continue;case'4':_0x566511['ma_dt']=_0x122755[_0x553f03(0x202)];continue;case'5':_0x566511[_0x553f03(0x246)]=_0x14e3b4[_0x553f03(0x246)];continue;case'6':_0x566511[_0x553f03(0x244)]=_0x5a00ba[_0x553f03(0x244)];continue;case'7':if(_0x427d8b)return _0x2751f7[_0x553f03(0x271)](_0x53faf8,_0x427d8b);continue;case'8':_0x566511=_0x566511[_0x553f03(0x261)]();continue;case'9':_0x566511['ma_bp']=_0x60165f[_0x553f03(0x239)];continue;case'10':_0x566511[_0x553f03(0x26d)]=_0x3aa80e[_0x553f03(0x26d)];continue;case'11':_0x566511['tk_kh']=_0x257878[_0x553f03(0x234)];continue;}break;}});else{if(_0x55842a)return _0x53ec1b(_0x55842a);if(_0x2e151c&&_0x2e151c['sua_kh'])return _0x2b0268[_0x55e815(0x262)](_0x53ec1b,null,_0x2e151c);sotinhkh[_0x55e815(0x266)]({'id_app':_0x2a77c6[_0x55e815(0x205)],'id_ts':_0x2a77c6['id_ts'],'nam':_0x2a77c6['nam'],'thang':_0x2a77c6[_0x55e815(0x23e)]},function(_0x2d2760){const _0x18aa00=_0x55e815,_0x3864d3={'xJMmj':_0x2751f7[_0x18aa00(0x1eb)],'lsaRZ':function(_0x4b0525,_0x1f18e4){return _0x4b0525(_0x1f18e4);},'bmnpB':function(_0x1e78ef,_0x3c50b4,_0x111cde){const _0x5accca=_0x18aa00;return _0x2751f7[_0x5accca(0x269)](_0x1e78ef,_0x3c50b4,_0x111cde);},'TNEwT':function(_0x5ca643,_0x14f1c4){const _0x3adceb=_0x18aa00;return _0x2751f7[_0x3adceb(0x24b)](_0x5ca643,_0x14f1c4);}};if(_0x2d2760)return _0x53ec1b(_0x2d2760);_0x2751f7[_0x18aa00(0x1db)](tinhkhauhao1ts,_0x2a77c6,function(_0x43461c,_0x4ffd20){const _0x18f843=_0x18aa00;if(_0x43461c)return _0x3864d3[_0x18f843(0x238)](_0x53ec1b,_0x43461c);if(!_0x4ffd20)return _0x53ec1b(null,null);async[_0x18f843(0x20f)](_0x4ffd20,0x32,function(_0x1c0b63,_0x2f4b7b){const _0x1df652=_0x18f843,_0x2149a0={'zvuWX':function(_0x14c964,_0x296848){return _0x14c964/_0x296848;},'zHjMx':function(_0x503da4,_0xa27ad5){return _0x503da4===_0xa27ad5;},'JEoSL':_0x3864d3[_0x1df652(0x217)],'QESAK':_0x1df652(0x1fb),'XmjIX':function(_0x4bc2a3,_0x3e0db2){const _0xc4d6c0=_0x1df652;return _0x3864d3[_0xc4d6c0(0x248)](_0x4bc2a3,_0x3e0db2);},'JonSL':function(_0x4ee1cd,_0x495747,_0x58fb3c){const _0x252ca7=_0x1df652;return _0x3864d3[_0x252ca7(0x22d)](_0x4ee1cd,_0x495747,_0x58fb3c);}};_0x3864d3['lsaRZ'](setImmediate,()=>{const _0xd58a44=_0x1df652;_0x1c0b63[_0xd58a44(0x205)]=_0x2a77c6[_0xd58a44(0x205)],_0x1c0b63['nam']=_0x2a77c6[_0xd58a44(0x24d)],_0x1c0b63[_0xd58a44(0x23e)]=_0x2a77c6[_0xd58a44(0x23e)],sotinhkh[_0xd58a44(0x229)](_0x1c0b63,function(_0x3e2f5e,_0x496595){const _0x4dfcbc=_0xd58a44,_0xdfebe9={'OZBFb':function(_0x41b5d2,_0x3bc0ba){const _0x323b7b=_0xeaaa;return _0x2149a0[_0x323b7b(0x270)](_0x41b5d2,_0x3bc0ba);},'qkSmv':function(_0x179369,_0x314035){return _0x179369*_0x314035;}};if(_0x2149a0[_0x4dfcbc(0x1fe)](_0x4dfcbc(0x241),_0x2149a0['JEoSL'])){let _0x123a71=_0xdfebe9['OZBFb'](_0x56d68a[_0x4dfcbc(0x1df)],_0x31e505[_0x4dfcbc(0x1df)]||0x1);return _0x431209={..._0x2d4174,..._0x278a9e},_0x21d265[_0x4dfcbc(0x1e0)]=_0xdfebe9[_0x4dfcbc(0x24a)](_0x36bdda[_0x4dfcbc(0x1e0)],_0x123a71),_0x18ad46[_0x4dfcbc(0x24e)]=_0xdfebe9[_0x4dfcbc(0x24a)](_0xebebcc[_0x4dfcbc(0x24e)],_0x123a71),_0x44d1bf[_0x4dfcbc(0x247)]=_0xdfebe9[_0x4dfcbc(0x24a)](_0x3ce2fd['gia_tri_con_lai'],_0x123a71),_0x379efa[_0x4dfcbc(0x1d5)]=_0xdfebe9[_0x4dfcbc(0x24a)](_0x16d891[_0x4dfcbc(0x1d5)],_0x123a71),_0x30998c;}else{const _0x5c4c7e=_0x2149a0[_0x4dfcbc(0x1ea)][_0x4dfcbc(0x260)]('|');let _0x349232=0x0;while(!![]){switch(_0x5c4c7e[_0x349232++]){case'0':if(_0x3e2f5e)return _0x2149a0[_0x4dfcbc(0x1e5)](_0x2f4b7b,_0x3e2f5e);continue;case'1':_0x496595[_0x4dfcbc(0x255)]=_0x1a7849[_0x4dfcbc(0x255)];continue;case'2':_0x496595=_0x496595[_0x4dfcbc(0x261)]();continue;case'3':_0x496595[_0x4dfcbc(0x246)]=_0x1a7849[_0x4dfcbc(0x246)];continue;case'4':_0x496595['ma_ct']=_0x1a7849['ma_ct'];continue;case'5':_0x496595[_0x4dfcbc(0x202)]=_0x1a7849[_0x4dfcbc(0x202)];continue;case'6':_0x496595[_0x4dfcbc(0x244)]=_0x1a7849[_0x4dfcbc(0x244)];continue;case'7':_0x496595[_0x4dfcbc(0x1e6)]=_0x1a7849['ma_phi'];continue;case'8':_0x496595[_0x4dfcbc(0x226)]=_0x1a7849['ten_ts'];continue;case'9':_0x496595[_0x4dfcbc(0x239)]=_0x1a7849[_0x4dfcbc(0x239)];continue;case'10':_0x2149a0[_0x4dfcbc(0x23f)](_0x2f4b7b,null,_0x496595);continue;case'11':_0x496595[_0x4dfcbc(0x234)]=_0x1a7849[_0x4dfcbc(0x234)];continue;}break;}}});});},function(_0x594292,_0x2c1c44){_0x53ec1b(_0x594292,_0x2c1c44);});});});}});}else{const _0x318dc1={'TfayV':_0x385e04[_0xfcc502(0x1fa)]};_0x2211b2(()=>{const _0x4b4beb=_0xfcc502,_0x183738={'QPXAz':_0x318dc1[_0x4b4beb(0x235)],'TFcXD':function(_0x4b0d62,_0x53ebdf){return _0x4b0d62(_0x53ebdf);}};_0xd8a215[_0x4b4beb(0x205)]=_0x41015d[_0x4b4beb(0x205)],_0x5880ee['nam']=_0x57bb06[_0x4b4beb(0x24d)],_0x24954f[_0x4b4beb(0x23e)]=_0x35e488[_0x4b4beb(0x23e)],_0x4a013d[_0x4b4beb(0x229)](_0x1924a9,function(_0xb0b2bc,_0x1dcae3){const _0x4c39bc=_0x4b4beb,_0x3d292e=_0x183738[_0x4c39bc(0x210)]['split']('|');let _0xe825c9=0x0;while(!![]){switch(_0x3d292e[_0xe825c9++]){case'0':if(_0xb0b2bc)return _0x183738[_0x4c39bc(0x200)](_0xf74b09,_0xb0b2bc);continue;case'1':_0x1dcae3[_0x4c39bc(0x246)]=_0x56b104['ma_kho'];continue;case'2':_0x1dcae3['tk_kh']=_0x49bae7[_0x4c39bc(0x234)];continue;case'3':_0x1dcae3[_0x4c39bc(0x202)]=_0x2af002[_0x4c39bc(0x202)];continue;case'4':_0x1dcae3[_0x4c39bc(0x226)]=_0x35a155[_0x4c39bc(0x226)];continue;case'5':_0x1dcae3[_0x4c39bc(0x26d)]=_0x56f4f4[_0x4c39bc(0x26d)];continue;case'6':_0x1dcae3[_0x4c39bc(0x1e6)]=_0x197d92[_0x4c39bc(0x1e6)];continue;case'7':_0x445ebe(null,_0x1dcae3);continue;case'8':_0x1dcae3[_0x4c39bc(0x255)]=_0x212707['ma_hd'];continue;case'9':_0x1dcae3=_0x1dcae3['toObject']();continue;case'10':_0x1dcae3[_0x4c39bc(0x244)]=_0x96214b['tk_cp'];continue;case'11':_0x1dcae3['ma_bp']=_0x14c95d[_0x4c39bc(0x239)];continue;}break;}});});}}):_0x3195a3['push'](_0x46ac3b);},function(_0x187b21,_0x5d35e4){const _0x208b36=_0x11bfb6,_0x523e73={'UPIkI':function(_0x26dfc8,_0x49c45d){const _0x104f10=_0xeaaa;return _0x350258[_0x104f10(0x264)](_0x26dfc8,_0x49c45d);},'qVCOx':_0x350258[_0x208b36(0x1f1)],'EuPzx':function(_0x194985,_0x39af88){const _0x4c68ed=_0x208b36;return _0x350258[_0x4c68ed(0x224)](_0x194985,_0x39af88);},'eHypa':function(_0x5e3ae5,_0x53c40b,_0x4d4b9e){const _0x111233=_0x208b36;return _0x350258[_0x111233(0x212)](_0x5e3ae5,_0x53c40b,_0x4d4b9e);},'pDeIP':_0x350258[_0x208b36(0x252)],'WLrvK':function(_0x3981d9,_0x31df45){const _0x58c5b0=_0x208b36;return _0x350258[_0x58c5b0(0x206)](_0x3981d9,_0x31df45);},'bgtdZ':function(_0x4d4984,_0x98067){return _0x350258['xsTSW'](_0x4d4984,_0x98067);},'gQtdH':function(_0x1a2c57,_0x3a9ac9){return _0x350258['XmBSt'](_0x1a2c57,_0x3a9ac9);},'VRWdj':_0x350258['URHVI'],'tCXLD':function(_0xc2cb59,_0x53f39d,_0x35e4d6){return _0xc2cb59(_0x53f39d,_0x35e4d6);},'JOyHc':_0x350258['NCNUO'],'EMkrA':function(_0x574a52,_0x28c551){return _0x350258['DeLjz'](_0x574a52,_0x28c551);},'MLymT':_0x350258['czqSX'],'bjwkA':_0x350258[_0x208b36(0x1da)],'hlaGK':_0x350258[_0x208b36(0x267)],'VeQMR':_0x350258[_0x208b36(0x21a)]};if(_0x187b21)return _0x350258['QqGBY'](_0x2b9864,_0x187b21);_0x350258[_0x208b36(0x224)](setImmediate,async()=>{const _0x36e266=_0x208b36,_0x32fb3d={'UTGAU':_0x523e73[_0x36e266(0x203)],'ouXwu':function(_0x313fb7,_0x81148e){return _0x313fb7==_0x81148e;},'lyUjg':function(_0x21488f,_0x3533f6){return _0x21488f-_0x3533f6;},'HKJqG':function(_0x36f35a,_0x488fe8){const _0x4f6848=_0x36e266;return _0x523e73[_0x4f6848(0x245)](_0x36f35a,_0x488fe8);},'okgkg':function(_0x31869c,_0x4ec437){return _0x523e73['UPIkI'](_0x31869c,_0x4ec437);},'JkxSl':function(_0x55c7ab,_0x3b7965){const _0x3bc87b=_0x36e266;return _0x523e73[_0x3bc87b(0x1e8)](_0x55c7ab,_0x3b7965);},'yRqno':function(_0x3dcd69,_0x262070){const _0x3f4b52=_0x36e266;return _0x523e73[_0x3f4b52(0x21b)](_0x3dcd69,_0x262070);},'MnZZA':_0x523e73[_0x36e266(0x258)],'LcTHR':function(_0x8269b6,_0x290d16,_0xb2a71f){return _0x523e73['tCXLD'](_0x8269b6,_0x290d16,_0xb2a71f);},'kZCst':_0x523e73[_0x36e266(0x1f4)],'zeSpg':function(_0xef219f,_0x4c11d0){return _0xef219f(_0x4c11d0);}};if(_0x523e73['EMkrA'](_0x523e73['MLymT'],_0x36e266(0x22b))){const _0x4dbc5d=[];_0x5d35e4['forEach'](function(_0x4bc6a3){const _0x44a6fd=_0x36e266,_0x5d49af={'ciadp':function(_0x1d49de,_0x4e663e){const _0x5095ed=_0xeaaa;return _0x523e73[_0x5095ed(0x1e1)](_0x1d49de,_0x4e663e);},'oitlt':_0x523e73[_0x44a6fd(0x25b)]};_0x4bc6a3['forEach'](function(_0x373d74){const _0x250f2c=_0x44a6fd;_0x5d49af[_0x250f2c(0x243)](_0x5d49af[_0x250f2c(0x250)],_0x250f2c(0x201))?_0x4dbc5d[_0x250f2c(0x1f0)](_0x373d74):_0x3dadb1[_0x250f2c(0x20b)]=_0x46bef7[_0x250f2c(0x232)];});}),await _0x4dbc5d['filter'](_0x194661=>_0x194661[_0x36e266(0x20c)])[_0x36e266(0x1e3)](_0xb9fba7[_0x36e266(0x205)],_0x523e73[_0x36e266(0x1ec)],{'where':_0x523e73[_0x36e266(0x211)],'fields':{'kieu_dc':_0x523e73['VeQMR']}}),_0x4dbc5d['forEach'](_0x1a5a1f=>{const _0x36e0d0=_0x36e266;_0x32fb3d['UTGAU']!==_0x32fb3d[_0x36e0d0(0x207)]?_0x2fd7ee=[{'ma_bp':_0x32f57d[_0x36e0d0(0x239)],'so_luong':_0x498e55['so_luong']||0x1}]:_0x32fb3d['ouXwu'](_0x1a5a1f[_0x36e0d0(0x208)],'2')&&(_0x1a5a1f['nguyen_gia']=_0x32fb3d[_0x36e0d0(0x214)](0x0,_0x1a5a1f['nguyen_gia']),_0x1a5a1f['gia_tri_da_kh']=_0x32fb3d[_0x36e0d0(0x23a)](0x0,_0x1a5a1f[_0x36e0d0(0x24e)]),_0x1a5a1f[_0x36e0d0(0x247)]=0x0-_0x1a5a1f[_0x36e0d0(0x247)],_0x1a5a1f[_0x36e0d0(0x1d5)]=_0x32fb3d['lyUjg'](0x0,_0x1a5a1f['gia_tri_kh_ky']));}),async[_0x36e266(0x1f3)](_0x4dbc5d,(_0xdf2b0f,_0x984bfa)=>{const _0x33e9af=_0x36e266,_0x3c5d05={'tmucH':function(_0x4bdf33,_0x25892b){const _0x1c410c=_0xeaaa;return _0x32fb3d[_0x1c410c(0x25d)](_0x4bdf33,_0x25892b);},'kZUDX':_0x33e9af(0x26a),'PUofa':function(_0xcf8436,_0x8b2290){const _0x2af6df=_0x33e9af;return _0x32fb3d[_0x2af6df(0x23d)](_0xcf8436,_0x8b2290);},'pbmAF':function(_0x4c576f,_0x40aaf2){const _0x47260c=_0x33e9af;return _0x32fb3d[_0x47260c(0x23b)](_0x4c576f,_0x40aaf2);},'ywNjh':function(_0x7aa2ec,_0x36ea8b){return _0x7aa2ec*_0x36ea8b;},'VHcYH':_0x32fb3d[_0x33e9af(0x25e)],'tTwmf':function(_0x273c51,_0x1b9cc5,_0x1f9d7b){return _0x32fb3d['LcTHR'](_0x273c51,_0x1b9cc5,_0x1f9d7b);}};_0x32fb3d['okgkg'](_0x32fb3d['kZCst'],_0x32fb3d[_0x33e9af(0x242)])?_0x32fb3d[_0x33e9af(0x257)](setImmediate,async()=>{const _0x54e8c1=_0x33e9af;let _0x293874;try{_0x293874=await qts['bophansudung'](_0xdf2b0f[_0x54e8c1(0x205)],_0xdf2b0f[_0x54e8c1(0x232)],_0x4c6d1f);}catch(_0x1a6240){_0x293874=[{'ma_bp':_0xdf2b0f[_0x54e8c1(0x239)],'so_luong':_0xdf2b0f[_0x54e8c1(0x1df)]||0x1}];}_0x293874=await _0x293874['asyncGroupBy']([_0x54e8c1(0x239)],[_0x3c5d05['VHcYH']]),_0x293874=_0x293874[_0x54e8c1(0x1f3)](_0x2c3314=>{const _0x3cd352=_0x54e8c1;if(_0x3c5d05['tmucH'](_0x3c5d05[_0x3cd352(0x1ef)],_0x3c5d05[_0x3cd352(0x1ef)])){let _0xdb1fe=_0x3c5d05['PUofa'](_0x2c3314[_0x3cd352(0x1df)],_0xdf2b0f['so_luong']||0x1);return _0x2c3314={..._0xdf2b0f,..._0x2c3314},_0x2c3314['nguyen_gia']=_0x2c3314[_0x3cd352(0x1e0)]*_0xdb1fe,_0x2c3314[_0x3cd352(0x24e)]=_0x3c5d05[_0x3cd352(0x1d1)](_0x2c3314[_0x3cd352(0x24e)],_0xdb1fe),_0x2c3314[_0x3cd352(0x247)]=_0x2c3314[_0x3cd352(0x247)]*_0xdb1fe,_0x2c3314['gia_tri_kh_ky']=_0x3c5d05[_0x3cd352(0x1e4)](_0x2c3314[_0x3cd352(0x1d5)],_0xdb1fe),_0x2c3314;}else _0x235509[_0x3cd352(0x249)](function(_0x3ce60c){const _0x143b15=_0x3cd352;_0x3b8d2a[_0x143b15(0x1f0)](_0x3ce60c);});}),_0x3c5d05[_0x54e8c1(0x227)](_0x984bfa,null,_0x293874);}):_0x47a5b2[_0x33e9af(0x232)]=_0x4a6c0f[_0x33e9af(0x232)];},async(_0x576751,_0x572053)=>{const _0x34239a=_0x36e266;if(_0x576751)return _0x523e73[_0x34239a(0x1f7)](_0x2b9864,_0x576751);let _0xe9402d=_0x572053[_0x34239a(0x25f)]((_0x5aa53d,_0x5538c0)=>_0x5aa53d[_0x34239a(0x1f8)](_0x5538c0),[]);_0x2b9864(null,_0xe9402d);});}else _0x523e73[_0x36e266(0x20e)](_0x557b58,_0x125db6,_0x2ee5c9);});});})['catch'](_0x26785a=>{_0x2b9864(_0x26785a);});};function _0x5baa(){const _0x590c1e=['ChvZAa','BK9zsuO','yxn5BMm','BwfW','sK95sgm','ALrczKu','wNresxG','rxvqENG','y29Uy2f0','vxfizMC','yLHsy3K','mhWYFdH8nhW2FdeXFdL8n3W1Fdf8m3WXma','zg10yw5Nz2LHBxrZ','BgvHBG','EKHQtxG','z3zRrNC','vezJweq','AuD0CxO','BwfFzhq','CerLsva','mhW5Fdr8nxWXmhWYFdeXFdz8m3W4Fdf8nW','AwrFyxbW','s3PqDfm','vvrhqvu','A2LLDv9KyW','mtyWmJK0oeH3ug1tzG','Dw5KzxjZy29Yzq','x2LK','BwfFDgfUz19NAwfTx3rZ','Dg9eyxrL','zuH5Cge','BwfWtgLTAxq','uvbyqxO','AgXHr0S','uhbwB0e','u0rdANO','BhLvAMC','mJbLsM1NELG','DKDHq3i','EePnBwO','AuLTzLG','D01uBfC','BLrbtM0','z1f0zeG','C0XWtfK','tog7L2K6ieldOw8Gy8oHBYbUW6b5ihNdQNuGy+g6P3uGy8oHyYb0AgfTihpHU5e6ihnVx3rOzv90CYX0AgfUzYXUyw0SAwrFyxbW','CuPKy0S','rvrUAvC','EMLAu3m','ndG5otyYzwrIA0jc','zw5Kt2y','Bw9UDgG','uxfhqLK','u1v2q2y','DgvUx3rZ','Dfr3Bwy','zxHWB3j0CW','y3jLyxrL','ChDqvgy','DwfKsKq','odi3nJq2s29HveHz','yM1UCei','zLLQDgS','DgHLBG','mZG0mdu2offuzMLYBG','BwvrqKy','AwrFDhm','y1D6sg0','DgTFA2G','vgzHEvy','B1jKvKy','zMLUze9Uzq','ve5fD1q','BwfFyNa','seTkCuC','EvjXBM8','C290Aw5OA2G','sMT4u2W','DgHHBMC','sM9Uu0W','CKnqBMS','rLjkz00','A1PdC3q','y2LHzha','DgTFy3a','v0XYDKS','BwfFA2HV','z2LHx3rYAv9JB25FBgfP','BhnHuLO','zM9YrwfJAa','CwTtBxy','svfPwgO','D2H4req','BMfT','z2LHx3rYAv9Kyv9RAa','zu5bywq','B2L0Bhq','vLzKq2K','q1PKs2W','sLrnEuC','rgvmANO','BwfFAgq','BKPRENm','EMvtCgC','vLjxzgO','mti5ota2uwrfvMf6','zxH0zw5K','Cvzdt3G','DgLUAf9RAf90AgvVx25NyxK','B2TNA2C','tw5AwKe','CMvKDwnL','C3bSAxq','Dg9pyMPLy3q','CNf0Bfe','ufH1rw4','yu9UzuC','zwjztwK','zgvSzxrLtwfUEq','u0XJshy','rMDiC0O','qw52CNm','EevwEwO','mtvmwvzdzgu','vg1gz3u','BwfFy3q','nNnUEMLevW','Derkq1q','ENz1v1G','AKTSvNi','C0HLC0q','CgjTquy','yuj6u3O','C3HYAKu','Bw9Tzw50','z2LHx3rYAv9RAf9REq','C3rHCNrpzG','mZe2mtqXA1fNEgDn','s+g7SYb0W61UAcbRAog6PxuGAgfVihbO4BQJAsbS4BUBBIbOXQfUigHV4BQ3yYbI4BQXBMCGA+g7SYb0W61UAcb0CSAW4BUByYdeKCoZ','z2v0tw9KzwW','sufKAMu','qMrzuvi','mZeYwLvXCfjH','n05PvxfqEG','CxrZ','C29FBhvVBMC','BMD1EwvUx2DPyq','vvbjA0K','mtu3ndHuthLtqKy','yxn5BMnkB2LUtw9KzwWY','ExDoAMG','wg1QsvG','BwfFCgHP','BLDqBKq','yMD0zfO','zg9JyKW','uuvtquS','DgTjsgK','yMP3A0e','r3L3B0W','q09Uy2e','A1PvrfG'];_0x5baa=function(){return _0x590c1e;};return _0x5baa();}
|
|
@@ -1,10 +1 @@
|
|
|
1
|
-
const tdttno=global.getModel("tdttno"),tdttno_tt=global.getModel("tdttno_tt"),async=require("async"),moment=require("moment"),func=async $condition$$=>{let $objs$$=await tdttno.find({id_app:$condition$$.id_app,ngay_tt:{$exists:!1}});for(let $obj$$ of $objs$$)console.log("update ngay_tt",$obj$$.ngay_hd),$obj$$.ngay_tt=moment($obj$$.ngay_hd).add($obj$$.han_tt||0,"days").toDate(),await $obj$$.save();await tdttno.updateMany({id_app:$condition$$.id_app,ngay_tt:{$exists:!1}},{date_updated:new Date});return new Promise(($resolve$$,
|
|
2
|
-
$reject$$)=>{if(!$condition$$.id_app)return $reject$$("Ch\u1ee9c n\u0103ng n\u00e0y y\u00eau c\u1ea7u tham s\u1ed1: id_app");$condition$$.den_ngay||($condition$$.den_ngay=moment().endOf("date").toDate());$condition$$.tuoi_no&&($condition$$.tuoi_no=Number($condition$$.tuoi_no),$condition$$.tuoi_no>0&&($condition$$.tuoi_no_min=$condition$$.tuoi_no));let $ngay_tt_min$$,$ngay_tt_max$$;$condition$$.tuoi_no_min&&($ngay_tt_min$$=moment().add($condition$$.tuoi_no_min,"days").toDate());$condition$$.tuoi_no_max&&
|
|
3
|
-
($ngay_tt_max$$=moment().add($condition$$.tuoi_no_max,"days").toDate());async.series({invoices:function($callback$$){setImmediate(async()=>{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);if(!$condition$$.ma_kh&&($condition$$.nh_kh||$condition$$.phu_trach)){let $_q$$={};$condition$$.nh_kh&&($_q$$.nh_kh=$condition$$.nh_kh);$condition$$.phu_trach&&
|
|
4
|
-
($_q$$.phu_trach=$condition$$.phu_trach);$condition$$.ma_kh=await global.getModel("customer").getList($condition$$.id_app,$_q$$,"ma_kh")}$condition$$.ma_kh&&($query$$.ma_kh=$condition$$.ma_kh);$condition$$.so_ct&&($query$$.so_ct=$condition$$.so_ct);$condition$$.so_hd&&($query$$.so_hd=$condition$$.so_hd);$condition$$.tat_toan!==void 0&&($query$$.tat_toan=$condition$$.tat_toan);$ngay_tt_min$$&&($query$$.ngay_tt={$gte:$ngay_tt_min$$});$ngay_tt_max$$&&($query$$.ngay_tt?$query$$.ngay_tt.$lte=$ngay_tt_max$$:
|
|
5
|
-
$query$$.ngay_tt={$lte:$ngay_tt_max$$});tdttno.find($query$$).lean().then(function($results$$){const $invoices$$=[];for(let $i$$=0;$i$$<$results$$.length;$i$$++){const $invoice$$=$results$$[$i$$];$invoice$$.line=$i$$;$invoices$$.push($invoice$$)}$callback$$(null,$invoices$$)}).catch($e$$=>{$callback$$($e$$)})})}},($error$jscomp$2_invoices$$,$now_results$$)=>{if($error$jscomp$2_invoices$$)return $reject$$($error$jscomp$2_invoices$$);$error$jscomp$2_invoices$$=$now_results$$.invoices;let $report$$=
|
|
6
|
-
[];$now_results$$=new Date;$now_results$$.setHours(0);$now_results$$.setMinutes(0);$now_results$$.setSeconds(0);$now_results$$.setMilliseconds(0);async.map($error$jscomp$2_invoices$$,function($invoice$$,$callback$$){setImmediate(()=>{const $t_invoice$$={sysorder:1,bold:!1,tat_toan:$invoice$$.tat_toan,id_ct:$invoice$$.id_ct,ma_ct:$invoice$$.ma_ct,id_hd:$invoice$$.id_ct,so_ct:$invoice$$.so_ct,ngay_ct:$invoice$$.ngay_ct,so_hd:$invoice$$.so_hd,ngay_hd:$invoice$$.ngay_hd,tien_hd_nt:$invoice$$.tien_nt};
|
|
7
|
-
$t_invoice$$.ma_nt_hd=$invoice$$.ma_nt;$t_invoice$$.ty_gia_hd=$invoice$$.ty_gia;$t_invoice$$.ma_kh=$invoice$$.ma_kh;$t_invoice$$.ma_dt=$invoice$$.ma_dt;$t_invoice$$.ma_nv=$invoice$$.ma_nv;$t_invoice$$.dien_giai=$invoice$$.dien_giai;$t_invoice$$.tien_nt=0;$t_invoice$$.tien=0;$t_invoice$$.da_thanh_toan_nt=0;$t_invoice$$.con_lai_nt=0;$t_invoice$$.thanh_toan_qd=0;$t_invoice$$.tk_co=$invoice$$.tk_no;$t_invoice$$.han_tt=$invoice$$.han_tt?$invoice$$.han_tt:0;$report$$.push($t_invoice$$);tdttno_tt.find({id_tdtt:$invoice$$._id}).sort({ngay_ct:1}).lean().then(function($results$$){let $da_thanh_toan_nt$$=
|
|
8
|
-
0;$results$$.forEach(function($invoice_tt$$){$da_thanh_toan_nt$$+=$invoice_tt$$.thanh_toan_qd});$t_invoice$$.da_thanh_toan_nt=$da_thanh_toan_nt$$;$t_invoice$$.con_lai_nt=$t_invoice$$.tien_hd_nt-$t_invoice$$.da_thanh_toan_nt;$t_invoice$$.tat_toan&&($t_invoice$$.con_lai_nt=0);$t_invoice$$.con_lai_nt!==0?($t_invoice$$.tuoi_no=moment().diff(moment($t_invoice$$.ngay_hd),"days"),$t_invoice$$.so_ngay_trong_han=Math.max(0,$t_invoice$$.han_tt-$t_invoice$$.tuoi_no),$t_invoice$$.so_ngay_qua_han=Math.max(0,$t_invoice$$.tuoi_no-
|
|
9
|
-
$t_invoice$$.han_tt),$t_invoice$$.so_ngay_qua_han>0&&$t_invoice$$.so_ngay_qua_han<=30&&($t_invoice$$.qua_han1=$t_invoice$$.con_lai_nt),$t_invoice$$.so_ngay_qua_han>30&&$t_invoice$$.so_ngay_qua_han<=60&&($t_invoice$$.qua_han2=$t_invoice$$.con_lai_nt),$t_invoice$$.so_ngay_qua_han>60&&$t_invoice$$.so_ngay_qua_han<=90&&($t_invoice$$.qua_han3=$t_invoice$$.con_lai_nt),$t_invoice$$.so_ngay_qua_han>90&&($t_invoice$$.qua_han4=$t_invoice$$.con_lai_nt)):($t_invoice$$.tuoi_no=0,$t_invoice$$.so_ngay_trong_han=
|
|
10
|
-
0,$t_invoice$$.so_ngay_qua_han=0);$callback$$(null,$t_invoice$$)}).catch($e$$=>{$callback$$($e$$)})})},$error$$=>{if($error$$)return $reject$$($error$$);$report$$=$report$$.filter($r$$=>$r$$.tien_hd_nt>0);$resolve$$($report$$)})})})};module.exports=($condition$$,$callback$$)=>{if(!$callback$$)return func($condition$$);func($condition$$).then($rs$$=>{$callback$$(null,$rs$$)}).catch($e$$=>{$callback$$($e$$)})};
|
|
1
|
+
const _0x2ccad4=_0x1681;(function(_0x549822,_0x43af25){const _0x195d64=_0x1681,_0x4fc0fc=_0x549822();while(!![]){try{const _0x4e42e2=parseInt(_0x195d64(0x196))/0x1+-parseInt(_0x195d64(0x13d))/0x2+parseInt(_0x195d64(0x163))/0x3+parseInt(_0x195d64(0x118))/0x4+parseInt(_0x195d64(0x10d))/0x5+parseInt(_0x195d64(0x127))/0x6+parseInt(_0x195d64(0x19a))/0x7*(-parseInt(_0x195d64(0x160))/0x8);if(_0x4e42e2===_0x43af25)break;else _0x4fc0fc['push'](_0x4fc0fc['shift']());}catch(_0x13f3f8){_0x4fc0fc['push'](_0x4fc0fc['shift']());}}}(_0x3453,0xe2926));function _0x3453(){const _0x137bd4=['AwrFy3q','rMPfz1C','C1vVq2K','qLvSqK8','DxrJtNa','Dgr0Dg5Vx3r0','BwfW','wvHMreK','C2v0twLUDxrLCW','BgvHBG','BwfFy3q','BwfFBNrFAgq','uK13sNu','BuDOyvy','yLrMBuC','wLDfwe0','mJCWoda2nK9mtLLLuW','AeLqBMi','EKnvvK0','DhvVAv9UB19TyxG','BurPA1C','q0vNExu','BwfFA2G','z2v0tw9KzwW','sgzkvem','y2nYAKS','BMDHEv9Oza','zujjEM0','AgfUx3r0','EuzJAxC','CxvHx2HHBJi','DevjuM4','A3LswwW','C2v0twLSBgLZzwnVBMrZ','wNnfwwG','vuH3AMS','sNL5uuq','wMLjrMC','z2v0tgLZDa','yK12sgy','CxvHx2HHBJq','yKfdsLm','tNnRCLi','CKXrAKm','y0vhvva','C2f2zq','zMLUza','EufZCvi','BK12CK0','wu5Wy2q','wgjOEw8','nZC5mdG0oevgrNv4DW','Derms3i','v1fsChi','mJe3mJyWB2zxBeDP','ywL1EM0','zMnAzw4','ruL3AMS','EhLWteK','BwfFBNy','wNLgCge','vMv1vfC','x2LK','q2JHU6LJig7eG25Nig7dOhKGECoQDsbJ4BQNDsb0AgfTihpHU5e6igLKx2fWCa','zgvUx25NyxK','CxvHx2HHBJe','zhHJqMS','BgvUz3rO','BgLUzq','jgX0zq','DhvFBMDHEq','wwDNrKS','y2f0y2G','qwv3Cvy','vgv4u3m','Dgf0x3rVyw4','zuPOCKC','Bg9N','qNPfwLe','qKHzsK0','yxn5BMm','s3j0Bgq','se5dsNq','vhvLre4','DvjvALG','r09VBNq','CeTYt1K','wNjoA0y','t0Tpu1q','y2nkrvm','tvfrB3u','zgzSDfC','DxbKyxrLtwfUEq','DgHLBG','rMTZAfa','Eermr0y','BMDHEv9JDa','DgLLBL9Ozf9UDa','CgnLrMW','z1nez3O','y29Ux2XHAv9UDa','CNfAqxy','Dg9eyxrL','BwfFzhzJCW','quj4ree','mte0oti1nKTQB1z2rq','DgHHBMHFDg9HBL9Xza','zgLLBL9NAwfP','zwneruC','mJHirwLHywW','C29Fy3q','sML3s3K','twLLvKG','t255ruC','s1nOuKW','u1Lfq2W','BwzczvK','DKL3qKS','C29FAgq','CMHjqum','z3vywKW','zMPJsNy','zgLMzG','AhHiBwu','q3LdDwG','jgD0zq','q3z2thO','r05RD0O','C29FBMDHEv90CM9Uz19Oyw4','thjzqMm','vfbjrwW','C0zuANq','DgTFBM8','txLUreK','Dgr0Dg5V','v3rRs0G','ruTAyLe','BMHFA2G','zxHWB3j0CW','qM9vrM0','DhvVAv9UBW','zw5Kt2y','r2rkr2W','ywrK','seTcvgq','BKnwwfm','DgTFy28','DhLFz2LH','v2vSweW','zfLZAu0','Aw52B2LJzxm','z2zUzem','q1ntDLa','C29YDa','rxL6yKW','C29FBMDHEv9XDwfFAgfU','ChvZAa','vu9SBuO','C1zXrem','vwLfqLu','EfPcrKu','we1bwgK','D0rsyxC','Afr0sKW','AK1Xuge','zgf5CW','oduWmZGXnwXwAuTsua','EeP2q3G','CgH1x3rYywnO','swfYv2u','BwfFzhq','EfLuvNO','rxndAxm','rKPjufu','t0LiuLa','C3bSAxq','DgLLBL9UDa','nJCYnZKYnfPxDe1ptq','Duf0Ee4','ugTIquW','s09zAMC','BMDHEv90Da','AKjltwC','y1LLzhu','u0P4y3a','DhvVAv9UB19TAw4','uKrLDwe','nhWXFdb8mNWZFdv8nG','BwfFBNq','DK9WzKO','Ae1NuLe','DhLFz2LHx2HK','otqZodq1mg1rA1fTyG','tMvMCwi','zMLSDgvY','AwrFyxbW','zgfFDgHHBMHFDg9HBL9UDa','Bwf4'];_0x3453=function(){return _0x137bd4;};return _0x3453();}const tdttno=global[_0x2ccad4(0x144)](_0x2ccad4(0xed)),tdttno_tt=global['getModel'](_0x2ccad4(0x132)),async=require(_0x2ccad4(0x17d)),moment=require('moment'),func=async _0x3121c5=>{const _0x571a3f=_0x2ccad4,_0xdbd0dd={'rqZAv':function(_0xba8747,_0x5f57c1,_0x4b8a36){return _0xba8747(_0x5f57c1,_0x4b8a36);},'xYTVz':function(_0x5b2fb6,_0x4d33c7){return _0x5b2fb6(_0x4d33c7);},'mGhaV':_0x571a3f(0x1a5),'fcZen':function(_0x2be193,_0x2fca17){return _0x2be193===_0x2fca17;},'RMwJu':'ymFqD','OudKH':_0x571a3f(0xf5),'LrYBc':_0x571a3f(0x124),'GNkwJ':function(_0x4f5d7e,_0x2343ae){return _0x4f5d7e(_0x2343ae);},'ccJES':'bMaLL','FkshP':_0x571a3f(0x128),'FJIPU':_0x571a3f(0x134),'utcNp':function(_0x53b62b,_0x6105a0){return _0x53b62b(_0x6105a0);},'ZyFpa':function(_0x223fd4,_0x37bf29){return _0x223fd4(_0x37bf29);},'SJxcp':function(_0x3ccf8d,_0x16d7e4){return _0x3ccf8d>_0x16d7e4;},'VeuTW':function(_0x259d43,_0x3119d7){return _0x259d43-_0x3119d7;},'XMAXi':function(_0x57b5eb,_0x1fbbc5){return _0x57b5eb<=_0x1fbbc5;},'ABxDA':function(_0x8ce4b3){return _0x8ce4b3();},'cEGUP':function(_0x4e1222,_0x56f0be){return _0x4e1222!==_0x56f0be;},'MynDI':_0x571a3f(0x15f),'BvRmw':'UzxXY','WQRpr':_0x571a3f(0x19c),'TueDN':function(_0x16cb19,_0x27a6dc){return _0x16cb19(_0x27a6dc);},'ZrNkF':function(_0x454855,_0x11e690){return _0x454855!==_0x11e690;},'KShRL':_0x571a3f(0x181),'NskrR':function(_0x3d744b){return _0x3d744b();},'rhIAC':_0x571a3f(0x10c),'BHYJM':function(_0x3d6e8d){return _0x3d6e8d();},'AEqOn':'update\x20ngay_tt','XALmp':function(_0x20b9ab,_0x4b52d4){return _0x20b9ab(_0x4b52d4);}};let _0x134e04=await tdttno[_0x571a3f(0x15b)]({'id_app':_0x3121c5['id_app'],'ngay_tt':{'$exists':![]}});for(let _0x40ff45 of _0x134e04){console[_0x571a3f(0x17a)](_0xdbd0dd['AEqOn'],_0x40ff45[_0x571a3f(0x147)]),_0x40ff45['ngay_tt']=_0xdbd0dd['XALmp'](moment,_0x40ff45[_0x571a3f(0x147)])['add'](_0x40ff45['han_tt']||0x0,_0xdbd0dd[_0x571a3f(0x1a4)])[_0x571a3f(0x193)](),await _0x40ff45[_0x571a3f(0x15a)]();}return await tdttno[_0x571a3f(0x189)]({'id_app':_0x3121c5[_0x571a3f(0x12a)],'ngay_tt':{'$exists':![]}},{'date_updated':new Date()}),new Promise((_0x392bc8,_0xea313c)=>{const _0x334eaa=_0x571a3f,_0x8ddfba={'WKQlR':function(_0x555fdb,_0x5efcb3,_0x46ebc5){const _0x3e1126=_0x1681;return _0xdbd0dd[_0x3e1126(0x192)](_0x555fdb,_0x5efcb3,_0x46ebc5);},'HfJTC':function(_0x52ce5c,_0x5eb7ea){const _0x275ab8=_0x1681;return _0xdbd0dd[_0x275ab8(0x112)](_0x52ce5c,_0x5eb7ea);},'hIPnb':_0xdbd0dd[_0x334eaa(0x13a)],'mDikW':'FxruW','ZiIFg':function(_0x51c3f0,_0x28d5c2){const _0x6b7c20=_0x334eaa;return _0xdbd0dd[_0x6b7c20(0x165)](_0x51c3f0,_0x28d5c2);},'JauGR':_0x334eaa(0x119),'IarWe':function(_0x2f2b75,_0x15e58a){return _0x2f2b75!==_0x15e58a;},'SYECl':_0xdbd0dd[_0x334eaa(0x139)],'nMvrM':_0xdbd0dd['OudKH'],'tEIRn':_0xdbd0dd[_0x334eaa(0xe8)],'hstjb':function(_0x247d15,_0x2fcfac){return _0xdbd0dd['GNkwJ'](_0x247d15,_0x2fcfac);},'ecDEG':function(_0x11a0ef,_0x2c234e){const _0x58b5f1=_0x334eaa;return _0xdbd0dd[_0x58b5f1(0x112)](_0x11a0ef,_0x2c234e);},'AewqV':_0xdbd0dd[_0x334eaa(0x186)],'aiuzm':_0xdbd0dd[_0x334eaa(0x18b)],'mfBeY':_0xdbd0dd[_0x334eaa(0x114)],'FjEgW':function(_0x4d3ad0,_0x2f0816){const _0x5945c2=_0x334eaa;return _0xdbd0dd[_0x5945c2(0xe6)](_0x4d3ad0,_0x2f0816);},'LWQhh':function(_0x3409e9,_0x30832d){const _0x4acd4e=_0x334eaa;return _0xdbd0dd[_0x4acd4e(0x131)](_0x3409e9,_0x30832d);},'gSDgz':function(_0x5995e1,_0x29f8e8){const _0x5b689c=_0x334eaa;return _0xdbd0dd[_0x5b689c(0x169)](_0x5995e1,_0x29f8e8);},'GOont':function(_0x221c45,_0x22cd14){const _0x1e930e=_0x334eaa;return _0xdbd0dd[_0x1e930e(0x11f)](_0x221c45,_0x22cd14);},'UiEBU':function(_0x216672,_0x1a5e55){const _0x4b0832=_0x334eaa;return _0xdbd0dd[_0x4b0832(0x16a)](_0x216672,_0x1a5e55);},'AJJSC':function(_0x5231d3,_0x1c70cc){const _0x44250a=_0x334eaa;return _0xdbd0dd[_0x44250a(0x108)](_0x5231d3,_0x1c70cc);},'YNpcd':function(_0x51351d){const _0x3e21b0=_0x334eaa;return _0xdbd0dd[_0x3e21b0(0x195)](_0x51351d);},'CSSvP':function(_0x4cf88d,_0x3b9881){const _0x5e8197=_0x334eaa;return _0xdbd0dd[_0x5e8197(0x159)](_0x4cf88d,_0x3b9881);},'pHmje':_0x334eaa(0x18f),'CEgyu':'OIHRP','EGApN':_0xdbd0dd[_0x334eaa(0xec)],'CdrAG':_0xdbd0dd['BvRmw'],'HNCJt':function(_0x59b0a0,_0x4e410e){const _0x3304a2=_0x334eaa;return _0xdbd0dd[_0x3304a2(0x165)](_0x59b0a0,_0x4e410e);},'TexSs':_0xdbd0dd[_0x334eaa(0x162)]};if(!_0x3121c5[_0x334eaa(0x12a)])return _0xdbd0dd[_0x334eaa(0x180)](_0xea313c,_0x334eaa(0x16c));if(!_0x3121c5[_0x334eaa(0x16d)])_0x3121c5['den_ngay']=moment()[_0x334eaa(0xf4)]('date')[_0x334eaa(0x193)]();_0x3121c5[_0x334eaa(0xf3)]&&(_0x3121c5[_0x334eaa(0xf3)]=_0xdbd0dd[_0x334eaa(0x131)](Number,_0x3121c5[_0x334eaa(0xf3)]),_0x3121c5[_0x334eaa(0xf3)]>0x0&&(_0x3121c5[_0x334eaa(0x120)]=_0x3121c5[_0x334eaa(0xf3)]));let _0x4e7f68,_0x288ff4;_0x3121c5[_0x334eaa(0x120)]&&(_0xdbd0dd[_0x334eaa(0x184)](_0xdbd0dd['KShRL'],_0xdbd0dd[_0x334eaa(0x19f)])?_0x258ca0(_0x414894):_0x4e7f68=_0xdbd0dd[_0x334eaa(0x157)](moment)[_0x334eaa(0xf6)](_0x3121c5[_0x334eaa(0x120)],_0xdbd0dd[_0x334eaa(0x1a4)])[_0x334eaa(0x193)]()),_0x3121c5[_0x334eaa(0x140)]&&(_0x288ff4=_0xdbd0dd[_0x334eaa(0x17c)](moment)[_0x334eaa(0xf6)](_0x3121c5[_0x334eaa(0x140)],_0xdbd0dd[_0x334eaa(0x1a4)])[_0x334eaa(0x193)]()),async['series']({'invoices':function(_0x1a0bfd){const _0x2d1a6a=_0x334eaa,_0x52a88d={'zUdEx':function(_0xa506b3,_0x18ec0d,_0x3a22de){return _0x8ddfba['WKQlR'](_0xa506b3,_0x18ec0d,_0x3a22de);},'EyzbL':function(_0x29b43f,_0x296a7e){const _0xe9036=_0x1681;return _0x8ddfba[_0xe9036(0x145)](_0x29b43f,_0x296a7e);},'WtkKH':function(_0x116907,_0x3f3efc){return _0x116907!==_0x3f3efc;},'bACJS':_0x8ddfba[_0x2d1a6a(0x13e)],'gfndC':_0x2d1a6a(0xf2),'hTtJL':_0x8ddfba[_0x2d1a6a(0x141)],'eBIzm':_0x2d1a6a(0x143),'EsCis':function(_0x5f0997,_0x1e587f){const _0x94b91a=_0x2d1a6a;return _0x8ddfba[_0x94b91a(0x152)](_0x5f0997,_0x1e587f);},'xJvCx':_0x8ddfba['JauGR'],'WelXL':function(_0x342010,_0x5ae514){const _0x380918=_0x2d1a6a;return _0x8ddfba[_0x380918(0x110)](_0x342010,_0x5ae514);},'sWJWz':_0x8ddfba[_0x2d1a6a(0x1a0)],'OnyEG':_0x8ddfba[_0x2d1a6a(0x15d)],'ZsEYh':_0x8ddfba[_0x2d1a6a(0x14c)]};_0x8ddfba['hstjb'](setImmediate,async()=>{const _0x342fc6=_0x2d1a6a,_0x5df338={'UHwjk':_0x342fc6(0x10c),'dfltW':function(_0x33ae48,_0x24b270){const _0x450c00=_0x342fc6;return _0x52a88d[_0x450c00(0x101)](_0x33ae48,_0x24b270);}};if(_0x52a88d[_0x342fc6(0xee)](_0x52a88d[_0x342fc6(0x156)],_0x52a88d[_0x342fc6(0xfe)])){const _0x374ee8={'id_app':_0x3121c5[_0x342fc6(0x12a)]};_0x374ee8['ngay_ct']={'$lte':_0x3121c5['den_ngay']};_0x3121c5[_0x342fc6(0x173)]&&(_0x374ee8[_0x342fc6(0x18d)][_0x342fc6(0xe4)]=_0x3121c5[_0x342fc6(0x173)]);_0x3121c5[_0x342fc6(0x194)]&&(_0x374ee8[_0x342fc6(0x194)]=_0x3121c5[_0x342fc6(0x194)]);if(!_0x3121c5[_0x342fc6(0x143)]&&(_0x3121c5[_0x342fc6(0xf0)]||_0x3121c5['phu_trach'])){if(_0x52a88d[_0x342fc6(0x10a)]!==_0x342fc6(0x185)){let _0x3ce501={};if(_0x3121c5[_0x342fc6(0xf0)])_0x3ce501['nh_kh']=_0x3121c5[_0x342fc6(0xf0)];if(_0x3121c5[_0x342fc6(0x10f)])_0x3ce501['phu_trach']=_0x3121c5[_0x342fc6(0x10f)];_0x3121c5[_0x342fc6(0x143)]=await global[_0x342fc6(0x144)]('customer')[_0x342fc6(0x153)](_0x3121c5['id_app'],_0x3ce501,_0x52a88d[_0x342fc6(0x148)]);}else _0x4d641e[_0x342fc6(0x11c)][_0x342fc6(0x172)]=_0x16d38f;}_0x3121c5[_0x342fc6(0x143)]&&(_0x374ee8[_0x342fc6(0x143)]=_0x3121c5[_0x342fc6(0x143)]),_0x3121c5[_0x342fc6(0x19b)]&&(_0x374ee8[_0x342fc6(0x19b)]=_0x3121c5[_0x342fc6(0x19b)]),_0x3121c5[_0x342fc6(0x1a3)]&&(_0x52a88d[_0x342fc6(0x113)](_0x342fc6(0x107),_0x52a88d[_0x342fc6(0x10e)])?_0x475f47=_0x44c60e()[_0x342fc6(0xf6)](_0x49e7c5[_0x342fc6(0x120)],_0x342fc6(0x10c))[_0x342fc6(0x193)]():_0x374ee8[_0x342fc6(0x1a3)]=_0x3121c5[_0x342fc6(0x1a3)]),_0x3121c5['tat_toan']!==undefined&&(_0x374ee8[_0x342fc6(0x178)]=_0x3121c5[_0x342fc6(0x178)]),_0x4e7f68&&(_0x374ee8['ngay_tt']={'$gte':_0x4e7f68}),_0x288ff4&&(_0x52a88d[_0x342fc6(0xfb)](_0x52a88d['sWJWz'],_0x52a88d[_0x342fc6(0x19e)])?_0x374ee8[_0x342fc6(0x11c)]?_0x52a88d[_0x342fc6(0x113)](_0x342fc6(0x124),_0x52a88d[_0x342fc6(0x14f)])?_0x374ee8[_0x342fc6(0x11c)]['$lte']=_0x288ff4:_0x175743[_0x342fc6(0x178)]=_0x290a06['tat_toan']:_0x374ee8[_0x342fc6(0x11c)]={'$lte':_0x288ff4}:_0x3c0115=_0x13c4ac()['add'](_0x217f5b[_0x342fc6(0x140)],_0x5df338[_0x342fc6(0x150)])[_0x342fc6(0x193)]()),tdttno[_0x342fc6(0x15b)](_0x374ee8)[_0x342fc6(0x136)]()[_0x342fc6(0x18a)](function(_0x1b0e8b){const _0x2196bf=_0x342fc6,_0x13deb3=[];for(let _0x4b774a=0x0;_0x4b774a<_0x1b0e8b[_0x2196bf(0x170)];_0x4b774a++){const _0xca9657=_0x1b0e8b[_0x4b774a];_0xca9657[_0x2196bf(0x171)]=_0x4b774a,_0x13deb3[_0x2196bf(0x103)](_0xca9657);}_0x52a88d['zUdEx'](_0x1a0bfd,null,_0x13deb3);})[_0x342fc6(0x175)](_0x5b95bd=>{const _0x3c0184=_0x342fc6;_0x5df338[_0x3c0184(0x188)](_0x1a0bfd,_0x5b95bd);});}else _0x2f5a56[_0x342fc6(0x11c)]={'$lte':_0x2be1e5};});}},(_0x130428,_0x37bf53)=>{const _0x4d4adf=_0x334eaa,_0x2ccad7={'eJhrG':function(_0xb8fa0a,_0x2ff2eb){return _0x8ddfba['LWQhh'](_0xb8fa0a,_0x2ff2eb);},'BUlBO':function(_0x5030fc,_0x39d853){const _0x2c0410=_0x1681;return _0x8ddfba[_0x2c0410(0x190)](_0x5030fc,_0x39d853);},'zCUVM':function(_0x1e8aff,_0x103577){const _0x10158e=_0x1681;return _0x8ddfba[_0x10158e(0x182)](_0x1e8aff,_0x103577);},'sFTjt':function(_0x335538,_0x4b0e5f){const _0x199a96=_0x1681;return _0x8ddfba[_0x199a96(0x106)](_0x335538,_0x4b0e5f);},'HhnBu':function(_0x2b04ca,_0x246770){return _0x8ddfba['AJJSC'](_0x2b04ca,_0x246770);},'HKBTd':function(_0x4a4471){const _0x36591c=_0x1681;return _0x8ddfba[_0x36591c(0x15e)](_0x4a4471);},'cYedu':_0x4d4adf(0x10c),'xypLI':function(_0x31deba,_0x16b167){const _0x59670e=_0x4d4adf;return _0x8ddfba[_0x59670e(0xff)](_0x31deba,_0x16b167);},'jBKMg':_0x8ddfba['pHmje'],'qTYjJ':_0x8ddfba[_0x4d4adf(0x142)],'ccrjK':'5|1|0|4|2|3|6','omxGr':function(_0x4fb334,_0x52bd89){return _0x8ddfba['ZiIFg'](_0x4fb334,_0x52bd89);},'CyCuh':_0x8ddfba['EGApN'],'tDLKr':_0x8ddfba['CdrAG']};if(_0x8ddfba[_0x4d4adf(0x17f)]('JiwKy',_0x8ddfba[_0x4d4adf(0x177)])){if(_0x130428)return _0xea313c(_0x130428);const _0x12985a=_0x37bf53[_0x4d4adf(0xfd)];let _0x4719c7=[];const _0x371442=new Date();_0x371442['setHours'](0x0),_0x371442[_0x4d4adf(0x135)](0x0),_0x371442['setSeconds'](0x0),_0x371442[_0x4d4adf(0x14e)](0x0),async[_0x4d4adf(0x133)](_0x12985a,function(_0x1dc060,_0x3c60f4){const _0x422c57=_0x4d4adf,_0x966fbe={'bMvHf':function(_0x3659a8,_0x55a8c8){const _0x13ea48=_0x1681;return _0x8ddfba[_0x13ea48(0x199)](_0x3659a8,_0x55a8c8);}};_0x8ddfba[_0x422c57(0x152)](_0x8ddfba[_0x422c57(0x176)],'KeXHC')?_0x107289[_0x422c57(0x11c)]?_0x41b837[_0x422c57(0x11c)][_0x422c57(0x172)]=_0x2f8bd8:_0x367c1b['ngay_tt']={'$lte':_0x48c9be}:setImmediate(()=>{const _0x20a4a5=_0x422c57,_0x5f0928={'MieVH':function(_0x59b896,_0x12e49f){const _0x4606ff=_0x1681;return _0x2ccad7[_0x4606ff(0x179)](_0x59b896,_0x12e49f);},'rLQjC':function(_0x507bd9,_0xcbcd6d){const _0x213078=_0x1681;return _0x2ccad7[_0x213078(0x130)](_0x507bd9,_0xcbcd6d);},'jMqPa':function(_0x40cc6e,_0x2c61fd){const _0x37fa60=_0x1681;return _0x2ccad7[_0x37fa60(0x13f)](_0x40cc6e,_0x2c61fd);},'CvvLz':function(_0x43665d,_0x2529f9){const _0x10c07b=_0x1681;return _0x2ccad7[_0x10c07b(0xea)](_0x43665d,_0x2529f9);},'BzEZQ':function(_0x337532,_0x246604){return _0x2ccad7['HhnBu'](_0x337532,_0x246604);},'KyLdN':function(_0x418ca2){const _0x146755=_0x1681;return _0x2ccad7[_0x146755(0xf7)](_0x418ca2);},'hMgRQ':_0x2ccad7[_0x20a4a5(0x11e)],'nCVXS':function(_0x181bbf,_0x5783e9,_0x567ad7){return _0x181bbf(_0x5783e9,_0x567ad7);},'RDeua':function(_0x2c4bb9,_0x3f170e){return _0x2c4bb9(_0x3f170e);},'pKrOY':function(_0x352c22,_0x1e0aef){const _0x191bdd=_0x20a4a5;return _0x2ccad7[_0x191bdd(0x167)](_0x352c22,_0x1e0aef);},'bTfmG':_0x2ccad7[_0x20a4a5(0x11d)],'yAsqR':_0x2ccad7['qTYjJ'],'dYsiM':_0x2ccad7[_0x20a4a5(0x146)],'wDRaw':function(_0x2a8124,_0x28ec4a){return _0x2a8124<=_0x28ec4a;},'sUoCi':function(_0xdbeab9,_0x51b075){const _0x478b34=_0x20a4a5;return _0x2ccad7[_0x478b34(0x130)](_0xdbeab9,_0x51b075);},'aoFqR':function(_0x3f113f,_0x4d83f0){return _0x2ccad7['omxGr'](_0x3f113f,_0x4d83f0);},'KOYjg':_0x2ccad7[_0x20a4a5(0xe3)],'PkbAL':'vxUgH'};if(_0x2ccad7[_0x20a4a5(0x167)](_0x20a4a5(0x17e),_0x2ccad7[_0x20a4a5(0x161)])){const _0x476371={'sysorder':0x1,'bold':![],'tat_toan':_0x1dc060[_0x20a4a5(0x178)],'id_ct':_0x1dc060[_0x20a4a5(0x12d)],'ma_ct':_0x1dc060[_0x20a4a5(0x137)],'id_hd':_0x1dc060[_0x20a4a5(0x12d)],'so_ct':_0x1dc060[_0x20a4a5(0x19b)],'ngay_ct':_0x1dc060[_0x20a4a5(0x18d)],'so_hd':_0x1dc060[_0x20a4a5(0x1a3)],'ngay_hd':_0x1dc060[_0x20a4a5(0x147)],'tien_hd_nt':_0x1dc060[_0x20a4a5(0x117)]};_0x476371[_0x20a4a5(0x138)]=_0x1dc060[_0x20a4a5(0x123)],_0x476371[_0x20a4a5(0x126)]=_0x1dc060[_0x20a4a5(0xfa)],_0x476371[_0x20a4a5(0x143)]=_0x1dc060[_0x20a4a5(0x143)],_0x476371[_0x20a4a5(0x111)]=_0x1dc060[_0x20a4a5(0x111)],_0x476371[_0x20a4a5(0x168)]=_0x1dc060[_0x20a4a5(0x168)],_0x476371['dien_giai']=_0x1dc060[_0x20a4a5(0x198)],_0x476371[_0x20a4a5(0x117)]=0x0,_0x476371['tien']=0x0,_0x476371[_0x20a4a5(0x12b)]=0x0,_0x476371[_0x20a4a5(0x191)]=0x0,_0x476371[_0x20a4a5(0x197)]=0x0,_0x476371[_0x20a4a5(0xf9)]=_0x1dc060[_0x20a4a5(0xeb)],_0x476371[_0x20a4a5(0x149)]=_0x1dc060[_0x20a4a5(0x149)]?_0x1dc060[_0x20a4a5(0x149)]:0x0,_0x4719c7[_0x20a4a5(0x103)](_0x476371);const _0x4b1b83={'id_tdtt':_0x1dc060[_0x20a4a5(0x16b)]};tdttno_tt[_0x20a4a5(0x15b)](_0x4b1b83)[_0x20a4a5(0x100)]({'ngay_ct':0x1})['lean']()[_0x20a4a5(0x18a)](function(_0x5826ad){const _0x1edf00=_0x20a4a5,_0x34898b={'EIwjk':function(_0x9b2668,_0x44fa85){return _0x5f0928['jMqPa'](_0x9b2668,_0x44fa85);},'CYYHK':function(_0x90060,_0x1acfff){return _0x90060!==_0x1acfff;},'UOlmJ':_0x1edf00(0xe9),'MQQou':function(_0x1327bd,_0x1e7ff8){return _0x5f0928['CvvLz'](_0x1327bd,_0x1e7ff8);},'vIwBK':function(_0x3eac08,_0x4ffb59){const _0x2aad3a=_0x1edf00;return _0x5f0928[_0x2aad3a(0x17b)](_0x3eac08,_0x4ffb59);},'dxcBk':function(_0x66a2d){return _0x5f0928['KyLdN'](_0x66a2d);},'YggFK':function(_0x1979f3,_0x2d7159){const _0x5d294f=_0x1edf00;return _0x5f0928[_0x5d294f(0x158)](_0x1979f3,_0x2d7159);},'yFciw':_0x5f0928[_0x1edf00(0x125)],'fjcJv':function(_0x309147,_0x5124ae){return _0x309147<=_0x5124ae;},'hWHPb':function(_0x817910,_0x29dc7e,_0x266e0a){const _0x577e28=_0x1edf00;return _0x5f0928[_0x577e28(0xf8)](_0x817910,_0x29dc7e,_0x266e0a);},'EKZbQ':function(_0x1e8c3c,_0xd2ec9a){const _0x4ee379=_0x1edf00;return _0x5f0928[_0x4ee379(0x121)](_0x1e8c3c,_0xd2ec9a);}};if(_0x5f0928[_0x1edf00(0x183)](_0x1edf00(0x18c),_0x5f0928[_0x1edf00(0x13b)])){let _0x298e89=0x0;_0x5826ad['forEach'](function(_0x20e07c){const _0x2310bd=_0x1edf00;_0x34898b['CYYHK'](_0x34898b[_0x2310bd(0x104)],_0x2310bd(0x105))?_0x298e89=_0x298e89+_0x20e07c[_0x2310bd(0x197)]:(_0x50d31e['tuoi_no']=_0x3c9dff(_0x4e5c7e[_0x2310bd(0xf3)]),_0x34898b['EIwjk'](_0x15564c[_0x2310bd(0xf3)],0x0)&&(_0xcc4b88['tuoi_no_min']=_0x2367fb[_0x2310bd(0xf3)]));}),_0x476371[_0x1edf00(0x12b)]=_0x298e89,_0x476371[_0x1edf00(0x191)]=_0x476371[_0x1edf00(0x18e)]-_0x476371[_0x1edf00(0x12b)];if(_0x476371[_0x1edf00(0x178)]){if(_0x1edf00(0x115)!==_0x5f0928[_0x1edf00(0x15c)]){const _0x443f5e=_0x1edf00(0x122)[_0x1edf00(0x116)]('|');let _0x34bab0=0x0;while(!![]){switch(_0x443f5e[_0x34bab0++]){case'0':_0x377c59[_0x1edf00(0x102)]=_0x18fd8e[_0x1edf00(0x12c)](0x0,_0x34898b[_0x1edf00(0x187)](_0x14f43a['tuoi_no'],_0x1f3737[_0x1edf00(0x149)]));continue;case'1':_0x5d921b[_0x1edf00(0xe7)]=_0x4b94de[_0x1edf00(0x12c)](0x0,_0x34898b['MQQou'](_0x25cd2c[_0x1edf00(0x149)],_0xef6524[_0x1edf00(0xf3)]));continue;case'2':if(_0x34898b[_0x1edf00(0x166)](_0x5b837f[_0x1edf00(0x102)],0x0)&&_0x34898b[_0x1edf00(0x1a2)](_0x4de334[_0x1edf00(0x102)],0x1e))_0x486d29['qua_han1']=_0x2e7e05[_0x1edf00(0x191)];continue;case'3':if(_0x34898b[_0x1edf00(0x166)](_0x343f3f[_0x1edf00(0x102)],0x1e)&&_0x3ae80e[_0x1edf00(0x102)]<=0x3c)_0x2d49b6[_0x1edf00(0x14b)]=_0x4565c5[_0x1edf00(0x191)];continue;case'4':_0x4d0b30[_0x1edf00(0xf3)]=_0x34898b[_0x1edf00(0x16f)](_0x375350)[_0x1edf00(0x1a7)](_0x34898b[_0x1edf00(0x174)](_0x4ff901,_0x3548a2[_0x1edf00(0x147)]),_0x34898b[_0x1edf00(0x14a)]);continue;case'5':if(_0x34898b[_0x1edf00(0x166)](_0x5e6f71[_0x1edf00(0x102)],0x3c)&&_0x34898b[_0x1edf00(0x1a6)](_0x23224a['so_ngay_qua_han'],0x5a))_0x3e5e30['qua_han3']=_0xc79bb5[_0x1edf00(0x191)];continue;case'6':if(_0x34898b[_0x1edf00(0x166)](_0x1075cb[_0x1edf00(0x102)],0x5a))_0x4c2541['qua_han4']=_0xe624fc[_0x1edf00(0x191)];continue;}break;}}else _0x476371[_0x1edf00(0x191)]=0x0;}if(_0x5f0928[_0x1edf00(0x183)](_0x476371[_0x1edf00(0x191)],0x0)){const _0x3696e7=_0x5f0928[_0x1edf00(0xfc)][_0x1edf00(0x116)]('|');let _0x550ad6=0x0;while(!![]){switch(_0x3696e7[_0x550ad6++]){case'0':_0x476371[_0x1edf00(0x102)]=Math[_0x1edf00(0x12c)](0x0,_0x5f0928[_0x1edf00(0xe5)](_0x476371['tuoi_no'],_0x476371[_0x1edf00(0x149)]));continue;case'1':_0x476371[_0x1edf00(0xe7)]=Math[_0x1edf00(0x12c)](0x0,_0x476371[_0x1edf00(0x149)]-_0x476371[_0x1edf00(0xf3)]);continue;case'2':if(_0x5f0928['jMqPa'](_0x476371[_0x1edf00(0x102)],0x1e)&&_0x5f0928[_0x1edf00(0x17b)](_0x476371[_0x1edf00(0x102)],0x3c))_0x476371[_0x1edf00(0x14b)]=_0x476371[_0x1edf00(0x191)];continue;case'3':if(_0x476371[_0x1edf00(0x102)]>0x3c&&_0x5f0928[_0x1edf00(0x109)](_0x476371[_0x1edf00(0x102)],0x5a))_0x476371['qua_han3']=_0x476371[_0x1edf00(0x191)];continue;case'4':if(_0x476371[_0x1edf00(0x102)]>0x0&&_0x476371['so_ngay_qua_han']<=0x1e)_0x476371[_0x1edf00(0x16e)]=_0x476371[_0x1edf00(0x191)];continue;case'5':_0x476371[_0x1edf00(0xf3)]=moment()[_0x1edf00(0x1a7)](_0x5f0928[_0x1edf00(0x12f)](moment,_0x476371[_0x1edf00(0x147)]),_0x1edf00(0x10c));continue;case'6':if(_0x5f0928[_0x1edf00(0x10b)](_0x476371['so_ngay_qua_han'],0x5a))_0x476371[_0x1edf00(0x155)]=_0x476371[_0x1edf00(0x191)];continue;}break;}}else _0x5f0928['aoFqR'](_0x5f0928[_0x1edf00(0x11b)],_0x5f0928[_0x1edf00(0x11a)])?_0x5d05b5[_0x1edf00(0x120)]=_0x584baf[_0x1edf00(0xf3)]:(_0x476371[_0x1edf00(0xf3)]=0x0,_0x476371[_0x1edf00(0xe7)]=0x0,_0x476371[_0x1edf00(0x102)]=0x0);_0x3c60f4(null,_0x476371);}else{if(!_0xff43ec)return _0x5f0928[_0x1edf00(0x19d)](_0x2f86d9,_0x492a71);_0x5f0928[_0x1edf00(0x158)](_0x388f1a,_0x47a8ef)[_0x1edf00(0x18a)](_0x4cf8d2=>{_0x34898b['hWHPb'](_0x3b285,null,_0x4cf8d2);})[_0x1edf00(0x175)](_0x2238ff=>{const _0x490981=_0x1edf00;_0x34898b[_0x490981(0xef)](_0x35f2f0,_0x2238ff);});}})[_0x20a4a5(0x175)](_0x2e5bf6=>{const _0x2d82e6=_0x20a4a5;_0x966fbe[_0x2d82e6(0x154)](_0x3c60f4,_0x2e5bf6);});}else _0x30bd15[_0x20a4a5(0x1a3)]=_0x2b9b1c[_0x20a4a5(0x1a3)];});},_0x5dc451=>{const _0x2441d6=_0x4d4adf;if(_0x8ddfba[_0x2441d6(0x164)]===_0x8ddfba[_0x2441d6(0x1a1)])_0x3ced06[_0x2441d6(0x18d)][_0x2441d6(0xe4)]=_0x55a57b['tu_ngay'];else{if(_0x5dc451)return _0x8ddfba[_0x2441d6(0x12e)](_0xea313c,_0x5dc451);_0x4719c7=_0x4719c7[_0x2441d6(0x129)](_0x32577b=>_0x32577b[_0x2441d6(0x18e)]>0x0),_0x8ddfba[_0x2441d6(0x145)](_0x392bc8,_0x4719c7);}});}else _0xb0560b[_0x4d4adf(0x19b)]=_0x1231e4[_0x4d4adf(0x19b)];});});};function _0x1681(_0x433b6b,_0x1fa92f){const _0x345362=_0x3453();return _0x1681=function(_0x1681e0,_0x45a44e){_0x1681e0=_0x1681e0-0xe3;let _0x33015c=_0x345362[_0x1681e0];if(_0x1681['KZUoxZ']===undefined){var _0x4887ab=function(_0x2c8909){const _0x58e003='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x450b20='',_0x20af36='';for(let _0x343621=0x0,_0x1b1370,_0x526f8c,_0x531406=0x0;_0x526f8c=_0x2c8909['charAt'](_0x531406++);~_0x526f8c&&(_0x1b1370=_0x343621%0x4?_0x1b1370*0x40+_0x526f8c:_0x526f8c,_0x343621++%0x4)?_0x450b20+=String['fromCharCode'](0xff&_0x1b1370>>(-0x2*_0x343621&0x6)):0x0){_0x526f8c=_0x58e003['indexOf'](_0x526f8c);}for(let _0x50d31e=0x0,_0x3c9dff=_0x450b20['length'];_0x50d31e<_0x3c9dff;_0x50d31e++){_0x20af36+='%'+('00'+_0x450b20['charCodeAt'](_0x50d31e)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x20af36);};_0x1681['YUXUhc']=_0x4887ab,_0x433b6b=arguments,_0x1681['KZUoxZ']=!![];}const _0x32cf96=_0x345362[0x0],_0x1e41ba=_0x1681e0+_0x32cf96,_0x24118b=_0x433b6b[_0x1e41ba];return!_0x24118b?(_0x33015c=_0x1681['YUXUhc'](_0x33015c),_0x433b6b[_0x1e41ba]=_0x33015c):_0x33015c=_0x24118b,_0x33015c;},_0x1681(_0x433b6b,_0x1fa92f);}module[_0x2ccad4(0xf1)]=(_0x378d1f,_0x3a1626)=>{const _0xd883bd=_0x2ccad4,_0x16a1b1={'JyyQD':function(_0x2d3ae9,_0xae45a4){return _0x2d3ae9!==_0xae45a4;},'hxHme':'ZWEXM','kyRYl':function(_0x21ad99,_0x1fb53a){return _0x21ad99(_0x1fb53a);}};if(!_0x3a1626)return _0x16a1b1[_0xd883bd(0x14d)](func,_0x378d1f);_0x16a1b1[_0xd883bd(0x14d)](func,_0x378d1f)[_0xd883bd(0x18a)](_0x232c8=>{const _0x28ffed=_0xd883bd;_0x16a1b1[_0x28ffed(0x151)](_0x16a1b1[_0x28ffed(0x1a8)],_0x28ffed(0x13c))?_0x49d4b6[_0x28ffed(0x11c)]={'$gte':_0x1b1e89}:_0x3a1626(null,_0x232c8);})[_0xd883bd(0x175)](_0x4aedb3=>{_0x3a1626(_0x4aedb3);});};
|
|
@@ -1,11 +1 @@
|
|
|
1
|
-
const async=require("async"),tdttco=global.getModel("tdttco"),tdttco_tt=global.getModel("tdttco_tt"),moment=require("moment"),func=async $condition$$=>{let $objs$$=await tdttco.find({id_app:$condition$$.id_app,ngay_tt:{$exists:!1}});for(let $obj$$ of $objs$$)console.log("update ngay_tt",$obj$$.ngay_hd),$obj$$.ngay_tt=moment($obj$$.ngay_hd).add($obj$$.han_tt||0,"days").toDate(),await $obj$$.save();return new Promise(($resolve$$,$reject$$)=>{if(!$condition$$.id_app)return $reject$$("Ch\u1ee9c n\u0103ng n\u00e0y y\u00eau c\u1ea7u tham s\u1ed1: id_app");
|
|
2
|
-
$condition$$.den_ngay||($condition$$.den_ngay=moment().endOf("date").toDate());$condition$$.tuoi_no&&($condition$$.tuoi_no=Number($condition$$.tuoi_no),$condition$$.tuoi_no>0&&($condition$$.tuoi_no_min=$condition$$.tuoi_no));let $ngay_tt_min$$,$ngay_tt_max$$;$condition$$.tuoi_no_min&&($ngay_tt_min$$=moment().add($condition$$.tuoi_no_min,"days").toDate());$condition$$.tuoi_no_max&&($ngay_tt_max$$=moment().add($condition$$.tuoi_no_max,"days").toDate());async.series({invoices:function($callback$$){setImmediate(async()=>
|
|
3
|
-
{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);if(!$condition$$.ma_kh&&($condition$$.nh_kh||$condition$$.phu_trach)){let $_q$$={};$condition$$.nh_kh&&($_q$$.nh_kh=$condition$$.nh_kh);$condition$$.phu_trach&&($_q$$.phu_trach=$condition$$.phu_trach);$condition$$.ma_kh=await global.getModel("customer").getList($condition$$.id_app,
|
|
4
|
-
$_q$$,"ma_kh")}$condition$$.ma_kh&&($query$$.ma_kh=$condition$$.ma_kh);$condition$$.so_ct&&($query$$.so_ct=$condition$$.so_ct);$condition$$.so_hd&&($query$$.so_hd=$condition$$.so_hd);$condition$$.tat_toan!==void 0&&($query$$.tat_toan=$condition$$.tat_toan);$ngay_tt_min$$&&($query$$.ngay_tt={$gte:$ngay_tt_min$$});$ngay_tt_max$$&&($query$$.ngay_tt?$query$$.ngay_tt.$lte=$ngay_tt_max$$:$query$$.ngay_tt={$lte:$ngay_tt_max$$});tdttco.find($query$$).lean().then(function($results$$){const $invoices$$=[];
|
|
5
|
-
for(let $i$$=0;$i$$<$results$$.length;$i$$++){var $invoice$$=$results$$[$i$$];$invoice$$.line=$i$$;$invoices$$.push($invoice$$)}$callback$$(null,$invoices$$)}).catch($e$$=>{$callback$$($e$$)})})}},($error$jscomp$2_invoices$$,$now_results$$)=>{if($error$jscomp$2_invoices$$)return $reject$$($error$jscomp$2_invoices$$);$error$jscomp$2_invoices$$=$now_results$$.invoices;let $report$$=[];$now_results$$=new Date;$now_results$$.setHours(0);$now_results$$.setMinutes(0);$now_results$$.setSeconds(0);$now_results$$.setMilliseconds(0);
|
|
6
|
-
async.map($error$jscomp$2_invoices$$,function($invoice$$,$callback$$){const $t_invoice$$={sysorder:1,bold:!1,tat_toan:$invoice$$.tat_toan,id_ct:$invoice$$.id_ct,ma_ct:$invoice$$.ma_ct,id_hd:$invoice$$.id_ct,so_ct:$invoice$$.so_ct,ngay_ct:$invoice$$.ngay_ct,so_hd:$invoice$$.so_hd,ngay_hd:$invoice$$.ngay_hd,tien_hd_nt:$invoice$$.tien_nt};$t_invoice$$.ma_nt_hd=$invoice$$.ma_nt;$t_invoice$$.ty_gia_hd=$invoice$$.ty_gia;$t_invoice$$.ma_kh=$invoice$$.ma_kh;$t_invoice$$.ma_dt=$invoice$$.ma_dt;$t_invoice$$.ma_nv=
|
|
7
|
-
$invoice$$.ma_nv;$t_invoice$$.dien_giai=$invoice$$.dien_giai;$t_invoice$$.tien_nt=0;$t_invoice$$.tien=0;$t_invoice$$.da_thanh_toan_nt=0;$t_invoice$$.con_lai_nt=0;$t_invoice$$.thanh_toan_qd=0;$t_invoice$$.tk_co=$invoice$$.tk_no;$t_invoice$$.han_tt=$invoice$$.han_tt?$invoice$$.han_tt:0;$report$$.push($t_invoice$$);tdttco_tt.find({id_tdtt:$invoice$$._id}).sort({ngay_ct:1}).lean().then(function($results$$){let $da_thanh_toan_nt$$=0;$results$$.forEach(function($invoice_tt$$){$da_thanh_toan_nt$$+=$invoice_tt$$.thanh_toan_qd});
|
|
8
|
-
$t_invoice$$.da_thanh_toan_nt=$da_thanh_toan_nt$$;$t_invoice$$.con_lai_nt=$t_invoice$$.tien_hd_nt-$t_invoice$$.da_thanh_toan_nt;$t_invoice$$.tat_toan&&($t_invoice$$.con_lai_nt=0);$t_invoice$$.con_lai_nt!==0?($t_invoice$$.tuoi_no=moment().diff(moment($t_invoice$$.ngay_hd),"days"),$t_invoice$$.so_ngay_trong_han=Math.max(0,$t_invoice$$.han_tt-$t_invoice$$.tuoi_no),$t_invoice$$.so_ngay_qua_han=Math.max(0,$t_invoice$$.tuoi_no-$t_invoice$$.han_tt),$t_invoice$$.so_ngay_qua_han>0&&$t_invoice$$.so_ngay_qua_han<=
|
|
9
|
-
30&&($t_invoice$$.qua_han1=$t_invoice$$.con_lai_nt),$t_invoice$$.so_ngay_qua_han>30&&$t_invoice$$.so_ngay_qua_han<=60&&($t_invoice$$.qua_han2=$t_invoice$$.con_lai_nt),$t_invoice$$.so_ngay_qua_han>60&&$t_invoice$$.so_ngay_qua_han<=90&&($t_invoice$$.qua_han3=$t_invoice$$.con_lai_nt),$t_invoice$$.so_ngay_qua_han>90&&($t_invoice$$.qua_han4=$t_invoice$$.con_lai_nt)):($t_invoice$$.tuoi_no=0,$t_invoice$$.so_ngay_trong_han=0,$t_invoice$$.so_ngay_qua_han=0);$callback$$(null,$t_invoice$$)}).catch($e$$=>{$callback$$($e$$)})},
|
|
10
|
-
$error$$=>{if($error$$)return $reject$$($error$$);$report$$=$report$$.filter($r$$=>$r$$.tien_hd_nt>0);$condition$$.tuoi_no&&($report$$=$report$$.filter($r$$=>$r$$.tuoi_no>=$condition$$.tuoi_no));$condition$$.tuoi_no_min&&($report$$=$report$$.filter($r$$=>$r$$.tuoi_no>=$condition$$.tuoi_no_min));$condition$$.tuoi_no_max&&($report$$=$report$$.filter($r$$=>$r$$.tuoi_no<=$condition$$.tuoi_no_max));$resolve$$($report$$)})})})};
|
|
11
|
-
module.exports=($condition$$,$callback$$)=>{if(!$callback$$)return func($condition$$);func($condition$$).then($rs$$=>{$callback$$(null,$rs$$)}).catch($e$$=>{$callback$$($e$$)})};
|
|
1
|
+
const _0x26e529=_0x331b;function _0x5a9c(){const _0x39cd4f=['mtmYodK3muDRELHWEG','BMDHEv90Da','Cfb1uKe','DhvFBMDHEq','BKrxqxG','zhPPu04','Dgr0DgnV','y2f0y2G','CxvHx2HHBJi','BwfFzhq','jgX0zq','CxvHx2HHBJq','BMDHEv9JDa','CfnRr3G','AwrFyxbW','zKLfCeO','BLPizxe','zgfFDgHHBMHFDg9HBL9UDa','DhLFz2LHx2HK','r2z1sKq','tvr4vvy','ChbtrgK','nJq0zenzrw5b','C29FBMDHEv90CM9Uz19Oyw4','zMLSDgvY','zxHWB3j0CW','BeH5r3i','BwfFzhzJCW','BwfFBNy','svvUtw0','Bg9N','AwvzB2W','zMLUza','D1vQr3i','ExHdAvi','ndrnqNb4v1i','Aw52B2LJzxm','uu9wwu0','tu9nDK0','BMDHEv9Oza','BwfW','ywrK','qKrfAuO','AuHzq1i','uNbvvwe','q1PjEwW','u1LTz0m','C29YDa','C29Fy3q','DgTFBM8','zgLMzG','qxLIzMS','DhvVAv9UB19TyxG','Dvr4shK','D0njvKG','tKfKzg4','v1nlruK','q250zMy','C29FAgq','m3W1Fdj8mhWXFdq','z2v0tw9KzwW','Ewf5Cum','AuXXu0S','C2vYAwvZ','zgf0zq','B3PNqKS','EMnJA0G','D0HdCg8','zgf5CW','BwfFy3q','s0PRtwq','AwD0vMC','DgLLBL9UDa','vfDgq0C','mte1wezHu2nd','A2rNsNi','C29FBMDHEv9XDwfFAgfU','mtq5n2HWC1n5Eq','vwfdy04','DhvVAv9UB19TAw4','yLPHuxC','yK5RA3e','DgTFy28','vxD5u1G','Dgf0x3rVyw4','sevADfK','ueHTzxK','uxzgsee','DMrvAMi','Bwf4','mte1nJK0mtzmrwrHvM8','mNWZFdr8nxWWFdz8mq','C2f2zq','BgvHBG','wfD1ENy','D3joEwS','y29Ux2XHAv9UDa','rNrXAvq','ve5dCwy','zgLwwgq','mJriv3nJEKG','vuTYrMK','vvzkvg0','EgH4sKq','DgLLBG','zgLLBL9NAwfP','uer3uLe','sujtue4','Aw5gBxi','Bw9Tzw50','CxvHx2HHBJm','D0PltMC','zfnPzue','C2v0sg91CNm','Ehjsvva','C2v0twLSBgLZzwnVBMrZ','CxvHx2HHBJe','DgHLBG','mtCXmeHSCNDjzq','mte4mda3n01hEKThuW','sMPlzuy','BgvUz3rO','we9IDuK','BvPxDwG','mJCZodbVB2HrEuy','rNLRzva','zM9YrwfJAa','tLrWBem','D2nry3i','ChvZAa','AgznBgu','yuzerfm','BMHFA2G','uuDVsNu','yMrfwe8','CgH1x3rYywnO','AgfUx3r0','Dg9eyxrL','C2v0u2vJB25KCW','DNPXDKC','x2LK','EKr2CeC','BwfFBNq','vuXqCMO','C2v0twLUDxrLCW','DgLLBL9Ozf9UDa','yvzYtNq','zgvUx25NyxK','qunMqLa','vxLRD2K','C3bSAxq','s1vQC2q','rMLzsMq','DxbYBeS','DxbKyxrLig5NyxLFDhq','mZC5nZyYohr3vKrusG','DgHHBMHFDg9HBL9Xza','z2v0tgLZDa','AwrFy3q','zfvsCMm','BgLUzq','yxn5BMm','rejOyum','DhvVAv9UBW','vhbhyxa','BwfFBNrFAgq','EwLjvey','wg9vDKq','jgD0zq','mJm1ntuYB1b3D3nQ','BwfFA2G','EKjAseu'];_0x5a9c=function(){return _0x39cd4f;};return _0x5a9c();}function _0x331b(_0x29a80c,_0x587915){const _0x5a9c0e=_0x5a9c();return _0x331b=function(_0x331bf7,_0x32006f){_0x331bf7=_0x331bf7-0xa4;let _0x29bc8c=_0x5a9c0e[_0x331bf7];if(_0x331b['HZGOuT']===undefined){var _0x217975=function(_0x41c7f8){const _0x1b71bc='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x108d29='',_0x11f95a='';for(let _0x51e83f=0x0,_0x1f4866,_0x5c8445,_0x40db9b=0x0;_0x5c8445=_0x41c7f8['charAt'](_0x40db9b++);~_0x5c8445&&(_0x1f4866=_0x51e83f%0x4?_0x1f4866*0x40+_0x5c8445:_0x5c8445,_0x51e83f++%0x4)?_0x108d29+=String['fromCharCode'](0xff&_0x1f4866>>(-0x2*_0x51e83f&0x6)):0x0){_0x5c8445=_0x1b71bc['indexOf'](_0x5c8445);}for(let _0x4fb4f5=0x0,_0x5c64b1=_0x108d29['length'];_0x4fb4f5<_0x5c64b1;_0x4fb4f5++){_0x11f95a+='%'+('00'+_0x108d29['charCodeAt'](_0x4fb4f5)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x11f95a);};_0x331b['mdUndp']=_0x217975,_0x29a80c=arguments,_0x331b['HZGOuT']=!![];}const _0x4314ea=_0x5a9c0e[0x0],_0x3054a9=_0x331bf7+_0x4314ea,_0x58582c=_0x29a80c[_0x3054a9];return!_0x58582c?(_0x29bc8c=_0x331b['mdUndp'](_0x29bc8c),_0x29a80c[_0x3054a9]=_0x29bc8c):_0x29bc8c=_0x58582c,_0x29bc8c;},_0x331b(_0x29a80c,_0x587915);}(function(_0x4966e3,_0x349712){const _0x4572ba=_0x331b,_0x2c2a68=_0x4966e3();while(!![]){try{const _0x2836db=-parseInt(_0x4572ba(0xd3))/0x1+parseInt(_0x4572ba(0x11e))/0x2*(parseInt(_0x4572ba(0xa9))/0x3)+parseInt(_0x4572ba(0x105))/0x4*(-parseInt(_0x4572ba(0xa6))/0x5)+-parseInt(_0x4572ba(0xf7))/0x6+parseInt(_0x4572ba(0x108))/0x7*(parseInt(_0x4572ba(0xc0))/0x8)+parseInt(_0x4572ba(0xd2))/0x9*(-parseInt(_0x4572ba(0xd8))/0xa)+parseInt(_0x4572ba(0x12b))/0xb*(parseInt(_0x4572ba(0xb6))/0xc);if(_0x2836db===_0x349712)break;else _0x2c2a68['push'](_0x2c2a68['shift']());}catch(_0x1e5330){_0x2c2a68['push'](_0x2c2a68['shift']());}}}(_0x5a9c,0xdb7ea));const async=require(_0x26e529(0xfd)),tdttco=global['getModel'](_0x26e529(0x10e)),tdttco_tt=global[_0x26e529(0x144)]('tdttco_tt'),moment=require(_0x26e529(0xc9)),func=async _0x26075c=>{const _0x493005=_0x26e529,_0x92bccd={'UaCcN':function(_0x111ea9){return _0x111ea9();},'kdgJr':_0x493005(0x14c),'IUnMm':function(_0x5acc59,_0x3a7862){return _0x5acc59(_0x3a7862);},'SYmgC':function(_0x1d504e,_0x509720){return _0x1d504e-_0x509720;},'iHYCR':function(_0x137cf4,_0x33a9c4){return _0x137cf4>_0x33a9c4;},'dSieA':function(_0xb16283,_0x283741){return _0xb16283<=_0x283741;},'lyEYF':function(_0x358422,_0x991078){return _0x358422<_0x991078;},'ieYol':function(_0x169b08,_0x528daa,_0x5bd09f){return _0x169b08(_0x528daa,_0x5bd09f);},'MOMvM':function(_0x3e6acc,_0xf6f858){return _0x3e6acc!==_0xf6f858;},'BDEiJ':_0x493005(0xf0),'NAddn':_0x493005(0xb1),'GfuJD':function(_0x412825,_0x49870b){return _0x412825===_0x49870b;},'TpGap':_0x493005(0xe1),'PHmey':'QVgtq','KJkMd':'JdPCt','nDWAx':_0x493005(0xe2),'WSKEI':function(_0x493d99,_0x2c9a26){return _0x493d99+_0x2c9a26;},'QvFHA':'mKJEQ','NjYfb':function(_0x3eedcb,_0x18118b){return _0x3eedcb!==_0x18118b;},'QOVYM':_0x493005(0xc2),'lvupU':'VPSvw','zDvpG':_0x493005(0xeb),'zcckH':function(_0x10434d,_0x55d63a){return _0x10434d(_0x55d63a);},'DBhaC':'Chức\x20năng\x20này\x20yêu\x20cầu\x20tham\x20số:\x20id_app','FtqiT':function(_0x3e939f){return _0x3e939f();},'ImKeS':function(_0x2b0a17,_0x200ad9){return _0x2b0a17(_0x200ad9);},'yxCiR':function(_0x1bdf65,_0xeb1bc4){return _0x1bdf65>_0xeb1bc4;},'CZIyl':function(_0x39a8c7){return _0x39a8c7();},'diVXd':function(_0x23c59a,_0x34737b){return _0x23c59a!==_0x34737b;},'zBZHE':_0x493005(0xaf),'wcQcr':_0x493005(0xf6),'BJMWW':function(_0x537a34,_0x1c0911){return _0x537a34(_0x1c0911);}};let _0x5f3e4e=await tdttco[_0x493005(0x128)]({'id_app':_0x26075c[_0x493005(0x116)],'ngay_tt':{'$exists':![]}});for(let _0x5d9b37 of _0x5f3e4e){_0x92bccd[_0x493005(0xbf)](_0x92bccd[_0x493005(0x107)],_0x92bccd['zBZHE'])?_0x38bf15=_0x92bccd[_0x493005(0xaa)](_0x47af9e)[_0x493005(0x131)](_0x271f76[_0x493005(0x13c)],_0x92bccd['kdgJr'])[_0x493005(0xe5)]():(console[_0x493005(0x126)](_0x92bccd[_0x493005(0xdc)],_0x5d9b37[_0x493005(0x12f)]),_0x5d9b37['ngay_tt']=_0x92bccd['BJMWW'](moment,_0x5d9b37[_0x493005(0x12f)])['add'](_0x5d9b37[_0x493005(0xe4)]||0x0,'days')[_0x493005(0xe5)](),await _0x5d9b37[_0x493005(0xb8)]());}return new Promise((_0x1be58c,_0x215500)=>{const _0x20cce1=_0x493005,_0x5594f6={'MTxUV':'2|1|4|5|0|3','xrRUP':function(_0x2b0f34,_0x2af309){const _0x1b8fc5=_0x331b;return _0x92bccd[_0x1b8fc5(0x125)](_0x2b0f34,_0x2af309);},'wCIVH':function(_0x1dc7ee,_0x2a28b8){return _0x92bccd['lyEYF'](_0x1dc7ee,_0x2a28b8);},'NTplC':function(_0x5c040b,_0x35d26c,_0x1ff577){const _0xb2e8ee=_0x331b;return _0x92bccd[_0xb2e8ee(0x127)](_0x5c040b,_0x35d26c,_0x1ff577);},'wJKNg':function(_0x452e4c,_0x17bcde){const _0x375663=_0x331b;return _0x92bccd[_0x375663(0x12e)](_0x452e4c,_0x17bcde);},'Aybfk':_0x92bccd[_0x20cce1(0x132)],'uTxHy':function(_0x2d09c2,_0x1ba28f){return _0x92bccd['MOMvM'](_0x2d09c2,_0x1ba28f);},'Uykwi':_0x92bccd[_0x20cce1(0x13f)],'yiITF':function(_0x4baf88,_0x5c5fa8){const _0x2d2057=_0x20cce1;return _0x92bccd[_0x2d2057(0x11b)](_0x4baf88,_0x5c5fa8);},'dziSN':_0x92bccd[_0x20cce1(0x100)],'Aralk':function(_0x48451a,_0x52e6d4){const _0x5142c3=_0x20cce1;return _0x92bccd[_0x5142c3(0x11b)](_0x48451a,_0x52e6d4);},'FiYJd':_0x92bccd[_0x20cce1(0xb2)],'wHCpo':_0x92bccd[_0x20cce1(0x14e)],'UKrFi':_0x92bccd[_0x20cce1(0x10c)],'inFmr':function(_0x4825d6,_0x24b6e2){const _0x230176=_0x20cce1;return _0x92bccd[_0x230176(0x140)](_0x4825d6,_0x24b6e2);},'rELWs':_0x92bccd['kdgJr'],'fMVbw':_0x92bccd[_0x20cce1(0xb3)],'OpGsU':function(_0x2d1f47,_0x19ed2a){return _0x92bccd['IUnMm'](_0x2d1f47,_0x19ed2a);},'wwaaK':function(_0x3e4186,_0x2946b7){return _0x92bccd['NjYfb'](_0x3e4186,_0x2946b7);},'lHyGr':function(_0x9555e1,_0x537db1){const _0x558b9f=_0x20cce1;return _0x92bccd[_0x558b9f(0x12e)](_0x9555e1,_0x537db1);},'uprlK':_0x92bccd[_0x20cce1(0x12d)],'FykeP':_0x20cce1(0xb7),'aFDDS':function(_0x44fef6,_0x2a87e1){const _0x147b51=_0x20cce1;return _0x92bccd[_0x147b51(0xcc)](_0x44fef6,_0x2a87e1);},'KUjsd':function(_0x460a99,_0x57f96a){return _0x92bccd['iHYCR'](_0x460a99,_0x57f96a);},'MYsgD':function(_0x55b149,_0xd41799){return _0x55b149-_0xd41799;},'bNkkq':_0x20cce1(0x141),'XObuI':function(_0x58ee8a,_0x48ab9e,_0x15a2ae){return _0x58ee8a(_0x48ab9e,_0x15a2ae);},'cWwHd':function(_0x4e8fa7,_0x1859d5){return _0x4e8fa7(_0x1859d5);}};if(_0x92bccd['lvupU']!==_0x92bccd[_0x20cce1(0xe9)]){if(!_0x26075c[_0x20cce1(0x116)]){if('UOzTd'!==_0x20cce1(0xc6))return _0x92bccd[_0x20cce1(0x14a)](_0x215500,_0x92bccd[_0x20cce1(0xfe)]);else _0x21915e[_0x20cce1(0xab)]=_0x18d065[_0x20cce1(0xff)];}if(!_0x26075c[_0x20cce1(0xef)])_0x26075c[_0x20cce1(0xef)]=_0x92bccd[_0x20cce1(0xbd)](moment)['endOf'](_0x20cce1(0x148))[_0x20cce1(0xe5)]();_0x26075c['tuoi_no']&&(_0x26075c[_0x20cce1(0xff)]=_0x92bccd['ImKeS'](Number,_0x26075c[_0x20cce1(0xff)]),_0x92bccd[_0x20cce1(0x12a)](_0x26075c[_0x20cce1(0xff)],0x0)&&(_0x26075c[_0x20cce1(0xab)]=_0x26075c[_0x20cce1(0xff)]));let _0x49c59e,_0x4fb6f4;_0x26075c['tuoi_no_min']&&(_0x49c59e=_0x92bccd[_0x20cce1(0x135)](moment)[_0x20cce1(0x131)](_0x26075c[_0x20cce1(0xab)],_0x92bccd[_0x20cce1(0xa7)])[_0x20cce1(0xe5)]()),_0x26075c[_0x20cce1(0x13c)]&&(_0x4fb6f4=_0x92bccd[_0x20cce1(0xaa)](moment)[_0x20cce1(0x131)](_0x26075c[_0x20cce1(0x13c)],_0x20cce1(0x14c))[_0x20cce1(0xe5)]()),async[_0x20cce1(0x147)]({'invoices':function(_0x160564){const _0x332245=_0x20cce1,_0x1d64ea={'ozgBK':_0x5594f6[_0x332245(0x14b)],'SzMQn':function(_0x412ebb,_0x477c70){return _0x412ebb(_0x477c70);}};_0x5594f6['xrRUP'](setImmediate,async()=>{const _0x5ce33b=_0x332245,_0xbd19e9={'mZWuh':_0x5594f6[_0x5ce33b(0x11c)],'iLqSK':function(_0x1bb3ac,_0x30e0c9){const _0x437766=_0x5ce33b;return _0x5594f6[_0x437766(0xce)](_0x1bb3ac,_0x30e0c9);},'XoUvD':function(_0x3068df,_0x4cf358){return _0x3068df(_0x4cf358);},'jlrDV':function(_0x273349,_0x349c7e){const _0x3f9a58=_0x5ce33b;return _0x5594f6[_0x3f9a58(0x13e)](_0x273349,_0x349c7e);},'nZHeq':function(_0x17ba4e,_0x573464){const _0x1c95ab=_0x5ce33b;return _0x5594f6[_0x1c95ab(0x13e)](_0x17ba4e,_0x573464);},'wUjGr':function(_0x3e4614,_0x80e099,_0x19a8b0){const _0x54dca4=_0x5ce33b;return _0x5594f6[_0x54dca4(0xdb)](_0x3e4614,_0x80e099,_0x19a8b0);}},_0x5c4f55={'id_app':_0x26075c['id_app']};_0x5c4f55[_0x5ce33b(0x114)]={'$lte':_0x26075c[_0x5ce33b(0xef)]};_0x26075c[_0x5ce33b(0x10b)]&&(_0x5594f6[_0x5ce33b(0xcb)](_0x5594f6[_0x5ce33b(0x13b)],_0x5594f6[_0x5ce33b(0x13b)])?_0x383629[_0x5ce33b(0x109)]?_0x22290b[_0x5ce33b(0x109)][_0x5ce33b(0x112)]=_0x2c6d83:_0x575b3c['ngay_tt']={'$lte':_0x4e40a8}:_0x5c4f55[_0x5ce33b(0x114)]['$gte']=_0x26075c[_0x5ce33b(0x10b)]);_0x26075c[_0x5ce33b(0x123)]&&(_0x5c4f55[_0x5ce33b(0x123)]=_0x26075c[_0x5ce33b(0x123)]);if(!_0x26075c[_0x5ce33b(0x106)]&&(_0x26075c[_0x5ce33b(0xe0)]||_0x26075c['phu_trach'])){let _0x1ae8c8={};if(_0x26075c[_0x5ce33b(0xe0)])_0x1ae8c8['nh_kh']=_0x26075c[_0x5ce33b(0xe0)];if(_0x26075c[_0x5ce33b(0xe3)])_0x1ae8c8[_0x5ce33b(0xe3)]=_0x26075c['phu_trach'];_0x26075c[_0x5ce33b(0x106)]=await global['getModel']('customer')[_0x5ce33b(0xf9)](_0x26075c['id_app'],_0x1ae8c8,_0x5ce33b(0x106));}_0x26075c['ma_kh']&&(_0x5c4f55[_0x5ce33b(0x106)]=_0x26075c[_0x5ce33b(0x106)]);if(_0x26075c[_0x5ce33b(0x138)]){if(_0x5594f6[_0x5ce33b(0x13d)]('qYFyb',_0x5ce33b(0x115)))_0x5c4f55[_0x5ce33b(0x138)]=_0x26075c['so_ct'];else{const _0x264f01=_0xbd19e9[_0x5ce33b(0xd7)][_0x5ce33b(0xf2)]('|');let _0x1a2f61=0x0;while(!![]){switch(_0x264f01[_0x1a2f61++]){case'0':_0x163e4f['tuoi_no_max']&&(_0x9092a9=_0x272a0a[_0x5ce33b(0x120)](_0x4de44a=>_0x4de44a[_0x5ce33b(0xff)]<=_0x167b78[_0x5ce33b(0x13c)]));continue;case'1':_0x3a0f1d=_0x498b1d['filter'](_0x15c2ef=>_0x15c2ef[_0x5ce33b(0xed)]>0x0);continue;case'2':if(_0xd3d3a8)return _0xbd19e9[_0x5ce33b(0x146)](_0x4cb363,_0x108e3e);continue;case'3':_0xbd19e9[_0x5ce33b(0x103)](_0x1b63e1,_0x3bbd22);continue;case'4':_0x41645e[_0x5ce33b(0xff)]&&(_0xb0c8c5=_0x27ffc1[_0x5ce33b(0x120)](_0x38fc92=>_0x38fc92[_0x5ce33b(0xff)]>=_0x50168a[_0x5ce33b(0xff)]));continue;case'5':_0x3a5733['tuoi_no_min']&&(_0x3376d2=_0x23ac17[_0x5ce33b(0x120)](_0x224be2=>_0x224be2[_0x5ce33b(0xff)]>=_0x1007a6[_0x5ce33b(0xab)]));continue;}break;}}}_0x26075c['so_hd']&&(_0x5594f6[_0x5ce33b(0x13d)](_0x5594f6['Uykwi'],_0x5594f6[_0x5ce33b(0xf1)])?_0x2dbff3['so_hd']=_0x18d911['so_hd']:_0x5c4f55['so_hd']=_0x26075c[_0x5ce33b(0x142)]);if(_0x26075c[_0x5ce33b(0xb0)]!==undefined){if(_0x5594f6[_0x5ce33b(0x102)](_0x5594f6['dziSN'],_0x5594f6[_0x5ce33b(0x10d)]))_0x5c4f55[_0x5ce33b(0xb0)]=_0x26075c[_0x5ce33b(0xb0)];else{const _0x4a346b=[];for(let _0x47ad5e=0x0;_0xbd19e9['jlrDV'](_0x47ad5e,_0x202ff9['length']);_0x47ad5e++){var _0x149ff2=_0x134eeb[_0x47ad5e];_0x149ff2[_0x5ce33b(0xfc)]=_0x47ad5e,_0x4a346b[_0x5ce33b(0xdd)](_0x149ff2);}_0x3abfaa(null,_0x4a346b);}}_0x49c59e&&(_0x5c4f55[_0x5ce33b(0x109)]={'$gte':_0x49c59e}),_0x4fb6f4&&(_0x5594f6['Aralk'](_0x5594f6[_0x5ce33b(0xf4)],_0x5594f6[_0x5ce33b(0xf4)])?_0x5c4f55[_0x5ce33b(0x109)]?_0x5c4f55['ngay_tt']['$lte']=_0x4fb6f4:_0x5c4f55[_0x5ce33b(0x109)]={'$lte':_0x4fb6f4}:_0x372c5f['ngay_ct'][_0x5ce33b(0x104)]=_0x1c0cad[_0x5ce33b(0x10b)]),tdttco[_0x5ce33b(0x128)](_0x5c4f55)['lean']()[_0x5ce33b(0xd1)](function(_0x4e83e9){const _0x25bb84=_0x5ce33b,_0x536451=[];for(let _0x41da81=0x0;_0xbd19e9[_0x25bb84(0x118)](_0x41da81,_0x4e83e9[_0x25bb84(0xd5)]);_0x41da81++){var _0x495bae=_0x4e83e9[_0x41da81];_0x495bae[_0x25bb84(0xfc)]=_0x41da81,_0x536451[_0x25bb84(0xdd)](_0x495bae);}_0xbd19e9[_0x25bb84(0x129)](_0x160564,null,_0x536451);})[_0x5ce33b(0x10f)](_0x57004c=>{const _0x200995=_0x5ce33b;_0x1d64ea[_0x200995(0x149)]!==_0x1d64ea[_0x200995(0x149)]?_0x1faeec(_0xddb5cb):_0x1d64ea['SzMQn'](_0x160564,_0x57004c);});});}},(_0x45e4b4,_0x54769b)=>{const _0x13aa87=_0x20cce1,_0x55c5cd={'xhxJD':function(_0x2e2757,_0x48b7f8){return _0x2e2757-_0x48b7f8;},'bZaQw':function(_0x459af5,_0xcd1a2f){return _0x5594f6['wwaaK'](_0x459af5,_0xcd1a2f);},'wrNyk':function(_0x35eb9c,_0x59fcc7){const _0x2c57a9=_0x331b;return _0x5594f6[_0x2c57a9(0x122)](_0x35eb9c,_0x59fcc7);},'hfMle':_0x5594f6[_0x13aa87(0xf5)],'pPuRA':_0x5594f6[_0x13aa87(0xd9)],'VcrHn':function(_0x38689d,_0x2eb687){return _0x38689d>_0x2eb687;},'dURrc':function(_0x27274e,_0x46669c){const _0x2b0d3c=_0x13aa87;return _0x5594f6[_0x2b0d3c(0xdf)](_0x27274e,_0x46669c);},'vdUjb':function(_0x3944ac,_0x34a0ef){const _0xc14ebc=_0x13aa87;return _0x5594f6[_0xc14ebc(0xf3)](_0x3944ac,_0x34a0ef);},'RpUUa':function(_0x5663c9){return _0x5663c9();},'XWuzv':function(_0x28a7fe,_0x19d10b){return _0x28a7fe(_0x19d10b);},'TWFCG':_0x5594f6['rELWs'],'ppSDi':function(_0x3d1684,_0x5672d0){return _0x5594f6['MYsgD'](_0x3d1684,_0x5672d0);},'JjKeF':function(_0x26dbe4,_0x248dcf){const _0x139593=_0x13aa87;return _0x5594f6[_0x139593(0xf3)](_0x26dbe4,_0x248dcf);},'vzqvG':_0x5594f6[_0x13aa87(0xad)],'fIEpJ':_0x13aa87(0x14f),'gdSTR':function(_0x5582b0,_0x176ca0,_0x51bd95){const _0x1d90d1=_0x13aa87;return _0x5594f6[_0x1d90d1(0xd6)](_0x5582b0,_0x176ca0,_0x51bd95);}};if(_0x45e4b4)return _0x5594f6['cWwHd'](_0x215500,_0x45e4b4);const _0x4dea88=_0x54769b[_0x13aa87(0x12c)];let _0x477214=[];const _0x5bc721=new Date();_0x5bc721[_0x13aa87(0xcd)](0x0),_0x5bc721[_0x13aa87(0xec)](0x0),_0x5bc721[_0x13aa87(0xe6)](0x0),_0x5bc721[_0x13aa87(0xcf)](0x0),async[_0x13aa87(0x130)](_0x4dea88,function(_0x1549f2,_0x4dc5a1){const _0x25397e=_0x13aa87,_0x111aa1={'VkvRz':function(_0x25d601,_0x155f87){return _0x25d601!==_0x155f87;},'yayqC':_0x5594f6[_0x25397e(0xc1)],'YvlMG':function(_0xea5ea7,_0x526df4){const _0x3e8485=_0x25397e;return _0x5594f6[_0x3e8485(0xc8)](_0xea5ea7,_0x526df4);},'TNCqf':_0x5594f6['rELWs']};if(_0x5594f6['fMVbw']===_0x5594f6['fMVbw']){const _0x523bbb={'sysorder':0x1,'bold':![],'tat_toan':_0x1549f2[_0x25397e(0xb0)],'id_ct':_0x1549f2[_0x25397e(0xfa)],'ma_ct':_0x1549f2[_0x25397e(0x14d)],'id_hd':_0x1549f2['id_ct'],'so_ct':_0x1549f2[_0x25397e(0x138)],'ngay_ct':_0x1549f2[_0x25397e(0x114)],'so_hd':_0x1549f2[_0x25397e(0x142)],'ngay_hd':_0x1549f2[_0x25397e(0x12f)],'tien_hd_nt':_0x1549f2[_0x25397e(0xa4)]};_0x523bbb[_0x25397e(0x101)]=_0x1549f2[_0x25397e(0xea)],_0x523bbb[_0x25397e(0x11a)]=_0x1549f2['ty_gia'],_0x523bbb[_0x25397e(0x106)]=_0x1549f2[_0x25397e(0x106)],_0x523bbb['ma_dt']=_0x1549f2[_0x25397e(0x111)],_0x523bbb['ma_nv']=_0x1549f2[_0x25397e(0x124)],_0x523bbb['dien_giai']=_0x1549f2[_0x25397e(0xc5)],_0x523bbb[_0x25397e(0xa4)]=0x0,_0x523bbb[_0x25397e(0xc4)]=0x0,_0x523bbb['da_thanh_toan_nt']=0x0,_0x523bbb[_0x25397e(0xbc)]=0x0,_0x523bbb[_0x25397e(0xf8)]=0x0,_0x523bbb[_0x25397e(0xae)]=_0x1549f2[_0x25397e(0x139)],_0x523bbb[_0x25397e(0xe4)]=_0x1549f2[_0x25397e(0xe4)]?_0x1549f2['han_tt']:0x0,_0x477214['push'](_0x523bbb);const _0x536850={'id_tdtt':_0x1549f2[_0x25397e(0xe8)]};tdttco_tt[_0x25397e(0x128)](_0x536850)[_0x25397e(0x137)]({'ngay_ct':0x1})[_0x25397e(0xb9)]()[_0x25397e(0xd1)](function(_0x5127f3){const _0x100d80=_0x25397e;let _0x23058c=0x0;_0x5127f3[_0x100d80(0xda)](function(_0x3cd4b9){const _0x5354e7=_0x100d80;_0x111aa1['VkvRz'](_0x111aa1['yayqC'],_0x111aa1[_0x5354e7(0x145)])?_0xb9d40f[_0x5354e7(0x109)][_0x5354e7(0x112)]=_0x433f3c:_0x23058c=_0x111aa1['YvlMG'](_0x23058c,_0x3cd4b9[_0x5354e7(0xf8)]);}),_0x523bbb['da_thanh_toan_nt']=_0x23058c,_0x523bbb[_0x100d80(0xbc)]=_0x55c5cd[_0x100d80(0xc3)](_0x523bbb['tien_hd_nt'],_0x523bbb[_0x100d80(0x119)]);_0x523bbb[_0x100d80(0xb0)]&&(_0x523bbb['con_lai_nt']=0x0);if(_0x55c5cd[_0x100d80(0xac)](_0x523bbb[_0x100d80(0xbc)],0x0)){if(_0x55c5cd[_0x100d80(0xbb)](_0x55c5cd['hfMle'],_0x55c5cd[_0x100d80(0xde)]))_0x3a3ddd(null,_0x30be03);else{const _0x47ce64=_0x55c5cd[_0x100d80(0x10a)][_0x100d80(0xf2)]('|');let _0x438b94=0x0;while(!![]){switch(_0x47ce64[_0x438b94++]){case'0':if(_0x55c5cd['VcrHn'](_0x523bbb['so_ngay_qua_han'],0x1e)&&_0x55c5cd[_0x100d80(0xfb)](_0x523bbb[_0x100d80(0xa8)],0x3c))_0x523bbb[_0x100d80(0x110)]=_0x523bbb[_0x100d80(0xbc)];continue;case'1':if(_0x55c5cd[_0x100d80(0xb4)](_0x523bbb[_0x100d80(0xa8)],0x5a))_0x523bbb[_0x100d80(0x113)]=_0x523bbb[_0x100d80(0xbc)];continue;case'2':_0x523bbb['tuoi_no']=_0x55c5cd[_0x100d80(0x134)](moment)[_0x100d80(0x13a)](_0x55c5cd[_0x100d80(0xba)](moment,_0x523bbb['ngay_hd']),_0x55c5cd[_0x100d80(0xa5)]);continue;case'3':_0x523bbb[_0x100d80(0x11f)]=Math[_0x100d80(0xb5)](0x0,_0x523bbb[_0x100d80(0xe4)]-_0x523bbb['tuoi_no']);continue;case'4':_0x523bbb[_0x100d80(0xa8)]=Math[_0x100d80(0xb5)](0x0,_0x55c5cd[_0x100d80(0x11d)](_0x523bbb[_0x100d80(0xff)],_0x523bbb['han_tt']));continue;case'5':if(_0x55c5cd[_0x100d80(0xd4)](_0x523bbb[_0x100d80(0xa8)],0x0)&&_0x55c5cd['dURrc'](_0x523bbb[_0x100d80(0xa8)],0x1e))_0x523bbb[_0x100d80(0xd0)]=_0x523bbb[_0x100d80(0xbc)];continue;case'6':if(_0x55c5cd[_0x100d80(0xb4)](_0x523bbb[_0x100d80(0xa8)],0x3c)&&_0x523bbb[_0x100d80(0xa8)]<=0x5a)_0x523bbb['qua_han3']=_0x523bbb[_0x100d80(0xbc)];continue;}break;}}}else _0x55c5cd[_0x100d80(0xe7)]!==_0x55c5cd[_0x100d80(0x117)]?(_0x523bbb[_0x100d80(0xff)]=0x0,_0x523bbb[_0x100d80(0x11f)]=0x0,_0x523bbb[_0x100d80(0xa8)]=0x0):_0x333367=_0x22e2bf()[_0x100d80(0x131)](_0x4dda38['tuoi_no_min'],_0x111aa1[_0x100d80(0xbe)])[_0x100d80(0xe5)]();_0x55c5cd['gdSTR'](_0x4dc5a1,null,_0x523bbb);})[_0x25397e(0x10f)](_0x59a0fc=>{_0x4dc5a1(_0x59a0fc);});}else _0x5af274=_0x34028c[_0x25397e(0x120)](_0x32daef=>_0x32daef[_0x25397e(0xff)]>=_0x3030d7[_0x25397e(0xab)]);},_0x5c3c8b=>{const _0x11885d=_0x13aa87,_0xcf534a=_0x11885d(0x143)[_0x11885d(0xf2)]('|');let _0x32ce00=0x0;while(!![]){switch(_0xcf534a[_0x32ce00++]){case'0':_0x26075c['tuoi_no_min']&&(_0x477214=_0x477214[_0x11885d(0x120)](_0x387e89=>_0x387e89['tuoi_no']>=_0x26075c[_0x11885d(0xab)]));continue;case'1':_0x26075c[_0x11885d(0x13c)]&&(_0x477214=_0x477214['filter'](_0x57cc45=>_0x57cc45['tuoi_no']<=_0x26075c['tuoi_no_max']));continue;case'2':_0x26075c[_0x11885d(0xff)]&&(_0x477214=_0x477214[_0x11885d(0x120)](_0x11d97e=>_0x11d97e[_0x11885d(0xff)]>=_0x26075c[_0x11885d(0xff)]));continue;case'3':if(_0x5c3c8b)return _0x5594f6['OpGsU'](_0x215500,_0x5c3c8b);continue;case'4':_0x5594f6[_0x11885d(0xce)](_0x1be58c,_0x477214);continue;case'5':_0x477214=_0x477214[_0x11885d(0x120)](_0x3d3275=>_0x3d3275[_0x11885d(0xed)]>0x0);continue;}break;}});});}else{_0x4a6b02[_0x20cce1(0xff)]=_0x92bccd['UaCcN'](_0x572abe)[_0x20cce1(0x13a)](_0x92bccd[_0x20cce1(0x125)](_0x247af0,_0x4adf62[_0x20cce1(0x12f)]),_0x20cce1(0x14c)),_0x55ac2e['so_ngay_trong_han']=_0x19912a[_0x20cce1(0xb5)](0x0,_0x92bccd[_0x20cce1(0x136)](_0x4c11e1[_0x20cce1(0xe4)],_0x285af4[_0x20cce1(0xff)])),_0x5def4c[_0x20cce1(0xa8)]=_0x2cad4f[_0x20cce1(0xb5)](0x0,_0x92bccd[_0x20cce1(0x136)](_0x18520f[_0x20cce1(0xff)],_0x4c81d6[_0x20cce1(0xe4)]));if(_0x92bccd[_0x20cce1(0x133)](_0x22f505[_0x20cce1(0xa8)],0x0)&&_0x92bccd[_0x20cce1(0xcc)](_0x2301ef[_0x20cce1(0xa8)],0x1e))_0x6e8f52['qua_han1']=_0x2217f0[_0x20cce1(0xbc)];if(_0x2e600f[_0x20cce1(0xa8)]>0x1e&&_0x92bccd[_0x20cce1(0xcc)](_0x6f7296['so_ngay_qua_han'],0x3c))_0x2889ab[_0x20cce1(0x110)]=_0x3d7625['con_lai_nt'];if(_0x92bccd[_0x20cce1(0x133)](_0x51ab81[_0x20cce1(0xa8)],0x3c)&&_0x92bccd['dSieA'](_0x4fc6af[_0x20cce1(0xa8)],0x5a))_0x4e4f68[_0x20cce1(0xca)]=_0x41aff8['con_lai_nt'];if(_0x92bccd[_0x20cce1(0x133)](_0x3a564f[_0x20cce1(0xa8)],0x5a))_0x245be0[_0x20cce1(0x113)]=_0x488808['con_lai_nt'];}});};module[_0x26e529(0x121)]=(_0x451133,_0x377656)=>{const _0x3290e9=_0x26e529,_0x5f3d6a={'ehsMg':function(_0x104840,_0x71bf3e){return _0x104840===_0x71bf3e;},'IBSPN':_0x3290e9(0xee),'VtptT':function(_0x4f1485,_0x24ee6b){return _0x4f1485(_0x24ee6b);},'ylYlR':function(_0x4b26bd,_0x103ac0){return _0x4b26bd(_0x103ac0);}};if(!_0x377656)return _0x5f3d6a['VtptT'](func,_0x451133);_0x5f3d6a['ylYlR'](func,_0x451133)[_0x3290e9(0xd1)](_0x3a7e48=>{const _0x33cf39=_0x3290e9;_0x5f3d6a['ehsMg'](_0x5f3d6a['IBSPN'],_0x5f3d6a[_0x33cf39(0xc7)])?_0x377656(null,_0x3a7e48):_0x2d896f[_0x33cf39(0x106)]=_0x1c8406[_0x33cf39(0x106)];})[_0x3290e9(0x10f)](_0x18537c=>{_0x377656(_0x18537c);});};
|