|
@@ -106,11 +106,11 @@ if (($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm == '
|
|
|
|
|
|
// Create a line of payments
|
|
|
$paiement = new PaymentSalary($db);
|
|
|
- $paiement->id = $id;
|
|
|
+ $paiement->fk_salary = $id;
|
|
|
$paiement->chid = $id; // deprecated
|
|
|
$paiement->datep = $datepaye;
|
|
|
$paiement->amounts = $amounts; // Tableau de montant
|
|
|
- $paiement->paiementtype = GETPOST("paiementtype", 'alphanohtml');
|
|
|
+ $paiement->fk_typepayment = GETPOST("paiementtype", 'alphanohtml');
|
|
|
$paiement->num_payment = GETPOST("num_payment", 'alphanohtml');
|
|
|
$paiement->note = GETPOST("note", 'restricthtml');
|
|
|
$paiement->note_private = GETPOST("note", 'restricthtml');
|
|
@@ -126,6 +126,7 @@ if (($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm == '
|
|
|
|
|
|
if (!$error) {
|
|
|
$result = $paiement->addPaymentToBank($user, 'payment_salary', '(SalaryPayment)', GETPOST('accountid', 'int'), '', '');
|
|
|
+
|
|
|
if (!($result > 0)) {
|
|
|
$error++;
|
|
|
setEventMessages($paiement->error, null, 'errors');
|
|
@@ -237,7 +238,9 @@ if ($action == 'create') {
|
|
|
|
|
|
print '<tr>';
|
|
|
print '<td class="tdtop">'.$langs->trans("Comments").'</td>';
|
|
|
- print '<td class="tdtop"><textarea name="note" wrap="soft" cols="60" rows="'.ROWS_3.'"></textarea></td>';
|
|
|
+ print '<td class="tdtop"><textarea name="note" wrap="soft" cols="60" rows="'.ROWS_3.'">';
|
|
|
+ print GETPOST('note');
|
|
|
+ print '</textarea></td>';
|
|
|
print '</tr>';
|
|
|
|
|
|
print '</table>';
|