0.0.2-beta • Published 4 years ago

faktur v0.0.2-beta

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

Faktur (Javascript)

Faktur for javascript is a package for accounting and billing purposes. Support for different uses will be added.

GitHub license GitHub Workflow Status GitHub issues GitHub package.json version

Installation

npm install faktur --save

Use

Faktur have a series of methods that facilitate some basic operations when is necessary make some accounting calculations. For this moment the API is very basic, but we are working to make more robust and stable.

The methods names are acronyms that representing the API functionality, in the documentations we details a little more this.

Faktur API

RVTF (rvtf): Raw value from a total. Receive like params the percentage and the value total of the percentage applied. This method will break down the total value, will return the value without percentage applied and the percentage value applied:

const Faktur = require('faktur');

let percentage = 13;
let value = 11718.83;

let rawValueFromTotal = Faktur.rvft(percentage, value);

console.log(rawValueFromTotal);

The console.log(rawValueFromTotal) send the follow result

{
    baseValue: 10370.68, 
    percentageValue: 1348.19 
}

PVC (pvc): Percentage value calculation. Receive like params the percentage and a value. Will return the percentage value applied to value send as param:

const Faktur = require('faktur');

let percentage = 13;
let value = 11718.83;

let percentageValueCalculation = Faktur.pvc(percentage, value);

console.log(percentageValueCalculation);

The console.log(percentageValueCalculation) send the follow result

1523.45