In both the scenarios the salary is processed based on the number of days he has worked in the joining month – this is inputted on Employee Details > Payroll Details page.
The first payroll month is to be updated by the Payroll Manager on the Pending
for Updation tab on Employee Payroll details page. By default the system will
show the month based month of joining but the list of months will include upto
the current payroll month + 1. For example if the payroll for June has been run
and you add an employee with a date of joining of April then you can select April,
May, June or July as his first payroll month. If the in the same scenario an
employee is added with a date of joining of August then you can select August
or September as his first payroll month.
When filling up employee details you can overwrite the number of days working in the first payroll month or first payroll month -1 depending upon what your have selected as first payroll month.
Please note that in scenario 2 the number of days in June is being taken to calculate the partial salary.