Git Product home page Git Product logo

jpederson / accrue.js Goto Github PK

View Code? Open in Web Editor NEW
108.0 13.0 42.0 1.38 MB

A loan and interest calculation plugin for jQuery. Create calculators that allow you to calculate interest on loans, compare multiple loans (with different interest rates), and create amortization charts.

Home Page: https://jpederson.com/Accrue.js/

License: MIT License

JavaScript 63.41% HTML 23.58% SCSS 13.01%
loan jquery calculator finance

accrue.js's People

Contributors

coreyshelton avatar jpederson avatar sepiariver avatar tcope25 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

accrue.js's Issues

Annual Amortization Option

Adapt the amortization schedule mode to allow for annual output in addition to the current monthly output.

Comparison Term

How about adding a comparison term option? In addition to rate.

I have been using CalcX to do my calculator, this is a lot simpler.

Default or initial value

How do you setup the default value from html or php side without the library overriding these values.

The default or initial value for every page is dynamic so the static default value in the library itself can't be used.

I am not that good in js so I can't make changes and contribute. Sorry.

Thank you.

Number Input Types

It would be nice if the script recognized number input types (input type="number"). With some users pulling up the calculator on mobile phones, it would make it easier to input a interest rate.

Support 0% Rate Values

First, thank you for a very useful library! I would like to use this library for a auto loan calculator. The issue I am running into is there are times where a zero percent (0%) is a valid rate for calculating a monthly payment. The library, as-is, views a 0% value as invalid.

Is it possible to support 0% rates?

License confusion

Hey, this is a great plugin. Thanks for your hard work on it. In your LICENSE file you state that this is licensed under an MIT license but under the actual accrue.js file where all the magic happens you specify both MIT and GPL licenses. Those licenses have different terms, particularly whether this can be used in commercial works or not. So, specifically, are you licensing this software to be used in a commercial website without open sourcing the commercial website? MIT license would allow that use case, GPL license would not.

How can I combine "basic" , "compare" , amortization" results?

I am trying to see if its possible to have one set of input fields and get results for all three options at once ("basic" , "compare" , amortization" results) instead of having three different sets of inputs for the user. Any suggestions on how it can be done or is it possible?

european price format

Hello,
us price is $7,500.50
european is 7 000,50€
To have this i add the folowing code:

function formatNumber (num) { // return num.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,"); // original line return num.toString().toFixed(2) // always two decimal digits return num.toString().replace(".", ",") // replace decimal point character with , return num.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, "1"); }

Work good for the results but how to proceed for the fields? The fields don't accept a comma, just a dot! I would like to have a comma for the decimals...

Can you help me?
Reagards
Olivier

Collaboration Dynamic Currency Format

I was going through this and realized not all people Use $ so am requesting help to make the currency format Dynamic through a property as this plugin is initialized.

ie

<script>
  $(document).ready(function(){       
          $(".calculator").accrue(
        currencyFormat: GBP,
    );
  });         
</script>

Display Weekly payments in addition to and as well as the monthly ones shown by default

Is there any chance that on the output where the monthly payments are listed that you could add a total and a weekly payment output also. I know the values will be different as paying weekly tends to be cheaper overall example:

£250 borrowed over 6 months 3.87% APR

Weekly:
payment: £10.54
total: £273.95

Monthly:
payment: £46.15
total: £276.90

The option would be great to have both or one or the other shown.

Read Only Field

Is there an option to make an input field read-only? I want to make the interest field read only if possible

Thanks

bower.json

bower packaging and registering would be great.

Some calculations giving odd currency amounts

Some of my selections are offering stupid currency amounts that just wouldn't happen in the real world. Is there any way to apply a simple number rounding?

For example, I have a product where the base price is £380. I'm adding 8% onto the monthly amounts, and my monthly options are 6, 10 and 12 months.

Using the above base price, when selecting these I am provided with the following monthly payments:

6 months - £68.39,999,999,999,999 per month
10 months - £41.04 per month
12 months - £34.199,999,999,999,996 per month

There are also some amounts that omit the final 0 from the pence value ie. £50.3
Is there a way to format these into a 'currency' format, like you would do on a spreadsheet?

Results number rounding possible?

Is it possible to round the results (and possibly add separator) after calculation? I don't understand jquery/javascript to do such change, and I searched around the code and see no easy way to adjust it.

In my case, lets say the end result is 529211.66. Is it possible to format the results into something like 529.000?

Thanks for the great plugin!

'Down Payment' Option

I suggest adding a down payment option so that you could do something like:

Purchase Price: 20,000
Down Payment: 5,000
Loan Amount: [Calculated Based on The Top Two Fields]
Rate: X.XX
Term: XX months

Inconsistent values with other websites

When testing on the Money Supermarket website here -
https://www.moneysupermarket.com/loans/calculator/ I am getting different 'Monthly repayment', 'Total amount payable' and 'Interest payable' values compared to using this script on my own website.

For a loan of £7,500 over an interest rate of 7% and monthly repayment of 36 months the monthly payment across the above website was £230.84 and the total cost of credit is £810.24, whereas on my website they are showing as a monthly payment of £231.58 and total cost of credit as £836.82.

Is there a recent update to this script? Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.