Calculate partial month salary accurately when an employee joins midway, resigns, or works for a fraction of a month.