Tag Archives: ICMS e IBS

Taxation in foreign trade: impact of the tax reform on imports, exports and non-incidence of VAT

Understand how the Tax Reform VAT affects imports, exports, credits and compliance in trade [...]

`; return html; } // abre nova janela com o conteúdo e imprime function printInNewWindow(){ // tenta atualizar resultados antes try{ if(typeof window.calcularLP === 'function') window.calcularLP(); } catch(e){ console.warn('calcularLP erro:',e); } const content = buildPrintContent(); const newWin = window.open('', '_blank', 'noopener'); if(!newWin){ alert('Não foi possível abrir a janela de impressão (bloqueador de pop-up?). Permita pop-ups e tente de novo.'); return; } // escreve e aguarda carregar newWin.document.open(); newWin.document.write(content); newWin.document.close(); // Alguns navegadores (Chrome) exigem aguardar repaint/load const tryPrint = () => { try{ newWin.focus(); // print e fecha (timeout dá tempo p/ diálogo abrir em alguns browsers) newWin.print(); setTimeout(()=> newWin.close(), 500); } catch(err){ console.error('Erro ao imprimir nova janela:', err); try{ newWin.close(); }catch(e){} } }; // se o documento já estiver pronto, imprime; senão espera load if (newWin.document.readyState === 'complete') { setTimeout(tryPrint, 200); } else { newWin.addEventListener('load', () => setTimeout(tryPrint, 200)); // fallback: tenta após 700ms setTimeout(tryPrint, 700); } } // substituir handler antigo do botão por este método (remove listeners anteriores) function replacePrintButtonHandler(){ const btn = document.getElementById('btnPrint'); if(!btn) return; const clone = btn.cloneNode(true); btn.parentNode.replaceChild(clone, btn); clone.addEventListener('click', printInNewWindow); } if(document.readyState === 'loading') document.addEventListener('DOMContentLoaded', replacePrintButtonHandler); else setTimeout(replacePrintButtonHandler, 0); })();
By continuing, you agree that this website uses cookies only for statistical purposes and functions that enhance your browsing, without personal tracking.