@@ -616,7 +616,7 @@ |
||
616 | 616 | $posy += 4; |
617 | 617 | $pdf->SetXY($posx, $posy); |
618 | 618 | $pdf->SetTextColor(0, 0, 60); |
619 | - $pdf->MultiCell(100, 3, $outputlangs->transnoentities("RefCustomer") . " : " . dol_trunc($outputlangs->convToOutputCharset($object->ref_client), 65), '', 'R'); |
|
619 | + $pdf->MultiCell(100, 3, $outputlangs->transnoentities("RefCustomer")." : ".dol_trunc($outputlangs->convToOutputCharset($object->ref_client), 65), '', 'R'); |
|
620 | 620 | } |
621 | 621 | |
622 | 622 |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | $colorseriesstat = array(); |
86 | 86 | if ($user->rights->ticket->read) { |
87 | 87 | $sql = "SELECT ctt.rowid, ctt.label, ctt.code"; |
88 | - $sql .= " FROM " . MAIN_DB_PREFIX . "c_ticket_type as ctt"; |
|
88 | + $sql .= " FROM ".MAIN_DB_PREFIX."c_ticket_type as ctt"; |
|
89 | 89 | $sql .= " WHERE ctt.active = 1"; |
90 | 90 | $sql .= $this->db->order('ctt.rowid', 'ASC'); |
91 | 91 | $resql = $this->db->query($sql); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | $dataseries = array(); |
118 | 118 | $data = array(); |
119 | 119 | $sql = "SELECT t.type_code, COUNT(t.type_code) as nb"; |
120 | - $sql .= " FROM " . MAIN_DB_PREFIX . "ticket as t"; |
|
120 | + $sql .= " FROM ".MAIN_DB_PREFIX."ticket as t"; |
|
121 | 121 | $sql .= " WHERE t.fk_statut <> 8"; |
122 | 122 | $sql .= " GROUP BY t.type_code"; |
123 | 123 | $resql = $this->db->query($sql); |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | } |
132 | 132 | foreach ($listofoppcode as $rowid => $code) { |
133 | 133 | $dataseries[] = array( |
134 | - 'label' => $langs->getLabelFromKey($this->db, 'TicketTypeShort' . $code, 'c_ticket_type', 'code', 'label', $code), |
|
134 | + 'label' => $langs->getLabelFromKey($this->db, 'TicketTypeShort'.$code, 'c_ticket_type', 'code', 'label', $code), |
|
135 | 135 | 'data' => (empty($data[$code]) ? 0 : $data[$code]) |
136 | 136 | ); |
137 | 137 | } |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | $stringtoprint .= $px1->show($totalnb ? 0 : 1); |
171 | 171 | } |
172 | 172 | $stringtoprint .= '</div>'; |
173 | - $this->info_box_contents[][]=array( |
|
173 | + $this->info_box_contents[][] = array( |
|
174 | 174 | 'td' => 'class="center"', |
175 | 175 | 'text' => $stringtoprint |
176 | 176 | ); |
@@ -254,7 +254,7 @@ |
||
254 | 254 | // Clean data |
255 | 255 | // $this->knowledgerecord->abc = sanitizeVal($this->knowledgerecord->abc, 'alphanohtml'); |
256 | 256 | |
257 | - if ($this->knowledgerecord->create(DolibarrApiAccess::$user)<0) { |
|
257 | + if ($this->knowledgerecord->create(DolibarrApiAccess::$user) < 0) { |
|
258 | 258 | throw new RestException(500, "Error creating KnowledgeRecord", array_merge(array($this->knowledgerecord->error), $this->knowledgerecord->errors)); |
259 | 259 | } |
260 | 260 | return $this->knowledgerecord->id; |
@@ -220,7 +220,7 @@ |
||
220 | 220 | // Clean data |
221 | 221 | // $this->myobject->abc = sanitizeVal($this->myobject->abc, 'alphanohtml'); |
222 | 222 | |
223 | - if ($this->myobject->create(DolibarrApiAccess::$user)<0) { |
|
223 | + if ($this->myobject->create(DolibarrApiAccess::$user) < 0) { |
|
224 | 224 | throw new RestException(500, "Error creating MyObject", array_merge(array($this->myobject->error), $this->myobject->errors)); |
225 | 225 | } |
226 | 226 | return $this->myobject->id; |
@@ -366,7 +366,7 @@ |
||
366 | 366 | $param .= "&type_element=".urlencode($type_element); |
367 | 367 | |
368 | 368 | $total_qty = 0; |
369 | -$num=0; |
|
369 | +$num = 0; |
|
370 | 370 | if ($sql_select) { |
371 | 371 | $resql = $db->query($sql); |
372 | 372 | if (!$resql) { |
@@ -33,11 +33,11 @@ discard block |
||
33 | 33 | $sql .= " AND ".$extrafieldsobjectprefix.$tmpkey." = '".$db->idate($crit)."'"; |
34 | 34 | } elseif (is_array($crit)) { |
35 | 35 | if ($crit['start'] !== '' && $crit['end'] !== '') { |
36 | - $sql .= " AND (".$extrafieldsobjectprefix.$tmpkey." BETWEEN '". $db->idate($crit['start']). "' AND '".$db->idate($crit['end']) . "')"; |
|
36 | + $sql .= " AND (".$extrafieldsobjectprefix.$tmpkey." BETWEEN '".$db->idate($crit['start'])."' AND '".$db->idate($crit['end'])."')"; |
|
37 | 37 | } elseif ($crit['start'] !== '') { |
38 | - $sql .= " AND (".$extrafieldsobjectprefix.$tmpkey." >= '". $db->idate($crit['start'])."')"; |
|
38 | + $sql .= " AND (".$extrafieldsobjectprefix.$tmpkey." >= '".$db->idate($crit['start'])."')"; |
|
39 | 39 | } elseif ($crit['end'] !== '') { |
40 | - $sql .= " AND (".$extrafieldsobjectprefix.$tmpkey." <= '". $db->idate($crit['end'])."')"; |
|
40 | + $sql .= " AND (".$extrafieldsobjectprefix.$tmpkey." <= '".$db->idate($crit['end'])."')"; |
|
41 | 41 | } |
42 | 42 | } |
43 | 43 | } elseif (in_array($typ, array('boolean'))) { |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | $mode_search = 2; // Search on a foreign key int |
58 | 58 | } |
59 | 59 | if (in_array($typ, array('sellist')) && !is_numeric($crit)) { |
60 | - $mode_search = 0;// Search on a foreign key string |
|
60 | + $mode_search = 0; // Search on a foreign key string |
|
61 | 61 | } |
62 | 62 | if (in_array($typ, array('chkbxlst', 'checkbox', 'select'))) { |
63 | 63 | $mode_search = 4; // Search on a multiselect field with sql type = text |
@@ -33,12 +33,12 @@ |
||
33 | 33 | /** |
34 | 34 | * @var string Id to identify managed objects |
35 | 35 | */ |
36 | - public $element = 'undefined'; // Will be defined into constructor |
|
36 | + public $element = 'undefined'; // Will be defined into constructor |
|
37 | 37 | |
38 | 38 | /** |
39 | 39 | * @var string Name of table without prefix where object is stored |
40 | 40 | */ |
41 | - public $table_element = 'undefined'; // Will be defined into constructor |
|
41 | + public $table_element = 'undefined'; // Will be defined into constructor |
|
42 | 42 | |
43 | 43 | /** |
44 | 44 | * @var CtyperesourceLine[] Lines |
@@ -648,7 +648,7 @@ discard block |
||
648 | 648 | if ($line->fk_product) { |
649 | 649 | $spacestoadd = $nbcharactbyline - strlen($line->ref) - strlen($line->qty) - strlen($line->subprice) - 10 - 1; |
650 | 650 | $spaces = str_repeat(' ', $spacestoadd > 0 ? $spacestoadd : 0); |
651 | - $this->printer->text($line->ref . $spaces . $line->qty . str_pad(price($line->subprice), 10, ' ', STR_PAD_LEFT) . ' ' . str_pad(price($line->total_ttc), 10, ' ', STR_PAD_LEFT) . "\n"); |
|
651 | + $this->printer->text($line->ref.$spaces.$line->qty.str_pad(price($line->subprice), 10, ' ', STR_PAD_LEFT).' '.str_pad(price($line->total_ttc), 10, ' ', STR_PAD_LEFT)."\n"); |
|
652 | 652 | $this->printer->text(strip_tags(htmlspecialchars_decode($line->product_label))."\n \n"); |
653 | 653 | } else { |
654 | 654 | $spacestoadd = $nbcharactbyline - strlen($line->description) - strlen($line->qty) - strlen($line->subprice) - 10 - 1; |
@@ -717,7 +717,7 @@ discard block |
||
717 | 717 | $this->printer->text($title.$spaces.str_pad(price($object->total_ttc), 10, ' ', STR_PAD_LEFT)."\n"); |
718 | 718 | break; |
719 | 719 | case 'DOL_PRINT_CURR_DATE': |
720 | - if (strlen($vals[$tplline]['value'])<2) $this->printer->text(date('d/m/Y H:i:s')."\n"); |
|
720 | + if (strlen($vals[$tplline]['value']) < 2) $this->printer->text(date('d/m/Y H:i:s')."\n"); |
|
721 | 721 | else $this->printer->text(date($vals[$tplline]['value'])."\n"); |
722 | 722 | break; |
723 | 723 | case 'DOL_LINE_FEED': |
@@ -803,7 +803,7 @@ discard block |
||
803 | 803 | $this->printer->getPrintConnector() -> write("\x1e"); |
804 | 804 | break; |
805 | 805 | case 'DOL_BEEP_ALTERNATIVE': //if DOL_BEEP not works |
806 | - $this->printer->getPrintConnector() -> write(Printer::ESC . "B" . chr(4) . chr(1)); |
|
806 | + $this->printer->getPrintConnector() -> write(Printer::ESC."B".chr(4).chr(1)); |
|
807 | 807 | break; |
808 | 808 | case 'DOL_PRINT_ORDER_LINES': |
809 | 809 | foreach ($object->lines as $line) { |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | // Clean data |
367 | 367 | // $this->jobposition->abc = sanitizeVal($this->jobposition->abc, 'alphanohtml'); |
368 | 368 | |
369 | - if ($this->jobposition->create(DolibarrApiAccess::$user)<0) { |
|
369 | + if ($this->jobposition->create(DolibarrApiAccess::$user) < 0) { |
|
370 | 370 | throw new RestException(500, "Error creating jobposition", array_merge(array($this->jobposition->error), $this->jobposition->errors)); |
371 | 371 | } |
372 | 372 | return $this->jobposition->id; |
@@ -398,7 +398,7 @@ discard block |
||
398 | 398 | // Clean data |
399 | 399 | // $this->jobposition->abc = sanitizeVal($this->jobposition->abc, 'alphanohtml'); |
400 | 400 | |
401 | - if ($this->candidature->create(DolibarrApiAccess::$user)<0) { |
|
401 | + if ($this->candidature->create(DolibarrApiAccess::$user) < 0) { |
|
402 | 402 | throw new RestException(500, "Error creating candidature", array_merge(array($this->candidature->error), $this->candidature->errors)); |
403 | 403 | } |
404 | 404 | return $this->candidature->id; |