Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why does the payment of salaries depend on the cashbox chosen? #4956

Open
jniles opened this issue Sep 26, 2020 · 7 comments
Open

Why does the payment of salaries depend on the cashbox chosen? #4956

jniles opened this issue Sep 26, 2020 · 7 comments

Comments

@jniles
Copy link
Collaborator

jniles commented Sep 26, 2020

Here is a voucher tool that imports employees who's salaries are ready to be paid. The grid shows different items depending on the cashbox used.

image

To me, this doesn't make sense. While it is true that the employees contracts are typically in a particular currency, I don't think it should change the visibility of what employees can be paid. Why shouldn't you be able to pay someone in a different currency at the cashbox? Shouldn't the cost to the enterprise be the same?

@lomamech
Copy link
Collaborator

the main reason was because of the structure of the payment table

CREATE TABLE `paiement` (
  `uuid` BINARY(16) NOT NULL,
  `employee_uuid` BINARY(16) NOT NULL,
  `payroll_configuration_id` INT(10) UNSIGNED NOT NULL,
  `currency_id` TINYINT(3) UNSIGNED DEFAULT NULL,
  `paiement_date` date DEFAULT NULL,
  `total_day` INT(10) UNSIGNED DEFAULT 0,
  `working_day` INT(10) UNSIGNED DEFAULT 0,
  `basic_salary` DECIMAL(19,4) NOT NULL DEFAULT 0.00,
  `daily_salary` DECIMAL(19,4) NOT NULL DEFAULT 0.00,
  `base_taxable` DECIMAL(19,4) NOT NULL DEFAULT 0.00,
  `gross_salary` DECIMAL(19,4) NOT NULL DEFAULT 0.00,
  `net_salary` DECIMAL(19,4) NOT NULL DEFAULT 0.00,
  `amount_paid` DECIMAL(19,4) NOT NULL DEFAULT 0.00,
  `status_id` TINYINT(3) UNSIGNED NOT NULL DEFAULT 1,

on this table, there is a currency column which determines the cash register to be used for the payment, and if it is necessary to solve this problem, it will first be necessary to modify the structure of the payment table, And it will also take into account cases where it would be necessary to pay several employees configured with different currencies at the same time.

@jniles
Copy link
Collaborator Author

jniles commented Sep 28, 2020

@lomamech, thank you for this explanation.

Do we need to fix a salary payment to a particular currency? To me, this doesn't make a lot of sense why we cannot have a contract with an employee in FC, but pay them in USD if we have it or if they prefer. Was there a reason for this limitation?

@lomamech
Copy link
Collaborator

This situation is also linked to the modeling that was done with Bhima 1.X that we unfortunately inherited in Bhima 2.X

@jniles
Copy link
Collaborator Author

jniles commented Sep 28, 2020

Okay, if I understand you correctly, this isn't due to a legal reason or some constraint of IMCK or DRC. It was just a design decision.

If so, I say we work towards (not right now, but in the future) changing this to allow you to pay an employee in any currency for work done.

@lomamech
Copy link
Collaborator

I will say more related to the modeling of BHIMA.1X I think this issue will have to correct this modeling error

And even now, we have forced IMCK users, paid employees in dollars, and then made the exchange transaction for their paid in Franc Congolais

@jniles
Copy link
Collaborator Author

jniles commented Sep 28, 2020

Okay, excellent. Glad we are addressing this.

Thanks @lomamech for your explanations!

@jniles jniles self-assigned this Jan 20, 2025
@jniles
Copy link
Collaborator Author

jniles commented Jan 20, 2025

I'm going to be tackling this along with #7966.

My proposal is to drop the requirement to pick a currency from the modal. Instead, all payments will need to be issued in the enterprise currency.

This is already happening at both IMCK and Vanga:

Image

So I do not believe this will disrupt our user's workflow.

Instead of picking a cashbox and a currency first, the user will:
1. Pick the payment period.
2. Pick the cashbox.
3. Pick the currency.
4. Pick the employees.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants