Skip to content
Snippets Groups Projects
Commit 2281850a authored by Alexandre SPANGARO's avatar Alexandre SPANGARO
Browse files

Fix label and name

parent 9d837469
No related branches found
No related tags found
No related merge requests found
...@@ -63,7 +63,7 @@ $langs->load('bills'); ...@@ -63,7 +63,7 @@ $langs->load('bills');
$langs->load('donations'); $langs->load('donations');
$langs->load("accountancy"); $langs->load("accountancy");
$langs->load("trips"); $langs->load("trips");
$langs->load("hrm"); $langs->load("salaries");
// Old system menu // Old system menu
$id_bank_account = GETPOST('id_account', 'int'); $id_bank_account = GETPOST('id_account', 'int');
...@@ -114,7 +114,7 @@ $idpays = $p[0]; ...@@ -114,7 +114,7 @@ $idpays = $p[0];
$sql = "SELECT b.rowid, b.dateo as do, b.datev as dv, b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_type,"; $sql = "SELECT b.rowid, b.dateo as do, b.datev as dv, b.amount, b.label, b.rappro, b.num_releve, b.num_chq, b.fk_type,";
$sql .= " ba.courant, ba.ref as baref, ba.account_number,"; $sql .= " ba.courant, ba.ref as baref, ba.account_number,";
$sql .= " soc.code_compta, soc.code_compta_fournisseur, soc.rowid as socid, soc.nom as name, bu1.type as typeop,"; $sql .= " soc.code_compta, soc.code_compta_fournisseur, soc.rowid as socid, soc.nom as name, bu1.type as typeop,";
$sql .= " u.accountancy_code, u.rowid as userid, u.lastname as name, u.firstname as firstname, bu2.type as typeop"; $sql .= " u.accountancy_code, u.rowid as userid, u.lastname as lastname, u.firstname as firstname, bu2.type as typeop";
$sql .= " FROM " . MAIN_DB_PREFIX . "bank as b"; $sql .= " FROM " . MAIN_DB_PREFIX . "bank as b";
$sql .= " JOIN " . MAIN_DB_PREFIX . "bank_account as ba on b.fk_account=ba.rowid"; $sql .= " JOIN " . MAIN_DB_PREFIX . "bank_account as ba on b.fk_account=ba.rowid";
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "bank_url as bu1 ON bu1.fk_bank = b.rowid AND bu1.type='company'"; $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "bank_url as bu1 ON bu1.fk_bank = b.rowid AND bu1.type='company'";
...@@ -201,8 +201,7 @@ if ($result) { ...@@ -201,8 +201,7 @@ if ($result) {
$tabuser[$obj->rowid] = array ( $tabuser[$obj->rowid] = array (
'id' => $obj->userid, 'id' => $obj->userid,
'lastname' => $obj->lastname, 'name' => $obj->firstname.' '.$obj->lastname,
'firstname' => $obj->firstname,
'accountancy_code' => $compta_user, 'accountancy_code' => $compta_user,
); );
...@@ -426,7 +425,8 @@ if (! $error && $action == 'writebookkeeping') { ...@@ -426,7 +425,8 @@ if (! $error && $action == 'writebookkeeping') {
$bookkeeping->doc_ref = $langs->trans("Donation") . ' (' . $val["paymentdonationid"] . ')'; // Rowid of donation $bookkeeping->doc_ref = $langs->trans("Donation") . ' (' . $val["paymentdonationid"] . ')'; // Rowid of donation
} else if ($tabtype[$key] == 'payment_salary') { } else if ($tabtype[$key] == 'payment_salary') {
$bookkeeping->code_tiers = ''; $bookkeeping->code_tiers = '';
$bookkeeping->doc_ref = $langs->trans("PaymentSalary") . ' (' . $val["paymentsalid"] . ')'; // Ref of salary payment $bookkeeping->label_compte = $tabuser[$key]['name'];
$bookkeeping->doc_ref = $langs->trans("SalaryPayment") . ' (' . $val["paymentsalid"] . ')'; // Ref of salary payment
} }
$result = $bookkeeping->create($user); $result = $bookkeeping->create($user);
...@@ -510,8 +510,9 @@ if (! $error && $action == 'writebookkeeping') { ...@@ -510,8 +510,9 @@ if (! $error && $action == 'writebookkeeping') {
$bookkeeping->doc_ref = $langs->trans("Donation") . ' (' . $val["paymentdonationid"] . ')'; // Rowid of donation $bookkeeping->doc_ref = $langs->trans("Donation") . ' (' . $val["paymentdonationid"] . ')'; // Rowid of donation
} else if ($tabtype[$key] == 'payment_salary') { } else if ($tabtype[$key] == 'payment_salary') {
$bookkeeping->code_tiers = $tabuser[$key]['accountancy_code']; $bookkeeping->code_tiers = $tabuser[$key]['accountancy_code'];
$bookkeeping->numero_compte = $k; $bookkeeping->numero_compte = $conf->global->SALARIES_ACCOUNTING_ACCOUNT_PAYMENT;
$bookkeeping->doc_ref = $langs->trans("PaymentSalary") . ' (' . $val["paymentsalid"] . ')'; // Rowid of salary payment $bookkeeping->label_compte = $tabuser[$key]['name'];
$bookkeeping->doc_ref = $langs->trans("SalaryPayment") . ' (' . $val["paymentsalid"] . ')'; // Rowid of salary payment
} else if ($tabtype[$key] == 'banktransfert') { } else if ($tabtype[$key] == 'banktransfert') {
$bookkeeping->code_tiers = ''; $bookkeeping->code_tiers = '';
$bookkeeping->numero_compte = $k; $bookkeeping->numero_compte = $k;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment