Jump to content

Paycheck Generator - Automatizing Problems


SRayM

This topic is 6536 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Hello, this is my first post so don't be surprised if i don't know the format and the usual procedure followed on this forum, but i hope you can help me anyway, thanx in advance :

I'm currently working on a database solution for a small business, creating a complete registry of all their employees, with contract details, and an added function: the app calculates the monthly paycheck for each employee based on the contract type and days worked. The problem I've encountered is relatively simple, but this is my first contact with filemaker so I've had some problems with the scripting involved, I'll explain:

To calculate paychecks the app uses assigned variables for each contract type, and multiplies by the number of days worked during the month, my problem is that whenever the salary to calculate is of the month of december the app returns an erroneous value, as I have to calculate the number of days between Date(CurrentDate(12/1/XXXX) and (CurrentMonth+1/1/XXXX), for some reason the program reads this as month 13(wich obviously doesn't exist) instead of just adding 1 to the currentyear value.

I'm a novice and have been using Filemaker during 1 month aprox, so if any of this didn't make enough sense tell me and I'll try to clarify, thx,

Sam :

PS: an [if] would solve this but I don't know exactly how.

PS2: Dunno if this is even the right forum to post my problem, if it isn't someone point it out plz.

Edited by Guest
Link to comment
Share on other sites

You need a calculation something like this:

If ( Month ( date ) = 12 ;

Date ( 1 ; Day ( date ) ; Year ( date ) + 1 ) ;

Date ( Month ( date ) + 1 ; Day ( date ) ; Year ( date ) )

)

I attached a simple file that has a date field, a calc field that use the above calc, and a field that tells the days detween the two dates. Hopefuly that will help.

dates.fp7.zip

Edited by Guest
Link to comment
Share on other sites

This topic is 6536 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.