2
0
forked from Wavyzz/dolibarr

Debug v19

This commit is contained in:
Laurent Destailleur
2023-12-11 23:58:47 +01:00
parent f9b045bf59
commit df7fc7cd4e
3 changed files with 16 additions and 13 deletions

View File

@@ -590,7 +590,7 @@ class Account extends CommonObject
// Check parameters
if (!$oper) {
$this->error = "oper not defined";
$this->error = "Operation code not defined";
return -1;
}
if (!$this->id) {

View File

@@ -48,6 +48,13 @@ class PaymentSalary extends CommonObject
*/
public $picto = 'payment';
/**
* @var int chid
* @deprecated
* @see $fk_salary
*/
public $chid;
/**
* @var int ID
*/
@@ -133,13 +140,6 @@ class PaymentSalary extends CommonObject
*/
public $datev = '';
/**
* @var int chid
* @deprecated
* @see $id from CommonObject
*/
public $chid;
/**
* @var array
*/
@@ -265,7 +265,7 @@ class PaymentSalary extends CommonObject
if ($remaintopay == 0) {
$result = $tmpsalary->setPaid($user);
} else {
dol_syslog("Remain to pay for conrib ".$contribid." not null. We do nothing.");
dol_syslog("Remain to pay for salary id=".$contribid." not null. We do nothing.");
}
}
}
@@ -583,7 +583,7 @@ class PaymentSalary extends CommonObject
*/
public function addPaymentToBank($user, $mode, $label, $accountid, $emetteur_nom, $emetteur_banque)
{
global $conf, $langs;
global $langs;
// Clean data
$this->num_payment = trim($this->num_payment ? $this->num_payment : $this->num_paiement);

View File

@@ -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>';