--- /tmp/dsg/dolibarr/htdocs/societe/canvas/company/github_19.0.3_actions_card_company.class.php
+++ /tmp/dsg/dolibarr/htdocs/societe/canvas/company/client_actions_card_company.class.php
@@ -37,5 +37,5 @@
- * @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)
@@ -43 +43 @@
- public function __construct($db, $dirmodule, $targetmodule, $canvas, $card)
+ public function __construct($db, $dirmodule, $targetmodule, $canvas, $card)
@@ -45,5 +45,5 @@
- $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;
@@ -52,27 +52,21 @@
- /**
- * 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
@@ -87 +81 @@
- public function assign_values(&$action, $id = 0, $ref = '')
+ public function assign_values(&$action, $id = 0, $ref = '')
@@ -89 +83 @@
- // phpcs:enable
+ // phpcs:enable
@@ -91 +85 @@
- global $form, $formcompany;
+ global $form, $formadmin, $formcompany;
@@ -97,3 +91,3 @@
- $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;
@@ -104 +98,2 @@
- if ($conf->use_javascript_ajax && !getDolGlobalString('MAIN_DISABLEVATCHECK')) {
+ if ($conf->use_javascript_ajax && empty($conf->global->MAIN_DISABLEVATCHECK))
+ {
@@ -106,6 +101,6 @@
- $js .= '';
- $js .= "\n";
+ $js .= '';
+ $js .= "\n";
@@ -115,2 +110,4 @@
- if ($action == 'create' || $action == 'edit') {
- for ($i = 1; $i <= 4; $i++) {
+ if ($action == 'create' || $action == 'edit')
+ {
+ for ($i = 1; $i <= 4; $i++)
+ {
@@ -132 +129,2 @@
- if (!getDolGlobalString('MAIN_DISABLEVATCHECK')) {
+ if (empty($conf->global->MAIN_DISABLEVATCHECK))
+ {
@@ -135,2 +133,3 @@
- if ($conf->use_javascript_ajax) {
- $s .= ''.$langs->trans("VATIntraCheck").'';
+ if ($conf->use_javascript_ajax)
+ {
+ $s .= ''.$langs->trans("VATIntraCheck").'';
@@ -138 +137,3 @@
- } else {
+ }
+ else
+ {
@@ -141 +142,3 @@
- } else {
+ }
+ else
+ {
@@ -144 +147,3 @@
- } else {
+ }
+ else
+ {
@@ -146 +151,2 @@
- if ($action == 'delete') {
+ if ($action == 'delete')
+ {
@@ -150 +156,2 @@
- for ($i = 1; $i <= 4; $i++) {
+ for ($i = 1; $i <= 4; $i++)
+ {
@@ -157 +164,2 @@
- if ($this->object->tva_intra) {
+ if ($this->object->tva_intra)
+ {
@@ -160 +168,2 @@
- if (!getDolGlobalString('MAIN_DISABLEVATCHECK')) {
+ if (empty($conf->global->MAIN_DISABLEVATCHECK))
+ {
@@ -163,2 +172,3 @@
- if ($conf->use_javascript_ajax) {
- $s .= ''.$langs->trans("VATIntraCheck").'';
+ if ($conf->use_javascript_ajax)
+ {
+ $s .= ''.$langs->trans("VATIntraCheck").'';
@@ -166 +176,3 @@
- } else {
+ }
+ else
+ {
@@ -169 +181,3 @@
- } else {
+ }
+ else
+ {
@@ -172 +186,3 @@
- } else {
+ }
+ else
+ {
@@ -177 +193,2 @@
- if ($this->object->parent) {
+ if ($this->object->parent)
+ {
@@ -182 +199,3 @@
- } else {
+ }
+ else
+ {
@@ -186 +205 @@
- }
+ }
@@ -201,4 +220,4 @@
- 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);
+ }