1.0.14 • Published 5 years ago

rca-money v1.0.14

Weekly downloads
16
License
ISC
Repository
-
Last release
5 years ago

rca-money CI status

RCA-Money is a library for handling packet values and their installments in Magento.

Installation

Requirements

  • None

$ npm install rca-money

Configuration

To configure, you will need the json objects.

var priceFormat = {
    decimalSymbol: ",",
    groupLength: 3,
    groupSymbol: ".",
    integerRequired: 1,
    pattern: "R$%s",
    precision: 2,
    requiredPrecision: 2
}

var interestFactor = [
    [1]={//number of installment
        factor: 1, //factor to corretion of installment
        use_interest: false //will it be used?
    },
    ...,
    [12] = {
        factor: 0.09719,
        use_interest: true
    }

];

var boleto = {
    boletoDiscount: "2",
    boletoDayProcess: 4
}

var conf = {
    boleto: boleto,
    freee_sale: null,
    isShowInstallments: true,
    maxParcel: 10
    minValueParcel: "5",
    priceFormat: priceFormat,
    interestFactor: interestFactor
}

Usage

<script type="text/javascript">
    let money = new RcaMoney(conf);

    money.formatedOnlyParcel(1347.09,  '#body');

    money.formatedPriceAndParcelLong(1571.04, 1546214400000, '#body2');

    jQuery('.comission-info').balloon({ classname: "balloonTip"});
</script>

Licensed to RCA Turismo

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago