1"use strict";(self.webpackChunktributei=self.webpackChunktributei||[]).push([[167],{96516:(e,t,s)=>{s.r(t),s.d(t,{default:()=>$});var n=s(65043),c=s(30267),a=s(10556),l=s(67330),r=s(71350),i=s(98139),o=s.n(i),d=s(94505),u=s(97711),x=s(23751),h=s(82445),m=s(80352),p=s(70579);function j(e){const[t,s]=(0,n.useState)(""),[c,a]=(0,n.useState)(""),[l,i]=(0,n.useState)(""),[o,u]=(0,n.useState)(""),[x,h]=(0,n.useState)(""),[j,g]=(0,n.useState)(""),[v,f]=(0,n.useState)(""),[y,S]=(0,n.useState)(""),[N,C]=(0,n.useState)(""),[b,L]=(0,n.useState)(""),{handleReloadProdutos:P}=(0,m.O)();function U(e){let t=e.target.value;return t=t.replace(/\D/g,""),t=t.replace(/(\d)(\d{1})$/,"$1,$2"),t=t.replace(/(?=(\d{3})+(\D))\B/g,"."),e.target.value=t,e}return(0,n.useEffect)((()=>{e.id.length>0&&d.A.get(`/simulador/pedidos/produtos/${e.id}/edit`).then((e=>{const{data:t}=e.data;s(t.quantidade),a(t.vUnit),u(t.vDesc_C.toLocaleString("pt-br",{minimumFractionDigits:2})),i(t.vDesc_IC.toLocaleString("pt-br",{minimumFractionDigits:2})),g(t.cOutro.toLocaleString("pt-br",{minimumFractionDigits:2})),h(t.icms_desonerado.toLocaleString("pt-br",{minimumFractionDigits:2})),f(t.IPI.toLocaleString("pt-br",{minimumFractionDigits:2})),S(t.vSeg.toLocaleString("pt-br",{minimumFractionDigits:2})),C(t.vFrete.toLocaleString("pt-br",{minimumFractionDigits:2})),L(t.produto_id)}))}),[e.id]),(0,p.jsxs)(r.aF,{isOpen:e.open,className:"modal-lg",toggle:e.onCancel,children:[(0,p.jsx)(r.rQ,{className:"bg-white",toggle:e.onCancel}),(0,p.jsx)("h1",{className:"text-center",children:"Atualizar Produto"}),(0,p.jsxs)(r.cw,{className:"d-flex flex-column modal-editar-produto gap-2",children:[(0,p.jsx)(r.fI,{children:(0,p.jsxs)(r.fv,{children:[(0,p.jsx)(r.JU,{children:"Produto"}),(0,p.jsx)(r.pd,{value:e.nome,disabled:!0})]})}),(0,p.jsxs)(r.fI,{children:[(0,p.jsxs)(r.fv,{children:[(0,p.jsx)(r.JU,{children:"Quantidade"}),(0,p.jsx)(r.pd,{value:t,onChange:e=>s(e.target.value)})]}),(0,p.jsxs)(r.fv,{children:[(0,p.jsx)(r.JU,{children:"Custo Unit\xe1rio"}),(0,p.jsx)(r.pd,{value:c,onChange:e=>a(e.target.value)})]}),(0,p.jsxs)(r.fv,{children:[(0,p.jsx)(r.JU,{children:"Desconto Condicional"}),(0,p.jsx)(r.pd,{value:o,onKeyPress:e=>U(e),onChange:e=>u(e.target.value)})]})]}),(0,p.jsxs)(r.fI,{children:[(0,p.jsxs)(r.fv,{children:[(0,p.jsx)(r.JU,{children:"Desconto Incondicional"}),(0,p.jsx)(r.pd,{value:l,onKeyPress:e=>U(e),onChange:e=>i(e.target.value)})]}),(0,p.jsxs)(r.fv,{children:[(0,p.jsx)(r.JU,{children:"ICMS Desonerado"}),(0,p.jsx)(r.pd,{value:x,onKeyPress:e=>U(e),onChange:e=>h(e.target.value)})]}),(0,p.jsxs)(r.fv,{children:[(0,p.jsx)(r.JU,{children:"IPI "}),(0,p.jsx)(r.pd,{value:v,onKeyPress:e=>U(e),onChange:e=>f(e.target.value)})]})]}),(0,p.jsxs)(r.fI,{children:[(0,p.jsxs)(r.fv,{children:[(0,p.jsx)(r.JU,{children:"Outras Despesas"}),(0,p.jsx)(r.pd,{value:j,onKeyPress:e=>U(e),onChange:e=>g(e.target.value)})]}),(0,p.jsxs)(r.fv,{children:[(0,p.jsx)(r.JU,{children:"Seguro"}),(0,p.jsx)(r.pd,{value:y,onKeyPress:e=>U(e),onChange:e=>S(e.target.value)})]}),(0,p.jsxs)(r.fv,{children:[(0,p.jsx)(r.JU,{children:"Frete"}),(0,p.jsx)(r.pd,{value:N,onKeyPress:e=>U(e),onChange:e=>C(e.target.value)})]})]}),(0,p.jsxs)("div",{className:"d-flex gap-1 justify-content-center",children:[(0,p.jsx)(r.$n,{onClick:()=>{return s=e.click,void d.A.put(`/simulador/pedidos/produtos/${e.id}`,{produto_id:b,quantidade:t,vUnit:parseFloat(c),vDescC:o,vDescIC:l,IPI:v,cOutro:j,vSeg:y,vFrete:N,vICMS:x}).then((e=>{200===e.status&&(P(),s())}));var s},color:"primary",children:"Editar Produto"}),(0,p.jsx)(r.$n,{color:"secondary",onClick:e.onCancel,outline:!0,children:"Cancelar"})]})]})]})}var g=s(9628),v=s(81518),f=s(30064),y=s.n(f),S=s(41981),N=s.n(S),C=s(24340),b=s(37079),L=s(25083),P=s(39546);const U=N()(y());function $(){const[e,t]=(0,n.useState)(""),[s,i]=(0,n.useState)([]),[f,y]=(0,n.useState)([]),[S,N]=(0,n.useState)(""),[$,I]=(0,n.useState)(!1),[F,R]=(0,n.useState)([]),[T,D]=(0,n.useState)([]),[O,A]=(0,n.useState)([]),[B,J]=(0,n.use
1State)([]),[k,w]=(0,n.useState)(""),[E,_]=(0,n.useState)(""),[K,M]=(0,n.useState)(""),[q,V]=(0,n.useState)(""),[Q,z]=(0,n.useState)(""),[Z,H]=(0,n.useState)(""),[G,W]=(0,n.useState)(""),[X,Y]=(0,n.useState)(""),[ee,te]=(0,n.useState)(""),[se,ne]=(0,n.useState)(!1),[ce,ae]=(0,n.useState)(!1),le=(0,x.useParams)(),re=le.id,[ie,oe]=(0,n.useState)(!1),[de,ue]=(0,n.useState)(""),[xe,he]=(0,n.useState)(""),me=(0,x.useHistory)(),{reloadProdutos:pe}=(0,m.O)(),{handleAhaSimulador:je,ahaSimulador:ge}=(0,L.h)(),[ve,fe]=(0,n.useState)(!0),{cnpjWithoutMask:ye}=(0,h.m)();function Se(e){let t=e.target.value;return t=t.replace(/\D/g,""),t=t.replace(/(\d)(\d{1})$/,"$1,$2"),t=t.replace(/(?=(\d{3})+(\D))\B/g,"."),e.target.value=t,e}(0,n.useEffect)((()=>{ne(!1),d.A.get(`simulador/pedidos/produtos/${re}`).then((e=>{const{pedido:s,data:n}=e.data;t(s.cliente_id),J(n),A(s),D(e.data),oe(!0),ne(!0)})).catch((()=>{}))}),[ce,pe]),(0,n.useEffect)((()=>{d.A.get("/simulador/fornecedores").then((e=>{const{data:t}=e.data,s=[];t.map((e=>{s.push({name:`${e.nome}, ${e.estado}, ${e.id}`})})),i(s)})).catch((()=>{})),d.A.post(`${ye}/produtos/search`,{query:""}).then((e=>{const t=e.data,s=[];t.map((e=>{s.push({name:`${e.descricao}, ${e.cest}, ${e.id}|${e.ncm}`})})),y(s)})).catch((()=>{}))}),[]);return(0,p.jsxs)("div",{className:"novo-pedido",children:[(0,p.jsx)(C.A,{title:"Parab\xe9ns! Voc\xea realizou a sua primeira\nsimula\xe7\xe3o de ICMS-ST no Tributei! \ud83d\udc4f",image:b.A,open:ge,click:()=>je(!je)}),ie?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("h1",{className:"pagina-titulo-margin",children:["Simulador de ICMS-ST | ",le.id]}),(0,p.jsxs)("div",{className:"d-flex gap-2",children:[(0,p.jsxs)("div",{children:[(0,p.jsx)(r.Zp,{className:"w-100",children:(0,p.jsx)(r.bw,{className:"container-inputs-card",children:ie?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("h1",{className:"card-titulo-margin",children:"Cen\xe1rio de Simula\xe7\xe3o"}),(0,p.jsx)("hr",{}),(0,p.jsxs)("div",{className:"d-flex input-fornecedor-cliente",children:[(0,p.jsxs)("div",{children:[(0,p.jsx)(r.JU,{children:"Fornecedor"}),(0,p.jsx)(u.A,{suggestions:s,className:"form-control fornecedor-cliente",filterKey:"name",placeholder:"Selecione um fornecedor",onChange:e=>async function(e){d.A.post("/simulador/fornecedores/search",{query:e}).then((e=>{const t=e.data,s=[];t.map((e=>{s.push({name:`${e.nome}, ${e.estado}, ${e.id}`})})),i(s)})).catch((()=>{}))}(e.target.value),value:`${T.pedido.fornecedor.nome} - ${T.pedido.fornecedor.estado}`,defaultSuggestions:!0,customRender:(t,s,n,c,a,l)=>(0,p.jsx)("div",{onClick:()=>function(t){d.A.put(`/simulador/pedidos/${re}`,{fornecedor_id:t.name.split(",").pop(),cliente_id:"object"===typeof e?e.name.split(",").pop():e}).then((()=>{ae(!ce)})).catch((()=>{}))}(t),children:(0,p.jsxs)("li",{className:o()("suggestion-item d-flex justify-content-between li-empresas",{active:n.indexOf(t)===c}),onMouseEnter:()=>l(n.indexOf(t)),onClick:e=>a(e,null),children:[(0,p.jsxs)("span",{className:"empresa-span w-75",children:[t.name.split(",")[0],t.name.split(",")]}),(0,p.jsx)("span",{className:"estado d-flex align-items-center justify-content-center",children:t.name.split(",")[1]})]},s)})})]}),(0,p.jsxs)("div",{className:"w-100",children:[(0,p.jsx)(r.JU,{children:"Comprador"}),(0,p.jsx)(r.pd,{disabled:"true",className:"w-100",value:`${T.pedido.cliente.cnpj} - ${T.pedido.cliente.nome} - ${T.pedido.cliente.estado}`})]})]})]}):(0,p.jsx)("div",{className:"d-flex justify-content-center mt-1",children:(0,p.jsx)(r.y$,{color:"primary"})})})}),(0,p.jsx)(r.Zp,{className:"w-100",children:(0,p.jsxs)(r.bw,{children:[(0,p.jsx)("h1",{className:"card-titulo-margin",children:"Produtos"}),(0,p.jsx)("hr",{className:"w-100"}),(0,p.jsxs)("div",{className:"d-flex align-items-center mt-3 mb-2 gap-1",children:[(0,p.jsxs)("div",{children:[(0,p.jsx)(r.JU,{children:"Produtos"}),(0,p.jsx)(u.A,{suggestions:f,className:"form-control fornecedor-cliente ",filterKey:"name",isLoading:ve,placeholder:"Selecione um produto",value:S.name,defaultSuggestions:!0,onChange:e=>async function(e){fe(!0),d.A.post(`${ye}/produtos/search`,{query:e.replace(".","")}).then((e=>{const t=e.data,s=[];0!==t.length&&(t.map((e=>{s.push({name:`${e.descricao}, ${e.cest.replace(/(\d{2})(\d{3})(\d{2})/,"$1.$2.$3")}, ${e.id}|${e.ncm}`})})),y(s)),fe(!1)})).catch((()=>{}))}(e.target.value),customRender:(e,t,s,n,c,a)=>(0,p.jsx)("div",{onClick:()=>N(e),children:(0,p.jsxs)("li",{className:o()("suggestion-item d-flex justify-content-between li-empresas",{active:s.indexOf(e)===n}),onMouseEnter:()=>a(s.indexOf(e)),onClick:e=>{c(null,e)},children:[(0,p.jsxs)("span",{className:"empresa-span",children:[(0,p.jsx)("strong",{children:e.name.split(",")[0]})," "]}),(0,p.jsxs)("span",{className:"d-flex",children:[e.name.split(",")[1].replace(/(\d{2})(\d{3})(\d{2})/,"$1.$2.$3"),(0,p.jsx)("br",{}),e.name.split(",").pop().split("|").pop()]})]},t)})})]}),(0,p.jsxs)("div",{className:"d-flex gap-2 align-items-center container-input",children:[(0,p.jsxs)("div",{children:[(0,p.jsx)(r.JU,{children:"Quantidade"}),(0,p.jsx)(r.pd,{onChange:e=>w(e.target.value),value:k,type:"number",placeholder:"0.00"})]}),(0,p.jsxs)("div",{children:[(0,p.jsx)(r.JU,{children:"Custo Unit\xe1rio"}),(0,p.jsx)(r.pd,{onChange:e=>_(e.target.value),value:E,placeholder:"0.00"})]}),(0,p.jsxs)("div",{children:[(0,p.jsx)(r.JU,{children:"Desconto incondicional"}),(0,p.jsx)(r.pd,{onChange:e=>M(e.target.value),value:K,onKeyPress:e=>Se(e),placeholder:"0.00"})]})]})]}),(0,p.jsxs)("div",{children:[(0,p.jsx)("div",{className:"d-flex flex-column",children:(0,p.jsxs)("div",{className:"d-flex d-flex container-input mt-2 mb-2 align-items-center gap-1",children:[(0,p.jsxs)("div",{children:[(0,p.jsx)(r.JU,{children:"Desconto condicional"}),(0,p.jsx)(r.pd,{onChange:e=>V(e.target.value),value:q,onKeyPress:e=>Se(e),placeholder:"0.00"})]}),(0,p.jsxs)("div",{children:[(0,p.jsx)(r.JU,{children:"ICMS desonerado"}),(0,p.jsx)(r.pd,{placeholder:"0.00",onKeyPress:e=>Se(e),value:Q,onChange:e=>z(e.target.value)})]}),(0,p.jsxs)("div",{children:[(0,p.jsx)(r.JU,{children:"Outras Despesas"}),(0,p.jsx)(r.pd,{placeholder:"0.00",onKeyPress:e=>Se(e),value:Z,onChange:e=>H(e.target.value)})]}),(0,p.jsxs)("div",{children:[(0,p.jsx)(r.JU,{children:"IPI"}),(0,p.jsx)(r.pd,{placeholder:"0.00",value:G,onKeyPress:e=>Se(e),onChange:e=>W(e.target.value)})]}),(0,p.jsxs)("div",{children:[(0,p.jsx)(r.JU,{children:"Seguro"}),(0,p.jsx)(r.pd,{placeholder:"0.00",value:X,onKeyPress:e=>Se(e),onChange:e=>Y(e.target.value)})]}),(0,p.jsxs)("div",{children:[(0,p.jsx)(r.JU,{children:"Frete"}),(0,p.jsx)(r.pd,{placeholder:"0.00",value:ee,onKeyPress:e=>Se(e),onChange:e=>te(e.target.value)})]})]})}),(0,p.jsxs)(r.$n,{className:"d-flex align-items-center mt-1 mb-1 font-button",color:"primary",onClick:async function(){d.A.post("/simulador/pedidos/produtos",{pedido_id:re,produto_id:""===S?"":S.name.split(",").pop().split("|")[0].trim(),quantidade:k,vUnit:E,vDescC:q,vDescIC:K,IPI:G,cOutro:Z,vSeg:X,vFrete:ee,vICMS:Q}).then((e=>{const{aha:t}=e.data;je("undefined"!==typeof t&&t),w(""),_(""),V(""),M(""),z(""),H(""),W(""),Y(""),te(""),(0,g.oR)((0,p.jsx)(v.A,{message:"Produto
1salvo no pedido"}),{autoClose:3e3,hideProgressBar:!0}),ae(!ce)})).catch((()=>{}))},children:[(0,p.jsx)(c.A,{}),"Adicionar produto ao pedido"]})]})]})})]}),(0,p.jsx)(r.Zp,{className:"w-100",children:(0,p.jsxs)(r.bw,{children:[(0,p.jsx)("h1",{className:"card-titulo-margin",children:"Resultados"}),(0,p.jsx)("div",{className:"d-flex flex-column",children:se?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,p.jsx)(r.JU,{children:" ICMS-ST Fornecedor"}),(0,p.jsx)(r.JU,{children:O.st_fornecedor.toLocaleString("pt-br",{style:"currency",currency:"BRL"})})]}),(0,p.jsx)("hr",{}),(0,p.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,p.jsx)(r.JU,{children:" ICMS-ST Destinat\xe1rio"}),(0,p.jsx)(r.JU,{children:O.st_destinatario.toLocaleString("pt-br",{style:"currency",currency:"BRL"})})]}),(0,p.jsx)("hr",{}),(0,p.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,p.jsx)(r.JU,{children:" FCP Fornecedor"}),(0,p.jsx)(r.JU,{children:T.pedido.fcp_vals.fcp_forn.toLocaleString("pt-br",{style:"currency",currency:"BRL"})})]}),(0,p.jsx)("hr",{}),(0,p.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,p.jsx)(r.JU,{children:" FCP Destinat\xe1rio"}),(0,p.jsx)(r.JU,{children:T.pedido.fcp_vals.fcp_dest.toLocaleString("pt-br",{style:"currency",currency:"BRL"})})]}),(0,p.jsx)("hr",{}),(0,p.jsxs)("div",{className:"d-flex justify-content-between",children:[(0,p.jsx)(r.JU,{children:" Valor Total Produtos"}),(0,p.jsx)(r.JU,{children:O.total_produto.toLocaleString("pt-br",{style:"currency",currency:"BRL"})})]}),(0,p.jsx)("hr",{}),(0,p.jsxs)("div",{className:"d-flex mt-1 justify-content-between",children:[(0,p.jsx)(r.JU,{children:" Valor Total Pedido"}),(0,p.jsx)(r.JU,{children:O.total_pedido.toLocaleString("pt-br",{style:"currency",currency:"BRL"})})]}),(0,p.jsx)("hr",{})]}):(0,p.jsx)("div",{className:"d-flex justify-content-center mt-1",children:(0,p.jsx)(r.y$,{color:"primary"})})}),(0,p.jsxs)("div",{className:"d-flex gap-2 mt-5 justify-content-center",children:[(0,p.jsx)(r.$n,{onClick:()=>me.push("/simulador"),className:"background-gradiente border-0",children:"Salvar Pedido"}),(0,p.jsx)(r.$n,{color:"secondary",onClick:async()=>{(await U.fire({title:"Cancelar pedido?",text:"O pedido ser\xe1 apagado e voc\xea perder\xe1 os dados da simula\xe7\xe3o",icon:"warning",showCancelButton:!0,confirmButtonText:"Sim, cancelar pedido",cancelButtonText:"Cancelar",customClass:{actions:"gap-1",confirmButton:"btn btn-primary",cancelButton:"btn btn-outline-danger ml-1"},buttonsStyling:!1})).value&&(d.A.delete(`/simulador/pedidos/${re}`).then((()=>{me.push("/simulador")})).catch((()=>{})),U.fire({icon:"success",title:"Parab\xe9ns!",text:"Seu pedido foi cancelado",customClass:{confirmButton:"btn btn-success"}}))},outline:!0,children:"Cancelar"})]})]})})]}),(0,p.jsx)(r.Zp,{children:(0,p.jsxs)(r.bw,{className:"container-table-pedido",children:[(0,p.jsx)("h1",{className:"card-titulo-margin",children:"Pedido"}),(0,p.jsx)("hr",{}),(0,p.jsxs)(r.XI,{className:"table-pedido",children:[(0,p.jsx)("thead",{children:(0,p.jsxs)("tr",{children:[(0,p.jsx)("th",{className:"text-center",children:"PRODUTO"}),(0,p.jsx)("th",{className:"text-center",children:"NCM"}),(0,p.jsx)("th",{className:"text-center",children:"CEST"}),(0,p.jsx)("th",{className:"text-center valor-icms",children:"VALOR TOTAL"}),(0,p.jsx)("th",{className:"text-center valor-icms",children:"BASE DE C\xc1LCULO"}),(0,p.jsx)("th",{className:"text-center",children:"MVA"}),(0,p.jsx)("th",{className:"text-center",children:"AL\xcdQUOTA INTERNA"}),(0,p.jsx)("th",{className:"text-center valor-icms",children:"VALOR ICMS-ST"}),(0,p.jsx)("th",{className:"text-center",children:"VALOR FCP"}),(0,p.jsx)("th",{className:"text-center",children:"QUEM RECOLHE"}),(0,p.jsx)("th",{className:"text-center valor-icms",children:"PROTOCOLO"}),(0,p.jsx)("th",{className:"text-center valor-icms",children:"A\xc7\xd5ES"})]})}),(0,p.jsxs)("tbody",{children:[(0,p.jsx)(j,{id:de,nome:xe,open:$,onCancel:function(){I(!$),ue(""),he("")},click:()=>I(!$)}),se?B.map((e=>{var t,s,n,c;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("tr",{children:[(0,p.jsx)("td",{onClick:()=>(0,P.fT)(e.id,F,R),className:"text-center",children:e.produto.nome_produto}),(0,p.jsx)("td",{onClick:()=>(0,P.fT)(e.id,F,R),className:"text-center",children:(0,P.cz)(e.produto.ncm_compra)}),(0,p.jsx)("td",{onClick:()=>(0,P.fT)(e.id,F,R),className:"text-center",children:(0,P.nZ)(e.produto.cest_compra)}),(0,p.jsx)("td",{onClick:()=>(0,P.fT)(e.id,F,R),className:"text-center",children:e.vProd.toLocaleStr
1ing("pt-br",{style:"currency",currency:"BRL"})}),(0,p.jsx)("td",{onClick:()=>(0,P.fT)(e.id,F,R),className:"text-center",children:null===e.calculo?"-":null===(t=e.calculo.basecalculoantesmva)||void 0===t?void 0:t.toLocaleString("pt-br",{style:"currency",currency:"BRL"})}),(0,p.jsxs)("td",{onClick:()=>(0,P.fT)(e.id,F,R),className:"text-center",children:[null===e.calculo?"-":e.calculo.mva,"%"]}),(0,p.jsxs)("td",{onClick:()=>(0,P.fT)(e.id,F,R),className:"text-center",children:[null===e.calculo?"-":e.calculo.aliquotainterna,"%"]}),(0,p.jsx)("td",{onClick:()=>(0,P.fT)(e.id,F,R),className:"text-center",children:null===e.calculo?"-":null===(s=e.calculo.valoricmsst)||void 0===s?void 0:s.toLocaleString("pt-br",{minimumFractionDigits:6,style:"currency",currency:"BRL"})}),(0,p.jsx)("td",{onClick:()=>(0,P.fT)(e.id,F,R),className:"text-center",children:null===e.calculo?"-":null===(n=e.calculo.fecep)||void 0===n?void 0:n.toLocaleString("pt-br",{minimumFractionDigits:6,style:"currency",currency:"BRL"})}),(0,p.jsx)("td",{onClick:()=>(0,P.fT)(e.id,F,R),className:"text-center",children:null===e.calculo?"-":e.produtoProtocolo.length<=0?"DESTINAT\xc1RIO":"FORNECEDOR"}),(0,p.jsx)("td",{onClick:()=>(0,P.fT)(e.id,F,R),className:"text-center",children:null===e.calculo?"-":e.produtoProtocolo.length<=0?(0,p.jsx)(r.Ex,{color:"light-danger",children:"Sem Protocolo"}):(0,p.jsx)(r.Ex,{color:"light-primary",children:null===(c=e.produtoProtocolo)||void 0===c?void 0:c.map((e=>(0,p.jsxs)(p.Fragment,{children:[e.base_legal_st,(0,p.jsx)("br",{})]})))})}),(0,p.jsx)("td",{className:"text-center",children:(0,p.jsxs)("div",{className:"d-flex justifyc-content-center gap-05",children:[(0,p.jsxs)("span",{className:"tooltipCustom",children:[(0,p.jsx)(a.A,{size:18,onClick:()=>{return t=e.id,s=e.produto.nome_produto,I(!$),ue(t.toString()),void he(s);var t,s}}),(0,p.jsx)("span",{className:"tooltiptext",children:"Editar produto"})]}),(0,p.jsxs)("span",{className:"tooltipCustom",children:[(0,p.jsx)(l.A,{onClick:()=>async function(e){(await U.fire({title:"Apagar produto? ",icon:"warning",showCancelButton:!0,confirmButtonText:"Sim, apagar o produto",cancelButtonText:"Cancelar",customClass:{actions:"gap-1",confirmButton:"btn btn-primary",cancelButton:"btn btn-outline-secondary ml-1"},buttonsStyling:!1})).value&&(U.fire({icon:"success",title:"Parab\xe9ns!",text:"o Produto foi apagado com sucesso",customClass:{confirmButton:"btn btn-success"}}),d.A.delete(`/simulador/pedidos/produtos/${e}`).then((()=>{ae(!ce)})).catch((()=>{})))}(e.id),size:18}),(0,p.jsx)("span",{className:"tooltiptext",children:"Excluir produto"})]})]})})]},e.id),F.includes(e.id)?(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)("tr",{className:"details-tr",children:[(0,p.jsx)("th",{colSpan:"1"}),(0,p.jsx)("th",{className:"text-center",children:"QTD"}),(0,p.jsx)("th",{className:"text-center valor-icms",children:"VALOR UNIT\xc1RIO"}),(0,p.jsx)("th",{className:"text-center",children:"DESCONTO"}),(0,p.jsx)("th",{className:"text-center",children:"IPI"}),(0,p.jsx)("th",{className:"text-center",children:"SEGURO"}),(0,p.jsx)("th",{className:"text-center",children:"FRETE"}),(0,p.jsx)("th",{className:"text-center",children:"BASE C\xc1LCULO"}),(0,p.jsx)("th",{className:"text-center",children:"D\xc9BITO"}),(0,p.jsx)("th",{className:"text-center",children:"CR\xc9DITO"}),(0,p.jsx)("th",{colSpan:"2"})]},e.id),(0,p.jsxs)("tr",{className:"details-tr",children:[(0,p.jsx)("td",{colSpan:"1"}),(0,p.jsx)("td",{className:"text-center",children:e.quantidade}),(0,p.jsx)("td",{className:"text-center",children:e.vUnit.toLocaleString("pt-br",{minimumFractionDigits:6,style:"currency",currency:"BRL"})}),(0,p.jsx)("td",{className:"text-center",children:parseFloat(null===e.calculo?0:e.calculo.descpiscofins).toLocaleString("pt-br",{style:"currency",currency:"BRL"})}),(0,p.jsx)("td",{className:"text-center",children:parseFloat(null===e.calculo||null===e.IPI?0:e.IPI).toLocaleString("pt-br",{style:"currency",currency:"BRL"})}),(0,p.jsx)("td",{className:"text-center",children:parseFloat(null===e.calculo?0:e.vSeg).toLocaleString("pt-br",{style:"currency",currency:"BRL"})}),(0,p.jsx)("td",{className:"text-center",children:parseFloat(null===e.calculo?0:e.vFrete).toLocaleStr
1ing("pt-br",{style:"currency",currency:"BRL"})}),(0,p.jsx)("td",{className:"text-center",children:parseFloat(null===e.calculo?0:e.calculo.basedoimposto).toLocaleString("pt-br",{style:"currency",currency:"BRL"})}),(0,p.jsx)("td",{className:"text-center",children:parseFloat(null===e.calculo?0:e.calculo.debitoicmsst).toLocaleString("pt-br",{style:"currency",currency:"BRL"})}),(0,p.jsx)("td",{className:"text-center",children:parseFloat(null===e.calculo?0:e.calculo.creditoicmsst).toLocaleString("pt-br",{style:"currency",currency:"BRL"})}),(0,p.jsx)("td",{colSpan:"2"})]})]}):null]})})):null]})]}),!1===se?(0,p.jsx)("div",{className:"d-flex justify-content-center mt-1",children:(0,p.jsx)(r.y$,{color:"primary"})}):null]})})]}):null]})}}}]); 2//# sourceMappingURL=167.3b821c14cd3d73ed5711.chunk.js.map
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.