npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@ci24/ci-liquidate-service

v1.7.3

Published

Servicio para realizar el calculo de la tarifa, y realizar los registros de Convenios y transacciones

Downloads

183

Readme

Modulo para Calcular Las Tarifas de Controles Inteligentes @ci24/ci-liquidate-service

Descripcion

Servicio para realizar el calculo de la tarifa, y realizar los registros de Convenios y transacciones

Instalación

npm install --save @ci24/ci-liquidate-service

Como usarlo

Este modulo necesita de un archivo de configuracion ubicado en:

 /free/CI24/Settings/liquidate.json
 o
 C:\\ProgramData\\CI24\\Settings\\Liquidate\\liquidate.json

El archivo debe tener lo siguiente:

{
    "DBName": "/free/CI24/SDKDB/liquidate.db",
    "IPServerAurora": "192.168.14.70",
    "PortServerAurora": 3050,
    "Db": 0,        //Version de base de datos 0 - Sqlite, 1 - SQL Server, 2 -  MySQL
    "connectionString": "mssql://ci24:[email protected]/CI_ParkingCI24",     //Cadena de conexion si es sql server la bd
    "UUID": "ABCDEF123456"      //Mac o id unico que identifica el dispositivo, esto para los settings y la sincronizacion
}

La base de datos debe existir y tener la estructura de tablas necesaria para hacer la sincronización, la ip y el puerto son del computador que tenga el servicio de sincronización previamente configurado.

Si ve a usar como libreria se puede obviar este paso y al inicializar el modulo se le pasan estos settings.

var liquidate = require('@ci24/ci-liquidate-service');

var settings = {
    "PortListenServerSDK": 0,
    "PathLogs": "/free/CI24/Logs/",
    "DBName": "/free/CI24/SDKDB/liquidate.db",
    "IPServerAurora": "192.168.2.88",
    "PortServerAurora": 3050
};

