Results 1 to 3 of 3

Thread: How to create funtionality to add and subtract days within a module?

  1. #1
    Secret_Agent_99's Avatar
    Secret_Agent_99 is offline Senior Member
    Join Date
    Jan 2010
    Location
    Island of Unknown Orgin
    Posts
    27

    Question How to create funtionality to add and subtract days within a module?

    Hi,

    I am in the process to create an Attendance Mangement Module for my company's HRIS system.
    So how would you automatically increment the year-to-date total, and subtract days depending on how many days taken off. I know I don't think its possible within the studio, so how would you begin creating custom code within the file where you can apply custom code to? I am confused how to embedd math functionality in this open-source software.

    Thanks
    Agent 99
    Secret Service

  2. #2
    JVWay is offline Sugar Community Member
    Join Date
    Sep 2007
    Location
    Corvallis, Oregon
    Posts
    452

    Default Re: How to create funtionality to add and subtract days within a module?

    Well, it will take some effort but look into the developers manual and there are plenty of posts with examples by myself and others. You're looking at implementing what are called Logic Hooks and their associated code files. What you're needing will take php code and I'd suggest looking into mysql date_add and date_sub functions.
    Jerry Way
    Business Process Administrator

    Sugar 6.1.4 Professional
    (Testing 6.1.2)
    LAMP on Centos 5
    PHP 5
    MySQL 5
    Apache 2.2

  3. #3
    Secret_Agent_99's Avatar
    Secret_Agent_99 is offline Senior Member
    Join Date
    Jan 2010
    Location
    Island of Unknown Orgin
    Posts
    27

    Cool Re: How to create funtionality to add and subtract days within a module?

    Thanks Jerry,

    I will look into logic hooks and implement the add and subtract feature of the fields.
    I saw some post of logic host and implemented them and it worked.

    Agent 99
    Secret Service

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Add Funtionality
    By blanik in forum Developer Help
    Replies: 0
    Last Post: 2009-05-21, 08:33 PM
  2. Replies: 0
    Last Post: 2008-12-17, 05:56 AM

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
  •