--- /tmp/dsg/dolibarr/htdocs/societe/canvas/company/github_actions_card_company.class.php
+++ /tmp/dsg/dolibarr/htdocs/societe/canvas/company/client_actions_card_company.class.php
@@ -34,42 +34,42 @@
/**
* Constructor
*
- * @param DoliDB $db Handler acces base de donnees
- * @param string $dirmodule Name of directory of module
- * @param string $targetmodule Name of directory of module where canvas is stored
- * @param string $canvas Name of canvas
- * @param string $card Name of tab (sub-canvas)
+ * @param DoliDB $db Handler acces base de donnees
+ * @param string $dirmodule Name of directory of module
+ * @param string $targetmodule Name of directory of module where canvas is stored
+ * @param string $canvas Name of canvas
+ * @param string $card Name of tab (sub-canvas)
*/
- public function __construct($db, $dirmodule, $targetmodule, $canvas, $card)
+ public function __construct($db, $dirmodule, $targetmodule, $canvas, $card)
{
- $this->db = $db;
- $this->dirmodule = $dirmodule;
- $this->targetmodule = $targetmodule;
- $this->canvas = $canvas;
- $this->card = $card;
+ $this->db = $db;
+ $this->dirmodule = $dirmodule;
+ $this->targetmodule = $targetmodule;
+ $this->canvas = $canvas;
+ $this->card = $card;
}
- /**
- * Return the title of card
- *
- * @param string $action Action code
- * @return string Title
- */
- private function getTitle($action)
- {
- global $langs;
-
- $out = '';
-
- if ($action == 'view') $out .= $langs->trans("ThirdParty");
- if ($action == 'edit') $out .= $langs->trans("EditCompany");
- if ($action == 'create') $out .= $langs->trans("NewCompany");
-
- return $out;
- }
-
-
- // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
+ /**
+ * Return the title of card
+ *
+ * @param string $action Action code
+ * @return string Title
+ */
+ private function getTitle($action)
+ {
+ global $langs;
+
+ $out = '';
+
+ if ($action == 'view') $out .= $langs->trans("ThirdParty");
+ if ($action == 'edit') $out .= $langs->trans("EditCompany");
+ if ($action == 'create') $out .= $langs->trans("NewCompany");
+
+ return $out;
+ }
+
+
+ // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Assign custom values for canvas (for example into this->tpl to be used by templates)
*
@@ -78,9 +78,9 @@
* @param string $ref Ref of object
* @return void
*/
- public function assign_values(&$action, $id = 0, $ref = '')
+ public function assign_values(&$action, $id = 0, $ref = '')
{
- // phpcs:enable
+ // phpcs:enable
global $conf, $langs, $user, $mysoc;
global $form, $formadmin, $formcompany;
@@ -88,9 +88,9 @@
parent::assign_values($action);
- $this->tpl['title'] = load_fiche_titre($this->getTitle($action));
-
- $this->tpl['profid1'] = $this->object->idprof1;
+ $this->tpl['title'] = load_fiche_titre($this->getTitle($action));
+
+ $this->tpl['profid1'] = $this->object->idprof1;
$this->tpl['profid2'] = $this->object->idprof2;
$this->tpl['profid3'] = $this->object->idprof3;
$this->tpl['profid4'] = $this->object->idprof4;
@@ -98,12 +98,12 @@
if ($conf->use_javascript_ajax && empty($conf->global->MAIN_DISABLEVATCHECK))
{
$js = "\n";
- $js .= '';
- $js .= "\n";
+ $js .= '';
+ $js .= "\n";
$this->tpl['js_checkVatPopup'] = $js;
}
@@ -134,13 +134,19 @@
{
$s .= ''.$langs->trans("VATIntraCheck").'';
$this->tpl['tva_intra'] = $form->textwithpicto($s, $langs->trans("VATIntraCheckDesc", $langs->transnoentitiesnoconv("VATIntraCheck")), 1);
- } else {
+ }
+ else
+ {
$this->tpl['tva_intra'] = $s.'object->country_id).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"), 'help').'';
}
- } else {
+ }
+ else
+ {
$this->tpl['tva_intra'] = $s;
}
- } else {
+ }
+ else
+ {
// Confirm delete third party
if ($action == 'delete')
{
@@ -167,13 +173,19 @@
{
$s .= ''.$langs->trans("VATIntraCheck").'';
$this->tpl['tva_intra'] = $form->textwithpicto($s, $langs->trans("VATIntraCheckDesc", $langs->transnoentitiesnoconv("VATIntraCheck")), 1);
- } else {
+ }
+ else
+ {
$this->tpl['tva_intra'] = $s.'object->country_id).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"), 'help').'';
}
- } else {
+ }
+ else
+ {
$this->tpl['tva_intra'] = $s;
}
- } else {
+ }
+ else
+ {
$this->tpl['tva_intra'] = ' ';
}
@@ -184,11 +196,13 @@
$socm->fetch($this->object->parent);
$this->tpl['parent_company'] = $socm->getNomUrl(1).' '.($socm->code_client ? "(".$socm->code_client.")" : "");
$this->tpl['parent_company'] .= ($socm->town ? ' - '.$socm->town : '');
- } else {
+ }
+ else
+ {
$this->tpl['parent_company'] = $langs->trans("NoParentCompany");
}
}
- }
+ }
/**
* Check permissions of a user to show a page and an object. Check read permission
@@ -203,8 +217,8 @@
* @param string $dbt_select Field name for select if not rowid. (optional)
* @return int 1
*/
- public function restrictedArea($user, $features = 'societe', $objectid = 0, $dbtablename = '', $feature2 = '', $dbt_keyfield = 'fk_soc', $dbt_select = 'rowid')
- {
- return restrictedArea($user, $features, $objectid, $dbtablename, $feature2, $dbt_keyfield, $dbt_select);
- }
+ public function restrictedArea($user, $features = 'societe', $objectid = 0, $dbtablename = '', $feature2 = '', $dbt_keyfield = 'fk_soc', $dbt_select = 'rowid')
+ {
+ return restrictedArea($user, $features, $objectid, $dbtablename, $feature2, $dbt_keyfield, $dbt_select);
+ }
}