liquidate = new liquidate(settings);
liquidate.SyncDatabase(function (err) {
    if(err == null)
    {
        console.log("sync ok");

        //el objeto "data" a continuacion es devuelto por la funcion "LiquidateService"


        "liquidation": {
                "Type": 0,
                "Type_Name": "Normal_Card",
                "Response": 1,
                "Response_String": "CARD_DATA",
                "Update_Card": true,
                "MinToExit": 5,
                "MinToExit_View": 5,
                "IdCompany": 5,
                "IdSite": 14,
                "IdZone": 14,
                "Billing": {
                    "TipoCobro": 0,
                    "RateName": "Rate Evento Marriot",
                    "Plate": "test",
                    "EntryDate": "2018-01-18 06:00:00",
                    "EntryDate_View": "18-01-2018 06:00:00",
                    "Cash": 0,
                    "Change": 0,
                    "Change_Left": 0,
                    "InvoiceDate": "2018-01-22 14:24:35",
                    "InvoiceDate_View": "22-01-2018 14:24:35",
                    "IdConsola": 8,
                    "IdToken": "3037199480",
                    "MinutesBilled": 6264,
                    "TotalWithoutTaxes": 5.38,
                    "TotalTaxes": 0.62,
                    "SubTotal": 5.38,
                    "TotalAdjustments": 0,
                    "Total": 6,
                    "MinutesAgreements": 0,
                    "TotalAgreements": 0,
                    "IdEntry": 0,
                    "BillingItems": [
                        {
                            "IdRate": 11,
                            "TotalWithoutTaxes": 5.38,
                            "TotalTaxes": 0.62,
                            "SubTotal": 5.38,
                            "TotalAdjustments": 0,
                            "Total": 6,
                            "TaxesApplied": [
                                {
                                    "Id_Tax": 3,
                                    "TaxValue": 10.5,
                                    "Total": 0.57
                                },
                                {
                                    "Id_Tax": 4,
                                    "TaxValue": 1,
                                    "Total": 0.05
                                }
                            ],
                            "AgreementsApplied": [
                                {
                                    "Minutes": 60,
                                    "Total": 6,
                                    "Id_Agreement": 11,
                                    "AgreementName": "AC 1",
                                    "AgreementType": 6
                                },
                                {
                                    "Minutes": 300,
                                    "Total": 6,
                                    "Id_Agreement": 1,
                                    "AgreementName": "2 Horas Adicionales - 1",
                                    "AgreementType": 1
                                },
                                {
                                    "Minutes": 120,
                                    "Total": 6,
                                    "Id_Agreement": 2,
                                    "AgreementName": "2 horas Adicionales - 2",
                                    "AgreementType": 1
                                },
                                {
                                    "Id_AgreementsApplied": "1516649075182",
                                    "Id_Device": 13,
                                    "Id_Transaction": "8-569570400",
                                    "Token": "3037199480",
                                    "Id_Billing": 0,
                                    "Id_BillingItem": 0,
                                    "DateIn": "2018-01-18 06:00:00",
                                    "LastInsert": "2018-01-22T19:24:35.182Z",
                                    "LastUpdate": "2018-01-22T19:24:35.182Z",
                                    "IsDelete": 0,
                                    "Total": 6,
                                    "Id_Agreement": 12,
                                    "AgreementName": "Evento Marriot",
                                    "AgreementType": 5,
                                    "Minutes": 0
                                }
                            ]
                        }
                    ],
                    "Card_Payment": {
                        "Tarjeta_Last4Numbers": "",
                        "Tarjeta_Franquicia": "",
                        "Tarjeta_Tipo": "",
                        "Tarjeta_Fecha_Pago": "",
                        "Tarjeta_Hora_Pago": "",
                        "Tarjeta_ID_Punto": "",
                        "Tarjeta_RRN": "",
                        "Tarjeta_Numero_Cuotas": "",
                        "Tarjeta_Version_POS": "",
                        "Tarjeta_Version_PPA": ""
                    },
                    "Nequi_Payment": {},
                    "MSR_Payment": {
                        "Date": "",
                        "Time": "",
                        "Host": "",
                        "Batch": "",
                        "TerminalID": "",
                        "MerchandID": "",
                        "Acc_Type": "",
                        "Acc_Number": "",
                        "Auth_Code": "",
                        "Trace": ""
                    }
                },
                "Data_Normal": {
                    "Is_Pase_Dia": false,
                    "Status": -1,
                    "Status_String": "No_DayPass_Service",
                    "Is_Moroso": false,
                    "Id_Moroso": 0,
                    "Moroso_Value": 0,
                    "Is_Validate": false,
                    "Is_Misc": false,
                    "Concept_Misc": "",
                    "Is_NoCard_Rate": false,
                    "Is_VIP_Pago": false,
                    "Is_VIP_Pago_Active": false
                },
                "Data_Mensual": {
                    "dateINI": "2018-01-22 14:24:34",
                    "horaINI": "14:24:34",
                    "dateFIN": "2018-01-22 14:24:34",
                    "horaFIN": "14:24:34",
                    "User_Name": "",
                    "Company_Name": "",
                    "DiasPermitidos": 0
                }
            }


    }
    else
    {
        console.log("sync err %s", err);
    }

});

Funciones

SyncDatabase: Inicializa la base de datos, sincroniza la base de datos contra el servidor, fundamental para que el programa pueda realizar las diferentes tareas.

billing.SyncDatabase(function (err) {
    if(err == null)
    {
        console.log("sync ok");
    }
    else
    {
        console.log("sync err %s", err);
    }


});

LiquidateService: Realiza el calculo de la tarifa.

var data2 = {

            "CardId": "3037199480", // Normal
            "CardDate": "2018-01-18 06:00:00",
            "IdConsole": 8,
            "CardType": 0,
            "Agreements": [
                12,
                11,
                1,
                2,
                0
            ],
            "CardStatus":0,
            "MinToExit": 0,
            "PlateIN": "test",
            "IdEntry": 0,
            "Is_ManualPayment": false, // CASO PP - ASISTIDO Cobro manual
            "Id_Rate": 0,              // CASO PP - ASISTIDO Cambio de Tarifa
            "Is_NoCard_Rate": false,   // CASO PP - ASISTIDO Tarifa sin Tarjeta
            "Force_Agreement": false,  // CASO PP - ASISTIDO Aplicar un convenio que no esta en la tarjeta
            "Is_VIP_Pago": false,      // Cambio de Tarifa Zonas Internas.... Lo edita el servicio de placas
            "Last_TransactionType": 1 // TransactionType para tarjetas Mensuales
};

