FIX Debug v15

This commit is contained in:
Laurent Destailleur
2022-02-18 16:24:11 +01:00
parent cd9c1acafe
commit 3d9cdbf136
6 changed files with 8 additions and 6 deletions

View File

@@ -1805,6 +1805,7 @@ class Adherent extends CommonObject
$paiement = new Paiement($this->db); $paiement = new Paiement($this->db);
$paiement->datepaye = $paymentdate; $paiement->datepaye = $paymentdate;
$paiement->amounts = $amounts; $paiement->amounts = $amounts;
$paiement->paiementcode = $operation;
$paiement->paiementid = dol_getIdFromCode($this->db, $operation, 'c_paiement', 'code', 'id', 1); $paiement->paiementid = dol_getIdFromCode($this->db, $operation, 'c_paiement', 'code', 'id', 1);
$paiement->num_payment = $num_chq; $paiement->num_payment = $num_chq;
$paiement->note_public = $label; $paiement->note_public = $label;

View File

@@ -613,7 +613,7 @@ class Paiement extends CommonObject
// Insert payment into llx_bank // Insert payment into llx_bank
$bank_line_id = $acc->addline( $bank_line_id = $acc->addline(
$this->datepaye, $this->datepaye,
$this->paiementid, // Payment mode id or code ("CHQ or VIR for example") $this->paiementcode ? $this->paiementcode : $this->paiementid, // Payment mode code ('CB', 'CHQ' or 'VIR' for example). Use payment id if not defined for backward compatibility.
$label, $label,
$totalamount, // Sign must be positive when we receive money (customer payment), negative when you give money (supplier invoice or credit note) $totalamount, // Sign must be positive when we receive money (customer payment), negative when you give money (supplier invoice or credit note)
$this->num_payment, $this->num_payment,

View File

@@ -10373,6 +10373,7 @@ function newToken()
/** /**
* Return the value of token currently saved into session with name 'token'. * Return the value of token currently saved into session with name 'token'.
* For ajax call, you must use this token as a parameter of the call into the js calling script (the called ajax php page must also set constant NOTOKENRENEWAL).
* *
* @return string * @return string
*/ */

View File

@@ -1181,9 +1181,9 @@ class pdf_crabe extends ModelePDFFactures
$pdf->SetXY($this->marge_gauche, $posy); $pdf->SetXY($this->marge_gauche, $posy);
$pdf->writeHTMLCell(80, 5, '', '', dol_htmlentitiesbr($linktopay), 0, 1); $pdf->writeHTMLCell(80, 5, '', '', dol_htmlentitiesbr($linktopay), 0, 1);
}
$posy = $pdf->GetY() + 1; $posy = $pdf->GetY() + 1;
}
} }
// Show payment mode CHQ // Show payment mode CHQ

View File

@@ -1259,9 +1259,9 @@ class pdf_sponge extends ModelePDFFactures
$pdf->SetXY($this->marge_gauche, $posy); $pdf->SetXY($this->marge_gauche, $posy);
$pdf->writeHTMLCell(80, 5, '', '', dol_htmlentitiesbr($linktopay), 0, 1); $pdf->writeHTMLCell(80, 5, '', '', dol_htmlentitiesbr($linktopay), 0, 1);
}
$posy = $pdf->GetY() + 1; $posy = $pdf->GetY() + 1;
}
} }
// Show payment mode CHQ // Show payment mode CHQ

View File

@@ -412,7 +412,7 @@ if ($ispaymentok) {
$paymentTypeId = dol_getIdFromCode($db, $paymentType, 'c_paiement', 'code', 'id', 1); $paymentTypeId = dol_getIdFromCode($db, $paymentType, 'c_paiement', 'code', 'id', 1);
} }
dol_syslog("FinalPaymentAmt=".$FinalPaymentAmt." paymentTypeId=".$paymentTypeId." currencyCodeType=".$currencyCodeType, LOG_DEBUG, 0, '_payment'); dol_syslog("FinalPaymentAmt=".$FinalPaymentAmt." paymentTypeId=".$paymentTypeId." paymentType=".$paymentType." currencyCodeType=".$currencyCodeType, LOG_DEBUG, 0, '_payment');
// Do action only if $FinalPaymentAmt is set (session variable is cleaned after this page to avoid duplicate actions when page is POST a second time) // Do action only if $FinalPaymentAmt is set (session variable is cleaned after this page to avoid duplicate actions when page is POST a second time)
if (!empty($FinalPaymentAmt) && $paymentTypeId > 0) { if (!empty($FinalPaymentAmt) && $paymentTypeId > 0) {