1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3510],{3717:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},40114:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__N_SSP:()=>h,default:()=>f});var r=n(37876),a=n(14232),o=n(48748),i=n(25459),l=n(80180),s=n.n(l),c=n(13734),d=n(10841),u=n.n(d),p=n(98949),m=n(50716),b=n(2417);u().locale("fr");var h=!0;let f=e=>{let[t,n]=(0,a.useState)(!1),[l,d]=(0,a.useState)(()=>{let e=new Date;return{debut:new Date(e.getFullYear(),e.getMonth(),1,2),fin:new Date(e.getFullYear(),e.getMonth(),e.getDate(),2)}}),[h,f]=(0,a.useState)({totalInscription:"0",totalCoupon:"0",nbAvoirs:"0",totalRemboursement:"0",totalImpaye:"0",totalModifCommande:"0",totalPasDeCoach:"0",totalPasDeCoachFemme:"0",totalProlongation:"0",totalRectificatif:"0",totalTtcSansRectificatif:"0",totalAnnulationDemandePaiement:"0",totalAnnulationRectificatives:"0",nombreRemboursement:"0",nombreImpaye:"0",nombrePasDeCoach:"0",nombrePasDeCoachFemme:"0",nombreModifCommande:"0",nombreProlongation:"0",nombreRectificatif:"0",nombreAnnulationDemandePaiement:"0",nombreAnnulationRectificatives:"0",total:"0"}),g=async()=>{n(!0);try{let{data:e}=await b.default.get("/api/admin/comptabilites/avoirs/pdf",{params:{debut:new Date(l.debut).toISOString().slice(0,10),fin:new Date(l.fin).toISOString().slice(0,10)}});f(e),(0,m.EE)(e.pdfdata)}catch(t){var e;console.log("error: ",t),c.oR.error((null==(e=t.response)?void 0:e.data.error)||"")}finally{n(!1)}};return(0,r.jsxs)(i.A,{title:"\uD83D\uDCD1 Avoirs commerciaux",user:e.user,children:[(0,r.jsx)("div",{className:s().titleWrap,children:(0,r.jsx)(o.A,{children:"Avoirs commerciaux"})}),(0,r.jsxs)("div",{className:s().container,style:{width:"60%"},children:[(0,r.jsxs)("div",{className:s().subcontainer,children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{children:"Date d\xe9but"}),(0,r.jsx)("input",{type:"date",className:"p-inputtext",min:"2006-01-01",max:"2030-12-31",value:u()(l.debut).format("YYYY-MM-DD"),onChange:e=>d(t=>({...t,debut:e.target.value?u()(e.target.value,"YYYY-MM-DD").set({hour:2}).toDate():t.debut}))})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{children:"Date fin"}),(0,r.jsx)("input",{type:"date",className:"p-inputtext",min:"2006-01-01",max:"2030-12-31",value:u()(l.fin).format("YYYY-MM-DD"),onChange:e=>d(t=>({...t,fin:e.target.value?u()(e.target.value,"YYYY-MM-DD").set({hour:2}).toDate():t.fin}))})]}),(0,r.jsx)("div",{className:s().button,children:(0,r.jsx)(p.$,{icon:"pi pi-file",loading:t,disabled:!l||t,label:t?"":"R\xe9cup\xe9rer le PDF",type:"button",onClick:g,className:"p-button p-button-danger"})})]}),(0,r.jsx)("div",{className:s().totalWrapper,children:(0,r.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,r.jsx)("table",{className:s().tableTotal,children:(0,r.jsxs)("tbody",{children:[(0,r.jsxs)("tr",{style:{fontSize:22},children:[(0,r.jsx)("td",{children:"Nombre total d'avoirs :"}),(0,r.jsx)("td",{children:h.nbAvoirs})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:"Nombre d'avoirs remboursements :"}),(0,r.jsx)("td",{children:h.nombreRemboursement})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:"Nombre d'avoirs impay\xe9es :"}),(0,r.jsx)("td",{children:h.nombreImpaye})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:"Nombre d'avoirs modification commandes :"}),(0,r.jsx)("td",{children:h.nombreModifCommande})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:"Nombre d'avoirs pas de coach :"}),(0,r.jsx)("td",{children:h.nombrePasDeCoach})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:"Nombre d'avoirs pas de coach femme :"}),(0,r.jsx)("td",{children:h.nombrePasDeCoachFemme})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:"Nombre d'avoirs prolongation coupons p\xe9rim\xe9s :"}),(0,r.jsx)("td",{children:h.nombreProlongation})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:"Nombre d'avoirs rectificatifs :"}),(0,r.jsx)("td",{children:h.nombreRectificatif})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:"Nombre d'avoirs annulation demandes paiement :"}),(0,r.jsx)("td",{children:h.nombreAnnulationDemandePaiement})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:"Nombre d'avoirs annulation factures rectificatives :"}),(0,r.jsx)("td",{children:h.nombreAnnulationRectificatives})]})]})}),(0,r.jsx)("table",{className:s().tableTotal,children:(0,r.jsxs)("tbody",{children:[(0,r.jsxs)("tr",{style:{fontSize:22},children:[(0,r.jsx)("td",{children:"Total avoirs :"}),(0,r.jsxs)("td",{children:[h.total," â¬"]})]}),(0,r.jsxs)("tr",{style:{fontSize:22},children:[(0,r.jsx)("td",{children:"Total avoirs sans les rectificatifs :"}),(0,r.jsxs)("td",{children:[h.totalTtcSansRectificatif," â¬"]})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:"Remboursements :"}),(0,r.jsxs)("td",{children:[h.totalRemboursement," â¬"]})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:"Impay\xe9es :"}),(0,r.jsxs)("td",{children:[h.totalImpaye," â¬"]})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:"Modification commandes :"}),(0,r.jsxs)("td",{children:[h.totalModifCommande," â¬"]})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:"Pas de coach :"}),(0,r.jsxs)("td",{children:[h.totalPasDeCoach," â¬"]})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:"Pas de coach femme :"}),(0,r.jsxs)("td",{children:[h.totalPasDeCoachFemme," â¬"]})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:"Prolongation coupons p\xe9rim\xe9s :"}),(0,r.jsxs)("td",{children:[h.totalProlongation," â¬"]})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:"Rectificatifs :"}),(0,r.jsxs)("td",{children:[h.totalRectificatif," â¬"]})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:"Annulation demandes paiement :"}),(0,r.jsxs)("td",{children:[h.totalAnnulationDemandePaiement," â¬"]})]}),(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:"Annulation factures rectificatives :"}),(0,r.jsxs)("td",{children:[h.totalAnnulationRectificatives," â¬"]})]})]})})]})})]})]})}},43388:()=>{}
1,48748:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(37876);let a=e=>{let{children:t,...n}=e;return(0,r.jsx)("h2",{style:{...n},children:t})};a.defaultProps={fontSize:"30px",textAlign:"center",color:"#495057",display:"flex",alignItems:"center",justifyContent:"center",margin:"90px 0 30px"};let o=a},50716:(e,t,n)=>{"use strict";n.d(t,{EE:()=>r,PE:()=>i,V3:()=>o,gB:()=>l});let r=(e,t)=>{if(!e)return;let n=s(e);if(!n.startsWith("%PDF"))return a(e);let r=Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);let i=new Blob([new Uint8Array(r)],{type:"application/pdf;charset=utf-8"}),l=URL.createObjectURL(i);if(t)return l;if(/iPhone|iPad|iPod|Android/i.test(navigator.userAgent)){let e=window.open(l,"_blank");(null==e||e.closed||!e.location)&&alert("Le bloqueur de pop-up est activ\xe9 ! Veuillez le d\xe9sactiver pour ce site.");return}o(l,"PDF")},a=e=>{let t=window.open("about:blank");setTimeout(()=>{t.document.body.appendChild(t.document.createElement("iframe")).src="data:image/png;base64,"+e,t.document.body.style.margin="0px",t.document.getElementsByTagName("iframe")[0].style.width="100vw",t.document.getElementsByTagName("iframe")[0].style.height="100vh",t.document.getElementsByTagName("iframe")[0].style.border="0px"},0)};function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Document PDF",n=window.open("","_blank");if(!n)return void alert("Le bloqueur de pop-up est activ\xe9 ! Veuillez le d\xe9sactiver pour ce site.");let r=String(t).replace(/</g,"<").replace(/>/g,">"),a='<!doctype html><html><head><meta charset="utf-8"><title>'.concat(r,'</title><style>html,body{height:100%;margin:0}iframe{border:0;width:100%;height:100%}</style></head><body><iframe src="').concat(e,'" allowfullscreen></iframe></body></html>');n.document.open(),n.document.write(a),n.document.close()}function i(e,t){t.style.textAlign="center";let n=s(e),r=new Uint8Array(n.length);for(let e=0;e<n.length;e++)r[e]=n.charCodeAt(e);pdfjsLib.getDocument(r).promise.then(function(e){for(let n=1;n<=e._pdfInfo.numPages;n++)e.getPage(n).then(function(e){let n=document.createElement("canvas"),r=n.getContext("2d"),a=e.getViewport({scale:3});n.width=a.width,n.height=a.height,n.style.width="90%",n.style.height="auto";
1let o={canvasContext:r,viewport:a};e.render(o),t.appendChild(n)})})}function l(e,t){pdfjsLib.getDocument(e).promise.then(function(e){e.getPage(1).then(function(e){let n=document.createElement("canvas"),r=n.getContext("2d"),a=e.getViewport({scale:1});n.width=a.width,n.height=a.height,e.render({canvasContext:r,viewport:a}),t.appendChild(n)})})}function s(e){let t,n,r,a,o,i,l,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",c=e.replace(/[^A-Za-z0-9\+\/\=]/g,""),d="",u=0;for(;u<c.length;)a=s.indexOf(c.charAt(u++)),o=s.indexOf(c.charAt(u++)),i=s.indexOf(c.charAt(u++)),l=s.indexOf(c.charAt(u++)),t=a<<2|o>>4,n=(15&o)<<4|i>>2,r=(3&i)<<6|l,d+=String.fromCharCode(t),64!==i&&(d+=String.fromCharCode(n)),64!==l&&(d+=String.fromCharCode(r));return d}},53338:()=>{},71499:()=>{},72612:()=>{},72700:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/godadmin/comptabilite/avoirs-commerciaux",function(){return n(40114)}])},79706:(e,t,n)=>{"use strict";var r=n(3717);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var l=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},80180:e=>{e.exports={container:"fnCvPa",totalWrapper:"Fn1mMq",subcontainer:"qg9kY3",tableTotal:"xa6Yb5"}},95062:(e,t,n)=>{e.exports=n(79706)()},98949:(e,t,n)=>{"use strict";n.d(t,{$:()=>v});var r=n(14232),a=n(71067),o=n(57763),i=n(24715),l=n(64871),s=n(64235),c=n(83653),d=n(59963);function u(){return(u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,t,n){var r;return(r=function(e,t){if("object"!=p(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=p(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==p(r)?r:r+"")in e)?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b=o.x.extend({defaultProps:{__TYPE:"Badge",__parentMetadata:null,value:null,severity:null,size:null,style:null,className:null,children:void 0},css:{classes:{root:function(e){var t=e.props;return(0,l.xW)("p-badge p-component",m({"p-badge-no-gutter":l.BF.isNotEmpty(t.value)&&1===String(t.value).length,"p-badge-dot":l.BF.isEmpty(t.value),"p-badge-lg":"large"===t.size,"p-badge-xl":"xlarge"===t.size},"p-badge-".concat(t.severity),null!==t.severity))}},styles:"\n@layer primereact {\n .p-badge {\n display: inline-block;\n border-radius: 10px;\n text-align: center;\n padding: 0 .5rem;\n }\n \n .p-overlay-badge {\n position: relative;\n }\n \n .p-overlay-badge .p-badge {\n position: absolute;\n top: 0;\n right: 0;\n transform: translate(50%,-50%);\n transform-origin: 100% 0;\n margin: 0;\n }\n \n .p-badge-dot {\n width: .5rem;\n min-width: .5rem;\n height: .5rem;\n border-radius: 50%;\n padding: 0;\n }\n \n .p-badge-no-gutter {\n padding: 0;\n border-radius: 50%;\n }\n}\n"}});function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}var f=r.memo(r.forwardRef(function(e,t){var n=(0,i.qV)(),s=r.useContext(a.UM),c=b.getProps(e,s),d=b.setMetaData(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};
1t%2?h(Object(n),!0).forEach(function(t){m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}({props:c},c.__parentMetadata)),u=d.ptm,p=d.cx,f=d.isUnstyled;(0,o.j)(b.css.styles,f,{name:"badge"});var g=r.useRef(null);r.useImperativeHandle(t,function(){return{props:c,getElement:function(){return g.current}}});var x=n({ref:g,style:c.style,className:(0,l.xW)(c.className,p("root"))},b.getOtherProps(c),u("root"));return r.createElement("span",x,c.value)}));f.displayName="Badge";var g=o.x.extend({defaultProps:{__TYPE:"Button",__parentMetadata:null,badge:null,badgeClassName:null,className:null,children:void 0,disabled:!1,icon:null,iconPos:"left",label:null,link:!1,loading:!1,loadingIcon:null,outlined:!1,plain:!1,raised:!1,rounded:!1,severity:null,size:null,text:!1,tooltip:null,tooltipOptions:null,visible:!0},css:{classes:{icon:function(e){var t=e.props;return(0,l.xW)("p-button-icon p-c",m({},"p-button-icon-".concat(t.iconPos),t.label))},loadingIcon:function(e){var t=e.props,n=e.className;return(0,l.xW)(n,{"p-button-loading-icon":t.loading})},label:"p-button-label p-c",root:function(e){var t=e.props,n=e.size,r=e.disabled;return(0,l.xW)("p-button p-component",m(m(m(m({"p-button-icon-only":(t.icon||t.loading)&&!t.label&&!t.children,"p-button-vertical":("top"===t.iconPos||"bottom"===t.iconPos)&&t.label,"p-disabled":r,"p-button-loading":t.loading,"p-button-outlined":t.outlined,"p-button-raised":t.raised,"p-button-link":t.link,"p-button-text":t.text,"p-button-rounded":t.rounded,"p-button-loading-label-only":t.loading&&!t.icon&&t.label},"p-button-loading-".concat(t.iconPos),t.loading&&t.label),"p-button-".concat(n),n),"p-button-".concat(t.severity),t.severity),"p-button-plain",t.plain))}}}});function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach(function(t){m(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var v=r.memo(r.forwardRef(function(e,t){var n,p,b,h,x,v=(0,i.qV)(),j=r.useContext(a.UM),P=g.getProps(e,j),O=P.disabled||P.loading,w=y(y({props:P},P.__parentMetadata),{},{context:{disabled:O}}),D=g.setMetaData(w),N=D.ptm,C=D.cx,E=D.isUnstyled;(0,o.j)(g.css.styles,E,{name:"button",styled:!0});var _=r.useRef(t);if(r.useEffect(function(){l.BF.combinedRefs(_,t)},[_,t]),!1===P.visible)return null;var S=!O||P.tooltipOptions&&P.tooltipOptions.showOnDisabled,A=l.BF.isNotEmpty(P.tooltip)&&S,R={large:"lg",small:"sm"}[P.size],T=(n=(0,l.xW)("p-button-icon p-c",m({},"p-button-icon-".concat(P.iconPos),P.label)),p=v({className:C("icon")},N("icon")),b=v({className:C("loadingIcon",{className:n=(0,l.xW)(n,{"p-button-loading-icon":P.loading})})},N("loadingIcon")),h=P.loading?P.loadingIcon||r.createElement(s.N,u({},b,{spin:!0})):P.icon,l.Hj.getJSXIcon(h,y({},p),{props:P})),M=(x=v({className:C("label")},N("label")),P.label?r.createElement("span",x,P.label):!P.children&&!P.label&&r.createElement("span",u({},x,{dangerouslySetInnerHTML:{__html:" "}}))),Y=function(){if(P.badge){var e=v({className:(0,l.xW)(P.badgeClassName),value:P.badge,unstyled:P.unstyled,__parentMetadata:{parent:w}},N("badge"));return r.createElement(f,e,P.badge)}return null}(),I=v({ref:_,"aria-label":P.label?P.label+(P.badge?" "+P.badge:""):P["aria-label"],"data-pc-autofocus":P.autoFocus,className:(0,l.xW)(P.className,C("root",{size:R,disabled:O})),disabled:O},g.getOtherProps(P),N("root"));return r.createElement(r.Fragment,null,r.createElement("button",I,T,M,P.children,Y,r.createElement(c.n,null)),A&&r.createElement(d.m,u({target:_,content:P.tooltip,pt:N("tooltip")},P.tooltipOptions)))}));v.displayName="Button"}},e=>{e.O(0,[7464,6817,1067,2603,7763,4001,3665,8179,5459,636,6593,8792],()=>e(e.s=72700)),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.