PageSourceSearch

https://www.ikoab.com/_next/static/chunks/pages/invest/invoices-2d1be0f821f5488c.js

js ikoab.com collected 2026-10-05 20:35:26 UTC 11,489 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9859],{356:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/invest/invoices",function(){return n(9433)}])},9433:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSG:function(){return C},default:function(){return k}});var r,a=n(5893),s=n(7294),c=n(2912),o=n(4051),l=n.n(o),i=n(1664),d=n(1412),u=n(7499),h=n(7453),m=n(5626),f=n(2231);function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function x(e,t,n,r,a,s,c){try{var o=e[s](c),l=o.value}catch(i){return void n(i)}o.done?t(l):Promise.resolve(l).then(r,a)}function j(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var s=e.apply(t,n);function c(e){x(s,r,a,c,o,"next",e)}function o(e){x(s,r,a,c,o,"throw",e)}c(void 0)}))}}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){b(e,t,n[t])}))}return e}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,s=[],c=!0,o=!1;try{for(n=n.call(e);!(c=(r=n.next()).done)&&(s.push(r.value),!t||s.length!==t);c=!0);}catch(l){o=!0,a=l}finally{try{c||null==n.return||n.return()}finally{if(o)throw a}}return s}}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var _=function(e){var t=e.rows,n=e.categories;return(0,a.jsx)("div",{className:"border-dark border rounded-12 bg-white table-responsive",children:(0,a.jsxs)("table",{className:"table mb-0",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{children:"Ann\xe9e"}),(0,a.jsx)("th",{children:"Cat\xe9gorie"}),(0,a.jsx)("th",{className:"text-end",children:"Total"})]})}),(0,a.jsx)("tbody",{children:t.map((function(e,t){return(0,a.jsxs)("tr",{children:[(0,a.jsx)("td",{children:e.year}),(0,a.jsx)("td",{children:null!==(r=null===n||void 0===n?void 0:n[e.accounting_book])&&void 0!==r?r:e.accounting_book}),(0,a.jsxs)("td",{className:"text-end",children:[Number(e.total||0).toFixed(2),"\u20ac"]})]},"".concat(e.year,"-").concat(e.accounting_book,"-").concat(t))}))})]})})},N=function(){var e,t=(0,s.useState)([]),n=t[0],r=t[1],c=(0,s.useState)("month"),o=c[0],v=c[1],x=(0,s.useState)([]),N=x[0],w=x[1],y=(0,s.useState)({q:"",status:"",accounting_book:"",asset_id:void 0}),C=y[0],k=y[1],S=(0,d.$G)().t,P=function(){var e=(0,d.$G)().t;return{ve1:e("Ventes gestion locative"),ven:e("Ventes travaux"),vma:e("Ventes maintenance"),vn1:e("N. cr\xe9dit note gestion locative"),vnc:e("Note cr\xe9dit vente travaux"),vne:e("Ventes nettoyage"),vcm:e("Note cr\xe9dit maintenance"),vcn:e("Note cr\xe9dit nettoyage"),vmt:e("Maintenance - Travaux"),vm1:e("Travaux investissement"),vgldiv:e("Ventes gestion locative divers"),ncvgldiv:e("NC gestion locative divers")}}(),O=function(){var e=j(l().mark((function e(){var t;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,f.WM)(p({},C,{group_by:o}));case 2:t=e.sent,r(t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,s.useEffect)((function(){var e=function(){var e=j(l().mark((function e(){var t;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,f.x5)();case 2:(t=e.sent).count>0&&(w(t.results),k((function(e){return p({},e,{asset_id:t.results[0].id})})));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[]),(0,s.useEffect)((function(){O()}),[C,o]);var E=function(e){k((function(t){return p({},t,b({},e.target.name,e.target.value?e.target.value:void 0))}))},M=function(e){if(!e.status)return null;switch(e.status){case"paid":return(0,a.jsx)("span",{className:"table__badge--success",children:S("Pay\xe9")});case"unpaid":return(0,a.jsx)("span",{className:"table__badge--danger",children:S("Non pay\xe9")});case"late_payment":return(0,a.jsx)("span",{className:"table__badge--danger",children:S("Retard de paiement")});case"late_to_notice":return(0,a.jsx)("span",{className:"table__badge--danger",children:S("Mise en demeure")});default:return(0,a.jsx)("span",{className:"table__badge--white",children:e.status})}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(u.Z,{currentTab:1}),(0,a.jsx)("section",{className:"mb-7",children:(0,a.jsx)("div",{className:"container",children:(0,a.jsxs)("div",{className:"row",children:[(0,a.jsx)("div",{className:"col-12 mb-7",children:(0,a.jsx)("h1",{className:"heading-4",children:S("Facturation")})}),(0,a.jsxs)("div",{className:"col-12",children:[(0,a.jsx)("div",{className:"mb-7",children:(0,a.jsxs)("form",{className:"d-flex flex-wrap gap-3",children:[(0,a.jsxs)("div",{className:"me-5 w-100 w-lg-auto",children:[(0,a.jsx)("label",{htmlFor:"ref",className:"form-label d-none",children:S("Num\xe9ro de facture")}),(0,a.jsx)("input",{type:"text",className:"form-control fs-20 fw-light rounded-20 bg-white border-dark border-1",id:"ref",name:"q",placeholder:S("N\xb0 de facture"),value:C.q,onChange:E})]}),(0,a.jsxs)("div",{className:"me-5",children:[(0,a.jsx)("label",{htmlFor:"period_date",className:"form-label d-none",children:S("Date")}),(0,a.jsx)(m.Z,{className:"form-control fs-20 fw-light rounded-20 bg-white border-dark border-1",placeholder:S("Date"),id:"period_date",name:"period_date",value:C.period_date,onChange:function(e,t){k((function(n){return p({},n,b({},t,e))}))},showMonthYearPicker:!0,showTwoColumnMonthYearPicker:!0,isClearable:!0})]}),(null===N||void 0===N?void 0:N.length)>1&&(0,a.jsxs)("div",{className:"me-5 w-100 w-lg-auto",children:[(0,a.jsx)("label",{htmlFor:"asset_id",className:"form-label d-none",children:S("Maison")}),(0,a.jsxs)("select",{name:"asset_id",id:"asset_id",className:"form-control form__select fw-light fs-20 w-100 account__select",value:C.asset_id,onChange:E,children:[(0,a.jsx)("option",{value:"",children:S("Maison")}),N.map((function(e){return(0,a.jsx)("option",{value:e.id,children:e.name},"asset_".concat(e.id))}))]})]}),(0,a.jsxs)("div",{className:"me-5 w-100 w-lg-auto",children:[(0,a.jsx)("label",{htmlFor:"accounting_book",className:"form-label d-none",children:S("Cat\xe9gorie")}),(0,a.jsxs)("select",{name:"accounting_book",id:"accounting_book",className:"form-control form__select fw-light fs-20 w-100 account__select",value:C.accounting_book,onChange:E,children:[(0,a.jsx)("option",{value:"",children:S("Cat\xe9gorie")}),null===(e=Object.entries(P))||void 0===e?void 0:e.map((function(e){var t=g(e,2),n=t[0],r=t[1];return(0,a.jsx)("option",{value:n,children:r},n)}))]})]}),(0,a.jsxs)("div",{className:"me-5",children:[(0,a.jsx)("label",{htmlFor:"status",className:"form-label d-none",children:S("Etat")}),(0,a.jsxs)("select",{name:"status",id:"status",className:"form-control form__select fw-light fs-20 w-100 account__select",value:C.status,onChange:E,children:[(0,a.jsx)("option",{children:S("Etat")}),(0,a.jsx)("option",{value:"paid",children:S("Pay\xe9")}),(0,a.jsx)("option",{value:"unpaid",children:S("Non pay\xe9")})]})]}),(0,a.jsx)("div",{className:"",children:(0,a.jsxs)("select",{className:"form-control form__select fw-light fs-20 w-100 account__select",value:o,onChange:function(e){var t=e.target.value;r([]),v(t)},children:[(0,a.jsx)("option",{value:"month",children:S("Par Mois")}),(0,a.jsx)("option",{value:"year",children:S("Par Ann\xe9e")})]})})]})}),(0,a.jsx)("div",{className:"border-dark border rounded-12 bg-white table-responsive",children:"month"===o?(0,a.jsxs)("table",{className:"table mb-0",children:[(0,a.jsx)("thead",{children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{scope:"col",className:"text-end",children:S("Ref")}),(0,a.jsx)("th",{scope:"col",className:"text-end",children:S("N\xb0 de facture")}),(0,a.jsx)("th",{scope:"col",className:"text-end",children:S("P\xe9riode")}),(0,a.jsx)("th",{scope:"col",children:S("Maison")}),(0,a.jsx)("th",{scope:"col",children:S("Cat\xe9gorie")}),(0,a.jsx)("th",{scope:"col",children:S("Destinataire")}),(0,a.jsx)("th",{scope:"col",className:"text-center",children:S("Statut")}),(0,a.jsx)("th",{scope:"col",className:"text-end",children:S("Total")}),(0,a.jsx)("th",{scope:"col",className:"text-center",children:S("T\xe9l\xe9charger")}),(0,a.jsx)("th",{scope:"col",className:"text-center",children:S("Infos")})]})}),(0,a.jsx)("tbody",{children:null===n||void 0===n?void 0:n.map((function(e){var t;return(0,a.jsxs)("tr",{className:"table__tr-link ".concat("unpaid"===e.status?"table__tr--danger":""),children:[(0,a.jsx)("td",{className:"text-end",children:e.id}),(0,a.jsx)("td",{className:"text-end",children:e.invoice_number}),(0,a.jsx)("td",{className:"text-end",children:e.period}),(0,a.jsx)("td",{children:null===(t=e.asset)||void 0===t?void 0:t.name}),(0,a.jsx)("td",{children:P[e.accounting_book]}),(0,a.jsx)("td",{children:e.name}),(0,a.jsx)("td",{children:M(e)}),(0,a.jsxs)("td",{className:"text-end",children:[e.total,"\u20ac"]}),(0,a.jsx)("td",{children:(0,a.jsx)("a",{href:"/export/invest/invoices/".concat(e.id,".pdf"),className:"table__btn--download",children:(0,a.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.49999 1.05005C7.74852 1.05005 7.94999 1.25152 7.94999 1.50005V8.41365L10.1818 6.18185C10.3575 6.00611 10.6425 6.00611 10.8182 6.18185C10.9939 6.35759 10.9939 6.64251 10.8182 6.81825L7.81819 9.81825C7.64245 9.99398 7.35753 9.99398 7.18179 9.81825L4.18179 6.81825C4.00605 6.64251 4.00605 6.35759 4.18179 6.18185C4.35753 6.00611 4.64245 6.00611 4.81819 6.18185L7.04999 8.41365V1.50005C7.04999 1.25152 7.25146 1.05005 7.49999 1.05005ZM2.5 10.0001C2.77614 10.0001 3 10.2239 3 10.5001V12.0001C3 12.5539 3.44565 13.0001 3.99
1635 13.0001H11.0012C11.5529 13.0001 12 12.5528 12 12.0001V10.5001C12 10.2239 12.2239 10.0001 12.5 10.0001C12.7761 10.0001 13 10.2239 13 10.5001V12.0001C13 13.1041 12.1062 14.0001 11.0012 14.0001H3.99635C2.89019 14.0001 2 13.103 2 12.0001V10.5001C2 10.2239 2.22386 10.0001 2.5 10.0001Z",fill:"white"})})})}),(0,a.jsx)("td",{children:(0,a.jsx)(i.default,{href:"/invest/invoices/".concat(e.id),children:(0,a.jsx)("a",{className:"table__btn",children:S("Voir")})})})]},"invoice_".concat(e.id))}))})]}):(0,a.jsx)(_,{rows:n,categories:P})})]})]})})}),(0,a.jsx)(h.Z,{})]})},w=n(2477),y=function(){return(0,s.useEffect)((function(){return document.querySelector("body").classList.add("bg-accent3"),function(){document.querySelector("body").classList.remove("bg-accent3")}}),[]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(c.Z,{}),(0,a.jsx)(N,{})]})};y.getLayout=w.G;var C=!0,k=y}},function(e){e.O(0,[9625,2912,1698,9774,2888,179],(function(){return t=356,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

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.