billing.LiquidateService(data2, function (err, result) {
    if(err == null)
    {
        console.log("LiquidateService ok");
    }
    else
    {
        console.log("error to LiquidateService:%d", err);
    }

});

LiquidateProducts Realiza el calculo de los productos

let data = {
    "Products": [
        {"Id": 1, "Quantity": 1, "Price": 5000},
        {"Id": 2, "Quantity": 2, "Price": 2000},
        {"Id": 3, "Quantity": 1, "Price": 20000},
        {"Id": 8, "Quantity": 1, "Price": 5000},
    ],
};

billing.LiquidateProducts(data, (err, result) => {
    if(err == null)
    {
        console.log("LiquidateProducts ok");
    }
    else
    {
        console.log("error to LiquidateProducts:%d", err);
    }

});

OpenShift: habilita o deshabilita el log.

billing.OpenShift(null, function (err, result) {
    if(err == null)
    {
        console.log("OpenShift:%s", result.shift.IdShift);
    }
    else
    {
        console.log("CloseShift:error:%s", err);
    }

    //cb(err, result);
});

CloseShift: habilita o deshabilita el log.

billing.CloseShift(null, function (err, result) {
    if(err == null)
    {
        console.log("CloseShift:%s", result.shift.Receipt);
    }
    else
    {
        console.log("CloseShift:error:%s", err);
    }

    //cb(err, result);
});

Add_Debtor: Adicionar moroso, esta función agrega al cliente que no quiere pagar al sistema, la próxima vez que vaya a pagar y la placa coincida le va a adicionar el monto de la deuda a la factura..

let data = {
    Plate: "ABC126",
    Amount: 5000,
    Description: "Test 4" // el total recibido por el cajero
};

