1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[569],{40497:function(e,a,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/report/ingreso/historialCobroFactura",function(){return t(64551)}])},58180:function(e,a,t){"use strict";var n=t(85893);t(67294);var l=t(63861),r=t(42896),o=t(58650),i=t(85313);let s=e=>{let{visible:a,mediosPago:t,loading:s,onHide:d}=e;if(!a)return null;let c=e=>(0,i.xG)(null==e?void 0:e.monto),u=e=>(null==e?void 0:e.fechaRegistro)?(0,i.p6)(e.fechaRegistro,"d/m/y",12):"â",p=e=>(null==e?void 0:e.chequeFecha)?(0,i.p6)(e.chequeFecha,"d/m/y"):"â",m=e=>(null==e?void 0:e.transferenciaFecha)?(0,i.p6)(e.transferenciaFecha,"d/m/y"):"â",g=e=>{var a,t,l;return(0,n.jsx)("span",{className:"font-medium",children:null!==(l=null!==(t=null==e?void 0:null===(a=e.medioPago)||void 0===a?void 0:a.descripcion)&&void 0!==t?t:null==e?void 0:e.tipoMedioPago)&&void 0!==l?l:"â"})},v=e=>{var a;let t=null==e?void 0:null===(a=e.tipoMedioPago)||void 0===a?void 0:a.toUpperCase();return"TARJETA"===t||"TARJETA DE CREDITO"===t||"TARJETA DE DEBITO"===t?(0,n.jsxs)("div",{className:"flex flex-column gap-1 text-sm",children:[(null==e?void 0:e.tarjetaMarca)&&(0,n.jsxs)("span",{children:[(0,n.jsx)("strong",{children:"Marca:"})," ",e.tarjetaMarca]}),(null==e?void 0:e.tarjetaUltimos4)&&(0,n.jsxs)("span",{children:[(0,n.jsx)("strong",{children:"\xdaltimos 4:"})," ****",e.tarjetaUltimos4]}),(null==e?void 0:e.tarjetaAutorizacion)&&(0,n.jsxs)("span",{children:[(0,n.jsx)("strong",{children:"Autorizaci\xf3n:"})," ",e.tarjetaAutorizacion]}),(null==e?void 0:e.tarjetaLote)&&(0,n.jsxs)("span",{children:[(0,n.jsx)("strong",{children:"Lote:"})," ",e.tarjetaLote]}),(null==e?void 0:e.tarjetaTerminal)&&(0,n.jsxs)("span",{children:[(0,n.jsx)("strong",{children:"Terminal:"})," ",e.tarjetaTerminal]})]}):"CHEQUE"===t?(0,n.jsxs)("div",{className:"flex flex-column gap-1 text-sm",children:[(null==e?void 0:e.chequeBanco)&&(0,n.jsxs)("span",{children:[(0,n.jsx)("strong",{children:"Banco:"})," ",e.chequeBanco]}),(null==e?void 0:e.chequeNumero)&&(0,n.jsxs)("span",{children:[(0,n.jsx)("strong",{children:"No. Cheque:"})," ",e.chequeNumero]}),(null==e?void 0:e.chequeFecha)&&(0,n.jsxs)("span",{children:[(0,n.jsx)("strong",{children:"Fecha:"})," ",p(e)]})]}):"EFECTIVO"===t?(0,n.jsxs)("div",{className:"flex flex-column gap-1 text-sm",children:[(null==e?void 0:e.efectivoCaja)&&(0,n.jsxs)("span",{children:[(0,n.jsx)("strong",{children:"Caja:"})," ",e.efectivoCaja]}),(null==e?void 0:e.efectivoRecibidoPor)&&(0,n.jsxs)("span",{children:[(0,n.jsx)("strong",{children:"Recibido por:"})," ",e.efectivoRecibidoPor]})]}):"TRANSFERENCIA"===t?(0,n.jsxs)("div",{className:"flex flex-column gap-1 text-sm",children:[(null==e?void 0:e.transferenciaBanco)&&(0,n.jsxs)("span",{children:[(0,n.jsx)("strong",{children:"Banco:"})," ",e.transferenciaBanco]}),(null==e?void 0:e.transferenciaReferencia)&&(0,n.jsxs)("span",{children:[(0,n.jsx)("strong",{children:"Referencia:"})," ",e.transferenciaReferencia]}),(null==e?void 0:e.transferenciaFecha)&&(0,n.jsxs)("span",{children:[(0,n.jsx)("strong",{children:"Fecha:"})," ",m(e)]})]}):(0,n.jsx)("span",{className:"text-500",children:"â"})};return(0,n.jsx)(l.V,{visible:a,style:{width:"750px"},header:"Detalle Medios de Pago",modal:!0,className:"p-fluid",onHide:d,draggable:!1,resizable:!1,children:(0,n.jsxs)(r.w,{value:null!=t?t:[],loading:s,dataKey:"id",className:"datatable-responsive",emptyMessage:"No se encontraron medios de pago.",children:[(0,n.jsx)(o.s,{header:"Medio de Pago",body:g,headerStyle:{minWidth:"8rem"}}),(0,n.jsx)(o.s,{field:"monto",header:"Monto",body:c,headerStyle:{minWidth:"6rem"}}),(0,n.jsx)(o.s,{header:"Detalle",body:v,headerStyle:{minWidth:"12rem"}}),(0,n.jsx)(o.s,{field:"fechaRegistro",header:"Fecha Registro",body:u,headerStyle:{minWidth:"8rem"}})]})})};a.Z=s},5866:function(e,a,t){"use strict";var n=t(16216);let l={GET_BY_CODIGO_FACTURA:"".concat("detallefactura","/headerfactura")};a.Z={async getDetallesByFactura(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n.L.requestWithParams(l.GET_BY_CODIGO_FACTURA,e)}}},52929:function(e,a,t){"use strict";var n=t(16216);let l="detallepago",r={GET_BY_FACTURA:"".concat(l,"/factura"),GET_BY_HEADER_PAGO:"".concat(l,"/headerpago"),GET_RESUMEN_COBRO_BY_MES:"".concat(l,"/cobroestudiantemes")};a.Z={async getDetallesPagoByFactura(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n.L.requestWithParams(r.GET_BY_FACTURA,e)},async getDetallesPagoByHeader(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n.L.requestWithParams(r.GET_BY_HEADER_PAGO,e)},async getCobroEstudianteMes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n.L.requestWithParams(r.GET_RESUMEN_COBRO_BY_MES,e)}}},72437:function(e,a,t){"use strict";var n=t(16216);let l="headerpago",r={APLICAR_PAGO:"".concat(l,"/aplicarpago"),APLICAR_PAGO_AND_GENERAR_FACT:"".concat(l,"/aplicarpagofactura"),GET_RESUMEN_ANUAL:"".concat(l,"/report/ingresoanual"),GET_HIST_COBRO_FACT:"".concat(l,"/historialfecha"),GET_HIST_COBRO_FACT_FILTER:"".concat(l,"/historialfecha/filter"),GET_HIST_BY_EsTUDIANTE:"".concat(l,"/hist/estudiante"),GET_BY_ID:"".concat(l,"/id"),APLICAR_REVERSION_PAGO:"".concat(l,"/reversarpago"),GET_PAGOS_APP_HOY:"".concat(l,"/pagosapp/hoy")};a.Z={async aplicarPago(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{headerPago:{monto:void 0,usuario:void 0},detallesPago:[{codigoFactura:void 0}]};return n.L.requestPost(r.APLICAR_PAGO,e)},async aplicarPagoAndGenerarFactura(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{headerPago:{monto:void 0,usuario:void 0},factura:{monto:void 0},detalles:[{codigoFactura:void 0}]};return n.L.requestPost(r.APLICAR_PAGO_AND_GENERAR_FACT,e)}
1,async aplicarReversionPago(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{monto:void 0,usuario:void 0};return n.L.requestPost(r.APLICAR_REVERSION_PAGO,e)},async getResumenAnual(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n.L.requestWithParams(r.GET_RESUMEN_ANUAL,e)},async getHistorialCobro(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n.L.requestWithParams(r.GET_HIST_COBRO_FACT,e)},async getHistorialCobroFilter(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{codigoSucursal,filtro,page,size,sortField,sortOrderAsc};return n.L.requestWithParams(r.GET_HIST_COBRO_FACT_FILTER,e)},async getHistByEstudiante(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n.L.requestWithParams(r.GET_HIST_BY_EsTUDIANTE,e)},async getById(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n.L.requestWithParams(r.GET_BY_ID,e)},async getResumenPagosAppHoy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n.L.requestWithParams(r.GET_PAGOS_APP_HOY,e)}}},56161:function(e,a,t){"use strict";var n=t(16216);let l={GET_BY_ID_HEADER_PAGO:"".concat("pagomedio","/headerpago")};a.Z={async getByCodigoHeaderPago(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n.L.requestWithParams(l.GET_BY_ID_HEADER_PAGO,e)}}},64551:function(e,a,t){"use strict";t.r(a),t.d(a,{default:function(){return C}});var n=t(85893),l=t(99403),r=t(58650),o=t(42896),i=t(6094),s=t(62362),d=t(51020),c=t(67294),u=t(11163);t(53376);var p=t(85313),m=t(31849),g=t(2664),v=t(72437),h=t(63861),f=t(52929),x=t(37727),b=t(5866),y=t(24697),P=t(45408),j=t(58918);let E=e=>{var a,t;let{visible:r,headerPago:o,onConfirm:i,onCancel:s}=e;return r?(0,n.jsxs)(h.V,{visible:r,style:{width:"480px"},modal:!0,onHide:s,draggable:!1,resizable:!1,closable:!0,showHeader:!1,className:"border-round-xl shadow-6",contentClassName:"p-0",children:[(0,n.jsxs)("div",{className:"flex flex-column align-items-center pt-5 px-4",children:[(0,n.jsx)("div",{className:"flex align-items-center justify-content-center border-circle mb-3",style:{width:"64px",height:"64px",backgroundColor:"var(--orange-50)",border:"2px solid var(--orange-200)"},children:(0,n.jsx)("i",{className:"pi pi-exclamation-triangle text-orange-500",style:{fontSize:"1.75rem"}})}),(0,n.jsx)("h3",{className:"m-0 text-900 font-semibold text-xl",children:"Confirmar Reversi\xf3n"}),(0,n.jsx)("p",{className:"mt-1 mb-0 text-500 text-sm",children:"Esta acci\xf3n no se puede deshacer"})]}),(0,n.jsx)(j.i,{className:"my-3"}),o&&(0,n.jsxs)("div",{className:"mx-4 mb-3 p-3 border-round-lg",style:{backgroundColor:"var(--surface-50)"},children:[(0,n.jsxs)("div",{className:"flex align-items-center gap-2 mb-3",children:[(0,n.jsx)("i",{className:"pi pi-receipt text-primary text-sm"}),(0,n.jsx)("span",{className:"text-primary font-medium text-sm",children:"Detalles del Pago"})]}),(0,n.jsxs)("div",{className:"grid m-0 row-gap-3",children:[(0,n.jsxs)("div",{className:"col-6 p-0 pr-2",children:[(0,n.jsx)("span",{className:"block text-500 text-xs mb-1",children:"No. Pago"}),(0,n.jsx)("span",{className:"block text-900 font-semibold text-sm",children:null!==(t=null==o?void 0:o.codigoHeaderPagoCompania)&&void 0!==t?t:"â"})]}),(null==o?void 0:o.monto)!=null&&(0,n.jsxs)("div",{className:"col-6 p-0",children:[(0,n.jsx)("span",{className:"block text-500 text-xs mb-1",children:"Monto"}),(0,n.jsx)("span",{className:"block text-900 font-semibold text-sm",children:(0,p.xG)(o.monto)})]}),(null==o?void 0:o.fechaPago)&&(0,n.jsxs)("div",{className:"col-6 p-0 pr-2",children:[(0,n.jsx)("span",{className:"block text-500 text-xs mb-1",children:"Fecha"}),(0,n.jsx)("span",{className:"block text-900 font-semibold text-sm",children:(0,p.p6)(o.fechaPago,"d/m/y",12)})]}),(null==o?void 0:null===(a=o.medioPago)||void 0===a?void 0:a.descripcion)&&(0,n.jsxs)("div",{className:"col-6 p-0",children:[(0,n.jsx)("span",{className:"block text-500 text-xs mb-1",children:"Medio de Pago"}),(0,n.jsx)("span",{className:"block text-900 font-semibold text-sm",children:o.medioPago.descripcion})]})]})]}),(0,n.jsx)("div",{className:"mx-4 mb-3 p-3 border-round-lg border-1",style:{backgroundColor:"var(--red-50)",borderColor:"var(--red-200)"},children:(0,n.jsxs)("div",{className:"flex align-items-start gap-2",children:[(0,n.jsx)("i",{className:"pi pi-info-circle text-red-400 mt-1",style:{fontSize:"0.875rem"}}),(0,n.jsx)("span",{className:"text-red-700 text-sm line-height-3",children:"Al revertir este pago, se restaurar\xe1 el balance original de las facturas asociadas y se cancelar\xe1 el registro de pago."})]})}),(0,n.jsx)(j.i,{className:"mt-2 mb-0"}),(0,n.jsxs)("div",{className:"flex justify-content-end gap-2 px-4 py-3",children:[(0,n.jsx)(l.z,{label:"Cancelar",icon:"pi pi-times",className:"p-button-outlined p-button-secondary",onClick:s}),(0,n.jsx)(l.z,{label:"Revertir Pago",icon:"pi pi-refresh",className:"p-button-danger",onClick:()=>i(o)})]})]}):null};var N=t(58180),A=t(56161);let _=e=>{var a,t,j;let[_,C]=(0,c.useState)(null),[R,S]=(0,c.useState)(!1),[O,T]=(0,c.useState)([]),[F,w]=(0,c.useState)([]),[G,D]=(0,c.useState)(!1),[I,H]=(0,c.useState)(!1),[B,k]=(0,c.useState)([]),[L,M]=(0,c.useState)(!1),[W,q]=(0,c.useState)(!1),[Z,U]=(0,c.useState)(!1),z=(0,c.useRef)(null),Y=(0,
1c.useRef)(null),K=(0,c.useRef)(null),[V,J]=(0,c.useState)(null),X=(0,g.useSelector)(m.lE.data),Q=(0,g.useSelector)(m.lE.detallesAcceso),{acceso:$}=(0,x.P)(Q),[ee,ea]=(0,c.useState)({}),[et,en]=(0,c.useState)(null),[el,er]=(0,c.useState)(null),[eo,ei]=(0,c.useState)(!1),es=(0,c.useRef)(0),ed=(0,u.useRouter)();(0,c.useEffect)(()=>{var e;if(!ed.isReady)return;let a="1"===ed.query.originApp,t=(null==X?void 0:X.compania)!=void 0;(!a||t)&&(a&&(null==X?void 0:null===(e=X.compania)||void 0===e?void 0:e.appAvailable)&&er(!0),ei(!0))},[ed.isReady,ed.query.originApp,null==X?void 0:X.compania]);let ec=(0,c.useRef)(),[eu,ep]=(0,c.useState)(null),[em,eg]=(0,c.useState)({first:0,rows:10,page:0,sortField:null,sortOrder:null,filters:{}}),ev=e=>{z.current.show({severity:"error",summary:"Validaci\xf3n",detail:e,life:3e3})};(0,c.useEffect)(()=>{eo&&eh()},[em,eu,el,eo]);let eh=async()=>{let a=++es.current;try{var t,n,l,r,o;U(!0);let i=await v.Z.getHistorialCobroFilter({codigoSucursal:null===(t=e.sucursalSeleccionada)||void 0===t?void 0:t.codigoSucursal,filtro:eu,page:null==em?void 0:em.page,size:null==em?void 0:em.rows,sortField:null==em?void 0:em.sortField,sortOrderAsc:(null!==(l=em.sortOrder)&&void 0!==l?l:-1)==1,...null!==el&&{originApp:el}});if(a!==es.current)return;U(!1);let s=null==i?void 0:null===(n=i.content)||void 0===n?void 0:n.map(e=>{var a,t;return{...e,descripcionEntidad:(null==e?void 0:e.descripcionCliente)!=void 0?null==e?void 0:e.descripcionCliente:"".concat(null!==(r=null==e?void 0:null===(a=e.entidadCliente)||void 0===a?void 0:a.nombre)&&void 0!==r?r:""," ").concat(null!==(o=null==e?void 0:null===(t=e.entidadCliente)||void 0===t?void 0:t.apellido)&&void 0!==o?o:"").trim()}});C({...i,content:s})}catch(e){if(a!==es.current)return;U(!1),ev(e.message)}},ef=async e=>{try{q(!0);let a=await f.Z.getDetallesPagoByHeader({codigoHeaderPago:null==e?void 0:e.codigoHeaderPago});T(a)}catch(e){}finally{q(!1)}},ex=async a=>{try{var t,n,l,r,o,i,s,d,c;let u=await f.Z.getDetallesPagoByHeader({codigoHeaderPago:a}),m=await b.Z.getDetallesByFactura({codigoFactura:null==u?void 0:null===(t=u[0])||void 0===t?void 0:null===(n=t.factura)||void 0===n?void 0:n.codigoFactura,codigoCompania:null==X?void 0:null===(l=X.compania)||void 0===l?void 0:l.codigoCompania}),g=await v.Z.getById({codigoHeader:a}),h=(0,p.cG)(null==m?void 0:null===(r=m[0])||void 0===r?void 0:r.tipoDetalle,null==m?void 0:m[0]),x={sucursal:null==e?void 0:e.sucursalSeleccionada,compania:null==X?void 0:X.compania,detallePago:u,usuario:X,concepto:h,headerPago:g},y=!((null==u?void 0:null===(o=u[0])||void 0===o?void 0:null===(i=o.factura)||void 0===i?void 0:i.codigoInscripcion)==null||(null==u?void 0:null===(s=u[0])||void 0===s?void 0:null===(d=s.factura)||void 0===d?void 0:d.codigoInscripcion)==void 0);null===(c=ec.current)||void 0===c||c.print({format:y?P.ui.COBRO_CUOTA:P.ui.COBRO_ARTICULO,payload:x})}catch(e){ev("Ocurri\xf3 un error al momento de obtener los datos del pago, si la situaci\xf3n persiste favor contactar a soporte t\xe9cnico.")}},eb=e=>{var a,t,n,l,r;en(null!==(r=null==e?void 0:e.descripcionCliente)&&void 0!==r?r:(null!==(n=null==e?void 0:null===(a=e.entidadCliente)||void 0===a?void 0:a.nombre)&&void 0!==n?n:"")+" "+(null!==(l=null==e?void 0:null===(t=e.entidadCliente)||void 0===t?void 0:t.apellido)&&void 0!==l?l:"")),ea(e),T([]),S(!0),ef(e)},ey=()=>{z.current.show({severity:"success",summary:"Informaci\xf3n",detail:"Los datos fueron registrado exitosamente.",life:3e3})},eP=async e=>{try{var a,t;let n={codigoHeaderPago:null==e?void 0:e.codigoHeaderPago,usuarioAnulo:null==X?void 0:null===(a=X.usuario)||void 0===a?void 0:a.usuario,codigoCompania:null==X?void 0:null===(t=X.compania)||void 0===t?void 0:t.codigoCompania};await v.Z.aplicarReversionPago(n),eD(),ey(),eh()}catch(e){console.error(e)}},ej=()=>{ea(null),en(null),S(!1)},eE=e=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"p-column-title",children:"Estatus"}),(0,n.jsx)("span",{className:"product-badge status-".concat((null==e?void 0:e.estatus)=="REVERSADO"?"outofstock":"instock"),children:(null==e?void 0:e.estatus)||"APROBADO"})]}),eN=e=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"p-column-title",children:"Monto"}),(0,p.xG)(null==e?void 0:e.monto)]}),eA=e=>{var a;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"p-column-title",children:"Monto Pagado"}),(0,p.xG)(null==e?void 0:null===(a=e.factura)||void 0===a?void 0:a.montoPagado)]})},e_=e=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"p-column-title",children:"Fecha Pago"}),(0,p.p6)(null==e?void 0:e.fechaPago,"d/m/y",12)]}),eC=e=>{var a;let t=(null==e?void 0:e.originApp)?(0,p.sM)(null==e?void 0:e.usuario,null==X?void 0:null===(a=X.compania)||void 0===a?void 0:a.prefijoApp):null==e?void 0:e.usuario;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"p-column-title",children:"Usuario"}),t]})},eR=e=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"p-column-title",children:"Observacion"}),(0,p.xG)(null==e?void 0:e.descripcion)]}),eS=e=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"p-column-title",children:"Monto APlicado"}),(0,p.xG)(null==e?void 0:e.montoAplicado)]}),eO=e=>{var a;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"p-column-title",children:"Monto APlicado"}),(0,p.xG)(null==e?void 0:null===(a=e.factura)||void 0===a?void 0:a.montoOriginal)]})},eT=e=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"p-column-title",children:"Balance"}),(0,p.xG)(null==e?void 0:e.balancePendiente)]}),eF=e=>(0,n.jsxs)("div",{className:"flex align-items-center justify-content-center gap-1",children:[(0,n.jsx)(l.z,{icon:"pi pi-print",className:"p-button-rounded p-button-text p-button-plain",tooltip:"Reimprimir pago",tooltipOptions:{position:"top"},onClick:()=>ex(null==e?void 0:e.codigoHeaderPago)}),(0,n.jsx)(l.z,{icon:"pi pi-ellipsis-v",className:"p-button-rounded p-button-text p-button-plain",onClick:a=>{J(e),K.current.toggle(a)}})]}),ew=async e=>{try{H(!0),M(!0);let a=await A.Z.getByCodigoHeaderPago({codigoHeader:null==e?void 0:e.codigoHeaderPago});k(a)}catch(e){ev("Error al obtener los medios de pago.")}finally{M(!1)}},eG=()=>{H(!1),k([])},eD=()=>{D(!1)},eI=e=>{w(e),D(!0)},eH=(0,n.jsxs)("div",{className:"flex flex-column md:flex-row md:justify-content-between md:align-items-center",children:[(0,n.jsx)("h5",{className:"m-0",children:"Historial Cobro"}),(0,n.jsxs)("div",{className:"flex align-items-center gap-2 mt-2 md:mt-0",children:[(null==X?void 0:null===(a=X.compania)||void 0===a?void 0:a.appAvailable)&&(0,n.jsx)(l.z,{label:"Pagos APP",icon:"pi pi-mobile",className:el?"p-button-sm":"p-button-sm p-button-outlined",onClick:()=>{er(e=>!0!==e||null),eg(e=>({...e,first:0,page:0}))}}),(0,n.jsxs)("span",{className:"p-input-icon-left",children:[(0,n.jsx)("i",{className:"pi pi-search"}),(0,n.jsx)(i.o,{type:"search",onChange:e=>eL(e.target.value),placeholder:"buscar..."})]})]})]}),eB=e=>{eg(e)},ek=e=>{e.first=0,eg(e)},eL=(0,y.y1)(e=>{ep(e),eg(e=>(e.first=0,e))},500);return(0,n.jsxs)("div",{className:"grid crud-demo",children:[(0,n.jsx)("div",{className:"col-12",children:(0,n.jsxs)("div",{className:"card",children:[(0,n.jsx)(s.F,{ref:z}),(0,n.jsxs)(o.w,{loading:Z,ref:Y,value:null!==(t=null==_?void 0:_.content)&&void 0!==t?t:[],dataKey:"codigoDetallePago",className:"datatable-responsive",paginatorTemplate:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink CurrentPageReport RowsPerPageDropdown",currentPageReportTemplate:"Mostrando {first} a {last} de {totalRecords} Cobros",emptyMessage:"No se encontraron pagos.",header:eH,lazy:!0,paginator:!0,rows:null==em?void 0:em.rows,globalFilter:eu,rowsPerPageOptions:[10,20,30],onPage:eB,onSort:ek,first:em.first,totalRecords:null!==(j=null==_?void 0:_.totalElements)&&void 0!==j?j:0,sortField:em.sortField,sortOrder:em.sortOrder,children:[(0,n.jsx)(r.s,{field:"codigoHeaderPagoCompania",header:"C\xf3digo",sortable:!0,headerStyle:{minWidth:"2rem"}}),(0,n.jsx)(r.s,{field:"descripcionEntidad",header:"Entidad",headerStyle:{minWidth:"8rem"}}),(0,n.jsx)(r.s,{field:"monto",header:"Monto",sortable:!0,body:eN,headerStyle:{minWidth:"4rem"}}),(0,n.jsx)(r.s,{field:"fechaPago",header:"Fecha",sortable:!0,body:e_,headerStyle:{minWidth:"4rem"}}),(0,n.jsx)(r.s,{field:"usuario",header:"Usuario",sortable:!0,body:eC,headerStyle:{minWidth:"4rem"}}),(0,n.jsx)(r.s,{field:"descripcion",header:"Observaci\xf3n",sortable:!0,body:eR,headerStyle:{minWidth:"5rem"}}),(0,n.jsx)(r.s,{field:"estatus",header:"Estatus",sortable:!0,body:eE,headerStyle:{minWidth:"4rem"}}),(0,n.jsx)(r.s,{header:"",body:eF,headerStyle:{minWidth:"4rem"},bodyStyle:{textAlign:"center"}})]}),(0,n.jsx)(d.v,{ref:K,popup:!0,model:(e=>{let a=[{label:"Ver detalle del pago",icon:"pi pi-file-o",command:()=>eb(e)},{label:"Ver medios de pago",icon:"pi pi-wallet",command:()=>ew(e)}];return $.aplicarReversionPago&&(a.push({separator:!0}),a.push({label:"Reversar pago",icon:"pi pi-refresh",disabled:(null==e?void 0:e.estatus)=="REVERSADO",className:"text-red-500",command:()=>eI(e)})),a})(V)}),(0,n.jsx)(h.V,{visible:R,style:{width:"850px"},header:"Detalles Pago: "+et,modal:!0,className:"p-fluid",onHide:ej,children:(0,n.jsxs)(o.w,{ref:Y,loading:W,value:O,dataKey:"codigoFctura",paginator:!0,rows:10,rowsPerPageOptions:[5,10,25],className:"datatable-responsive",paginatorTemplate:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink CurrentPageReport RowsPerPageDropdown",currentPageReportTemplate:"Mostrando {first} a {last} de {totalRecords} Detalles Pago",emptyMessage:"No se encontraron Detalles Pago.",children:[(0,n.jsx)(r.s,{field:"codigoFactura",header:"C\xf3digo Factura",sortable:!0,headerStyle:{minWidth:"4rem"}}),(0,n.jsx)(r.s,{field:"factura.concepto",header:"Concepto",sortable:!0,headerStyle:{minWidth:"4rem"}}),(0,n.jsx)(r.s,{field:"factura.montoOrigina",header:"Monto Original",sortable:!0,body:eO,headerStyle:{minWidth:"4rem"}}),(0,n.jsx)(r.s,{field:"factura.montoPagado",header:"Monto Pagado",sortable:!0,body:eA,headerStyle:{minWidth:"4rem"}}),(0,n.jsx)(r.s,{field:"montoAplicado",header:"Monto Aplicado",sortable:!0,body:eS,headerStyle:{minWidth:"4rem"}}),(0,n.jsx)(r.s,{field:"balancePendiente",header:"Balance",sortable:!0,body:eT,headerStyle:{minWidth:"4rem"}})]})}),(0,n.jsx)(E,{visible:G,headerPago:F,onConfirm:eP,onCancel:eD}),(0,n.jsx)(N.Z,{visible:I,mediosPago:B,loading:L,onHide:eG})]})}),(0,n.jsx)(P.Jr,{ref:ec})]})};
1var C=(0,g.connect)(function(e){let a=m.lE.sucursalSeleccionada(e);return{sucursalSeleccionada:a}},function(e){let a=a=>e(m.jZ.setSucursalSelected(a));return{setSucursal:a}})(_)},58918:function(e,a,t){"use strict";t.d(a,{i:function(){return i}});var n=t(67294),l=t(13643);function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}var o={defaultProps:{__TYPE:"Divider",align:null,layout:"horizontal",type:"solid",style:null,className:null,children:void 0},getProps:function(e){return l.gb.getMergedProps(e,o.defaultProps)},getOtherProps:function(e){return l.gb.getDiffProps(e,o.defaultProps)}},i=n.forwardRef(function(e,a){var t=o.getProps(e),i=n.useRef(null),s="horizontal"===t.layout,d="vertical"===t.layout,c=o.getOtherProps(t),u=(0,l.AK)("p-divider p-component p-divider-".concat(t.layout," p-divider-").concat(t.type),{"p-divider-left":s&&(!t.align||"left"===t.align),"p-divider-right":s&&"right"===t.align,"p-divider-center":s&&"center"===t.align||d&&(!t.align||"center"===t.align),"p-divider-top":d&&"top"===t.align,"p-divider-bottom":d&&"bottom"===t.align},t.className);return n.useImperativeHandle(a,function(){return{props:t,getElement:function(){return i.current}}}),n.createElement("div",r({ref:i,className:u,style:t.style,role:"separator"},c),n.createElement("div",{className:"p-divider-content"},t.children))});i.displayName="Divider"},51020:function(e,a,t){"use strict";t.d(a,{v:function(){return g}});var n=t(67294),l=t(66367),r=t(98781),o=t(13308),i=t(50519),s=t(24951),d=t(13643);function c(){return(c=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}function u(e,a){(null==a||a>e.length)&&(a=e.length);for(var t=0,n=Array(a);t<a;t++)n[t]=e[t];return n}function p(e,a){return function(e){if(Array.isArray(e))return e}(e)||function(e,a){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,l,r,o,i=[],s=!0,d=!1;try{if(r=(t=t.call(e)).next,0===a){if(Object(t)!==t)return;s=!1}else for(;!(s=(n=r.call(t)).done)&&(i.push(n.value),i.length!==a);s=!0);}catch(e){d=!0,l=e}finally{try{if(!s&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(d)throw l}}return i}}(e,a)||function(e,a){if(e){if("string"==typeof e)return u(e,a);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return u(e,a)}}(e,a)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var m={defaultProps:{__TYPE:"Menu",id:null,model:null,popup:!1,style:null,className:null,autoZIndex:!0,baseZIndex:0,appendTo:null,transitionOptions:null,onShow:null,onHide:null,children:void 0},getProps:function(e){return d.gb.getMergedProps(e,m.defaultProps)},getOtherProps:function(e){return d.gb.getDiffProps(e,m.defaultProps)}},g=n.memo(n.forwardRef(function(e,a){var t=m.getProps(e),u=p(n.useState(!t.popup),2),g=u[0],v=u[1],h=n.useRef(null),f=n.useRef(null),x=p((0,o.gq)({target:f,overlay:h,listener:function(e,a){a.valid&&R(e)},when:g}),2),b=x[0],y=x[1],P=function(e){t.popup&&i.F.emit("overlay-click",{originalEvent:e,target:f.current})},j=function(e,a){if(a.disabled){e.preventDefault();return}a.url||e.preventDefault(),a.command&&a.command({originalEvent:e,item:a}),t.popup&&R(e)},E=function(e,a){var t=e.currentTarget.parentElement;switch(e.which){case 40:var n=N(t);n&&n.children[0].focus(),e.preventDefault();break;case 38:var l=A(t);l&&l.children[0].focus(),e.preventDefault()}},N=function e(a){var t=a.nextElementSibling;return t?d.p7.hasClass(t,"p-disabled")||!d.p7.hasClass(t,"p-menuitem")?e(t):t:null},A=function e(a){var t=a.previousElementSibling;return t?d.p7.hasClass(t,"p-disabled")||!d.p7.hasClass(t,"p-menuitem")?e(t):t:null},_=function(e){t.popup&&(g?R(e):C(e))},C=function(e){f.current=e.currentTarget,v(!0),t.onShow&&t.onShow(e)},R=function(e){f.current=e.currentTarget,v(!1),t.onHide&&t.onHide(e)},S=function(){d.P9.set("menu",h.current,l.ZP.autoZIndex,t.baseZIndex||l.ZP.zIndex.menu),d.p7.absolutePosition(h.current,f.current)},O=function(){b()},T=function(){f.current=null,y()},F=function(){d.P9.clear(h.current)};(0,o.zq)(function(){d.P9.clear(h.current)}),n.useImperativeHandle(a,function(){return{props:t,toggle:_,show:C,hide:R,getElement:function(){return h.current},getTarget:function(){return f.current}}});var w=function(e,a){var t=e.label+"_"+a,l=(0,d.AK)("p-submenu-header",{"p-disabled":e.disabled},e.className),r=e.items.map(G);return n.createElement(n.Fragment,{key:t},n.createElement("li",{className:l,style:e.style,role:"presentation"},e.label),r)},G=function(e,a){if(!1===e.visible)return null;var l=(0,d.AK)("p-menuitem",e.className),r=(0,d.AK)("p-menuitem-link",{"p-disabled":e.disabled}),o=(0,d.AK)("p-menuitem-icon",e.icon),i=d.Cz.getJSXIcon(e.icon,{className:"p-menuitem-icon"},{props:t}),s=e.label&&n.createElement("span",{className:"p-menuitem-text"},e.label),c=e.disabled?null:0,u=e.label+"_"+a,p=n.createElement("a",{href:e.url||"#",className:r,role:"menuitem",target:e.target,onClick:function(a){return j(a,e)},onKeyDown:function(e){return E(e)},tabIndex:c,"aria-disabled":e.disabled},i,s);if(e.template){var m={onClick:function(a){return j(a,e)},onKeyDown:function(e){return E(e)},className:r,tabIndex:c,labelClassName:"p-menuitem-text",iconClassName:o,element:p,props:t};p=d.gb.getJSXElement(e.template,e,m)}return n.createElement("li",{key:u,className:l,style:e.style,role:"none"},p)},D=function(e,a){return e.separator?n.createElement("li",{key:"separator_"+a,className:"p-menu-separator",role:"separator"}):e.items?w(e,a):G(e,a)},I=function(){if(t.model){var e=m.getOtherProps(t),a=(0,d.AK)("p-menu p-component",{"p-menu-overlay":t.popup,"p-input-filled":"filled"===l.ZP.
1inputStyle,"p-ripple-disabled":!1===l.ZP.ripple},t.className),o=t.model.map(D);return n.createElement(r.K,{nodeRef:h,classNames:"p-connected-overlay",in:g,timeout:{enter:120,exit:100},options:t.transitionOptions,unmountOnExit:!0,onEnter:S,onEntered:O,onExit:T,onExited:F},n.createElement("div",c({ref:h,id:t.id,className:a,style:t.style},e,{onClick:P}),n.createElement("ul",{className:"p-menu-list p-reset",role:"menu"},o)))}return null}();return t.popup?n.createElement(s.h,{element:I,appendTo:t.appendTo}):I}));g.displayName="Menu"}},function(e){e.O(0,[2362,8790,6914,4663,5408,9774,2888,179],function(){return e(e.s=40497)}),_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.