15 lines
120 KiB
JavaScript
15 lines
120 KiB
JavaScript
import{j as u,p as ve,i as Ge,I as T6,aX as w6,ak as N,B as X,b0 as Je,an as Ze,ao as he,b4 as xe,ap as pe,T as Wu,d as I6,aL as Oe,aM as Be,aN as me,ai as N6,b2 as De,b3 as X6,bo as Re,bp as q6,bl as ua,bm as Se,b as ea}from"./mui-vendor-CkIVaoQP.js";import{B as aa}from"./BackButton-7Uc4b2uz.js";import{l as la,p as ge,q as Fe,v as H,e8 as Ye,r as ta,A as ju,t as Pe,X as d,G as f,O as ie,W as G,S as Iu,L as v6,j as K,h as U6,e9 as oa,ea as na,eb as We,ec as ze,ed as Ke,y as Z6,aj as O6,au as B6,ee as sa,Q as ra,N as ca}from"./index-Cr86_nOs.js";import{u as m6,f as Ru,a as Ue}from"./redux-vendor-B7uoacJt.js";import{R as E6}from"./ResponsiveTable-Dua7tTwQ.js";import{d as ye}from"./ToggleOffOutlined-CDtTsrd5.js";import{d as Ee}from"./ToggleOn-D04ugvmE.js";import{r as c,u as G6,j as Ca}from"./react-vendor-CmFgShSM.js";import{d as He}from"./Edit-DVocKJob.js";import{P as da,a as ga,p as Aa,b as ia,c as fa}from"./ProvinceWagePaymentTransactions-8zm-77Nq.js";import{d as ha}from"./Article-Dvfo9OYI.js";import{a as xa}from"./index-IuzvFnSU.js";import{d as pa}from"./Tune-m0V6JHJm.js";import{R as b6,a as V6}from"./index.esm-Bu7XMDZU.js";import{d as Sa}from"./ArrowDownward-1nNmlMDX.js";import{g as Ae}from"./getSystemBaseAddress-B3dWKz82.js";import{S as Ne}from"./SimpleTable-CWlU9uE0.js";import{d as ja}from"./SystemUpdateAlt-B3K4WRIU.js";import{d as Ce}from"./Visibility-DGGnwazK.js";import{P as J6}from"./PageTable-whKVbv5q.js";import"./FilterAlt-RwhTl5ac.js";import"./styled-components.browser.esm-gS9mh05b.js";import"./num2persian-BIYy8amq.js";import"./SlaughterPayFeesGateway-Y8nHlZfV.js";import"./ShowImage-Dm1ejH7Y.js";import"./Download-Br3kJHkt.js";import"./Close-C8iZ2Qr6.js";import"./resizeImage-Csf2MO3w.js";import"./toBase64-CmPKyXM7.js";import"./PublishedWithChanges-wX45M9wC.js";import"./Delete-CTUmuli-.js";import"./Search-DLgMQCPC.js";import"./iconBase-BEJYyZsk.js";const Y={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"}},we=c.forwardRef(({item:t,isPayment:y},x)=>{var p,T,g,_,E;return u.jsx("div",{ref:x,children:u.jsx("div",{style:Y.page,children:t&&u.jsxs("div",{style:Y.pageData,children:[u.jsx("img",{src:la,alt:"Logo",style:Y.logo}),u.jsx("h1",{style:Y.title,children:"رسید پرداخت"}),u.jsx("hr",{style:Y.hr}),u.jsxs("div",{style:Y.row,children:[u.jsx("div",{style:Y.label,children:"تاریخ و زمان:"}),u.jsx("div",{style:Y.value,children:`${ge(t.date)} ساعت ${Fe(t.date)}`})]}),u.jsx("hr",{style:Y.hr}),u.jsxs("div",{style:Y.row,children:[u.jsx("div",{style:Y.label,children:"پرداخت کننده:"}),u.jsx("div",{style:Y.value,children:y?(p=t==null?void 0:t.payerInfo)==null?void 0:p.fullname:t.payer})]}),!y&&u.jsxs(u.Fragment,{children:[u.jsx("hr",{style:Y.hr}),u.jsxs("div",{style:Y.row,children:[u.jsx("div",{style:Y.label,children:"تعداد سفارشات:"}),u.jsx("div",{style:Y.value,children:(T=t.information)==null?void 0:T.totalRequestNumber})]}),u.jsx("hr",{style:Y.hr}),u.jsxs("div",{style:Y.row,children:[u.jsx("div",{style:Y.label,children:"تعداد کل (قطعه):"}),u.jsx("div",{style:Y.value,children:(g=t.information)==null?void 0:g.totalQuantity})]}),u.jsx("hr",{style:Y.hr}),u.jsxs("div",{style:Y.row,children:[u.jsx("div",{style:Y.label,children:"وزن کل (کیلوگرم):"}),u.jsx("div",{style:Y.value,children:(_=t.information)==null?void 0:_.totalWeight})]})]}),u.jsx("hr",{style:Y.hr}),u.jsxs("div",{style:Y.row,children:[u.jsx("div",{style:Y.label,children:"شماره درخواست:"}),u.jsx("div",{style:Y.value,children:t.orderId})]}),u.jsx("hr",{style:Y.hr}),u.jsxs("div",{style:Y.row,children:[u.jsx("div",{style:Y.label,children:"شماره پیگیری:"}),u.jsx("div",{style:Y.value,children:t.refId})]}),u.jsx("hr",{style:Y.hr}),u.jsxs("div",{style:Y.row,children:[u.jsx("div",{style:Y.label,children:"کدسفارش:"}),u.jsx("div",{style:Y.value,children:t.orderId})]}),u.jsx("hr",{style:Y.hr}),u.jsxs("div",{style:Y.row,children:[u.jsx("div",{style:Y.label,children:"شماره کارت:"}),u.jsx("div",{style:Y.value,children:t.cardHolderPan})]}),u.jsx("hr",{style:Y.hr}),u.jsxs("div",{style:Y.row,children:[u.jsx("div",{style:Y.label,children:"مبلغ:"}),u.jsxs("div",{style:Y.value,children:[(E=t.amount)==null?void 0:E.toLocaleString()," ریال"]})]})]})})})});we.displayName="SuccessTransactionRecipt";we.propTypes={item:ve.PropTypes.object};const Fa="/assets/signature-D8sU-GQE.png",j={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"}},Le=c.forwardRef(({item:t,isUnion:y,union:x,user:p},T)=>{const g=[{title:"فروشنده",text:y?(x==null?void 0:x.unitName)||"-":"هوشمند سازان "},{title:"شناسه ملی",text:y?(x==null?void 0:x.unitNationalId)||"-":"14013838372"},{title:"شماره ثبت",text:y?(x==null?void 0:x.unitRegistrationNumber)||"-":"17514"},{title:"استان",text:y?(x==null?void 0:x.unitProvince)||"-":"البرز"},{title:"شهرستان",text:y?(x==null?void 0:x.unitCity)||"-":"کرج"},{title:"تلفن",text:y?(x==null?void 0:x.mobile)||"-":"(021)28421237"},{title:"کد پستی",text:y?(x==null?void 0:x.unitPostalCode)||"-":"3139735185"},{title:"نشانی",text:y?(x==null?void 0:x.unitAddress)||"-":"نبش بلوار سرداران"}],_=[{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:T,style:{fontFamily:"iranyekan"},children:[u.jsx("div",{style:j.documentTitle,children:u.jsx("h2",{children:"صورتحسـاب فروش کالا و خدمات"})}),u.jsxs("div",{style:j.row,children:[u.jsx("div",{style:{...j.column,backgroundColor:"#eee",width:"5%"},children:u.jsx("span",{style:{writingMode:"vertical-lr",rotate:"180deg"},children:"فروشنده"})}),u.jsx("div",{style:{...j.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((E,I)=>u.jsxs("div",{style:j.item,children:[u.jsxs("span",{style:j.itemTitle,children:[E.title,":"]}),u.jsx("span",{style:j.itemText,children:E.text})]},I))})}),u.jsx("div",{style:{...j.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 Ye).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 Ye().toLocale("fa").format("YYYY/MM/DD")})]})]})})]}),u.jsxs("div",{style:{...j.row,marginTop:"3px"},children:[u.jsx("div",{style:{...j.column,backgroundColor:"#eee",width:"5%"},children:u.jsx("span",{style:{writingMode:"vertical-lr",rotate:"180deg"},children:"خریدار"})}),u.jsx("div",{style:{...j.itemsColumn,width:"85%"},children:u.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gap:"5px",padding:"10px",width:"100%"},children:_==null?void 0:_.map((E,I)=>u.jsxs("div",{style:j.item,children:[u.jsxs("span",{style:j.itemTitle,children:[E.title,":"]}),u.jsx("span",{style:j.itemText,children:E.text})]},I))})}),u.jsx("div",{style:{display:"flex",height:"100px",marginRight:"2px",width:"10%"}})]}),u.jsx("div",{style:{...j.row,marginTop:"3px"},children:u.jsxs("table",{style:j.invoiceTable,children:[u.jsx("thead",{style:j.tableHeader,children:u.jsxs("tr",{style:j.headerRow,children:[u.jsx("th",{style:{...j.tableHeaderCell,minWidth:"30px"},children:"ردیف"}),u.jsx("th",{style:j.tableHeaderCellText,children:"شرح خدمت"}),u.jsx("th",{style:j.tableHeaderCell,children:"مبلغ واحد (ریال)"}),u.jsx("th",{style:j.tableHeaderCell,children:"جمع مالیات و عوارض ارزش افزوده (ریال)"}),u.jsx("th",{style:j.tableHeaderCell,children:"مبلغ کل (ریال)"}),u.jsx("th",{style:j.tableHeaderCell,children:"تخفیف (ریال)"}),u.jsxs("th",{style:j.tableHeaderCell,children:["جمع کل پس از تخفیف",u.jsx("br",{}),"( با احتساب مالیات و عوارض ) ریال"]})]})}),u.jsxs("tbody",{children:[y?u.jsxs(u.Fragment,{children:[u.jsxs("tr",{style:j.tableRow,children:[u.jsx("td",{style:j.tableCell,children:"1"}),u.jsxs("td",{style:j.tableCellTexts,children:["تعرفه استفاده از سامانه رصدیار",u.jsx("br",{}),"(سهم اتحادیه مرغداران گوشتی)"]}),u.jsx("td",{style:j.tableCell,children:((t==null?void 0:t.unionShare)/100*90).toLocaleString()}),u.jsx("td",{style:j.tableCell,children:((t==null?void 0:t.unionShare)/100*10).toLocaleString()}),u.jsx("td",{style:j.tableCell,children:t==null?void 0:t.unionShare.toLocaleString()}),u.jsx("td",{style:j.tableCell,children:"0"}),u.jsx("td",{style:j.tableCell,children:t==null?void 0:t.unionShare.toLocaleString()})]}),u.jsxs("tr",{style:j.tableRow,children:[u.jsx("td",{style:j.tableCell,children:"2"}),u.jsxs("td",{style:j.tableCellTexts,children:["تعرفه استفاده از سامانه رصدیار",u.jsx("br",{}),"(سهم صنف پروتئین)"]}),u.jsx("td",{style:j.tableCell,children:((t==null?void 0:t.guildsShare)/100*90).toLocaleString()}),u.jsxs("td",{style:j.tableCell,children:[" ",((t==null?void 0:t.guildsShare)/100*10).toLocaleString()]}),u.jsx("td",{style:j.tableCell,children:t==null?void 0:t.guildsShare.toLocaleString()}),u.jsx("td",{style:j.tableCell,children:"0"}),u.jsx("td",{style:j.tableCell,children:t==null?void 0:t.guildsShare.toLocaleString()})]}),u.jsxs("tr",{style:j.tableRow,children:[u.jsx("td",{style:j.tableCell,children:"3"}),u.jsxs("td",{style:j.tableCellTexts,children:["تعرفه استفاده از سامانه رصدیار",u.jsx("br",{}),"(سهم دامپزشک فارم)"]}),u.jsxs("td",{style:j.tableCell,children:[" ",((t==null?void 0:t.otherShare)/100*90).toLocaleString()]}),u.jsx("td",{style:j.tableCell,children:((t==null?void 0:t.otherShare)/100*10).toLocaleString()}),u.jsx("td",{style:j.tableCell,children:t==null?void 0:t.otherShare.toLocaleString()}),u.jsx("td",{style:j.tableCell,children:"0"}),u.jsx("td",{style:j.tableCell,children:t==null?void 0:t.otherShare.toLocaleString()})]})]}):u.jsxs("tr",{style:j.tableRow,children:[u.jsx("td",{style:j.tableCell,children:"1"}),u.jsxs("td",{style:j.tableCellTexts,children:["تعرفه استفاده از سامانه رصدیار",u.jsx("br",{}),"(سهم شرکت هوشمند سازان)"]}),u.jsx("td",{style:j.tableCell,children:((t==null?void 0:t.companyShare)/100*90).toLocaleString()}),u.jsx("td",{style:j.tableCell,children:((t==null?void 0:t.companyShare)/100*10).toLocaleString()}),u.jsx("td",{style:j.tableCell,children:t==null?void 0:t.companyShare.toLocaleString()}),u.jsx("td",{style:j.tableCell,children:"0"}),u.jsx("td",{style:j.tableCell,children:t==null?void 0:t.companyShare.toLocaleString()})]}),y?u.jsxs("tr",{style:j.tableRow,children:[u.jsx("td",{style:{...j.tableCell,backgroundColor:"#eee"},colSpan:2,children:"جمع کل"}),u.jsx("td",{style:j.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:j.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:j.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:j.tableCell,children:"0"}),u.jsxs("td",{style:j.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:j.tableRow,children:[u.jsx("td",{style:{...j.tableCell,backgroundColor:"#eee"},colSpan:2,children:"جمع کل"}),u.jsx("td",{style:j.tableCell,children:((t==null?void 0:t.companyShare)/100*90).toLocaleString()}),u.jsx("td",{style:j.tableCell,children:((t==null?void 0:t.companyShare)/100*10).toLocaleString()}),u.jsx("td",{style:j.tableCell,children:t==null?void 0:t.companyShare.toLocaleString()}),u.jsx("td",{style:j.tableCell,children:"0"}),u.jsx("td",{style:j.tableCell,children:t==null?void 0:t.companyShare.toLocaleString()})]}),u.jsx("tr",{style:{height:"120px"},children:u.jsxs("td",{style:j.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:[" ","مهر و امضای فروشنده:"]}),!y&&u.jsx("img",{src:Fa,alt:"امضا",style:{height:"90px",marginTop:"20px"}})]}),u.jsx("div",{style:{fontSize:"12px"},children:"مهر و امضای خریدار:"})]})}),u.jsx("div",{style:{width:"100%",display:"flex",justifyContent:"start"},children:y&&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)} ساعت (${Fe(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]})})]})})]})});Le.displayName="ProvincePaymentFactorFile";Le.propTypes={item:ve.PropTypes.object};var be={},ya=Ge;Object.defineProperty(be,"__esModule",{value:!0});var Ve=be.default=void 0,Ea=ya(ta()),wa=u;Ve=be.default=(0,Ea.default)((0,wa.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:y})=>{var Ku,Hu,qu,k6,_6,M6,D6,R6,Y6,P6;const[,,x,p,T,g]=c.useContext(ju),_=m6();c.useEffect(()=>{const q=H(new Date).format("YYYY-MM-DD");p(q),g(q)},[]);const E=q=>{D(q.target.value)},[I,l]=c.useState([]),[b,w]=c.useState(0),[P,v]=c.useState(10),[M,D]=c.useState(""),[$,k]=c.useState(1),[e,z]=c.useState([]),[W,V]=c.useState(!1),C=async q=>{_(v6());const F=await K.get(`internal-transactions/?search=filter&value=${M}&page=${q}&page_size=${P}&type=paid&${y}=${t}&role=${d()}${W?`&date1=${x}&date2=${T}`:""}`);_(U6()),l(F.data.results),w(F.data.count)},S=q=>{C(q),k(q)},n=q=>{v(q),k(1)},s=()=>{C($!==0?$:1)},[r,A]=c.useState(),h=c.useRef(),L=Pe.useReactToPrint({content:()=>h.current,documentTitle:"گزارش پرونده "}),U=q=>{A(q,L())},[J,ku]=c.useState(),Fu=c.useRef(),_u=Pe.useReactToPrint({content:()=>Fu.current,documentTitle:"فاکتور پرداخت",pageStyle:`
|
||
@page {
|
||
size: landscape;
|
||
margin: 0;
|
||
dir: rtl;
|
||
margin: 20px;
|
||
}
|
||
body {
|
||
-webkit-print-color-adjust: exact;
|
||
}
|
||
`}),Mu=q=>{ku(q),setTimeout(()=>{_u()},1)},Du=({item:q})=>{const[F,Yu]=c.useState(null),L6=$6=>{Yu($6.currentTarget)},Pu=()=>{Yu(null)},vu=!!F,W6=vu?`paid-fee-actions-${q==null?void 0:q.key}`:void 0,Q6=()=>{Pu(),U(q)},z6=$6=>{Pu(),Mu({item:q,isUnion:$6})};return u.jsxs("div",{children:[u.jsx(T6,{"aria-describedby":W6,color:"primary",onClick:L6,size:"small",children:u.jsx(pa,{fontSize:"small"})}),u.jsx(Je,{anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},id:W6,open:vu,anchorEl:F,onClose:Pu,children:u.jsxs(Ze,{sx:{p:1},children:[u.jsx(he,{disablePadding:!0,children:u.jsxs(xe,{sx:{color:"error.main"},onClick:Q6,children:[u.jsx(pe,{sx:{minWidth:36,color:"inherit"},children:u.jsx(xa,{fontSize:"small"})}),u.jsx(Wu,{variant:"body2",color:"inherit",children:"چاپ رسید"})]})}),u.jsx(he,{disablePadding:!0,children:u.jsxs(xe,{sx:{color:"primary.main"},onClick:()=>z6(!0),children:[u.jsx(pe,{sx:{minWidth:36,color:"inherit"},children:u.jsx(ha,{fontSize:"small"})}),u.jsx(Wu,{variant:"body2",color:"inherit",children:"فاکتور اتحادیه"})]})}),u.jsx(he,{disablePadding:!0,children:u.jsxs(xe,{sx:{color:"success.main"},onClick:()=>z6(!1),children:[u.jsx(pe,{sx:{minWidth:36,color:"inherit"},children:u.jsx(Ve,{fontSize:"small"})}),u.jsx(Wu,{variant:"body2",color:"inherit",children:"فاکتور سامانه"})]})})]})})]})};c.useEffect(()=>{const q=I==null?void 0:I.map((F,Yu)=>{var L6,Pu,vu;return[$===1?Yu+1:Yu+P*($-1)+1,`${ge(F.date)} ساعت (${Fe(F.date)})`,d()==="SuperAdmin"?u.jsxs(f,{container:!0,xs:12,alignItems:"center",children:[(F==null?void 0:F.transactionType)==="wage-gateway-auto"?"آنلاین":(F==null?void 0:F.transactionType)==="correspondence"?"مکاتبات":"دستی",u.jsx(T6,{"aria-label":"delete",color:"primary",onClick:()=>{_(ie({title:"ویرایش نوع پرداخت",content:u.jsx(da,{fetchApiData:s,item:F})}))},children:u.jsx(He,{})})]}):(F==null?void 0:F.transactionType)==="wage-gateway-auto"?"آنلاین":(F==null?void 0:F.transactionType)==="correspondence"?"مکاتبات":"دستی",`${(L6=F==null?void 0:F.payerInfo)==null?void 0:L6.fullname} (${(Pu=F==null?void 0:F.payerInfo)==null?void 0:Pu.mobile})`,F==null?void 0:F.orderId,F==null?void 0:F.refId,F==null?void 0:F.orderId,F==null?void 0:F.cardHolderPan,(vu=F==null?void 0:F.transactionAmount)==null?void 0:vu.toLocaleString(),d()==="SuperAdmin"?u.jsxs(f,{container:!0,xs:12,alignItems:"center",children:[F!=null&&F.description?F==null?void 0:F.description:"-"," ",u.jsx(T6,{"aria-label":"delete",color:"primary",onClick:()=>{_(ie({title:"ویرایش توضیحات",content:u.jsx(ga,{fetchApiData:s,item:F})}))},children:u.jsx(He,{})})]}):F!=null&&F.description?F==null?void 0:F.description:"-",u.jsx(Du,{item:F},(F==null?void 0:F.key)??Yu)]});z(q)},[I]),c.useEffect(()=>{C(1)},[_,x,T,P]);const zu=async q=>{q.preventDefault(),_(v6());try{const F=await K.get(`internal-transactions/?search=filter&value=${M}&page=${$}&page_size=${P}&type=paid&${y}=${t}&role=${d()}${W?`&date1=${x}&date2=${T}`:""}`);l(F.data.results),w(F.data.count),_(U6())}catch(F){console.error("Error fetching data:",F)}};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(we,{ref:h,item:r,isPayment:!0}),u.jsx(Le,{ref:Fu,item:J==null?void 0:J.item,user:(qu=(Hu=(Ku=J==null?void 0:J.item)==null?void 0:Ku.killHouse)==null?void 0:Hu.killHouseOperator)==null?void 0:qu.user,union:(k6=J==null?void 0:J.item)==null?void 0:k6.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(w6,{icon:u.jsx(ye,{}),checkedIcon:u.jsx(Ee,{}),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:T,onChange:q=>{g(H(q).format("YYYY-MM-DD"))}})})]}),u.jsx(f,{container:!0,alignItems:"center",gap:Iu.SMALL,children:u.jsxs("form",{onSubmit:zu,children:[u.jsx(N,{id:"outlined-basic",size:"small",autoComplete:"off",label:"جستجو",variant:"outlined",style:{width:250},onChange:E}),u.jsx(X,{type:"submit",onClick:zu,endIcon:u.jsx(b6,{}),children:"جستجو"})]})})]}),u.jsx(E6,{data:e,columns:["ردیف","تاریخ پرداخت","نوع پرداخت","نام پرداخت کننده","شماره درخواست","شماره پیگیری","کدسفارش","شماره کارت","مبلغ تراکنش (ریال)","توضیحات","عملیات"],handlePageChange:S,totalRows:b,page:$,perPage:P,handlePerRowsChange:n,title:`
|
||
تعرفه های پرداخت شده
|
||
${(M6=(_6=I[0])==null?void 0:_6.provinceRequest)!=null&&M6.killHouseUserFullName?`${(R6=(D6=I[0])==null?void 0:D6.provinceRequest)!=null&&R6.killer?"کشتارکن":"کشتارگاه"} ${(P6=(Y6=I[0])==null?void 0:Y6.provinceRequest)==null?void 0:P6.killHouseUserFullName}`:""}
|
||
`})]})},La=()=>{var n,s,r,A,h,L,U,J,ku,Fu,_u,Mu,Du,zu,Ku,Hu,qu,k6,_6,M6,D6,R6,Y6,P6,q,F,Yu,L6,Pu,vu,W6,Q6,z6,$6,u0,e0,a0,l0,t0,o0,n0,s0,r0,c0,C0,d0,g0,A0,i0,f0,h0,x0,p0,S0,j0,F0,y0,E0,w0,L0,b0,$0,T0,I0,k0,_0,M0,D0,R0,Y0,P0,W0,z0,K0,H0,q0,v0,U0;const t=m6(),[y,x]=c.useState(),[p,T]=c.useState([]),[g,_]=c.useState(),{provincePaymentKillersOfKillhouses:E}=Ru(R=>R.provinceSlice),I=Ru(R=>R.userSlice.userPath),[l]=c.useContext(ju),b=Ru(R=>R.userSlice.userProfile.key),[w,P]=c.useState(!1),v=G6(),[,,M,D,$,k]=c.useContext(ju);c.useEffect(()=>{const R=H(new Date).format("YYYY-MM-DD");D(R),k(R)},[]),c.useEffect(()=>{d()==="KillHouse"&&t(oa())},[]);const{provincePaymentByWeightOverview:e}=Ru(R=>R.provinceSlice);c.useEffect(()=>{var i,pu;const R=(pu=(i=e==null?void 0:e.wageInfo)==null?void 0:i.shares)==null?void 0:pu.map((o,au)=>{var lu,tu,ou,nu,su,ru,cu,Cu;return[au+1,o==null?void 0:o.name,(lu=o==null?void 0:o.outProvincePoultryRequestWage)==null?void 0:lu.toLocaleString(),(tu=o==null?void 0:o.provinceKillRequestWage)==null?void 0:tu.toLocaleString(),(ou=o==null?void 0:o.freeSellCarcassesWage)==null?void 0:ou.toLocaleString(),(nu=o==null?void 0:o.freeBuyingCarcassesWage)==null?void 0:nu.toLocaleString(),(su=o==null?void 0:o.freeBuyingLiveWage)==null?void 0:su.toLocaleString(),(ru=parseInt(Math.floor((o==null?void 0:o.totalWage)/1e3)*1e3))==null?void 0:ru.toLocaleString(),(cu=parseInt(Math.floor((o==null?void 0:o.totalPaidWage)/1e3)*1e3))==null?void 0:cu.toLocaleString(),(Cu=parseInt(Math.floor((o==null?void 0:o.totalUnpaidWage)/1e3)*1e3))==null?void 0:Cu.toLocaleString()]});T(R)},[e]),c.useEffect(()=>{t(na({date1:w?M:null,date2:w?$:null,role:d()}))},[t,M,$,w]),c.useEffect(()=>{if(e){const R=E==null?void 0:E.map((i,pu)=>{var o,au,lu,tu,ou,nu,su,ru,cu,Cu,Uu,Nu,Vu,Qu,Xu,Gu,Ju,Zu,Ou,Bu,mu,u6,e6,a6,l6,t6,o6,n6,s6,r6,c6,C6,Q,yu,d6,g6,A6,i6,f6,h6,x6,p6,a,Su,Z,O,B,m,uu,eu,du,gu,Au,iu,fu,hu,xu;return((o=e==null?void 0:e.wageInfo)==null?void 0:o.wageCountingType)==="live"?[i==null?void 0:i.name,(lu=Math.ceil((au=i==null?void 0:i.wageInfo)==null?void 0:au.totalWage))==null?void 0:lu.toLocaleString(),(ou=Math.ceil((tu=i==null?void 0:i.wageInfo)==null?void 0:tu.totalPaidWage))==null?void 0:ou.toLocaleString(),(su=Math.ceil((nu=i==null?void 0:i.wageInfo)==null?void 0:nu.off))==null?void 0:su.toLocaleString(),(cu=Math.ceil((ru=i==null?void 0:i.wageInfo)==null?void 0:ru.totalUnpaidWage))==null?void 0:cu.toLocaleString(),u.jsx("a",{href:`${window.location.origin}/pay/${Ae(I)}/${(Cu=i==null?void 0:i.wageInfo)==null?void 0:Cu.userToken}`,style:{color:"blue"},target:"_blank",rel:"noreferrer",children:`${window.location.origin}/pay/${Ae(I)}/${(Uu=i==null?void 0:i.wageInfo)==null?void 0:Uu.userToken}`},pu),(Vu=Math.ceil((Nu=i==null?void 0:i.wageInfo)==null?void 0:Nu.totalProvinceLiveWeight))==null?void 0:Vu.toLocaleString(),(Xu=Math.ceil((Qu=i==null?void 0:i.wageInfo)==null?void 0:Qu.provinceKillRequestsTotalWage))==null?void 0:Xu.toLocaleString(),(Ju=Math.ceil((Gu=i==null?void 0:i.wageInfo)==null?void 0:Gu.freeBarsOutProvinceCarcasesTotalWeight))==null?void 0:Ju.toLocaleString(),(Ou=Math.ceil((Zu=i==null?void 0:i.wageInfo)==null?void 0:Zu.freeBarsOutProvinceCarcasesTotalWage))==null?void 0:Ou.toLocaleString(),(mu=Math.ceil((Bu=i==null?void 0:i.wageInfo)==null?void 0:Bu.freeBarsCarcasesTotalWeight))==null?void 0:mu.toLocaleString(),(e6=Math.ceil((u6=i==null?void 0:i.wageInfo)==null?void 0:u6.freeBarsCarcasesTotalWage))==null?void 0:e6.toLocaleString(),(l6=Math.ceil((a6=i==null?void 0:i.wageInfo)==null?void 0:a6.freeBarsLiveTotalWeight))==null?void 0:l6.toLocaleString(),(o6=Math.ceil((t6=i==null?void 0:i.wageInfo)==null?void 0:t6.freeBarsLiveTotalWage))==null?void 0:o6.toLocaleString()]:[i==null?void 0:i.name,(s6=Math.ceil((n6=i==null?void 0:i.wageInfo)==null?void 0:n6.totalWage))==null?void 0:s6.toLocaleString(),(c6=Math.ceil((r6=i==null?void 0:i.wageInfo)==null?void 0:r6.totalPaidWage))==null?void 0:c6.toLocaleString(),(Q=Math.ceil((C6=i==null?void 0:i.wageInfo)==null?void 0:C6.off))==null?void 0:Q.toLocaleString(),(d6=Math.ceil((yu=i==null?void 0:i.wageInfo)==null?void 0:yu.totalUnpaidWage))==null?void 0:d6.toLocaleString(),u.jsx("a",{href:`${window.location.origin}/pay/${Ae(I)}/${(g6=i==null?void 0:i.wageInfo)==null?void 0:g6.userToken}`,style:{color:"blue"},target:"_blank",rel:"noreferrer",children:`${window.location.origin}/pay/${Ae(I)}/${(A6=i==null?void 0:i.wageInfo)==null?void 0:A6.userToken}`},pu),(f6=Math.ceil((i6=i==null?void 0:i.wageInfo)==null?void 0:i6.totalProvinceLiveWeight))==null?void 0:f6.toLocaleString(),(x6=Math.ceil((h6=i==null?void 0:i.wageInfo)==null?void 0:h6.totalProvinceCarcassesWeight))==null?void 0:x6.toLocaleString(),(a=Math.ceil((p6=i==null?void 0:i.wageInfo)==null?void 0:p6.provinceKillRequestsTotalWeight))==null?void 0:a.toLocaleString(),(Z=Math.ceil((Su=i==null?void 0:i.wageInfo)==null?void 0:Su.provinceKillRequestsTotalWage))==null?void 0:Z.toLocaleString(),(B=Math.ceil((O=i==null?void 0:i.wageInfo)==null?void 0:O.freeBarsOutProvinceCarcasesTotalWeight))==null?void 0:B.toLocaleString(),(uu=Math.ceil((m=i==null?void 0:i.wageInfo)==null?void 0:m.freeBarsOutProvinceCarcasesTotalWage))==null?void 0:uu.toLocaleString(),(du=Math.ceil((eu=i==null?void 0:i.wageInfo)==null?void 0:eu.freeBarsCarcasesTotalWeight))==null?void 0:du.toLocaleString(),(Au=Math.ceil((gu=i==null?void 0:i.wageInfo)==null?void 0:gu.freeBarsCarcasesTotalWage))==null?void 0:Au.toLocaleString(),(fu=Math.ceil((iu=i==null?void 0:i.wageInfo)==null?void 0:iu.freeBarsLiveTotalWeight))==null?void 0:fu.toLocaleString(),(xu=Math.ceil((hu=i==null?void 0:i.wageInfo)==null?void 0:hu.freeBarsLiveTotalWage))==null?void 0:xu.toLocaleString()]});x(R)}},[E,e]);const z=(R,i)=>{const pu=R==null?void 0:R.map((o,au)=>{var lu,tu,ou,nu,su,ru,cu,Cu;return[au+1,o==null?void 0:o.name,(lu=o==null?void 0:o.provinceKillRequestWage)==null?void 0:lu.toLocaleString(),(tu=o==null?void 0:o.returnProvinceKillRequestWage)==null?void 0:tu.toLocaleString(),(ou=o==null?void 0:o.freeSellCarcassesWage)==null?void 0:ou.toLocaleString(),(nu=o==null?void 0:o.freeBuyingCarcassesWage)==null?void 0:nu.toLocaleString(),(su=o==null?void 0:o.freeBuyingLiveWage)==null?void 0:su.toLocaleString(),(ru=parseInt(Math.floor((o==null?void 0:o.totalWage)/1e3)*1e3))==null?void 0:ru.toLocaleString(),(cu=parseInt(Math.floor((o==null?void 0:o.totalPaidWage)/1e3)*1e3))==null?void 0:cu.toLocaleString(),(Cu=parseInt(Math.floor((o==null?void 0:o.totalUnpaidWage)/1e3)*1e3))==null?void 0:Cu.toLocaleString()]});return u.jsx(T6,{size:"small",color:"success",onClick:()=>{var o;t(ie({title:"سهم بندی تعرفه کشتارگاه "+i,size:1e3,content:u.jsx(f,{container:!0,xs:12,justifyContent:"center",children:u.jsx(Ne,{data:pu,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(Aa({date1:w?M:null,date2:w?$:null})).then(R=>{var pu;const i=(pu=R.payload.data)==null?void 0:pu.map((o,au)=>{var lu,tu,ou,nu,su,ru,cu,Cu,Uu,Nu,Vu,Qu,Xu,Gu,Ju,Zu,Ou,Bu,mu,u6,e6,a6,l6,t6,o6,n6,s6,r6,c6,C6,Q,yu,d6,g6,A6,i6,f6,h6,x6,p6,a,Su,Z,O,B,m,uu,eu,du,gu,Au,iu,fu,hu,xu,Eu,wu,Lu,bu,$u,Tu;return((lu=e==null?void 0:e.wageInfo)==null?void 0:lu.wageCountingType)==="live"?[au+1,o==null?void 0:o.name,(ou=Math.ceil((tu=o==null?void 0:o.wageInfo)==null?void 0:tu.totalWage))==null?void 0:ou.toLocaleString(),z(o==null?void 0:o.shares,o==null?void 0:o.name),(su=Math.ceil((nu=o==null?void 0:o.wageInfo)==null?void 0:nu.totalPaidWage))==null?void 0:su.toLocaleString(),(cu=Math.ceil((ru=o==null?void 0:o.wageInfo)==null?void 0:ru.off))==null?void 0:cu.toLocaleString(),(Uu=Math.ceil((Cu=o==null?void 0:o.wageInfo)==null?void 0:Cu.totalUnpaidWage))==null?void 0:Uu.toLocaleString(),(Vu=Math.ceil((Nu=o==null?void 0:o.wageInfo)==null?void 0:Nu.totalProvinceLiveWeight))==null?void 0:Vu.toLocaleString(),(Xu=Math.ceil((Qu=o==null?void 0:o.wageInfo)==null?void 0:Qu.provinceKillRequestsTotalWage))==null?void 0:Xu.toLocaleString(),(Ju=Math.ceil((Gu=o==null?void 0:o.wageInfo)==null?void 0:Gu.freeBarsOutProvinceCarcasesTotalWeight))==null?void 0:Ju.toLocaleString(),(Ou=Math.ceil((Zu=o==null?void 0:o.wageInfo)==null?void 0:Zu.freeBarsOutProvinceCarcasesTotalWage))==null?void 0:Ou.toLocaleString(),(mu=Math.ceil((Bu=o==null?void 0:o.wageInfo)==null?void 0:Bu.freeBarsCarcasesTotalWeight))==null?void 0:mu.toLocaleString(),(e6=Math.ceil((u6=o==null?void 0:o.wageInfo)==null?void 0:u6.freeBarsCarcasesTotalWage))==null?void 0:e6.toLocaleString(),(l6=Math.ceil((a6=o==null?void 0:o.wageInfo)==null?void 0:a6.freeBarsLiveTotalWeight))==null?void 0:l6.toLocaleString(),(o6=Math.ceil((t6=o==null?void 0:o.wageInfo)==null?void 0:t6.freeBarsLiveTotalWage))==null?void 0:o6.toLocaleString(),(s6=Math.ceil((n6=o==null?void 0:o.wageInfo)==null?void 0:n6.returnTotalProvinceLiveWeight))==null?void 0:s6.toLocaleString(),(c6=Math.ceil((r6=o==null?void 0:o.wageInfo)==null?void 0:r6.totalReturnPureProvinceCarcassesPrice))==null?void 0:c6.toLocaleString(),u.jsx(T6,{size:"small",color:"success",onClick:()=>{v(d()==="ProvinceOperator"?We+"/"+(o==null?void 0:o.key):d()==="SuperAdmin"?ze+"/"+(o==null?void 0:o.key):Ke+"/"+(o==null?void 0:o.key))},children:u.jsx(Ce,{fontSize:"small"})},au)]:[au+1,o==null?void 0:o.name,(Q=Math.ceil((C6=o==null?void 0:o.wageInfo)==null?void 0:C6.totalWage))==null?void 0:Q.toLocaleString(),z(o==null?void 0:o.shares,o==null?void 0:o.name),(d6=Math.ceil((yu=o==null?void 0:o.wageInfo)==null?void 0:yu.totalPaidWage))==null?void 0:d6.toLocaleString(),(A6=Math.ceil((g6=o==null?void 0:o.wageInfo)==null?void 0:g6.off))==null?void 0:A6.toLocaleString(),(f6=Math.ceil((i6=o==null?void 0:o.wageInfo)==null?void 0:i6.totalUnpaidWage))==null?void 0:f6.toLocaleString(),(x6=Math.ceil((h6=o==null?void 0:o.wageInfo)==null?void 0:h6.totalProvinceLiveWeight))==null?void 0:x6.toLocaleString(),(a=Math.ceil((p6=o==null?void 0:o.wageInfo)==null?void 0:p6.totalProvinceCarcassesWeight))==null?void 0:a.toLocaleString(),(Z=Math.ceil((Su=o==null?void 0:o.wageInfo)==null?void 0:Su.provinceKillRequestsTotalWeight))==null?void 0:Z.toLocaleString(),(B=Math.ceil((O=o==null?void 0:o.wageInfo)==null?void 0:O.provinceKillRequestsTotalWage))==null?void 0:B.toLocaleString(),(uu=Math.ceil((m=o==null?void 0:o.wageInfo)==null?void 0:m.freeBarsOutProvinceCarcasesTotalWeight))==null?void 0:uu.toLocaleString(),(du=Math.ceil((eu=o==null?void 0:o.wageInfo)==null?void 0:eu.freeBarsOutProvinceCarcasesTotalWage))==null?void 0:du.toLocaleString(),(Au=Math.ceil((gu=o==null?void 0:o.wageInfo)==null?void 0:gu.freeBarsCarcasesTotalWeight))==null?void 0:Au.toLocaleString(),(fu=Math.ceil((iu=o==null?void 0:o.wageInfo)==null?void 0:iu.freeBarsCarcasesTotalWage))==null?void 0:fu.toLocaleString(),(xu=Math.ceil((hu=o==null?void 0:o.wageInfo)==null?void 0:hu.freeBarsLiveTotalWeight))==null?void 0:xu.toLocaleString(),(wu=Math.ceil((Eu=o==null?void 0:o.wageInfo)==null?void 0:Eu.freeBarsLiveTotalWage))==null?void 0:wu.toLocaleString(),(bu=Math.ceil((Lu=o==null?void 0:o.wageInfo)==null?void 0:Lu.returnTotalProvinceLiveWeight))==null?void 0:bu.toLocaleString(),(Tu=Math.ceil(($u=o==null?void 0:o.wageInfo)==null?void 0:$u.totalReturnPureProvinceCarcassesPrice))==null?void 0:Tu.toLocaleString(),u.jsx(T6,{size:"small",color:"success",onClick:()=>{v(d()==="ProvinceOperator"?We+"/"+(o==null?void 0:o.key):d()==="SuperAdmin"?ze+"/"+(o==null?void 0:o.key):Ke+"/"+(o==null?void 0:o.key))},children:u.jsx(Ce,{fontSize:"small"})},au)]});_(i)})},[t,e,M,$,w]);const W=()=>{var R;return((R=e==null?void 0:e.wageInfo)==null?void 0:R.wageCountingType)==="live"?["وزن کل فروش زنده به خارج استان","تعرفه کل فروش به خارج استان (ریال)","کل وزن زنده کشتار داخل استان (کیلوگرم)","تعرفه کشتار داخل استان (ریال)","وزن توزیع لاشه به خارج استان (کیلوگرم)","تعرفه توزیع لاشه خارج استان (ریال)","وزن لاشه ورودی به استان (کیلوگرم)","تعرفه لاشه ورودی به استان (ریال)","وزن مرغ زنده ورودی به استان (کیلوگرم)","تعرفه مرغ زنده ورودی به استان (ریال)","وزن خریدهای بازگشتی (کیلوگرم)","تعرفه خریدهای بازگشتی (ریال)"]:["وزن کل فروش زنده به خارج استان","تعرفه کل فروش به خارج استان (ریال)","کل وزن زنده کشتار داخل استان (کیلوگرم)","وزن لاشه کشتار داخل استان (کیلوگرم)","وزن توزیع لاشه داخل استان (کیلوگرم)","تعرفه توزیع لاشه داخل استان (ریال)","وزن توزیع لاشه به خارج استان (کیلوگرم)","تعرفه توزیع لاشه خارج استان (ریال)","وزن لاشه ورودی به استان (کیلوگرم)","تعرفه لاشه ورودی به استان (ریال)","وزن مرغ زنده ورودی به استان (کیلوگرم)","تعرفه مرغ زنده ورودی به استان (ریال)","وزن خریدهای بازگشتی (کیلوگرم)","تعرفه خریدهای بازگشتی (ریال)"]},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,i,pu,o,au,lu,tu,ou,nu,su,ru,cu,Cu,Uu,Nu,Vu,Qu,Xu,Gu,Ju,Zu,Ou,Bu,mu,u6,e6,a6,l6,t6,o6,n6,s6,r6,c6,C6,Q,yu,d6,g6,A6,i6,f6,h6,x6,p6,a,Su,Z,O,B,m,uu,eu;return((R=e==null?void 0:e.wageInfo)==null?void 0:R.wageCountingType)==="live"?[[(pu=Math.ceil((i=e==null?void 0:e.wageInfo)==null?void 0:i.totalWage))==null?void 0:pu.toLocaleString(),(au=Math.ceil((o=e==null?void 0:e.wageInfo)==null?void 0:o.totalPaidWage))==null?void 0:au.toLocaleString(),(tu=Math.ceil((lu=e==null?void 0:e.wageInfo)==null?void 0:lu.off))==null?void 0:tu.toLocaleString(),(nu=Math.ceil((ou=e==null?void 0:e.wageInfo)==null?void 0:ou.totalUnpaidWage))==null?void 0:nu.toLocaleString(),(ru=Math.ceil((su=e==null?void 0:e.wageInfo)==null?void 0:su.totalProvinceLiveWeight))==null?void 0:ru.toLocaleString(),(Cu=Math.ceil((cu=e==null?void 0:e.wageInfo)==null?void 0:cu.provinceKillRequestsTotalWage))==null?void 0:Cu.toLocaleString(),(Nu=Math.ceil((Uu=e==null?void 0:e.wageInfo)==null?void 0:Uu.freeBarsOutProvinceCarcasesTotalWeight))==null?void 0:Nu.toLocaleString(),(Qu=Math.ceil((Vu=e==null?void 0:e.wageInfo)==null?void 0:Vu.freeBarsOutProvinceCarcasesTotalWage))==null?void 0:Qu.toLocaleString(),(Gu=Math.ceil((Xu=e==null?void 0:e.wageInfo)==null?void 0:Xu.freeBarsCarcasesTotalWeight))==null?void 0:Gu.toLocaleString(),(Zu=Math.ceil((Ju=e==null?void 0:e.wageInfo)==null?void 0:Ju.freeBarsCarcasesTotalWage))==null?void 0:Zu.toLocaleString(),(Bu=Math.ceil((Ou=e==null?void 0:e.wageInfo)==null?void 0:Ou.freeBarsLiveTotalWeight))==null?void 0:Bu.toLocaleString(),(u6=Math.ceil((mu=e==null?void 0:e.wageInfo)==null?void 0:mu.freeBarsLiveTotalWage))==null?void 0:u6.toLocaleString()]]:[[(a6=Math.ceil((e6=e==null?void 0:e.wageInfo)==null?void 0:e6.totalWage))==null?void 0:a6.toLocaleString(),(t6=Math.ceil((l6=e==null?void 0:e.wageInfo)==null?void 0:l6.totalPaidWage))==null?void 0:t6.toLocaleString(),(n6=Math.ceil((o6=e==null?void 0:e.wageInfo)==null?void 0:o6.off))==null?void 0:n6.toLocaleString(),(r6=Math.ceil((s6=e==null?void 0:e.wageInfo)==null?void 0:s6.totalUnpaidWage))==null?void 0:r6.toLocaleString(),(C6=Math.ceil((c6=e==null?void 0:e.wageInfo)==null?void 0:c6.totalProvinceLiveWeight))==null?void 0:C6.toLocaleString(),(yu=Math.ceil((Q=e==null?void 0:e.wageInfo)==null?void 0:Q.totalProvinceCarcassesWeight))==null?void 0:yu.toLocaleString(),(g6=Math.ceil((d6=e==null?void 0:e.wageInfo)==null?void 0:d6.provinceKillRequestsTotalWeight))==null?void 0:g6.toLocaleString(),(i6=Math.ceil((A6=e==null?void 0:e.wageInfo)==null?void 0:A6.provinceKillRequestsTotalWage))==null?void 0:i6.toLocaleString(),(h6=Math.ceil((f6=e==null?void 0:e.wageInfo)==null?void 0:f6.freeBarsOutProvinceCarcasesTotalWeight))==null?void 0:h6.toLocaleString(),(p6=Math.ceil((x6=e==null?void 0:e.wageInfo)==null?void 0:x6.freeBarsOutProvinceCarcasesTotalWage))==null?void 0:p6.toLocaleString(),(Su=Math.ceil((a=e==null?void 0:e.wageInfo)==null?void 0:a.freeBarsCarcasesTotalWeight))==null?void 0:Su.toLocaleString(),(O=Math.ceil((Z=e==null?void 0:e.wageInfo)==null?void 0:Z.freeBarsCarcasesTotalWage))==null?void 0:O.toLocaleString(),(m=Math.ceil((B=e==null?void 0:e.wageInfo)==null?void 0:B.freeBarsLiveTotalWeight))==null?void 0:m.toLocaleString(),(eu=Math.ceil((uu=e==null?void 0:e.wageInfo)==null?void 0:uu.freeBarsLiveTotalWage))==null?void 0:eu.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(w6,{icon:u.jsx(ye,{}),checkedIcon:u.jsx(Ee,{}),checked:w,onChange:()=>P(!w),color:"primary",size:"large"}),u.jsx(f,{sx:{width:{xs:"39%",sm:"auto"}},children:u.jsx(G,{disabled:!w,label:"از تاریخ",id:"date",renderInput:R=>u.jsx(N,{size:"small",sx:{width:{xs:"100%",md:"160px"}},...R}),value:M,onChange:R=>{D(H(R).format("YYYY-MM-DD"))}})}),u.jsx(f,{sx:{width:{xs:"39%",sm:"auto"}},children:u.jsx(G,{disabled:!w,label:"تا تاریخ",id:"date",renderInput:R=>u.jsx(N,{size:"small",sx:{width:{xs:"100%",md:"160px"}},...R}),value:$,onChange:R=>{k(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(ie({title:"پرداخت تعرفه",content:u.jsx(ia,{})}))},children:"پرداخت تعرفه"})})}),u.jsx(E6,{operation:u.jsx(f,{children:(d()==="AdminX"||d()==="ProvinceOperator"||d()==="SuperAdmin")&&u.jsx(I6,{title:"خروجی اکسل",placement:"top",children:u.jsx(T6,{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=${$}&key=${b}&role=${d()}`;window.location.href=R},children:u.jsx(ja,{})})})}),isDashboard:!0,noPagination:!0,title:"اطلاعات کلی تعرفه",columns:["کل تعرفه (ریال)","کل تعرفه پرداخت شده (ریال)","تخفیف (ریال)","کل تعرفه پرداخت نشده (ریال)"],data:[[(s=Math.ceil((n=e==null?void 0:e.wageInfo)==null?void 0:n.totalWage))==null?void 0:s.toLocaleString(),(A=Math.ceil((r=e==null?void 0:e.wageInfo)==null?void 0:r.totalPaidWage))==null?void 0:A.toLocaleString(),(L=Math.ceil((h=e==null?void 0:e.wageInfo)==null?void 0:h.off))==null?void 0:L.toLocaleString(),(J=Math.ceil((U=e==null?void 0:e.wageInfo)==null?void 0:U.totalUnpaidWage))==null?void 0:J.toLocaleString()]]}),d()!=="KillHouse"&&u.jsx(E6,{noPagination:!0,title:"جزئیات کلی تعرفه",columns:W(),data:((ku=e==null?void 0:e.wageInfo)==null?void 0:ku.wageCountingType)==="live"?[[(_u=Math.ceil((Fu=e==null?void 0:e.wageInfo)==null?void 0:Fu.outProvincePoultryRequestWeight))==null?void 0:_u.toLocaleString(),(Du=Math.ceil((Mu=e==null?void 0:e.wageInfo)==null?void 0:Mu.outProvincePoultryRequestWage))==null?void 0:Du.toLocaleString(),(Ku=Math.ceil((zu=e==null?void 0:e.wageInfo)==null?void 0:zu.totalProvinceLiveWeight))==null?void 0:Ku.toLocaleString(),(qu=Math.ceil((Hu=e==null?void 0:e.wageInfo)==null?void 0:Hu.provinceKillRequestsTotalWage))==null?void 0:qu.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(),(q=Math.ceil((P6=e==null?void 0:e.wageInfo)==null?void 0:P6.freeBarsCarcasesTotalWage))==null?void 0:q.toLocaleString(),(Yu=Math.ceil((F=e==null?void 0:e.wageInfo)==null?void 0:F.freeBarsLiveTotalWeight))==null?void 0:Yu.toLocaleString(),(Pu=Math.ceil((L6=e==null?void 0:e.wageInfo)==null?void 0:L6.freeBarsLiveTotalWage))==null?void 0:Pu.toLocaleString(),(W6=Math.ceil((vu=e==null?void 0:e.wageInfo)==null?void 0:vu.returnTotalProvinceLiveWeight))==null?void 0:W6.toLocaleString(),(z6=Math.ceil((Q6=e==null?void 0:e.wageInfo)==null?void 0:Q6.totalReturnPureProvinceCarcassesPrice))==null?void 0:z6.toLocaleString()]]:[[(u0=Math.ceil(($6=e==null?void 0:e.wageInfo)==null?void 0:$6.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(),(j0=Math.ceil((S0=e==null?void 0:e.wageInfo)==null?void 0:S0.freeBarsLiveTotalWeight))==null?void 0:j0.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(E6,{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(E6,{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(E6,{noPagination:d()==="KillHouse",paginated:d()!=="KillHouse",title:"جزئیات",columns:d()==="KillHouse"?V():C(),data:d()==="KillHouse"?S():g})}),d()==="KillHouse"&&u.jsxs(Oe,{style:{width:"100%",marginTop:"20px"},children:[u.jsx(Be,{expandIcon:u.jsx(Sa,{}),"aria-controls":"panel1-content",id:"panel1-header",children:u.jsx(Wu,{variant:"body1",style:{color:"gray"},children:"کشتارکن ها"})}),u.jsx(me,{children:u.jsx(f,{container:!0,justifyContent:"center",xs:12,mt:1,children:u.jsx(E6,{paginated:!0,columns:((U0=e==null?void 0:e.wageInfo)==null?void 0:U0.wageCountingType)==="live"?["نام کشتارکن","کل تعرفه (ریال)","کل تعرفه پرداخت شده (ریال)","تخفیف (ریال)","کل تعرفه پرداخت نشده (ریال)","لینک پرداخت","کل وزن زنده کشتار داخل استان (کیلوگرم)","تعرفه کشتار داخل استان (ریال)","وزن توزیع لاشه به خارج استان (کیلوگرم)","تعرفه توزیع لاشه خارج استان (ریال)","وزن لاشه ورودی به استان (کیلوگرم)","تعرفه لاشه ورودی به استان (ریال)","وزن مرغ زنده ورودی به استان (کیلوگرم)","تعرفه مرغ زنده ورودی به استان (ریال)"]:["نام کشتارکن","کل تعرفه (ریال)","کل تعرفه پرداخت شده (ریال)","تخفیف (ریال)","کل تعرفه پرداخت نشده (ریال)","لینک پرداخت","کل وزن زنده کشتار داخل استان (کیلوگرم)","وزن لاشه کشتار داخل استان (کیلوگرم)","وزن توزیع لاشه داخل استان (کیلوگرم)","تعرفه توزیع لاشه داخل استان (ریال)","وزن توزیع لاشه به خارج استان (کیلوگرم)","تعرفه توزیع لاشه خارج استان (ریال)","وزن لاشه ورودی به استان (کیلوگرم)","تعرفه لاشه ورودی به استان (ریال)","وزن مرغ زنده ورودی به استان (کیلوگرم)","تعرفه مرغ زنده ورودی به استان (ریال)"],data:y})})})]})]})},ba=()=>{const t=G6(),[y,x]=c.useState([]),[p,T]=c.useState(0),[g,_]=c.useState(10),[E,I]=c.useState(!1),l=Ru(r=>r.userSlice.userProfile.key),[b,w]=c.useState(""),[P,v]=c.useState([]),[M,D]=c.useState(1),$=m6(),k=r=>{w(r.target.value)},[,,e,z,W,V]=c.useContext(ju);c.useEffect(()=>{const r=H(new Date).format("YYYY-MM-DD");z(r),V(r)},[]);const C=async r=>{let A;$(v6()),A=await K.get(`kill_house_total_transactions_wage/?search=filter&value=${b}&type=paid&page=${r}&role=${d()}&page_size=${g}${E?`&date1=${e}&date2=${W}`:""}`),$(U6()),x(A.data.results),T(A.data.count)},S=r=>{C(r),D(r)},n=r=>{_(r),D(1)};c.useEffect(()=>{C(1)},[]);const s=async r=>{r.preventDefault(),$(v6());try{const A=await K.get(`kill_house_total_transactions_wage/?search=filter&value=${b}&role=${d()}&type=paid${E?`&date1=${e}&date2=${W}`:""}`);x(A.data.results),T(A.data.count),$(U6())}catch(A){console.error("Error fetching data:",A)}};return c.useEffect(()=>{C(1)},[e,W,E]),c.useEffect(()=>{const r=y==null?void 0:y.map((A,h)=>{var L,U,J,ku,Fu,_u,Mu,Du;return[M===1?h+1:h+g*(M-1)+1,`${(L=A==null?void 0:A.info)!=null&&L.killer?"کشتارکن":"کشتارگاه"} ${(U=A==null?void 0:A.info)==null?void 0:U.killHouseName} - ${(J=A==null?void 0:A.info)==null?void 0:J.killHouseFullname} (${(ku=A==null?void 0:A.info)==null?void 0:ku.killHouseMobile})`,`${(Fu=A==null?void 0:A.info)==null?void 0:Fu.killHouseCity}`,(_u=A==null?void 0:A.info)==null?void 0:_u.totalPaidCount,(Du=(Mu=A==null?void 0:A.info)==null?void 0:Mu.totalPaidWage)==null?void 0:Du.toLocaleString(),u.jsx(T6,{size:"small",color:"success",onClick:()=>{t(d()==="ProvinceOperator"?`${Z6}/kill_house_key/${A.key}`:d()==="SuperAdmin"?`${O6}/kill_house_key/${A.key}`:d()==="AdminX"?`${B6}/kill_house_key/${A.key}`:d()==="Commerce"?`${sa}/kill_house_key/${A.key}`:"-")},children:u.jsx(Ce,{fontSize:"small"})},h)]});v(r)},[y]),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:Iu.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(w6,{checked:E,onChange:()=>I(!E),color:"primary"})})}),u.jsx(f,{children:u.jsx(G,{disabled:!E,label:"از تاریخ",id:"date",renderInput:r=>u.jsx(N,{size:"small",style:{width:"160px"},...r}),value:e,onChange:r=>{z(H(r).format("YYYY-MM-DD"))}})}),u.jsx(f,{children:u.jsx(G,{disabled:!E,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:k}),u.jsx(X,{type:"submit",onClick:s,endIcon:u.jsx(b6,{}),children:"جستجو"})]}),u.jsx(I6,{title:"خروجی اکسل",children:u.jsx("a",{href:`${K.defaults.baseURL}kill_house_total_transactions_wage_payid_excel/?key=${l}&search=filter&value=${b}${E?`&date1=${e}&date2=${W}`:""}&role=${d()}`,rel:"noreferrer",children:u.jsx(X,{color:"success",children:u.jsx(V6,{size:32})})})})]})}),u.jsx(E6,{data:P,columns:["ردیف","خریدار","شهر","تعداد تراکنش","مبلغ (﷼)","جزییات سفارش"],handlePageChange:S,totalRows:p,page:M,perPage:g,handlePerRowsChange:n,title:"پرداختی های کشتارگاه ها"})]})},$a=()=>{const t=Ru(n=>n.userSlice.authToken),y=G6(),[x,p]=c.useState([]),[T,g]=c.useState(!1),[_,E]=c.useState(0),[I,l]=c.useState(10),[b,w]=c.useState(!1),[P,v]=c.useState(""),M=n=>{v(n.target.value)},[,,D,$,k,e]=c.useContext(ju);c.useEffect(()=>{const n=H(new Date).format("YYYY-MM-DD");$(n),e(n)},[]);const z=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=${I}${b?`&date1=${D}&date2=${k}`:""}`);p(r.data.results),E(r.data.count),g(!1)},W=n=>{z(n,P)},V=async(n,s)=>{g(!0);const r=await K.get(`chain-company-total-transactions/?search=filter&value=${P}&type=paid&page=${s}&role=${d()}&page_size=${n}${b?`&date1=${D}&date2=${k}`:""}`);p(r.data.results),E(r.data.count),l(n),g(!1)};c.useEffect(()=>{z(1)},[]);const C=async n=>{n.preventDefault(),g(!0);try{const s=await K.get(`chain-company-total-transactions/?search=filter&value=${P}&role=${d()}&type=paid${b?`&date1=${D}&date2=${k}`:""}`);p(s.data.results),E(s.data.count)}catch(s){console.error("Error fetching data:",s)}finally{g(!1)}};c.useEffect(()=>{z(1)},[D,k,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:()=>{y(d()==="ProvinceOperator"?`${Z6}/chain_company_key/${n.key}`:d()==="SuperAdmin"?`${O6}/chain_company_key/${n.key}`:d()==="AdminX"?`${B6}/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(J6,{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:Iu.SMALL,children:[u.jsx(Wu,{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(w6,{checked:b,onChange:()=>w(!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:D,onChange:n=>{$(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:k,onChange:n=>{e(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:M}),u.jsx(X,{type:"submit",onClick:C,endIcon:u.jsx(b6,{}),children:"جستجو"})]}),u.jsx(I6,{title:"خروجی اکسل",children:u.jsx("a",{href:`${K.defaults.baseURL}chain-company-total-transactions_not_payid_excel/?token=${t}${P}${b?`&date1=${D}&date2=${k}`:""}`,rel:"noreferrer",children:u.jsx(X,{color:"success",children:u.jsx(V6,{size:32})})})})]})}),columns:S,data:x,progressPending:T,pagination:!0,paginationServer:!0,paginationTotalRows:_,onChangeRowsPerPage:V,onChangePage:W})})},Ta=()=>{const t=Ru(n=>n.userSlice.authToken),y=G6(),[x,p]=c.useState([]),[T,g]=c.useState(!1),[_,E]=c.useState(0),[I,l]=c.useState(10),[b,w]=c.useState(!1),[P,v]=c.useState(""),M=n=>{v(n.target.value)},[,,D,$,k,e]=c.useContext(ju);c.useEffect(()=>{const n=H(new Date).format("YYYY-MM-DD");$(n),e(n)},[]);const z=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=${I}${b?`&date1=${D}&date2=${k}`:""}`);p(r.data.results),E(r.data.count),g(!1)},W=n=>{z(n,P)},V=async(n,s)=>{g(!0);const r=await K.get(`kill_house_total_wage/?search=filter&value=${P}&type=unpaid&page=${s}&role=${d()}&page_size=${n}${b?`&date1=${D}&date2=${k}`:""}`);p(r.data.results),E(r.data.count),l(n),g(!1)};c.useEffect(()=>{z(1)},[]);const C=async n=>{n.preventDefault(),g(!0);try{const s=await K.get(`kill_house_total_wage/?search=filter&value=${P}&type=unpaid${b?`&date1=${D}&date2=${k}`:""}`);p(s.data.results),E(s.data.count)}catch(s){console.error("Error fetching data:",s)}finally{g(!1)}};c.useEffect(()=>{z(1)},[D,k,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:()=>{y(`${d()==="SuperAdmin"?O6:d()==="AdminX"?B6:Z6}/unpaid/${n.key}`)},children:"مشاهده"}),sortable:!0,wrap:!0,allowOverflow:!0,center:!0}];return u.jsx(f,{container:!0,justifyContent:"end",children:u.jsx(J6,{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:Iu.SMALL,children:[u.jsx(Wu,{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(w6,{checked:b,onChange:()=>w(!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:D,onChange:n=>{$(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:k,onChange:n=>{e(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:M}),u.jsx(X,{type:"submit",onClick:C,endIcon:u.jsx(b6,{}),children:"جستجو"})]}),u.jsx(I6,{title:"خروجی اکسل",children:u.jsx("a",{href:`${K.defaults.baseURL}kill_house_total_wage_excel/?token=${t}${P}${b?`&date1=${D}&date2=${k}`:""}`,rel:"noreferrer",children:u.jsx(X,{color:"success",children:u.jsx(V6,{size:32})})})})]})}),columns:S,data:x,progressPending:T,pagination:!0,paginationServer:!0,paginationTotalRows:_,onChangeRowsPerPage:V,onChangePage:W})})},Ia=()=>{const t=Ru(r=>r.userSlice.authToken),[,,y,x,p,T]=c.useContext(ju),g=m6();c.useEffect(()=>{const r=H(new Date).format("YYYY-MM-DD");x(r),T(r)},[]);const _=G6(),E=r=>{k(r.target.value)},[I,l]=c.useState(!1),[b,w]=c.useState([]),[P,v]=c.useState(0),[M,D]=c.useState(10),[$,k]=c.useState(""),[e,z]=c.useState(1),[W,V]=c.useState([]),C=async r=>{let A;g(v6()),A=await K.get(`kill-house-request-total-wage/?search=filter&value=${$}&page=${r}&role=${d()}&page_size=${M}${I?`&date1=${y}&date2=${p}`:""}`),g(U6()),w(A.data.results),v(A.data.count)},S=r=>{C(r),z(r)},n=r=>{D(r),z(1)};c.useEffect(()=>{const r=b==null?void 0:b.map((A,h)=>{var U,J,ku,Fu,_u,Mu,Du,zu,Ku,Hu,qu;const L=(U=A==null?void 0:A.info)!=null&&U.killer?"کشتارکن":"کشتارگاه";return[e===1?h+1:h+M*(e-1)+1,`${L} ${(J=A==null?void 0:A.info)==null?void 0:J.killHouseName} - ${(ku=A==null?void 0:A.info)==null?void 0:ku.killHouseFullname} (${(Fu=A==null?void 0:A.info)==null?void 0:Fu.killHouseMobile})`,(_u=A==null?void 0:A.info)==null?void 0:_u.killHouseCity,(Du=(Mu=A==null?void 0:A.info)==null?void 0:Mu.totalCount)==null?void 0:Du.toLocaleString(),(Ku=(zu=A.info)==null?void 0:zu.totalQuantity)==null?void 0:Ku.toLocaleString(),(qu=(Hu=A.info)==null?void 0:Hu.totalWeight)==null?void 0:qu.toLocaleString(),u.jsx(T6,{size:"small",color:"success",onClick:()=>{_(`${d()==="SuperAdmin"?O6:d()==="AdminX"?B6:Z6}/daily_bar/${A.key}`)},children:u.jsx(Ce,{fontSize:"small"})},h)]});V(r)},[b]),c.useEffect(()=>{C(1)},[g,y,p,M]);const s=async r=>{r.preventDefault(),g(v6());try{const A=await K.get(`kill-house-request-total-wage/?search=filter&value=${$}${I?`&date1=${y}&date2=${p}`:""}`);w(A.data.results),v(A.data.count),g(U6())}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(w6,{checked:I,onChange:()=>l(!I),color:"primary"})})}),u.jsx(f,{children:u.jsx(G,{disabled:!I,label:"از تاریخ",id:"date",renderInput:r=>u.jsx(N,{size:"small",style:{width:"160px"},...r}),value:y,onChange:r=>{x(H(r).format("YYYY-MM-DD"))}})}),u.jsx(f,{children:u.jsx(G,{disabled:!I,label:"تا تاریخ",id:"date",renderInput:r=>u.jsx(N,{size:"small",style:{width:"160px"},...r}),value:p,onChange:r=>{T(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:E}),u.jsx(X,{type:"submit",onClick:s,endIcon:u.jsx(b6,{}),children:"جستجو"})]})}),u.jsx(I6,{title:"خروجی اکسل",children:u.jsx("a",{href:`${K.defaults.baseURL}kill_house_total_wage_excel/?token=${t}${$}${I?`&date1=${y}&date2=${p}`:""}`,rel:"noreferrer",children:u.jsx(X,{color:"success",children:u.jsx(V6,{size:32})})})})]}),u.jsx(E6,{data:W,columns:["ردیف","خریدار","شهر","تعداد پرونده","حجم","وزن سفارشات (کیلوگرم)","جزییات سفارش"],handlePageChange:S,totalRows:P,page:e,perPage:M,handlePerRowsChange:n,title:"بارهای روزانه"})]})},qe=({type:t})=>{const y=Ru(s=>s.userSlice.authToken),x=G6(),[p,T]=c.useState([]),[g,_]=c.useState(!1),[E,I]=c.useState(0),[l,b]=c.useState(10),[w,P]=c.useState(!1),[v,M]=c.useState(""),D=s=>{M(s.target.value)},[,,$,k,e,z]=c.useContext(ju);c.useEffect(()=>{const s=H(new Date).format("YYYY-MM-DD");k(s),z(s)},[]);const W=async(s,r)=>{_(!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}${w?`&date1=${$}&date2=${e}`:""}`);T(A.data.results),I(A.data.count),_(!1)},V=s=>{W(s,v)},C=async(s,r)=>{_(!0);const A=await K.get(`kill_house_free_bar_total_wage/?search=filter&value=${v}&type=${t==="live_chicken"?"live":"carcass"}&page=${r}&role=${d()}&page_size=${s}${w?`&date1=${$}&date2=${e}`:""}`);T(A.data.results),I(A.data.count),b(s),_(!1)};c.useEffect(()=>{W(1)},[]);const S=async s=>{s.preventDefault(),_(!0);try{const r=await K.get(`kill_house_free_bar_total_wage/?search=filter&value=${v}&type=${t==="live_chicken"?"live":"carcass"}${w?`&date1=${$}&date2=${e}`:""}`);T(r.data.results),I(r.data.count)}catch(r){console.error("Error fetching data:",r)}finally{_(!1)}};c.useEffect(()=>{W(1)},[$,e,w]);const n=[{name:"خریدار",selector:s=>{var A,h,L,U;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} (${(U=s==null?void 0:s.info)==null?void 0:U.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"?O6:d()==="AdminX"?B6:Z6}/${t}/${s.key}`)},children:"مشاهده"}),sortable:!0,wrap:!0,allowOverflow:!0,center:!0}];return u.jsx(f,{container:!0,justifyContent:"end",children:u.jsx(J6,{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:Iu.SMALL,children:[u.jsxs(Wu,{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(w6,{checked:w,onChange:()=>P(!w),color:"primary"})})}),u.jsx(f,{children:u.jsx(G,{disabled:!w,label:"از تاریخ",id:"date",renderInput:s=>u.jsx(N,{size:"small",style:{width:"160px"},...s}),value:$,onChange:s=>{k(H(s).format("YYYY-MM-DD"))}})}),u.jsx(f,{children:u.jsx(G,{disabled:!w,label:"تا تاریخ",id:"date",renderInput:s=>u.jsx(N,{size:"small",style:{width:"160px"},...s}),value:e,onChange:s=>{z(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:D}),u.jsx(X,{type:"submit",onClick:S,endIcon:u.jsx(b6,{}),children:"جستجو"})]}),u.jsx(I6,{title:"خروجی اکسل",children:u.jsx("a",{href:`${K.defaults.baseURL}kill_house_total_wage_excel/?token=${y}${v}${w?`&date1=${$}&date2=${e}`:""}`,rel:"noreferrer",children:u.jsx(X,{color:"success",children:u.jsx(V6,{size:32})})})})]})}),columns:n,data:p,progressPending:g,pagination:!0,paginationServer:!0,paginationTotalRows:E,onChangeRowsPerPage:C,onChangePage:V})})},ka=()=>{const t=Ru(n=>n.userSlice.authToken),y=G6(),[x,p]=c.useState([]),[T,g]=c.useState(!1),[_,E]=c.useState(0),[I,l]=c.useState(10),[b,w]=c.useState(!1),[P,v]=c.useState(""),M=n=>{v(n.target.value)},[,,D,$,k,e]=c.useContext(ju);c.useEffect(()=>{const n=H(new Date).format("YYYY-MM-DD");$(n),e(n)},[]);const z=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=${I}${b?`&date1=${D}&date2=${k}`:""}`);p(r.data.results),E(r.data.count),g(!1)},W=n=>{z(n,P)},V=async(n,s)=>{g(!0);const r=await K.get(`chain-company-total-allocations/?search=filter&value=${P}&type=live&page=${s}&role=${d()}&page_size=${n}${b?`&date1=${D}&date2=${k}`:""}`);p(r.data.results),E(r.data.count),l(n),g(!1)};c.useEffect(()=>{z(1)},[]);const C=async n=>{n.preventDefault(),g(!0);try{const s=await K.get(`chain-company-total-allocations/?search=filter&value=${P}&type=live${b?`&date1=${D}&date2=${k}`:""}`);p(s.data.results),E(s.data.count)}catch(s){console.error("Error fetching data:",s)}finally{g(!1)}};c.useEffect(()=>{z(1)},[D,k,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:()=>{y(`${d()==="SuperAdmin"?O6:d()==="AdminX"?B6:Z6}/chain/${n.key}`)},children:"مشاهده"}),sortable:!0,wrap:!0,allowOverflow:!0,center:!0}];return u.jsx(f,{container:!0,justifyContent:"end",children:u.jsx(J6,{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:Iu.SMALL,children:[u.jsx(Wu,{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(w6,{checked:b,onChange:()=>w(!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:D,onChange:n=>{$(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:k,onChange:n=>{e(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:M}),u.jsx(X,{type:"submit",onClick:C,endIcon:u.jsx(b6,{}),children:"جستجو"})]}),u.jsx(I6,{title:"خروجی اکسل",children:u.jsx("a",{href:`${K.defaults.baseURL}kill_house_total_wage_excel/?token=${t}${P}${b?`&date1=${D}&date2=${k}`:""}`,rel:"noreferrer",children:u.jsx(X,{color:"success",children:u.jsx(V6,{size:32})})})})]})}),columns:S,data:x,progressPending:T,pagination:!0,paginationServer:!0,paginationTotalRows:_,onChangeRowsPerPage:V,onChangePage:W})})},_a=({item:t})=>{const[y,x]=c.useState([]);return c.useEffect(()=>{var T;const p=(T=t==null?void 0:t.killHouseRequests)==null?void 0:T.map(g=>{var I,l,b,w,P,v,M,D,$,k,e,z,W,V,C,S,n,s,r,A,h,L;const _=(b=(l=(I=g==null?void 0:g.vetFarm)==null?void 0:I.vet)==null?void 0:l.user)!=null&&b.fullname?((v=(P=(w=g==null?void 0:g.vetFarm)==null?void 0:w.vet)==null?void 0:P.user)==null?void 0:v.fullname)+`(${($=(D=(M=g==null?void 0:g.vetFarm)==null?void 0:M.vet)==null?void 0:D.user)==null?void 0:$.mobile})`:"فاقد دامپزشک";let E="";return g.vetState==="accepted"?E="تایید تخلیه":g.vetState==="pending"&&(E="در انتظار تخلیه"),[g.barCode,`${(k=g.killhouseUser)==null?void 0:k.name} (${(W=(z=(e=g.killhouseUser)==null?void 0:e.killHouseOperator)==null?void 0:z.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})`,_,g!=null&&g.clearanceCode?g==null?void 0:g.clearanceCode:"-",g.killPlace,g.poultryRequest.poultry.address.city.name,g!=null&&g.poultryRequest.sendDate?ra(new Date(g==null?void 0:g.poultryRequest.sendDate),"yyyy/MM/dd"):"-",g==null?void 0:g.poultryRequest.orderCode,E]});x(p)},[t]),u.jsx(Ne,{columns:["کدبار","خریدار","ماشین","راننده","کدبهداشتی حمل و نقل","نژاد","تعداد","وزن بار","میانگین وزن","مرغدار","دامپزشک فارم","کدرهگیری سامانه قرنطینه","محل کشتار","شهر","تاریخ کشتار","کدسفارش کشتار","وضعیت"],data:y})},Qe=({killhouseKey:t})=>{var n,s,r,A;const[,,y,x,p,T]=c.useContext(ju),[g,_]=c.useState(!1);c.useEffect(()=>{const h=H(new Date).format("YYYY-MM-DD");x(h),T(h)},[]);const E=m6(),[I,l]=c.useState([]),[b,w]=c.useState(!1),[P,v]=c.useState(0),[M,D]=c.useState(10),[$,k]=c.useState(""),e=h=>{k(h.target.value)},z=async(h,L)=>{w(!0);const U=await K.get(`province_wage/?search=filter&value=${L}&page=${h}&page_size=${M}&type=unpaid&kill_house_key=${t}&role=${d()}${g?`&date1=${y}&date2=${p}`:""}`);l(U.data.results),v(U.data.count),w(!1)},W=h=>{z(h,$)},V=async(h,L)=>{w(!0);const U=await K.get(`province_wage/?search=filter&value=${$}&page=${L}&page_size=${h}&type=unpaid&kill_house_key=${t}&role=${d()}${g?`&date1=${y}&date2=${p}`:""}`);l(U.data.results),v(U.data.count),D(h),w(!1)};c.useEffect(()=>{z(1)},[]),c.useEffect(()=>{z(1)},[y,p,g]);const C=async h=>{h.preventDefault(),w(!0);try{const L=await K.get(`province_wage/?search=filter&value=${$}&type=unpaid&kill_house_key=${t}&role=${d()}&date1=${y}&date2=${p}`);l(L.data.results),v(L.data.count)}catch(L){console.error("Error fetching data:",L)}finally{w(!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,U;return`${(L=h==null?void 0:h.provinceRequest)==null?void 0:L.poultryFullname} (${(U=h==null?void 0:h.provinceRequest)==null?void 0:U.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,U;return(U=(L=h==null?void 0:h.provinceRequest)==null?void 0:L.provinceKillRequestQuantity)==null?void 0:U.toLocaleString()},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"وزن (کیلوگرم)",selector:h=>{var L,U;return(U=(L=h==null?void 0:h.provinceRequest)==null?void 0:L.provinceKillRequestTotalWeight)==null?void 0:U.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,U;return(U=(L=h==null?void 0:h.provinceRequest)==null?void 0:L.wage)==null?void 0:U.toLocaleString()},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"مبلغ تعرفه (ریال)",selector:h=>{var L,U;return(U=(L=h==null?void 0:h.provinceRequest)==null?void 0:L.totalAmount)==null?void 0:U.toLocaleString()},sortable:!0,wrap:!0,allowOverflow:!0,center:!0},{name:"جزییات سفارش",selector:h=>u.jsx(X,{onClick:()=>{E(ca({top:!0,title:"جزییات سفارش",content:u.jsx(_a,{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:Iu.SMALL,children:u.jsx(J6,{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(Wu,{children:["تعرفه های پرداخت نشده"," ",((s=(n=I[0])==null?void 0:n.provinceRequest)==null?void 0:s.killHouseUserFullName)&&` ${(A=(r=I[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(w6,{checked:g,onChange:()=>_(!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:y,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=>{T(H(h).format("YYYY-MM-DD"))}})})]}),u.jsx(f,{container:!0,alignItems:"center",gap:Iu.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:e}),u.jsx(X,{type:"submit",onClick:C,children:"جستجو"})]})})]})}),columns:S,data:I,progressPending:b,pagination:!0,paginationServer:!0,paginationTotalRows:P,onChangeRowsPerPage:V,onChangePage:W})})})},Xe=({killhouseKey:t,type:y})=>{const[,,x,p,T,g]=c.useContext(ju),[_]=c.useContext(ju),E=Ru(S=>S.userSlice.userProfile.key);c.useEffect(()=>{const S=H(new Date).format("YYYY-MM-DD");p(S),g(S)},[]);const[I,l]=c.useState([]),[b,w]=c.useState(!1),[P,v]=c.useState(0),[M,D]=c.useState(10),[$,k]=c.useState(!1),[e,z]=c.useState(""),W=S=>{z(S.target.value)},V=async(S,n)=>{w(!0);const s=await K.get(`kill_house_request_bar_management_wage/?search=filter&value=${n}&page=${S}&page_size=${M}&type=paid&kill_house_key=${t}&role=${d()}&date1=${x}&date2=${T}`);l(s.data.results),v(s.data.count),w(!1)};c.useEffect(()=>{V(1)},[]),c.useEffect(()=>{V(1)},[x,T,M,$]);const C=async S=>{S.preventDefault(),w(!0);try{const n=await K.get(`kill_house_request_bar_management_wage/?search=filter&value=${e}&type=paid&kill_house_key=${t}&role=${d()}&date1=${x}&date2=${T}`);l(n.data.results),v(n.data.count)}catch(n){console.error("Error fetching data:",n)}finally{w(!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(Wu,{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(w6,{icon:u.jsx(ye,{}),checkedIcon:u.jsx(Ee,{}),checked:$,onChange:()=>k(!$),color:"primary",size:"large"}),u.jsx(f,{children:u.jsx(G,{disabled:!$,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:!$,label:"تا تاریخ",id:"date",renderInput:S=>u.jsx(N,{size:"small",style:{width:"160px"},...S}),value:T,onChange:S=>{g(H(S).format("YYYY-MM-DD"))}})})]}),u.jsx(f,{container:!0,alignItems:"center",gap:Iu.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(b6,{}),children:"جستجو"})]})}),u.jsx(I6,{title:"خروجی اکسل",children:u.jsx(X,{color:"success",onClick:()=>{_({vertical:"top",horizontal:"center",msg:"فایل اکسل در حال دانلود می باشد، این علمیات ممکن است زمان بر باشد لطفا صبر کنید.",severity:"success"});const S=`${K.defaults.baseURL}kill_house_total_wage_excel_new/?date1=${x}&date2=${T}&role=KillHouse&search=filter&value=${e}&key=${E}`;window.location.href=S},children:u.jsx(V6,{size:32})})})]}),!1]})},fe=({killhouseKey:t,type:y})=>{const[,,x,p,T,g]=c.useContext(ju);c.useEffect(()=>{const C=H(new Date).format("YYYY-MM-DD");p(C),g(C)},[]);const[_,E]=c.useState([]),[I,l]=c.useState(!1),[b,w]=c.useState(0),[P,v]=c.useState(10),[M,D]=c.useState(""),$=C=>{D(C.target.value)},k=async(C,S)=>{l(!0);const n=await K.get(`kill_house_free_bar_wage_total/?search=filter&value=${S}&page=${C}&page_size=${P}&kill_house_key=${t}&role=${d()}&date1=${x}&date2=${T}&type=${y}`);E(n.data.results),w(n.data.count),l(!1)},e=C=>{k(C,M)},z=async(C,S)=>{l(!0);const n=await K.get(`kill_house_free_bar_wage_total/?search=filter&value=${M}&page=${S}&page_size=${C}&kill_house_key=${t}&role=${d()}&date1=${x}&date2=${T}&type=${y}`);E(n.data.results),w(n.data.count),v(C),l(!1)};c.useEffect(()=>{k(1)},[]),c.useEffect(()=>{k(1)},[x,T,P]);const W=async C=>{C.preventDefault(),l(!0);try{const S=await K.get(`kill_house_free_bar_wage_total/?search=filter&value=${M}&kill_house_key=${t}&role=${d()}&date1=${x}&date2=${T}&type=${y}`);E(S.data.results),w(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=>y==="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=>y==="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(J6,{title:u.jsxs(f,{container:!0,alignItems:"center",justifyContent:"space-between",gap:2,paddingTop:2,mb:1,width:"100%",children:[u.jsxs(Wu,{children:["بارهای ",y==="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:T,onChange:C=>{g(H(C).format("YYYY-MM-DD"))}})}),u.jsx(f,{container:!0,alignItems:"center",gap:Iu.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:$}),u.jsx(X,{type:"submit",onClick:W,endIcon:u.jsx(b6,{}),children:"جستجو"})]})})]}),columns:V,data:_,progressPending:I,pagination:!0,paginationServer:!0,paginationTotalRows:b,onChangeRowsPerPage:z,onChangePage:e})})},je=({killhouseKey:t,type:y})=>{const[,,x,p,T,g]=c.useContext(ju);c.useEffect(()=>{const C=H(new Date).format("YYYY-MM-DD");p(C),g(C)},[]);const[_,E]=c.useState([]),[I,l]=c.useState(!1),[b,w]=c.useState(0),[P,v]=c.useState(10),[M,D]=c.useState(""),$=C=>{D(C.target.value)},k=async(C,S)=>{l(!0);const n=await K.get(`chain-allocation-total-wage/?search=filter&value=${S}&page=${C}&page_size=${P}&type=paid&chain_company_key=${t}&role=${d()}&date1=${x}&date2=${T}`);E(n.data.results),w(n.data.count),l(!1)},e=C=>{k(C,M)},z=async(C,S)=>{l(!0);const n=await K.get(`chain-allocation-total-wage/?search=filter&value=${M}&page=${S}&page_size=${C}&type=paid&chain_company_key=${t}&role=${d()}&date1=${x}&date2=${T}`);E(n.data.results),w(n.data.count),v(C),l(!1)};c.useEffect(()=>{k(1)},[]),c.useEffect(()=>{k(1)},[x,T,P]);const W=async C=>{C.preventDefault(),l(!0);try{const S=await K.get(`chain-allocation-total-wage/?search=filter&value=${M}&type=paid&chain_company_key=${t}&role=${d()}&date1=${x}&date2=${T}`);E(S.data.results),w(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(J6,{title:u.jsxs(f,{container:!0,alignItems:"center",justifyContent:"space-between",gap:2,paddingTop:2,mb:1,width:"100%",children:[u.jsx(Wu,{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:T,onChange:C=>{g(H(C).format("YYYY-MM-DD"))}})}),u.jsx(f,{container:!0,alignItems:"center",gap:Iu.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:$}),u.jsx(X,{type:"submit",onClick:W,endIcon:u.jsx(b6,{}),children:"جستجو"})]})})]}),columns:V,data:_,progressPending:I,pagination:!0,paginationServer:!0,paginationTotalRows:b,onChangeRowsPerPage:z,onChangePage:e})})},Ma=Ue("PROVINCE_PAYMENT_GET_KILLHOUSES",async(t,{dispatch:y})=>{try{y(v6());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 y(U6()),{data:x,status:p}}catch(x){return y(U6()),{error:x.response.data}}}),Da=Ue("PROVINCE_GET_PAYMENT_DASHBOARD",async(t,{dispatch:y})=>{try{y(v6());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}}}),Ra=()=>{var v,M,D,$,k,e,z,W,V,C,S,n,s,r,A,h,L,U,J,ku,Fu,_u,Mu,Du,zu,Ku,Hu,qu,k6,_6,M6,D6,R6,Y6,P6,q,F,Yu,L6,Pu,vu,W6,Q6,z6,$6,u0,e0,a0,l0,t0,o0,n0,s0,r0,c0,C0,d0,g0,A0,i0,f0,h0,x0,p0,S0,j0,F0,y0,E0,w0,L0,b0,$0,T0,I0,k0,_0,M0,D0,R0,Y0,P0,W0,z0,K0,H0,q0,v0,U0,R,i,pu,o,au,lu,tu,ou,nu,su,ru,cu,Cu,Uu,Nu,Vu,Qu,Xu,Gu,Ju,Zu,Ou,Bu,mu,u6,e6,a6,l6,t6,o6,n6,s6,r6,c6,C6;const[t,y]=c.useState([]),x=m6(),[p,T]=c.useState(!1),[,,g,_,E,I]=c.useContext(ju);c.useEffect(()=>{const Q=H(new Date).format("YYYY-MM-DD");_(Q),I(Q)},[]);const[l,b]=c.useState([]);c.useEffect(()=>{x(Da({selectedDate1:g,selectedDate2:E,withDate:p})).then(Q=>{b(Q.payload.data)})},[g,E,p]);const w=()=>{x(Ma({selectedDate1:g,selectedDate2:E,withDate:p})).then(Q=>{var d6,g6,A6,i6,f6,h6,x6,p6;let yu=[];switch(d()){case"AdminX":yu=(g6=(d6=Q.payload)==null?void 0:d6.data)==null?void 0:g6.map((a,Su)=>{var Z,O,B,m,uu,eu,du,gu,Au,iu,fu,hu,xu,Eu,wu,Lu,bu,$u,Tu,S6,j6,F6,y6,K6,H6,N0,V0,Q0,X0,G0,J0,Z0,O0,B0,m0,ue,ee,ae,le,te,oe,ne,se,re,ce,$e,Te,Ie,ke,_e,Me;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,(du=(eu=a==null?void 0:a.info)==null?void 0:eu.lenProvinceKillRequests)==null?void 0:du.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=(Eu=a==null?void 0:a.info)==null?void 0:Eu.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=(S6=a==null?void 0:a.info)==null?void 0:S6.off)==null?void 0:j6.toLocaleString(),(y6=(F6=a==null?void 0:a.info)==null?void 0:F6.totalWage)==null?void 0:y6.toLocaleString(),(H6=(K6=a==null?void 0:a.info)==null?void 0:K6.companyTotalWage)==null?void 0:H6.toLocaleString(),(V0=(N0=a==null?void 0:a.info)==null?void 0:N0.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(),(Te=($e=a==null?void 0:a.info)==null?void 0:$e.companyTotalPaidWage)==null?void 0:Te.toLocaleString(),(ke=(Ie=a==null?void 0:a.info)==null?void 0:Ie.guildsTotalPaidWage)==null?void 0:ke.toLocaleString(),(Me=(_e=a==null?void 0:a.info)==null?void 0:_e.otherTotalPaidWage)==null?void 0:Me.toLocaleString()]});break;case"SuperAdmin":yu=(i6=(A6=Q.payload)==null?void 0:A6.data)==null?void 0:i6.map((a,Su)=>{var Z,O,B,m,uu,eu,du,gu,Au,iu,fu,hu,xu,Eu,wu,Lu,bu,$u,Tu,S6,j6,F6,y6,K6,H6,N0,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,(du=(eu=a==null?void 0:a.info)==null?void 0:eu.lenProvinceKillRequests)==null?void 0:du.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=(Eu=a==null?void 0:a.info)==null?void 0:Eu.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=(S6=a==null?void 0:a.info)==null?void 0:S6.off)==null?void 0:j6.toLocaleString(),(y6=(F6=a==null?void 0:a.info)==null?void 0:F6.totalWage)==null?void 0:y6.toLocaleString(),(H6=(K6=a==null?void 0:a.info)==null?void 0:K6.companyTotalWage)==null?void 0:H6.toLocaleString(),(V0=(N0=a==null?void 0:a.info)==null?void 0:N0.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":yu=(h6=(f6=Q.payload)==null?void 0:f6.data)==null?void 0:h6.map((a,Su)=>{var Z,O,B,m,uu,eu,du,gu,Au,iu,fu,hu,xu,Eu,wu,Lu,bu,$u,Tu,S6,j6,F6,y6;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,(du=(eu=a==null?void 0:a.info)==null?void 0:eu.totalKilledQuantity)==null?void 0:du.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=(Eu=a==null?void 0:a.info)==null?void 0:Eu.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=(S6=a==null?void 0:a.info)==null?void 0:S6.unionTotalUnpaidWage)==null?void 0:j6.toLocaleString(),(y6=(F6=a==null?void 0:a.info)==null?void 0:F6.unionTotalPaidWage)==null?void 0:y6.toLocaleString()]});break;default:yu=(p6=(x6=Q.payload)==null?void 0:x6.data)==null?void 0:p6.map((a,Su)=>{var Z,O,B,m,uu,eu,du,gu,Au,iu,fu,hu,xu,Eu,wu,Lu,bu,$u,Tu,S6,j6,F6,y6,K6,H6;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,(du=(eu=a==null?void 0:a.info)==null?void 0:eu.lenProvinceKillRequests)==null?void 0:du.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=(Eu=a==null?void 0:a.info)==null?void 0:Eu.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=(S6=a==null?void 0:a.info)==null?void 0:S6.unionTotalWage)==null?void 0:j6.toLocaleString(),(y6=(F6=a==null?void 0:a.info)==null?void 0:F6.unionTotalUnpaidWage)==null?void 0:y6.toLocaleString(),(H6=(K6=a==null?void 0:a.info)==null?void 0:K6.unionTotalPaidWage)==null?void 0:H6.toLocaleString()]});break}y(yu)})},P=Ru(Q=>Q.userSlice.userProfile.key);return c.useEffect(()=>{w()},[]),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:Iu.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(w6,{checked:p,onChange:()=>T(!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=>{_(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:E,onChange:Q=>{I(H(Q).format("YYYY-MM-DD"))}})})]}),u.jsx(X,{type:"submit",onClick:()=>{w()},children:"جستجو"}),(d()==="SuperAdmin"||d()==="AdminX")&&u.jsx(I6,{title:"خروجی اکسل",placement:"top",children:u.jsx("a",{href:`${K.defaults.baseURL}kill_house_total_transactions_wage_payid_super_admin_excel/?key=${P}${p?`&date1=${g}&date2=${E}`:""}&role=${d()}`,rel:"noreferrer",children:u.jsx(X,{color:"primary",children:u.jsx(V6,{size:32})})})})]})}),u.jsx(f,{container:!0,mt:2,mb:4,isDashboard:!0,children:u.jsx(E6,{noPagination:!0,columns:d()==="AdminX"?["تعداد تخصیص بدون بار","حجم تخصیص بدون بار","وزن تخصیص بدون بار","تعداد بار","حجم بار","وزن بار","تعداد تراکنش ","کل تعرفه (ریال)","سهم شرکت (ریال)","سهم اتحادیه (ریال)","سهم صنف (ریال)","سهم غیره (ریال)","تخفیف کل (ریال)","کل تعرفه پرداخت نشده (ریال)"," سهم شرکت پرداخت نشده"," سهم اتحادیه پرداخت نشده","سهم صنف پرداخت نشده","سهم غیره پرداخت نشده","کل تعرفه پرداخت شده (ریال)","سهم اتحادیه از واریزی(ریال)","سهم شرکت از واریزی(ریال)","سهم اصناف از واریزی(ریال)","سهم غیره از واریزی(ریال)"]:d()==="SuperAdmin"?["تعداد تخصیص بدون بار","حجم تخصیص بدون بار","وزن تخصیص بدون بار","تعداد بار","حجم بار","وزن بار","تعداد تراکنش ","کل تعرفه (ریال)","سهم شرکت (ریال)","سهم اتحادیه (ریال)","سهم صنف (ریال)","تخفیف کل (ریال)","کل تعرفه پرداخت نشده (ریال)"," سهم شرکت پرداخت نشده"," سهم اتحادیه پرداخت نشده","سهم صنف پرداخت نشده","کل تعرفه پرداخت شده (ریال)","سهم اتحادیه از واریزی(ریال)","سهم شرکت از واریزی(ریال)","سهم اصناف از واریزی(ریال)"]:d()==="ProvinceOperator"?["تعداد تخصیص بدون بار","حجم تخصیص بدون بار","وزن تخصیص بدون بار","تعداد بار","حجم بار","وزن بار","سهم اتحادیه (ریال)"," سهم اتحادیه پرداخت نشده","سهم اتحادیه از واریزی(ریال)"]:["تعداد تخصیص بدون بار","حجم تخصیص بدون بار","وزن تخصیص بدون بار","تعداد بار","حجم بار","وزن بار","تعداد تراکنش ","سهم اتحادیه (ریال)"," سهم اتحادیه پرداخت نشده","سهم اتحادیه از واریزی(ریال)"],data:d()==="AdminX"?[[(M=(v=l==null?void 0:l.info)==null?void 0:v.lenProvinceKillRequests)==null?void 0:M.toLocaleString(),($=(D=l==null?void 0:l.info)==null?void 0:D.totalKilledQuantity)==null?void 0:$.toLocaleString(),(e=(k=l==null?void 0:l.info)==null?void 0:k.totalKilledWeight)==null?void 0:e.toLocaleString(),(W=(z=l==null?void 0:l.info)==null?void 0:z.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(),(U=(L=l==null?void 0:l.info)==null?void 0:L.companyTotalWage)==null?void 0:U.toLocaleString(),(ku=(J=l==null?void 0:l.info)==null?void 0:J.unionTotalWage)==null?void 0:ku.toLocaleString(),(_u=(Fu=l==null?void 0:l.info)==null?void 0:Fu.guildsTotalWage)==null?void 0:_u.toLocaleString(),(Du=(Mu=l==null?void 0:l.info)==null?void 0:Mu.otherTotalWage)==null?void 0:Du.toLocaleString(),(Ku=(zu=l==null?void 0:l.info)==null?void 0:zu.totalOff)==null?void 0:Ku.toLocaleString(),(qu=(Hu=l==null?void 0:l.info)==null?void 0:Hu.notPaied)==null?void 0:qu.toLocaleString(),(_6=(k6=l==null?void 0:l.info)==null?void 0:k6.companyTotalUnpaidWage)==null?void 0:_6.toLocaleString(),(D6=(M6=l==null?void 0:l.info)==null?void 0:M6.unionTotalUnpaidWage)==null?void 0:D6.toLocaleString(),(Y6=(R6=l==null?void 0:l.info)==null?void 0:R6.guildsTotalUnpaidWage)==null?void 0:Y6.toLocaleString(),(q=(P6=l==null?void 0:l.info)==null?void 0:P6.otherTotalUnpaidWage)==null?void 0:q.toLocaleString(),(Yu=(F=l==null?void 0:l.info)==null?void 0:F.totalPaidWage)==null?void 0:Yu.toLocaleString(),(Pu=(L6=l==null?void 0:l.info)==null?void 0:L6.unionTotalPaidWage)==null?void 0:Pu.toLocaleString(),(W6=(vu=l==null?void 0:l.info)==null?void 0:vu.companyTotalPaidWage)==null?void 0:W6.toLocaleString(),(z6=(Q6=l==null?void 0:l.info)==null?void 0:Q6.guildsTotalPaidWage)==null?void 0:z6.toLocaleString(),(u0=($6=l==null?void 0:l.info)==null?void 0:$6.otherTotalPaidWage)==null?void 0:u0.toLocaleString()]]:d()==="SuperAdmin"?[[(a0=(e0=l==null?void 0:l.info)==null?void 0:e0.lenProvinceKillRequests)==null?void 0:a0.toLocaleString(),(t0=(l0=l==null?void 0:l.info)==null?void 0:l0.totalKilledQuantity)==null?void 0:t0.toLocaleString(),(n0=(o0=l==null?void 0:l.info)==null?void 0:o0.totalKilledWeight)==null?void 0:n0.toLocaleString(),(r0=(s0=l==null?void 0:l.info)==null?void 0:s0.lenKillHouseRequests)==null?void 0:r0.toLocaleString(),(C0=(c0=l==null?void 0:l.info)==null?void 0:c0.acceptedRealQuantity)==null?void 0:C0.toLocaleString(),(g0=(d0=l==null?void 0:l.info)==null?void 0:d0.acceptedRealWeight)==null?void 0:g0.toLocaleString(),(i0=(A0=l==null?void 0:l.info)==null?void 0:A0.lenSlaughterTransactions)==null?void 0:i0.toLocaleString(),(h0=(f0=l==null?void 0:l.info)==null?void 0:f0.totalWage)==null?void 0:h0.toLocaleString(),(p0=(x0=l==null?void 0:l.info)==null?void 0:x0.companyTotalWage)==null?void 0:p0.toLocaleString(),(j0=(S0=l==null?void 0:l.info)==null?void 0:S0.unionTotalWage)==null?void 0:j0.toLocaleString(),(y0=(F0=l==null?void 0:l.info)==null?void 0:F0.guildsTotalWage)==null?void 0:y0.toLocaleString(),(w0=(E0=l==null?void 0:l.info)==null?void 0:E0.totalOff)==null?void 0:w0.toLocaleString(),(b0=(L0=l==null?void 0:l.info)==null?void 0:L0.notPaied)==null?void 0:b0.toLocaleString(),(T0=($0=l==null?void 0:l.info)==null?void 0:$0.companyTotalUnpaidWage)==null?void 0:T0.toLocaleString(),(k0=(I0=l==null?void 0:l.info)==null?void 0:I0.unionTotalUnpaidWage)==null?void 0:k0.toLocaleString(),(M0=(_0=l==null?void 0:l.info)==null?void 0:_0.guildsTotalUnpaidWage)==null?void 0:M0.toLocaleString(),(R0=(D0=l==null?void 0:l.info)==null?void 0:D0.totalPaidWage)==null?void 0:R0.toLocaleString(),(P0=(Y0=l==null?void 0:l.info)==null?void 0:Y0.unionTotalPaidWage)==null?void 0:P0.toLocaleString(),(z0=(W0=l==null?void 0:l.info)==null?void 0:W0.companyTotalPaidWage)==null?void 0:z0.toLocaleString(),(H0=(K0=l==null?void 0:l.info)==null?void 0:K0.guildsTotalPaidWage)==null?void 0:H0.toLocaleString()]]:d()==="ProvinceOperator"?[[(v0=(q0=l==null?void 0:l.info)==null?void 0:q0.lenProvinceKillRequests)==null?void 0:v0.toLocaleString(),(R=(U0=l==null?void 0:l.info)==null?void 0:U0.totalKilledQuantity)==null?void 0:R.toLocaleString(),(pu=(i=l==null?void 0:l.info)==null?void 0:i.totalKilledWeight)==null?void 0:pu.toLocaleString(),(au=(o=l==null?void 0:l.info)==null?void 0:o.acceptedRealQuantity)==null?void 0:au.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(),(Nu=(Uu=l==null?void 0:l.info)==null?void 0:Uu.unionTotalPaidWage)==null?void 0:Nu.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(E6,{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"}]})]})},Ya=()=>{const{slaughterExclusiveState:t}=Ru(b=>b.slaughterSlice),[y,x]=c.useState("1"),p=(b,w)=>{x(w)},[T,g]=c.useState(),_=(b,w)=>{g(w)},[E,I]=c.useState("1"),l=(b,w)=>{I(w)};return c.useEffect(()=>{d()!=="ChainCompany"&&g("1")},[]),u.jsxs(f,{justifyContent:"center",gap:Iu.SMALL,xs:12,children:[u.jsx(f,{sx:{maxWidth:{xs:"100%",md:"90vw"}},px:{xs:2,md:0},children:u.jsx(La,{})}),d()!=="ParentCompany"&&u.jsx(f,{container:!0,alignItems:"center",justifyContent:"center",mt:2,xs:12,children:u.jsxs(De,{scrollButtons:"auto",variant:"scrollable",allowScrollButtonsMobile:!0,value:y,onChange:p,children:[u.jsx(X6,{label:"پرداختی ها",value:"1"}),u.jsx(X6,{label:"اطلاعات تعرفه",value:"2"})]})}),d()!=="ParentCompany"&&u.jsxs(Re,{value:y,children:[u.jsx(q6,{value:"3",children:u.jsx(f,{container:!0,alignItems:"center",justifyContent:"center",xs:12,children:u.jsx(Ra,{})})}),u.jsx(q6,{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(ua,{size:"small",color:"primary",value:E,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:E==="1"?u.jsx(ba,{}):E==="2"?u.jsx($a,{}):u.jsx(fa,{})})]}):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(q6,{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(De,{scrollButtons:"auto",variant:"scrollable",allowScrollButtonsMobile:!0,value:T,onChange:_,children:[u.jsx(X6,{label:"بارهای روزانه",value:"1"}),!t&&u.jsx(X6,{disabled:!0,label:"تخصیص روزانه",value:"2"}),u.jsx(X6,{disabled:!0,label:"مرغ زنده",value:"3"}),(d()==="KillHouse"||d()==="SuperAdmin"||d()==="AdminX"||d()==="Commerce")&&u.jsx(X6,{disabled:!0,label:"لاشه",value:"4"}),d()!=="KillHouse"&&d()!=="ChainCompany"&&u.jsx(X6,{disabled:!0,label:"زنجیره",value:"5"})]})}),d()==="ChainCompany"&&u.jsx(je,{killhouseKey:"killhouseKey"}),u.jsxs(Re,{value:T,children:[u.jsx(q6,{value:"1",children:d()==="SuperAdmin"||d()==="AdminX"||d()==="ProvinceOperator"||d()==="Commerce"?u.jsx(Ia,{}):u.jsx(Xe,{killhouseKey:"killhouse"})}),u.jsx(q6,{value:"2",children:d()==="SuperAdmin"||d()==="AdminX"||d()==="ProvinceOperator"||d()==="Commerce"?u.jsx(Ta,{}):u.jsx(Qe,{killhouseKey:"killhouse"})}),u.jsx(q6,{value:"3",children:d()==="SuperAdmin"||d()==="AdminX"||d()==="ProvinceOperator"||d()==="Commerce"?u.jsx(qe,{type:"live_chicken"}):u.jsx(fe,{killhouseKey:"live_chicken",type:"live"})}),u.jsx(q6,{value:"4",children:d()==="SuperAdmin"||d()==="AdminX"||d()==="ProvinceOperator"||d()==="Commerce"?u.jsx(qe,{type:"carcassess"}):u.jsx(fe,{killhouseKey:"carcassess",type:"carcass"})}),u.jsx(q6,{value:"5",children:d()==="SuperAdmin"||d()==="AdminX"||d()==="ProvinceOperator"||d()==="Commerce"?u.jsx(ka,{}):u.jsx(je,{killhouseKey:"killhouseKey"})})]})]})})]})]})},fl=()=>{const t=Ca(),y=()=>{let x;switch(t.type){case"unpaid":x=u.jsx(Qe,{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(Xe,{killhouseKey:t.key,type:t.type});break;case"live_chicken":x=u.jsx(fe,{killhouseKey:t.key,type:"live"});break;case"carcassess":x=u.jsx(fe,{killhouseKey:t.key,type:"carcass"});break;case"chain":x=u.jsx(je,{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(ea,{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:Iu.SMALL,direction:"column",children:[u.jsx(aa,{}),t.type?u.jsx(u.Fragment,{children:y()}):u.jsx(f,{children:u.jsx(Ya,{})})]})})})})};export{fl as default};
|