Results 1 to 5 of 5

Thread: finances calculating script

  1. #1
    Join Date
    May 2015
    Location
    kent UK
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default finances calculating script

    im looking for a script that would calculate a main figure and add a second figure to the first one but put this in a subtotal area so that area changes but the other 2 figures dont change. and i want the subtotal figure to be able to change daily so that every day it would add the second figure to the subtotal and each day repeats.

    All this is an interest calculator on a page on my computer that is open and everyday it updates itself when the date changes and updates the subtotal figure so i can see what the amount currently is.

    if anyone can help me i would be much appreciative

  2. #2
    Join Date
    Mar 2010
    Location
    Florida
    Posts
    512
    Thanks
    9
    Thanked 61 Times in 59 Posts

    Default

    I can prolly make this but I am kinda lost. You first started talking about two different figures then you switched to "area" then back to figures. An example would be great in this case.

    Thanks,
    -DW [Deadweight]
    Resolving your thread: First Post: => EDIT => Lower right: => GO ADVANCED => Top Advance Editor drop down: => PREFIX:Resolved

  3. #3
    Join Date
    May 2015
    Location
    kent UK
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi DW,

    ok basically I have just won a court case and a few old ones but not paid out yet.

    So for example lets say I was awarded £20,000 and the interest is 8% per Annum so the daily Interest to be added is £5.40 (I know this is not the true amount but im just using any figure for this)

    I want a SubTotal area that everyday when the next day starts its adds the daily interest to the £20,000 that is in the subtotal area, and then again the next day the interest adds to the subtotal and each day the subtotal amount will change and incease.

    But I want it to display the Award amount and then display the Daily Interest and then under that the subtotal amount. And maybe have something like a box with how many days have passed or how many days interest have been added from the original figure.

    I know this might sound like a pointless thing but I want to keep track of my judgements that are awarded and keep an eye on how much the money goes up, this is mainly for when im dealing with enforcement and knowing the amount of interest due.

    Would the page have to be refreshed to see the changes each day or could I add a refresh script to be set when to refresh the page?

    thank you

    mark

  4. #4
    Join Date
    Dec 2008
    Location
    Portsmouth, UK
    Posts
    1,891
    Thanks
    2
    Thanked 441 Times in 435 Posts

    Default

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
    
    <html>
    
    <head>
      <title></title>
    </head>
    
    <body>
    <form>
      Days <input name="days">
      <br>
      InitialAmount <input name="Initial">
      <br>
      Intrest <input name="Intrest">
      <br>
      Total <input name="Total">
      <br>
    </form>
    <script type="text/javascript">
    
    function zxcDayCounter(year,month,date){
     return Math.floor((new Date()-new Date(year,month-1,date,0,0,1))/(1000*60*60*24));
    }
    
    var DailyIntrest=5.40;
    var InitialAmount=20000;
    var days=zxcDayCounter(2015,5,19); // year month date
    
    var frm=document.forms[0];
    frm.days.value=days;
    frm.Initial.value=InitialAmount;
    frm.Intrest.value=DailyIntrest*days;
    frm.Total.value=InitialAmount+DailyIntrest*days;
    
    </script>
    </body>
    
    </html>
    Vic
    God Loves You and will never love you less.
    http://www.vicsjavascripts.org/Home.htm
    If my post has been useful please donate to http://www.operationsmile.org.uk/

  5. #5
    Join Date
    May 2015
    Location
    kent UK
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi there,

    this script is great and have just tried it and its just what im looking for, I do have 1 question is there anyway to stop the interest box from changing? because i notice it increases at the same time as the total under it.

    thank you

Similar Threads

  1. Calculating form
    By gemzilla in forum JavaScript
    Replies: 1
    Last Post: 09-03-2012, 04:29 PM
  2. Calculating form
    By sawebs in forum Looking for such a script or service
    Replies: 1
    Last Post: 05-03-2012, 02:11 PM
  3. Resolved Birthday calculating script
    By keyboard in forum PHP
    Replies: 2
    Last Post: 11-02-2011, 09:32 PM
  4. calculating dates in PHP
    By gurmeet in forum PHP
    Replies: 4
    Last Post: 02-11-2010, 07:09 AM
  5. need a calculating php formmail
    By shute in forum General Paid Work Requests
    Replies: 1
    Last Post: 04-06-2009, 08:07 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •