mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Debug v19
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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>';
|
||||
|
||||
Reference in New Issue
Block a user