Debug v17

This commit is contained in:
Laurent Destailleur 2022-12-31 14:43:31 +01:00
parent 1934db2dd1
commit 26ef1cb270
18 changed files with 67 additions and 35 deletions

View File

@ -945,7 +945,7 @@ class pdf_espadon extends ModelePdfExpedition
* @param Expedition $object Object to show
* @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output
* @return void
* @return int <0 if KO, > if OK
*/
protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{
@ -1078,6 +1078,14 @@ class pdf_espadon extends ModelePdfExpedition
}
}
$top_shift = 0;
// Show list of linked objects
/*$current_y = $pdf->getY();
$posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, $w, 3, 'R', $default_font_size);
if ($current_y < $pdf->getY()) {
$top_shift = $pdf->getY() - $current_y;
}*/
if ($showaddress) {
// Sender properties
$carac_emetteur = '';
@ -1183,6 +1191,7 @@ class pdf_espadon extends ModelePdfExpedition
}
$pdf->SetTextColor(0, 0, 0);
return $top_shift;
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore

View File

@ -520,7 +520,7 @@ class pdf_merou extends ModelePdfExpedition
* @param Expedition $object Object to show
* @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output
* @return void
* @return int <0 if KO, > if OK
*/
protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{
@ -700,6 +700,16 @@ class pdf_merou extends ModelePdfExpedition
$widthrecbox = $blW;
$top_shift = 0;
// Show list of linked objects
/*
$current_y = $pdf->getY();
$posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, $w, 3, 'R', $default_font_size);
if ($current_y < $pdf->getY()) {
$top_shift = $pdf->getY() - $current_y;
}
*/
// Show Recipient frame
$pdf->SetFont('', 'B', $default_font_size - 3);
$pdf->SetXY($blDestX, $Yoff - 4);
@ -717,5 +727,7 @@ class pdf_merou extends ModelePdfExpedition
$pdf->SetFont('', '', $default_font_size - 3);
$pdf->SetXY($blDestX, $posy);
$pdf->MultiCell($widthrecbox, 4, $carac_client, 0, 'L');
return $top_shift;
}
}

View File

@ -890,7 +890,7 @@ class pdf_rouget extends ModelePdfExpedition
* @param Expedition $object Object to show
* @param int $showaddress 0=no, 1=yes
* @param Translate $outputlangs Object lang for output
* @return void
* @return int <0 if KO, > if OK
*/
protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
{
@ -1023,6 +1023,16 @@ class pdf_rouget extends ModelePdfExpedition
}
}
$top_shift = 0;
// Show list of linked objects
/*
$current_y = $pdf->getY();
$posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, $w, 3, 'R', $default_font_size);
if ($current_y < $pdf->getY()) {
$top_shift = $pdf->getY() - $current_y;
}
*/
if ($showaddress) {
// Sender properties
$carac_emetteur = '';
@ -1128,6 +1138,7 @@ class pdf_rouget extends ModelePdfExpedition
}
$pdf->SetTextColor(0, 0, 0);
return $top_shift;
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore

View File

