Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@linvix-sistemas/calculadora-tributaria-js

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@linvix-sistemas/calculadora-tributaria-js - npm Package Compare versions

Comparing version 1.0.15 to 1.0.17

dist/interfaces/cofins/index.d.ts

2

dist/implementacoes/cofins/Cofins01.d.ts

@@ -1,2 +0,2 @@

import { ICofins01 } from "../../interfaces/index";
import { ICofins01 } from "../../interfaces/cofins";
export declare class Cofins01 implements ICofins01 {

@@ -3,0 +3,0 @@ private valorProduto;

@@ -1,4 +0,4 @@

import { ICofins02 } from "../../interfaces/index";
import { ICofins02 } from "../../interfaces/cofins";
import { Cofins01 } from "./Cofins01";
export declare class Cofins02 extends Cofins01 implements ICofins02 {
}

@@ -1,2 +0,2 @@

import { ICofins03 } from "../../interfaces/index";
import { ICofins03 } from "../../interfaces/cofins";
export declare class Cofins03 implements ICofins03 {

@@ -3,0 +3,0 @@ private baseCalculo;

@@ -1,2 +0,2 @@

import { IIcms00 } from "../../../interfaces/index";
import { IIcms00 } from "../../../interfaces/icms";
/**

@@ -3,0 +3,0 @@ * 00 - Tributada integralmente

@@ -1,2 +0,2 @@

import { IIcms10 } from "../../../interfaces/index";
import { IIcms10 } from "../../../interfaces/icms";
/**

@@ -3,0 +3,0 @@ * 10 - Tributada e com cobrança do ICMS por substituição tributária

@@ -1,2 +0,2 @@

import { IIcms101 } from "../../../interfaces/index";
import { IIcms101 } from "../../../interfaces/icms";
export declare class Icms101 implements IIcms101 {

@@ -3,0 +3,0 @@ private valorProduto;

@@ -1,2 +0,2 @@

import { IIcms20 } from "../../../interfaces/index";
import { IIcms20 } from "../../../interfaces/icms";
/**

@@ -3,0 +3,0 @@ * 20 - Tributada com redução de base de cálculo

@@ -1,2 +0,2 @@

import { IIcms201 } from "../../../interfaces/index";
import { IIcms201 } from "../../../interfaces/icms";
export declare class Icms201 implements IIcms201 {

@@ -3,0 +3,0 @@ private valorProduto;

@@ -1,2 +0,2 @@

import { IIcms202 } from "../../../interfaces/index";
import { IIcms202 } from "../../../interfaces/icms";
export declare class Icms202 implements IIcms202 {

@@ -3,0 +3,0 @@ private valorProduto;

@@ -1,4 +0,4 @@

import { IIcms203 } from "../../../interfaces/index";
import { IIcms203 } from "../../../interfaces/icms";
import { Icms202 } from "./Icms202";
export declare class Icms203 extends Icms202 implements IIcms203 {
}

@@ -1,2 +0,2 @@

import { IIcms30 } from "../../../interfaces/index";
import { IIcms30 } from "../../../interfaces/icms";
/**

@@ -3,0 +3,0 @@ * 30 - Isenta ou não tributada e com cobrança do ICMS por substituição tributária

@@ -1,2 +0,2 @@

import { IIcms51 } from "../../../interfaces/index";
import { IIcms51 } from "../../../interfaces/icms";
/**

@@ -3,0 +3,0 @@ * 51 - Diferimento

@@ -1,2 +0,2 @@

import { IIcms70 } from "../../../interfaces/index";
import { IIcms70 } from "../../../interfaces/icms";
/**

@@ -3,0 +3,0 @@ * 70 - Tributada com redução de base de cálculo e com cobrança do ICMS por substituição tributária

@@ -1,2 +0,2 @@

import { IIcms90 } from "../../../interfaces/index";
import { IIcms90 } from "../../../interfaces/icms";
/**

@@ -3,0 +3,0 @@ * 90 - Outras

@@ -1,2 +0,2 @@

import { IIcms900 } from "../../../interfaces/index";
import { IIcms900 } from "../../../interfaces/icms";
export declare class Icms900 implements IIcms900 {

@@ -3,0 +3,0 @@ private valorProduto;

@@ -1,2 +0,2 @@

import { IFcp } from "../../../interfaces/index";
import { IFcp } from "../../../interfaces/icms";
export declare class Fcp implements IFcp {

@@ -3,0 +3,0 @@ private baseCalculo;

@@ -1,2 +0,2 @@

import { IFcpDif } from "../../../interfaces/index";
import { IFcpDif } from "../../../interfaces/icms";
export declare class FcpDiferido implements IFcpDif {

@@ -3,0 +3,0 @@ private valorFCP;

@@ -1,2 +0,2 @@

import { IFcpEfet } from "../../../interfaces/index";
import { IFcpEfet } from "../../../interfaces/icms";
export declare class FcpEfetivo implements IFcpEfet {

@@ -3,0 +3,0 @@ private valorFCP;

@@ -1,2 +0,2 @@

import { IFcpST } from "../../../interfaces/index";
import { IFcpST } from "../../../interfaces/icms";
export declare class FcpST implements IFcpST {

@@ -3,0 +3,0 @@ private baseCalculoST;

@@ -19,3 +19,4 @@ import { BaseIPI } from "../../ipi/BaseIPI";

const aliquotaIPI = 10.0;
const ipi50AdValorem = new Ipi50AdValorem(valorProduto, valorFrete, valorSeguro, despesasAcessorias, aliquotaIPI);
const valorDesconto = 0;
const ipi50AdValorem = new Ipi50AdValorem(valorProduto, valorFrete, valorSeguro, despesasAcessorias, valorDesconto, aliquotaIPI);
expect(ipi50AdValorem.calculaBaseIPI()).toStrictEqual(186.95);

@@ -22,0 +23,0 @@ expect(ipi50AdValorem.calculaValorIPI()).toStrictEqual(18.7);

@@ -6,4 +6,5 @@ export declare class BaseIPI {

private valorOutrasDespesas;
constructor(valorProduto: number, valorFrete: number, valorSeguro: number, valorOutrasDespesas: number);
private valorDesconto;
constructor(valorProduto: number, valorFrete: number, valorSeguro: number, valorOutrasDespesas: number, valorDesconto?: number);
calculaBaseIPI(): number;
}

@@ -7,3 +7,4 @@ import Utils from "../../utils/index";

valorOutrasDespesas;
constructor(valorProduto, valorFrete, valorSeguro, valorOutrasDespesas) {
valorDesconto;
constructor(valorProduto, valorFrete, valorSeguro, valorOutrasDespesas, valorDesconto = 0) {
this.valorProduto = valorProduto;

@@ -13,7 +14,8 @@ this.valorFrete = valorFrete;

this.valorOutrasDespesas = valorOutrasDespesas;
this.valorDesconto = valorDesconto;
}
calculaBaseIPI() {
const baseIpi = this.valorProduto + this.valorFrete + this.valorSeguro + this.valorOutrasDespesas;
const baseIpi = this.valorProduto + this.valorFrete + this.valorSeguro + this.valorOutrasDespesas - this.valorDesconto;
return Utils.roundToNearest(baseIpi, 2);
}
}

@@ -1,2 +0,2 @@

import { IIpi50AdValorem } from "../../interfaces/index";
import { IIpi50AdValorem } from "../../interfaces/ipi";
export declare class Ipi50AdValorem implements IIpi50AdValorem {

@@ -7,7 +7,8 @@ private valorProduto;

private valorOutrasDespesas;
private valorDesconto;
private aliquotaIPI;
private baseCalculo;
constructor(valorProduto: number, valorFrete: number, valorSeguro: number, valorOutrasDespesas: number, aliquotaIPI: number);
constructor(valorProduto: number, valorFrete: number, valorSeguro: number, valorOutrasDespesas: number, valorDesconto: number, aliquotaIPI: number);
calculaBaseIPI(): number;
calculaValorIPI(): number;
}

@@ -8,5 +8,6 @@ import Utils from "../../utils/index";

valorOutrasDespesas;
valorDesconto;
aliquotaIPI;
baseCalculo;
constructor(valorProduto, valorFrete, valorSeguro, valorOutrasDespesas, aliquotaIPI) {
constructor(valorProduto, valorFrete, valorSeguro, valorOutrasDespesas, valorDesconto, aliquotaIPI) {
this.valorProduto = valorProduto;

@@ -16,4 +17,5 @@ this.valorFrete = valorFrete;

this.valorOutrasDespesas = valorOutrasDespesas;
this.valorDesconto = valorDesconto;
this.aliquotaIPI = aliquotaIPI;
this.baseCalculo = new BaseIPI(valorProduto, valorFrete, valorSeguro, valorOutrasDespesas);
this.baseCalculo = new BaseIPI(valorProduto, valorFrete, valorSeguro, valorOutrasDespesas, valorDesconto);
}

@@ -20,0 +22,0 @@ calculaBaseIPI() {

@@ -1,2 +0,2 @@

import { IIpiEspecifico } from "../../interfaces/index";
import { IIpiEspecifico } from "../../interfaces/ipi";
export declare class Ipi50Especifico implements IIpiEspecifico {

@@ -3,0 +3,0 @@ /**

@@ -1,2 +0,2 @@

import { IPis01 } from "../../interfaces/index";
import { IPis01 } from "../../interfaces/pis";
export declare class Pis01 implements IPis01 {

@@ -3,0 +3,0 @@ private valorProduto;

@@ -1,4 +0,4 @@

import { IPis02 } from "../../interfaces/index";
import { IPis02 } from "../../interfaces/pis";
import { Pis01 } from "./Pis01";
export declare class Pis02 extends Pis01 implements IPis02 {
}

@@ -1,2 +0,2 @@

import { IPis03 } from "../../interfaces/index";
import { IPis03 } from "../../interfaces/pis";
export declare class Pis03 implements IPis03 {

@@ -3,0 +3,0 @@ private baseCalculo;

{
"name": "@linvix-sistemas/calculadora-tributaria-js",
"version": "1.0.15",
"version": "1.0.17",
"description": "Biblioteca para cálculos fiscais na NFe/NFCe",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -1,2 +0,2 @@

import { ICofins01 } from "@interfaces/index";
import { ICofins01 } from "@interfaces/cofins";

@@ -3,0 +3,0 @@ import { BaseCofins } from "./BaseCofins";

@@ -1,2 +0,2 @@

import { ICofins02 } from "@interfaces/index";
import { ICofins02 } from "@interfaces/cofins";

@@ -3,0 +3,0 @@ import { Cofins01 } from "./Cofins01";

@@ -1,2 +0,2 @@

import { ICofins03 } from "@interfaces/index";
import { ICofins03 } from "@interfaces/cofins";

@@ -3,0 +3,0 @@ import Utils from "@utils/index";

@@ -1,2 +0,2 @@

import { IIcms00 } from "@interfaces/index";
import { IIcms00 } from "@interfaces/icms";

@@ -3,0 +3,0 @@ import { BaseIcmsProprio } from "../components/BaseIcmsProprio";

@@ -9,3 +9,3 @@ import Utils from "@utils/index";

import { ValorIcmsST } from "@implementacoes/icms/components/ValorIcmsST";
import { IIcms10 } from "@interfaces/index";
import { IIcms10 } from "@interfaces/icms";

@@ -12,0 +12,0 @@ /**

import Utils from "@utils/index";
import { IIcms101 } from "@interfaces/index";
import { IIcms101 } from "@interfaces/icms";

@@ -4,0 +4,0 @@ import { BaseIcmsProprio } from "../components/BaseIcmsProprio";

import Utils from "@utils/index";
import { IIcms20 } from "@interfaces/index";
import { IIcms20 } from "@interfaces/icms";

@@ -4,0 +4,0 @@ import { BaseReduzidaIcmsProprio } from "../components/BaseReduzidaIcmsProprio";

import Utils from "@utils/index";
import { IIcms201 } from "@interfaces/index";
import { IIcms201 } from "@interfaces/icms";

@@ -4,0 +4,0 @@ import { BaseIcmsST } from "../components/BaseIcmsST";

@@ -1,2 +0,2 @@

import { IIcms202 } from "@interfaces/index";
import { IIcms202 } from "@interfaces/icms";

@@ -3,0 +3,0 @@ import { BaseIcmsST } from "@implementacoes/icms/components/BaseIcmsST";

@@ -1,4 +0,4 @@

import { IIcms203 } from "@interfaces/index";
import { IIcms203 } from "@interfaces/icms";
import { Icms202 } from "./Icms202";
export class Icms203 extends Icms202 implements IIcms203 {}

@@ -1,2 +0,2 @@

import { IIcms30 } from "@interfaces/index";
import { IIcms30 } from "@interfaces/icms";

@@ -3,0 +3,0 @@ import { BaseIcmsST } from "../components/BaseIcmsST";

import Utils from "@utils/index";
import { IIcms51 } from "@interfaces/index";
import { IIcms51 } from "@interfaces/icms";

@@ -4,0 +4,0 @@ import { BaseIcmsProprio } from "../components/BaseIcmsProprio";

import Utils from "@utils/index";
import { IIcms70 } from "@interfaces/index";
import { IIcms70 } from "@interfaces/icms";

@@ -4,0 +4,0 @@ import { BaseIcmsST } from "../components/BaseIcmsST";

import Utils from "@utils/index";
import { IIcms90 } from "@interfaces/index";
import { IIcms90 } from "@interfaces/icms";
import { BaseIcmsST } from "@implementacoes/icms/components/BaseIcmsST";

@@ -5,0 +5,0 @@ import { BaseIcmsProprio } from "@implementacoes/icms/components/BaseIcmsProprio";

import Utils from "@utils/index";
import { IIcms900 } from "@interfaces/index";
import { IIcms900 } from "@interfaces/icms";

@@ -4,0 +4,0 @@ import { BaseIcmsProprio } from "../components/BaseIcmsProprio";

import Utils from "@utils/index";
import { IFcp } from "@interfaces/index";
import { IFcp } from "@interfaces/icms";

@@ -4,0 +4,0 @@ export class Fcp implements IFcp {

@@ -1,2 +0,2 @@

import { IFcpDif } from "@interfaces/index";
import { IFcpDif } from "@interfaces/icms";
import Utils from "@utils/index";

@@ -3,0 +3,0 @@

@@ -1,2 +0,2 @@

import { IFcpEfet } from "@interfaces/index";
import { IFcpEfet } from "@interfaces/icms";
import Utils from "@utils/index";

@@ -3,0 +3,0 @@

@@ -1,2 +0,2 @@

import { IFcpST } from "@interfaces/index";
import { IFcpST } from "@interfaces/icms";
import Utils from "@utils/index";

@@ -3,0 +3,0 @@

@@ -23,2 +23,3 @@ import { BaseIPI } from "@implementacoes/ipi/BaseIPI";

const aliquotaIPI = 10.0;
const valorDesconto = 0;

@@ -30,2 +31,3 @@ const ipi50AdValorem = new Ipi50AdValorem(

despesasAcessorias,
valorDesconto,
aliquotaIPI,

@@ -32,0 +34,0 @@ );

@@ -8,4 +8,11 @@ import Utils from "@utils/index";

private valorOutrasDespesas: number;
private valorDesconto: number;
constructor(valorProduto: number, valorFrete: number, valorSeguro: number, valorOutrasDespesas: number) {
constructor(
valorProduto: number,
valorFrete: number,
valorSeguro: number,
valorOutrasDespesas: number,
valorDesconto = 0,
) {
this.valorProduto = valorProduto;

@@ -15,6 +22,8 @@ this.valorFrete = valorFrete;

this.valorOutrasDespesas = valorOutrasDespesas;
this.valorDesconto = valorDesconto;
}
calculaBaseIPI(): number {
const baseIpi: number = this.valorProduto + this.valorFrete + this.valorSeguro + this.valorOutrasDespesas;
const baseIpi: number =
this.valorProduto + this.valorFrete + this.valorSeguro + this.valorOutrasDespesas - this.valorDesconto;

@@ -21,0 +30,0 @@ return Utils.roundToNearest(baseIpi, 2);

@@ -1,2 +0,2 @@

import { IIpi50AdValorem } from "@interfaces/index";
import { IIpi50AdValorem } from "@interfaces/ipi";
import Utils from "@utils/index";

@@ -11,2 +11,3 @@

private valorOutrasDespesas: number;
private valorDesconto: number;
private aliquotaIPI: number;

@@ -20,2 +21,3 @@ private baseCalculo: BaseIPI;

valorOutrasDespesas: number,
valorDesconto: number,
aliquotaIPI: number,

@@ -27,5 +29,6 @@ ) {

this.valorOutrasDespesas = valorOutrasDespesas;
this.valorDesconto = valorDesconto;
this.aliquotaIPI = aliquotaIPI;
this.baseCalculo = new BaseIPI(valorProduto, valorFrete, valorSeguro, valorOutrasDespesas);
this.baseCalculo = new BaseIPI(valorProduto, valorFrete, valorSeguro, valorOutrasDespesas, valorDesconto);
}

@@ -32,0 +35,0 @@

@@ -1,2 +0,2 @@

import { IIpiEspecifico } from "@interfaces/index";
import { IIpiEspecifico } from "@interfaces/ipi";

@@ -3,0 +3,0 @@ import Utils from "@utils/index";

@@ -1,2 +0,2 @@

import { IPis01 } from "@interfaces/index";
import { IPis01 } from "@interfaces/pis";

@@ -3,0 +3,0 @@ import { BasePIS } from "./BasePIS";

@@ -1,2 +0,2 @@

import { IPis02 } from "@interfaces/index";
import { IPis02 } from "@interfaces/pis";

@@ -3,0 +3,0 @@ import { Pis01 } from "./Pis01";

@@ -1,2 +0,2 @@

import { IPis03 } from "@interfaces/index";
import { IPis03 } from "@interfaces/pis";

@@ -3,0 +3,0 @@ import Utils from "@utils/index";

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc