Skip to content

Commit

Permalink
feature: Final Settlement Management for Pension Fund
Browse files Browse the repository at this point in the history
- Added configuration parameters to enable pension fund breakdown functionality
- Implemented configuration parameter for retirement fund breakdown sections
- Enhanced confirmation form for placing Payroll accounting entries on hold
- Implemented interface for defining retirement fund distribution among employees
- Enhanced pension fund breakdown and provisioning across default, employee-specific, and cost center modes
  • Loading branch information
lomamech committed Jul 26, 2024
1 parent 9c984fe commit 936d4a4
Show file tree
Hide file tree
Showing 67 changed files with 3,013 additions and 3,592 deletions.
2 changes: 1 addition & 1 deletion client/src/i18n/en/enterprise.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"ENABLE_AUTO_EMAIL_REPORT_HELP_TEXT" : "Enabling this option allows users to configure schedules to automatically send reports to a list of email addresses.",
"ENABLE_REQUIRE_COST_CENTER_FOR_POSTING" : "Enable cost centers requirement for posting to general ledger",
"ENABLE_REQUIRE_COST_CENTER_FOR_POSTING_HELP_TEXT" : "Require cost centers for operating accounts (6 and 7) before posting entries in the general ledger",
"ENABLE_INDEX_PAYMENT_SYSTEM" : "Enabling index payment system",
"ENABLE_INDEX_PAYMENT_SYSTEM" : "Enable index payment system",
"HELPDESK_TEXT" : "Helpdesk Contact Information",
"HELPDESK_TEXT_HELP" : "If provided, show this information about how to contact the help desk on the bottom of the login page",
"ENABLE_PRF_DETAILS": "Enable additional information for purchases",
Expand Down
8 changes: 7 additions & 1 deletion client/src/i18n/en/form.json
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@
"CREDIT_NOTE_INVOICE": "Credit Note reversing invoice {{ invoiceReference }} of debtor {{ debtorName }} ({{ debtorIdentifier }}). {{ description }}",
"CURRENT": "Current",
"DANGER_ZONE": "Danger Zone",
"DEFINE_AMOUNT_FOUND": "Define the amount of the pension fund",
"DEFINE_PACKAGING": "Define packaging",
"DELETE_RECORD_SUCCESS": "Successfully deleted the record.",
"DELETE_SUCCESS": "Successfully deleted a record",
Expand Down Expand Up @@ -496,6 +497,7 @@
"ENTRY_EXIT": "Entry Exit",
"ERROR_403": "Error 403",
"ERROR_404": "Error 404",
"ENVELOPE_ALLOCATED_PENSION_FUND": "Envelope allocated for the Pension fund",
"EXCHANGE_RATE": "Exchange Rate",
"EXIT": "Exit",
"EXPENSE_ACCOUNT": "Expense Accounts",
Expand Down Expand Up @@ -569,9 +571,10 @@
"IS_BRUT_LINK": "Is Brut Link?",
"IS_CHARGE": "Is Cost?",
"IS_CONVENTION": "Convention",
"IS_DEFINED_EMPLOYEE": "Is defined by employee?",
"IS_DEFINED_EMPLOYEE": "Is defined per employee?",
"IS_EXCEPTION": "Is an exception",
"IS_IPR" : "Is IPR?",
"IS_LINKED_PENSION_FUND": "Is linked to the pension fund",
"IS_MEDICAL_STAFF":"Is medical staff?",
"IS_PASSIVE": "Is passive",
"IS_PERCENT": "Is Percent",
Expand Down Expand Up @@ -696,6 +699,7 @@
"PERIOD_OPTIONAL": "Period (optional)",
"PERIOD_TO": "Period To",
"PERIOD_TOTAL": "Period Total",
"PENSION_FUND_BREACKDOWN": "Pension fund breakdown",
"PHONE_NO": "Phone Number",
"PHONE": "Phone",
"PO_BOX": "PO Box",
Expand Down Expand Up @@ -853,6 +857,7 @@
"TRANSACTION_DATE": "Transaction Date",
"TRANSACTION": "Transaction",
"TRANSACTION_TYPE": "Transaction Type",
"TRANSACTION_TYPE_PENSION": "Type of transaction for the pension",
"TRANSFER_ACCOUNT": "Transfer Account",
"TRANSFER_CASHBOX": "Transfer to the Principal Cashbox",
"TRANSFERS_IN_TRANSIT": "Transfers in transit",
Expand Down Expand Up @@ -1105,6 +1110,7 @@
"SUPPLIER": "Supplier",
"TAGS":"Select tags to add",
"TRANSACTION_TYPE": "Select a Transaction Type",
"TRANSACTION_TYPE_PENSION": "Select a Pension Transaction Type",
"TYPE": "Select a Type",
"USER": "Select User",
"VILLAGE": "Select a Village/Township",
Expand Down
9 changes: 7 additions & 2 deletions client/src/i18n/en/payroll.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,15 @@
"PAYROLL_SETTINGS" : {
"DEFAULT" : "Default",
"DEFAULT_HELP_TEXT" : "With this option, transactions related to employee payment are done in bulk and require that each expense account be linked to a cost center",
"ENABLE_INDEX_PAYMENT_SYSTEM" : "Enabling index payment system",
"ENABLE_INDEX_PAYMENT_SYSTEM" : "Enable index payment system",
"ENABLE_ACTIVATE_PENSION_FUND_BREACKDOWN": "Enable pension fund handling",
"GROUP_BY_COST_CENTERS" : "Group by cost centers",
"GROUP_BY_COST_CENTERS_HELP_TEXT": "With this option the transactions related to the payment of the employees are done by group compared to the related cost centers of the employees.",
"INDIVIDUALLY_PER_EMPLOYEE" : "Individually per employee",
"INDIVIDUALLY_PER_EMPLOYEE_HELP_TEXT" : "With this option, transactions related to the payment of employee salaries are done individually by employee"
"INDIVIDUALLY_PER_EMPLOYEE_HELP_TEXT" : "With this option, transactions related to the payment of employee salaries are done individually by employee",
"SELECT_TRANSACTION_TYPE_HELP_TEXT": "Please select the appropriate transaction type to ensure accurate accounting entries for the retirement fund allocation.",
"SET_FUND_AMOUNT_PERCENTAGE": "Set fund amount as a percentage",
"SET_PERCENTAGE": "Set this percentage",
"SET_PERCENTAGE_HELP_TEXT": "The percentage to define is for the distribution of the pension fund relative to the monthly revenues."
}
}
6 changes: 6 additions & 0 deletions client/src/i18n/fr/form.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@
"CREDIT_NOTE_INVOICE": "Note de credit concernant la facture {{ invoiceReference }} de debiteur {{ debtorName }} ({{ debtorIdentifier }}). {{ description }}",
"CURRENT": "Actuel",
"DANGER_ZONE": "Zone Dangereuse",
"DEFINE_AMOUNT_FOUND": "Définir le montant de la caisse de la retraite",
"DEFINE_PACKAGING": "Définir le Conditionnement",
"DELETE_RECORD_SUCCESS": "Suppression de la transaction avec succès.",
"DELETE_SUCCESS": "Suppression avec succès",
Expand Down Expand Up @@ -497,6 +498,7 @@
"ENTITY": "Entité",
"ENTRY": "Entrées",
"ENTRY_EXIT": "Entrées Sorties",
"ENVELOPE_ALLOCATED_PENSION_FUND": "Enveloppe alloué pour la caisse de la retraite",
"ERROR_403": "Erreur 403",
"ERROR_404": "Erreur 404",
"EXCHANGE_RATE": "Taux d'echange",
Expand Down Expand Up @@ -575,6 +577,7 @@
"IS_DEFINED_EMPLOYEE": "Est définie par employé ?",
"IS_EXCEPTION": "Est une exception",
"IS_IPR" : "IPR",
"IS_LINKED_PENSION_FUND": "Est liée à la caisse des retraites",
"IS_MEDICAL_STAFF":"Est ce un personnel médical ?",
"IS_PASSIVE": "Est un passif",
"IS_PERCENT": "En pourcentage",
Expand Down Expand Up @@ -698,6 +701,7 @@
"PERIOD_OPTIONAL": "Période (optionnelle)",
"PERIOD_TO": "Période Au",
"PERIOD_TOTAL": "Total de la période",
"PENSION_FUND_BREACKDOWN": "Ventillation de la caisse des retraites",
"PHONE_NO": "Numéro de Téléphone",
"PHONE": "Téléphone",
"PO_BOX": "BP",
Expand Down Expand Up @@ -855,6 +859,7 @@
"TRANSACTION_DATE": "Date de Transaction",
"TRANSACTION": "Transaction",
"TRANSACTION_TYPE": "Type de transaction",
"TRANSACTION_TYPE_PENSION": "Type de transaction pour la pension",
"TRANSFER_ACCOUNT": "Compte de transfert",
"TRANSFER_CASHBOX": "Transfert à la caisse principale",
"TRANSFERS_IN_TRANSIT": "Les transferts en transit",
Expand Down Expand Up @@ -1105,6 +1110,7 @@
"SUPPLIER": "Selectionner Fournisseur",
"TAGS":"Sélectionner les étiquettes à joindre",
"TRANSACTION_TYPE": "Sélectionner le Type de la Transaction",
"TRANSACTION_TYPE_PENSION": "Sélectionnez un type de transaction pour la pension",
"TYPE": "Sélectionner un Type",
"USER": "Selectionner Utilisateur",
"VILLAGE": "Sélectionner Village/Commune",
Expand Down
7 changes: 6 additions & 1 deletion client/src/i18n/fr/payroll.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,15 @@
"PAYROLL_SETTINGS" : {
"DEFAULT" : "Par défaut",
"DEFAULT_HELP_TEXT" : "Avec cette option les transactions liés aux paiement des employés se font en bloc et nécessite à ce que chaque comptes des charges soient réliées à un centre de coût",
"ENABLE_ACTIVATE_PENSION_FUND_BREACKDOWN": "Activer la ventillation de la caisse des retraites",
"ENABLE_INDEX_PAYMENT_SYSTEM" : "Activer le systeme de payement par indice",
"GROUP_BY_COST_CENTERS" : "Régrouper par centres des frais",
"GROUP_BY_COST_CENTERS_HELP_TEXT": "Avec cette option les transactions liées au paiement des employés se font par groupe par rapport aux centres des coûts rélatives des employés ",
"INDIVIDUALLY_PER_EMPLOYEE" : "Individuellement par employé",
"INDIVIDUALLY_PER_EMPLOYEE_HELP_TEXT" : "Avec cette option les transactions liées au paiement des employés se font individuellement par employée"
"INDIVIDUALLY_PER_EMPLOYEE_HELP_TEXT" : "Avec cette option les transactions liées au paiement des employés se font individuellement par employée",
"SELECT_TRANSACTION_TYPE_HELP_TEXT": "Veuillez sélectionner le type de transaction approprié pour garantir des écritures comptables précises lors de la ventilation des fonds de la caisse de retraites.",
"SET_FUND_AMOUNT_PERCENTAGE": "Définir le montant de la caisse en pourcentage",
"SET_PERCENTAGE": "Définir ce pourcentage",
"SET_PERCENTAGE_HELP_TEXT": "Le pourcentage à définir est pour la ventilation du fonds de la caisse de retraite par rapport aux recettes mensuelles."
}
}
2 changes: 1 addition & 1 deletion client/src/modules/employees/registration/employees.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="flex-header">
<div class="bhima-title">
<ol class="headercrumb">
<li class="static" translate>TREE.PAYROLL</li>
<li class="static" translate>TREE.HUMANS_RESSOURCES</li>
<li class="title" translate>EMPLOYEE.TITLE</li>
<li ng-if="EmployeeCtrl.isUpdating" class="title">{{ EmployeeCtrl.employee.name }}</li>
</ol>
Expand Down
2 changes: 1 addition & 1 deletion client/src/modules/employees/registry/registry.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="flex-header">
<div class="bhima-title">
<ol class="headercrumb">
<li class="static" translate>TREE.PAYROLL</li>
<li class="static" translate>TREE.HUMANS_RESSOURCES</li>
<li class="title" translate>EMPLOYEE_REGISTRY.TITLE</li>
</ol>

Expand Down
2 changes: 1 addition & 1 deletion client/src/modules/functions/functions.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="flex-header">
<div class="bhima-title">
<ol class="headercrumb">
<li class="static" translate>TREE.ADMIN</li>
<li class="static" translate>TREE.HUMANS_RESSOURCES</li>
<li class="title" translate>TREE.PROFESSION</li>
</ol>

Expand Down
1 change: 1 addition & 0 deletions client/src/modules/functions/modals/function.modal.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<div class="modal-header">
<ol class="headercrumb">
<li class="static" translate>TREE.HUMANS_RESSOURCES</li>
<li class="static" translate>TREE.PROFESSION</li>
<li ng-if="FunctionModalCtrl.isCreateState" class="title">
<span translate>FORM.INFO.ADD_FUNCTION</span>
Expand Down
2 changes: 1 addition & 1 deletion client/src/modules/grades/grades.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="flex-header">
<div class="bhima-title">
<ol class="headercrumb">
<li class="static" translate>TREE.ADMIN</li>
<li class="static" translate>TREE.HUMANS_RESSOURCES</li>
<li class="title" translate>GRADE.TITLE</li>
</ol>

Expand Down
1 change: 1 addition & 0 deletions client/src/modules/grades/modals/grade.modal.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<form name="GradeForm" bh-submit="GradeModalCtrl.submit(GradeForm)" novalidate>
<div class="modal-header">
<ol class="headercrumb">
<li class="static" translate>TREE.HUMANS_RESSOURCES</li>
<li class="static" translate>GRADE.TITLE</li>
<li ng-if="GradeModalCtrl.isCreateState" class="title">
<span translate>GRADE.ADD_GRADE</span>
Expand Down
2 changes: 1 addition & 1 deletion client/src/modules/holidays/holidays.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="flex-header">
<div class="bhima-title">
<ol class="headercrumb">
<li class="static" translate> TREE.ADMIN </li>
<li class="static" translate>TREE.HUMANS_RESSOURCES</li>
<li class="title" translate> HOLIDAY.TITLE </li>
</ol>

Expand Down
1 change: 1 addition & 0 deletions client/src/modules/holidays/modals/holiday.modal.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<form name="HolidayForm" bh-submit="HolidayModalCtrl.submit(HolidayForm)" novalidate>
<div class="modal-header">
<ol class="headercrumb">
<li class="static" translate>TREE.HUMANS_RESSOURCES</li>
<li class="static" translate>HOLIDAY.TITLE</li>
<li ng-if="HolidayModalCtrl.isCreateState" class="title">
<span translate>HOLIDAY.ADD_HOLIDAY</span>
Expand Down
2 changes: 1 addition & 1 deletion client/src/modules/ipr_tax/configuration/iprTaxConfig.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="flex-header">
<div class="bhima-title">
<ol class="headercrumb">
<li class="static" translate> TREE.ADMIN </li>
<li class="static" translate>TREE.HUMANS_RESSOURCES</li>
<li class="title" translate> IPRTAX.CONFIG </li>
</ol>

Expand Down
2 changes: 1 addition & 1 deletion client/src/modules/ipr_tax/ipr_tax.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="flex-header">
<div class="bhima-title">
<ol class="headercrumb">
<li class="static" translate>TREE.ADMIN</li>
<li class="static" translate>TREE.HUMANS_RESSOURCES</li>
<li class="title" translate>IPRTAX.TITLE</li>
</ol>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<form name="ConfigPaiementForm" bh-submit="ConfigPaiementModalCtrl.submit(ConfigPaiementForm)" novalidate>
<div class="modal-header">
<ol class="headercrumb">
<li class="static" translate>TREE.PAYROLL</li>
<li class="static" translate>TREE.HUMANS_RESSOURCES</li>
<li class="title" translate>TREE.MULTI_PAYROLL</li>
<label class="badge badge-success">{{ ConfigPaiementModalCtrl.employee.display_name }}</label>
<label class="badge badge-primary"><span translate> {{ ConfigPaiementModalCtrl.label }} </span> : {{ ConfigPaiementModalCtrl.displayValue }}</label>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<form name="ModalForm" bh-submit="$ctrl.submit(ModalForm)" novalidate>
<div class="modal-header">
<ol class="headercrumb">
<li class="static" translate>TREE.PAYROLL</li>
<li class="static" translate>TREE.HUMANS_RESSOURCES</li>
<li class="title" translate>TREE.MULTI_PAYROLL</li>
</ol>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<form name="ModalForm" bh-submit="ModalCtrl.submit(ModalForm)" novalidate>
<div class="modal-header">
<ol class="headercrumb">
<li class="static" translate>TREE.HUMANS_RESSOURCES</li>
<li class="static" translate>FORM.BUTTONS.PUT_ON_WAITING</li>
</ol>
</div>
Expand All @@ -25,11 +26,11 @@
<tbody>
<tr>
<td translate>FORM.INFO.PAYMENT_PERIOD</td>
<td>{{ModalCtrl.employeesNumber}}</td>
<td>{{ModalCtrl.paiementPeriodLabel}}</td>
</tr>
<tr>
<td translate>FORM.INFO.NUMBER_EMPLOYEES_SELECTED</td>
<td>{{ModalCtrl.paiementPeriodLabel}}</td>
<td>{{ModalCtrl.employeesNumber}}</td>
</tr>
<tr>
<td translate>FORM.LABELS.TOTAL</td>
Expand Down
2 changes: 1 addition & 1 deletion client/src/modules/multiple_payroll/multiple_payroll.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="flex-header">
<div class="bhima-title">
<ol class="headercrumb">
<li class="static" translate>TREE.PAYROLL</li>
<li class="static" translate>TREE.HUMANS_RESSOURCES</li>
<li class="title" translate>TREE.MULTI_PAYROLL</li>
</ol>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<form name="ConfigPaiementForm" bh-submit="ConfigPaiementModalCtrl.submit(ConfigPaiementForm)" novalidate>
<div class="modal-header">
<ol class="headercrumb">
<li class="static" translate>TREE.PAYROLL</li>
<li class="static" translate>TREE.HUMANS_RESSOURCES</li>
<li class="static" translate>TREE.INDEXES</li>
<li class="title" translate>TREE.MULTI_PAYROLL</li>
<label class="badge badge-success">{{ ConfigPaiementModalCtrl.employee.display_name }}</label>
<label class="badge badge-primary"><span translate> {{ ConfigPaiementModalCtrl.label }} </span> : {{ ConfigPaiementModalCtrl.displayValue }}</label>
Expand Down Expand Up @@ -38,7 +39,7 @@
ng-repeat="rubConfigured in ConfigPaiementModalCtrl.rubrics | orderBy:'label'" class="form-group">
<bh-currency-input
data-payment-currency-input
ng-if="rubConfigured.is_monetary_value && rubConfigured.is_indice "
ng-if="rubConfigured.is_monetary_value && rubConfigured.is_indice && !rubConfigured.is_linked_pension_fund"
label="{{rubConfigured.label}}"
id="{{rubConfigured.abbr}}"
currency-id="ConfigPaiementModalCtrl.payroll.currency_id"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<form name="ModalForm" bh-submit="$ctrl.submit(ModalForm)" novalidate>
<div class="modal-header">
<ol class="headercrumb">
<li class="static" translate>TREE.HUMANS_RESSOURCES</li>
<li class="static" translate>TREE.INDEXES</li>
<li class="static" translate>TREE.MULTI_PAYROLL_INDICE</li>
<li class="title" translate>FORM.INFO.IMPORT_PAYROLL_CONFIGURATION</li>
</ol>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<form name="ModalForm" bh-submit="$ctrl.submit(ModalForm)" novalidate>
<div class="modal-header">
<ol class="headercrumb">
<li class="static" translate>TREE.HUMANS_RESSOURCES</li>
<li class="static" translate>TREE.INDEXES</li>
<li class="static" translate>FORM.LABELS.SETTINGS</li>
<li class="title" translate>TREE.MULTI_PAYROLL_INDICE</li>
</ol>
Expand All @@ -20,6 +22,25 @@
currency-id="$ctrl.currencyId"
model="$ctrl.param.pay_envelope">
</bh-currency-input>