billing.Add_Debtor(data, function (err, result) {
    if(err == null)
    {
        console.log("Add_Debtor ok);
    }
    else
    {
        console.log("Add_Debtor:error:%s", err);
    }
});

Funciones de Inserciones en Base de Datos

1- Insert_Recargas: Realiza una insercion nueva en la tabla de recargas. Recibe un objeto con los siguientes parametros:

data = { Tipo: X1, Valor: X2 },

donde X1 es el tipo segun la siguiente enumeracion:

        Recarga = 1
        Vaciado = 2
        PagoNoc = 3 // NA
        FalloVueltas = 4
        ErrorPagoCierre = 5 // NA
        ErrorPagoCierreNoc = 6 // NA
        AgregarBillByTest = 7 // NA
        QuitarBillByTest = 8 // NA
        PreCierre = 9 // NA
        ErrorPagoPreCierre = 10 // NA
        Deposito = 11 // NA

X2 es el valor de "Recarga, Vaciado, etc"

Ejemplo de Uso:
    var billing = require ('@ci24/ci-billing-sqlserver')
    billing = new billing();

    var data = {
        Tipo: 1,
        Valor: 200000
    }

    billing.Insert_Recargas(data, function(err,result))
    {
        if (err == null) // operacion exitosa
        {

        }
        else
        {
            var error = result.Error_String // Si hay error, este es el string del error
        }
    }

2- Insert_Cortes: Realiza una insercion nueva en la tabla de Cortes (Retiros de efectivo del PPA por fallos). Recibe un objeto con los siguientes parametros:

data = { Valor: X1 },

donde X1 es el valor del pago

Ejemplo de Uso:
    var billing = require ('@ci24/ci-billing-sqlserver')
    billing = new billing();

    var data = {
        Valor: 200000
    }

    billing.Insert_Cortes(data, function(err,result))
    {
        if (err == null) // operacion exitosa
        {
            var Recibo = result.Texto // el formato del recibo a imprimir
        }
        else
        {
            var error = result.Error_String // Si hay error, este es el string del error
        }
    }

3- Insert_Billetes_Stack: Realiza una insercion nueva en la tabla de billetesstack. todos los billetes que bajan al Stack deben registrarse mediante esta funcion

Recibe un objeto con los siguientes parametros:

data = { IdTarjeta: X1, ValorBillete: X2 },

Ejemplo de Uso:
    var billing = require ('@ci24/ci-billing-sqlserver')
    billing = new billing();

    var data = {
        IdTarjeta: 12345678, // ID test
        ValorBillete: 50000 // billete de 50000
    }

    billing.Insert_Billetes_Stack(data, function(err,result))
    {
        if (err == null) // operacion exitosa
        {

        }
        else
        {
            var error = result.Error_String // Si hay error, este es el string del error
        }
    }

4- Insert_Movimiento_Dinero: Realiza una insercion nueva en la tabla de movimiento_dinero. En esta tabla se almacenan todos los ingresos y extracciones de monedas, incluyendo las recargas

Recibe un objeto con los siguientes parametros:

data = {IdTarjeta: X1, Valor: X2, Cantidad: X3, tipo: X4, isRecarga: X5},

- X2 es el valor de la moneda (50,100,200,500,1000)
- X3: el numero de monedas de esta denominacion
- X4: 1: si las monedas ingresaron al monedero, 2: si las monedas salieron del monedero
- X5: 0: si no fue recargando, 1: si fue una recarga

Ejemplo de Uso:
    var billing = require ('@ci24/ci-billing-sqlserver')
    billing = new billing();

    var data = {
        IdTarjeta: 12345678,
        Valor: 1000, //moneda de 1000
        Cantidad: 10, //10 monedas
        tipo: 1, // las monedas ingresaron
        isRecarga: 1 // Fue una recarga hecha por modo administrativo
    }

    billing.Insert_Movimiento_Dinero(data, function(err,result))
    {
        if (err == null) // operacion exitosa
        {

        }
        else
        {
            var error = result.Error_String // Si hay error, este es el string del error
        }
    }

5- Get_Settings: Funcion que retorna un Array con todos los settings que se encuentran en la Tabla de Settings de la DB.

Esta Funcion no recibe ningun parametro:

Ejemplo de Uso:
    var billing = require ('@ci24/ci-billing-sqlserver')
    billing = new billing();

    billing.Get_Settings(null, function(err,result))
    {
        if (err == null) // operacion exitosa
        {
            var data = result;
        }
        else
        {
            var error = result.Error_String // Si hay error, este es el string del error
        }
    }

Nuevas Funciones Para Uso del Modulo en Tablet

1- Get_Rates: Funcion para la obtencion de las Tarifas Disponibles. Recibe un objeto con los siguientes parametros:

data = { Card_Type: XX },

donde XX es el tipo de la tarjeta segun la siguiente enumeracion:

        Tarjeta Normal = 0
        Tarjeta Mensual = 2
        Para Tarifas sin Tarjeta = -1 // NA

 Y Retorna un Objeto con las caracteristicas de las tarifas:
    {
        "Rates": [
                {
                    "Id_Rate": 4,
                    "RateName": "$100 El Minuto",
                    "Amount": 0
                },
                {
                    "Id_Rate": 8,
                    "RateName": "Special Rate $1.5 per hour",
                    "Amount": 1.5
                }
        ]
    }
Ejemplo de Uso:
    var billing = require ('@ci24/ci-billing-sqlserver')
    billing = new billing();

    var data = {
        Card_Type: 0
    }

    billing.Get_Rates(data, function(err,result))
    {
        if (err == null) // operacion exitosa
        {
            _log.write ("Operacion Exitosa")
            _log.write(JSON.stringify(result)) // es un Objeto con las Tarifas
        }
        else
        {
            var error = result.Error_String // Si hay error, este es el string del error
        }
    }

2- Misc_Service: Funcion que realiza la facturacion de Miscelaneos. Recibe un objeto con los siguientes parametros:

data = { Total_Misc: X1, Concept_Misc: X2, Cash_Paid: X3 },

donde:
- X1 es el valor del Miscelaneo
- X2 es el Concepto del Miscelaneo
- X3 es el valor recibido por el cajero (Cash Recibido)

 Y Retorna un Objeto Igual al Objeto Retornado por la funcion BillingService:


Ejemplo de Uso:
    var billing = require ('@ci24/ci-billing-sqlserver')
    billing = new billing();

    var data = {
        Total_Misc: 15.5,
        Concept_Misc: "Pago por Concepto X",
        Cash_Paid: 16 // el total recibido por el cajero
    }

    billing.Misc_Service(data, function(err,result))
    {
        if (err == null) // operacion exitosa
        {
            _log.write ("Operacion Exitosa")
            _log.write(JSON.stringify(result)) // es un Objeto con la respuesta (Objeto similar a respuesta de BillingService)
        }
        else
        {
            var error = result.Error_String // Si hay error, este es el string del error
        }
    }

3- Get_Agreements: Funcion para la obtencion de los Convenios Disponibles.

Retorna un Objeto con las caracteristicas de los Convenios:
    {
        "Agreements": [
                {
                    "Id_Agreement": 1,
                    "AgreementName": "Todo el día",
                    "Value": 1440
                }
        ]
    }

4- Decrypt_Data: Funcion para la Decripcion de los datos.

Retorna un Objeto con los parametros decodificados de la tarjeta, parametros que se deben pasar por el
servicio de Liquidacion:
    // Parametro de Retorno
    {
        "IdCompany": 1,
        "IdSite": 1,
        "IdZone": 1,
        "IdAgreement": 0,
        "MacAddress": "F2CA951E8FD5",
        "CardId": "3037569259",
        "CardDate": "2017-10-25 15:52:29",
        "CardDateIN": "2000-01-01 00:00:00",
        "IdConsole": 251,
        "CardType": 0,
        "Agreements": [
            0,
            0,
            0,
            0,
            0
        ],
        "CardStatus": 1,
        "Password": 0,
        "MinToExit": 0,
        "PlateIN": "",
        "WrongDate": false,
        "IdEntry": 0
    }
Ejemplo de Uso:
    var billing = require ('@ci24/ci-billing-sqlserver')
    billing = new billing();

    data =
    {
        "idCard" : "eba00db5", // UID de la tarjeta "en String"
        "data": "205ef0651dfb00000000000001000000" // data de los 16 bytes del sector leido "en String"
    }

    billing.Decrypt_Card(data, function(err,result))
    {
        if (err == null) // operacion exitosa
        {
            _log.write ("Operacion Exitosa")
            _log.write(JSON.stringify(result)) // es un Objeto con la informacion Decodificada
        }
        else
        {
            var error = result.Error_String // Si hay error, este es el string del error
        }
    }

4- Encrypt_Data: Funcion para la Encripcion de los datos a escribir en la tarjeta.

Retorna un array de 16 posiciones con los valores de cada uno de los 16 bytes del sector a escribir:
    // Parametro de Retorno
    [
     121,
     51,
     135,
     33,
     121,
     181,
     2,
     15,
     0,
     1,
     251,
     1,
     0,
     0,
     0,
     0
    ]
    ```


    Ejemplo de Uso:

```sh
    var billing = require ('@ci24/ci-billing-sqlserver')
    billing = new billing();

    Card_Info: {
                  "IdCompany": 1,
                  "IdSite": 1,
                  "IdZone": 1,
                  "IdAgreement": 0,
                  "MacAddress": "B827EBB1AE86",
                  "CardId": "679122206",
                  "CardDate": "2017-10-28 12:24:25",
                  "CardDateIN": "2017-10-27 08:00:54",
                  "IdConsole": 8,
                  "CardType": 0,
                  "Agreements": [],
                  "CardStatus": 1,
                  "Password": "4733ce65d79b0c667f37093709010000",
                  "MinToExit": 15,
                  "PlateIN": "",
                  "WrongDate": false,
                  "IdEntry": 150114,
                  "Err": "",
                  "Reference": "NO_REFERENCE"
               }

    Liquidate_Info = {
                              "Type": 0,
                              "Type_Name": "Normal_Card",
                              "Response": 1,
                              "Response_String": "CARD_DATA",
                              "Update_Card": true,
                              "MinToExit": 15,
                              "IdCompany": 5,
                              "IdSite": 14,
                              "IdZone": 14,
                              "MacAddress": "B827EBB1AE86",
                              "Billing": {
                                  "TipoCobro": 0,
                                  "RateName": "$100 El Minuto",
                                  "Plate": "",
                                  "EntryDate": "2017-10-28 12:24:25",
                                  "Cash": 0,
                                  "Change": 0,
                                  "Change_Left": 0,
                                  "InvoiceDate": "2017-10-28 15:06:41",
                                  "IdConsola": 8,
                                  "IdToken": "679122206",
                                  "MinutesBilled": 162,
                                  "TotalWithoutTaxes": 3.74,
                                  "TotalAdjustments": 0,
                                  "SubTotal": 3.74,
                                  "TotalTaxes": 1.01,
                                  "Total": 4.75,
                                  "MinutesAgreements": 0,
                                  "TotalAgreements": 0,
                                  "IdEntry": 0,
                                  "BillingItems": [
                                      {
                                          "IdRate": 4,
                                          "TotalWithoutTaxes": 3.74,
                                          "TotalTaxes": 1.01,
                                          "SubTotal": 3.74,
                                          "TotalAdjustments": 0,
                                          "Total": 4.75,
                                          "TaxesApplied": [
                                              {
                                                  "Id_Tax": 9,
                                                  "TaxValue": 8,
                                                  "Total": 0.3
                                              },
                                              {
                                                  "Id_Tax": 1,
                                                  "TaxValue": 19,
                                                  "Total": 0.71
                                              }
                                          ],
                                          "AgreementsApplied": []
                                      }
                                  ],
                                  "AgreementsApplied": [],
                                  "Card_Payment": {
                                      "Tarjeta_Last4Numbers": "",
                                      "Tarjeta_Franquicia": "",
                                      "Tarjeta_Tipo": "",
                                      "Tarjeta_Fecha_Pago": "",
                                      "Tarjeta_Hora_Pago": "",
                                      "Tarjeta_ID_Punto": "",
                                      "Tarjeta_RRN": "",
                                      "Tarjeta_Numero_Cuotas": "",
                                      "Tarjeta_Version_POS": "",
                                      "Tarjeta_Version_PPA": ""
                                  },
                                  "Nequi_Payment": {}
                              },
                              "Data_Normal": {
                                  "Is_Pase_Dia": false,
                                  "Status": -1,
                                  "Status_String": "No_DayPass_Service",
                                  "Is_Moroso": false,
                                  "Id_Moroso": 0,
                                  "Moroso_Value": 0,
                                  "Is_Validate": false,
                                  "Is_Misc": false,
                                  "Concept_Misc": ""
                              },
                              "Data_Mensual": {
                                  "dateINI": "2017-10-28 15:06:39",
                                  "horaINI": "15:06:39",
                                  "dateFIN": "2017-10-28 15:06:39",
                                  "horaFIN": "15:06:39",
                                  "User_Name": "",
                                  "Company_Name": "",
                                  "DiasPermitidos": 0
                              }
                          }


    data =
    {
        "cardData" : Card_Info, // informacion de la tarjeta decodificada"
        "liquidationData": Liquidate_Info // JSON de respuesta del servicio de Liquidacion "LiquidateService"
    }

    billing.Encrypt_Card(data, function(err,result))
    {
        if (err == null) // operacion exitosa
        {
            _log.write ("Operacion Exitosa")
            _log.write(JSON.stringify(result)) // es un Array con los valores de los bytes a escribir en la tarjeta
        }
        else
        {
            var error = result.Error_String // Si hay error, este es el string del error
        }
    }

4- Login: Funcion para validar el usuario y la contraseña de inicio de sesion. Recibe un objeto con los siguientes parametros

    {
        user: "[email protected]", // el user es el email de registro del usuario
        password: "Controles1"
    }
Ejemplo de Uso:
    var billing = require ('@ci24/ci-billing-sqlserver')
    billing = new billing();

    data =
    {
        user: "[email protected]", // el user es el email de registro del usuario
        password: "Controles1"
    }

    billing.Login(data, function(err,result))
    {
        if (err == null) // operacion exitosa
        {
            _log.write ("Operacion Exitosa")
        }
        else
        {
            var error = result.Error_String // Si hay error, este es el string del error
        }
    }

Codigos de Error

WRONG_DATA =  1
PAYMENTPOINT_NOT_FOUND =  2
ERROR_CREATE_SHIFT =  3
ERROR_TO_GET_MACADDRESS =  4
DATABASE_DOESNT_EXIST =  5
ERROR_TO_SYNC_DB =  6
BUSY_SYNC_FUNCTION =  7
DATABASE_NOT_SYNC =  8
ERROR_SHIFT_IS_NULL =  9
ERROR_PAYMENTPOINT_IS_NULL =  10
ERROR_DBMANAGER =  11
ERROR_CHECK_CONSECUTIVE_SHIFT =  12
ERROR_GET_CONSECUTIVE_BILLING =  13
ERROR_GET_FORMAT_RECEIPT =  14
ERROR_SAVE_CONSECUTIVE_BILLING =  15
ERROR_SAVE_BILLING =  16
ERROR_SHIFT_IS_ALREADY_CLOSED =  17
ERROR_CLOSE_SHIFT =  18
ERROR_SHIFT_IS_ALREADY_OPEN =  19
ERROR_SELECT_RATE =  20
ERROR_NOT_DEFAULT_RATE =  21
ERROR_SELECT_AGREEMENT =  22
ERROR_SAVE_CONSECUTIVE_TABLA_FACTURACION = 23
ERROR_GET_CONSECUTIVE_TABLA_FACTURACION = 24
ERROR_GET_CONSECUTIVE_RECARGAS = 25
ERROR_INSERT_RECARGAS = 26
ERROR_INSERT_CORTES = 27
ERROR_GET_CONSECUTIVE_CORTES = 28
ERROR_INSERT_BILLETES_STACK = 29
ERROR_GET_CONSECUTIVE_BILLETES_STACK = 30
ERROR_CONSOLA_NOT_FOUND = 31;
ERROR_FACTURA_NOT_FOUND = 32
ERROR_TARIFA_EN_CONSOLA_NOT_FOUND = 33
ERROR_TARIFA_NOT_FOUND = 34
ERROR_GETTING_LIQUIDATION = 35
ERROR_CLASS_TARIFA = 36
ERROR_GETTING_CONVENIOS = 37
ERROR_CLASS_CONVENIO = 38
ERROR_CLASS_VIP_LIST = 39
ERROR_PROCESSING_VIP = 40
ERROR_REPEATING_LIQUIDATION = 41
ERROR_GETTING_SETTINGS = 42
ERROR_SENDING_CHANGES = 43
ERROR_GETTING_CHANGES = 44
ERROR_SHIFT_IS_CLOSE = 45
ERROR_CHECKING_BILLING = 46
ERROR_TO_LOAD_CONFIGURATION = 47
ERROR_GETTING_STACKED_BILLS = 48
ERROR_INSERT_PASE_DIA = 49
ERROR_UPDATE_MOROSOS = 50
ERROR_CHECK_CONTROL_HORARIO = 51
ERROR_VIP_CLIENT_NOT_FOUND = 52
ERROR_CARD_ADMIN_NOT_FOUND = 53
ERROR_USER_GROUP_NOT_FOUND = 54
ERROR_GETTING_DEVICE_SETTINGS = 55
ERROR_VIP_TOKEN_NOT_FOUND = 56
ERROR_RATES_NOT_FOUND = 57
ERROR_MISC_RATE_NOT_FOUND = 58
ERROR_AGREEMENTS_NOT_FOUND = 59
ERROR_DATA_DECRYPT_CARD = 60
ERROR_CONSOLE_NOT_FOUND = 61
ERROR_DATA_ENCRYPT_CARD = 62
ERROR_INSERT_MOVIMIENTO_DINERO = 63
ERROR_GET_CONSECUTIVE_MOVIMIENTO_DINERO = 64