Skip to Content
author's profile photo Former Member
Former Member

Payroll and Query

Hello All

1. Need to query Number of Years of service,Number of active days in Month,Year (Deducting Inactive days) in payroll to make payment of a wage type, how to query?

2.We have a payment of Other allowance as Rs.1000 but for this Jan2016 alone we need to pay 10% extra for an employee group & Subgroup differently, how to do it (From February onward it will be RS.1000 again for the same EG&ESG combinations).

Reg

SK

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 18, 2016 at 05:20 AM

    hi s.k

    what i understood is u want to get the Number of Years of service and Number of active days in a year..

    is that right?

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      hi s k

      if u want to know the Number of Years of service:

      u can try this code


      integer li_totalyears

      long ll_startyear,ll_endyear

      date ld_startdate =date ("2016/ 1/1")

      date ld_enddate = Date( "2020/1/18")

      ll_startyear = year(ld_startdate)

      ll_endyear = year(ld_enddate)

      li_totalyears=ll_endyear - ll_startyear

      happy coding!

      best regards,

      Delna Domini

  • author's profile photo Former Member
    Former Member
    Posted on Jan 18, 2016 at 05:41 AM

    hi sk...

    next u want to know the total number of days in a particular month of year, right?

    date ld_Date = Date( "2016/1/18" )

    Integer li_days[12]={31,28,31,30,31,30,31,31,30,31,30,31}

    Integer li_month, li_year,li_daysinmonth

    li_month =month(ld_Date)

    li_year = year(ld_Date)

    li_daysinmonth = li_days[li_month] // --Leap year or not

    If li_month=2 Then

    If ( (Mod(li_year,4) = 0 And Mod(li_year,100) <> 0) Or (Mod(li_year,400) = 0) ) Then

    li_daysinmonth = 29

    End If

    End If

    The above code will give u the total number of days in a month and then u can deduct inactive days from li_daysinmonth

    Happy coding!

    Best regards,

    Delna Domini

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.