Results 1 to 6 of 6

Thread: Simple Calculations

  1. #1
    juniovalerio is offline Member
    Join Date
    Dec 2008
    Posts
    7

    Default Simple Calculations

    Hi

    I would like to know how it is possible to effectuate simple mathematic calculations, like percentages and sum, using field entries. I would need it to record payments due and to receive at certain milestones.

    For instance:

    Total Sum Due: 100£

    Dropdown Textfield [Automatic Field]
    Milestone #1 50% 50£
    MIlestone #2 50% 50£

    Does a module like this already exist? Something in accounting maybe?

    Thanks in advance for your replies.

    BR

    JV
    Last edited by juniovalerio; 2009-01-21 at 07:58 AM.

  2. #2
    mvngti is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    South Africa
    Posts
    510

    Default Re: Simple Calculations

    You will need to create a logic hook that do the calculations and manipulate the dropdowns list in the $app_list_strings array.

    I suggest you rather look at a module EnhancedStudio in sugarforge. It allows you to create fields with code that runs every time to display the field.
    --


    Marnus van Niekerk

    There are only 10 types of people in the world
    those who can read binary and those who don't

    Modules:
    CE Teams - Upgrade safe teams module for Community Edition
    FieldACL - Field Level Access Control for Community Edition
    EditLogicHooks - Create and edit Logic Hooks from the Admin GUI
    FlexibleChartDashlet - Display any data in a Dashlet Chart
    DocumentThumbnails - Thumbnails for Documents module

    Many questions can be answered by reading the Developers Manual

  3. #3
    letrium is offline Sugar Community Member
    Join Date
    Dec 2008
    Posts
    614

  4. #4
    elt0n is offline Member
    Join Date
    Mar 2009
    Posts
    5

    Default Re: Simple Calculations

    hey i have a similar problem.

    So i installed the EnhancedStudio Demo.

    I want to add integer fields to the opportunity layouts to keep track of the numbers of ads sold for our page.
    This is easy.

    But I want to automaticaly calculate how many zones are available for each month. so i need to sum up all ad-fields from all oportunities for one month and subtract them from the number of available zones. i relize this by using a code field. but i don't know how to access the ad-field data from the other opportunities!!!

    Anyone how can help me?

    btw: number of zones are constant.

    zone = placeholder for an advertising
    ad = advertising

  5. #5
    vishwasrao's Avatar
    vishwasrao is offline A Prolific Poster
    Join Date
    Sep 2008
    Location
    Pune,Maharashtra,India
    Posts
    385

    Smile Re: Simple Calculations

    Hi,
    Read Manual for Enhanced Studio ,U will get an idea.
    there are examples given at last .they may b usefl for u.
    Vishwasrao Salunkhe
    vishwasrao.salunkhe@gmail.com
    Fan Of Sachin Tendulkar
    Operating System :- Windows XP
    PHP Version:- 5.3
    Apache :-2.2.11
    MYSQL :-5.1.36

  6. #6
    elt0n is offline Member
    Join Date
    Mar 2009
    Posts
    5

    Default Re: Simple Calculations

    which manual? the admin manual? it doesn't give me the nessasary hints!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Calculations in reports
    By REByers in forum Help
    Replies: 5
    Last Post: 2010-03-01, 04:22 AM
  2. How to add calculations to a module
    By vanrechemh in forum Help
    Replies: 4
    Last Post: 2009-10-20, 08:49 AM
  3. Date Calculations
    By brodellis in forum Help
    Replies: 3
    Last Post: 2009-01-23, 06:18 AM
  4. Mathematical calculations
    By danrweki in forum Developer Help
    Replies: 2
    Last Post: 2008-08-05, 07:58 AM
  5. Help with Calculations
    By JackieBM in forum Help
    Replies: 0
    Last Post: 2007-02-21, 06:13 AM

Tags for this Thread

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
  •