Skip to content

Commit

Permalink
Fix phpcs for intracom
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeweerd committed Aug 17, 2024
1 parent 0e709fe commit 4384786
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 17 deletions.
9 changes: 5 additions & 4 deletions htdocs/intracommreport/admin/intracommreport.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
/* Copyright (C) 2015 ATM Consulting <[email protected]>
* Copyright (C) 2019-2020 Open-DSI <[email protected]>
* Copyright (C) 2024 MDW <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -129,31 +130,31 @@

print '<tr class="oddeven">';
print '<td>'.$langs->trans("INTRACOMMREPORT_TYPE_ACTEUR").'</td>';
$arraychoices = array(''=>$langs->trans("None"), 'PSI'=>'Déclarant pour son compte', 'TDP'=>'Tiers déclarant');
$arraychoices = array('' => $langs->trans("None"), 'PSI' => 'Déclarant pour son compte', 'TDP' => 'Tiers déclarant');
print '<td>';
print $form->selectarray('INTRACOMMREPORT_TYPE_ACTEUR', $arraychoices, $conf->global->INTRACOMMREPORT_TYPE_ACTEUR, 0);
print '</td>';
print "</tr>\n";

print '<tr class="oddeven">';
print '<td>'.$langs->trans("INTRACOMMREPORT_ROLE_ACTEUR").'</td>';
$arraychoices = array(''=>$langs->trans("None"), 'sender'=>'Emetteur', 'PSI'=>'Déclarant');
$arraychoices = array('' => $langs->trans("None"), 'sender' => 'Emetteur', 'PSI' => 'Déclarant');
print '<td>';
print $form->selectarray('INTRACOMMREPORT_ROLE_ACTEUR', $arraychoices, $conf->global->INTRACOMMREPORT_ROLE_ACTEUR, 0);
print '</td>';
print "</tr>\n";

print '<tr class="oddeven">';
print '<td>'.$langs->trans("INTRACOMMREPORT_NIV_OBLIGATION_INTRODUCTION").'</td>';
$arraychoices = array(1=>'Seuil de 460 000 €', 2=>'En dessous de 460 000 €');
$arraychoices = array(1 => 'Seuil de 460 000 €', 2 => 'En dessous de 460 000 €');
print '<td>';
print $form->selectarray('INTRACOMMREPORT_NIV_OBLIGATION_INTRODUCTION', $arraychoices, $conf->global->INTRACOMMREPORT_NIV_OBLIGATION_INTRODUCTION, 0);
print '</td>';
print "</tr>\n";

print '<tr class="oddeven">';
print '<td>'.$langs->trans("INTRACOMMREPORT_NIV_OBLIGATION_EXPEDITION").'</td>';
$arraychoices = array(3=>'Seuil de 460 000 €', 4=>'En dessous de 460 000 €');
$arraychoices = array(3 => 'Seuil de 460 000 €', 4 => 'En dessous de 460 000 €');
print '<td>';
print $form->selectarray('INTRACOMMREPORT_NIV_OBLIGATION_EXPEDITION', $arraychoices, $conf->global->INTRACOMMREPORT_NIV_OBLIGATION_EXPEDITION, 0);
print '</td>';
Expand Down
20 changes: 10 additions & 10 deletions htdocs/intracommreport/class/intracommreport.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,16 @@ class IntracommReport extends CommonObject
/**
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
public $fields=array(
"rowid" => array("type"=>"integer", "label"=>"TechnicalID", "enabled"=>"1", 'position'=>10, 'notnull'=>1, "visible"=>"0",),
"ref" => array("type"=>"varchar(30)", "label"=>"Ref", "enabled"=>"1", 'position'=>15, 'notnull'=>1, "visible"=>"1", "csslist"=>"tdoverflowmax150", "showoncombobox"=>"1",),
"type_declaration" => array("type"=>"varchar(32)", "label"=>"TypeOfDeclaration", "enabled"=>"1", 'position'=>25, 'notnull'=>0, "visible"=>"1", 'arrayofkeyval' => array("deb" => "DEB", "des" => "DES")),
"periods" => array("type"=>"varchar(32)", "label"=>"Periods", "enabled"=>"1", 'position'=>30, 'notnull'=>0, "visible"=>"-1",),
"mode" => array("type"=>"varchar(32)", "label"=>"Mode", "enabled"=>"1", 'position'=>35, 'notnull'=>0, "visible"=>"-1",),
"content_xml" => array("type"=>"text", "label"=>"Contentxml", "enabled"=>"1", 'position'=>40, 'notnull'=>0, "visible"=>"-1",),
"type_export" => array("type"=>"varchar(10)", "label"=>"TypeOfExport", "enabled"=>"1", 'position'=>45, 'notnull'=>0, "visible"=>"-1", 'arrayofkeyval' => array("in" => "Input", "out" => "Output")),
"datec" => array("type"=>"datetime", "label"=>"DateCreation", "enabled"=>"1", 'position'=>50, 'notnull'=>0, "visible"=>"-1",),
"tms" => array("type"=>"timestamp", "label"=>"DateModification", "enabled"=>"1", 'position'=>55, 'notnull'=>1, "visible"=>"-1",),
public $fields = array(
"rowid" => array("type" => "integer", "label" => "TechnicalID", "enabled" => "1", 'position' => 10, 'notnull' => 1, "visible" => "0",),
"ref" => array("type" => "varchar(30)", "label" => "Ref", "enabled" => "1", 'position' => 15, 'notnull' => 1, "visible" => "1", "csslist" => "tdoverflowmax150", "showoncombobox" => "1",),
"type_declaration" => array("type" => "varchar(32)", "label" => "TypeOfDeclaration", "enabled" => "1", 'position' => 25, 'notnull' => 0, "visible" => "1", 'arrayofkeyval' => array("deb" => "DEB", "des" => "DES")),
"periods" => array("type" => "varchar(32)", "label" => "Periods", "enabled" => "1", 'position' => 30, 'notnull' => 0, "visible" => "-1",),
"mode" => array("type" => "varchar(32)", "label" => "Mode", "enabled" => "1", 'position' => 35, 'notnull' => 0, "visible" => "-1",),
"content_xml" => array("type" => "text", "label" => "Contentxml", "enabled" => "1", 'position' => 40, 'notnull' => 0, "visible" => "-1",),
"type_export" => array("type" => "varchar(10)", "label" => "TypeOfExport", "enabled" => "1", 'position' => 45, 'notnull' => 0, "visible" => "-1", 'arrayofkeyval' => array("in" => "Input", "out" => "Output")),
"datec" => array("type" => "datetime", "label" => "DateCreation", "enabled" => "1", 'position' => 50, 'notnull' => 0, "visible" => "-1",),
"tms" => array("type" => "timestamp", "label" => "DateModification", "enabled" => "1", 'position' => 55, 'notnull' => 1, "visible" => "-1",),
);
public $rowid;
public $ref;
Expand Down
6 changes: 3 additions & 3 deletions htdocs/intracommreport/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -516,8 +516,8 @@


$newcardbutton = '';
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss'=>'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss'=>'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition'));
$newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"].'?mode=kanban'.preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition'));
$newcardbutton .= dolGetButtonTitleSeparator();
$newcardbutton .= dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/intracommreport/card.php', 1).'?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd);

Expand Down Expand Up @@ -619,7 +619,7 @@
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';

// Fields from hook
$parameters = array('arrayfields'=>$arrayfields);
$parameters = array('arrayfields' => $arrayfields);
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
/*if (!empty($arrayfields['anotherfield']['checked'])) {
Expand Down

0 comments on commit 4384786

Please sign in to comment.