'First time, load all the components from salary structure'

def get_emp_and_leave_details(self):

    if self.employee:
        self.set(u'earnings', [])
        self.set(u'deductions', [])
        if (not self.salary_slip_based_on_timesheet):
            self.get_date_details()
        self.validate_dates()
        (joining_date, relieving_date) = frappe.db.get_value(u'Employee', self.employee, [u'date_of_joining', u'relieving_date'])
        self.get_leave_details(joining_date, relieving_date)
        struct = self.check_sal_struct(joining_date, relieving_date)
        if struct:
            self._salary_structure_doc = frappe.get_doc(u'Salary    Structure', struct)
            self.salary_slip_based_on_timesheet = (self._salary_structure_doc.salary_slip_based_on_timesheet or 0)
            self.set_time_sheet()
            self.pull_sal_struct()
