Announcement

Collapse
No announcement yet.

Ideas to Calculate

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ideas to Calculate

    I love considering variables, and having things calculated. Over time I will be building a system that can run my paperwork without me, until then;

    I am in the habit of making calculators that are geared toward our specific needs. I feel like Einstein.



    example

    What are some things that you guys would like? I'm open for suggestions!


    If any of you understand the following like I do, maybe we can collaborate! This is what I wrote up to program the calculator I had previously made;

    var myTime:Number;
    var myIncome:Number;
    var myOwner:Number;
    var myBusiness:Number;
    var myStaff:Number;
    var myFuel:Number;
    var myFuelb:Number;

    var minutePerJob:Number;
    var allMinutes:Number;
    var allHours:Number;
    var costPerLitre:Number;
    var totalFuelCost:Number;
    var totalFuelUsed:Number;


    calculate.addEventListener(MouseEvent.CLICK, displayResults);

    function displayResults(e:MouseEvent):void
    {
    myFuel = Number(travelfuel.text) + Number(mowingfuel.text) + Number(trimmingfuel.text) + Number(blowingfuel.text);
    myFuelb = Number(myFuel) * Number(fuelcost.text);
    myTime = Number(traveltime.text) + Number(unloadtime.text) + Number(mowingtime.text) + Number(trimmingtime.text) + Number(blowingtime.text) + Number(loadtime.text);
    myIncome = Number(myTime) * Number(minutecharge.text) + Number(myFuelb);
    myOwner = Number(myIncome / 100) * Number(ownersplit.text);
    myBusiness = Number(myIncome / 100) * Number(businesssplit.text);
    myStaff = Number(myIncome / 100) * Number(staffsplit.text);

    minutePerJob = Number(travelTime.text) + Number(jobTime.text);
    allMinutes = minutePerJob * Number(totalJobs.text);
    allHours = allMinutes / 60;

    costPerLitre = Number(fuelCost.text);
    totalFuelCost = costPerLitre * allMinutes / 100 * 10;
    totalFuelUsed = Number(fuelMinute.text) * allMinutes / 1;

    totaltime.text = String(myTime);
    totalprice.text = String(myIncome);
    owner.text = String(myOwner);
    business.text = String(myBusiness);
    staff.text = String(myStaff);


    totalHours.text = String(allHours);
    fuelUsed.text = String(totalFuelUsed);
    fuelTotal.text = String(totalFuelCost);


    }


    Last edited by CHEESE2009; 11-14-2011, 01:52 PM.
Working...
X