Salary with holding

App Versions

{
	"ecommerce_integrations": "1.20.1",
	"erpnext": "14.77.3",
	"frappe": "14.86.0",
	"hrms": "16.0.0-dev"
}

Route

Form/Salary Slip/new-salary-slip-fgkhxxwrlc

Traceback

Traceback (most recent call last):
  File "apps/frappe/frappe/app.py", line 97, in application
    response = frappe.api.handle()
  File "apps/frappe/frappe/api.py", line 55, in handle
    return frappe.handler.handle()
  File "apps/frappe/frappe/handler.py", line 48, in handle
    data = execute_cmd(cmd)
  File "apps/frappe/frappe/handler.py", line 86, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "apps/frappe/frappe/__init__.py", line 1619, in call
    return fn(*args, **newargs)
  File "apps/frappe/frappe/desk/form/save.py", line 31, in savedocs
    doc.save()
  File "apps/frappe/frappe/model/document.py", line 310, in save
    return self._save(*args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 332, in _save
    return self.insert()
  File "apps/frappe/frappe/model/document.py", line 265, in insert
    self.run_before_save_methods()
  File "apps/frappe/frappe/model/document.py", line 1061, in run_before_save_methods
    self.run_method("validate")
  File "apps/frappe/frappe/model/document.py", line 931, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1283, in composer
    return composed(self, method, *args, **kwargs)
  File "apps/frappe/frappe/model/document.py", line 1265, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "apps/frappe/frappe/model/document.py", line 928, in fn
    return method_object(*args, **kwargs)
  File "apps/hrms/hrms/payroll/doctype/salary_slip/salary_slip.py", line 138, in validate
    self.check_salary_withholding()
  File "apps/hrms/hrms/payroll/doctype/salary_slip/salary_slip.py", line 174, in check_salary_withholding
    withholding = get_salary_withholdings(self.start_date, self.end_date, self.employee)
  File "apps/hrms/hrms/payroll/doctype/payroll_entry/payroll_entry.py", line 1659, in get_salary_withholdings
    return withheld_salaries.run(as_dict=True)
  File "apps/frappe/frappe/query_builder/utils.py", line 87, in execute_query
    result = frappe.db.sql(query, params, *args, **kwargs)  # nosemgrep
  File "apps/frappe/frappe/database/database.py", line 244, in sql
    self._cursor.execute(query, values)
  File "env/lib/python3.10/site-packages/pymysql/cursors.py", line 153, in execute
    result = self._query(query)
  File "env/lib/python3.10/site-packages/pymysql/cursors.py", line 322, in _query
    conn.query(q)
  File "env/lib/python3.10/site-packages/pymysql/connections.py", line 563, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "env/lib/python3.10/site-packages/pymysql/connections.py", line 825, in _read_query_result
    result.read()
  File "env/lib/python3.10/site-packages/pymysql/connections.py", line 1199, in read
    first_packet = self.connection._read_packet()
  File "env/lib/python3.10/site-packages/pymysql/connections.py", line 775, in _read_packet
    packet.raise_for_error()
  File "env/lib/python3.10/site-packages/pymysql/protocol.py", line 219, in raise_for_error
    err.raise_mysql_exception(self._data)
  File "env/lib/python3.10/site-packages/pymysql/err.py", line 150, in raise_mysql_exception
    raise errorclass(errno, errval)
pymysql.err.ProgrammingError: (1146, "Table '_2b1f9b61e215d74e.tabSalary Withholding' doesn't exist")

Request Data

{
	"type": "POST",
	"args": {
		"doc": "{\"docstatus\":0,\"doctype\":\"Salary Slip\",\"name\":\"new-salary-slip-fgkhxxwrlc\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"Administrator\",\"posting_date\":\"2024-12-14\",\"letter_head\":\"Essque Zalu Zanzibar\",\"status\":\"Draft\",\"company\":\"Essque Zalu Zanzibar\",\"currency\":\"TZS\",\"exchange_rate\":1,\"payroll_frequency\":\"Monthly\",\"salary_slip_based_on_timesheet\":0,\"deduct_tax_for_unclaimed_employee_benefits\":0,\"deduct_tax_for_unsubmitted_tax_exemption_proof\":0,\"employee_name\":\"IKUA  KARANJA\",\"department\":\"FINANCE - EZZ\",\"designation\":\"FINANCIA CONTROLLER\",\"employee\":\"HR-EMP-00148\",\"idx\":0,\"start_date\":\"2024-12-01\",\"end_date\":\"2024-12-31\",\"salary_structure\":\"NEW PAY\",\"mode_of_payment\":\"Bank\",\"total_working_days\":31,\"unmarked_days\":0,\"leave_without_pay\":0,\"absent_days\":0,\"payment_days\":31,\"total_working_hours\":0,\"hour_rate\":0,\"base_hour_rate\":0,\"gross_pay\":19504000,\"base_gross_pay\":19504000,\"gross_year_to_date\":0,\"base_gross_year_to_date\":0,\"total_deduction\":6546250,\"base_total_deduction\":6546250,\"net_pay\":12957750,\"base_net_pay\":12957750,\"rounded_total\":12957750,\"base_rounded_total\":12957750,\"year_to_date\":0,\"base_year_to_date\":0,\"month_to_date\":0,\"base_month_to_date\":0,\"total_in_words\":\"TZS Twelve Million, Nine Hundred And Fifty Seven Thousand, Seven Hundred And Fifty only.\",\"base_total_in_words\":\"TZS Twelve Million, Nine Hundred And Fifty Seven Thousand, Seven Hundred And Fifty only.\",\"ctc\":0,\"income_from_other_sources\":0,\"total_earnings\":0,\"non_taxable_earnings\":0,\"standard_tax_exemption_amount\":0,\"tax_exemption_declaration\":0,\"deductions_before_tax_calculation\":0,\"annual_taxable_amount\":0,\"income_tax_deducted_till_date\":0,\"current_month_income_tax\":0,\"future_income_tax_deductions\":0,\"total_income_tax\":0,\"bank_name\":\"NCBA\",\"bank_account_no\":\"158231100014\",\"deductions\":[{\"docstatus\":0,\"idx\":1,\"salary_component\":\"Pay As You Earn (PAYE)\",\"abbr\":\"PAYE\",\"amount\":5198750,\"year_to_date\":0,\"is_recurring_additional_salary\":0,\"statistical_component\":0,\"depends_on_payment_days\":0,\"exempted_from_income_tax\":0,\"is_tax_applicable\":0,\"is_flexible_benefit\":0,\"variable_based_on_taxable_salary\":1,\"do_not_include_in_total\":0,\"deduct_full_tax_on_selected_payroll_date\":0,\"amount_based_on_formula\":0,\"default_amount\":0,\"additional_amount\":0,\"tax_on_flexible_benefit\":0,\"tax_on_additional_salary\":0,\"parent\":\"new-salary-slip-fgkhxxwrlc\",\"parentfield\":\"deductions\",\"parenttype\":\"Salary Slip\",\"doctype\":\"Salary Detail\",\"__islocal\":1,\"name\":\"new-salary-slip-ayyiusnlqo\"},{\"docstatus\":0,\"doctype\":\"Salary Detail\",\"name\":\"new-salary-detail-rfxnnksupn\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"Administrator\",\"is_recurring_additional_salary\":0,\"statistical_component\":0,\"depends_on_payment_days\":1,\"exempted_from_income_tax\":0,\"is_tax_applicable\":0,\"is_flexible_benefit\":0,\"variable_based_on_taxable_salary\":0,\"do_not_include_in_total\":0,\"deduct_full_tax_on_selected_payroll_date\":0,\"amount_based_on_formula\":0,\"parent\":\"new-salary-slip-fgkhxxwrlc\",\"parentfield\":\"deductions\",\"parenttype\":\"Salary Slip\",\"idx\":2,\"abbr\":\"ZSSF\",\"salary_component\":\"Zanzibar Social Security Fund\",\"amount\":1347500,\"year_to_date\":0,\"default_amount\":0,\"additional_amount\":0,\"tax_on_flexible_benefit\":0,\"tax_on_additional_salary\":0},{\"docstatus\":0,\"doctype\":\"Salary Detail\",\"name\":\"new-salary-detail-dhpvrpmtyu\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"Administrator\",\"is_recurring_additional_salary\":0,\"statistical_component\":0,\"depends_on_payment_days\":1,\"exempted_from_income_tax\":0,\"is_tax_applicable\":0,\"is_flexible_benefit\":0,\"variable_based_on_taxable_salary\":0,\"do_not_include_in_total\":0,\"deduct_full_tax_on_selected_payroll_date\":0,\"amount_based_on_formula\":0,\"parent\":\"new-salary-slip-fgkhxxwrlc\",\"parentfield\":\"deductions\",\"parenttype\":\"Salary Slip\",\"idx\":3,\"abbr\":\"sa\",\"salary_component\":\"Salary Advance\",\"amount\":0,\"year_to_date\":0,\"default_amount\":0,\"additional_amount\":0,\"tax_on_flexible_benefit\":0,\"tax_on_additional_salary\":0}],\"leave_details\":[],\"timesheets\":[],\"earnings\":[{\"docstatus\":0,\"doctype\":\"Salary Detail\",\"name\":\"new-salary-detail-nqqemlwkhu\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"Administrator\",\"is_recurring_additional_salary\":0,\"statistical_component\":0,\"depends_on_payment_days\":1,\"exempted_from_income_tax\":0,\"is_tax_applicable\":1,\"is_flexible_benefit\":0,\"variable_based_on_taxable_salary\":0,\"do_not_include_in_total\":0,\"deduct_full_tax_on_selected_payroll_date\":0,\"amount_based_on_formula\":0,\"parent\":\"new-salary-slip-fgkhxxwrlc\",\"parentfield\":\"earnings\",\"parenttype\":\"Salary Slip\",\"idx\":1,\"abbr\":\"bs\",\"salary_component\":\"Basic Salary\",\"amount\":19250000,\"year_to_date\":0,\"default_amount\":0,\"additional_amount\":0,\"tax_on_flexible_benefit\":0,\"tax_on_additional_salary\":0},{\"docstatus\":0,\"doctype\":\"Salary Detail\",\"name\":\"new-salary-detail-cjygsbvqfr\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"Administrator\",\"is_recurring_additional_salary\":0,\"statistical_component\":0,\"depends_on_payment_days\":0,\"exempted_from_income_tax\":0,\"is_tax_applicable\":0,\"is_flexible_benefit\":1,\"variable_based_on_taxable_salary\":0,\"do_not_include_in_total\":0,\"deduct_full_tax_on_selected_payroll_date\":0,\"amount_based_on_formula\":0,\"parent\":\"new-salary-slip-fgkhxxwrlc\",\"parentfield\":\"earnings\",\"parenttype\":\"Salary Slip\",\"idx\":2,\"abbr\":\"HA\",\"salary_component\":\"Housing Allowance\",\"amount\":254000,\"year_to_date\":0,\"default_amount\":0,\"additional_amount\":0,\"tax_on_flexible_benefit\":0,\"tax_on_additional_salary\":0},{\"docstatus\":0,\"doctype\":\"Salary Detail\",\"name\":\"new-salary-detail-wzuvhtgcqb\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"Administrator\",\"is_recurring_additional_salary\":0,\"statistical_component\":0,\"depends_on_payment_days\":1,\"exempted_from_income_tax\":0,\"is_tax_applicable\":1,\"is_flexible_benefit\":0,\"variable_based_on_taxable_salary\":0,\"do_not_include_in_total\":0,\"deduct_full_tax_on_selected_payroll_date\":0,\"amount_based_on_formula\":0,\"parent\":\"new-salary-slip-fgkhxxwrlc\",\"parentfield\":\"earnings\",\"parenttype\":\"Salary Slip\",\"idx\":3,\"amount\":0,\"year_to_date\":0,\"default_amount\":0,\"additional_amount\":0,\"tax_on_flexible_benefit\":0,\"tax_on_additional_salary\":0,\"abbr\":\"A\",\"salary_component\":\"Arrear\"},{\"docstatus\":0,\"doctype\":\"Salary Detail\",\"name\":\"new-salary-detail-gbgfuuqxhb\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"Administrator\",\"is_recurring_additional_salary\":0,\"statistical_component\":0,\"depends_on_payment_days\":1,\"exempted_from_income_tax\":0,\"is_tax_applicable\":0,\"is_flexible_benefit\":0,\"variable_based_on_taxable_salary\":0,\"do_not_include_in_total\":0,\"deduct_full_tax_on_selected_payroll_date\":0,\"amount_based_on_formula\":0,\"parent\":\"new-salary-slip-fgkhxxwrlc\",\"parentfield\":\"earnings\",\"parenttype\":\"Salary Slip\",\"idx\":4,\"abbr\":\"NS\",\"salary_component\":\"Night Shift\",\"amount\":0,\"year_to_date\":0,\"default_amount\":0,\"additional_amount\":0,\"tax_on_flexible_benefit\":0,\"tax_on_additional_salary\":0},{\"docstatus\":0,\"doctype\":\"Salary Detail\",\"name\":\"new-salary-detail-xwdtvrrwxe\",\"__islocal\":1,\"__unsaved\":1,\"owner\":\"Administrator\",\"is_recurring_additional_salary\":0,\"statistical_component\":0,\"depends_on_payment_days\":1,\"exempted_from_income_tax\":0,\"is_tax_applicable\":1,\"is_flexible_benefit\":0,\"variable_based_on_taxable_salary\":0,\"do_not_include_in_total\":0,\"deduct_full_tax_on_selected_payroll_date\":0,\"amount_based_on_formula\":0,\"parent\":\"new-salary-slip-fgkhxxwrlc\",\"parentfield\":\"earnings\",\"parenttype\":\"Salary Slip\",\"idx\":5,\"abbr\":\"AA\",\"salary_component\":\"Acting Allowance\",\"amount\":0,\"year_to_date\":0,\"default_amount\":0,\"additional_amount\":0,\"tax_on_flexible_benefit\":0,\"tax_on_additional_salary\":0}],\"__onload\":{\"load_after_mapping\":true}}",
		"action": "Save"
	},
	"btn": {
		"jQuery360027649636006772281": {
			"events": {
				"click": [
					{
						"type": "click",
						"origType": "click",
						"guid": 5689,
						"namespace": ""
					}
				]
			}
		}
	},
	"freeze": true,
	"headers": {},
	"error_handlers": {},
	"url": "/api/method/frappe.desk.form.save.savedocs"
}

Response Data

{
	"exception": "pymysql.err.ProgrammingError: (1146, \"Table '_2b1f9b61e215d74e.tabSalary Withholding' doesn't exist\")"
}

hi guys

whenever i want to make a salary slip iam getting that error

You install develop branch of hrms. Use version-14 branch

how do i do that

cd ~/frappe-bench

bench switch-to-branch version-14 hrms

bench update --patch

bench migrate

iam getting below error

fatal: unable to access ‘GitHub - frappe/hrms: Open Source HR and Payroll Software’: Could not resolve host: github.com
error: Could not fetch upstream
ERROR: git fetch --all --unshallow --quiet
subprocess.CalledProcessError: Command ‘git fetch --all --unshallow --quiet’ returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “/usr/local/bin/bench”, line 8, in
sys.exit(cli())
File “/usr/local/lib/python3.10/dist-packages/bench/cli.py”, line 132, in cli
bench_command()
File “/usr/local/lib/python3.10/dist-packages/bench/commands/update.py”, line 93, in switch_to_branch
switch_to_branch(branch=branch, apps=list(apps), upgrade=upgrade)
File “/usr/local/lib/python3.10/dist-packages/bench/utils/app.py”, line 108, in switch_to_branch
switch_branch(branch, apps=apps, bench_path=bench_path, upgrade=upgrade)
File “/usr/local/lib/python3.10/dist-packages/bench/utils/app.py”, line 69, in switch_branch
exec_cmd(
File “/usr/local/lib/python3.10/dist-packages/bench/utils/init.py”, line 169, in exec_cmd
raise CommandFailedError(cmd) from subprocess.CalledProcessError(return_code, cmd)
bench.exceptions.CommandFailedError: git fetch --all --unshallow --quiet