slpa.billing.ec
SDK for electronic Billing on Ecuador
Last updated 4 years ago by sillpasaec .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install slpa.billing.ec 
SYNC missed versions from official npm registry.

slpaBillingEC NPM version Build Status Build Status Dependency Status Coverage percentage

SDK for electronic Billing on Ecuador

Installation

$ npm install --save slpa.billing.ec

Usage

let BillingEC = require('slpa.billing.ec').BillingEC;
let billing   = new BillingEC(
  {
    type: 1,
    region: 'aws-region',
    bucket: 'aws-s3-bucket',
    key: 'path/to/signature.p12',
    environment: 1, // 1: test, 2: production
    pass: '********' //Password of signature
  }
);

let document = {
  infoTributaria: {
    razonSocial: 'Inceptos Vehicula',
    nombreComercial: "Inceptos Vehicula",
    ruc: "1000000001001",
    estab: "001",
    ptoEmi: "001",
    secuencial: '000000001',
    dirMatriz: "Amet Porta Dapibus Vehicula"
  },
  infoFactura: {
    fechaEmision: 'DD/MM/YYYY',
    dirEstablecimiento: 'Amet Porta Dapibus Vehicula',
    contribuyenteEspecial: "5368",
    obligadoContabilidad: "SI",
    tipoIdentificacionComprador: "04",
    guiaRemision: "001-001-000000001",
    razonSocialComprador: "Nullam Sit",
    identificacionComprador: "1000000001001",
    direccionComprador: "Amet Porta Dapibus Vehicula",
    totalSinImpuestos: 100,
    totalDescuento: 0,
    totalConImpuestos: [ {
      codigo: 2,
      codigoPorcentaje: 2,
      descuentoAdicional: 0,
      baseImponible: 100,
      valor: 12
    } ],
    propina: 0,
    importeTotal: 112,
    moneda: "DOLAR"
  },
  detalles: [ {
    codigoPrincipal: "123",
    codigoAuxiliar: "INT-123",
    descripcion: "Amet Porta Dapibus Vehicula",
    cantidad: 1,
    precioUnitario: 100,
    descuento: 0,
    precioTotalSinImpuesto: 100,
    detallesAdicionales: [ {
      nombre: "Amet Porta Dapibus Vehicula",
      valor: "Amet Porta Dapibus Vehicula"
    } ],
    impuestos: [ {
      codigo: 2,
      codigoPorcentaje: 2,
      tarifa: 12,
      baseImponible: 100,
      valor: 12
    } ]
  } ],
  infoAdicional: [ {
    nombre: "Amet Porta Dapibus Vehicula",
    valor: "Amet Porta Dapibus Vehicula"
  } ]
};
billing.process(document, (err, claveAcceso) => {
  if (err) {
    throw err;
  }

  billing.authorize(claveAcceso, (err, result) => {
    if (err) {
      done(err);
    }
  });

});

License

MIT © Jose Santacruz

Current Tags

  • 1.1.4                                ...           latest (4 years ago)

10 Versions

  • 1.1.4                                ...           4 years ago
  • 1.1.1                                ...           4 years ago
  • 1.0.9                                ...           4 years ago
  • 1.0.8                                ...           4 years ago
  • 1.0.7                                ...           4 years ago
  • 1.0.6                                ...           4 years ago
  • 1.0.5                                ...           4 years ago
  • 1.0.3                                ...           4 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 10
Dependencies (10)
Dependents (2)

Copyright 2014 - 2016 © taobao.org |