Jump to content

A simple salary program!


daxguy

Recommended Posts

i wanted a way to work out a small task i am into.. i have developed a salary program which manages the salary of employees in my organisation.. the salary program is working all good.. but now i am stuck in a situation.. the salary program works as follows :

-the employee is selected during the month if the employee takes any advance his amount on the that specific date is added to the db

-an employee can take advance salary before the 30th of the month on his need which is added to the db

- i have a created a script that shows all the advances of the employee selected during the month and subtracts the advances from the basic pay and shows the result.. eg : employee david basic salary 5000$.. total advance 2750$ remaing sal basic-advance

 

Now the problem i am in is that some times the advance increase from the basic pay.. which is allowed in certain situation.. than the remaining amount is in minus like advance 6000 and basic pay is 4000 soo -2000 is remaing.. i want the negative amount to automatically be forwarded in the next month advance on every 30th of the month.. soo that i can manage the advance salaries properly..

 

does any one have a good suggestion?

Link to comment
Share on other sites

Can you have an "overall standing" column in your table?  Basically a running total that tracks where everything stands.  "0" means that the company and employee are even.  -200 means that the employee "owes" the company $200.

 

If overall_standing < 0

{

Amount of pay is monthly_pay - overall_standing;

Overall_standing = 0;

}

 

That work???

Link to comment
Share on other sites

well a nice suggestion the over standing will help me getting my status wheather the employee owes the organisation or not.. the condition u mentioned is all fine as well.. but i want the status to be updated on the end of the month beacause the salaries are issued at the end of the month... plus i want to transfer the remainging amount if negative to the next month status which will than 1st get minus from the basic pay!!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.