15 lines
121 KiB
JavaScript
15 lines
121 KiB
JavaScript
import{j as u,ah as Ne,i as Je,I as $6,a_ as E6,an as N,B as X,b3 as Ze,aq as Oe,ar as xe,b7 as pe,as as je,T as zu,d as T6,aO as Be,aP as me,aQ as ua,al as N6,b5 as Re,b6 as Q6,bq as Ye,br as H6,bn as ea,bo as Se,b as aa}from"./mui-vendor-D_SVL-Dx.js";import{B as la}from"./BackButton-Dr-K0JXJ.js";import{l as ta,p as ge,q as ye,v as H,et as Pe,r as oa,A as Fu,t as We,a0 as d,G as f,ad as ze,O as fe,$ as G,S as _u,L as q6,j as K,h as v6,eu as na,ev as sa,ew as Ke,ex as He,ey as qe,y as J6,ap as Z6,aA as O6,ez as ra,X as ca,W as Ca}from"./index-D80MdVQn.js";import{u as B6,f as ku,a as Ue}from"./redux-vendor-CfkcHgWN.js";import{R as y6}from"./ResponsiveTable-bUYl0qDM.js";import{d as Ee}from"./ToggleOffOutlined-C41wua6U.js";import{d as we}from"./ToggleOn-Cv1P2E48.js";import{r as c,u as X6,j as da}from"./react-vendor-CmFgShSM.js";import{P as ga,a as Aa,p as ia,b as fa,c as ha}from"./ProvinceWagePaymentTransactions-DBSsTDHm.js";import{d as xa}from"./Article-B5YcjArk.js";import{a as pa}from"./index-Eu1ghc4Y.js";import{d as ja}from"./Tune-BBzxV8DK.js";import{R as L6,a as U6}from"./index.esm-C1-dCPnj.js";import{d as Sa}from"./ArrowDownward-LnU1CBf1.js";import{g as Ae}from"./getSystemBaseAddress-B3dWKz82.js";import{S as Ve}from"./SimpleTable-tm4uaKUf.js";import{d as Fa}from"./SystemUpdateAlt-QYMcO5S3.js";import{d as Ce}from"./Visibility-Cb7r65bM.js";import{c as ie}from"./checkPathStartsWith-DedybDvj.js";import{P as G6}from"./PageTable-B0hPU2Kw.js";import"./FilterAlt-DZsHj-WQ.js";import"./styled-components.browser.esm-gS9mh05b.js";import"./num2persian-BIYy8amq.js";import"./SlaughterPayFeesGateway-DGd5fk9m.js";import"./ShowImage-DxnwAx1k.js";import"./Download-CJYPO5Fu.js";import"./Close-J1gH5PMD.js";import"./resizeImage-Csf2MO3w.js";import"./toBase64-UDzdrM-n.js";import"./PublishedWithChanges-Dz7dEVRv.js";import"./Delete-CIwpNviU.js";import"./Search-TgPAjvS8.js";const P={page:{width:"214mm",height:"302mm",display:"flex",margin:"0 auto",justifyContent:"center",alignItems:"center",position:"relative",direction:"rtl",fontFamily:"titr",fontWeight:"bold"},pageData:{display:"flex",flexDirection:"column",padding:"20px",border:"2px solid #666",borderRadius:"10px",width:"50%",position:"relative",backgroundColor:"#fff",boxShadow:"0px 0px 20px rgba(0, 0, 0, 0.1)"},title:{textAlign:"center",marginBottom:"10px",fontSize:"24px",fontWeight:"bold",color:"#333"},logo:{width:"100px",height:"auto",margin:"0 auto",display:"block"},hr:{border:"none",borderTop:"1px solid #ccc",margin:"5px 0"},row:{display:"flex",flexDirection:"row",marginBottom:"10px",justifyContent:"space-between"},label:{flex:"0 0 40%",textAlign:"right",marginRight:"10px",fontWeight:"bold",color:"#555"},value:{textAlign:"right",color:"#333",fontFamily:"titr"}},Le=c.forwardRef(({item:t,isPayment:E},x)=>{var p,$,g,D,w;return u.jsx("div",{ref:x,children:u.jsx("div",{style:P.page,children:t&&u.jsxs("div",{style:P.pageData,children:[u.jsx("img",{src:ta,alt:"Logo",style:P.logo}),u.jsx("h1",{style:P.title,children:"رسید پرداخت"}),u.jsx("hr",{style:P.hr}),u.jsxs("div",{style:P.row,children:[u.jsx("div",{style:P.label,children:"تاریخ و زمان:"}),u.jsx("div",{style:P.value,children:`${ge(t.date)} ساعت ${ye(t.date)}`})]}),u.jsx("hr",{style:P.hr}),u.jsxs("div",{style:P.row,children:[u.jsx("div",{style:P.label,children:"پرداخت کننده:"}),u.jsx("div",{style:P.value,children:E?(p=t==null?void 0:t.payerInfo)==null?void 0:p.fullname:t.payer})]}),!E&&u.jsxs(u.Fragment,{children:[u.jsx("hr",{style:P.hr}),u.jsxs("div",{style:P.row,children:[u.jsx("div",{style:P.label,children:"تعداد سفارشات:"}),u.jsx("div",{style:P.value,children:($=t.information)==null?void 0:$.totalRequestNumber})]}),u.jsx("hr",{style:P.hr}),u.jsxs("div",{style:P.row,children:[u.jsx("div",{style:P.label,children:"تعداد کل (قطعه):"}),u.jsx("div",{style:P.value,children:(g=t.information)==null?void 0:g.totalQuantity})]}),u.jsx("hr",{style:P.hr}),u.jsxs("div",{style:P.row,children:[u.jsx("div",{style:P.label,children:"وزن کل (کیلوگرم):"}),u.jsx("div",{style:P.value,children:(D=t.information)==null?void 0:D.totalWeight})]})]}),u.jsx("hr",{style:P.hr}),u.jsxs("div",{style:P.row,children:[u.jsx("div",{style:P.label,children:"شماره درخواست:"}),u.jsx("div",{style:P.value,children:t.orderId})]}),u.jsx("hr",{style:P.hr}),u.jsxs("div",{style:P.row,children:[u.jsx("div",{style:P.label,children:"شماره پیگیری:"}),u.jsx("div",{style:P.value,children:t.refId})]}),u.jsx("hr",{style:P.hr}),u.jsxs("div",{style:P.row,children:[u.jsx("div",{style:P.label,children:"کدسفارش:"}),u.jsx("div",{style:P.value,children:t.orderId})]}),u.jsx("hr",{style:P.hr}),u.jsxs("div",{style:P.row,children:[u.jsx("div",{style:P.label,children:"شماره کارت:"}),u.jsx("div",{style:P.value,children:t.cardHolderPan})]}),u.jsx("hr",{style:P.hr}),u.jsxs("div",{style:P.row,children:[u.jsx("div",{style:P.label,children:"مبلغ:"}),u.jsxs("div",{style:P.value,children:[(w=t.amount)==null?void 0:w.toLocaleString()," ریال"]})]})]})})})});Le.displayName="SuccessTransactionRecipt";Le.propTypes={item:Ne.PropTypes.object};const ya="/assets/signature-D8sU-GQE.png",F={documentTitle:{display:"flex",justifyContent:"center",alignItems:"center",fontSize:"12px"},row:{display:"flex",justifyContent:"space-between",alignItems:"start",gap:"5px",direction:"rtl"},column:{display:"flex",height:"100px",borderStyle:"solid",borderWidth:"1px",justifyContent:"center",alignItems:"center",fontSize:"12px"},itemsColumn:{display:"flex",height:"100px",borderStyle:"solid",borderWidth:"1px",justifyContent:"center",alignItems:"center",fontSize:"12px"},item:{display:"flex",gap:"5px",marginTop:"10px",alignItems:"center"},itemTitle:{fontSize:"12px",fontWeight:"bolder"},itemText:{fontSize:"10px"},invoiceTable:{width:"100%",borderCollapse:"collapse",alignSelf:"center"},tableCell:{border:"1px solid #000",pAlign:"left",textAlign:"center",fontSize:11,padding:"10px",fontFamily:"iranyekan"},tableCellTexts:{border:"1px solid #000",pAlign:"left",textAlign:"center",fontSize:12,padding:"10px",fontFamily:"iranyekan"},tableHeader:{pageBreakAfter:"auto"},headerRow:{backgroundColor:"#eee",pageBreakInside:"avoid",pageBreakAfter:"auto"},tableHeaderCell:{backgroundColor:"#eee",fontSize:10,border:"1px solid #000",padding:"4px",textAlign:"center",fontWeight:"bold",minWidth:"100px"},tableHeaderCellText:{backgroundColor:"#eee",fontSize:10,border:"1px solid #000",padding:"4px",textAlign:"center",fontWeight:"bold",minWidth:"260px"}},be=c.forwardRef(({item:t,isUnion:E,union:x,user:p},$)=>{const g=[{title:"فروشنده",text:E?(x==null?void 0:x.unitName)||"-":"هوشمند سازان "},{title:"شناسه ملی",text:E?(x==null?void 0:x.unitNationalId)||"-":"14013838372"},{title:"شماره ثبت",text:E?(x==null?void 0:x.unitRegistrationNumber)||"-":"17514"},{title:"استان",text:E?(x==null?void 0:x.unitProvince)||"-":"البرز"},{title:"شهرستان",text:E?(x==null?void 0:x.unitCity)||"-":"کرج"},{title:"تلفن",text:E?(x==null?void 0:x.mobile)||"-":"(021)28421237"},{title:"کد پستی",text:E?(x==null?void 0:x.unitPostalCode)||"-":"3139735185"},{title:"نشانی",text:E?(x==null?void 0:x.unitAddress)||"-":"نبش بلوار سرداران"}],D=[{title:"فروشنده",text:(p==null?void 0:p.unitName)||"-"},{title:"شناسه ملی",text:(p==null?void 0:p.unitNationalId)||"-"},{title:"شماره ثبت",text:(p==null?void 0:p.unitRegistrationNumber)||"-"},{title:"استان",text:(p==null?void 0:p.unitProvince)||"-"},{title:"شهرستان",text:(p==null?void 0:p.unitCity)||"-"},{title:"تلفن",text:(p==null?void 0:p.mobile)||"-"},{title:"کد پستی",text:(p==null?void 0:p.unitPostalCode)||"-"},{title:"نشانی",text:(p==null?void 0:p.unitAddress)||"-"}];return u.jsxs("div",{ref:$,style:{fontFamily:"iranyekan"},children:[u.jsx("div",{style:F.documentTitle,children:u.jsx("h2",{children:"صورتحسـاب فروش کالا و خدمات"})}),u.jsxs("div",{style:F.row,children:[u.jsx("div",{style:{...F.column,backgroundColor:"#eee",width:"5%"},children:u.jsx("span",{style:{writingMode:"vertical-lr",rotate:"180deg"},children:"فروشنده"})}),u.jsx("div",{style:{...F.itemsColumn,width:"85%"},children:u.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"5px",padding:"10px",width:"100%"},children:g==null?void 0:g.map((w,k)=>u.jsxs("div",{style:F.item,children:[u.jsxs("span",{style:F.itemTitle,children:[w.title,":"]}),u.jsx("span",{style:F.itemText,children:w.text})]},k))})}),u.jsx("div",{style:{...F.column,width:"10%"},children:u.jsxs("div",{style:{display:"grid"},children:[u.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",gap:0},children:[u.jsxs("span",{style:{fontSize:"11px",fontWeight:"bolder"},children:["شماره فاکتور: ",""]}),u.jsx("span",{style:{fontSize:"11px"},children:H(new Pe).format("YYMMDD")})]}),u.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:"10px"},children:[u.jsxs("span",{style:{fontSize:"11px",fontWeight:"bolder"},children:["تاریخ: ",""]}),u.jsx("span",{style:{fontSize:"11px"},children:new Pe().toLocale("fa").format("YYYY/MM/DD")})]})]})})]}),u.jsxs("div",{style:{...F.row,marginTop:"3px"},children:[u.jsx("div",{style:{...F.column,backgroundColor:"#eee",width:"5%"},children:u.jsx("span",{style:{writingMode:"vertical-lr",rotate:"180deg"},children:"خریدار"})}),u.jsx("div",{style:{...F.itemsColumn,width:"85%"},children:u.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"5px",padding:"10px",width:"100%"},children:D==null?void 0:D.map((w,k)=>u.jsxs("div",{style:F.item,children:[u.jsxs("span",{style:F.itemTitle,children:[w.title,":"]}),u.jsx("span",{style:F.itemText,children:w.text})]},k))})}),u.jsx("div",{style:{display:"flex",height:"100px",marginRight:"2px",width:"10%"}})]}),u.jsx("div",{style:{...F.row,marginTop:"3px"},children:u.jsxs("table",{style:F.invoiceTable,children:[u.jsx("thead",{style:F.tableHeader,children:u.jsxs("tr",{style:F.headerRow,children:[u.jsx("th",{style:{...F.tableHeaderCell,minWidth:"30px"},children:"ردیف"}),u.jsx("th",{style:F.tableHeaderCellText,children:"شرح خدمت"}),u.jsx("th",{style:F.tableHeaderCell,children:"مبلغ واحد (ریال)"}),u.jsx("th",{style:F.tableHeaderCell,children:"جمع مالیات و عوارض ارزش افزوده (ریال)"}),u.jsx("th",{style:F.tableHeaderCell,children:"مبلغ کل (ریال)"}),u.jsx("th",{style:F.tableHeaderCell,children:"تخفیف (ریال)"}),u.jsxs("th",{style:F.tableHeaderCell,children:["جمع کل پس از تخفیف",u.jsx("br",{}),"( با احتساب مالیات و عوارض ) ریال"]})]})}),u.jsxs("tbody",{children:[E?u.jsxs(u.Fragment,{children:[u.jsxs("tr",{style:F.tableRow,children:[u.jsx("td",{style:F.tableCell,children:"1"}),u.jsxs("td",{style:F.tableCellTexts,children:["تعرفه استفاده از سامانه رصدیار",u.jsx("br",{}),"(سهم اتحادیه مرغداران گوشتی)"]}),u.jsx("td",{style:F.tableCell,children:((t==null?void 0:t.unionShare)/100*90).toLocaleString()}),u.jsx("td",{style:F.tableCell,children:((t==null?void 0:t.unionShare)/100*10).toLocaleString()}),u.jsx("td",{style:F.tableCell,children:t==null?void 0:t.unionShare.toLocaleString()}),u.jsx("td",{style:F.tableCell,children:"0"}),u.jsx("td",{style:F.tableCell,children:t==null?void 0:t.unionShare.toLocaleString()})]}),u.jsxs("tr",{style:F.tableRow,children:[u.jsx("td",{style:F.tableCell,children:"2"}),u.jsxs("td",{style:F.tableCellTexts,children:["تعرفه استفاده از سامانه رصدیار",u.jsx("br",{}),"(سهم صنف پروتئین)"]}),u.jsx("td",{style:F.tableCell,children:((t==null?void 0:t.guildsShare)/100*90).toLocaleString()}),u.jsxs("td",{style:F.tableCell,children:[" ",((t==null?void 0:t.guildsShare)/100*10).toLocaleString()]}),u.jsx("td",{style:F.tableCell,children:t==null?void 0:t.guildsShare.toLocaleString()}),u.jsx("td",{style:F.tableCell,children:"0"}),u.jsx("td",{style:F.tableCell,children:t==null?void 0:t.guildsShare.toLocaleString()})]}),u.jsxs("tr",{style:F.tableRow,children:[u.jsx("td",{style:F.tableCell,children:"3"}),u.jsxs("td",{style:F.tableCellTexts,children:["تعرفه استفاده از سامانه رصدیار",u.jsx("br",{}),"(سهم دامپزشک فارم)"]}),u.jsxs("td",{style:F.tableCell,children:[" ",((t==null?void 0:t.otherShare)/100*90).toLocaleString()]}),u.jsx("td",{style:F.tableCell,children:((t==null?void 0:t.otherShare)/100*10).toLocaleString()}),u.jsx("td",{style:F.tableCell,children:t==null?void 0:t.otherShare.toLocaleString()}),u.jsx("td",{style:F.tableCell,children:"0"}),u.jsx("td",{style:F.tableCell,children:t==null?void 0:t.otherShare.toLocaleString()})]})]}):u.jsxs("tr",{style:F.tableRow,children:[u.jsx("td",{style:F.tableCell,children:"1"}),u.jsxs("td",{style:F.tableCellTexts,children:["تعرفه استفاده از سامانه رصدیار",u.jsx("br",{}),"(سهم شرکت هوشمند سازان)"]}),u.jsx("td",{style:F.tableCell,children:((t==null?void 0:t.companyShare)/100*90).toLocaleString()}),u.jsx("td",{style:F.tableCell,children:((t==null?void 0:t.companyShare)/100*10).toLocaleString()}),u.jsx("td",{style:F.tableCell,children:t==null?void 0:t.companyShare.toLocaleString()}),u.jsx("td",{style:F.tableCell,children:"0"}),u.jsx("td",{style:F.tableCell,children:t==null?void 0:t.companyShare.toLocaleString()})]}),E?u.jsxs("tr",{style:F.tableRow,children:[u.jsx("td",{style:{...F.tableCell,backgroundColor:"#eee"},colSpan:2,children:"جمع کل"}),u.jsx("td",{style:F.tableCell,children:(((t==null?void 0:t.unionShare)+(t==null?void 0:t.guildsShare)+(t==null?void 0:t.otherShare))/100*90).toLocaleString()}),u.jsx("td",{style:F.tableCell,children:(((t==null?void 0:t.unionShare)+(t==null?void 0:t.guildsShare)+(t==null?void 0:t.otherShare))/100*10).toLocaleString()}),u.jsxs("td",{style:F.tableCell,children:[" ",((t==null?void 0:t.unionShare)+(t==null?void 0:t.guildsShare)+(t==null?void 0:t.otherShare)).toLocaleString()]}),u.jsx("td",{style:F.tableCell,children:"0"}),u.jsxs("td",{style:F.tableCell,children:[" ",((t==null?void 0:t.unionShare)+(t==null?void 0:t.guildsShare)+(t==null?void 0:t.otherShare)).toLocaleString()]})]}):u.jsxs("tr",{style:F.tableRow,children:[u.jsx("td",{style:{...F.tableCell,backgroundColor:"#eee"},colSpan:2,children:"جمع کل"}),u.jsx("td",{style:F.tableCell,children:((t==null?void 0:t.companyShare)/100*90).toLocaleString()}),u.jsx("td",{style:F.tableCell,children:((t==null?void 0:t.companyShare)/100*10).toLocaleString()}),u.jsx("td",{style:F.tableCell,children:t==null?void 0:t.companyShare.toLocaleString()}),u.jsx("td",{style:F.tableCell,children:"0"}),u.jsx("td",{style:F.tableCell,children:t==null?void 0:t.companyShare.toLocaleString()})]}),u.jsx("tr",{style:{height:"120px"},children:u.jsxs("td",{style:F.tableCell,colSpan:9,children:[u.jsx("div",{style:{display:"flex",height:"120px",alignItems:"start",justifyContent:"center"},children:u.jsxs("div",{style:{display:"flex",justifyContent:"space-around",alignItems:"start",width:"100%"},children:[u.jsxs("div",{style:{display:"grid"},children:[u.jsxs("span",{style:{fontSize:"12px"},children:[" ","مهر و امضای فروشنده:"]}),!E&&u.jsx("img",{src:ya,alt:"امضا",style:{height:"90px",marginTop:"20px"}})]}),u.jsx("div",{style:{fontSize:"12px"},children:"مهر و امضای خریدار:"})]})}),u.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"start"},children:E&&u.jsx("span",{style:{color:"red",fontSize:"11px"},children:"* توجه: مبلغ کل به حساب اتحادیه مرغداران گوشتی استان واریز گردیده است ."})})]})})]})]})}),u.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"center",direction:"rtl",marginTop:"10px",alignItems:"center"},children:u.jsxs("div",{style:{display:"flex",justifyContent:"space-between",gap:"10px",alignItems:"center",width:"100%"},children:[u.jsx("div",{children:u.jsxs("span",{style:{fontSize:"13px",fontWeight:"bolder"},children:["اطلاعات تراکنش"," "]})}),u.jsx("div",{children:u.jsxs("span",{style:{fontSize:"11px"},children:["تاریخ پرداخت:"," ",(t==null?void 0:t.date)&&`${ge(t==null?void 0:t.date)} ساعت (${ye(t==null?void 0:t.date)})`]})}),u.jsx("div",{children:u.jsxs("span",{style:{fontSize:"11px"},children:["نوع پرداخت:"," ",(t==null?void 0:t.transactionType)==="wage-gateway-auto"?"آنلاین":(t==null?void 0:t.transactionType)==="correspondence"?"مکاتبات":"دستی"]})}),u.jsx("div",{children:u.jsxs("span",{style:{fontSize:"11px"},children:["کد پیگیری: ",t==null?void 0:t.refId]})}),u.jsx("div",{children:u.jsxs("span",{style:{fontSize:"11px"},children:["شماره کارت: ",t==null?void 0:t.cardHolderPan]})})]})})]})});be.displayName="ProvincePaymentFactorFile";be.propTypes={item:Ne.PropTypes.object};var $e={},Ea=Je;Object.defineProperty($e,"__esModule",{value:!0});var Qe=$e.default=void 0,wa=Ea(oa()),La=u;Qe=$e.default=(0,wa.default)((0,La.jsx)("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 16H8v-2h8zm0-4H8v-2h8zm-3-5V3.5L18.5 9z"}),"Description");const de=({killhouseKey:t,type:E})=>{var Hu,qu,vu,I6,k6,_6,M6,D6,R6,Y6;const[,,x,p,$,g]=c.useContext(Fu),D=B6();c.useEffect(()=>{const q=H(new Date).format("YYYY-MM-DD");p(q),g(q)},[]);const w=q=>{M(q.target.value)},[k,l]=c.useState([]),[b,j]=c.useState(0),[_,U]=c.useState(10),[z,M]=c.useState(""),[I,T]=c.useState(1),[Y,e]=c.useState([]),[W,V]=c.useState(!1),C=async q=>{D(q6());const y=await K.get(`internal-transactions/?search=filter&value=${z}&page=${q}&page_size=${_}&type=paid&${E}=${t}&role=${d()}${W?`&date1=${x}&date2=${$}`:""}`);D(v6()),l(y.data.results),j(y.data.count)},S=q=>{C(q),T(q)},n=q=>{U(q),T(1)},s=()=>{C(I!==0?I:1)},[r,A]=c.useState(),h=c.useRef(),L=We.useReactToPrint({content:()=>h.current,documentTitle:"گزارش پرونده "}),v=q=>{A(q,L())},[J,Mu]=c.useState(),yu=c.useRef(),Du=We.useReactToPrint({content:()=>yu.current,documentTitle:"فاکتور پرداخت",pageStyle:`
|
||
@page {
|
||
size: landscape;
|
||
margin: 0;
|
||
dir: rtl;
|
||
margin: 20px;
|
||
}
|
||
body {
|
||
-webkit-print-color-adjust: exact;
|
||
}
|
||
`}),Ru=q=>{Mu(q),setTimeout(()=>{Du()},1)},Yu=({item:q})=>{const[y,Pu]=c.useState(null),w6=b6=>{Pu(b6.currentTarget)},Wu=()=>{Pu(null)},Nu=!!y,P6=Nu?`paid-fee-actions-${q==null?void 0:q.key}`:void 0,V6=()=>{Wu(),v(q)},W6=b6=>{Wu(),Ru({item:q,isUnion:b6})};return u.jsxs("div",{children:[u.jsx($6,{"aria-describedby":P6,color:"primary",onClick:w6,size:"small",children:u.jsx(ja,{fontSize:"small"})}),u.jsx(Ze,{anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},id:P6,open:Nu,anchorEl:y,onClose:Wu,children:u.jsxs(Oe,{sx:{p:1},children:[u.jsx(xe,{disablePadding:!0,children:u.jsxs(pe,{sx:{color:"error.main"},onClick:V6,children:[u.jsx(je,{sx:{minWidth:36,color:"inherit"},children:u.jsx(pa,{fontSize:"small"})}),u.jsx(zu,{variant:"body2",color:"inherit",children:"چاپ رسید"})]})}),u.jsx(xe,{disablePadding:!0,children:u.jsxs(pe,{sx:{color:"primary.main"},onClick:()=>W6(!0),children:[u.jsx(je,{sx:{minWidth:36,color:"inherit"},children:u.jsx(xa,{fontSize:"small"})}),u.jsx(zu,{variant:"body2",color:"inherit",children:"فاکتور اتحادیه"})]})}),u.jsx(xe,{disablePadding:!0,children:u.jsxs(pe,{sx:{color:"success.main"},onClick:()=>W6(!1),children:[u.jsx(je,{sx:{minWidth:36,color:"inherit"},children:u.jsx(Qe,{fontSize:"small"})}),u.jsx(zu,{variant:"body2",color:"inherit",children:"فاکتور سامانه"})]})})]})})]})};c.useEffect(()=>{const q=k==null?void 0:k.map((y,Pu)=>{var w6,Wu,Nu;return[I===1?Pu+1:Pu+_*(I-1)+1,`${ge(y.date)} ساعت (${ye(y.date)})`,d()==="SuperAdmin"?u.jsxs(f,{container:!0,xs:12,alignItems:"center",children:[(y==null?void 0:y.transactionType)==="wage-gateway-auto"?"آنلاین":(y==null?void 0:y.transactionType)==="correspondence"?"مکاتبات":"دستی",u.jsx($6,{"aria-label":"delete",color:"primary",onClick:()=>{D(fe({title:"ویرایش نوع پرداخت",content:u.jsx(ga,{fetchApiData:s,item:y})}))},children:u.jsx(ze,{})})]}):(y==null?void 0:y.transactionType)==="wage-gateway-auto"?"آنلاین":(y==null?void 0:y.transactionType)==="correspondence"?"مکاتبات":"دستی",`${(w6=y==null?void 0:y.payerInfo)==null?void 0:w6.fullname} (${(Wu=y==null?void 0:y.payerInfo)==null?void 0:Wu.mobile})`,y==null?void 0:y.orderId,y==null?void 0:y.refId,y==null?void 0:y.orderId,y==null?void 0:y.cardHolderPan,(Nu=y==null?void 0:y.transactionAmount)==null?void 0:Nu.toLocaleString(),d()==="SuperAdmin"?u.jsxs(f,{container:!0,xs:12,alignItems:"center",children:[y!=null&&y.description?y==null?void 0:y.description:"-"," ",u.jsx($6,{"aria-label":"delete",color:"primary",onClick:()=>{D(fe({title:"ویرایش توضیحات",content:u.jsx(Aa,{fetchApiData:s,item:y})}))},children:u.jsx(ze,{})})]}):y!=null&&y.description?y==null?void 0:y.description:"-",u.jsx(Yu,{item:y},(y==null?void 0:y.key)??Pu)]});e(q)},[k]),c.useEffect(()=>{C(1)},[D,x,$,_]);const Ku=async q=>{q.preventDefault(),D(q6());try{const y=await K.get(`internal-transactions/?search=filter&value=${z}&page=${I}&page_size=${_}&type=paid&${E}=${t}&role=${d()}${W?`&date1=${x}&date2=${$}`:""}`);l(y.data.results),j(y.data.count),D(v6())}catch(y){console.error("Error fetching data:",y)}};return u.jsxs(f,{container:!0,xs:12,justifyContent:"center",alignItems:"center",gap:2,children:[u.jsxs(f,{container:!0,alignItems:"center",justifyContent:"space-between",gap:2,paddingTop:2,mb:1,width:"100%",children:[u.jsxs("div",{style:{visibility:"hidden",position:"absolute"},children:[u.jsx(Le,{ref:h,item:r,isPayment:!0}),u.jsx(be,{ref:yu,item:J==null?void 0:J.item,user:(vu=(qu=(Hu=J==null?void 0:J.item)==null?void 0:Hu.killHouse)==null?void 0:qu.killHouseOperator)==null?void 0:vu.user,union:(I6=J==null?void 0:J.item)==null?void 0:I6.unionInfo,isUnion:J==null?void 0:J.isUnion})]}),u.jsxs(f,{container:!0,gap:1,style:{borderStyle:"solid",borderWidth:"1px",padding:"5px",borderRadius:"15px",borderColor:"gray",justifyContent:"left"},alignItems:"center",children:[u.jsx(E6,{icon:u.jsx(Ee,{}),checkedIcon:u.jsx(we,{}),checked:W,onChange:()=>V(!W),color:"primary",size:"large"}),u.jsx(f,{children:u.jsx(G,{disabled:!W,label:"از تاریخ",id:"date",renderInput:q=>u.jsx(N,{size:"small",style:{width:"160px"},...q}),value:x,onChange:q=>{p(H(q).format("YYYY-MM-DD"))}})}),u.jsx(f,{children:u.jsx(G,{disabled:!W,label:"تا تاریخ",id:"date",renderInput:q=>u.jsx(N,{size:"small",style:{width:"160px"},...q}),value:$,onChange:q=>{g(H(q).format("YYYY-MM-DD"))}})})]}),u.jsx(f,{container:!0,alignItems:"center",gap:_u.SMALL,children:u.jsxs("form",{onSubmit:Ku,children:[u.jsx(N,{id:"outlined-basic",size:"small",autoComplete:"off",label:"جستجو",variant:"outlined",style:{width:250},onChange:w}),u.jsx(X,{type:"submit",onClick:Ku,endIcon:u.jsx(L6,{}),children:"جستجو"})]})})]}),u.jsx(y6,{data:Y,columns:["ردیف","تاریخ پرداخت","نوع پرداخت","نام پرداخت کننده","شماره درخواست","شماره پیگیری","کدسفارش","شماره کارت","مبلغ تراکنش (ریال)","توضیحات","عملیات"],handlePageChange:S,totalRows:b,page:I,perPage:_,handlePerRowsChange:n,title:`
|
||
تعرفه های پرداخت شده
|
||
${(_6=(k6=k[0])==null?void 0:k6.provinceRequest)!=null&&_6.killHouseUserFullName?`${(D6=(M6=k[0])==null?void 0:M6.provinceRequest)!=null&&D6.killer?"کشتارکن":"کشتارگاه"} ${(Y6=(R6=k[0])==null?void 0:R6.provinceRequest)==null?void 0:Y6.killHouseUserFullName}`:""}
|
||
`})]})},ba=()=>{var s,r,A,h,L,v,J,Mu,yu,Du,Ru,Yu,Ku,Hu,qu,vu,I6,k6,_6,M6,D6,R6,Y6,q,y,Pu,w6,Wu,Nu,P6,V6,W6,b6,m6,u0,e0,a0,l0,t0,o0,n0,s0,r0,c0,C0,d0,g0,A0,i0,f0,h0,x0,p0,j0,S0,F0,y0,E0,w0,L0,b0,$0,T0,I0,k0,_0,M0,D0,R0,Y0,P0,W0,z0,K0,H0,q0,v0,N0;const t=B6(),[E,x]=c.useState(),[p,$]=c.useState([]),[g,D]=c.useState(),{provincePaymentKillersOfKillhouses:w}=ku(R=>R.provinceSlice),k=ku(R=>R.userSlice.userPath),[l]=c.useContext(Fu),b=ku(R=>R.userSlice.userProfile.key),j=ku(R=>R.userSlice.selectedSubUser),[_,U]=c.useState(!1),z=X6(),[,,M,I,T,Y]=c.useContext(Fu);c.useEffect(()=>{const R=H(new Date).format("YYYY-MM-DD");I(R),Y(R)},[]),c.useEffect(()=>{d()==="KillHouse"&&t(na({role_key:ie("province")&&(j==null?void 0:j.key)||""}))},[j==null?void 0:j.key]);const{provincePaymentByWeightOverview:e}=ku(R=>R.provinceSlice);c.useEffect(()=>{var i,ju;const R=(ju=(i=e==null?void 0:e.wageInfo)==null?void 0:i.shares)==null?void 0:ju.map((o,lu)=>{var tu,ou,nu,su,ru,cu,Cu,du;return[lu+1,o==null?void 0:o.name,(tu=o==null?void 0:o.outProvincePoultryRequestWage)==null?void 0:tu.toLocaleString(),(ou=o==null?void 0:o.provinceKillRequestWage)==null?void 0:ou.toLocaleString(),(nu=o==null?void 0:o.freeSellCarcassesWage)==null?void 0:nu.toLocaleString(),(su=o==null?void 0:o.freeBuyingCarcassesWage)==null?void 0:su.toLocaleString(),(ru=o==null?void 0:o.freeBuyingLiveWage)==null?void 0:ru.toLocaleString(),(cu=parseInt(Math.floor((o==null?void 0:o.totalWage)/1e3)*1e3))==null?void 0:cu.toLocaleString(),(Cu=parseInt(Math.floor((o==null?void 0:o.totalPaidWage)/1e3)*1e3))==null?void 0:Cu.toLocaleString(),(du=parseInt(Math.floor((o==null?void 0:o.totalUnpaidWage)/1e3)*1e3))==null?void 0:du.toLocaleString()]});$(R)},[e]),c.useEffect(()=>{t(sa({date1:_?M:null,date2:_?T:null,role:d(),role_key:ie("province")&&(j==null?void 0:j.key)||""}))},[t,M,T,_,j==null?void 0:j.key]),c.useEffect(()=>{if(e){const R=w==null?void 0:w.map((i,ju)=>{var o,lu,tu,ou,nu,su,ru,cu,Cu,du,Uu,Vu,Qu,Xu,Gu,Ju,Zu,Ou,Bu,mu,u6,e6,a6,l6,t6,o6,n6,s6,r6,c6,C6,Q,Eu,d6,g6,A6,i6,f6,h6,x6,p6,a,Su,Z,O,B,m,uu,eu,au,gu,Au,iu,fu,hu,xu,pu;return((o=e==null?void 0:e.wageInfo)==null?void 0:o.wageCountingType)==="live"?[i==null?void 0:i.name,(tu=Math.ceil((lu=i==null?void 0:i.wageInfo)==null?void 0:lu.totalWage))==null?void 0:tu.toLocaleString(),(nu=Math.ceil((ou=i==null?void 0:i.wageInfo)==null?void 0:ou.totalPaidWage))==null?void 0:nu.toLocaleString(),(ru=Math.ceil((su=i==null?void 0:i.wageInfo)==null?void 0:su.off))==null?void 0:ru.toLocaleString(),(Cu=Math.ceil((cu=i==null?void 0:i.wageInfo)==null?void 0:cu.totalUnpaidWage))==null?void 0:Cu.toLocaleString(),u.jsx("a",{href:`${window.location.origin}/pay/${Ae(k)}/${(du=i==null?void 0:i.wageInfo)==null?void 0:du.userToken}`,style:{color:"blue"},target:"_blank",rel:"noreferrer",children:`${window.location.origin}/pay/${Ae(k)}/${(Uu=i==null?void 0:i.wageInfo)==null?void 0:Uu.userToken}`},ju),(Qu=Math.ceil((Vu=i==null?void 0:i.wageInfo)==null?void 0:Vu.totalProvinceLiveWeight))==null?void 0:Qu.toLocaleString(),(Gu=Math.ceil((Xu=i==null?void 0:i.wageInfo)==null?void 0:Xu.provinceKillRequestsTotalWage))==null?void 0:Gu.toLocaleString(),(Zu=Math.ceil((Ju=i==null?void 0:i.wageInfo)==null?void 0:Ju.freeBarsOutProvinceCarcasesTotalWeight))==null?void 0:Zu.toLocaleString(),(Bu=Math.ceil((Ou=i==null?void 0:i.wageInfo)==null?void 0:Ou.freeBarsOutProvinceCarcasesTotalWage))==null?void 0:Bu.toLocaleString(),(u6=Math.ceil((mu=i==null?void 0:i.wageInfo)==null?void 0:mu.freeBarsCarcasesTotalWeight))==null?void 0:u6.toLocaleString(),(a6=Math.ceil((e6=i==null?void 0:i.wageInfo)==null?void 0:e6.freeBarsCarcasesTotalWage))==null?void 0:a6.toLocaleString(),(t6=Math.ceil((l6=i==null?void 0:i.wageInfo)==null?void 0:l6.freeBarsLiveTotalWeight))==null?void 0:t6.toLocaleString(),(n6=Math.ceil((o6=i==null?void 0:i.wageInfo)==null?void 0:o6.freeBarsLiveTotalWage))==null?void 0:n6.toLocaleString()]:[i==null?void 0:i.name,(r6=Math.ceil((s6=i==null?void 0:i.wageInfo)==null?void 0:s6.totalWage))==null?void 0:r6.toLocaleString(),(C6=Math.ceil((c6=i==null?void 0:i.wageInfo)==null?void 0:c6.totalPaidWage))==null?void 0:C6.toLocaleString(),(Eu=Math.ceil((Q=i==null?void 0:i.wageInfo)==null?void 0:Q.off))==null?void 0:Eu.toLocaleString(),(g6=Math.ceil((d6=i==null?void 0:i.wageInfo)==null?void 0:d6.totalUnpaidWage))==null?void 0:g6.toLocaleString(),u.jsx("a",{href:`${window.location.origin}/pay/${Ae(k)}/${(A6=i==null?void 0:i.wageInfo)==null?void 0:A6.userToken}`,style:{color:"blue"},target:"_blank",rel:"noreferrer",children:`${window.location.origin}/pay/${Ae(k)}/${(i6=i==null?void 0:i.wageInfo)==null?void 0:i6.userToken}`},ju),(h6=Math.ceil((f6=i==null?void 0:i.wageInfo)==null?void 0:f6.totalProvinceLiveWeight))==null?void 0:h6.toLocaleString(),(p6=Math.ceil((x6=i==null?void 0:i.wageInfo)==null?void 0:x6.totalProvinceCarcassesWeight))==null?void 0:p6.toLocaleString(),(Su=Math.ceil((a=i==null?void 0:i.wageInfo)==null?void 0:a.provinceKillRequestsTotalWeight))==null?void 0:Su.toLocaleString(),(O=Math.ceil((Z=i==null?void 0:i.wageInfo)==null?void 0:Z.provinceKillRequestsTotalWage))==null?void 0:O.toLocaleString(),(m=Math.ceil((B=i==null?void 0:i.wageInfo)==null?void 0:B.freeBarsOutProvinceCarcasesTotalWeight))==null?void 0:m.toLocaleString(),(eu=Math.ceil((uu=i==null?void 0:i.wageInfo)==null?void 0:uu.freeBarsOutProvinceCarcasesTotalWage))==null?void 0:eu.toLocaleString(),(gu=Math.ceil((au=i==null?void 0:i.wageInfo)==null?void 0:au.freeBarsCarcasesTotalWeight))==null?void 0:gu.toLocaleString(),(iu=Math.ceil((Au=i==null?void 0:i.wageInfo)==null?void 0:Au.freeBarsCarcasesTotalWage))==null?void 0:iu.toLocaleString(),(hu=Math.ceil((fu=i==null?void 0:i.wageInfo)==null?void 0:fu.freeBarsLiveTotalWeight))==null?void 0:hu.toLocaleString(),(pu=Math.ceil((xu=i==null?void 0:i.wageInfo)==null?void 0:xu.freeBarsLiveTotalWage))==null?void 0:pu.toLocaleString()]});x(R)}},[w,e]);const W=(R,i)=>{const ju=R==null?void 0:R.map((o,lu)=>{var tu,ou,nu,su,ru,cu,Cu,du;return[lu+1,o==null?void 0:o.name,(tu=o==null?void 0:o.provinceKillRequestWage)==null?void 0:tu.toLocaleString(),(ou=o==null?void 0:o.returnProvinceKillRequestWage)==null?void 0:ou.toLocaleString(),(nu=o==null?void 0:o.freeSellCarcassesWage)==null?void 0:nu.toLocaleString(),(su=o==null?void 0:o.freeBuyingCarcassesWage)==null?void 0:su.toLocaleString(),(ru=o==null?void 0:o.freeBuyingLiveWage)==null?void 0:ru.toLocaleString(),(cu=parseInt(Math.floor((o==null?void 0:o.totalWage)/1e3)*1e3))==null?void 0:cu.toLocaleString(),(Cu=parseInt(Math.floor((o==null?void 0:o.totalPaidWage)/1e3)*1e3))==null?void 0:Cu.toLocaleString(),(du=parseInt(Math.floor((o==null?void 0:o.totalUnpaidWage)/1e3)*1e3))==null?void 0:du.toLocaleString()]});return u.jsx($6,{size:"small",color:"success",onClick:()=>{var o;t(fe({title:"سهم بندی تعرفه کشتارگاه "+i,size:1e3,content:u.jsx(f,{container:!0,xs:12,justifyContent:"center",children:u.jsx(Ve,{data:ju,columns:["ردیف","سهم",`${((o=e==null?void 0:e.wageInfo)==null?void 0:o.wageCountingType)==="live"?"تعرفه کشتار داخل استان (ریال)":" تعرفه توزیع لاشه داخل استان (ریال)"}`,"تعرفه خریدهای بازگشتی (ریال)","تعرفه توزیع لاشه خارج استان (ریال)","تعرفه لاشه ورودی به استان (ریال)","تعرفه مرغ زنده ورودی به استان (ریال)","تعرفه کل (ریال)","تعرفه پرداخت شده (ریال)","تعرفه پرداخت نشده (ریال)"]})})}))},children:u.jsx(Ce,{fontSize:"small"})})};c.useEffect(()=>{d()!=="KillHouse"&&e&&t(ia({date1:_?M:null,date2:_?T:null,role_key:ie("province")&&(j==null?void 0:j.key)||""})).then(R=>{var ju;const i=(ju=R.payload.data)==null?void 0:ju.map((o,lu)=>{var tu,ou,nu,su,ru,cu,Cu,du,Uu,Vu,Qu,Xu,Gu,Ju,Zu,Ou,Bu,mu,u6,e6,a6,l6,t6,o6,n6,s6,r6,c6,C6,Q,Eu,d6,g6,A6,i6,f6,h6,x6,p6,a,Su,Z,O,B,m,uu,eu,au,gu,Au,iu,fu,hu,xu,pu,wu,Lu,bu,$u,Tu,Iu;return((tu=e==null?void 0:e.wageInfo)==null?void 0:tu.wageCountingType)==="live"?[lu+1,o==null?void 0:o.name,(nu=Math.ceil((ou=o==null?void 0:o.wageInfo)==null?void 0:ou.totalWage))==null?void 0:nu.toLocaleString(),W(o==null?void 0:o.shares,o==null?void 0:o.name),(ru=Math.ceil((su=o==null?void 0:o.wageInfo)==null?void 0:su.totalPaidWage))==null?void 0:ru.toLocaleString(),(Cu=Math.ceil((cu=o==null?void 0:o.wageInfo)==null?void 0:cu.off))==null?void 0:Cu.toLocaleString(),(Uu=Math.ceil((du=o==null?void 0:o.wageInfo)==null?void 0:du.totalUnpaidWage))==null?void 0:Uu.toLocaleString(),(Qu=Math.ceil((Vu=o==null?void 0:o.wageInfo)==null?void 0:Vu.totalProvinceLiveWeight))==null?void 0:Qu.toLocaleString(),(Gu=Math.ceil((Xu=o==null?void 0:o.wageInfo)==null?void 0:Xu.provinceKillRequestsTotalWage))==null?void 0:Gu.toLocaleString(),(Zu=Math.ceil((Ju=o==null?void 0:o.wageInfo)==null?void 0:Ju.freeBarsOutProvinceCarcasesTotalWeight))==null?void 0:Zu.toLocaleString(),(Bu=Math.ceil((Ou=o==null?void 0:o.wageInfo)==null?void 0:Ou.freeBarsOutProvinceCarcasesTotalWage))==null?void 0:Bu.toLocaleString(),(u6=Math.ceil((mu=o==null?void 0:o.wageInfo)==null?void 0:mu.freeBarsCarcasesTotalWeight))==null?void 0:u6.toLocaleString(),(a6=Math.ceil((e6=o==null?void 0:o.wageInfo)==null?void 0:e6.freeBarsCarcasesTotalWage))==null?void 0:a6.toLocaleString(),(t6=Math.ceil((l6=o==null?void 0:o.wageInfo)==null?void 0:l6.freeBarsLiveTotalWeight))==null?void 0:t6.toLocaleString(),(n6=Math.ceil((o6=o==null?void 0:o.wageInfo)==null?void 0:o6.freeBarsLiveTotalWage))==null?void 0:n6.toLocaleString(),(r6=Math.ceil((s6=o==null?void 0:o.wageInfo)==null?void 0:s6.returnTotalProvinceLiveWeight))==null?void 0:r6.toLocaleString(),(C6=Math.ceil((c6=o==null?void 0:o.wageInfo)==null?void 0:c6.totalReturnPureProvinceCarcassesPrice))==null?void 0:C6.toLocaleString(),u.jsx($6,{size:"small",color:"success",onClick:()=>{z(d()==="ProvinceOperator"?Ke+"/"+(o==null?void 0:o.key):d()==="SuperAdmin"?He+"/"+(o==null?void 0:o.key):qe+"/"+(o==null?void 0:o.key))},children:u.jsx(Ce,{fontSize:"small"})},lu)]:[lu+1,o==null?void 0:o.name,(Eu=Math.ceil((Q=o==null?void 0:o.wageInfo)==null?void 0:Q.totalWage))==null?void 0:Eu.toLocaleString(),W(o==null?void 0:o.shares,o==null?void 0:o.name),(g6=Math.ceil((d6=o==null?void 0:o.wageInfo)==null?void 0:d6.totalPaidWage))==null?void 0:g6.toLocaleString(),(i6=Math.ceil((A6=o==null?void 0:o.wageInfo)==null?void 0:A6.off))==null?void 0:i6.toLocaleString(),(h6=Math.ceil((f6=o==null?void 0:o.wageInfo)==null?void 0:f6.totalUnpaidWage))==null?void 0:h6.toLocaleString(),(p6=Math.ceil((x6=o==null?void 0:o.wageInfo)==null?void 0:x6.totalProvinceLiveWeight))==null?void 0:p6.toLocaleString(),(Su=Math.ceil((a=o==null?void 0:o.wageInfo)==null?void 0:a.totalProvinceCarcassesWeight))==null?void 0:Su.toLocaleString(),(O=Math.ceil((Z=o==null?void 0:o.wageInfo)==null?void 0:Z.provinceKillRequestsTotalWeight))==null?void 0:O.toLocaleString(),(m=Math.ceil((B=o==null?void 0:o.wageInfo)==null?void 0:B.provinceKillRequestsTotalWage))==null?void 0:m.toLocaleString(),(eu=Math.ceil((uu=o==null?void 0:o.wageInfo)==null?void 0:uu.freeBarsOutProvinceCarcasesTotalWeight))==null?void 0:eu.toLocaleString(),(gu=Math.ceil((au=o==null?void 0:o.wageInfo)==null?void 0:au.freeBarsOutProvinceCarcasesTotalWage))==null?void 0:gu.toLocaleString(),(iu=Math.ceil((Au=o==null?void 0:o.wageInfo)==null?void 0:Au.freeBarsCarcasesTotalWeight))==null?void 0:iu.toLocaleString(),(hu=Math.ceil((fu=o==null?void 0:o.wageInfo)==null?void 0:fu.freeBarsCarcasesTotalWage))==null?void 0:hu.toLocaleString(),(pu=Math.ceil((xu=o==null?void 0:o.wageInfo)==null?void 0:xu.freeBarsLiveTotalWeight))==null?void 0:pu.toLocaleString(),(Lu=Math.ceil((wu=o==null?void 0:o.wageInfo)==null?void 0:wu.freeBarsLiveTotalWage))==null?void 0:Lu.toLocaleString(),($u=Math.ceil((bu=o==null?void 0:o.wageInfo)==null?void 0:bu.returnTotalProvinceLiveWeight))==null?void 0:$u.toLocaleString(),(Iu=Math.ceil((Tu=o==null?void 0:o.wageInfo)==null?void 0:Tu.totalReturnPureProvinceCarcassesPrice))==null?void 0:Iu.toLocaleString(),u.jsx($6,{size:"small",color:"success",onClick:()=>{z(d()==="ProvinceOperator"?Ke+"/"+(o==null?void 0:o.key):d()==="SuperAdmin"?He+"/"+(o==null?void 0:o.key):qe+"/"+(o==null?void 0:o.key))},children:u.jsx(Ce,{fontSize:"small"})},lu)]});D(i)})},[t,e,M,T,_]);const V=()=>{var R;return((R=e==null?void 0:e.wageInfo)==null?void 0:R.wageCountingType)==="live"?["وزن کل فروش زنده به خارج استان","تعرفه کل فروش به خارج استان (ریال)","کل وزن زنده کشتار داخل استان (کیلوگرم)","تعرفه کشتار داخل استان (ریال)","وزن توزیع لاشه به خارج استان (کیلوگرم)","تعرفه توزیع لاشه خارج استان (ریال)","وزن لاشه ورودی به استان (کیلوگرم)","تعرفه لاشه ورودی به استان (ریال)","وزن مرغ زنده ورودی به استان (کیلوگرم)","تعرفه مرغ زنده ورودی به استان (ریال)","وزن خریدهای بازگشتی (کیلوگرم)","تعرفه خریدهای بازگشتی (ریال)"]:["وزن کل فروش زنده به خارج استان","تعرفه کل فروش به خارج استان (ریال)","کل وزن زنده کشتار داخل استان (کیلوگرم)","وزن لاشه کشتار داخل استان (کیلوگرم)","وزن توزیع لاشه داخل استان (کیلوگرم)","تعرفه توزیع لاشه داخل استان (ریال)","وزن توزیع لاشه به خارج استان (کیلوگرم)","تعرفه توزیع لاشه خارج استان (ریال)","وزن لاشه ورودی به استان (کیلوگرم)","تعرفه لاشه ورودی به استان (ریال)","وزن مرغ زنده ورودی به استان (کیلوگرم)","تعرفه مرغ زنده ورودی به استان (ریال)","وزن خریدهای بازگشتی (کیلوگرم)","تعرفه خریدهای بازگشتی (ریال)"]},C=()=>{var R;return((R=e==null?void 0:e.wageInfo)==null?void 0:R.wageCountingType)==="live"?["کل تعرفه (ریال)","کل تعرفه پرداخت شده (ریال)","تخفیف (ریال)","کل تعرفه پرداخت نشده (ریال)","کل وزن زنده کشتار داخل استان (کیلوگرم)","تعرفه کشتار داخل استان (ریال)","وزن توزیع لاشه به خارج استان (کیلوگرم)","تعرفه توزیع لاشه خارج استان (ریال)","وزن لاشه ورودی به استان (کیلوگرم)","تعرفه لاشه ورودی به استان (ریال)","وزن مرغ زنده ورودی به استان (کیلوگرم)","تعرفه مرغ زنده ورودی به استان (ریال)"]:["کل تعرفه (ریال)","کل تعرفه پرداخت شده (ریال)","تخفیف (ریال)","کل تعرفه پرداخت نشده (ریال)","کل وزن زنده کشتار داخل استان (کیلوگرم)","وزن لاشه کشتار داخل استان (کیلوگرم)","وزن توزیع لاشه داخل استان (کیلوگرم)","تعرفه توزیع لاشه داخل استان (ریال)","وزن توزیع لاشه به خارج استان (کیلوگرم)","تعرفه توزیع لاشه خارج استان (ریال)","وزن لاشه ورودی به استان (کیلوگرم)","تعرفه لاشه ورودی به استان (ریال)","وزن مرغ زنده ورودی به استان (کیلوگرم)","تعرفه مرغ زنده ورودی به استان (ریال)"]},S=()=>{var R;return((R=e==null?void 0:e.wageInfo)==null?void 0:R.wageCountingType)==="live"?["ردیف","کشتارگاه","کل تعرفه (ریال)","سهم بندی","کل تعرفه پرداخت شده (ریال)","تخفیف (ریال)","کل تعرفه پرداخت نشده (ریال)","کل وزن زنده کشتار داخل استان (کیلوگرم)","تعرفه کشتار داخل استان (ریال)","وزن توزیع لاشه به خارج استان (کیلوگرم)","تعرفه توزیع لاشه خارج استان (ریال)","وزن لاشه ورودی به استان (کیلوگرم)","تعرفه لاشه ورودی به استان (ریال)","وزن مرغ زنده ورودی به استان (کیلوگرم)","تعرفه مرغ زنده ورودی به استان (ریال)","وزن خریدهای بازگشتی (کیلوگرم)","تعرفه خریدهای بازگشتی (ریال)","کشتارکن"]:["ردیف","کشتارگاه","کل تعرفه (ریال)","سهم بندی","کل تعرفه پرداخت شده (ریال)","تخفیف (ریال)","کل تعرفه پرداخت نشده (ریال)","کل وزن زنده کشتار داخل استان (کیلوگرم)","وزن لاشه کشتار داخل استان (کیلوگرم)","وزن توزیع لاشه داخل استان (کیلوگرم)","تعرفه توزیع لاشه داخل استان (ریال)","وزن توزیع لاشه به خارج استان (کیلوگرم)","تعرفه توزیع لاشه خارج استان (ریال)","وزن لاشه ورودی به استان (کیلوگرم)","تعرفه لاشه ورودی به استان (ریال)","وزن مرغ زنده ورودی به استان (کیلوگرم)","تعرفه مرغ زنده ورودی به استان (ریال)","وزن خریدهای بازگشتی (کیلوگرم)","تعرفه خریدهای بازگشتی (ریال)","کشتارکن"]},n=()=>{var R,i,ju,o,lu,tu,ou,nu,su,ru,cu,Cu,du,Uu,Vu,Qu,Xu,Gu,Ju,Zu,Ou,Bu,mu,u6,e6,a6,l6,t6,o6,n6,s6,r6,c6,C6,Q,Eu,d6,g6,A6,i6,f6,h6,x6,p6,a,Su,Z,O,B,m,uu,eu,au;return((R=e==null?void 0:e.wageInfo)==null?void 0:R.wageCountingType)==="live"?[[(ju=Math.ceil((i=e==null?void 0:e.wageInfo)==null?void 0:i.totalWage))==null?void 0:ju.toLocaleString(),(lu=Math.ceil((o=e==null?void 0:e.wageInfo)==null?void 0:o.totalPaidWage))==null?void 0:lu.toLocaleString(),(ou=Math.ceil((tu=e==null?void 0:e.wageInfo)==null?void 0:tu.off))==null?void 0:ou.toLocaleString(),(su=Math.ceil((nu=e==null?void 0:e.wageInfo)==null?void 0:nu.totalUnpaidWage))==null?void 0:su.toLocaleString(),(cu=Math.ceil((ru=e==null?void 0:e.wageInfo)==null?void 0:ru.totalProvinceLiveWeight))==null?void 0:cu.toLocaleString(),(du=Math.ceil((Cu=e==null?void 0:e.wageInfo)==null?void 0:Cu.provinceKillRequestsTotalWage))==null?void 0:du.toLocaleString(),(Vu=Math.ceil((Uu=e==null?void 0:e.wageInfo)==null?void 0:Uu.freeBarsOutProvinceCarcasesTotalWeight))==null?void 0:Vu.toLocaleString(),(Xu=Math.ceil((Qu=e==null?void 0:e.wageInfo)==null?void 0:Qu.freeBarsOutProvinceCarcasesTotalWage))==null?void 0:Xu.toLocaleString(),(Ju=Math.ceil((Gu=e==null?void 0:e.wageInfo)==null?void 0:Gu.freeBarsCarcasesTotalWeight))==null?void 0:Ju.toLocaleString(),(Ou=Math.ceil((Zu=e==null?void 0:e.wageInfo)==null?void 0:Zu.freeBarsCarcasesTotalWage))==null?void 0:Ou.toLocaleString(),(mu=Math.ceil((Bu=e==null?void 0:e.wageInfo)==null?void 0:Bu.freeBarsLiveTotalWeight))==null?void 0:mu.toLocaleString(),(e6=Math.ceil((u6=e==null?void 0:e.wageInfo)==null?void 0:u6.freeBarsLiveTotalWage))==null?void 0:e6.toLocaleString()]]:[[(l6=Math.ceil((a6=e==null?void 0:e.wageInfo)==null?void 0:a6.totalWage))==null?void 0:l6.toLocaleString(),(o6=Math.ceil((t6=e==null?void 0:e.wageInfo)==null?void 0:t6.totalPaidWage))==null?void 0:o6.toLocaleString(),(s6=Math.ceil((n6=e==null?void 0:e.wageInfo)==null?void 0:n6.off))==null?void 0:s6.toLocaleString(),(c6=Math.ceil((r6=e==null?void 0:e.wageInfo)==null?void 0:r6.totalUnpaidWage))==null?void 0:c6.toLocaleString(),(Q=Math.ceil((C6=e==null?void 0:e.wageInfo)==null?void 0:C6.totalProvinceLiveWeight))==null?void 0:Q.toLocaleString(),(d6=Math.ceil((Eu=e==null?void 0:e.wageInfo)==null?void 0:Eu.totalProvinceCarcassesWeight))==null?void 0:d6.toLocaleString(),(A6=Math.ceil((g6=e==null?void 0:e.wageInfo)==null?void 0:g6.provinceKillRequestsTotalWeight))==null?void 0:A6.toLocaleString(),(f6=Math.ceil((i6=e==null?void 0:e.wageInfo)==null?void 0:i6.provinceKillRequestsTotalWage))==null?void 0:f6.toLocaleString(),(x6=Math.ceil((h6=e==null?void 0:e.wageInfo)==null?void 0:h6.freeBarsOutProvinceCarcasesTotalWeight))==null?void 0:x6.toLocaleString(),(a=Math.ceil((p6=e==null?void 0:e.wageInfo)==null?void 0:p6.freeBarsOutProvinceCarcasesTotalWage))==null?void 0:a.toLocaleString(),(Z=Math.ceil((Su=e==null?void 0:e.wageInfo)==null?void 0:Su.freeBarsCarcasesTotalWeight))==null?void 0:Z.toLocaleString(),(B=Math.ceil((O=e==null?void 0:e.wageInfo)==null?void 0:O.freeBarsCarcasesTotalWage))==null?void 0:B.toLocaleString(),(uu=Math.ceil((m=e==null?void 0:e.wageInfo)==null?void 0:m.freeBarsLiveTotalWeight))==null?void 0:uu.toLocaleString(),(au=Math.ceil((eu=e==null?void 0:e.wageInfo)==null?void 0:eu.freeBarsLiveTotalWage))==null?void 0:au.toLocaleString()]]};return u.jsxs(f,{container:!0,justifyContent:"center",xs:12,mt:1,children:[u.jsxs(f,{container:!0,gap:1,mb:1,style:{borderStyle:"solid",borderWidth:"1px",padding:"5px",borderRadius:"15px",borderColor:"gray"},justifyContent:{xs:"space-between",sm:"left"},alignItems:"center",children:[u.jsx(E6,{icon:u.jsx(Ee,{}),checkedIcon:u.jsx(we,{}),checked:_,onChange:()=>U(!_),color:"primary",size:"large"}),u.jsx(f,{sx:{width:{xs:"39%",sm:"auto"}},children:u.jsx(G,{disabled:!_,label:"از تاریخ",id:"date",renderInput:R=>u.jsx(N,{size:"small",sx:{width:{xs:"100%",md:"160px"}},...R}),value:M,onChange:R=>{I(H(R).format("YYYY-MM-DD"))}})}),u.jsx(f,{sx:{width:{xs:"39%",sm:"auto"}},children:u.jsx(G,{disabled:!_,label:"تا تاریخ",id:"date",renderInput:R=>u.jsx(N,{size:"small",sx:{width:{xs:"100%",md:"160px"}},...R}),value:T,onChange:R=>{Y(H(R).format("YYYY-MM-DD"))}})})]}),u.jsxs(f,{isDashboard:!0,container:!0,justifyContent:"center",xs:12,p:2,children:[u.jsx(f,{container:!0,xs:12,justifyContent:"space-between",mb:2,children:(d()==="KillHouse"||d()==="ChainCompany")&&u.jsx(f,{children:u.jsx(X,{variant:"contained",onClick:()=>{t(fe({title:"پرداخت تعرفه",content:u.jsx(fa,{})}))},children:"پرداخت تعرفه"})})}),u.jsx(y6,{operation:u.jsx(f,{children:(d()==="AdminX"||d()==="ProvinceOperator"||d()==="SuperAdmin")&&u.jsx(T6,{title:"خروجی اکسل",placement:"top",children:u.jsx($6,{color:"primary",onClick:()=>{l({vertical:"top",horizontal:"center",msg:"فایل اکسل در حال دانلود می باشد، این علمیات ممکن است زمان بر باشد لطفا صبر کنید.",severity:"success"});const R=`${K.defaults.baseURL}kill_house_total_transactions_wage_payid_admin_x_excel/?date1=${M}&date2=${T}&key=${b}&role=${d()}${ie("province")?`&role_key=${j==null?void 0:j.key}`:""}`;window.location.href=R},children:u.jsx(Fa,{})})})}),isDashboard:!0,noPagination:!0,title:"اطلاعات کلی تعرفه",columns:["کل تعرفه (ریال)","کل تعرفه پرداخت شده (ریال)","تخفیف (ریال)","کل تعرفه پرداخت نشده (ریال)"],data:[[(r=Math.ceil((s=e==null?void 0:e.wageInfo)==null?void 0:s.totalWage))==null?void 0:r.toLocaleString(),(h=Math.ceil((A=e==null?void 0:e.wageInfo)==null?void 0:A.totalPaidWage))==null?void 0:h.toLocaleString(),(v=Math.ceil((L=e==null?void 0:e.wageInfo)==null?void 0:L.off))==null?void 0:v.toLocaleString(),(Mu=Math.ceil((J=e==null?void 0:e.wageInfo)==null?void 0:J.totalUnpaidWage))==null?void 0:Mu.toLocaleString()]]}),d()!=="KillHouse"&&u.jsx(y6,{noPagination:!0,title:"جزئیات کلی تعرفه",columns:V(),data:((yu=e==null?void 0:e.wageInfo)==null?void 0:yu.wageCountingType)==="live"?[[(Ru=Math.ceil((Du=e==null?void 0:e.wageInfo)==null?void 0:Du.outProvincePoultryRequestWeight))==null?void 0:Ru.toLocaleString(),(Ku=Math.ceil((Yu=e==null?void 0:e.wageInfo)==null?void 0:Yu.outProvincePoultryRequestWage))==null?void 0:Ku.toLocaleString(),(qu=Math.ceil((Hu=e==null?void 0:e.wageInfo)==null?void 0:Hu.totalProvinceLiveWeight))==null?void 0:qu.toLocaleString(),(I6=Math.ceil((vu=e==null?void 0:e.wageInfo)==null?void 0:vu.provinceKillRequestsTotalWage))==null?void 0:I6.toLocaleString(),(_6=Math.ceil((k6=e==null?void 0:e.wageInfo)==null?void 0:k6.freeBarsOutProvinceCarcasesTotalWeight))==null?void 0:_6.toLocaleString(),(D6=Math.ceil((M6=e==null?void 0:e.wageInfo)==null?void 0:M6.freeBarsOutProvinceCarcasesTotalWage))==null?void 0:D6.toLocaleString(),(Y6=Math.ceil((R6=e==null?void 0:e.wageInfo)==null?void 0:R6.freeBarsCarcasesTotalWeight))==null?void 0:Y6.toLocaleString(),(y=Math.ceil((q=e==null?void 0:e.wageInfo)==null?void 0:q.freeBarsCarcasesTotalWage))==null?void 0:y.toLocaleString(),(w6=Math.ceil((Pu=e==null?void 0:e.wageInfo)==null?void 0:Pu.freeBarsLiveTotalWeight))==null?void 0:w6.toLocaleString(),(Nu=Math.ceil((Wu=e==null?void 0:e.wageInfo)==null?void 0:Wu.freeBarsLiveTotalWage))==null?void 0:Nu.toLocaleString(),(V6=Math.ceil((P6=e==null?void 0:e.wageInfo)==null?void 0:P6.returnTotalProvinceLiveWeight))==null?void 0:V6.toLocaleString(),(b6=Math.ceil((W6=e==null?void 0:e.wageInfo)==null?void 0:W6.totalReturnPureProvinceCarcassesPrice))==null?void 0:b6.toLocaleString()]]:[[(u0=Math.ceil((m6=e==null?void 0:e.wageInfo)==null?void 0:m6.outProvincePoultryRequestWeight))==null?void 0:u0.toLocaleString(),(a0=Math.ceil((e0=e==null?void 0:e.wageInfo)==null?void 0:e0.outProvincePoultryRequestWage))==null?void 0:a0.toLocaleString(),(t0=Math.ceil((l0=e==null?void 0:e.wageInfo)==null?void 0:l0.totalProvinceLiveWeight))==null?void 0:t0.toLocaleString(),(n0=Math.ceil((o0=e==null?void 0:e.wageInfo)==null?void 0:o0.totalProvinceCarcassesWeight))==null?void 0:n0.toLocaleString(),(r0=Math.ceil((s0=e==null?void 0:e.wageInfo)==null?void 0:s0.provinceKillRequestsTotalWeight))==null?void 0:r0.toLocaleString(),(C0=Math.ceil((c0=e==null?void 0:e.wageInfo)==null?void 0:c0.provinceKillRequestsTotalWage))==null?void 0:C0.toLocaleString(),(g0=Math.ceil((d0=e==null?void 0:e.wageInfo)==null?void 0:d0.freeBarsOutProvinceCarcasesTotalWeight))==null?void 0:g0.toLocaleString(),(i0=Math.ceil((A0=e==null?void 0:e.wageInfo)==null?void 0:A0.freeBarsOutProvinceCarcasesTotalWage))==null?void 0:i0.toLocaleString(),(h0=Math.ceil((f0=e==null?void 0:e.wageInfo)==null?void 0:f0.freeBarsCarcasesTotalWeight))==null?void 0:h0.toLocaleString(),(p0=Math.ceil((x0=e==null?void 0:e.wageInfo)==null?void 0:x0.freeBarsCarcasesTotalWage))==null?void 0:p0.toLocaleString(),(S0=Math.ceil((j0=e==null?void 0:e.wageInfo)==null?void 0:j0.freeBarsLiveTotalWeight))==null?void 0:S0.toLocaleString(),(y0=Math.ceil((F0=e==null?void 0:e.wageInfo)==null?void 0:F0.freeBarsLiveTotalWage))==null?void 0:y0.toLocaleString(),(w0=Math.ceil((E0=e==null?void 0:e.wageInfo)==null?void 0:E0.returnTotalProvinceLiveWeight))==null?void 0:w0.toLocaleString(),(b0=Math.ceil((L0=e==null?void 0:e.wageInfo)==null?void 0:L0.totalReturnPureProvinceCarcassesPrice))==null?void 0:b0.toLocaleString()]]}),d()!=="KillHouse"&&u.jsx(y6,{noPagination:!0,title:"سهم بندی",columns:["ردیف","سهم","تعرفه فروش مرغ زنده به خارج استان (ریال)",`${(($0=e==null?void 0:e.wageInfo)==null?void 0:$0.wageCountingType)==="live"?"تعرفه کشتار داخل استان (ریال)":" تعرفه توزیع لاشه داخل استان (ریال)"}`,"تعرفه توزیع لاشه خارج استان (ریال)","تعرفه لاشه ورودی به استان (ریال)","تعرفه مرغ زنده ورودی به استان (ریال)","تعرفه کل (ریال)","تعرفه پرداخت شده (ریال)","تعرفه پرداخت نشده (ریال)"],data:p})]}),u.jsx(f,{container:!0,justifyContent:"center",xs:12,mt:2,mb:2,children:u.jsx(y6,{noPagination:!0,title:"مبنای تعرفه به ازای هر کیلوگرم (ریال)",columns:["تعرفه پایه فروش مرغ زنده به خارج استان",`${((T0=e==null?void 0:e.wageInfo)==null?void 0:T0.wageCountingType)==="live"?"تعرفه کشتار داخل استان (ریال)":"تعرفه پایه توزیع لاشه درون استان (ریال)"}`,"تعرفه پایه توزیع لاشه خارج استان (ریال)","تعرفه پایه خرید مرغ زنده از خارج از استان (ریال)","تعرفه پایه خرید لاشه خارج از استان (ریال)","وزن خریدهای بازگشتی (کیلوگرم)","تعرفه خریدهای بازگشتی (ریال)"],data:[[(k0=(I0=e==null?void 0:e.wageInfo)==null?void 0:I0.outProvincePoultryRequestWageAmount)==null?void 0:k0.toLocaleString(),(M0=(_0=e==null?void 0:e.wageInfo)==null?void 0:_0.provinceLiveWageAmount)==null?void 0:M0.toLocaleString(),(R0=(D0=e==null?void 0:e.wageInfo)==null?void 0:D0.freeSellCarcessesWeightAmount)==null?void 0:R0.toLocaleString(),(P0=(Y0=e==null?void 0:e.wageInfo)==null?void 0:Y0.freeBuyingLiveWeightAmount)==null?void 0:P0.toLocaleString(),(z0=(W0=e==null?void 0:e.wageInfo)==null?void 0:W0.freeBuyingCarcessesWeightAmount)==null?void 0:z0.toLocaleString(),(H0=(K0=e==null?void 0:e.wageInfo)==null?void 0:K0.returnTotalProvinceLiveWeight)==null?void 0:H0.toLocaleString(),(v0=(q0=e==null?void 0:e.wageInfo)==null?void 0:q0.totalReturnPureProvinceCarcassesPrice)==null?void 0:v0.toLocaleString()]]})}),u.jsx(f,{container:!0,justifyContent:"center",xs:12,mt:1,children:u.jsx(y6,{noPagination:d()==="KillHouse",paginated:d()!=="KillHouse",title:"جزئیات",columns:d()==="KillHouse"?C():S(),data:d()==="KillHouse"?n():g})}),d()==="KillHouse"&&u.jsxs(Be,{style:{width:"100%",marginTop:"20px"},children:[u.jsx(me,{expandIcon:u.jsx(Sa,{}),"aria-controls":"panel1-content",id:"panel1-header",children:u.jsx(zu,{variant:"body1",style:{color:"gray"},children:"کشتارکن ها"})}),u.jsx(ua,{children:u.jsx(f,{container:!0,justifyContent:"center",xs:12,mt:1,children:u.jsx(y6,{paginated:!0,columns:((N0=e==null?void 0:e.wageInfo)==null?void 0:N0.wageCountingType)==="live"?["نام کشتارکن","کل تعرفه (ریال)","کل تعرفه پرداخت شده (ریال)","تخفیف (ریال)","کل تعرفه پرداخت نشده (ریال)","لینک پرداخت","کل وزن زنده کشتار داخل استان (کیلوگرم)","تعرفه کشتار داخل استان (ریال)","وزن توزیع لاشه به خارج استان (کیلوگرم)","تعرفه توزیع لاشه خارج استان (ریال)","وزن لاشه ورودی به استان (کیلوگرم)","تعرفه لاشه ورودی به استان (ریال)","وزن مرغ زنده ورودی به استان (کیلوگرم)","تعرفه مرغ زنده ورودی به استان (ریال)"]:["نام کشتارکن","کل تعرفه (ریال)","کل تعرفه پرداخت شده (ریال)","تخفیف (ریال)","کل تعرفه پرداخت نشده (ریال)","لینک پرداخت","کل وزن زنده کشتار داخل استان (کیلوگرم)","وزن لاشه کشتار داخل استان (کیلوگرم)","وزن توزیع لاشه داخل استان (کیلوگرم)","تعرفه توزیع لاشه داخل استان (ریال)","وزن توزیع لاشه به خارج استان (کیلوگرم)","تعرفه توزیع لاشه خارج استان (ریال)","وزن لاشه ورودی به استان (کیلوگرم)","تعرفه لاشه ورودی به استان (ریال)","وزن مرغ زنده ورودی به استان (کیلوگرم)","تعرفه مرغ زنده ورودی به استان (ریال)"],data:E})})})]})]})},$a=()=>{const t=X6(),[E,x]=c.useState([]),[p,$]=c.useState(0),[g,D]=c.useState(10),[w,k]=c.useState(!1),l=ku(r=>r.userSlice.userProfile.key),[b,j]=c.useState(""),[_,U]=c.useState([]),[z,M]=c.useState(1),I=B6(),T=r=>{j(r.target.value)},[,,Y,e,W,V]=c.useContext(Fu);c.useEffect(()=>{const r=H(new Date).format("YYYY-MM-DD");e(r),V(r)},[]);const C=async r=>{let A;I(q6()),A=await K.get(`kill_house_total_transactions_wage/?search=filter&value=${b}&type=paid&page=${r}&role=${d()}&page_size=${g}${w?`&date1=${Y}&date2=${W}`:""}`),I(v6()),x(A.data.results),$(A.data.count)},S=r=>{C(r),M(r)},n=r=>{D(r),M(1)};c.useEffect(()=>{C(1)},[]);const s=async r=>{r.preventDefault(),I(q6());try{const A=await K.get(`kill_house_total_transactions_wage/?search=filter&value=${b}&role=${d()}&type=paid${w?`&date1=${Y}&date2=${W}`:""}`);x(A.data.results),$(A.data.count),I(v6())}catch(A){console.error("Error fetching data:",A)}};return c.useEffect(()=>{C(1)},[Y,W,w]),c.useEffect(()=>{const r=E==null?void 0:E.map((A,h)=>{var L,v,J,Mu,yu,Du,Ru,Yu;return[z===1?h+1:h+g*(z-1)+1,`${(L=A==null?void 0:A.info)!=null&&L.killer?"کشتارکن":"کشتارگاه"} ${(v=A==null?void 0:A.info)==null?void 0:v.killHouseName} - ${(J=A==null?void 0:A.info)==null?void 0:J.killHouseFullname} (${(Mu=A==null?void 0:A.info)==null?void 0:Mu.killHouseMobile})`,`${(yu=A==null?void 0:A.info)==null?void 0:yu.killHouseCity}`,(Du=A==null?void 0:A.info)==null?void 0:Du.totalPaidCount,(Yu=(Ru=A==null?void 0:A.info)==null?void 0:Ru.totalPaidWage)==null?void 0:Yu.toLocaleString(),u.jsx($6,{size:"small",color:"success",onClick:()=>{t(d()==="ProvinceOperator"?`${J6}/kill_house_key/${A.key}`:d()==="SuperAdmin"?`${Z6}/kill_house_key/${A.key}`:d()==="AdminX"?`${O6}/kill_house_key/${A.key}`:d()==="Commerce"?`${ra}/kill_house_key/${A.key}`:"-")},children:u.jsx(Ce,{fontSize:"small"})},h)]});U(r)},[E]),u.jsxs(f,{container:!0,justifyContent:"end",children:[u.jsx(f,{container:!0,alignItems:"center",justifyContent:"space-between",gap:2,paddingTop:2,mb:1,width:"100%",children:u.jsxs(f,{container:!0,alignItems:"center",gap:_u.SMALL,children:[u.jsxs(f,{container:!0,style:{borderStyle:"solid",borderWidth:"1px",padding:"10px",borderRadius:"15px",borderColor:"gray",justifyContent:"left"},children:[u.jsx(f,{children:u.jsx(N6,{control:u.jsx(E6,{checked:w,onChange:()=>k(!w),color:"primary"})})}),u.jsx(f,{children:u.jsx(G,{disabled:!w,label:"از تاریخ",id:"date",renderInput:r=>u.jsx(N,{size:"small",style:{width:"160px"},...r}),value:Y,onChange:r=>{e(H(r).format("YYYY-MM-DD"))}})}),u.jsx(f,{children:u.jsx(G,{disabled:!w,label:"تا تاریخ",id:"date",renderInput:r=>u.jsx(N,{size:"small",style:{width:"160px"},...r}),value:W,onChange:r=>{V(H(r).format("YYYY-MM-DD"))}})})]}),u.jsxs("form",{onSubmit:s,children:[u.jsx(N,{id:"outlined-basic",size:"small",autoComplete:"off",label:"جستجو",variant:"outlined",style:{width:250},onChange:T}),u.jsx(X,{type:"submit",onClick:s,endIcon:u.jsx(L6,{}),children:"جستجو"})]}),u.jsx(T6,{title:"خروجی اکسل",children:u.jsx("a",{href:`${K.defaults.baseURL}kill_house_total_transactions_wage_payid_excel/?key=${l}&search=filter&value=${b}${w?`&date1=${Y}&date2=${W}`:""}&role=${d()}`,rel:"noreferrer",children:u.jsx(X,{color:"success",children:u.jsx(U6,{size:32})})})})]})}),u.jsx(y6,{data:_,columns:["ردیف","خریدار","شهر","تعداد تراکنش","مبلغ (﷼)","جزییات سفارش"],handlePageChange:S,totalRows:p,page:z,perPage:g,handlePerRowsChange:n,title:"پرداختی های کشتارگاه ها"})]})},Ta=()=>{const t=ku(n=>n.userSlice.authToken),E=X6(),[x,p]=c.useState([]),[$,g]=c.useState(!1),[D,w]=c.useState(0),[k,l]=c.useState(10),[b,j]=c.useState(!1),[_,U]=c.useState(""),z=n=>{U(n.target.value)},[,,M,I,T,Y]=c.useContext(Fu);c.useEffect(()=>{const n=H(new Date).format("YYYY-MM-DD");I(n),Y(n)},[]);const e=async(n,s)=>{g(!0);const r=await K.get(`chain-company-total-transactions/?search=filter&value=${s}&type=paid&page=${n}&role=${d()}&page_size=${k}${b?`&date1=${M}&date2=${T}`:""}`);p(r.data.results),w(r.data.count),g(!1)},W=n=>{e(n,_)},V=async(n,s)=>{g(!0);const r=await K.get(`chain-company-total-transactions/?search=filter&value=${_}&type=paid&page=${s}&role=${d()}&page_size=${n}${b?`&date1=${M}&date2=${T}`:""}`);p(r.data.results),w(r.data.count),l(n),g(!1)};c.useEffect(()=>{e(1)},[]);const C=async n=>{n.preventDefault(),g(!0);try{const s=await K.get(`chain-company-total-transactions/?search=filter&value=${_}&role=${d()}&type=paid${b?`&date1=${M}&date2=${T}`:""}`);p(s.data.results),w(s.data.count)}catch(s){console.error("Error fetching data:",s)}finally{g(!1)}};c.useEffect(()=>{e(1)},[M,T,b]);const S=[{name:"خریدار",selector:n=>{var s,r,A;return`${(s=n==null?void 0:n.info)==null?void 0:s.company} - ${(r=n==null?void 0:n.info)==null?void 0:r.companyUserFullname} (${(A=n==null?void 0:n.info)==null?void 0:A.companyUserMobile})`},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"شهر",selector:n=>{var s;return`${(s=n==null?void 0:n.info)==null?void 0:s.companyUserCity}`},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"تعداد تراکنش",selector:n=>{var s;return(s=n==null?void 0:n.info)==null?void 0:s.totalPaidCount},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"سهم شما از واریزی (﷼)",selector:n=>{var s,r;return(r=(s=n==null?void 0:n.info)==null?void 0:s.totalPaidWage)==null?void 0:r.toLocaleString()},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"جزییات سفارش",selector:n=>u.jsx(X,{onClick:()=>{E(d()==="ProvinceOperator"?`${J6}/chain_company_key/${n.key}`:d()==="SuperAdmin"?`${Z6}/chain_company_key/${n.key}`:d()==="AdminX"?`${O6}/chain_company_key/${n.key}`:"-")},children:"مشاهده"}),sortable:!0,wrap:!0,allowOverflow:!0,center:!0}];return u.jsx(f,{container:!0,justifyContent:"end",children:u.jsx(G6,{title:u.jsx(f,{container:!0,alignItems:"center",justifyContent:"space-between",gap:2,paddingTop:2,mb:1,width:"100%",children:u.jsxs(f,{container:!0,alignItems:"center",gap:_u.SMALL,children:[u.jsx(zu,{children:"پرداختی های شرکت های زنجیره"}),u.jsxs(f,{container:!0,style:{borderStyle:"solid",borderWidth:"1px",padding:"10px",borderRadius:"15px",borderColor:"gray",justifyContent:"left"},children:[u.jsx(f,{children:u.jsx(N6,{control:u.jsx(E6,{checked:b,onChange:()=>j(!b),color:"primary"})})}),u.jsx(f,{children:u.jsx(G,{disabled:!b,label:"از تاریخ",id:"date",renderInput:n=>u.jsx(N,{size:"small",style:{width:"160px"},...n}),value:M,onChange:n=>{I(H(n).format("YYYY-MM-DD"))}})}),u.jsx(f,{children:u.jsx(G,{disabled:!b,label:"تا تاریخ",id:"date",renderInput:n=>u.jsx(N,{size:"small",style:{width:"160px"},...n}),value:T,onChange:n=>{Y(H(n).format("YYYY-MM-DD"))}})})]}),u.jsxs("form",{onSubmit:C,children:[u.jsx(N,{id:"outlined-basic",size:"small",autoComplete:"off",label:"جستجو",variant:"outlined",style:{width:250},onChange:z}),u.jsx(X,{type:"submit",onClick:C,endIcon:u.jsx(L6,{}),children:"جستجو"})]}),u.jsx(T6,{title:"خروجی اکسل",children:u.jsx("a",{href:`${K.defaults.baseURL}chain-company-total-transactions_not_payid_excel/?token=${t}${_}${b?`&date1=${M}&date2=${T}`:""}`,rel:"noreferrer",children:u.jsx(X,{color:"success",children:u.jsx(U6,{size:32})})})})]})}),columns:S,data:x,progressPending:$,pagination:!0,paginationServer:!0,paginationTotalRows:D,onChangeRowsPerPage:V,onChangePage:W})})},Ia=()=>{const t=ku(n=>n.userSlice.authToken),E=X6(),[x,p]=c.useState([]),[$,g]=c.useState(!1),[D,w]=c.useState(0),[k,l]=c.useState(10),[b,j]=c.useState(!1),[_,U]=c.useState(""),z=n=>{U(n.target.value)},[,,M,I,T,Y]=c.useContext(Fu);c.useEffect(()=>{const n=H(new Date).format("YYYY-MM-DD");I(n),Y(n)},[]);const e=async(n,s)=>{g(!0);const r=await K.get(`kill_house_total_wage/?search=filter&value=${s}&type=unpaid&page=${n}&role=${d()}&page_size=${k}${b?`&date1=${M}&date2=${T}`:""}`);p(r.data.results),w(r.data.count),g(!1)},W=n=>{e(n,_)},V=async(n,s)=>{g(!0);const r=await K.get(`kill_house_total_wage/?search=filter&value=${_}&type=unpaid&page=${s}&role=${d()}&page_size=${n}${b?`&date1=${M}&date2=${T}`:""}`);p(r.data.results),w(r.data.count),l(n),g(!1)};c.useEffect(()=>{e(1)},[]);const C=async n=>{n.preventDefault(),g(!0);try{const s=await K.get(`kill_house_total_wage/?search=filter&value=${_}&type=unpaid${b?`&date1=${M}&date2=${T}`:""}`);p(s.data.results),w(s.data.count)}catch(s){console.error("Error fetching data:",s)}finally{g(!1)}};c.useEffect(()=>{e(1)},[M,T,b]);const S=[{name:"خریدار",selector:n=>{var r,A,h,L;return`${(r=n==null?void 0:n.info)!=null&&r.killer?"کشتارکن":"کشتارگاه"} ${(A=n==null?void 0:n.info)==null?void 0:A.killHouseName} - ${(h=n==null?void 0:n.info)==null?void 0:h.killHouseFullname} (${(L=n==null?void 0:n.info)==null?void 0:L.killHouseMobile})`},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"شهر",selector:n=>{var s;return`${(s=n==null?void 0:n.info)==null?void 0:s.killHouseCity}`},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"تعداد پرونده",selector:n=>{var s,r;return(r=(s=n==null?void 0:n.info)==null?void 0:s.totalCount)==null?void 0:r.toLocaleString()},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"حجم",selector:n=>{var s,r;return(r=(s=n.info)==null?void 0:s.totalQuantity)==null?void 0:r.toLocaleString()},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"وزن سفارشات (کیلوگرم)",selector:n=>{var s,r;return(r=(s=n.info)==null?void 0:s.totalWeight)==null?void 0:r.toLocaleString()},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"مبلغ تعرفه (﷼)",selector:n=>{var s,r;return(r=(s=n==null?void 0:n.info)==null?void 0:s.totalWage)==null?void 0:r.toLocaleString()},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"جزییات سفارش",selector:n=>u.jsx(X,{onClick:()=>{E(`${d()==="SuperAdmin"?Z6:d()==="AdminX"?O6:J6}/unpaid/${n.key}`)},children:"مشاهده"}),sortable:!0,wrap:!0,allowOverflow:!0,center:!0}];return u.jsx(f,{container:!0,justifyContent:"end",children:u.jsx(G6,{title:u.jsx(f,{container:!0,alignItems:"center",justifyContent:"space-between",gap:2,paddingTop:2,mb:1,width:"100%",children:u.jsxs(f,{container:!0,alignItems:"center",gap:_u.SMALL,children:[u.jsx(zu,{children:"تعرفه های پرداخت نشده"}),u.jsxs(f,{container:!0,style:{borderStyle:"solid",borderWidth:"1px",padding:"10px",borderRadius:"15px",borderColor:"gray",justifyContent:"left"},children:[u.jsx(f,{children:u.jsx(N6,{control:u.jsx(E6,{checked:b,onChange:()=>j(!b),color:"primary"})})}),u.jsx(f,{children:u.jsx(G,{disabled:!b,label:"از تاریخ",id:"date",renderInput:n=>u.jsx(N,{size:"small",style:{width:"160px"},...n}),value:M,onChange:n=>{I(H(n).format("YYYY-MM-DD"))}})}),u.jsx(f,{children:u.jsx(G,{disabled:!b,label:"تا تاریخ",id:"date",renderInput:n=>u.jsx(N,{size:"small",style:{width:"160px"},...n}),value:T,onChange:n=>{Y(H(n).format("YYYY-MM-DD"))}})})]}),u.jsxs("form",{onSubmit:C,children:[u.jsx(N,{id:"outlined-basic",size:"small",autoComplete:"off",label:"جستجو",variant:"outlined",style:{width:250},onChange:z}),u.jsx(X,{type:"submit",onClick:C,endIcon:u.jsx(L6,{}),children:"جستجو"})]}),u.jsx(T6,{title:"خروجی اکسل",children:u.jsx("a",{href:`${K.defaults.baseURL}kill_house_total_wage_excel/?token=${t}${_}${b?`&date1=${M}&date2=${T}`:""}`,rel:"noreferrer",children:u.jsx(X,{color:"success",children:u.jsx(U6,{size:32})})})})]})}),columns:S,data:x,progressPending:$,pagination:!0,paginationServer:!0,paginationTotalRows:D,onChangeRowsPerPage:V,onChangePage:W})})},ka=()=>{const t=ku(r=>r.userSlice.authToken),[,,E,x,p,$]=c.useContext(Fu),g=B6();c.useEffect(()=>{const r=H(new Date).format("YYYY-MM-DD");x(r),$(r)},[]);const D=X6(),w=r=>{T(r.target.value)},[k,l]=c.useState(!1),[b,j]=c.useState([]),[_,U]=c.useState(0),[z,M]=c.useState(10),[I,T]=c.useState(""),[Y,e]=c.useState(1),[W,V]=c.useState([]),C=async r=>{let A;g(q6()),A=await K.get(`kill-house-request-total-wage/?search=filter&value=${I}&page=${r}&role=${d()}&page_size=${z}${k?`&date1=${E}&date2=${p}`:""}`),g(v6()),j(A.data.results),U(A.data.count)},S=r=>{C(r),e(r)},n=r=>{M(r),e(1)};c.useEffect(()=>{const r=b==null?void 0:b.map((A,h)=>{var v,J,Mu,yu,Du,Ru,Yu,Ku,Hu,qu,vu;const L=(v=A==null?void 0:A.info)!=null&&v.killer?"کشتارکن":"کشتارگاه";return[Y===1?h+1:h+z*(Y-1)+1,`${L} ${(J=A==null?void 0:A.info)==null?void 0:J.killHouseName} - ${(Mu=A==null?void 0:A.info)==null?void 0:Mu.killHouseFullname} (${(yu=A==null?void 0:A.info)==null?void 0:yu.killHouseMobile})`,(Du=A==null?void 0:A.info)==null?void 0:Du.killHouseCity,(Yu=(Ru=A==null?void 0:A.info)==null?void 0:Ru.totalCount)==null?void 0:Yu.toLocaleString(),(Hu=(Ku=A.info)==null?void 0:Ku.totalQuantity)==null?void 0:Hu.toLocaleString(),(vu=(qu=A.info)==null?void 0:qu.totalWeight)==null?void 0:vu.toLocaleString(),u.jsx($6,{size:"small",color:"success",onClick:()=>{D(`${d()==="SuperAdmin"?Z6:d()==="AdminX"?O6:J6}/daily_bar/${A.key}`)},children:u.jsx(Ce,{fontSize:"small"})},h)]});V(r)},[b]),c.useEffect(()=>{C(1)},[g,E,p,z]);const s=async r=>{r.preventDefault(),g(q6());try{const A=await K.get(`kill-house-request-total-wage/?search=filter&value=${I}${k?`&date1=${E}&date2=${p}`:""}`);j(A.data.results),U(A.data.count),g(v6())}catch(A){console.error("Error fetching data:",A)}};return u.jsxs(f,{container:!0,xs:12,justifyContent:"center",alignItems:"center",gap:2,children:[u.jsxs(f,{container:!0,xs:12,justifyContent:"start",alignItems:"center",gap:2,children:[u.jsxs(f,{container:!0,style:{borderStyle:"solid",borderWidth:"1px",padding:"10px",borderRadius:"15px",borderColor:"gray",justifyContent:"left"},children:[u.jsx(f,{children:u.jsx(N6,{control:u.jsx(E6,{checked:k,onChange:()=>l(!k),color:"primary"})})}),u.jsx(f,{children:u.jsx(G,{disabled:!k,label:"از تاریخ",id:"date",renderInput:r=>u.jsx(N,{size:"small",style:{width:"160px"},...r}),value:E,onChange:r=>{x(H(r).format("YYYY-MM-DD"))}})}),u.jsx(f,{children:u.jsx(G,{disabled:!k,label:"تا تاریخ",id:"date",renderInput:r=>u.jsx(N,{size:"small",style:{width:"160px"},...r}),value:p,onChange:r=>{$(H(r).format("YYYY-MM-DD"))}})})]}),u.jsx(f,{children:u.jsxs("form",{onSubmit:s,children:[u.jsx(N,{id:"outlined-basic",size:"small",label:"جستجو",variant:"outlined",style:{width:250},onChange:w}),u.jsx(X,{type:"submit",onClick:s,endIcon:u.jsx(L6,{}),children:"جستجو"})]})}),u.jsx(T6,{title:"خروجی اکسل",children:u.jsx("a",{href:`${K.defaults.baseURL}kill_house_total_wage_excel/?token=${t}${I}${k?`&date1=${E}&date2=${p}`:""}`,rel:"noreferrer",children:u.jsx(X,{color:"success",children:u.jsx(U6,{size:32})})})})]}),u.jsx(y6,{data:W,columns:["ردیف","خریدار","شهر","تعداد پرونده","حجم","وزن سفارشات (کیلوگرم)","جزییات سفارش"],handlePageChange:S,totalRows:_,page:Y,perPage:z,handlePerRowsChange:n,title:"بارهای روزانه"})]})},ve=({type:t})=>{const E=ku(s=>s.userSlice.authToken),x=X6(),[p,$]=c.useState([]),[g,D]=c.useState(!1),[w,k]=c.useState(0),[l,b]=c.useState(10),[j,_]=c.useState(!1),[U,z]=c.useState(""),M=s=>{z(s.target.value)},[,,I,T,Y,e]=c.useContext(Fu);c.useEffect(()=>{const s=H(new Date).format("YYYY-MM-DD");T(s),e(s)},[]);const W=async(s,r)=>{D(!0);const A=await K.get(`kill_house_free_bar_total_wage/?search=filter&value=${r}&type=${t==="live_chicken"?"live":"carcass"}&page=${s}&role=${d()}&page_size=${l}${j?`&date1=${I}&date2=${Y}`:""}`);$(A.data.results),k(A.data.count),D(!1)},V=s=>{W(s,U)},C=async(s,r)=>{D(!0);const A=await K.get(`kill_house_free_bar_total_wage/?search=filter&value=${U}&type=${t==="live_chicken"?"live":"carcass"}&page=${r}&role=${d()}&page_size=${s}${j?`&date1=${I}&date2=${Y}`:""}`);$(A.data.results),k(A.data.count),b(s),D(!1)};c.useEffect(()=>{W(1)},[]);const S=async s=>{s.preventDefault(),D(!0);try{const r=await K.get(`kill_house_free_bar_total_wage/?search=filter&value=${U}&type=${t==="live_chicken"?"live":"carcass"}${j?`&date1=${I}&date2=${Y}`:""}`);$(r.data.results),k(r.data.count)}catch(r){console.error("Error fetching data:",r)}finally{D(!1)}};c.useEffect(()=>{W(1)},[I,Y,j]);const n=[{name:"خریدار",selector:s=>{var A,h,L,v;return`${(A=s==null?void 0:s.info)!=null&&A.killer?"کشتارکن":"کشتارگاه"} ${(h=s==null?void 0:s.info)==null?void 0:h.killHouseName} - ${(L=s==null?void 0:s.info)==null?void 0:L.killHouseFullname} (${(v=s==null?void 0:s.info)==null?void 0:v.killHouseMobile})`},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"شهر",selector:s=>{var r;return`${(r=s==null?void 0:s.info)==null?void 0:r.killHouseCity}`},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"تعداد پرونده",selector:s=>{var r,A;return(A=(r=s==null?void 0:s.info)==null?void 0:r.totalCount)==null?void 0:A.toLocaleString()},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"حجم",selector:s=>{var r,A;return(A=(r=s.info)==null?void 0:r.totalQuantity)==null?void 0:A.toLocaleString()},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"وزن سفارشات (کیلوگرم)",selector:s=>{var r,A;return(A=(r=s.info)==null?void 0:r.totalWeight)==null?void 0:A.toLocaleString()},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"مبلغ کل",selector:s=>{var r,A;return`${(A=(r=s.info)==null?void 0:r.totalWage)==null?void 0:A.toLocaleString()} ریال`},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"جزییات سفارش",selector:s=>u.jsx(X,{onClick:()=>{x(`${d()==="SuperAdmin"?Z6:d()==="AdminX"?O6:J6}/${t}/${s.key}`)},children:"مشاهده"}),sortable:!0,wrap:!0,allowOverflow:!0,center:!0}];return u.jsx(f,{container:!0,justifyContent:"end",children:u.jsx(G6,{title:u.jsx(f,{container:!0,alignItems:"center",justifyContent:"space-between",gap:2,paddingTop:2,mb:1,width:"100%",children:u.jsxs(f,{container:!0,alignItems:"center",gap:_u.SMALL,children:[u.jsxs(zu,{children:["خرید ",t==="live_chicken"?"مرغ زنده":"لاشه"," آزاد"]}),u.jsxs(f,{container:!0,style:{borderStyle:"solid",borderWidth:"1px",padding:"10px",borderRadius:"15px",borderColor:"gray",justifyContent:"left"},children:[u.jsx(f,{children:u.jsx(N6,{control:u.jsx(E6,{checked:j,onChange:()=>_(!j),color:"primary"})})}),u.jsx(f,{children:u.jsx(G,{disabled:!j,label:"از تاریخ",id:"date",renderInput:s=>u.jsx(N,{size:"small",style:{width:"160px"},...s}),value:I,onChange:s=>{T(H(s).format("YYYY-MM-DD"))}})}),u.jsx(f,{children:u.jsx(G,{disabled:!j,label:"تا تاریخ",id:"date",renderInput:s=>u.jsx(N,{size:"small",style:{width:"160px"},...s}),value:Y,onChange:s=>{e(H(s).format("YYYY-MM-DD"))}})})]}),u.jsxs("form",{onSubmit:S,children:[u.jsx(N,{id:"outlined-basic",size:"small",autoComplete:"off",label:"جستجو",variant:"outlined",style:{width:250},onChange:M}),u.jsx(X,{type:"submit",onClick:S,endIcon:u.jsx(L6,{}),children:"جستجو"})]}),u.jsx(T6,{title:"خروجی اکسل",children:u.jsx("a",{href:`${K.defaults.baseURL}kill_house_total_wage_excel/?token=${E}${U}${j?`&date1=${I}&date2=${Y}`:""}`,rel:"noreferrer",children:u.jsx(X,{color:"success",children:u.jsx(U6,{size:32})})})})]})}),columns:n,data:p,progressPending:g,pagination:!0,paginationServer:!0,paginationTotalRows:w,onChangeRowsPerPage:C,onChangePage:V})})},_a=()=>{const t=ku(n=>n.userSlice.authToken),E=X6(),[x,p]=c.useState([]),[$,g]=c.useState(!1),[D,w]=c.useState(0),[k,l]=c.useState(10),[b,j]=c.useState(!1),[_,U]=c.useState(""),z=n=>{U(n.target.value)},[,,M,I,T,Y]=c.useContext(Fu);c.useEffect(()=>{const n=H(new Date).format("YYYY-MM-DD");I(n),Y(n)},[]);const e=async(n,s)=>{g(!0);const r=await K.get(`chain-company-total-allocations/?search=filter&value=${s}&type=live&page=${n}&role=${d()}&page_size=${k}${b?`&date1=${M}&date2=${T}`:""}`);p(r.data.results),w(r.data.count),g(!1)},W=n=>{e(n,_)},V=async(n,s)=>{g(!0);const r=await K.get(`chain-company-total-allocations/?search=filter&value=${_}&type=live&page=${s}&role=${d()}&page_size=${n}${b?`&date1=${M}&date2=${T}`:""}`);p(r.data.results),w(r.data.count),l(n),g(!1)};c.useEffect(()=>{e(1)},[]);const C=async n=>{n.preventDefault(),g(!0);try{const s=await K.get(`chain-company-total-allocations/?search=filter&value=${_}&type=live${b?`&date1=${M}&date2=${T}`:""}`);p(s.data.results),w(s.data.count)}catch(s){console.error("Error fetching data:",s)}finally{g(!1)}};c.useEffect(()=>{e(1)},[M,T,b]);const S=[{name:"شرکت زنجیره",selector:n=>{var s;return`${(s=n==null?void 0:n.info)==null?void 0:s.company}`},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"تعداد پرونده",selector:n=>{var s,r;return(r=(s=n==null?void 0:n.info)==null?void 0:s.totalCount)==null?void 0:r.toLocaleString()},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"حجم",selector:n=>{var s,r;return(r=(s=n.info)==null?void 0:s.totalQuantity)==null?void 0:r.toLocaleString()},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"وزن سفارشات (کیلوگرم)",selector:n=>{var s,r;return(r=(s=n.info)==null?void 0:s.totalWeight)==null?void 0:r.toLocaleString()},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"مبلغ کل",selector:n=>{var s,r;return`${(r=(s=n.info)==null?void 0:s.totalWage)==null?void 0:r.toLocaleString()} ریال`},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"جزییات سفارش",selector:n=>u.jsx(X,{onClick:()=>{E(`${d()==="SuperAdmin"?Z6:d()==="AdminX"?O6:J6}/chain/${n.key}`)},children:"مشاهده"}),sortable:!0,wrap:!0,allowOverflow:!0,center:!0}];return u.jsx(f,{container:!0,justifyContent:"end",children:u.jsx(G6,{title:u.jsx(f,{container:!0,alignItems:"center",justifyContent:"space-between",gap:2,paddingTop:2,mb:1,width:"100%",children:u.jsxs(f,{container:!0,alignItems:"center",gap:_u.SMALL,children:[u.jsx(zu,{children:"زنجیره ها"}),u.jsxs(f,{container:!0,style:{borderStyle:"solid",borderWidth:"1px",padding:"10px",borderRadius:"15px",borderColor:"gray",justifyContent:"left"},children:[u.jsx(f,{children:u.jsx(N6,{control:u.jsx(E6,{checked:b,onChange:()=>j(!b),color:"primary"})})}),u.jsx(f,{children:u.jsx(G,{disabled:!b,label:"از تاریخ",id:"date",renderInput:n=>u.jsx(N,{size:"small",style:{width:"160px"},...n}),value:M,onChange:n=>{I(H(n).format("YYYY-MM-DD"))}})}),u.jsx(f,{children:u.jsx(G,{disabled:!b,label:"تا تاریخ",id:"date",renderInput:n=>u.jsx(N,{size:"small",style:{width:"160px"},...n}),value:T,onChange:n=>{Y(H(n).format("YYYY-MM-DD"))}})})]}),u.jsxs("form",{onSubmit:C,children:[u.jsx(N,{id:"outlined-basic",size:"small",autoComplete:"off",label:"جستجو",variant:"outlined",style:{width:250},onChange:z}),u.jsx(X,{type:"submit",onClick:C,endIcon:u.jsx(L6,{}),children:"جستجو"})]}),u.jsx(T6,{title:"خروجی اکسل",children:u.jsx("a",{href:`${K.defaults.baseURL}kill_house_total_wage_excel/?token=${t}${_}${b?`&date1=${M}&date2=${T}`:""}`,rel:"noreferrer",children:u.jsx(X,{color:"success",children:u.jsx(U6,{size:32})})})})]})}),columns:S,data:x,progressPending:$,pagination:!0,paginationServer:!0,paginationTotalRows:D,onChangeRowsPerPage:V,onChangePage:W})})},Ma=({item:t})=>{const[E,x]=c.useState([]);return c.useEffect(()=>{var $;const p=($=t==null?void 0:t.killHouseRequests)==null?void 0:$.map(g=>{var k,l,b,j,_,U,z,M,I,T,Y,e,W,V,C,S,n,s,r,A,h,L;const D=(b=(l=(k=g==null?void 0:g.vetFarm)==null?void 0:k.vet)==null?void 0:l.user)!=null&&b.fullname?((U=(_=(j=g==null?void 0:g.vetFarm)==null?void 0:j.vet)==null?void 0:_.user)==null?void 0:U.fullname)+`(${(I=(M=(z=g==null?void 0:g.vetFarm)==null?void 0:z.vet)==null?void 0:M.user)==null?void 0:I.mobile})`:"فاقد دامپزشک";let w="";return g.vetState==="accepted"?w="تایید تخلیه":g.vetState==="pending"&&(w="در انتظار تخلیه"),[g.barCode,`${(T=g.killhouseUser)==null?void 0:T.name} (${(W=(e=(Y=g.killhouseUser)==null?void 0:Y.killHouseOperator)==null?void 0:e.user)==null?void 0:W.mobile})`,`${g.addCar.driver.typeCar} ${g.addCar.driver.pelak}`,`${g.addCar.driver.driverName} (${g.addCar.driver.driverMobile})`,g==null?void 0:g.trafficCode,g.poultryRequest.chickenBreed,(V=g.quantity)==null?void 0:V.toLocaleString(),(S=(C=g==null?void 0:g.weightInfo)==null?void 0:C.weight)==null?void 0:S.toLocaleString(),(s=(n=g==null?void 0:g.weightInfo)==null?void 0:n.indexWeight)==null?void 0:s.toLocaleString(),`${(A=(r=g.poultryRequest)==null?void 0:r.poultry)==null?void 0:A.unitName} (${(L=(h=g.poultryRequest.poultry)==null?void 0:h.user)==null?void 0:L.mobile})`,D,g!=null&&g.clearanceCode?g==null?void 0:g.clearanceCode:"-",g.killPlace,g.poultryRequest.poultry.address.city.name,g!=null&&g.poultryRequest.sendDate?ca(new Date(g==null?void 0:g.poultryRequest.sendDate),"yyyy/MM/dd"):"-",g==null?void 0:g.poultryRequest.orderCode,w]});x(p)},[t]),u.jsx(Ve,{columns:["کدبار","خریدار","ماشین","راننده","کدبهداشتی حمل و نقل","نژاد","تعداد","وزن بار","میانگین وزن","مرغدار","دامپزشک فارم","کدرهگیری سامانه قرنطینه","محل کشتار","شهر","تاریخ کشتار","کدسفارش کشتار","وضعیت"],data:E})},Xe=({killhouseKey:t})=>{var n,s,r,A;const[,,E,x,p,$]=c.useContext(Fu),[g,D]=c.useState(!1);c.useEffect(()=>{const h=H(new Date).format("YYYY-MM-DD");x(h),$(h)},[]);const w=B6(),[k,l]=c.useState([]),[b,j]=c.useState(!1),[_,U]=c.useState(0),[z,M]=c.useState(10),[I,T]=c.useState(""),Y=h=>{T(h.target.value)},e=async(h,L)=>{j(!0);const v=await K.get(`province_wage/?search=filter&value=${L}&page=${h}&page_size=${z}&type=unpaid&kill_house_key=${t}&role=${d()}${g?`&date1=${E}&date2=${p}`:""}`);l(v.data.results),U(v.data.count),j(!1)},W=h=>{e(h,I)},V=async(h,L)=>{j(!0);const v=await K.get(`province_wage/?search=filter&value=${I}&page=${L}&page_size=${h}&type=unpaid&kill_house_key=${t}&role=${d()}${g?`&date1=${E}&date2=${p}`:""}`);l(v.data.results),U(v.data.count),M(h),j(!1)};c.useEffect(()=>{e(1)},[]),c.useEffect(()=>{e(1)},[E,p,g]);const C=async h=>{h.preventDefault(),j(!0);try{const L=await K.get(`province_wage/?search=filter&value=${I}&type=unpaid&kill_house_key=${t}&role=${d()}&date1=${E}&date2=${p}`);l(L.data.results),U(L.data.count)}catch(L){console.error("Error fetching data:",L)}finally{j(!1)}},S=[{name:"کدسفارش",selector:h=>{var L;return(L=h==null?void 0:h.provinceRequest)==null?void 0:L.orderCode},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"مرغدار (تلفن)",selector:h=>{var L,v;return`${(L=h==null?void 0:h.provinceRequest)==null?void 0:L.poultryFullname} (${(v=h==null?void 0:h.provinceRequest)==null?void 0:v.poultryMobile})`},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"شهر",selector:h=>{var L;return`${(L=h==null?void 0:h.provinceRequest)==null?void 0:L.poultryCity}`},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"تاریخ کشتار",selector:h=>{var L;return ge((L=h==null?void 0:h.provinceRequest)==null?void 0:L.sendDate)},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"محل کشتار",selector:h=>{var L;return(L=h==null?void 0:h.provinceRequest)==null?void 0:L.killPlace},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"نژاد",selector:h=>{var L;return(L=h==null?void 0:h.provinceRequest)==null?void 0:L.breed},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"تعداد (قطعه)",selector:h=>{var L,v;return(v=(L=h==null?void 0:h.provinceRequest)==null?void 0:L.provinceKillRequestQuantity)==null?void 0:v.toLocaleString()},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"وزن (کیلوگرم)",selector:h=>{var L,v;return(v=(L=h==null?void 0:h.provinceRequest)==null?void 0:L.provinceKillRequestTotalWeight)==null?void 0:v.toLocaleString()},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"میانگین وزنی (کیلوگرم)",selector:h=>{var L;return(L=h==null?void 0:h.provinceRequest)==null?void 0:L.indexWeight},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"تعرفه اتحادیه (ریال)",selector:h=>{var L,v;return(v=(L=h==null?void 0:h.provinceRequest)==null?void 0:L.wage)==null?void 0:v.toLocaleString()},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"مبلغ تعرفه (ریال)",selector:h=>{var L,v;return(v=(L=h==null?void 0:h.provinceRequest)==null?void 0:L.totalAmount)==null?void 0:v.toLocaleString()},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"جزییات سفارش",selector:h=>u.jsx(X,{onClick:()=>{w(Ca({top:!0,title:"جزییات سفارش",content:u.jsx(Ma,{item:h})}))},children:"مشاهده"}),sortable:!0,wrap:!0,allowOverflow:!0,center:!0}];return u.jsx(f,{container:!0,alignItems:"center",justifyContent:"space-between",gap:2,paddingTop:2,mb:1,width:"100%",children:u.jsx(f,{container:!0,alignItems:"center",gap:_u.SMALL,children:u.jsx(G6,{title:u.jsx(f,{container:!0,alignItems:"center",justifyContent:"space-between",gap:1,paddingTop:2,mb:1,width:"100%",children:u.jsxs(f,{container:!0,xs:12,alignItems:"center",gap:2,children:[u.jsxs(zu,{children:["تعرفه های پرداخت نشده"," ",((s=(n=k[0])==null?void 0:n.provinceRequest)==null?void 0:s.killHouseUserFullName)&&` ${(A=(r=k[0])==null?void 0:r.provinceRequest)==null?void 0:A.killHouseUserFullName}`]}),u.jsxs(f,{container:!0,style:{borderStyle:"solid",borderWidth:"1px",padding:"10px",borderRadius:"15px",borderColor:"gray",justifyContent:"left"},children:[u.jsx(f,{children:u.jsx(N6,{control:u.jsx(E6,{checked:g,onChange:()=>D(!g),color:"primary"})})}),u.jsx(f,{children:u.jsx(G,{disabled:!g,label:"از تاریخ",id:"date",renderInput:h=>u.jsx(N,{size:"small",style:{width:"160px"},...h}),value:E,onChange:h=>{x(H(h).format("YYYY-MM-DD"))}})}),u.jsx(f,{children:u.jsx(G,{disabled:!g,label:"تا تاریخ",id:"date",renderInput:h=>u.jsx(N,{size:"small",style:{width:"160px"},...h}),value:p,onChange:h=>{$(H(h).format("YYYY-MM-DD"))}})})]}),u.jsx(f,{container:!0,alignItems:"center",gap:_u.SMALL,children:u.jsxs("form",{onSubmit:C,children:[u.jsx(N,{id:"outlined-basic",size:"small",autoComplete:"off",label:"جستجو",variant:"outlined",style:{width:250},onChange:Y}),u.jsx(X,{type:"submit",onClick:C,children:"جستجو"})]})})]})}),columns:S,data:k,progressPending:b,pagination:!0,paginationServer:!0,paginationTotalRows:_,onChangeRowsPerPage:V,onChangePage:W})})})},Ge=({killhouseKey:t,type:E})=>{const[,,x,p,$,g]=c.useContext(Fu),[D]=c.useContext(Fu),w=ku(S=>S.userSlice.userProfile.key);c.useEffect(()=>{const S=H(new Date).format("YYYY-MM-DD");p(S),g(S)},[]);const[k,l]=c.useState([]),[b,j]=c.useState(!1),[_,U]=c.useState(0),[z,M]=c.useState(10),[I,T]=c.useState(!1),[Y,e]=c.useState(""),W=S=>{e(S.target.value)},V=async(S,n)=>{j(!0);const s=await K.get(`kill_house_request_bar_management_wage/?search=filter&value=${n}&page=${S}&page_size=${z}&type=paid&kill_house_key=${t}&role=${d()}&date1=${x}&date2=${$}`);l(s.data.results),U(s.data.count),j(!1)};c.useEffect(()=>{V(1)},[]),c.useEffect(()=>{V(1)},[x,$,z,I]);const C=async S=>{S.preventDefault(),j(!0);try{const n=await K.get(`kill_house_request_bar_management_wage/?search=filter&value=${Y}&type=paid&kill_house_key=${t}&role=${d()}&date1=${x}&date2=${$}`);l(n.data.results),U(n.data.count)}catch(n){console.error("Error fetching data:",n)}finally{j(!1)}};return u.jsxs(f,{children:[u.jsxs(f,{container:!0,alignItems:"center",justifyContent:"space-between",gap:2,paddingTop:2,mb:1,width:"100%",children:[u.jsx(zu,{children:"بارها "}),u.jsxs(f,{container:!0,gap:1,style:{borderStyle:"solid",borderWidth:"1px",padding:"5px",borderRadius:"15px",borderColor:"gray",justifyContent:"left"},alignItems:"center",children:[u.jsx(E6,{icon:u.jsx(Ee,{}),checkedIcon:u.jsx(we,{}),checked:I,onChange:()=>T(!I),color:"primary",size:"large"}),u.jsx(f,{children:u.jsx(G,{disabled:!I,label:"از تاریخ",id:"date",renderInput:S=>u.jsx(N,{size:"small",style:{width:"160px"},...S}),value:x,onChange:S=>{p(H(S).format("YYYY-MM-DD"))}})}),u.jsx(f,{children:u.jsx(G,{disabled:!I,label:"تا تاریخ",id:"date",renderInput:S=>u.jsx(N,{size:"small",style:{width:"160px"},...S}),value:$,onChange:S=>{g(H(S).format("YYYY-MM-DD"))}})})]}),u.jsx(f,{container:!0,alignItems:"center",gap:_u.SMALL,children:u.jsxs("form",{onSubmit:C,children:[u.jsx(N,{id:"outlined-basic",size:"small",autoComplete:"off",label:"جستجو",variant:"outlined",style:{width:250},onChange:W}),u.jsx(X,{type:"submit",onClick:C,endIcon:u.jsx(L6,{}),children:"جستجو"})]})}),u.jsx(T6,{title:"خروجی اکسل",children:u.jsx(X,{color:"success",onClick:()=>{D({vertical:"top",horizontal:"center",msg:"فایل اکسل در حال دانلود می باشد، این علمیات ممکن است زمان بر باشد لطفا صبر کنید.",severity:"success"});const S=`${K.defaults.baseURL}kill_house_total_wage_excel_new/?date1=${x}&date2=${$}&role=KillHouse&search=filter&value=${Y}&key=${w}`;window.location.href=S},children:u.jsx(U6,{size:32})})})]}),!1]})},he=({killhouseKey:t,type:E})=>{const[,,x,p,$,g]=c.useContext(Fu);c.useEffect(()=>{const C=H(new Date).format("YYYY-MM-DD");p(C),g(C)},[]);const[D,w]=c.useState([]),[k,l]=c.useState(!1),[b,j]=c.useState(0),[_,U]=c.useState(10),[z,M]=c.useState(""),I=C=>{M(C.target.value)},T=async(C,S)=>{l(!0);const n=await K.get(`kill_house_free_bar_wage_total/?search=filter&value=${S}&page=${C}&page_size=${_}&kill_house_key=${t}&role=${d()}&date1=${x}&date2=${$}&type=${E}`);w(n.data.results),j(n.data.count),l(!1)},Y=C=>{T(C,z)},e=async(C,S)=>{l(!0);const n=await K.get(`kill_house_free_bar_wage_total/?search=filter&value=${z}&page=${S}&page_size=${C}&kill_house_key=${t}&role=${d()}&date1=${x}&date2=${$}&type=${E}`);w(n.data.results),j(n.data.count),U(C),l(!1)};c.useEffect(()=>{T(1)},[]),c.useEffect(()=>{T(1)},[x,$,_]);const W=async C=>{C.preventDefault(),l(!0);try{const S=await K.get(`kill_house_free_bar_wage_total/?search=filter&value=${z}&kill_house_key=${t}&role=${d()}&date1=${x}&date2=${$}&type=${E}`);w(S.data.results),j(S.data.count)}catch(S){console.error("Error fetching data:",S)}finally{l(!1)}},V=[{name:"نام خریدار",selector:C=>{var S,n,s,r,A,h;return`${(s=(n=(S=C.killHouse)==null?void 0:S.killHouseOperator)==null?void 0:n.user)==null?void 0:s.fullname} (${(h=(A=(r=C.killHouse)==null?void 0:r.killHouseOperator)==null?void 0:A.user)==null?void 0:h.mobile})`},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"نام فروشنده",selector:C=>C==null?void 0:C.poultryName,sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"شهر",selector:C=>C==null?void 0:C.city,sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"تعداد",selector:C=>E==="live"?C==null?void 0:C.quantity.toLocaleString():C==null?void 0:C.numberOfCarcasses.toLocaleString(),sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"وزن",selector:C=>E==="live"?C==null?void 0:C.liveWeight.toLocaleString():C==null?void 0:C.weightOfCarcasses.toLocaleString(),sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"مبلغ کل",selector:C=>{var S;return(S=C==null?void 0:C.totalAmount)==null?void 0:S.toLocaleString()},sortable:!0,wrap:!0,allowOverflow:!0,center:!0}];return u.jsx(f,{children:u.jsx(G6,{title:u.jsxs(f,{container:!0,alignItems:"center",justifyContent:"space-between",gap:2,paddingTop:2,mb:1,width:"100%",children:[u.jsxs(zu,{children:["بارهای ",E==="live"?"مرغ زنده":"لاشه"]}),u.jsx(f,{children:u.jsx(G,{label:"از تاریخ",id:"date",renderInput:C=>u.jsx(N,{style:{width:"160px"},...C}),value:x,onChange:C=>{p(H(C).format("YYYY-MM-DD"))}})}),u.jsx(f,{children:u.jsx(G,{label:"تا تاریخ",id:"date",renderInput:C=>u.jsx(N,{style:{width:"160px"},...C}),value:$,onChange:C=>{g(H(C).format("YYYY-MM-DD"))}})}),u.jsx(f,{container:!0,alignItems:"center",gap:_u.SMALL,children:u.jsxs("form",{onSubmit:W,children:[u.jsx(N,{id:"outlined-basic",size:"small",autoComplete:"off",label:"جستجو",variant:"outlined",style:{width:250},onChange:I}),u.jsx(X,{type:"submit",onClick:W,endIcon:u.jsx(L6,{}),children:"جستجو"})]})})]}),columns:V,data:D,progressPending:k,pagination:!0,paginationServer:!0,paginationTotalRows:b,onChangeRowsPerPage:e,onChangePage:Y})})},Fe=({killhouseKey:t,type:E})=>{const[,,x,p,$,g]=c.useContext(Fu);c.useEffect(()=>{const C=H(new Date).format("YYYY-MM-DD");p(C),g(C)},[]);const[D,w]=c.useState([]),[k,l]=c.useState(!1),[b,j]=c.useState(0),[_,U]=c.useState(10),[z,M]=c.useState(""),I=C=>{M(C.target.value)},T=async(C,S)=>{l(!0);const n=await K.get(`chain-allocation-total-wage/?search=filter&value=${S}&page=${C}&page_size=${_}&type=paid&chain_company_key=${t}&role=${d()}&date1=${x}&date2=${$}`);w(n.data.results),j(n.data.count),l(!1)},Y=C=>{T(C,z)},e=async(C,S)=>{l(!0);const n=await K.get(`chain-allocation-total-wage/?search=filter&value=${z}&page=${S}&page_size=${C}&type=paid&chain_company_key=${t}&role=${d()}&date1=${x}&date2=${$}`);w(n.data.results),j(n.data.count),U(C),l(!1)};c.useEffect(()=>{T(1)},[]),c.useEffect(()=>{T(1)},[x,$,_]);const W=async C=>{C.preventDefault(),l(!0);try{const S=await K.get(`chain-allocation-total-wage/?search=filter&value=${z}&type=paid&chain_company_key=${t}&role=${d()}&date1=${x}&date2=${$}`);w(S.data.results),j(S.data.count)}catch(S){console.error("Error fetching data:",S)}finally{l(!1)}},V=[{name:"ردیف",selector:(C,S)=>S+1,sortable:!1,wrap:!0,allowOverflow:!0,center:!0,width:"30px"},{name:"تاریخ ایجاد",selector:C=>ge(C==null?void 0:C.createDate),sortable:!1,wrap:!0,allowOverflow:!0,center:!0,width:"auto"},{name:"مرغداری",selector:(C,S)=>{var n,s,r,A,h;return`${(s=(n=C==null?void 0:C.poultryHatching)==null?void 0:n.poultry)==null?void 0:s.unitName} (${(h=(A=(r=C==null?void 0:C.poultryHatching)==null?void 0:r.poultry)==null?void 0:A.user)==null?void 0:h.mobile})`},sortable:!1,wrap:!0,allowOverflow:!0,center:!0,width:"auto"},{name:"شرکت زنجیره",selector:(C,S)=>{var n,s;return`${(n=C==null?void 0:C.chainCompany)==null?void 0:n.name} (${(s=C==null?void 0:C.chainCompany)==null?void 0:s.user.mobile})`},sortable:!1,wrap:!0,allowOverflow:!0,center:!0,width:"auto"},{name:"کد قرنطینه",selector:(C,S)=>C!=null&&C.quarantineCode?C==null?void 0:C.quarantineCode:"-",sortable:!1,wrap:!0,allowOverflow:!0,center:!0,width:"auto"},{name:"تعداد",selector:C=>C==null?void 0:C.quantity,sortable:!1,wrap:!0,allowOverflow:!0,center:!0,width:"auto"},{name:"وزن",selector:C=>C==null?void 0:C.weight,sortable:!1,wrap:!0,allowOverflow:!0,center:!0,width:"60px"}];return u.jsx(f,{children:u.jsx(G6,{title:u.jsxs(f,{container:!0,alignItems:"center",justifyContent:"space-between",gap:2,paddingTop:2,mb:1,width:"100%",children:[u.jsx(zu,{children:"سفارشات زنجیره"}),u.jsx(f,{children:u.jsx(G,{label:"از تاریخ",id:"date",renderInput:C=>u.jsx(N,{style:{width:"160px"},...C}),value:x,onChange:C=>{p(H(C).format("YYYY-MM-DD"))}})}),u.jsx(f,{children:u.jsx(G,{label:"تا تاریخ",id:"date",renderInput:C=>u.jsx(N,{style:{width:"160px"},...C}),value:$,onChange:C=>{g(H(C).format("YYYY-MM-DD"))}})}),u.jsx(f,{container:!0,alignItems:"center",gap:_u.SMALL,children:u.jsxs("form",{onSubmit:W,children:[u.jsx(N,{id:"outlined-basic",size:"small",autoComplete:"off",label:"جستجو",variant:"outlined",style:{width:250},onChange:I}),u.jsx(X,{type:"submit",onClick:W,endIcon:u.jsx(L6,{}),children:"جستجو"})]})})]}),columns:V,data:D,progressPending:k,pagination:!0,paginationServer:!0,paginationTotalRows:b,onChangeRowsPerPage:e,onChangePage:Y})})},Da=Ue("PROVINCE_PAYMENT_GET_KILLHOUSES",async(t,{dispatch:E})=>{try{E(q6());const{data:x,status:p}=await K.get("detail_general_killhouse_wage/",{params:{date1:t.withDate?t.selectedDate1:"null",date2:t.withDate?t.selectedDate2:"null",search:"filter",value:t.textValue,role:d()}});return E(v6()),{data:x,status:p}}catch(x){return E(v6()),{error:x.response.data}}}),Ra=Ue("PROVINCE_GET_PAYMENT_DASHBOARD",async(t,{dispatch:E})=>{try{E(q6());const{data:x,status:p}=await K.get("dashboard_detail_general_killhouse_wage",{params:{date1:t.withDate?t.selectedDate1:"null",date2:t.withDate?t.selectedDate2:"null",role:d()}});return{data:x,status:p}}catch(x){return{error:x.response.data}}}),Ya=()=>{var U,z,M,I,T,Y,e,W,V,C,S,n,s,r,A,h,L,v,J,Mu,yu,Du,Ru,Yu,Ku,Hu,qu,vu,I6,k6,_6,M6,D6,R6,Y6,q,y,Pu,w6,Wu,Nu,P6,V6,W6,b6,m6,u0,e0,a0,l0,t0,o0,n0,s0,r0,c0,C0,d0,g0,A0,i0,f0,h0,x0,p0,j0,S0,F0,y0,E0,w0,L0,b0,$0,T0,I0,k0,_0,M0,D0,R0,Y0,P0,W0,z0,K0,H0,q0,v0,N0,R,i,ju,o,lu,tu,ou,nu,su,ru,cu,Cu,du,Uu,Vu,Qu,Xu,Gu,Ju,Zu,Ou,Bu,mu,u6,e6,a6,l6,t6,o6,n6,s6,r6,c6,C6;const[t,E]=c.useState([]),x=B6(),[p,$]=c.useState(!1),[,,g,D,w,k]=c.useContext(Fu);c.useEffect(()=>{const Q=H(new Date).format("YYYY-MM-DD");D(Q),k(Q)},[]);const[l,b]=c.useState([]);c.useEffect(()=>{x(Ra({selectedDate1:g,selectedDate2:w,withDate:p})).then(Q=>{b(Q.payload.data)})},[g,w,p]);const j=()=>{x(Da({selectedDate1:g,selectedDate2:w,withDate:p})).then(Q=>{var d6,g6,A6,i6,f6,h6,x6,p6;let Eu=[];switch(d()){case"AdminX":Eu=(g6=(d6=Q.payload)==null?void 0:d6.data)==null?void 0:g6.map((a,Su)=>{var Z,O,B,m,uu,eu,au,gu,Au,iu,fu,hu,xu,pu,wu,Lu,bu,$u,Tu,Iu,j6,S6,F6,z6,K6,U0,V0,Q0,X0,G0,J0,Z0,O0,B0,m0,ue,ee,ae,le,te,oe,ne,se,re,ce,Te,Ie,ke,_e,Me,De;return[Su+1,(Z=a==null?void 0:a.info)==null?void 0:Z.type,(O=a==null?void 0:a.info)==null?void 0:O.killHouseName,(B=a==null?void 0:a.info)==null?void 0:B.fullname,(m=a==null?void 0:a.info)==null?void 0:m.mobile,(uu=a==null?void 0:a.info)==null?void 0:uu.city,(au=(eu=a==null?void 0:a.info)==null?void 0:eu.lenProvinceKillRequests)==null?void 0:au.toLocaleString(),(Au=(gu=a==null?void 0:a.info)==null?void 0:gu.totalKilledQuantity)==null?void 0:Au.toLocaleString(),(fu=(iu=a==null?void 0:a.info)==null?void 0:iu.totalKilledWeight)==null?void 0:fu.toLocaleString(),(xu=(hu=a==null?void 0:a.info)==null?void 0:hu.lenKillHouseRequests)==null?void 0:xu.toLocaleString(),(wu=(pu=a==null?void 0:a.info)==null?void 0:pu.acceptedRealQuantity)==null?void 0:wu.toLocaleString(),(bu=(Lu=a==null?void 0:a.info)==null?void 0:Lu.acceptedRealWeight)==null?void 0:bu.toLocaleString(),(Tu=($u=a==null?void 0:a.info)==null?void 0:$u.lenSlaughterTransactions)==null?void 0:Tu.toLocaleString(),(j6=(Iu=a==null?void 0:a.info)==null?void 0:Iu.off)==null?void 0:j6.toLocaleString(),(F6=(S6=a==null?void 0:a.info)==null?void 0:S6.totalWage)==null?void 0:F6.toLocaleString(),(K6=(z6=a==null?void 0:a.info)==null?void 0:z6.companyTotalWage)==null?void 0:K6.toLocaleString(),(V0=(U0=a==null?void 0:a.info)==null?void 0:U0.unionTotalWage)==null?void 0:V0.toLocaleString(),(X0=(Q0=a==null?void 0:a.info)==null?void 0:Q0.guildsTotalWage)==null?void 0:X0.toLocaleString(),(J0=(G0=a==null?void 0:a.info)==null?void 0:G0.otherTotalWage)==null?void 0:J0.toLocaleString(),(O0=(Z0=a==null?void 0:a.info)==null?void 0:Z0.notPaied)==null?void 0:O0.toLocaleString(),(m0=(B0=a==null?void 0:a.info)==null?void 0:B0.companyTotalUnpaidWage)==null?void 0:m0.toLocaleString(),(ee=(ue=a==null?void 0:a.info)==null?void 0:ue.unionTotalUnpaidWage)==null?void 0:ee.toLocaleString(),(le=(ae=a==null?void 0:a.info)==null?void 0:ae.guildsTotalUnpaidWage)==null?void 0:le.toLocaleString(),(oe=(te=a==null?void 0:a.info)==null?void 0:te.otherTotalUnpaidWage)==null?void 0:oe.toLocaleString(),(se=(ne=a==null?void 0:a.info)==null?void 0:ne.totalPaidWage)==null?void 0:se.toLocaleString(),(ce=(re=a==null?void 0:a.info)==null?void 0:re.unionTotalPaidWage)==null?void 0:ce.toLocaleString(),(Ie=(Te=a==null?void 0:a.info)==null?void 0:Te.companyTotalPaidWage)==null?void 0:Ie.toLocaleString(),(_e=(ke=a==null?void 0:a.info)==null?void 0:ke.guildsTotalPaidWage)==null?void 0:_e.toLocaleString(),(De=(Me=a==null?void 0:a.info)==null?void 0:Me.otherTotalPaidWage)==null?void 0:De.toLocaleString()]});break;case"SuperAdmin":Eu=(i6=(A6=Q.payload)==null?void 0:A6.data)==null?void 0:i6.map((a,Su)=>{var Z,O,B,m,uu,eu,au,gu,Au,iu,fu,hu,xu,pu,wu,Lu,bu,$u,Tu,Iu,j6,S6,F6,z6,K6,U0,V0,Q0,X0,G0,J0,Z0,O0,B0,m0,ue,ee,ae,le,te,oe,ne,se,re,ce;return[Su+1,(Z=a==null?void 0:a.info)==null?void 0:Z.type,(O=a==null?void 0:a.info)==null?void 0:O.killHouseName,(B=a==null?void 0:a.info)==null?void 0:B.fullname,(m=a==null?void 0:a.info)==null?void 0:m.mobile,(uu=a==null?void 0:a.info)==null?void 0:uu.city,(au=(eu=a==null?void 0:a.info)==null?void 0:eu.lenProvinceKillRequests)==null?void 0:au.toLocaleString(),(Au=(gu=a==null?void 0:a.info)==null?void 0:gu.totalKilledQuantity)==null?void 0:Au.toLocaleString(),(fu=(iu=a==null?void 0:a.info)==null?void 0:iu.totalKilledWeight)==null?void 0:fu.toLocaleString(),(xu=(hu=a==null?void 0:a.info)==null?void 0:hu.lenKillHouseRequests)==null?void 0:xu.toLocaleString(),(wu=(pu=a==null?void 0:a.info)==null?void 0:pu.acceptedRealQuantity)==null?void 0:wu.toLocaleString(),(bu=(Lu=a==null?void 0:a.info)==null?void 0:Lu.acceptedRealWeight)==null?void 0:bu.toLocaleString(),(Tu=($u=a==null?void 0:a.info)==null?void 0:$u.lenSlaughterTransactions)==null?void 0:Tu.toLocaleString(),(j6=(Iu=a==null?void 0:a.info)==null?void 0:Iu.off)==null?void 0:j6.toLocaleString(),(F6=(S6=a==null?void 0:a.info)==null?void 0:S6.totalWage)==null?void 0:F6.toLocaleString(),(K6=(z6=a==null?void 0:a.info)==null?void 0:z6.companyTotalWage)==null?void 0:K6.toLocaleString(),(V0=(U0=a==null?void 0:a.info)==null?void 0:U0.unionTotalWage)==null?void 0:V0.toLocaleString(),(X0=(Q0=a==null?void 0:a.info)==null?void 0:Q0.guildsTotalWage)==null?void 0:X0.toLocaleString(),(J0=(G0=a==null?void 0:a.info)==null?void 0:G0.notPaied)==null?void 0:J0.toLocaleString(),(O0=(Z0=a==null?void 0:a.info)==null?void 0:Z0.companyTotalUnpaidWage)==null?void 0:O0.toLocaleString(),(m0=(B0=a==null?void 0:a.info)==null?void 0:B0.unionTotalUnpaidWage)==null?void 0:m0.toLocaleString(),(ee=(ue=a==null?void 0:a.info)==null?void 0:ue.guildsTotalUnpaidWage)==null?void 0:ee.toLocaleString(),(le=(ae=a==null?void 0:a.info)==null?void 0:ae.totalPaidWage)==null?void 0:le.toLocaleString(),(oe=(te=a==null?void 0:a.info)==null?void 0:te.unionTotalPaidWage)==null?void 0:oe.toLocaleString(),(se=(ne=a==null?void 0:a.info)==null?void 0:ne.companyTotalPaidWage)==null?void 0:se.toLocaleString(),(ce=(re=a==null?void 0:a.info)==null?void 0:re.guildsTotalPaidWage)==null?void 0:ce.toLocaleString()]});break;case"ProvinceOperator":Eu=(h6=(f6=Q.payload)==null?void 0:f6.data)==null?void 0:h6.map((a,Su)=>{var Z,O,B,m,uu,eu,au,gu,Au,iu,fu,hu,xu,pu,wu,Lu,bu,$u,Tu,Iu,j6,S6,F6;return[Su+1,(Z=a==null?void 0:a.info)==null?void 0:Z.type,(O=a==null?void 0:a.info)==null?void 0:O.killHouseName,(B=a==null?void 0:a.info)==null?void 0:B.fullname,(m=a==null?void 0:a.info)==null?void 0:m.mobile,(uu=a==null?void 0:a.info)==null?void 0:uu.city,(au=(eu=a==null?void 0:a.info)==null?void 0:eu.totalKilledQuantity)==null?void 0:au.toLocaleString(),(Au=(gu=a==null?void 0:a.info)==null?void 0:gu.totalKilledWeight)==null?void 0:Au.toLocaleString(),(fu=(iu=a==null?void 0:a.info)==null?void 0:iu.lenKillHouseRequests)==null?void 0:fu.toLocaleString(),(xu=(hu=a==null?void 0:a.info)==null?void 0:hu.acceptedRealQuantity)==null?void 0:xu.toLocaleString(),(wu=(pu=a==null?void 0:a.info)==null?void 0:pu.acceptedRealWeight)==null?void 0:wu.toLocaleString(),(bu=(Lu=a==null?void 0:a.info)==null?void 0:Lu.lenSlaughterTransactions)==null?void 0:bu.toLocaleString(),(Tu=($u=a==null?void 0:a.info)==null?void 0:$u.unionTotalWage)==null?void 0:Tu.toLocaleString(),(j6=(Iu=a==null?void 0:a.info)==null?void 0:Iu.unionTotalUnpaidWage)==null?void 0:j6.toLocaleString(),(F6=(S6=a==null?void 0:a.info)==null?void 0:S6.unionTotalPaidWage)==null?void 0:F6.toLocaleString()]});break;default:Eu=(p6=(x6=Q.payload)==null?void 0:x6.data)==null?void 0:p6.map((a,Su)=>{var Z,O,B,m,uu,eu,au,gu,Au,iu,fu,hu,xu,pu,wu,Lu,bu,$u,Tu,Iu,j6,S6,F6,z6,K6;return[Su+1,(Z=a==null?void 0:a.info)==null?void 0:Z.type,(O=a==null?void 0:a.info)==null?void 0:O.killHouseName,(B=a==null?void 0:a.info)==null?void 0:B.fullname,(m=a==null?void 0:a.info)==null?void 0:m.mobile,(uu=a==null?void 0:a.info)==null?void 0:uu.city,(au=(eu=a==null?void 0:a.info)==null?void 0:eu.lenProvinceKillRequests)==null?void 0:au.toLocaleString(),(Au=(gu=a==null?void 0:a.info)==null?void 0:gu.totalKilledQuantity)==null?void 0:Au.toLocaleString(),(fu=(iu=a==null?void 0:a.info)==null?void 0:iu.totalKilledWeight)==null?void 0:fu.toLocaleString(),(xu=(hu=a==null?void 0:a.info)==null?void 0:hu.lenKillHouseRequests)==null?void 0:xu.toLocaleString(),(wu=(pu=a==null?void 0:a.info)==null?void 0:pu.acceptedRealQuantity)==null?void 0:wu.toLocaleString(),(bu=(Lu=a==null?void 0:a.info)==null?void 0:Lu.acceptedRealWeight)==null?void 0:bu.toLocaleString(),(Tu=($u=a==null?void 0:a.info)==null?void 0:$u.lenSlaughterTransactions)==null?void 0:Tu.toLocaleString(),(j6=(Iu=a==null?void 0:a.info)==null?void 0:Iu.unionTotalWage)==null?void 0:j6.toLocaleString(),(F6=(S6=a==null?void 0:a.info)==null?void 0:S6.unionTotalUnpaidWage)==null?void 0:F6.toLocaleString(),(K6=(z6=a==null?void 0:a.info)==null?void 0:z6.unionTotalPaidWage)==null?void 0:K6.toLocaleString()]});break}E(Eu)})},_=ku(Q=>Q.userSlice.userProfile.key);return c.useEffect(()=>{j()},[]),u.jsxs(f,{container:!0,alignItems:"center",justifyContent:"space-between",gap:2,mb:1,width:"100%",children:[u.jsx(f,{container:!0,alignItems:"center",justifyContent:"center",gap:2,paddingTop:2,mb:1,width:"100%",children:u.jsxs(f,{container:!0,alignItems:"center",gap:_u.SMALL,justifyContent:"center",children:[u.jsxs(f,{container:!0,justifyContent:"center",style:{borderStyle:"solid",borderWidth:"1px",padding:"10px",borderRadius:"15px",borderColor:"gray",justifyContent:"left"},children:[u.jsx(f,{children:u.jsx(N6,{control:u.jsx(E6,{checked:p,onChange:()=>$(!p),color:"primary"})})}),u.jsx(f,{children:u.jsx(G,{disabled:!p,label:"از تاریخ",id:"date",renderInput:Q=>u.jsx(N,{size:"small",style:{width:"160px"},...Q}),value:g,onChange:Q=>{D(H(Q).format("YYYY-MM-DD"))}})}),u.jsx(f,{children:u.jsx(G,{disabled:!p,label:"تا تاریخ",id:"date",renderInput:Q=>u.jsx(N,{size:"small",style:{width:"160px"},...Q}),value:w,onChange:Q=>{k(H(Q).format("YYYY-MM-DD"))}})})]}),u.jsx(X,{type:"submit",onClick:()=>{j()},children:"جستجو"}),(d()==="SuperAdmin"||d()==="AdminX")&&u.jsx(T6,{title:"خروجی اکسل",placement:"top",children:u.jsx("a",{href:`${K.defaults.baseURL}kill_house_total_transactions_wage_payid_super_admin_excel/?key=${_}${p?`&date1=${g}&date2=${w}`:""}&role=${d()}`,rel:"noreferrer",children:u.jsx(X,{color:"primary",children:u.jsx(U6,{size:32})})})})]})}),u.jsx(f,{container:!0,mt:2,mb:4,isDashboard:!0,xs:12,children:u.jsx(y6,{noPagination:!0,columns:d()==="AdminX"?["تعداد تخصیص بدون بار","حجم تخصیص بدون بار","وزن تخصیص بدون بار","تعداد بار","حجم بار","وزن بار","تعداد تراکنش ","کل تعرفه (ریال)","سهم شرکت (ریال)","سهم اتحادیه (ریال)","سهم صنف (ریال)","سهم غیره (ریال)","تخفیف کل (ریال)","کل تعرفه پرداخت نشده (ریال)"," سهم شرکت پرداخت نشده"," سهم اتحادیه پرداخت نشده","سهم صنف پرداخت نشده","سهم غیره پرداخت نشده","کل تعرفه پرداخت شده (ریال)","سهم اتحادیه از واریزی(ریال)","سهم شرکت از واریزی(ریال)","سهم اصناف از واریزی(ریال)","سهم غیره از واریزی(ریال)"]:d()==="SuperAdmin"?["تعداد تخصیص بدون بار","حجم تخصیص بدون بار","وزن تخصیص بدون بار","تعداد بار","حجم بار","وزن بار","تعداد تراکنش ","کل تعرفه (ریال)","سهم شرکت (ریال)","سهم اتحادیه (ریال)","سهم صنف (ریال)","تخفیف کل (ریال)","کل تعرفه پرداخت نشده (ریال)"," سهم شرکت پرداخت نشده"," سهم اتحادیه پرداخت نشده","سهم صنف پرداخت نشده","کل تعرفه پرداخت شده (ریال)","سهم اتحادیه از واریزی(ریال)","سهم شرکت از واریزی(ریال)","سهم اصناف از واریزی(ریال)"]:d()==="ProvinceOperator"?["تعداد تخصیص بدون بار","حجم تخصیص بدون بار","وزن تخصیص بدون بار","تعداد بار","حجم بار","وزن بار","سهم اتحادیه (ریال)"," سهم اتحادیه پرداخت نشده","سهم اتحادیه از واریزی(ریال)"]:["تعداد تخصیص بدون بار","حجم تخصیص بدون بار","وزن تخصیص بدون بار","تعداد بار","حجم بار","وزن بار","تعداد تراکنش ","سهم اتحادیه (ریال)"," سهم اتحادیه پرداخت نشده","سهم اتحادیه از واریزی(ریال)"],data:d()==="AdminX"?[[(z=(U=l==null?void 0:l.info)==null?void 0:U.lenProvinceKillRequests)==null?void 0:z.toLocaleString(),(I=(M=l==null?void 0:l.info)==null?void 0:M.totalKilledQuantity)==null?void 0:I.toLocaleString(),(Y=(T=l==null?void 0:l.info)==null?void 0:T.totalKilledWeight)==null?void 0:Y.toLocaleString(),(W=(e=l==null?void 0:l.info)==null?void 0:e.lenKillHouseRequests)==null?void 0:W.toLocaleString(),(C=(V=l==null?void 0:l.info)==null?void 0:V.acceptedRealQuantity)==null?void 0:C.toLocaleString(),(n=(S=l==null?void 0:l.info)==null?void 0:S.acceptedRealWeight)==null?void 0:n.toLocaleString(),(r=(s=l==null?void 0:l.info)==null?void 0:s.lenSlaughterTransactions)==null?void 0:r.toLocaleString(),(h=(A=l==null?void 0:l.info)==null?void 0:A.totalWage)==null?void 0:h.toLocaleString(),(v=(L=l==null?void 0:l.info)==null?void 0:L.companyTotalWage)==null?void 0:v.toLocaleString(),(Mu=(J=l==null?void 0:l.info)==null?void 0:J.unionTotalWage)==null?void 0:Mu.toLocaleString(),(Du=(yu=l==null?void 0:l.info)==null?void 0:yu.guildsTotalWage)==null?void 0:Du.toLocaleString(),(Yu=(Ru=l==null?void 0:l.info)==null?void 0:Ru.otherTotalWage)==null?void 0:Yu.toLocaleString(),(Hu=(Ku=l==null?void 0:l.info)==null?void 0:Ku.totalOff)==null?void 0:Hu.toLocaleString(),(vu=(qu=l==null?void 0:l.info)==null?void 0:qu.notPaied)==null?void 0:vu.toLocaleString(),(k6=(I6=l==null?void 0:l.info)==null?void 0:I6.companyTotalUnpaidWage)==null?void 0:k6.toLocaleString(),(M6=(_6=l==null?void 0:l.info)==null?void 0:_6.unionTotalUnpaidWage)==null?void 0:M6.toLocaleString(),(R6=(D6=l==null?void 0:l.info)==null?void 0:D6.guildsTotalUnpaidWage)==null?void 0:R6.toLocaleString(),(q=(Y6=l==null?void 0:l.info)==null?void 0:Y6.otherTotalUnpaidWage)==null?void 0:q.toLocaleString(),(Pu=(y=l==null?void 0:l.info)==null?void 0:y.totalPaidWage)==null?void 0:Pu.toLocaleString(),(Wu=(w6=l==null?void 0:l.info)==null?void 0:w6.unionTotalPaidWage)==null?void 0:Wu.toLocaleString(),(P6=(Nu=l==null?void 0:l.info)==null?void 0:Nu.companyTotalPaidWage)==null?void 0:P6.toLocaleString(),(W6=(V6=l==null?void 0:l.info)==null?void 0:V6.guildsTotalPaidWage)==null?void 0:W6.toLocaleString(),(m6=(b6=l==null?void 0:l.info)==null?void 0:b6.otherTotalPaidWage)==null?void 0:m6.toLocaleString()]]:d()==="SuperAdmin"?[[(e0=(u0=l==null?void 0:l.info)==null?void 0:u0.lenProvinceKillRequests)==null?void 0:e0.toLocaleString(),(l0=(a0=l==null?void 0:l.info)==null?void 0:a0.totalKilledQuantity)==null?void 0:l0.toLocaleString(),(o0=(t0=l==null?void 0:l.info)==null?void 0:t0.totalKilledWeight)==null?void 0:o0.toLocaleString(),(s0=(n0=l==null?void 0:l.info)==null?void 0:n0.lenKillHouseRequests)==null?void 0:s0.toLocaleString(),(c0=(r0=l==null?void 0:l.info)==null?void 0:r0.acceptedRealQuantity)==null?void 0:c0.toLocaleString(),(d0=(C0=l==null?void 0:l.info)==null?void 0:C0.acceptedRealWeight)==null?void 0:d0.toLocaleString(),(A0=(g0=l==null?void 0:l.info)==null?void 0:g0.lenSlaughterTransactions)==null?void 0:A0.toLocaleString(),(f0=(i0=l==null?void 0:l.info)==null?void 0:i0.totalWage)==null?void 0:f0.toLocaleString(),(x0=(h0=l==null?void 0:l.info)==null?void 0:h0.companyTotalWage)==null?void 0:x0.toLocaleString(),(j0=(p0=l==null?void 0:l.info)==null?void 0:p0.unionTotalWage)==null?void 0:j0.toLocaleString(),(F0=(S0=l==null?void 0:l.info)==null?void 0:S0.guildsTotalWage)==null?void 0:F0.toLocaleString(),(E0=(y0=l==null?void 0:l.info)==null?void 0:y0.totalOff)==null?void 0:E0.toLocaleString(),(L0=(w0=l==null?void 0:l.info)==null?void 0:w0.notPaied)==null?void 0:L0.toLocaleString(),($0=(b0=l==null?void 0:l.info)==null?void 0:b0.companyTotalUnpaidWage)==null?void 0:$0.toLocaleString(),(I0=(T0=l==null?void 0:l.info)==null?void 0:T0.unionTotalUnpaidWage)==null?void 0:I0.toLocaleString(),(_0=(k0=l==null?void 0:l.info)==null?void 0:k0.guildsTotalUnpaidWage)==null?void 0:_0.toLocaleString(),(D0=(M0=l==null?void 0:l.info)==null?void 0:M0.totalPaidWage)==null?void 0:D0.toLocaleString(),(Y0=(R0=l==null?void 0:l.info)==null?void 0:R0.unionTotalPaidWage)==null?void 0:Y0.toLocaleString(),(W0=(P0=l==null?void 0:l.info)==null?void 0:P0.companyTotalPaidWage)==null?void 0:W0.toLocaleString(),(K0=(z0=l==null?void 0:l.info)==null?void 0:z0.guildsTotalPaidWage)==null?void 0:K0.toLocaleString()]]:d()==="ProvinceOperator"?[[(q0=(H0=l==null?void 0:l.info)==null?void 0:H0.lenProvinceKillRequests)==null?void 0:q0.toLocaleString(),(N0=(v0=l==null?void 0:l.info)==null?void 0:v0.totalKilledQuantity)==null?void 0:N0.toLocaleString(),(i=(R=l==null?void 0:l.info)==null?void 0:R.totalKilledWeight)==null?void 0:i.toLocaleString(),(o=(ju=l==null?void 0:l.info)==null?void 0:ju.acceptedRealQuantity)==null?void 0:o.toLocaleString(),(tu=(lu=l==null?void 0:l.info)==null?void 0:lu.acceptedRealWeight)==null?void 0:tu.toLocaleString(),(nu=(ou=l==null?void 0:l.info)==null?void 0:ou.lenSlaughterTransactions)==null?void 0:nu.toLocaleString(),(ru=(su=l==null?void 0:l.info)==null?void 0:su.unionTotalWage)==null?void 0:ru.toLocaleString(),(Cu=(cu=l==null?void 0:l.info)==null?void 0:cu.unionTotalUnpaidWage)==null?void 0:Cu.toLocaleString(),(Uu=(du=l==null?void 0:l.info)==null?void 0:du.unionTotalPaidWage)==null?void 0:Uu.toLocaleString()]]:[[(Qu=(Vu=l==null?void 0:l.info)==null?void 0:Vu.lenProvinceKillRequests)==null?void 0:Qu.toLocaleString(),(Gu=(Xu=l==null?void 0:l.info)==null?void 0:Xu.totalKilledQuantity)==null?void 0:Gu.toLocaleString(),(Zu=(Ju=l==null?void 0:l.info)==null?void 0:Ju.totalKilledWeight)==null?void 0:Zu.toLocaleString(),(Bu=(Ou=l==null?void 0:l.info)==null?void 0:Ou.lenKillHouseRequests)==null?void 0:Bu.toLocaleString(),(u6=(mu=l==null?void 0:l.info)==null?void 0:mu.acceptedRealQuantity)==null?void 0:u6.toLocaleString(),(a6=(e6=l==null?void 0:l.info)==null?void 0:e6.acceptedRealWeight)==null?void 0:a6.toLocaleString(),(t6=(l6=l==null?void 0:l.info)==null?void 0:l6.lenSlaughterTransactions)==null?void 0:t6.toLocaleString(),(n6=(o6=l==null?void 0:l.info)==null?void 0:o6.unionTotalWage)==null?void 0:n6.toLocaleString(),(r6=(s6=l==null?void 0:l.info)==null?void 0:s6.unionTotalUnpaidWage)==null?void 0:r6.toLocaleString(),(C6=(c6=l==null?void 0:l.info)==null?void 0:c6.unionTotalPaidWage)==null?void 0:C6.toLocaleString()]],title:"خلاصه اطلاعات",customColors:[{name:"تعداد تخصیص بدون بار",color:"yellow"},{name:"حجم تخصیص بدون بار",color:"yellow"},{name:"وزن تخصیص بدون بار",color:"yellow"},{name:"تعداد بار",color:"cyan"},{name:"حجم بار",color:"cyan"},{name:"وزن بار",color:"cyan"},{name:"تعداد تراکنش ",color:"orange"},{name:"کل تعرفه (ریال)",color:"green"},{name:"سهم شرکت (ریال)",color:"green"},{name:"سهم اتحادیه (ریال)",color:"green"},{name:"سهم صنف (ریال)",color:"green"},{name:"سهم غیره (ریال)",color:"green"},{name:"کل تعرفه پرداخت شده (ریال)",color:"red"},{name:"سهم اتحادیه از واریزی(ریال)",color:"red"},{name:"سهم شرکت از واریزی(ریال)",color:"red"},{name:"سهم اصناف از واریزی(ریال)",color:"red"},{name:"سهم غیره از واریزی(ریال)",color:"red"},{name:"تخفیف کل (ریال)",color:"pink"}]})}),u.jsx(y6,{paginated:!0,columns:d()==="AdminX"?["ردیف","ماهیت","خریدار","نام و نام خانوادگی مالک","تلفن مالک","شهر","تعداد تخصیص بدون بار","حجم تخصیص بدون بار","وزن تخصیص بدون بار","تعداد بار","حجم بار","وزن بار","تعداد تراکنش ","تخفیف (ریال)","کل تعرفه (ریال)","سهم شرکت (ریال)","سهم اتحادیه (ریال)","سهم صنف (ریال)","سهم غیره (ریال)","کل تعرفه پرداخت نشده (ریال)"," سهم شرکت پرداخت نشده"," سهم اتحادیه پرداخت نشده","سهم صنف پرداخت نشده","سهم غیره پرداخت نشده","کل تعرفه پرداخت شده (ریال)","سهم اتحادیه از واریزی(ریال)","سهم شرکت از واریزی(ریال)","سهم اصناف از واریزی(ریال)","سهم غیره از واریزی(ریال)"]:d()==="SuperAdmin"?["ردیف","ماهیت","خریدار","نام و نام خانوادگی مالک","تلفن مالک","شهر","تعداد تخصیص بدون بار","حجم تخصیص بدون بار","وزن تخصیص بدون بار","تعداد بار","حجم بار","وزن بار","تعداد تراکنش ","تخفیف (ریال)","کل تعرفه (ریال)","سهم شرکت (ریال)","سهم اتحادیه (ریال)","سهم صنف (ریال)","کل تعرفه پرداخت نشده (ریال)"," سهم شرکت پرداخت نشده"," سهم اتحادیه پرداخت نشده","سهم صنف پرداخت نشده","کل تعرفه پرداخت شده (ریال)","سهم اتحادیه از واریزی(ریال)","سهم شرکت از واریزی(ریال)","سهم اصناف از واریزی(ریال)"]:d()==="ProvinceOperator"?["ردیف","ماهیت","خریدار","نام و نام خانوادگی مالک","تلفن مالک","شهر","تعداد تخصیص بدون بار","حجم تخصیص بدون بار","وزن تخصیص بدون بار","تعداد بار","حجم بار","وزن بار","سهم اتحادیه (ریال)"," سهم اتحادیه پرداخت نشده","سهم اتحادیه از واریزی(ریال)"]:["ردیف","ماهیت","خریدار","نام و نام خانوادگی مالک","تلفن مالک","شهر","تعداد تخصیص بدون بار","حجم تخصیص بدون بار","وزن تخصیص بدون بار","تعداد بار","حجم بار","وزن بار","تعداد تراکنش ","سهم اتحادیه (ریال)"," سهم اتحادیه پرداخت نشده","سهم اتحادیه از واریزی(ریال)"],data:t,title:"پایش تعرفه ها",customColors:[{name:"تعداد تخصیص بدون بار",color:"yellow"},{name:"حجم تخصیص بدون بار",color:"yellow"},{name:"وزن تخصیص بدون بار",color:"yellow"},{name:"تعداد بار",color:"cyan"},{name:"حجم بار",color:"cyan"},{name:"وزن بار",color:"cyan"},{name:"تعداد تراکنش ",color:"orange"},{name:"کل تعرفه (ریال)",color:"green"},{name:"سهم شرکت (ریال)",color:"green"},{name:"سهم اتحادیه (ریال)",color:"green"},{name:"سهم صنف (ریال)",color:"green"},{name:"سهم غیره (ریال)",color:"green"},{name:"کل تعرفه پرداخت شده (ریال)",color:"red"},{name:"سهم اتحادیه از واریزی(ریال)",color:"red"},{name:"سهم شرکت از واریزی(ریال)",color:"red"},{name:"سهم اصناف از واریزی(ریال)",color:"red"},{name:"سهم غیره از واریزی(ریال)",color:"red"}]})]})},Pa=()=>{const{slaughterExclusiveState:t}=ku(b=>b.slaughterSlice),[E,x]=c.useState("1"),p=(b,j)=>{x(j)},[$,g]=c.useState(),D=(b,j)=>{g(j)},[w,k]=c.useState("1"),l=(b,j)=>{k(j)};return c.useEffect(()=>{d()!=="ChainCompany"&&g("1")},[]),u.jsxs(f,{justifyContent:"center",gap:_u.SMALL,xs:12,children:[u.jsx(f,{sx:{maxWidth:{xs:"100%",md:"90vw"}},px:{xs:2,md:0},children:u.jsx(ba,{})}),d()!=="ParentCompany"&&u.jsx(f,{container:!0,alignItems:"center",justifyContent:"center",mt:2,xs:12,children:u.jsxs(Re,{scrollButtons:"auto",variant:"scrollable",allowScrollButtonsMobile:!0,value:E,onChange:p,children:[u.jsx(Q6,{label:"پرداختی ها",value:"1"}),u.jsx(Q6,{label:"اطلاعات تعرفه",value:"2"})]})}),d()!=="ParentCompany"&&u.jsxs(Ye,{value:E,children:[u.jsx(H6,{value:"3",children:u.jsx(f,{container:!0,alignItems:"center",justifyContent:"center",xs:12,children:u.jsx(Ya,{})})}),u.jsx(H6,{value:"1",children:u.jsx(f,{container:!0,alignItems:"center",justifyContent:"center",mt:2,xs:12,children:u.jsx(f,{container:!0,alignItems:"center",justifyContent:"center",xs:12,children:d()==="SuperAdmin"||d()==="AdminX"||d()==="ProvinceOperator"?u.jsxs(u.Fragment,{children:[u.jsx(f,{container:!0,alignItems:"center",justifyContent:"center",xs:12,mb:1,children:u.jsxs(ea,{size:"small",color:"primary",value:w,exclusive:!0,onChange:l,"aria-label":"Platform",children:[u.jsx(Se,{value:"1",children:"کشتارگاه"}),u.jsx(Se,{value:"2",children:"شرکت زنجیره"}),(d()==="SuperAdmin"||d()==="AdminX"||d()==="ProvinceOperator"||d()==="Guilds")&&u.jsx(Se,{value:"3",children:"تراکنش ها"})]})}),u.jsx(f,{container:!0,alignItems:"center",justifyContent:"center",xs:12,children:w==="1"?u.jsx($a,{}):w==="2"?u.jsx(Ta,{}):u.jsx(ha,{})})]}):u.jsx(u.Fragment,{children:d==="KillHouse"?u.jsx(de,{killhouseKey:"killhouse",type:"kill_house_key"}):u.jsx(de,{killhouseKey:"chain_company",type:"chain_company_key"})})})})}),u.jsx(H6,{value:"2",children:u.jsxs(f,{container:!0,alignItems:"center",justifyContent:"center",mt:2,xs:12,children:[u.jsx(f,{container:!0,alignItems:"center",justifyContent:"center",xs:12,children:(d()==="ProvinceOperator"||d()==="SuperAdmin"||d()==="AdminX"||d()==="Commerce"||d()==="KillHouse")&&u.jsxs(Re,{scrollButtons:"auto",variant:"scrollable",allowScrollButtonsMobile:!0,value:$,onChange:D,children:[u.jsx(Q6,{label:"بارهای روزانه",value:"1"}),!t&&u.jsx(Q6,{disabled:!0,label:"تخصیص روزانه",value:"2"}),u.jsx(Q6,{disabled:!0,label:"مرغ زنده",value:"3"}),(d()==="KillHouse"||d()==="SuperAdmin"||d()==="AdminX"||d()==="Commerce")&&u.jsx(Q6,{disabled:!0,label:"لاشه",value:"4"}),d()!=="KillHouse"&&d()!=="ChainCompany"&&u.jsx(Q6,{disabled:!0,label:"زنجیره",value:"5"})]})}),d()==="ChainCompany"&&u.jsx(Fe,{killhouseKey:"killhouseKey"}),u.jsxs(Ye,{value:$,children:[u.jsx(H6,{value:"1",children:d()==="SuperAdmin"||d()==="AdminX"||d()==="ProvinceOperator"||d()==="Commerce"?u.jsx(ka,{}):u.jsx(Ge,{killhouseKey:"killhouse"})}),u.jsx(H6,{value:"2",children:d()==="SuperAdmin"||d()==="AdminX"||d()==="ProvinceOperator"||d()==="Commerce"?u.jsx(Ia,{}):u.jsx(Xe,{killhouseKey:"killhouse"})}),u.jsx(H6,{value:"3",children:d()==="SuperAdmin"||d()==="AdminX"||d()==="ProvinceOperator"||d()==="Commerce"?u.jsx(ve,{type:"live_chicken"}):u.jsx(he,{killhouseKey:"live_chicken",type:"live"})}),u.jsx(H6,{value:"4",children:d()==="SuperAdmin"||d()==="AdminX"||d()==="ProvinceOperator"||d()==="Commerce"?u.jsx(ve,{type:"carcassess"}):u.jsx(he,{killhouseKey:"carcassess",type:"carcass"})}),u.jsx(H6,{value:"5",children:d()==="SuperAdmin"||d()==="AdminX"||d()==="ProvinceOperator"||d()==="Commerce"?u.jsx(_a,{}):u.jsx(Fe,{killhouseKey:"killhouseKey"})})]})]})})]})]})},fl=()=>{const t=da(),E=()=>{let x;switch(t.type){case"unpaid":x=u.jsx(Xe,{killhouseKey:t.key});break;case"kill_house_key":x=u.jsx(de,{killhouseKey:t.key,type:t.type});break;case"chain_company_key":x=u.jsx(de,{killhouseKey:t.key,type:t.type});break;case"daily_bar":x=u.jsx(Ge,{killhouseKey:t.key,type:t.type});break;case"live_chicken":x=u.jsx(he,{killhouseKey:t.key,type:"live"});break;case"carcassess":x=u.jsx(he,{killhouseKey:t.key,type:"carcass"});break;case"chain":x=u.jsx(Fe,{killhouseKey:t.key});break;default:x=u.jsx(de,{killhouseKey:t.key,type:t.type});break}return x};return u.jsx(u.Fragment,{children:u.jsx(aa,{display:"flex",justifyContent:"center",children:u.jsx(f,{container:!0,direction:"column",justifyContent:"center",xs:12,sm:12,md:10,lg:10,children:u.jsxs(f,{container:!0,justifyContent:"space-between",gap:_u.SMALL,direction:"column",children:[u.jsx(la,{}),t.type?u.jsx(u.Fragment,{children:E()}):u.jsx(f,{children:u.jsx(Pa,{})})]})})})})};export{fl as default};
|