@ -217,7 +217,6 @@ class ConferenceOrBooth extends ActionComm
$this->socid = $this->fk_soc;
$this->datef = $this->datep2;
$this->note_private = $this->note;
$this->fk_user_author = $this->fk_user_author;
}
/**
@ -716,8 +715,8 @@ class ConferenceOrBooth extends ActionComm
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_conferenceorbooth = '.((int) $this->id)));
if (is_numeric($result)) {
$this->error = $this->error;
$this->errors = $this->errors;
$this->error = $objectline->error;
$this->errors = $objectline->errors;
return $result;
} else {
$this->lines = $result;

View File

@ -923,8 +923,8 @@ class Evaluation extends CommonObject
$result = $objectline->fetchAll('ASC', '', 0, 0, array('customsql'=>'fk_evaluation = '.$this->id));
if (is_numeric($result)) {
$this->error = $this->error;
$this->errors = $this->errors;
$this->error = $objectline->error;
$this->errors = $objectline->errors;
return $result;
} else {
$this->lines = $result;

View File

@ -561,7 +561,8 @@ class Evaluationline extends CommonObject
$sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'evaluationline/".$this->db->escape($this->ref)."' and entity = ".$conf->entity;
$resql = $this->db->query($sql);
if (!$resql) {
$error++; $this->error = $this->db->lasterror();
$error++;
$this->error = $this->db->lasterror();
}
// We rename directory ($this->ref = old ref, $num = new ref) in order not to lose the attachments
@ -891,8 +892,8 @@ class Evaluationline extends CommonObject
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_evaluationdet = '.$this->id));
if (is_numeric($result)) {
$this->error = $this->error;
$this->errors = $this->errors;
$this->error = $objectline->error;
$this->errors = $objectline->errors;
return $result;
} else {
$this->lines = $result;

View File

@ -925,8 +925,8 @@ class Job extends CommonObject
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_job = '.$this->id));
if (is_numeric($result)) {
$this->error = $this->error;
$this->errors = $this->errors;
$this->error = $objectline->error;
$this->errors = $objectline->errors;
return $result;
} else {
$this->lines = $result;

View File

@ -971,8 +971,8 @@ class Position extends CommonObject
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql' => 'fk_position = ' . $this->id));
if (is_numeric($result)) {
$this->error = $this->error;
$this->errors = $this->errors;
$this->error = $objectline->error;
$this->errors = $objectline->errors;
return $result;
} else {
$this->lines = $result;

View File

@ -965,8 +965,8 @@ class Skill extends CommonObject
$result = $objectline->fetchAll('ASC', 'rankorder', 0, 0, array('customsql'=>'fk_skill = '.$this->id));
if (is_numeric($result)) {
$this->error = $this->error;
$this->errors = $this->errors;
$this->error = $objectline->error;
$this->errors = $objectline->errors;
return $result;
} else {
$this->lines = $result;

View File

@ -919,8 +919,8 @@ class SkillRank extends CommonObject
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_skillrank = '.((int) $this->id)));
if (is_numeric($result)) {
$this->error = $this->error;
$this->errors = $this->errors;
$this->error = $objectline->error;
$this->errors = $objectline->errors;
return $result;
} else {
$this->lines = $result;

View File

@ -918,8 +918,8 @@ class KnowledgeRecord extends CommonObject
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_knowledgerecord = '.((int) $this->id)));
if (is_numeric($result)) {
$this->error = $this->error;
$this->errors = $this->errors;
$this->error = $objectline->error;
$this->errors = $objectline->errors;
return $result;
} else {
$this->lines = $result;

View File

@ -1275,8 +1275,8 @@ class Mo extends CommonObject
$result = $objectline->fetchAll('ASC', 'position', 0, 0, $TFilters);
if (is_numeric($result)) {
$this->error = $this->error;
$this->errors = $this->errors;
$this->error = $objectline->error;
$this->errors = $objectline->errors;
return $result;
} else {
$this->lines = $result;

View File

@ -1158,8 +1158,8 @@ class Partnership extends CommonObject
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_partnership = '.((int) $this->id)));
if (is_numeric($result)) {
$this->error = $this->error;
$this->errors = $this->errors;
$this->error = $objectline->error;
$this->errors = $objectline->errors;
return $result;
} else {
$this->lines = $result;

View File

@ -911,8 +911,8 @@ class StockTransfer extends CommonObject
$result = $objectline->fetchAll('ASC', 'rang', 0, 0, array('customsql'=>'fk_stocktransfer = '.$this->id));
if (is_numeric($result)) {
$this->error = $this->error;
$this->errors = $this->errors;
$this->error = $objectline->error;
$this->errors = $objectline->errors;
return $result;
} else {
$this->lines = $result;

View File

@ -915,8 +915,8 @@ class StockTransferLine extends CommonObjectLine
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_stocktransferline = '.((int) $this->id)));
if (is_numeric($result)) {
$this->error = $this->error;
$this->errors = $this->errors;
$this->error = $objectline->error;
$this->errors = $objectline->errors;
return $result;
} else {
$this->lines = $result;

View File

@ -894,8 +894,8 @@ class RecruitmentCandidature extends CommonObject
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_recruitmentcandidature = '.((int) $this->id)));
if (is_numeric($result)) {
$this->error = $this->error;
$this->errors = $this->errors;
$this->error = $objectline->error;
$this->errors = $objectline->errors;
return $result;
} else {
$this->lines = $result;

View File

@ -911,8 +911,8 @@ class Target extends CommonObject
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_target = '.((int) $this->id)));
if (is_numeric($result)) {
$this->error = $this->error;
$this->errors = $this->errors;
$this->error = $objectline->error;
$this->errors = $objectline->errors;
return $result;
} else {
$this->lines = $result;

View File

@ -919,8 +919,8 @@ class Workstation extends CommonObject
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_workstation = '.((int) $this->id)));
if (is_numeric($result)) {
$this->error = $this->error;
$this->errors = $this->errors;
$this->error = $objectline->error;
$this->errors = $objectline->errors;
return $result;
}