PageSourceSearch

https://app.stoqui.com.br/assets/FiscalRegrasPage-BkaXvGCN.js

js stoqui.com.br collected 2026-10-01 15:18:54 UTC 3,360 bytes, 1 lines download raw bytes

1import{j as e,a7 as n,a6 as x,ab as r,T as t,N as l,Q as b,R as h,as as j,ac as y}from"./mui-CRsYZxVY.js";import{b as v,T as c,b3 as p,b8 as I,_ as S}from"./index-TALscxEc.js";import{C}from"./ContadorAlert-CyWIwwQ8.js";import{u as _}from"./useFiscalConfig-CQEKyhOW.js";import{u as T}from"./useFiscalRegras-D5dYwavN.js";import{i as N}from"./fiscalOptions-BZ76yhnP.js";import"./vendor-Dwao9eNC.js";import"./query-8ViTdhdk.js";import"./datePickers-BIJXYOKG.js";import"./icons-D8aatgQ4.js";import"./lab-DSem1Osk.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};s.SENTRY_RELEASE={id:"2ad85febf9735404429b0670d4acf56a0af5a0a2"}}catch{}})();try{(function(){var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new s.Error().stack;a&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[a]="a3eb690a-2fd0-43d3-827b-df0909b6b2b5",s._sentryDebugIdIdentifier="sentry-dbid-a3eb690a-2fd0-43d3-827b-df0909b6b2b5")})()}catch{}const R=s=>{const a=[`ICMS ${s.icms_cst}`];return s.icms_aliquota!=null&&a.push(`${Number(s.icms_aliquota).toLocaleString("pt-BR",{maximumFractionDigits:4})}%`),s.pis_cst===s.cofins_cst?a.push(`PIS/COFINS ${s.pis_cst}`):a.push(`PIS ${s.pis_cst}`,`COFINS ${s.cofins_cst}`),a.join(" · ")},M=()=>{const s=v(),{data:a,isLoading:f}=_(),o=N(a==null?void 0:a.formData.crt),{data:u,isLoading:m,isError:g}=T(o);if(f||o&&m)return e.jsx(n,{sx:{height:"70vh",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(x,{})});if(!o)return e.jsxs(n,{p:2,children:[e.jsx(c,{title:"Regras de tributação",navigateBack:!0}),e.jsx(p,{severity:"info",children:"As regras de tributação só se aplicam a empresas do Regime normal. Empresas do Simples Nacional e MEI usam os padrões fiscais."})]});const d=u??[];return e.jsxs(n,{p:2,children:[e.jsx(c,{title:"Regras de tributação",navigateBack:!0}),e.jsxs(r,{spacing:2,children:[e.jsx(C,{}),g?e.jsx(p,{severity:"error",children:"Erro ao carregar as regras. Por favor, tente novamente."}):d.length===0?e.jsxs(r,{spacing:1.5,children:[e.jsx(t,{variant:"body2",color:"text.secondary",children:"A primeira regra vira a regra padrão e vale para todos os produtos. Depois, se alguns produtos tiverem tributação diferente, crie outras regras e ligue-as por NCM ou no cadastro do produto."}),e.jsx(l,{variant:"contained",onClick:()=>s("/profile/fiscal/regras/nova"),sx:{alignSelf:"flex-start"},children:"Criar regra padrão"})]}):e.jsxs(e.Fragment,{children:[e.jsx(b,{disablePadding:!0,children:d.map(i=>e.jsx(h,{disablePadding:!0,children:e.jsx(j,{onClick:()=>s(`/profile/fiscal/regras/${i.id}`),children:e.jsx(y,{disableTypography:!0,primary:e.jsxs(r,{direction:"row",spacing:1,alignItems:"center",sx:{minWidth:0},children:[e.jsx(t,{component:"div",sx:I,noWrap:!0,children:i.nome}),i.padrao&&e.jsx(S,{label:"Padrão",tint:"brand"})]}),secondary:e.jsxs(r,{sx:{minWidth:0},children:[e.jsx(t,{variant:"caption",color:"text.secondary",noWrap:!0,children:R(i)}),i.ncms.length>0&&e.jsxs(t,{variant:"caption",color:"text.secondary",noWrap:!0,children:["NCM ",i.ncms.join(", ")]})]})})})},i.id))}),e.jsx(l,{variant:"contained",onClick:()=>s("/profile/fiscal/regras/nova"),sx:{alignSelf:"flex-start"},children:"Nova regra"})]})]})]})};export{M as default};

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.