import{_ as T,a as B,ad as R,r as C,aR as S,aX as F,E as H,e as r,o as c,g as v,c as e,w as t,F as x,i,t as m,h as M,az as N,aD as U,aE as V,n as z,a3 as j,v as I,f as L,a2 as O}from"./app-DNXD_-wA.js";import{d as X}from"./datatable-5GU3Hhye.js";import{U as q}from"./UserInfo-BGQGlqn4.js";import{D as G}from"./DateRangePicker-DoWZ1EgZ.js";import{A as J}from"./AdminPageHeader-D0JgvBut.js";import{P as K}from"./Payments-CUHCe83j.js";import{E as Q}from"./ExportTable-ZJCWs6G4.js";import"./filter-CE38RVHC.js";import"./index-GwS-7oj1.js";import"./fields-D_-DTnzt.js";import"./FilePdfOutlined-_nVXxeg3.js";import"./PrinterOutlined-C8gRLbmM.js";import"./FileExcelOutlined-Di-ljtjO.js";const W={components:{UserInfo:q,DateRangePicker:G,AdminPageHeader:J,Payments:K,ExprotTable:Q},setup(){const n=X(),{permsArray:a,willSubscriptionModuleVisible:f}=B(),o=R({user_id:void 0,payment_mode_id:void 0,dates:[]}),d=C({}),g=S();return F(()=>{(!((a.value.includes("purchases_view")||a.value.includes("sales_view")||a.value.includes("purchase_returns_view")||a.value.includes("sales_returns_view"))&&a.value.includes("order_payments_view")||a.value.includes("admin"))||!f("reports"))&&g.push("admin.dashboard.index")}),H(()=>{const u=axiosAdmin.post("customer-suppliers");Promise.all([u]).then(([_])=>{d.value=_.data})}),{...n,filters:o,users:d,permsArray:a}}};function Y(n,a,f,o,d,g){const u=r("ExprotTable"),_=N,y=r("router-link"),p=U,h=V,P=r("AdminPageHeader"),l=z,w=O,k=j,$=r("DateRangePicker"),b=I,D=r("admin-page-filters"),E=r("Payments"),A=r("admin-page-table-content");return c(),v(x,null,[e(P,null,{header:t(()=>[e(_,{title:n.$t("menu.payments"),class:"p-0"},{extra:t(()=>[e(u,{exportType:"payment_reports",tableName:"payment-reports-table",title:`${n.$t("menu.payments")} ${n.$t("menu.reports")}`},null,8,["title"])]),_:1},8,["title"])]),breadcrumb:t(()=>[e(h,{separator:"-",style:{"font-size":"12px"}},{default:t(()=>[e(p,null,{default:t(()=>[e(y,{to:{name:"admin.dashboard.index"}},{default:t(()=>[i(m(n.$t("menu.dashboard")),1)]),_:1})]),_:1}),e(p,null,{default:t(()=>[i(m(n.$t("menu.reports")),1)]),_:1}),e(p,null,{default:t(()=>[i(m(n.$t("menu.payments")),1)]),_:1})]),_:1})]),_:1}),e(D,null,{default:t(()=>[e(b,{gutter:[16,16]},{default:t(()=>[e(l,{xs:24,sm:24,md:12,lg:10,xl:10}),e(l,{xs:24,sm:24,md:12,lg:14,xl:14},{default:t(()=>[e(b,{gutter:[16,16],justify:"end"},{default:t(()=>[e(l,{xs:24,sm:24,md:7,lg:6,xl:6},{default:t(()=>[e(k,{value:o.filters.user_id,"onUpdate:value":a[0]||(a[0]=s=>o.filters.user_id=s),placeholder:n.$t("common.select_default_text",[n.$t("user.user")]),allowClear:!0,style:{width:"100%"},optionFilterProp:"title","show-search":""},{default:t(()=>[(c(!0),v(x,null,M(o.users,s=>(c(),L(w,{key:s.xid,title:s.name,value:s.xid},{default:t(()=>[i(m(s.name),1)]),_:2},1032,["title","value"]))),128))]),_:1},8,["value","placeholder"])]),_:1}),e(l,{xs:24,sm:24,md:10,lg:8,xl:8},{default:t(()=>[e($,{onDateTimeChanged:a[1]||(a[1]=s=>{o.filters.dates=s})})]),_:1})]),_:1})]),_:1})]),_:1})]),_:1}),e(A,null,{default:t(()=>[e(E,{user_id:o.filters.user_id,dates:o.filters.dates},null,8,["user_id","dates"])]),_:1})],64)}const _e=T(W,[["render",Y]]);export{_e as default};