<div class="form-group" ng-if="$ctrl.enableActivatePensionFund">
<hr>
<div class="checkbox">
<label>
<input type="checkbox" name="is_linked_pension_fund" ng-true-value="1" ng-false-value="0"
ng-model="$ctrl.is_linked_pension_fund">
<span translate>FORM.INFO.DEFINE_AMOUNT_FOUND</span>
</label>
</div>
</div>
<div ng-if="$ctrl.is_linked_pension_fund">
<bh-currency-input
id="pension_fund"
label="FORM.LABELS.ENVELOPE_ALLOCATED_PENSION_FUND"
currency-id="$ctrl.currencyId"
model="$ctrl.param.pension_fund">
</bh-currency-input>
</div>

<bh-input-text
key="working_days"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,24 @@ function MultiPayrollIndiceParamModalController(Notify, MultiplePayroll, Instanc
const vm = this;
vm.close = Instance.close;
vm.param = {};
vm.is_linked_pension_fund = 0;

vm.onInputTextChange = (key, val) => {
vm.param[key] = val;
};
vm.currencyId = Session.enterprise.currency_id;
vm.enableActivatePensionFund = Session.enterprise.settings.enable_activate_pension_fund;

vm.onSelectPayrollPeriod = (payrollConfig) => {
vm.param = {};
vm.param.payroll_configuration_id = payrollConfig.id;
MultiplePayroll.parameters.read(payrollConfig.id).then(parameter => {
if (parameter.length) {
const [param] = parameter;
if (param.pension_fund > 0) {
vm.is_linked_pension_fund = 1;
}

vm.param = param;
}
});
Expand All @@ -28,6 +36,11 @@ function MultiPayrollIndiceParamModalController(Notify, MultiplePayroll, Instanc
vm.submit = (form) => {
if (form.$invalid) { return 0; }
vm.param.lang = Languages.key;

if (!vm.is_linked_pension_fund) {
vm.param.pension_fund = 0;
}

return MultiplePayroll.parameters.create(vm.param).then(() => {
Notify.success('FORM.INFO.OPERATION_SUCCESS');
return vm.close(true);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<form name="ModalForm" bh-submit="$ctrl.submit(ModalForm)" novalidate>
<div class="modal-header">
<ol class="headercrumb">
<li class="static" translate>TREE.PAYROLL</li>
<li class="static" translate>TREE.HUMANS_RESSOURCES</li>
<li class="static" translate>TREE.INDEXES</li>
<li class="title" translate>TREE.MULTI_PAYROLL</li>
</ol>
</div>
Expand Down
Loading

0 comments on commit 936d4a4

Please sign in to comment.