@@ -36,20 +36,20 @@ discard block |
||
36 | 36 | */ |
37 | 37 | // Copyright (C) 2018 Alxarafe/Alixar <[email protected]> |
38 | 38 | defined('BASE_PATH') or die('Single entry point through the index.php of the main folder'); |
39 | -require DOL_BASE_PATH . '/main.inc.php'; |
|
40 | - |
|
41 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/company.lib.php'; |
|
42 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/images.lib.php'; |
|
43 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; |
|
44 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/functions.lib.php'; |
|
45 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formadmin.class.php'; |
|
46 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php'; |
|
47 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php'; |
|
48 | -require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php'; |
|
49 | -require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php'; |
|
50 | -require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; |
|
39 | +require DOL_BASE_PATH.'/main.inc.php'; |
|
40 | + |
|
41 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; |
|
42 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; |
|
43 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; |
|
44 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; |
|
45 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; |
|
46 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; |
|
47 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; |
|
48 | +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; |
|
49 | +require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; |
|
50 | +require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; |
|
51 | 51 | if (!empty($conf->adherent->enabled)) { |
52 | - require_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php'; |
|
52 | + require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | $langs->loadLangs(array("companies", "commercial", "bills", "banks", "users")); |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | $canvas = $object->canvas ? $object->canvas : GETPOST("canvas"); |
104 | 104 | $objcanvas = null; |
105 | 105 | if (!empty($canvas)) { |
106 | - require_once DOL_DOCUMENT_ROOT . '/core/class/canvas.class.php'; |
|
106 | + require_once DOL_DOCUMENT_ROOT.'/core/class/canvas.class.php'; |
|
107 | 107 | $objcanvas = new Canvas($db, $action); |
108 | 108 | $objcanvas->getCanvas('thirdparty', 'card', $canvas); |
109 | 109 | } |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | */ |
118 | 118 | |
119 | 119 | $parameters = array('id' => $socid, 'objcanvas' => $objcanvas); |
120 | -$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks |
|
120 | +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks |
|
121 | 121 | if ($reshook < 0) |
122 | 122 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
123 | 123 | |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | if ($cancel) { |
126 | 126 | $action = ''; |
127 | 127 | if (!empty($backtopage)) { |
128 | - header("Location: " . $backtopage); |
|
128 | + header("Location: ".$backtopage); |
|
129 | 129 | exit; |
130 | 130 | } |
131 | 131 | } |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | |
239 | 239 | //First, all core objects must update their tables |
240 | 240 | foreach ($objects as $object_name => $object_file) { |
241 | - require_once DOL_DOCUMENT_ROOT . $object_file; |
|
241 | + require_once DOL_DOCUMENT_ROOT.$object_file; |
|
242 | 242 | |
243 | 243 | if (!$error && !$object_name::replaceThirdparty($db, $soc_origin->id, $object->id)) { |
244 | 244 | $error++; |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | |
341 | 341 | // Add new or update third party |
342 | 342 | if ((!GETPOST('getcustomercode') && !GETPOST('getsuppliercode')) && ($action == 'add' || $action == 'update') && $user->rights->societe->creer) { |
343 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php'; |
|
343 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; |
|
344 | 344 | |
345 | 345 | if (!GETPOST('name')) { |
346 | 346 | setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ThirdPartyName")), null, 'errors'); |
@@ -462,7 +462,7 @@ discard block |
||
462 | 462 | if (!empty($object->webservices_url)) { |
463 | 463 | //Check if has transport, without any the soap client will give error |
464 | 464 | if (strpos($object->webservices_url, "http") === false) { |
465 | - $object->webservices_url = "http://" . $object->webservices_url; |
|
465 | + $object->webservices_url = "http://".$object->webservices_url; |
|
466 | 466 | } |
467 | 467 | if (!isValidUrl($object->webservices_url)) { |
468 | 468 | $langs->load("errors"); |
@@ -529,14 +529,14 @@ discard block |
||
529 | 529 | } |
530 | 530 | |
531 | 531 | // Logo/Photo save |
532 | - $dir = $conf->societe->multidir_output[$conf->entity] . "/" . $object->id . "/logos/"; |
|
532 | + $dir = $conf->societe->multidir_output[$conf->entity]."/".$object->id."/logos/"; |
|
533 | 533 | $file_OK = is_uploaded_file($_FILES['photo']['tmp_name']); |
534 | 534 | if ($file_OK) { |
535 | 535 | if (image_format_supported($_FILES['photo']['name'])) { |
536 | 536 | dol_mkdir($dir); |
537 | 537 | |
538 | 538 | if (@is_dir($dir)) { |
539 | - $newfile = $dir . '/' . dol_sanitizeFileName($_FILES['photo']['name']); |
|
539 | + $newfile = $dir.'/'.dol_sanitizeFileName($_FILES['photo']['name']); |
|
540 | 540 | $result = dol_move_uploaded_file($_FILES['photo']['tmp_name'], $newfile, 1); |
541 | 541 | |
542 | 542 | if (!$result > 0) { |
@@ -575,18 +575,18 @@ discard block |
||
575 | 575 | |
576 | 576 | if (!empty($backtopage)) { |
577 | 577 | if (preg_match('/\?/', $backtopage)) |
578 | - $backtopage .= '&socid=' . $object->id; |
|
579 | - header("Location: " . $backtopage); |
|
578 | + $backtopage .= '&socid='.$object->id; |
|
579 | + header("Location: ".$backtopage); |
|
580 | 580 | exit; |
581 | 581 | } |
582 | 582 | else { |
583 | - $url = $_SERVER["PHP_SELF"] . "?socid=" . $object->id; |
|
583 | + $url = $_SERVER["PHP_SELF"]."?socid=".$object->id; |
|
584 | 584 | if (($object->client == 1 || $object->client == 3) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) |
585 | - $url = DOL_URL_ROOT . "/comm/card.php?socid=" . $object->id; |
|
585 | + $url = DOL_URL_ROOT."/comm/card.php?socid=".$object->id; |
|
586 | 586 | else if ($object->fournisseur == 1) |
587 | - $url = DOL_URL_ROOT . "/fourn/card.php?socid=" . $object->id; |
|
587 | + $url = DOL_URL_ROOT."/fourn/card.php?socid=".$object->id; |
|
588 | 588 | |
589 | - header("Location: " . $url); |
|
589 | + header("Location: ".$url); |
|
590 | 590 | exit; |
591 | 591 | } |
592 | 592 | } |
@@ -601,10 +601,10 @@ discard block |
||
601 | 601 | |
602 | 602 | if (GETPOST('cancel', 'alpha')) { |
603 | 603 | if (!empty($backtopage)) { |
604 | - header("Location: " . $backtopage); |
|
604 | + header("Location: ".$backtopage); |
|
605 | 605 | exit; |
606 | 606 | } else { |
607 | - header("Location: " . $_SERVER["PHP_SELF"] . "?socid=" . $socid); |
|
607 | + header("Location: ".$_SERVER["PHP_SELF"]."?socid=".$socid); |
|
608 | 608 | exit; |
609 | 609 | } |
610 | 610 | } |
@@ -650,11 +650,11 @@ discard block |
||
650 | 650 | } |
651 | 651 | |
652 | 652 | // Logo/Photo save |
653 | - $dir = $conf->societe->multidir_output[$object->entity] . "/" . $object->id . "/logos"; |
|
653 | + $dir = $conf->societe->multidir_output[$object->entity]."/".$object->id."/logos"; |
|
654 | 654 | $file_OK = is_uploaded_file($_FILES['photo']['tmp_name']); |
655 | 655 | if (GETPOST('deletephoto') && $object->logo) { |
656 | - $fileimg = $dir . '/' . $object->logo; |
|
657 | - $dirthumbs = $dir . '/thumbs'; |
|
656 | + $fileimg = $dir.'/'.$object->logo; |
|
657 | + $dirthumbs = $dir.'/thumbs'; |
|
658 | 658 | dol_delete_file($fileimg); |
659 | 659 | dol_delete_dir_recursive($dirthumbs); |
660 | 660 | } |
@@ -663,7 +663,7 @@ discard block |
||
663 | 663 | dol_mkdir($dir); |
664 | 664 | |
665 | 665 | if (@is_dir($dir)) { |
666 | - $newfile = $dir . '/' . dol_sanitizeFileName($_FILES['photo']['name']); |
|
666 | + $newfile = $dir.'/'.dol_sanitizeFileName($_FILES['photo']['name']); |
|
667 | 667 | $result = dol_move_uploaded_file($_FILES['photo']['tmp_name'], $newfile, 1); |
668 | 668 | |
669 | 669 | if (!$result > 0) { |
@@ -674,7 +674,7 @@ discard block |
||
674 | 674 | |
675 | 675 | // Index file in database |
676 | 676 | if (!empty($conf->global->THIRDPARTY_LOGO_ALLOW_EXTERNAL_DOWNLOAD)) { |
677 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; |
|
677 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; |
|
678 | 678 | // the dir dirname($newfile) is directory of logo, so we should have only one file at once into index, so we delete indexes for the dir |
679 | 679 | deleteFilesIntoDatabaseIndex(dirname($newfile), '', '', 'uploaded', 1); |
680 | 680 | // now we index the uploaded logo file |
@@ -700,8 +700,8 @@ discard block |
||
700 | 700 | // Update linked member |
701 | 701 | if (!$error && $object->fk_soc > 0) { |
702 | 702 | |
703 | - $sql = "UPDATE " . MAIN_DB_PREFIX . "adherent"; |
|
704 | - $sql .= " SET fk_soc = NULL WHERE fk_soc = " . $id; |
|
703 | + $sql = "UPDATE ".MAIN_DB_PREFIX."adherent"; |
|
704 | + $sql .= " SET fk_soc = NULL WHERE fk_soc = ".$id; |
|
705 | 705 | if (!$object->db->query($sql)) { |
706 | 706 | $error++; |
707 | 707 | $object->error .= $object->db->lasterror(); |
@@ -711,10 +711,10 @@ discard block |
||
711 | 711 | |
712 | 712 | if (!$error && !count($errors)) { |
713 | 713 | if (!empty($backtopage)) { |
714 | - header("Location: " . $backtopage); |
|
714 | + header("Location: ".$backtopage); |
|
715 | 715 | exit; |
716 | 716 | } else { |
717 | - header("Location: " . $_SERVER["PHP_SELF"] . "?socid=" . $socid); |
|
717 | + header("Location: ".$_SERVER["PHP_SELF"]."?socid=".$socid); |
|
718 | 718 | exit; |
719 | 719 | } |
720 | 720 | } else { |
@@ -733,7 +733,7 @@ discard block |
||
733 | 733 | $result = $object->delete($socid, $user); |
734 | 734 | |
735 | 735 | if ($result > 0) { |
736 | - header("Location: " . DOL_URL_ROOT . "/societe/list.php?restore_lastsearch_values=1&delsoc=" . urlencode($object->name)); |
|
736 | + header("Location: ".DOL_URL_ROOT."/societe/list.php?restore_lastsearch_values=1&delsoc=".urlencode($object->name)); |
|
737 | 737 | exit; |
738 | 738 | } else { |
739 | 739 | $langs->load("errors"); |
@@ -762,14 +762,14 @@ discard block |
||
762 | 762 | $trigger_name = 'COMPANY_SENTBYMAIL'; |
763 | 763 | $paramname = 'socid'; |
764 | 764 | $mode = 'emailfromthirdparty'; |
765 | - $trackid = 'thi' . $object->id; |
|
766 | - include DOL_DOCUMENT_ROOT . '/core/actions_sendmails.inc.php'; |
|
765 | + $trackid = 'thi'.$object->id; |
|
766 | + include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; |
|
767 | 767 | |
768 | 768 | // Actions to build doc |
769 | 769 | $id = $socid; |
770 | 770 | $upload_dir = $conf->societe->dir_output; |
771 | 771 | $permissioncreate = $user->rights->societe->creer; |
772 | - include DOL_DOCUMENT_ROOT . '/core/actions_builddoc.inc.php'; |
|
772 | + include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; |
|
773 | 773 | } |
774 | 774 | |
775 | 775 | |
@@ -790,18 +790,18 @@ discard block |
||
790 | 790 | |
791 | 791 | $title = $langs->trans("ThirdParty"); |
792 | 792 | if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/', $conf->global->MAIN_HTML_TITLE) && $object->name) |
793 | - $title = $object->name . " - " . $langs->trans('Card'); |
|
793 | + $title = $object->name." - ".$langs->trans('Card'); |
|
794 | 794 | $help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; |
795 | 795 | llxHeader('', $title, $help_url); |
796 | 796 | |
797 | -$countrynotdefined = $langs->trans("ErrorSetACountryFirst") . ' (' . $langs->trans("SeeAbove") . ')'; |
|
797 | +$countrynotdefined = $langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')'; |
|
798 | 798 | |
799 | 799 | if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { |
800 | 800 | // ----------------------------------------- |
801 | 801 | // When used with CANVAS |
802 | 802 | // ----------------------------------------- |
803 | 803 | $objcanvas->assign_values($action, $object->id, $object->ref); // Set value for templates |
804 | - $objcanvas->display_canvas($action); // Show template |
|
804 | + $objcanvas->display_canvas($action); // Show template |
|
805 | 805 | } else { |
806 | 806 | // ----------------------------------------- |
807 | 807 | // When used in standard mode |
@@ -823,7 +823,7 @@ discard block |
||
823 | 823 | } |
824 | 824 | $dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']); |
825 | 825 | foreach ($dirsociete as $dirroot) { |
826 | - $res = dol_include_once($dirroot . $module . '.php'); |
|
826 | + $res = dol_include_once($dirroot.$module.'.php'); |
|
827 | 827 | if ($res) |
828 | 828 | break; |
829 | 829 | } |
@@ -835,7 +835,7 @@ discard block |
||
835 | 835 | } |
836 | 836 | $dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']); |
837 | 837 | foreach ($dirsociete as $dirroot) { |
838 | - $res = dol_include_once($dirroot . $module . '.php'); |
|
838 | + $res = dol_include_once($dirroot.$module.'.php'); |
|
839 | 839 | if ($res) |
840 | 840 | break; |
841 | 841 | } |
@@ -913,14 +913,14 @@ discard block |
||
913 | 913 | $object->logo = (isset($_FILES['photo']) ? dol_sanitizeFileName($_FILES['photo']['name']) : ''); |
914 | 914 | |
915 | 915 | // Gestion du logo de la société |
916 | - $dir = $conf->societe->multidir_output[$conf->entity] . "/" . $object->id . "/logos"; |
|
916 | + $dir = $conf->societe->multidir_output[$conf->entity]."/".$object->id."/logos"; |
|
917 | 917 | $file_OK = (isset($_FILES['photo']) ? is_uploaded_file($_FILES['photo']['tmp_name']) : false); |
918 | 918 | if ($file_OK) { |
919 | 919 | if (image_format_supported($_FILES['photo']['name'])) { |
920 | 920 | dol_mkdir($dir); |
921 | 921 | |
922 | 922 | if (@is_dir($dir)) { |
923 | - $newfile = $dir . '/' . dol_sanitizeFileName($_FILES['photo']['name']); |
|
923 | + $newfile = $dir.'/'.dol_sanitizeFileName($_FILES['photo']['name']); |
|
924 | 924 | $result = dol_move_uploaded_file($_FILES['photo']['tmp_name'], $newfile, 1); |
925 | 925 | |
926 | 926 | if (!$result > 0) { |
@@ -947,11 +947,11 @@ discard block |
||
947 | 947 | print load_fiche_titre($langs->trans("NewThirdParty"), $linkback, 'title_companies.png'); |
948 | 948 | |
949 | 949 | if (!empty($conf->use_javascript_ajax) && !empty($conf->global->THIRDPARTY_SUGGEST_ALSO_ADDRESS_CREATION)) { |
950 | - print "\n" . '<script type="text/javascript">'; |
|
950 | + print "\n".'<script type="text/javascript">'; |
|
951 | 951 | print '$(document).ready(function () { |
952 | 952 | id_te_private=8; |
953 | 953 | id_ef15=1; |
954 | - is_private=' . $private . '; |
|
954 | + is_private=' . $private.'; |
|
955 | 955 | if (is_private) { |
956 | 956 | $(".individualline").show(); |
957 | 957 | } else { |
@@ -978,7 +978,7 @@ discard block |
||
978 | 978 | }); |
979 | 979 | function init_customer_categ() { |
980 | 980 | console.log("is customer or prospect = "+jQuery("#customerprospect").val()); |
981 | - if (jQuery("#customerprospect").val() == 0 && (jQuery("#fournisseur").val() == 0 || ' . (empty($conf->global->THIRDPARTY_CAN_HAVE_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT_SUPPLIER) ? '1' : '0') . ')) |
|
981 | + if (jQuery("#customerprospect").val() == 0 && (jQuery("#fournisseur").val() == 0 || ' . (empty($conf->global->THIRDPARTY_CAN_HAVE_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT_SUPPLIER) ? '1' : '0').')) |
|
982 | 982 | { |
983 | 983 | jQuery(".visibleifcustomer").hide(); |
984 | 984 | } |
@@ -1009,20 +1009,20 @@ discard block |
||
1009 | 1009 | document.formsoc.submit(); |
1010 | 1010 | }); |
1011 | 1011 | });'; |
1012 | - print '</script>' . "\n"; |
|
1012 | + print '</script>'."\n"; |
|
1013 | 1013 | |
1014 | 1014 | print '<div id="selectthirdpartytype">'; |
1015 | 1015 | print '<div class="hideonsmartphone float">'; |
1016 | - print $langs->trans("ThirdPartyType") . ': '; |
|
1016 | + print $langs->trans("ThirdPartyType").': '; |
|
1017 | 1017 | print '</div>'; |
1018 | 1018 | print '<label for="radiocompany" class="radiocompany">'; |
1019 | - print '<input type="radio" id="radiocompany" class="flat" name="private" value="0"' . ($private ? '' : ' checked') . '>'; |
|
1019 | + print '<input type="radio" id="radiocompany" class="flat" name="private" value="0"'.($private ? '' : ' checked').'>'; |
|
1020 | 1020 | print ' '; |
1021 | 1021 | print $langs->trans("CreateThirdPartyOnly"); |
1022 | 1022 | print '</label>'; |
1023 | 1023 | print ' '; |
1024 | 1024 | print '<label for="radioprivate" class="radioprivate">'; |
1025 | - $text = '<input type="radio" id="radioprivate" class="flat" name="private" value="1"' . ($private ? ' checked' : '') . '>'; |
|
1025 | + $text = '<input type="radio" id="radioprivate" class="flat" name="private" value="1"'.($private ? ' checked' : '').'>'; |
|
1026 | 1026 | $text .= ' '; |
1027 | 1027 | $text .= $langs->trans("CreateThirdPartyAndContact"); |
1028 | 1028 | $htmltext = $langs->trans("ToCreateContactWithSameName"); |
@@ -1035,15 +1035,15 @@ discard block |
||
1035 | 1035 | dol_htmloutput_mesg(is_numeric($error) ? '' : $error, $errors, 'error'); |
1036 | 1036 | |
1037 | 1037 | // print '<form enctype="multipart/form-data" action="' . $_SERVER["PHP_SELF"] . '" method="post" name="formsoc" autocomplete="off">'; // Chrome ignor autocomplete |
1038 | - print '<form enctype="multipart/form-data" action="' . '?controller=' . 'societe' . '&method=' . 'card' . '" method="post" name="formsoc" autocomplete="off">'; // Chrome ignor autocomplete |
|
1038 | + print '<form enctype="multipart/form-data" action="'.'?controller='.'societe'.'&method='.'card'.'" method="post" name="formsoc" autocomplete="off">'; // Chrome ignor autocomplete |
|
1039 | 1039 | |
1040 | 1040 | print '<input type="hidden" name="action" value="add">'; |
1041 | - print '<input type="hidden" name="backtopage" value="' . $backtopage . '">'; |
|
1042 | - print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; |
|
1043 | - print '<input type="hidden" name="private" value=' . $object->particulier . '>'; |
|
1044 | - print '<input type="hidden" name="type" value=' . GETPOST("type", 'alpha') . '>'; |
|
1045 | - print '<input type="hidden" name="LastName" value="' . $langs->trans('ThirdPartyName') . ' / ' . $langs->trans('LastName') . '">'; |
|
1046 | - print '<input type="hidden" name="ThirdPartyName" value="' . $langs->trans('ThirdPartyName') . '">'; |
|
1041 | + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; |
|
1042 | + print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; |
|
1043 | + print '<input type="hidden" name="private" value='.$object->particulier.'>'; |
|
1044 | + print '<input type="hidden" name="type" value='.GETPOST("type", 'alpha').'>'; |
|
1045 | + print '<input type="hidden" name="LastName" value="'.$langs->trans('ThirdPartyName').' / '.$langs->trans('LastName').'">'; |
|
1046 | + print '<input type="hidden" name="ThirdPartyName" value="'.$langs->trans('ThirdPartyName').'">'; |
|
1047 | 1047 | if ($modCodeClient->code_auto || $modCodeFournisseur->code_auto) |
1048 | 1048 | print '<input type="hidden" name="code_auto" value="1">'; |
1049 | 1049 | |
@@ -1054,54 +1054,54 @@ discard block |
||
1054 | 1054 | // Name, firstname |
1055 | 1055 | print '<tr><td class="titlefieldcreate">'; |
1056 | 1056 | if ($object->particulier || $private) { |
1057 | - print '<span id="TypeName" class="fieldrequired">' . $langs->trans('ThirdPartyName') . ' / ' . $langs->trans('LastName', 'name') . '</span>'; |
|
1057 | + print '<span id="TypeName" class="fieldrequired">'.$langs->trans('ThirdPartyName').' / '.$langs->trans('LastName', 'name').'</span>'; |
|
1058 | 1058 | } else { |
1059 | - print '<span id="TypeName" class="fieldrequired">' . $form->editfieldkey('ThirdPartyName', 'name', '', $object, 0) . '</span>'; |
|
1059 | + print '<span id="TypeName" class="fieldrequired">'.$form->editfieldkey('ThirdPartyName', 'name', '', $object, 0).'</span>'; |
|
1060 | 1060 | } |
1061 | - print '</td><td' . (empty($conf->global->SOCIETE_USEPREFIX) ? ' colspan="3"' : '') . '>'; |
|
1062 | - print '<input type="text" class="minwidth300" maxlength="128" name="name" id="name" value="' . $object->name . '" autofocus="autofocus"></td>'; |
|
1061 | + print '</td><td'.(empty($conf->global->SOCIETE_USEPREFIX) ? ' colspan="3"' : '').'>'; |
|
1062 | + print '<input type="text" class="minwidth300" maxlength="128" name="name" id="name" value="'.$object->name.'" autofocus="autofocus"></td>'; |
|
1063 | 1063 | if (!empty($conf->global->SOCIETE_USEPREFIX)) { // Old not used prefix field |
1064 | - print '<td>' . $langs->trans('Prefix') . '</td><td><input type="text" size="5" maxlength="5" name="prefix_comm" value="' . $object->prefix_comm . '"></td>'; |
|
1064 | + print '<td>'.$langs->trans('Prefix').'</td><td><input type="text" size="5" maxlength="5" name="prefix_comm" value="'.$object->prefix_comm.'"></td>'; |
|
1065 | 1065 | } |
1066 | 1066 | print '</tr>'; |
1067 | 1067 | |
1068 | 1068 | // If javascript on, we show option individual |
1069 | 1069 | if ($conf->use_javascript_ajax) { |
1070 | - print '<tr class="individualline"><td>' . $form->editfieldkey('FirstName', 'firstname', '', $object, 0) . '</td>'; |
|
1071 | - print '<td colspan="3"><input type="text" class="minwidth300" maxlength="128" name="firstname" id="firstname" value="' . $object->firstname . '"></td>'; |
|
1070 | + print '<tr class="individualline"><td>'.$form->editfieldkey('FirstName', 'firstname', '', $object, 0).'</td>'; |
|
1071 | + print '<td colspan="3"><input type="text" class="minwidth300" maxlength="128" name="firstname" id="firstname" value="'.$object->firstname.'"></td>'; |
|
1072 | 1072 | print '</tr>'; |
1073 | 1073 | // Title |
1074 | - print '<tr class="individualline"><td>' . $form->editfieldkey('UserTitle', 'civility_id', '', $object, 0) . '</td><td colspan="3" class="maxwidthonsmartphone">'; |
|
1075 | - print $formcompany->select_civility($object->civility_id, 'civility_id', 'maxwidth100') . '</td>'; |
|
1074 | + print '<tr class="individualline"><td>'.$form->editfieldkey('UserTitle', 'civility_id', '', $object, 0).'</td><td colspan="3" class="maxwidthonsmartphone">'; |
|
1075 | + print $formcompany->select_civility($object->civility_id, 'civility_id', 'maxwidth100').'</td>'; |
|
1076 | 1076 | print '</tr>'; |
1077 | 1077 | } |
1078 | 1078 | |
1079 | 1079 | // Alias names (commercial, trademark or alias names) |
1080 | - print '<tr id="name_alias"><td><label for="name_alias_input">' . $langs->trans('AliasNames') . '</label></td>'; |
|
1081 | - print '<td colspan="3"><input type="text" class="minwidth300" name="name_alias" id="name_alias_input" value="' . $object->name_alias . '"></td></tr>'; |
|
1080 | + print '<tr id="name_alias"><td><label for="name_alias_input">'.$langs->trans('AliasNames').'</label></td>'; |
|
1081 | + print '<td colspan="3"><input type="text" class="minwidth300" name="name_alias" id="name_alias_input" value="'.$object->name_alias.'"></td></tr>'; |
|
1082 | 1082 | |
1083 | 1083 | // Prospect/Customer |
1084 | - print '<tr><td class="titlefieldcreate">' . $form->editfieldkey('ProspectCustomer', 'customerprospect', '', $object, 0, 'string', '', 1) . '</td>'; |
|
1084 | + print '<tr><td class="titlefieldcreate">'.$form->editfieldkey('ProspectCustomer', 'customerprospect', '', $object, 0, 'string', '', 1).'</td>'; |
|
1085 | 1085 | print '<td class="maxwidthonsmartphone">'; |
1086 | 1086 | $selected = GETPOST('client', 'int') != '' ? GETPOST('client', 'int') : $object->client; |
1087 | 1087 | print '<select class="flat" name="client" id="customerprospect">'; |
1088 | 1088 | if (GETPOST("type") == '') |
1089 | 1089 | print '<option value="-1"> </option>'; |
1090 | 1090 | if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) |
1091 | - print '<option value="2"' . ($selected == 2 ? ' selected' : '') . '>' . $langs->trans('Prospect') . '</option>'; |
|
1091 | + print '<option value="2"'.($selected == 2 ? ' selected' : '').'>'.$langs->trans('Prospect').'</option>'; |
|
1092 | 1092 | if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTSCUSTOMERS)) |
1093 | - print '<option value="3"' . ($selected == 3 ? ' selected' : '') . '>' . $langs->trans('ProspectCustomer') . '</option>'; |
|
1093 | + print '<option value="3"'.($selected == 3 ? ' selected' : '').'>'.$langs->trans('ProspectCustomer').'</option>'; |
|
1094 | 1094 | if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) |
1095 | - print '<option value="1"' . ($selected == 1 ? ' selected' : '') . '>' . $langs->trans('Customer') . '</option>'; |
|
1096 | - print '<option value="0"' . ((string) $selected == '0' ? ' selected' : '') . '>' . $langs->trans('NorProspectNorCustomer') . '</option>'; |
|
1095 | + print '<option value="1"'.($selected == 1 ? ' selected' : '').'>'.$langs->trans('Customer').'</option>'; |
|
1096 | + print '<option value="0"'.((string) $selected == '0' ? ' selected' : '').'>'.$langs->trans('NorProspectNorCustomer').'</option>'; |
|
1097 | 1097 | print '</select></td>'; |
1098 | 1098 | |
1099 | - print '<td>' . $form->editfieldkey('CustomerCode', 'customer_code', '', $object, 0) . '</td><td>'; |
|
1099 | + print '<td>'.$form->editfieldkey('CustomerCode', 'customer_code', '', $object, 0).'</td><td>'; |
|
1100 | 1100 | print '<table class="nobordernopadding"><tr><td>'; |
1101 | 1101 | $tmpcode = $object->code_client; |
1102 | 1102 | if (empty($tmpcode) && !empty($modCodeClient->code_auto)) |
1103 | 1103 | $tmpcode = $modCodeClient->getNextValue($object, 0); |
1104 | - print '<input type="text" name="customer_code" id="customer_code" class="maxwidthonsmartphone" value="' . dol_escape_htmltag($tmpcode) . '" maxlength="15">'; |
|
1104 | + print '<input type="text" name="customer_code" id="customer_code" class="maxwidthonsmartphone" value="'.dol_escape_htmltag($tmpcode).'" maxlength="15">'; |
|
1105 | 1105 | print '</td><td>'; |
1106 | 1106 | $s = $modCodeClient->getToolTip($langs, $object, 0); |
1107 | 1107 | print $form->textwithpicto('', $s, 1); |
@@ -1111,7 +1111,7 @@ discard block |
||
1111 | 1111 | if ((!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire)) || (!empty($conf->supplier_proposal->enabled) && !empty($user->rights->supplier_proposal->lire))) { |
1112 | 1112 | // Supplier |
1113 | 1113 | print '<tr>'; |
1114 | - print '<td>' . $form->editfieldkey('Supplier', 'fournisseur', '', $object, 0, 'string', '', 1) . '</td><td>'; |
|
1114 | + print '<td>'.$form->editfieldkey('Supplier', 'fournisseur', '', $object, 0, 'string', '', 1).'</td><td>'; |
|
1115 | 1115 | $default = -1; |
1116 | 1116 | if (!empty($conf->global->THIRDPARTY_SUPPLIER_BY_DEFAULT)) |
1117 | 1117 | $default = 1; |
@@ -1127,7 +1127,7 @@ discard block |
||
1127 | 1127 | $tmpcode = $object->code_fournisseur; |
1128 | 1128 | if (empty($tmpcode) && !empty($modCodeFournisseur->code_auto)) |
1129 | 1129 | $tmpcode = $modCodeFournisseur->getNextValue($object, 1); |
1130 | - print '<input type="text" name="supplier_code" id="supplier_code" class="maxwidthonsmartphone" value="' . dol_escape_htmltag($tmpcode) . '" maxlength="15">'; |
|
1130 | + print '<input type="text" name="supplier_code" id="supplier_code" class="maxwidthonsmartphone" value="'.dol_escape_htmltag($tmpcode).'" maxlength="15">'; |
|
1131 | 1131 | print '</td><td>'; |
1132 | 1132 | $s = $modCodeFournisseur->getToolTip($langs, $object, 1); |
1133 | 1133 | print $form->textwithpicto('', $s, 1); |
@@ -1137,32 +1137,32 @@ discard block |
||
1137 | 1137 | } |
1138 | 1138 | |
1139 | 1139 | // Status |
1140 | - print '<tr><td>' . $form->editfieldkey('Status', 'status', '', $object, 0) . '</td><td colspan="3">'; |
|
1140 | + print '<tr><td>'.$form->editfieldkey('Status', 'status', '', $object, 0).'</td><td colspan="3">'; |
|
1141 | 1141 | print $form->selectarray('status', array('0' => $langs->trans('ActivityCeased'), '1' => $langs->trans('InActivity')), 1); |
1142 | 1142 | print '</td></tr>'; |
1143 | 1143 | |
1144 | 1144 | // Barcode |
1145 | 1145 | if (!empty($conf->barcode->enabled)) { |
1146 | - print '<tr><td>' . $form->editfieldkey('Gencod', 'barcode', '', $object, 0) . '</td>'; |
|
1147 | - print '<td colspan="3"><input type="text" name="barcode" id="barcode" value="' . $object->barcode . '">'; |
|
1146 | + print '<tr><td>'.$form->editfieldkey('Gencod', 'barcode', '', $object, 0).'</td>'; |
|
1147 | + print '<td colspan="3"><input type="text" name="barcode" id="barcode" value="'.$object->barcode.'">'; |
|
1148 | 1148 | print '</td></tr>'; |
1149 | 1149 | } |
1150 | 1150 | |
1151 | 1151 | // Address |
1152 | - print '<tr><td class="tdtop">' . $form->editfieldkey('Address', 'address', '', $object, 0) . '</td>'; |
|
1153 | - print '<td colspan="3"><textarea name="address" id="address" class="quatrevingtpercent" rows="' . ROWS_2 . '" wrap="soft">'; |
|
1152 | + print '<tr><td class="tdtop">'.$form->editfieldkey('Address', 'address', '', $object, 0).'</td>'; |
|
1153 | + print '<td colspan="3"><textarea name="address" id="address" class="quatrevingtpercent" rows="'.ROWS_2.'" wrap="soft">'; |
|
1154 | 1154 | print $object->address; |
1155 | 1155 | print '</textarea></td></tr>'; |
1156 | 1156 | |
1157 | 1157 | // Zip / Town |
1158 | - print '<tr><td>' . $form->editfieldkey('Zip', 'zipcode', '', $object, 0) . '</td><td>'; |
|
1158 | + print '<tr><td>'.$form->editfieldkey('Zip', 'zipcode', '', $object, 0).'</td><td>'; |
|
1159 | 1159 | print $formcompany->select_ziptown($object->zip, 'zipcode', array('town', 'selectcountry_id', 'state_id'), 0, 0, '', 'maxwidth100 quatrevingtpercent'); |
1160 | - print '</td><td>' . $form->editfieldkey('Town', 'town', '', $object, 0) . '</td><td>'; |
|
1160 | + print '</td><td>'.$form->editfieldkey('Town', 'town', '', $object, 0).'</td><td>'; |
|
1161 | 1161 | print $formcompany->select_ziptown($object->town, 'town', array('zipcode', 'selectcountry_id', 'state_id'), 0, 0, '', 'maxwidth100 quatrevingtpercent'); |
1162 | 1162 | print '</td></tr>'; |
1163 | 1163 | |
1164 | 1164 | // Country |
1165 | - print '<tr><td>' . $form->editfieldkey('Country', 'selectcountry_id', '', $object, 0) . '</td><td colspan="3" class="maxwidthonsmartphone">'; |
|
1165 | + print '<tr><td>'.$form->editfieldkey('Country', 'selectcountry_id', '', $object, 0).'</td><td colspan="3" class="maxwidthonsmartphone">'; |
|
1166 | 1166 | print $form->select_country((GETPOST('country_id') != '' ? GETPOST('country_id') : $object->country_id)); |
1167 | 1167 | if ($user->admin) |
1168 | 1168 | print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); |
@@ -1171,9 +1171,9 @@ discard block |
||
1171 | 1171 | // State |
1172 | 1172 | if (empty($conf->global->SOCIETE_DISABLE_STATE)) { |
1173 | 1173 | if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && ($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1 || $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 2)) { |
1174 | - print '<tr><td>' . $form->editfieldkey('Region-State', 'state_id', '', $object, 0) . '</td><td colspan="3" class="maxwidthonsmartphone">'; |
|
1174 | + print '<tr><td>'.$form->editfieldkey('Region-State', 'state_id', '', $object, 0).'</td><td colspan="3" class="maxwidthonsmartphone">'; |
|
1175 | 1175 | } else { |
1176 | - print '<tr><td>' . $form->editfieldkey('State', 'state_id', '', $object, 0) . '</td><td colspan="3" class="maxwidthonsmartphone">'; |
|
1176 | + print '<tr><td>'.$form->editfieldkey('State', 'state_id', '', $object, 0).'</td><td colspan="3" class="maxwidthonsmartphone">'; |
|
1177 | 1177 | } |
1178 | 1178 | |
1179 | 1179 | if ($object->country_id) |
@@ -1184,54 +1184,54 @@ discard block |
||
1184 | 1184 | } |
1185 | 1185 | |
1186 | 1186 | // Email / Web |
1187 | - print '<tr><td>' . $form->editfieldkey('EMail', 'email', '', $object, 0, 'string', '', $conf->global->SOCIETE_EMAIL_MANDATORY) . '</td>'; |
|
1188 | - print '<td colspan="3"><input type="text" name="email" id="email" value="' . $object->email . '"></td></tr>'; |
|
1189 | - print '<tr><td>' . $form->editfieldkey('Web', 'url', '', $object, 0) . '</td>'; |
|
1190 | - print '<td colspan="3"><input type="text" name="url" id="url" value="' . $object->url . '"></td></tr>'; |
|
1187 | + print '<tr><td>'.$form->editfieldkey('EMail', 'email', '', $object, 0, 'string', '', $conf->global->SOCIETE_EMAIL_MANDATORY).'</td>'; |
|
1188 | + print '<td colspan="3"><input type="text" name="email" id="email" value="'.$object->email.'"></td></tr>'; |
|
1189 | + print '<tr><td>'.$form->editfieldkey('Web', 'url', '', $object, 0).'</td>'; |
|
1190 | + print '<td colspan="3"><input type="text" name="url" id="url" value="'.$object->url.'"></td></tr>'; |
|
1191 | 1191 | |
1192 | 1192 | if (!empty($conf->socialnetworks->enabled)) { |
1193 | 1193 | // Skype |
1194 | 1194 | if (!empty($conf->global->SOCIALNETWORKS_SKYPE)) { |
1195 | - print '<tr><td>' . $form->editfieldkey('Skype', 'skype', '', $object, 0) . '</td>'; |
|
1195 | + print '<tr><td>'.$form->editfieldkey('Skype', 'skype', '', $object, 0).'</td>'; |
|
1196 | 1196 | print '<td colspan="3">'; |
1197 | - print '<input type="text" name="skype" class="minwidth100" maxlength="80" id="skype" value="' . dol_escape_htmltag(GETPOSTISSET("skype") ? GETPOST("skype", 'alpha') : $object->skype) . '">'; |
|
1197 | + print '<input type="text" name="skype" class="minwidth100" maxlength="80" id="skype" value="'.dol_escape_htmltag(GETPOSTISSET("skype") ? GETPOST("skype", 'alpha') : $object->skype).'">'; |
|
1198 | 1198 | print '</td></tr>'; |
1199 | 1199 | } |
1200 | 1200 | |
1201 | 1201 | if (!empty($conf->global->SOCIALNETWORKS_TWITTER)) { |
1202 | - print '<tr><td>' . $form->editfieldkey('Twitter', 'twitter', '', $object, 0) . '</td>'; |
|
1202 | + print '<tr><td>'.$form->editfieldkey('Twitter', 'twitter', '', $object, 0).'</td>'; |
|
1203 | 1203 | print '<td colspan="3">'; |
1204 | - print '<input type="text" name="twitter" class="minwidth100" maxlength="80" id="twitter" value="' . dol_escape_htmltag(GETPOSTISSET("twitter") ? GETPOST("twitter", 'alpha') : $object->twitter) . '">'; |
|
1204 | + print '<input type="text" name="twitter" class="minwidth100" maxlength="80" id="twitter" value="'.dol_escape_htmltag(GETPOSTISSET("twitter") ? GETPOST("twitter", 'alpha') : $object->twitter).'">'; |
|
1205 | 1205 | print '</td></tr>'; |
1206 | 1206 | } |
1207 | 1207 | |
1208 | 1208 | if (!empty($conf->global->SOCIALNETWORKS_FACEBOOK)) { |
1209 | - print '<tr><td>' . $form->editfieldkey('Facebook', 'facebook', '', $object, 0) . '</td>'; |
|
1209 | + print '<tr><td>'.$form->editfieldkey('Facebook', 'facebook', '', $object, 0).'</td>'; |
|
1210 | 1210 | print '<td colspan="3">'; |
1211 | - print '<input type="text" name="facebook" class="minwidth100" maxlength="80" id="facebook" value="' . dol_escape_htmltag(GETPOSTISSET("facebook") ? GETPOST("facebook", 'alpha') : $object->facebook) . '">'; |
|
1211 | + print '<input type="text" name="facebook" class="minwidth100" maxlength="80" id="facebook" value="'.dol_escape_htmltag(GETPOSTISSET("facebook") ? GETPOST("facebook", 'alpha') : $object->facebook).'">'; |
|
1212 | 1212 | print '</td></tr>'; |
1213 | 1213 | } |
1214 | 1214 | } |
1215 | 1215 | |
1216 | 1216 | // Phone / Fax |
1217 | - print '<tr><td>' . $form->editfieldkey('Phone', 'phone', '', $object, 0) . '</td>'; |
|
1218 | - print '<td><input type="text" name="phone" id="phone" class="maxwidth100onsmartphone quatrevingtpercent" value="' . $object->phone . '"></td>'; |
|
1219 | - print '<td>' . $form->editfieldkey('Fax', 'fax', '', $object, 0) . '</td>'; |
|
1220 | - print '<td><input type="text" name="fax" id="fax" class="maxwidth100onsmartphone quatrevingtpercent" value="' . $object->fax . '"></td></tr>'; |
|
1217 | + print '<tr><td>'.$form->editfieldkey('Phone', 'phone', '', $object, 0).'</td>'; |
|
1218 | + print '<td><input type="text" name="phone" id="phone" class="maxwidth100onsmartphone quatrevingtpercent" value="'.$object->phone.'"></td>'; |
|
1219 | + print '<td>'.$form->editfieldkey('Fax', 'fax', '', $object, 0).'</td>'; |
|
1220 | + print '<td><input type="text" name="fax" id="fax" class="maxwidth100onsmartphone quatrevingtpercent" value="'.$object->fax.'"></td></tr>'; |
|
1221 | 1221 | |
1222 | 1222 | // Prof ids |
1223 | 1223 | $i = 1; |
1224 | 1224 | $j = 0; |
1225 | 1225 | while ($i <= 6) { |
1226 | - $idprof = $langs->transcountry('ProfId' . $i, $object->country_code); |
|
1226 | + $idprof = $langs->transcountry('ProfId'.$i, $object->country_code); |
|
1227 | 1227 | if ($idprof != '-') { |
1228 | - $key = 'idprof' . $i; |
|
1228 | + $key = 'idprof'.$i; |
|
1229 | 1229 | |
1230 | 1230 | if (($j % 2) == 0) |
1231 | 1231 | print '<tr>'; |
1232 | 1232 | |
1233 | - $idprof_mandatory = 'SOCIETE_IDPROF' . ($i) . '_MANDATORY'; |
|
1234 | - print '<td>' . $form->editfieldkey($idprof, $key, '', $object, 0, 'string', '', (empty($conf->global->$idprof_mandatory) ? 0 : 1)) . '</td><td>'; |
|
1233 | + $idprof_mandatory = 'SOCIETE_IDPROF'.($i).'_MANDATORY'; |
|
1234 | + print '<td>'.$form->editfieldkey($idprof, $key, '', $object, 0, 'string', '', (empty($conf->global->$idprof_mandatory) ? 0 : 1)).'</td><td>'; |
|
1235 | 1235 | |
1236 | 1236 | print $formcompany->get_input_id_prof($i, $key, $object->$key, $object->country_code); |
1237 | 1237 | print '</td>'; |
@@ -1245,13 +1245,13 @@ discard block |
||
1245 | 1245 | print '<td colspan="2"></td></tr>'; |
1246 | 1246 | |
1247 | 1247 | // Vat is used |
1248 | - print '<tr><td>' . $form->editfieldkey('VATIsUsed', 'assujtva_value', '', $object, 0) . '</td>'; |
|
1248 | + print '<tr><td>'.$form->editfieldkey('VATIsUsed', 'assujtva_value', '', $object, 0).'</td>'; |
|
1249 | 1249 | print '<td>'; |
1250 | - print $form->selectyesno('assujtva_value', GETPOSTISSET('assujtva_value') ? GETPOST('assujtva_value', 'int') : 1, 1); // Assujeti par defaut en creation |
|
1250 | + print $form->selectyesno('assujtva_value', GETPOSTISSET('assujtva_value') ? GETPOST('assujtva_value', 'int') : 1, 1); // Assujeti par defaut en creation |
|
1251 | 1251 | print '</td>'; |
1252 | - print '<td class="nowrap">' . $form->editfieldkey('VATIntra', 'intra_vat', '', $object, 0) . '</td>'; |
|
1252 | + print '<td class="nowrap">'.$form->editfieldkey('VATIntra', 'intra_vat', '', $object, 0).'</td>'; |
|
1253 | 1253 | print '<td class="nowrap">'; |
1254 | - $s = '<input type="text" class="flat maxwidthonsmartphone" name="tva_intra" id="intra_vat" maxlength="20" value="' . $object->tva_intra . '">'; |
|
1254 | + $s = '<input type="text" class="flat maxwidthonsmartphone" name="tva_intra" id="intra_vat" maxlength="20" value="'.$object->tva_intra.'">'; |
|
1255 | 1255 | |
1256 | 1256 | if (empty($conf->global->MAIN_DISABLEVATCHECK) && isInEEC($object)) { |
1257 | 1257 | $s .= ' '; |
@@ -1260,14 +1260,14 @@ discard block |
||
1260 | 1260 | print "\n"; |
1261 | 1261 | print '<script language="JavaScript" type="text/javascript">'; |
1262 | 1262 | print "function CheckVAT(a) {\n"; |
1263 | - print "newpopup('" . DOL_URL_ROOT . "/societe/checkvat/checkVatPopup.php?vatNumber='+a,'" . dol_escape_js($langs->trans("VATIntraCheckableOnEUSite")) . "',500,300);\n"; |
|
1263 | + print "newpopup('".DOL_URL_ROOT."/societe/checkvat/checkVatPopup.php?vatNumber='+a,'".dol_escape_js($langs->trans("VATIntraCheckableOnEUSite"))."',500,300);\n"; |
|
1264 | 1264 | print "}\n"; |
1265 | 1265 | print '</script>'; |
1266 | 1266 | print "\n"; |
1267 | - $s .= '<a href="#" class="hideonsmartphone" onclick="javascript: CheckVAT(document.formsoc.tva_intra.value);">' . $langs->trans("VATIntraCheck") . '</a>'; |
|
1267 | + $s .= '<a href="#" class="hideonsmartphone" onclick="javascript: CheckVAT(document.formsoc.tva_intra.value);">'.$langs->trans("VATIntraCheck").'</a>'; |
|
1268 | 1268 | $s = $form->textwithpicto($s, $langs->trans("VATIntraCheckDesc", $langs->trans("VATIntraCheck")), 1); |
1269 | 1269 | } else { |
1270 | - $s .= '<a href="' . $langs->transcountry("VATIntraCheckURL", $object->country_id) . '" target="_blank">' . img_picto($langs->trans("VATIntraCheckableOnEUSite"), 'help') . '</a>'; |
|
1270 | + $s .= '<a href="'.$langs->transcountry("VATIntraCheckURL", $object->country_id).'" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"), 'help').'</a>'; |
|
1271 | 1271 | } |
1272 | 1272 | } |
1273 | 1273 | print $s; |
@@ -1277,36 +1277,36 @@ discard block |
||
1277 | 1277 | // Local Taxes |
1278 | 1278 | //TODO: Place into a function to control showing by country or study better option |
1279 | 1279 | if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") { |
1280 | - print '<tr><td>' . $langs->transcountry("LocalTax1IsUsed", $mysoc->country_code) . '</td><td>'; |
|
1280 | + print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).'</td><td>'; |
|
1281 | 1281 | print $form->selectyesno('localtax1assuj_value', (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? $conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1 : 0), 1); |
1282 | - print '</td><td>' . $langs->transcountry("LocalTax2IsUsed", $mysoc->country_code) . '</td><td>'; |
|
1282 | + print '</td><td>'.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).'</td><td>'; |
|
1283 | 1283 | print $form->selectyesno('localtax2assuj_value', (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? $conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2 : 0), 1); |
1284 | 1284 | print '</td></tr>'; |
1285 | 1285 | } elseif ($mysoc->localtax1_assuj == "1") { |
1286 | - print '<tr><td>' . $langs->transcountry("LocalTax1IsUsed", $mysoc->country_code) . '</td><td colspan="3">'; |
|
1286 | + print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).'</td><td colspan="3">'; |
|
1287 | 1287 | print $form->selectyesno('localtax1assuj_value', (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? $conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1 : 0), 1); |
1288 | 1288 | print '</td></tr>'; |
1289 | 1289 | } elseif ($mysoc->localtax2_assuj == "1") { |
1290 | - print '<tr><td>' . $langs->transcountry("LocalTax2IsUsed", $mysoc->country_code) . '</td><td colspan="3">'; |
|
1290 | + print '<tr><td>'.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).'</td><td colspan="3">'; |
|
1291 | 1291 | print $form->selectyesno('localtax2assuj_value', (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? $conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2 : 0), 1); |
1292 | 1292 | print '</td></tr>'; |
1293 | 1293 | } |
1294 | 1294 | |
1295 | 1295 | // Type - Size |
1296 | - print '<tr><td>' . $form->editfieldkey('ThirdPartyType', 'typent_id', '', $object, 0) . '</td><td class="maxwidthonsmartphone">' . "\n"; |
|
1296 | + print '<tr><td>'.$form->editfieldkey('ThirdPartyType', 'typent_id', '', $object, 0).'</td><td class="maxwidthonsmartphone">'."\n"; |
|
1297 | 1297 | $sortparam = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label. |
1298 | 1298 | print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, $sortparam); |
1299 | 1299 | if ($user->admin) |
1300 | - print ' ' . info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); |
|
1300 | + print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); |
|
1301 | 1301 | print '</td>'; |
1302 | - print '<td>' . $form->editfieldkey('Staff', 'effectif_id', '', $object, 0) . '</td><td class="maxwidthonsmartphone">'; |
|
1302 | + print '<td>'.$form->editfieldkey('Staff', 'effectif_id', '', $object, 0).'</td><td class="maxwidthonsmartphone">'; |
|
1303 | 1303 | print $form->selectarray("effectif_id", $formcompany->effectif_array(0), $object->effectif_id); |
1304 | 1304 | if ($user->admin) |
1305 | - print ' ' . info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); |
|
1305 | + print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); |
|
1306 | 1306 | print '</td></tr>'; |
1307 | 1307 | |
1308 | 1308 | // Legal Form |
1309 | - print '<tr><td>' . $form->editfieldkey('JuridicalStatus', 'forme_juridique_code', '', $object, 0) . '</td>'; |
|
1309 | + print '<tr><td>'.$form->editfieldkey('JuridicalStatus', 'forme_juridique_code', '', $object, 0).'</td>'; |
|
1310 | 1310 | print '<td colspan="3" class="maxwidthonsmartphone">'; |
1311 | 1311 | if ($object->country_id) { |
1312 | 1312 | print $formcompany->select_juridicalstatus($object->forme_juridique_code, $object->country_code, '', 'forme_juridique_code'); |
@@ -1316,12 +1316,12 @@ discard block |
||
1316 | 1316 | print '</td></tr>'; |
1317 | 1317 | |
1318 | 1318 | // Capital |
1319 | - print '<tr><td>' . $form->editfieldkey('Capital', 'capital', '', $object, 0) . '</td>'; |
|
1320 | - print '<td colspan="3"><input type="text" name="capital" id="capital" size="10" value="' . $object->capital . '"> '; |
|
1321 | - print '<span class="hideonsmartphone">' . $langs->trans("Currency" . $conf->currency) . '</span></td></tr>'; |
|
1319 | + print '<tr><td>'.$form->editfieldkey('Capital', 'capital', '', $object, 0).'</td>'; |
|
1320 | + print '<td colspan="3"><input type="text" name="capital" id="capital" size="10" value="'.$object->capital.'"> '; |
|
1321 | + print '<span class="hideonsmartphone">'.$langs->trans("Currency".$conf->currency).'</span></td></tr>'; |
|
1322 | 1322 | |
1323 | 1323 | if (!empty($conf->global->MAIN_MULTILANGS)) { |
1324 | - print '<tr><td>' . $form->editfieldkey('DefaultLang', 'default_lang', '', $object, 0) . '</td><td colspan="3" class="maxwidthonsmartphone">' . "\n"; |
|
1324 | + print '<tr><td>'.$form->editfieldkey('DefaultLang', 'default_lang', '', $object, 0).'</td><td colspan="3" class="maxwidthonsmartphone">'."\n"; |
|
1325 | 1325 | print $formadmin->select_language(($object->default_lang ? $object->default_lang : $conf->global->MAIN_LANG_DEFAULT), 'default_lang', 0, 0, 1, 0, 0, 'maxwidth200onsmartphone'); |
1326 | 1326 | print '</td>'; |
1327 | 1327 | print '</tr>'; |
@@ -1330,7 +1330,7 @@ discard block |
||
1330 | 1330 | // Incoterms |
1331 | 1331 | if (!empty($conf->incoterm->enabled)) { |
1332 | 1332 | print '<tr>'; |
1333 | - print '<td>' . $form->editfieldkey('IncotermLabel', 'incoterm_id', '', $object, 0) . '</td>'; |
|
1333 | + print '<td>'.$form->editfieldkey('IncotermLabel', 'incoterm_id', '', $object, 0).'</td>'; |
|
1334 | 1334 | print '<td colspan="3" class="maxwidthonsmartphone">'; |
1335 | 1335 | print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : '')); |
1336 | 1336 | print '</td></tr>'; |
@@ -1342,14 +1342,14 @@ discard block |
||
1342 | 1342 | |
1343 | 1343 | // Customer |
1344 | 1344 | //if ($object->prospect || $object->client || (! $object->fournisseur && ! empty($conf->global->THIRDPARTY_CAN_HAVE_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT_SUPPLIER))) { |
1345 | - print '<tr class="visibleifcustomer"><td class="toptd">' . $form->editfieldkey('CustomersProspectsCategoriesShort', 'custcats', '', $object, 0) . '</td><td colspan="3">'; |
|
1345 | + print '<tr class="visibleifcustomer"><td class="toptd">'.$form->editfieldkey('CustomersProspectsCategoriesShort', 'custcats', '', $object, 0).'</td><td colspan="3">'; |
|
1346 | 1346 | $cate_arbo = $form->select_all_categories(Categorie::TYPE_CUSTOMER, null, 'parent', null, null, 1); |
1347 | 1347 | print $form->multiselectarray('custcats', $cate_arbo, GETPOST('custcats', 'array'), null, null, null, null, "90%"); |
1348 | 1348 | print "</td></tr>"; |
1349 | 1349 | //} |
1350 | 1350 | // Supplier |
1351 | 1351 | //if ($object->fournisseur) { |
1352 | - print '<tr class="visibleifsupplier"><td class="toptd">' . $form->editfieldkey('SuppliersCategoriesShort', 'suppcats', '', $object, 0) . '</td><td colspan="3">'; |
|
1352 | + print '<tr class="visibleifsupplier"><td class="toptd">'.$form->editfieldkey('SuppliersCategoriesShort', 'suppcats', '', $object, 0).'</td><td colspan="3">'; |
|
1353 | 1353 | $cate_arbo = $form->select_all_categories(Categorie::TYPE_SUPPLIER, null, 'parent', null, null, 1); |
1354 | 1354 | print $form->multiselectarray('suppcats', $cate_arbo, GETPOST('suppcats', 'array'), null, null, null, null, "90%"); |
1355 | 1355 | print "</td></tr>"; |
@@ -1359,7 +1359,7 @@ discard block |
||
1359 | 1359 | // Multicurrency |
1360 | 1360 | if (!empty($conf->multicurrency->enabled)) { |
1361 | 1361 | print '<tr>'; |
1362 | - print '<td>' . $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0) . '</td>'; |
|
1362 | + print '<td>'.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).'</td>'; |
|
1363 | 1363 | print '<td colspan="3" class="maxwidthonsmartphone">'; |
1364 | 1364 | print $form->selectMultiCurrency(($object->multicurrency_code ? $object->multicurrency_code : $conf->currency), 'multicurrency_code', 1); |
1365 | 1365 | print '</td></tr>'; |
@@ -1367,7 +1367,7 @@ discard block |
||
1367 | 1367 | |
1368 | 1368 | // Other attributes |
1369 | 1369 | $parameters = array('colspan' => ' colspan="3"', 'colspanvalue' => '3'); |
1370 | - $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
|
1370 | + $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
|
1371 | 1371 | print $hookmanager->resPrint; |
1372 | 1372 | if (empty($reshook)) { |
1373 | 1373 | print $object->showOptionals($extrafields, 'edit'); |
@@ -1375,7 +1375,7 @@ discard block |
||
1375 | 1375 | |
1376 | 1376 | // Assign a sale representative |
1377 | 1377 | print '<tr>'; |
1378 | - print '<td>' . $form->editfieldkey('AllocateCommercial', 'commercial_id', '', $object, 0) . '</td>'; |
|
1378 | + print '<td>'.$form->editfieldkey('AllocateCommercial', 'commercial_id', '', $object, 0).'</td>'; |
|
1379 | 1379 | print '<td colspan="3" class="maxwidthonsmartphone">'; |
1380 | 1380 | $userlist = $form->select_dolusers('', '', 0, null, 0, '', '', 0, 0, 0, '', 0, '', '', 0, 1); |
1381 | 1381 | // Note: If user has no right to "see all thirdparties", we for selection of sale representative to him, so after creation he can see the record. |
@@ -1384,28 +1384,28 @@ discard block |
||
1384 | 1384 | |
1385 | 1385 | // Ajout du logo |
1386 | 1386 | print '<tr class="hideonsmartphone">'; |
1387 | - print '<td>' . $form->editfieldkey('Logo', 'photoinput', '', $object, 0) . '</td>'; |
|
1387 | + print '<td>'.$form->editfieldkey('Logo', 'photoinput', '', $object, 0).'</td>'; |
|
1388 | 1388 | print '<td colspan="3">'; |
1389 | 1389 | print '<input class="flat" type="file" name="photo" id="photoinput" />'; |
1390 | 1390 | print '</td>'; |
1391 | 1391 | print '</tr>'; |
1392 | 1392 | |
1393 | - print '</table>' . "\n"; |
|
1393 | + print '</table>'."\n"; |
|
1394 | 1394 | |
1395 | 1395 | dol_fiche_end(); |
1396 | 1396 | |
1397 | 1397 | print '<div class="center">'; |
1398 | - print '<input type="submit" class="button" name="create" value="' . $langs->trans('AddThirdParty') . '">'; |
|
1398 | + print '<input type="submit" class="button" name="create" value="'.$langs->trans('AddThirdParty').'">'; |
|
1399 | 1399 | if (!empty($backtopage)) { |
1400 | 1400 | print ' '; |
1401 | - print '<input type="submit" class="button" name="cancel" value="' . $langs->trans('Cancel') . '">'; |
|
1401 | + print '<input type="submit" class="button" name="cancel" value="'.$langs->trans('Cancel').'">'; |
|
1402 | 1402 | } else { |
1403 | 1403 | print ' '; |
1404 | - print '<input type="button" class="button" value="' . $langs->trans("Cancel") . '" onClick="javascript:history.go(-1)">'; |
|
1404 | + print '<input type="button" class="button" value="'.$langs->trans("Cancel").'" onClick="javascript:history.go(-1)">'; |
|
1405 | 1405 | } |
1406 | - print '</div>' . "\n"; |
|
1406 | + print '</div>'."\n"; |
|
1407 | 1407 | |
1408 | - print '</form>' . "\n"; |
|
1408 | + print '</form>'."\n"; |
|
1409 | 1409 | } elseif ($action == 'edit') { |
1410 | 1410 | //print load_fiche_titre($langs->trans("EditCompany")); |
1411 | 1411 | |
@@ -1422,7 +1422,7 @@ discard block |
||
1422 | 1422 | } |
1423 | 1423 | $dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']); |
1424 | 1424 | foreach ($dirsociete as $dirroot) { |
1425 | - $res = dol_include_once($dirroot . $module . '.php'); |
|
1425 | + $res = dol_include_once($dirroot.$module.'.php'); |
|
1426 | 1426 | if ($res) |
1427 | 1427 | break; |
1428 | 1428 | } |
@@ -1437,7 +1437,7 @@ discard block |
||
1437 | 1437 | } |
1438 | 1438 | $dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']); |
1439 | 1439 | foreach ($dirsociete as $dirroot) { |
1440 | - $res = dol_include_once($dirroot . $module . '.php'); |
|
1440 | + $res = dol_include_once($dirroot.$module.'.php'); |
|
1441 | 1441 | if ($res) |
1442 | 1442 | break; |
1443 | 1443 | } |
@@ -1523,10 +1523,10 @@ discard block |
||
1523 | 1523 | } |
1524 | 1524 | |
1525 | 1525 | if ($conf->use_javascript_ajax) { |
1526 | - print "\n" . '<script type="text/javascript">'; |
|
1526 | + print "\n".'<script type="text/javascript">'; |
|
1527 | 1527 | print '$(document).ready(function () { |
1528 | - var val=' . $sub . '; |
|
1529 | - var val2=' . $sub2 . '; |
|
1528 | + var val=' . $sub.'; |
|
1529 | + var val2=' . $sub2.'; |
|
1530 | 1530 | if("#localtax1assuj_value".value==undefined){ |
1531 | 1531 | if(val==1){ |
1532 | 1532 | $(".cblt1").show(); |
@@ -1564,7 +1564,7 @@ discard block |
||
1564 | 1564 | }); |
1565 | 1565 | function init_customer_categ() { |
1566 | 1566 | console.log("is customer or prospect = "+jQuery("#customerprospect").val()); |
1567 | - if (jQuery("#customerprospect").val() == 0 && (jQuery("#fournisseur").val() == 0 || ' . (empty($conf->global->THIRDPARTY_CAN_HAVE_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT_SUPPLIER) ? '1' : '0') . ')) |
|
1567 | + if (jQuery("#customerprospect").val() == 0 && (jQuery("#fournisseur").val() == 0 || ' . (empty($conf->global->THIRDPARTY_CAN_HAVE_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT_SUPPLIER) ? '1' : '0').')) |
|
1568 | 1568 | { |
1569 | 1569 | jQuery(".visibleifcustomer").hide(); |
1570 | 1570 | } |
@@ -1596,14 +1596,14 @@ discard block |
||
1596 | 1596 | }); |
1597 | 1597 | |
1598 | 1598 | })'; |
1599 | - print '</script>' . "\n"; |
|
1599 | + print '</script>'."\n"; |
|
1600 | 1600 | } |
1601 | 1601 | |
1602 | - print '<form enctype="multipart/form-data" action="' . $_SERVER["PHP_SELF"] . '?socid=' . $object->id . '" method="post" name="formsoc">'; |
|
1602 | + print '<form enctype="multipart/form-data" action="'.$_SERVER["PHP_SELF"].'?socid='.$object->id.'" method="post" name="formsoc">'; |
|
1603 | 1603 | print '<input type="hidden" name="action" value="update">'; |
1604 | - print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; |
|
1605 | - print '<input type="hidden" name="socid" value="' . $object->id . '">'; |
|
1606 | - print '<input type="hidden" name="entity" value="' . $object->entity . '">'; |
|
1604 | + print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; |
|
1605 | + print '<input type="hidden" name="socid" value="'.$object->id.'">'; |
|
1606 | + print '<input type="hidden" name="entity" value="'.$object->entity.'">'; |
|
1607 | 1607 | if ($modCodeClient->code_auto || $modCodeFournisseur->code_auto) |
1608 | 1608 | print '<input type="hidden" name="code_auto" value="1">'; |
1609 | 1609 | |
@@ -1615,44 +1615,44 @@ discard block |
||
1615 | 1615 | |
1616 | 1616 | // Ref/ID |
1617 | 1617 | if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) { |
1618 | - print '<tr><td class="titlefieldcreate">' . $langs->trans("ID") . '</td><td colspan="3">'; |
|
1618 | + print '<tr><td class="titlefieldcreate">'.$langs->trans("ID").'</td><td colspan="3">'; |
|
1619 | 1619 | print $object->ref; |
1620 | 1620 | print '</td></tr>'; |
1621 | 1621 | } |
1622 | 1622 | |
1623 | 1623 | // Name |
1624 | - print '<tr><td class="titlefieldcreate">' . $form->editfieldkey('ThirdPartyName', 'name', '', $object, 0, 'string', '', 1) . '</td>'; |
|
1625 | - print '<td colspan="3"><input type="text" class="minwidth300" maxlength="128" name="name" id="name" value="' . dol_escape_htmltag($object->name) . '" autofocus="autofocus"></td></tr>'; |
|
1624 | + print '<tr><td class="titlefieldcreate">'.$form->editfieldkey('ThirdPartyName', 'name', '', $object, 0, 'string', '', 1).'</td>'; |
|
1625 | + print '<td colspan="3"><input type="text" class="minwidth300" maxlength="128" name="name" id="name" value="'.dol_escape_htmltag($object->name).'" autofocus="autofocus"></td></tr>'; |
|
1626 | 1626 | |
1627 | 1627 | // Alias names (commercial, trademark or alias names) |
1628 | - print '<tr id="name_alias"><td><label for="name_alias_input">' . $langs->trans('AliasNames') . '</label></td>'; |
|
1629 | - print '<td colspan="3"><input type="text" class="minwidth300" name="name_alias" id="name_alias_input" value="' . dol_escape_htmltag($object->name_alias) . '"></td></tr>'; |
|
1628 | + print '<tr id="name_alias"><td><label for="name_alias_input">'.$langs->trans('AliasNames').'</label></td>'; |
|
1629 | + print '<td colspan="3"><input type="text" class="minwidth300" name="name_alias" id="name_alias_input" value="'.dol_escape_htmltag($object->name_alias).'"></td></tr>'; |
|
1630 | 1630 | |
1631 | 1631 | // Prefix |
1632 | 1632 | if (!empty($conf->global->SOCIETE_USEPREFIX)) { // Old not used prefix field |
1633 | - print '<tr><td>' . $form->editfieldkey('Prefix', 'prefix', '', $object, 0) . '</td><td colspan="3">'; |
|
1633 | + print '<tr><td>'.$form->editfieldkey('Prefix', 'prefix', '', $object, 0).'</td><td colspan="3">'; |
|
1634 | 1634 | // It does not change the prefix mode using the auto numbering prefix |
1635 | 1635 | if (($prefixCustomerIsUsed || $prefixSupplierIsUsed) && $object->prefix_comm) { |
1636 | - print '<input type="hidden" name="prefix_comm" value="' . dol_escape_htmltag($object->prefix_comm) . '">'; |
|
1636 | + print '<input type="hidden" name="prefix_comm" value="'.dol_escape_htmltag($object->prefix_comm).'">'; |
|
1637 | 1637 | print $object->prefix_comm; |
1638 | 1638 | } else { |
1639 | - print '<input type="text" size="5" maxlength="5" name="prefix_comm" id="prefix" value="' . dol_escape_htmltag($object->prefix_comm) . '">'; |
|
1639 | + print '<input type="text" size="5" maxlength="5" name="prefix_comm" id="prefix" value="'.dol_escape_htmltag($object->prefix_comm).'">'; |
|
1640 | 1640 | } |
1641 | 1641 | print '</td>'; |
1642 | 1642 | } |
1643 | 1643 | |
1644 | 1644 | // Prospect/Customer |
1645 | - print '<tr><td>' . $form->editfieldkey('ProspectCustomer', 'customerprospect', '', $object, 0, 'string', '', 1) . '</td>'; |
|
1645 | + print '<tr><td>'.$form->editfieldkey('ProspectCustomer', 'customerprospect', '', $object, 0, 'string', '', 1).'</td>'; |
|
1646 | 1646 | print '<td class="maxwidthonsmartphone"><select class="flat" name="client" id="customerprospect">'; |
1647 | 1647 | if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) |
1648 | - print '<option value="2"' . ($object->client == 2 ? ' selected' : '') . '>' . $langs->trans('Prospect') . '</option>'; |
|
1648 | + print '<option value="2"'.($object->client == 2 ? ' selected' : '').'>'.$langs->trans('Prospect').'</option>'; |
|
1649 | 1649 | if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) |
1650 | - print '<option value="3"' . ($object->client == 3 ? ' selected' : '') . '>' . $langs->trans('ProspectCustomer') . '</option>'; |
|
1650 | + print '<option value="3"'.($object->client == 3 ? ' selected' : '').'>'.$langs->trans('ProspectCustomer').'</option>'; |
|
1651 | 1651 | if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) |
1652 | - print '<option value="1"' . ($object->client == 1 ? ' selected' : '') . '>' . $langs->trans('Customer') . '</option>'; |
|
1653 | - print '<option value="0"' . ($object->client == 0 ? ' selected' : '') . '>' . $langs->trans('NorProspectNorCustomer') . '</option>'; |
|
1652 | + print '<option value="1"'.($object->client == 1 ? ' selected' : '').'>'.$langs->trans('Customer').'</option>'; |
|
1653 | + print '<option value="0"'.($object->client == 0 ? ' selected' : '').'>'.$langs->trans('NorProspectNorCustomer').'</option>'; |
|
1654 | 1654 | print '</select></td>'; |
1655 | - print '<td>' . $form->editfieldkey('CustomerCode', 'customer_code', '', $object, 0) . '</td><td>'; |
|
1655 | + print '<td>'.$form->editfieldkey('CustomerCode', 'customer_code', '', $object, 0).'</td><td>'; |
|
1656 | 1656 | |
1657 | 1657 | print '<table class="nobordernopadding"><tr><td>'; |
1658 | 1658 | if ((!$object->code_client || $object->code_client == -1) && $modCodeClient->code_auto) { |
@@ -1661,13 +1661,13 @@ discard block |
||
1661 | 1661 | $tmpcode = $object->oldcopy->code_client; // When there is an error to update a thirdparty, the number for supplier and customer code is kept to old value. |
1662 | 1662 | if (empty($tmpcode) && !empty($modCodeClient->code_auto)) |
1663 | 1663 | $tmpcode = $modCodeClient->getNextValue($object, 0); |
1664 | - print '<input type="text" name="customer_code" id="customer_code" size="16" value="' . dol_escape_htmltag($tmpcode) . '" maxlength="15">'; |
|
1664 | + print '<input type="text" name="customer_code" id="customer_code" size="16" value="'.dol_escape_htmltag($tmpcode).'" maxlength="15">'; |
|
1665 | 1665 | } |
1666 | 1666 | else if ($object->codeclient_modifiable()) { |
1667 | - print '<input type="text" name="customer_code" id="customer_code" size="16" value="' . dol_escape_htmltag($object->code_client) . '" maxlength="15">'; |
|
1667 | + print '<input type="text" name="customer_code" id="customer_code" size="16" value="'.dol_escape_htmltag($object->code_client).'" maxlength="15">'; |
|
1668 | 1668 | } else { |
1669 | 1669 | print $object->code_client; |
1670 | - print '<input type="hidden" name="customer_code" value="' . dol_escape_htmltag($object->code_client) . '">'; |
|
1670 | + print '<input type="hidden" name="customer_code" value="'.dol_escape_htmltag($object->code_client).'">'; |
|
1671 | 1671 | } |
1672 | 1672 | print '</td><td>'; |
1673 | 1673 | $s = $modCodeClient->getToolTip($langs, $object, 0); |
@@ -1679,7 +1679,7 @@ discard block |
||
1679 | 1679 | // Supplier |
1680 | 1680 | if ((!empty($conf->fournisseur->enabled) && !empty($user->rights->fournisseur->lire)) || (!empty($conf->supplier_proposal->enabled) && !empty($user->rights->supplier_proposal->lire))) { |
1681 | 1681 | print '<tr>'; |
1682 | - print '<td>' . $form->editfieldkey('Supplier', 'fournisseur', '', $object, 0, 'string', '', 1) . '</td><td class="maxwidthonsmartphone">'; |
|
1682 | + print '<td>'.$form->editfieldkey('Supplier', 'fournisseur', '', $object, 0, 'string', '', 1).'</td><td class="maxwidthonsmartphone">'; |
|
1683 | 1683 | print $form->selectyesno("fournisseur", $object->fournisseur, 1); |
1684 | 1684 | print '</td>'; |
1685 | 1685 | print '<td>'; |
@@ -1695,13 +1695,13 @@ discard block |
||
1695 | 1695 | $tmpcode = $object->oldcopy->code_fournisseur; // When there is an error to update a thirdparty, the number for supplier and customer code is kept to old value. |
1696 | 1696 | if (empty($tmpcode) && !empty($modCodeFournisseur->code_auto)) |
1697 | 1697 | $tmpcode = $modCodeFournisseur->getNextValue($object, 1); |
1698 | - print '<input type="text" name="supplier_code" id="supplier_code" size="16" value="' . dol_escape_htmltag($tmpcode) . '" maxlength="15">'; |
|
1698 | + print '<input type="text" name="supplier_code" id="supplier_code" size="16" value="'.dol_escape_htmltag($tmpcode).'" maxlength="15">'; |
|
1699 | 1699 | } |
1700 | 1700 | else if ($object->codefournisseur_modifiable()) { |
1701 | - print '<input type="text" name="supplier_code" id="supplier_code" size="16" value="' . $object->code_fournisseur . '" maxlength="15">'; |
|
1701 | + print '<input type="text" name="supplier_code" id="supplier_code" size="16" value="'.$object->code_fournisseur.'" maxlength="15">'; |
|
1702 | 1702 | } else { |
1703 | 1703 | print $object->code_fournisseur; |
1704 | - print '<input type="hidden" name="supplier_code" value="' . $object->code_fournisseur . '">'; |
|
1704 | + print '<input type="hidden" name="supplier_code" value="'.$object->code_fournisseur.'">'; |
|
1705 | 1705 | } |
1706 | 1706 | print '</td><td>'; |
1707 | 1707 | $s = $modCodeFournisseur->getToolTip($langs, $object, 1); |
@@ -1713,31 +1713,31 @@ discard block |
||
1713 | 1713 | |
1714 | 1714 | // Barcode |
1715 | 1715 | if (!empty($conf->barcode->enabled)) { |
1716 | - print '<tr><td class="tdtop">' . $form->editfieldkey('Gencod', 'barcode', '', $object, 0) . '</td>'; |
|
1717 | - print '<td colspan="3"><input type="text" name="barcode" id="barcode" value="' . $object->barcode . '">'; |
|
1716 | + print '<tr><td class="tdtop">'.$form->editfieldkey('Gencod', 'barcode', '', $object, 0).'</td>'; |
|
1717 | + print '<td colspan="3"><input type="text" name="barcode" id="barcode" value="'.$object->barcode.'">'; |
|
1718 | 1718 | print '</td></tr>'; |
1719 | 1719 | } |
1720 | 1720 | |
1721 | 1721 | // Status |
1722 | - print '<tr><td>' . $form->editfieldkey('Status', 'status', '', $object, 0) . '</td><td colspan="3">'; |
|
1722 | + print '<tr><td>'.$form->editfieldkey('Status', 'status', '', $object, 0).'</td><td colspan="3">'; |
|
1723 | 1723 | print $form->selectarray('status', array('0' => $langs->trans('ActivityCeased'), '1' => $langs->trans('InActivity')), $object->status); |
1724 | 1724 | print '</td></tr>'; |
1725 | 1725 | |
1726 | 1726 | // Address |
1727 | - print '<tr><td class="tdtop">' . $form->editfieldkey('Address', 'address', '', $object, 0) . '</td>'; |
|
1727 | + print '<tr><td class="tdtop">'.$form->editfieldkey('Address', 'address', '', $object, 0).'</td>'; |
|
1728 | 1728 | print '<td colspan="3"><textarea name="address" id="address" class="quatrevingtpercent" rows="3" wrap="soft">'; |
1729 | 1729 | print $object->address; |
1730 | 1730 | print '</textarea></td></tr>'; |
1731 | 1731 | |
1732 | 1732 | // Zip / Town |
1733 | - print '<tr><td>' . $form->editfieldkey('Zip', 'zipcode', '', $object, 0) . '</td><td>'; |
|
1733 | + print '<tr><td>'.$form->editfieldkey('Zip', 'zipcode', '', $object, 0).'</td><td>'; |
|
1734 | 1734 | print $formcompany->select_ziptown($object->zip, 'zipcode', array('town', 'selectcountry_id', 'state_id'), 0, 0, '', 'maxwidth50onsmartphone'); |
1735 | - print '</td><td>' . $form->editfieldkey('Town', 'town', '', $object, 0) . '</td><td>'; |
|
1735 | + print '</td><td>'.$form->editfieldkey('Town', 'town', '', $object, 0).'</td><td>'; |
|
1736 | 1736 | print $formcompany->select_ziptown($object->town, 'town', array('zipcode', 'selectcountry_id', 'state_id')); |
1737 | 1737 | print '</td></tr>'; |
1738 | 1738 | |
1739 | 1739 | // Country |
1740 | - print '<tr><td>' . $form->editfieldkey('Country', 'selectcounty_id', '', $object, 0) . '</td><td colspan="3">'; |
|
1740 | + print '<tr><td>'.$form->editfieldkey('Country', 'selectcounty_id', '', $object, 0).'</td><td colspan="3">'; |
|
1741 | 1741 | print $form->select_country((GETPOST('country_id') != '' ? GETPOST('country_id') : $object->country_id), 'country_id'); |
1742 | 1742 | if ($user->admin) |
1743 | 1743 | print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); |
@@ -1746,9 +1746,9 @@ discard block |
||
1746 | 1746 | // State |
1747 | 1747 | if (empty($conf->global->SOCIETE_DISABLE_STATE)) { |
1748 | 1748 | if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && ($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1 || $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 2)) { |
1749 | - print '<tr><td>' . $form->editfieldkey('Region-State', 'state_id', '', $object, 0) . '</td><td colspan="3">'; |
|
1749 | + print '<tr><td>'.$form->editfieldkey('Region-State', 'state_id', '', $object, 0).'</td><td colspan="3">'; |
|
1750 | 1750 | } else { |
1751 | - print '<tr><td>' . $form->editfieldkey('State', 'state_id', '', $object, 0) . '</td><td colspan="3">'; |
|
1751 | + print '<tr><td>'.$form->editfieldkey('State', 'state_id', '', $object, 0).'</td><td colspan="3">'; |
|
1752 | 1752 | } |
1753 | 1753 | |
1754 | 1754 | print $formcompany->select_state($object->state_id, $object->country_code); |
@@ -1756,48 +1756,48 @@ discard block |
||
1756 | 1756 | } |
1757 | 1757 | |
1758 | 1758 | // EMail / Web |
1759 | - print '<tr><td>' . $form->editfieldkey('EMail', 'email', '', $object, 0, 'string', '', (!empty($conf->global->SOCIETE_EMAIL_MANDATORY))) . '</td>'; |
|
1760 | - print '<td colspan="3"><input type="text" name="email" id="email" size="32" value="' . $object->email . '"></td></tr>'; |
|
1761 | - print '<tr><td>' . $form->editfieldkey('Web', 'url', '', $object, 0) . '</td>'; |
|
1762 | - print '<td colspan="3"><input type="text" name="url" id="url" size="32" value="' . $object->url . '"></td></tr>'; |
|
1759 | + print '<tr><td>'.$form->editfieldkey('EMail', 'email', '', $object, 0, 'string', '', (!empty($conf->global->SOCIETE_EMAIL_MANDATORY))).'</td>'; |
|
1760 | + print '<td colspan="3"><input type="text" name="email" id="email" size="32" value="'.$object->email.'"></td></tr>'; |
|
1761 | + print '<tr><td>'.$form->editfieldkey('Web', 'url', '', $object, 0).'</td>'; |
|
1762 | + print '<td colspan="3"><input type="text" name="url" id="url" size="32" value="'.$object->url.'"></td></tr>'; |
|
1763 | 1763 | |
1764 | 1764 | if (!empty($conf->socialnetworks->enabled)) { |
1765 | 1765 | // Skype |
1766 | 1766 | if (!empty($conf->global->SOCIALNETWORKS_SKYPE)) { |
1767 | - print '<tr><td>' . $form->editfieldkey('Skype', 'skype', '', $object, 0) . '</td>'; |
|
1768 | - print '<td colspan="3"><input type="text" name="skype" id="skype" value="' . $object->skype . '"></td></tr>'; |
|
1767 | + print '<tr><td>'.$form->editfieldkey('Skype', 'skype', '', $object, 0).'</td>'; |
|
1768 | + print '<td colspan="3"><input type="text" name="skype" id="skype" value="'.$object->skype.'"></td></tr>'; |
|
1769 | 1769 | } |
1770 | 1770 | |
1771 | 1771 | if (!empty($conf->global->SOCIALNETWORKS_TWITTER)) { |
1772 | - print '<tr><td>' . $form->editfieldkey('Twitter', 'twitter', '', $object, 0) . '</td>'; |
|
1773 | - print '<td colspan="3"><input type="text" name="twitter" id="twitter" value="' . $object->twitter . '"></td></tr>'; |
|
1772 | + print '<tr><td>'.$form->editfieldkey('Twitter', 'twitter', '', $object, 0).'</td>'; |
|
1773 | + print '<td colspan="3"><input type="text" name="twitter" id="twitter" value="'.$object->twitter.'"></td></tr>'; |
|
1774 | 1774 | } |
1775 | 1775 | |
1776 | 1776 | if (!empty($conf->global->SOCIALNETWORKS_FACEBOOK)) { |
1777 | - print '<tr><td>' . $form->editfieldkey('Facebook', 'facebook', '', $object, 0) . '</td>'; |
|
1778 | - print '<td colspan="3"><input type="text" name="facebook" id="facebook" value="' . $object->facebook . '"></td></tr>'; |
|
1777 | + print '<tr><td>'.$form->editfieldkey('Facebook', 'facebook', '', $object, 0).'</td>'; |
|
1778 | + print '<td colspan="3"><input type="text" name="facebook" id="facebook" value="'.$object->facebook.'"></td></tr>'; |
|
1779 | 1779 | } |
1780 | 1780 | } |
1781 | 1781 | |
1782 | 1782 | // Phone / Fax |
1783 | - print '<tr><td>' . $form->editfieldkey('Phone', 'phone', '', $object, 0) . '</td>'; |
|
1784 | - print '<td><input type="text" name="phone" id="phone" class="maxwidth100onsmartphone quatrevingtpercent" value="' . $object->phone . '"></td>'; |
|
1785 | - print '<td>' . $form->editfieldkey('Fax', 'fax', '', $object, 0) . '</td>'; |
|
1786 | - print '<td><input type="text" name="fax" id="fax" class="maxwidth100onsmartphone quatrevingtpercent" value="' . $object->fax . '"></td></tr>'; |
|
1783 | + print '<tr><td>'.$form->editfieldkey('Phone', 'phone', '', $object, 0).'</td>'; |
|
1784 | + print '<td><input type="text" name="phone" id="phone" class="maxwidth100onsmartphone quatrevingtpercent" value="'.$object->phone.'"></td>'; |
|
1785 | + print '<td>'.$form->editfieldkey('Fax', 'fax', '', $object, 0).'</td>'; |
|
1786 | + print '<td><input type="text" name="fax" id="fax" class="maxwidth100onsmartphone quatrevingtpercent" value="'.$object->fax.'"></td></tr>'; |
|
1787 | 1787 | |
1788 | 1788 | // Prof ids |
1789 | 1789 | $i = 1; |
1790 | 1790 | $j = 0; |
1791 | 1791 | while ($i <= 6) { |
1792 | - $idprof = $langs->transcountry('ProfId' . $i, $object->country_code); |
|
1792 | + $idprof = $langs->transcountry('ProfId'.$i, $object->country_code); |
|
1793 | 1793 | if ($idprof != '-') { |
1794 | - $key = 'idprof' . $i; |
|
1794 | + $key = 'idprof'.$i; |
|
1795 | 1795 | |
1796 | 1796 | if (($j % 2) == 0) |
1797 | 1797 | print '<tr>'; |
1798 | 1798 | |
1799 | - $idprof_mandatory = 'SOCIETE_IDPROF' . ($i) . '_MANDATORY'; |
|
1800 | - print '<td>' . $form->editfieldkey($idprof, $key, '', $object, 0, 'string', '', !(empty($conf->global->$idprof_mandatory) || !$object->isACompany())) . '</td><td>'; |
|
1799 | + $idprof_mandatory = 'SOCIETE_IDPROF'.($i).'_MANDATORY'; |
|
1800 | + print '<td>'.$form->editfieldkey($idprof, $key, '', $object, 0, 'string', '', !(empty($conf->global->$idprof_mandatory) || !$object->isACompany())).'</td><td>'; |
|
1801 | 1801 | print $formcompany->get_input_id_prof($i, $key, $object->$key, $object->country_code); |
1802 | 1802 | print '</td>'; |
1803 | 1803 | if (($j % 2) == 1) |
@@ -1810,44 +1810,44 @@ discard block |
||
1810 | 1810 | print '<td colspan="2"></td></tr>'; |
1811 | 1811 | |
1812 | 1812 | // VAT is used |
1813 | - print '<tr><td>' . $form->editfieldkey('VATIsUsed', 'assujtva_value', '', $object, 0) . '</td><td colspan="3">'; |
|
1813 | + print '<tr><td>'.$form->editfieldkey('VATIsUsed', 'assujtva_value', '', $object, 0).'</td><td colspan="3">'; |
|
1814 | 1814 | print $form->selectyesno('assujtva_value', $object->tva_assuj, 1); |
1815 | 1815 | print '</td></tr>'; |
1816 | 1816 | |
1817 | 1817 | // Local Taxes |
1818 | 1818 | //TODO: Place into a function to control showing by country or study better option |
1819 | 1819 | if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") { |
1820 | - print '<tr><td>' . $form->editfieldkey($langs->transcountry("LocalTax1IsUsed", $mysoc->country_code), 'localtax1assuj_value', '', $object, 0) . '</td><td>'; |
|
1820 | + print '<tr><td>'.$form->editfieldkey($langs->transcountry("LocalTax1IsUsed", $mysoc->country_code), 'localtax1assuj_value', '', $object, 0).'</td><td>'; |
|
1821 | 1821 | print $form->selectyesno('localtax1assuj_value', $object->localtax1_assuj, 1); |
1822 | 1822 | if (!isOnlyOneLocalTax(1)) { |
1823 | - print '<span class="cblt1"> ' . $langs->transcountry("Type", $mysoc->country_code) . ': '; |
|
1823 | + print '<span class="cblt1"> '.$langs->transcountry("Type", $mysoc->country_code).': '; |
|
1824 | 1824 | $formcompany->select_localtax(1, $object->localtax1_value, "lt1"); |
1825 | 1825 | print '</span>'; |
1826 | 1826 | } |
1827 | 1827 | print '</td>'; |
1828 | 1828 | |
1829 | - print '<td>' . $form->editfieldkey($langs->transcountry("LocalTax2IsUsed", $mysoc->country_code), 'localtax2assuj_value', '', $object, 0) . '</td><td>'; |
|
1829 | + print '<td>'.$form->editfieldkey($langs->transcountry("LocalTax2IsUsed", $mysoc->country_code), 'localtax2assuj_value', '', $object, 0).'</td><td>'; |
|
1830 | 1830 | print $form->selectyesno('localtax2assuj_value', $object->localtax2_assuj, 1); |
1831 | 1831 | if (!isOnlyOneLocalTax(2)) { |
1832 | - print '<span class="cblt2"> ' . $langs->transcountry("Type", $mysoc->country_code) . ': '; |
|
1832 | + print '<span class="cblt2"> '.$langs->transcountry("Type", $mysoc->country_code).': '; |
|
1833 | 1833 | $formcompany->select_localtax(2, $object->localtax2_value, "lt2"); |
1834 | 1834 | print '</span>'; |
1835 | 1835 | } |
1836 | 1836 | print '</td></tr>'; |
1837 | 1837 | } elseif ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj != "1") { |
1838 | - print '<tr><td>' . $form->editfieldkey($langs->transcountry("LocalTax1IsUsed", $mysoc->country_code), 'localtax1assuj_value', '', $object, 0) . '</td><td colspan="3">'; |
|
1838 | + print '<tr><td>'.$form->editfieldkey($langs->transcountry("LocalTax1IsUsed", $mysoc->country_code), 'localtax1assuj_value', '', $object, 0).'</td><td colspan="3">'; |
|
1839 | 1839 | print $form->selectyesno('localtax1assuj_value', $object->localtax1_assuj, 1); |
1840 | 1840 | if (!isOnlyOneLocalTax(1)) { |
1841 | - print '<span class="cblt1"> ' . $langs->transcountry("Type", $mysoc->country_code) . ': '; |
|
1841 | + print '<span class="cblt1"> '.$langs->transcountry("Type", $mysoc->country_code).': '; |
|
1842 | 1842 | $formcompany->select_localtax(1, $object->localtax1_value, "lt1"); |
1843 | 1843 | print '</span>'; |
1844 | 1844 | } |
1845 | 1845 | print '</td></tr>'; |
1846 | 1846 | } elseif ($mysoc->localtax2_assuj == "1" && $mysoc->localtax1_assuj != "1") { |
1847 | - print '<tr><td>' . $form->editfieldkey($langs->transcountry("LocalTax2IsUsed", $mysoc->country_code), 'localtax2assuj_value', '', $object, 0) . '</td><td colspan="3">'; |
|
1847 | + print '<tr><td>'.$form->editfieldkey($langs->transcountry("LocalTax2IsUsed", $mysoc->country_code), 'localtax2assuj_value', '', $object, 0).'</td><td colspan="3">'; |
|
1848 | 1848 | print $form->selectyesno('localtax2assuj_value', $object->localtax2_assuj, 1); |
1849 | 1849 | if (!isOnlyOneLocalTax(2)) { |
1850 | - print '<span class="cblt2"> ' . $langs->transcountry("Type", $mysoc->country_code) . ': '; |
|
1850 | + print '<span class="cblt2"> '.$langs->transcountry("Type", $mysoc->country_code).': '; |
|
1851 | 1851 | $formcompany->select_localtax(2, $object->localtax2_value, "lt2"); |
1852 | 1852 | print '</span>'; |
1853 | 1853 | } |
@@ -1855,9 +1855,9 @@ discard block |
||
1855 | 1855 | } |
1856 | 1856 | |
1857 | 1857 | // VAT Code |
1858 | - print '<tr><td>' . $form->editfieldkey('VATIntra', 'intra_vat', '', $object, 0) . '</td>'; |
|
1858 | + print '<tr><td>'.$form->editfieldkey('VATIntra', 'intra_vat', '', $object, 0).'</td>'; |
|
1859 | 1859 | print '<td colspan="3">'; |
1860 | - $s = '<input type="text" class="flat maxwidthonsmartphone" name="tva_intra" id="intra_vat" maxlength="20" value="' . $object->tva_intra . '">'; |
|
1860 | + $s = '<input type="text" class="flat maxwidthonsmartphone" name="tva_intra" id="intra_vat" maxlength="20" value="'.$object->tva_intra.'">'; |
|
1861 | 1861 | |
1862 | 1862 | if (empty($conf->global->MAIN_DISABLEVATCHECK) && isInEEC($object)) { |
1863 | 1863 | $s .= ' '; |
@@ -1866,14 +1866,14 @@ discard block |
||
1866 | 1866 | print "\n"; |
1867 | 1867 | print '<script language="JavaScript" type="text/javascript">'; |
1868 | 1868 | print "function CheckVAT(a) {\n"; |
1869 | - print "newpopup('" . DOL_URL_ROOT . "/societe/checkvat/checkVatPopup.php?vatNumber='+a,'" . dol_escape_js($langs->trans("VATIntraCheckableOnEUSite")) . "',500,285);\n"; |
|
1869 | + print "newpopup('".DOL_URL_ROOT."/societe/checkvat/checkVatPopup.php?vatNumber='+a,'".dol_escape_js($langs->trans("VATIntraCheckableOnEUSite"))."',500,285);\n"; |
|
1870 | 1870 | print "}\n"; |
1871 | 1871 | print '</script>'; |
1872 | 1872 | print "\n"; |
1873 | - $s .= '<a href="#" class="hideonsmartphone" onclick="javascript: CheckVAT(document.formsoc.tva_intra.value);">' . $langs->trans("VATIntraCheck") . '</a>'; |
|
1873 | + $s .= '<a href="#" class="hideonsmartphone" onclick="javascript: CheckVAT(document.formsoc.tva_intra.value);">'.$langs->trans("VATIntraCheck").'</a>'; |
|
1874 | 1874 | $s = $form->textwithpicto($s, $langs->trans("VATIntraCheckDesc", $langs->trans("VATIntraCheck")), 1); |
1875 | 1875 | } else { |
1876 | - $s .= '<a href="' . $langs->transcountry("VATIntraCheckURL", $object->country_id) . '" class="hideonsmartphone" target="_blank">' . img_picto($langs->trans("VATIntraCheckableOnEUSite"), 'help') . '</a>'; |
|
1876 | + $s .= '<a href="'.$langs->transcountry("VATIntraCheckURL", $object->country_id).'" class="hideonsmartphone" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"), 'help').'</a>'; |
|
1877 | 1877 | } |
1878 | 1878 | } |
1879 | 1879 | print $s; |
@@ -1881,31 +1881,31 @@ discard block |
||
1881 | 1881 | print '</tr>'; |
1882 | 1882 | |
1883 | 1883 | // Type - Size |
1884 | - print '<tr><td>' . $form->editfieldkey('ThirdPartyType', 'typent_id', '', $object, 0) . '</td><td class="maxwidthonsmartphone">'; |
|
1884 | + print '<tr><td>'.$form->editfieldkey('ThirdPartyType', 'typent_id', '', $object, 0).'</td><td class="maxwidthonsmartphone">'; |
|
1885 | 1885 | print $form->selectarray("typent_id", $formcompany->typent_array(0), $object->typent_id, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT)); |
1886 | 1886 | if ($user->admin) |
1887 | 1887 | print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); |
1888 | 1888 | print '</td>'; |
1889 | - print '<td>' . $form->editfieldkey('Staff', 'effectif_id', '', $object, 0) . '</td><td class="maxwidthonsmartphone">'; |
|
1889 | + print '<td>'.$form->editfieldkey('Staff', 'effectif_id', '', $object, 0).'</td><td class="maxwidthonsmartphone">'; |
|
1890 | 1890 | print $form->selectarray("effectif_id", $formcompany->effectif_array(0), $object->effectif_id); |
1891 | 1891 | if ($user->admin) |
1892 | 1892 | print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); |
1893 | 1893 | print '</td></tr>'; |
1894 | 1894 | |
1895 | 1895 | // Juridical type |
1896 | - print '<tr><td>' . $form->editfieldkey('JuridicalStatus', 'forme_juridique_code', '', $object, 0) . '</td><td class="maxwidthonsmartphone" colspan="3">'; |
|
1896 | + print '<tr><td>'.$form->editfieldkey('JuridicalStatus', 'forme_juridique_code', '', $object, 0).'</td><td class="maxwidthonsmartphone" colspan="3">'; |
|
1897 | 1897 | print $formcompany->select_juridicalstatus($object->forme_juridique_code, $object->country_code, '', 'forme_juridique_code'); |
1898 | 1898 | print '</td></tr>'; |
1899 | 1899 | |
1900 | 1900 | // Capital |
1901 | - print '<tr><td>' . $form->editfieldkey('Capital', 'capital', '', $object, 0) . '</td>'; |
|
1901 | + print '<tr><td>'.$form->editfieldkey('Capital', 'capital', '', $object, 0).'</td>'; |
|
1902 | 1902 | print '<td colspan="3"><input type="text" name="capital" id="capital" size="10" value="'; |
1903 | 1903 | print $object->capital != '' ? dol_escape_htmltag(price($object->capital)) : ''; |
1904 | - print '"> <font class="hideonsmartphone">' . $langs->trans("Currency" . $conf->currency) . '</font></td></tr>'; |
|
1904 | + print '"> <font class="hideonsmartphone">'.$langs->trans("Currency".$conf->currency).'</font></td></tr>'; |
|
1905 | 1905 | |
1906 | 1906 | // Default language |
1907 | 1907 | if (!empty($conf->global->MAIN_MULTILANGS)) { |
1908 | - print '<tr><td>' . $form->editfieldkey('DefaultLang', 'default_lang', '', $object, 0) . '</td><td colspan="3">' . "\n"; |
|
1908 | + print '<tr><td>'.$form->editfieldkey('DefaultLang', 'default_lang', '', $object, 0).'</td><td colspan="3">'."\n"; |
|
1909 | 1909 | print $formadmin->select_language($object->default_lang, 'default_lang', 0, 0, 1); |
1910 | 1910 | print '</td>'; |
1911 | 1911 | print '</tr>'; |
@@ -1914,7 +1914,7 @@ discard block |
||
1914 | 1914 | // Incoterms |
1915 | 1915 | if (!empty($conf->incoterm->enabled)) { |
1916 | 1916 | print '<tr>'; |
1917 | - print '<td>' . $form->editfieldkey('IncotermLabel', 'incoterm_id', '', $object, 0) . '</td>'; |
|
1917 | + print '<td>'.$form->editfieldkey('IncotermLabel', 'incoterm_id', '', $object, 0).'</td>'; |
|
1918 | 1918 | print '<td colspan="3" class="maxwidthonsmartphone">'; |
1919 | 1919 | print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : '')); |
1920 | 1920 | print '</td></tr>'; |
@@ -1923,7 +1923,7 @@ discard block |
||
1923 | 1923 | // Categories |
1924 | 1924 | if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { |
1925 | 1925 | // Customer |
1926 | - print '<tr class="visibleifcustomer"><td>' . $form->editfieldkey('CustomersCategoriesShort', 'custcats', '', $object, 0) . '</td>'; |
|
1926 | + print '<tr class="visibleifcustomer"><td>'.$form->editfieldkey('CustomersCategoriesShort', 'custcats', '', $object, 0).'</td>'; |
|
1927 | 1927 | print '<td colspan="3">'; |
1928 | 1928 | $cate_arbo = $form->select_all_categories(Categorie::TYPE_CUSTOMER, null, null, null, null, 1); |
1929 | 1929 | $c = new Categorie($db); |
@@ -1936,7 +1936,7 @@ discard block |
||
1936 | 1936 | print "</td></tr>"; |
1937 | 1937 | |
1938 | 1938 | // Supplier |
1939 | - print '<tr class="visibleifsupplier"><td>' . $form->editfieldkey('SuppliersCategoriesShort', 'suppcats', '', $object, 0) . '</td>'; |
|
1939 | + print '<tr class="visibleifsupplier"><td>'.$form->editfieldkey('SuppliersCategoriesShort', 'suppcats', '', $object, 0).'</td>'; |
|
1940 | 1940 | print '<td colspan="3">'; |
1941 | 1941 | $cate_arbo = $form->select_all_categories(Categorie::TYPE_SUPPLIER, null, null, null, null, 1); |
1942 | 1942 | $c = new Categorie($db); |
@@ -1952,7 +1952,7 @@ discard block |
||
1952 | 1952 | // Multicurrency |
1953 | 1953 | if (!empty($conf->multicurrency->enabled)) { |
1954 | 1954 | print '<tr>'; |
1955 | - print '<td>' . $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0) . '</td>'; |
|
1955 | + print '<td>'.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).'</td>'; |
|
1956 | 1956 | print '<td colspan="3" class="maxwidthonsmartphone">'; |
1957 | 1957 | print $form->selectMultiCurrency(($object->multicurrency_code ? $object->multicurrency_code : $conf->currency), 'multicurrency_code', 1); |
1958 | 1958 | print '</td></tr>'; |
@@ -1960,7 +1960,7 @@ discard block |
||
1960 | 1960 | |
1961 | 1961 | // Other attributes |
1962 | 1962 | $parameters = array('colspan' => ' colspan="3"', 'colspanvalue' => '3'); |
1963 | - $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
|
1963 | + $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
|
1964 | 1964 | print $hookmanager->resPrint; |
1965 | 1965 | if (empty($reshook)) { |
1966 | 1966 | print $object->showOptionals($extrafields, 'edit'); |
@@ -1968,15 +1968,15 @@ discard block |
||
1968 | 1968 | |
1969 | 1969 | // Webservices url/key |
1970 | 1970 | if (!empty($conf->syncsupplierwebservices->enabled)) { |
1971 | - print '<tr><td>' . $form->editfieldkey('WebServiceURL', 'webservices_url', '', $object, 0) . '</td>'; |
|
1972 | - print '<td><input type="text" name="webservices_url" id="webservices_url" size="32" value="' . $object->webservices_url . '"></td>'; |
|
1973 | - print '<td>' . $form->editfieldkey('WebServiceKey', 'webservices_key', '', $object, 0) . '</td>'; |
|
1974 | - print '<td><input type="text" name="webservices_key" id="webservices_key" size="32" value="' . $object->webservices_key . '"></td></tr>'; |
|
1971 | + print '<tr><td>'.$form->editfieldkey('WebServiceURL', 'webservices_url', '', $object, 0).'</td>'; |
|
1972 | + print '<td><input type="text" name="webservices_url" id="webservices_url" size="32" value="'.$object->webservices_url.'"></td>'; |
|
1973 | + print '<td>'.$form->editfieldkey('WebServiceKey', 'webservices_key', '', $object, 0).'</td>'; |
|
1974 | + print '<td><input type="text" name="webservices_key" id="webservices_key" size="32" value="'.$object->webservices_key.'"></td></tr>'; |
|
1975 | 1975 | } |
1976 | 1976 | |
1977 | 1977 | // Logo |
1978 | 1978 | print '<tr class="hideonsmartphone">'; |
1979 | - print '<td>' . $form->editfieldkey('Logo', 'photoinput', '', $object, 0) . '</td>'; |
|
1979 | + print '<td>'.$form->editfieldkey('Logo', 'photoinput', '', $object, 0).'</td>'; |
|
1980 | 1980 | print '<td colspan="3">'; |
1981 | 1981 | if ($object->logo) |
1982 | 1982 | print $form->showphoto('societe', $object); |
@@ -1986,7 +1986,7 @@ discard block |
||
1986 | 1986 | print "<br>\n"; |
1987 | 1987 | print '<table class="nobordernopadding">'; |
1988 | 1988 | if ($object->logo) |
1989 | - print '<tr><td><input type="checkbox" class="flat photodelete" name="deletephoto" id="photodelete"> ' . $langs->trans("Delete") . '<br><br></td></tr>'; |
|
1989 | + print '<tr><td><input type="checkbox" class="flat photodelete" name="deletephoto" id="photodelete"> '.$langs->trans("Delete").'<br><br></td></tr>'; |
|
1990 | 1990 | //print '<tr><td>'.$langs->trans("PhotoFile").'</td></tr>'; |
1991 | 1991 | print '<tr><td><input type="file" class="flat" name="photo" id="photoinput"></td></tr>'; |
1992 | 1992 | print '</table>'; |
@@ -1996,7 +1996,7 @@ discard block |
||
1996 | 1996 | |
1997 | 1997 | // Assign sale representative |
1998 | 1998 | print '<tr>'; |
1999 | - print '<td>' . $form->editfieldkey('AllocateCommercial', 'commercial_id', '', $object, 0) . '</td>'; |
|
1999 | + print '<td>'.$form->editfieldkey('AllocateCommercial', 'commercial_id', '', $object, 0).'</td>'; |
|
2000 | 2000 | print '<td colspan="3" class="maxwidthonsmartphone">'; |
2001 | 2001 | $userlist = $form->select_dolusers('', '', 0, null, 0, '', '', 0, 0, 0, '', 0, '', '', 0, 1); |
2002 | 2002 | $arrayselected = GETPOST('commercial', 'array'); |
@@ -2011,9 +2011,9 @@ discard block |
||
2011 | 2011 | dol_fiche_end(); |
2012 | 2012 | |
2013 | 2013 | print '<div align="center">'; |
2014 | - print '<input type="submit" class="button" name="save" value="' . $langs->trans("Save") . '">'; |
|
2014 | + print '<input type="submit" class="button" name="save" value="'.$langs->trans("Save").'">'; |
|
2015 | 2015 | print ' '; |
2016 | - print '<input type="submit" class="button" name="cancel" value="' . $langs->trans("Cancel") . '">'; |
|
2016 | + print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">'; |
|
2017 | 2017 | print '</div>'; |
2018 | 2018 | |
2019 | 2019 | print '</form>'; |
@@ -2035,7 +2035,7 @@ discard block |
||
2035 | 2035 | |
2036 | 2036 | // Confirm delete third party |
2037 | 2037 | if ($action == 'delete' || ($conf->use_javascript_ajax && empty($conf->dol_use_jmobile))) { |
2038 | - print $form->formconfirm($_SERVER["PHP_SELF"] . "?socid=" . $object->id, $langs->trans("DeleteACompany"), $langs->trans("ConfirmDeleteCompany"), "confirm_delete", '', 0, "action-delete"); |
|
2038 | + print $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$object->id, $langs->trans("DeleteACompany"), $langs->trans("ConfirmDeleteCompany"), "confirm_delete", '', 0, "action-delete"); |
|
2039 | 2039 | } |
2040 | 2040 | |
2041 | 2041 | if ($action == 'merge') { |
@@ -2044,16 +2044,16 @@ discard block |
||
2044 | 2044 | 'name' => 'soc_origin', |
2045 | 2045 | 'label' => $langs->trans('MergeOriginThirdparty'), |
2046 | 2046 | 'type' => 'other', |
2047 | - 'value' => $form->select_company('', 'soc_origin', 's.rowid != ' . $object->id, 'SelectThirdParty', 0, 0, array(), 0, 'minwidth200') |
|
2047 | + 'value' => $form->select_company('', 'soc_origin', 's.rowid != '.$object->id, 'SelectThirdParty', 0, 0, array(), 0, 'minwidth200') |
|
2048 | 2048 | ) |
2049 | 2049 | ); |
2050 | 2050 | |
2051 | - print $form->formconfirm($_SERVER["PHP_SELF"] . "?socid=" . $object->id, $langs->trans("MergeThirdparties"), $langs->trans("ConfirmMergeThirdparties"), "confirm_merge", $formquestion, 'no', 1, 250); |
|
2051 | + print $form->formconfirm($_SERVER["PHP_SELF"]."?socid=".$object->id, $langs->trans("MergeThirdparties"), $langs->trans("ConfirmMergeThirdparties"), "confirm_merge", $formquestion, 'no', 1, 250); |
|
2052 | 2052 | } |
2053 | 2053 | |
2054 | 2054 | dol_htmloutput_mesg(is_numeric($error) ? '' : $error, $errors, 'error'); |
2055 | 2055 | |
2056 | - $linkback = '<a href="' . DOL_URL_ROOT . '/societe/list.php?restore_lastsearch_values=1">' . $langs->trans("BackToList") . '</a>'; |
|
2056 | + $linkback = '<a href="'.DOL_URL_ROOT.'/societe/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
2057 | 2057 | |
2058 | 2058 | dol_banner_tab($object, 'socid', $linkback, ($user->societe_id ? 0 : 1), 'rowid', 'nom'); |
2059 | 2059 | |
@@ -2065,20 +2065,20 @@ discard block |
||
2065 | 2065 | print '<table class="border tableforfield" width="100%">'; |
2066 | 2066 | |
2067 | 2067 | // Prospect/Customer |
2068 | - print '<tr><td class="titlefield">' . $langs->trans('ProspectCustomer') . '</td><td>'; |
|
2068 | + print '<tr><td class="titlefield">'.$langs->trans('ProspectCustomer').'</td><td>'; |
|
2069 | 2069 | print $object->getLibCustProspStatut(); |
2070 | 2070 | print '</td></tr>'; |
2071 | 2071 | |
2072 | 2072 | // Supplier |
2073 | 2073 | if (!empty($conf->fournisseur->enabled) || !empty($conf->supplier_proposal->enabled)) { |
2074 | - print '<tr><td>' . $langs->trans('Supplier') . '</td><td>'; |
|
2074 | + print '<tr><td>'.$langs->trans('Supplier').'</td><td>'; |
|
2075 | 2075 | print yn($object->fournisseur); |
2076 | 2076 | print '</td></tr>'; |
2077 | 2077 | } |
2078 | 2078 | |
2079 | 2079 | // Prefix |
2080 | 2080 | if (!empty($conf->global->SOCIETE_USEPREFIX)) { // Old not used prefix field |
2081 | - print '<tr><td>' . $langs->trans('Prefix') . '</td><td>' . $object->prefix_comm . '</td>'; |
|
2081 | + print '<tr><td>'.$langs->trans('Prefix').'</td><td>'.$object->prefix_comm.'</td>'; |
|
2082 | 2082 | print $htmllogobar; |
2083 | 2083 | $htmllogobar = ''; |
2084 | 2084 | print '</tr>'; |
@@ -2087,10 +2087,10 @@ discard block |
||
2087 | 2087 | // Customer code |
2088 | 2088 | if ($object->client) { |
2089 | 2089 | print '<tr><td>'; |
2090 | - print $langs->trans('CustomerCode') . '</td><td>'; |
|
2090 | + print $langs->trans('CustomerCode').'</td><td>'; |
|
2091 | 2091 | print $object->code_client; |
2092 | 2092 | if ($object->check_codeclient() <> 0) |
2093 | - print ' <font class="error">(' . $langs->trans("WrongCustomerCode") . ')</font>'; |
|
2093 | + print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>'; |
|
2094 | 2094 | print '</td>'; |
2095 | 2095 | print $htmllogobar; |
2096 | 2096 | $htmllogobar = ''; |
@@ -2100,10 +2100,10 @@ discard block |
||
2100 | 2100 | // Supplier code |
2101 | 2101 | if (!empty($conf->fournisseur->enabled) && $object->fournisseur && !empty($user->rights->fournisseur->lire)) { |
2102 | 2102 | print '<tr><td>'; |
2103 | - print $langs->trans('SupplierCode') . '</td><td>'; |
|
2103 | + print $langs->trans('SupplierCode').'</td><td>'; |
|
2104 | 2104 | print $object->code_fournisseur; |
2105 | 2105 | if ($object->check_codefournisseur() <> 0) |
2106 | - print ' <font class="error">(' . $langs->trans("WrongSupplierCode") . ')</font>'; |
|
2106 | + print ' <font class="error">('.$langs->trans("WrongSupplierCode").')</font>'; |
|
2107 | 2107 | print '</td>'; |
2108 | 2108 | print $htmllogobar; |
2109 | 2109 | $htmllogobar = ''; |
@@ -2113,7 +2113,7 @@ discard block |
||
2113 | 2113 | // Barcode |
2114 | 2114 | if (!empty($conf->barcode->enabled)) { |
2115 | 2115 | print '<tr><td>'; |
2116 | - print $langs->trans('Gencod') . '</td><td>' . $object->barcode; |
|
2116 | + print $langs->trans('Gencod').'</td><td>'.$object->barcode; |
|
2117 | 2117 | print '</td>'; |
2118 | 2118 | if ($htmllogobar) |
2119 | 2119 | $htmllogobar .= $form->showbarcode($object); |
@@ -2126,18 +2126,18 @@ discard block |
||
2126 | 2126 | $i = 1; |
2127 | 2127 | $j = 0; |
2128 | 2128 | while ($i <= 6) { |
2129 | - $idprof = $langs->transcountry('ProfId' . $i, $object->country_code); |
|
2129 | + $idprof = $langs->transcountry('ProfId'.$i, $object->country_code); |
|
2130 | 2130 | if ($idprof != '-') { |
2131 | 2131 | //if (($j % 2) == 0) print '<tr>'; |
2132 | 2132 | print '<tr>'; |
2133 | - print '<td>' . $idprof . '</td><td>'; |
|
2134 | - $key = 'idprof' . $i; |
|
2133 | + print '<td>'.$idprof.'</td><td>'; |
|
2134 | + $key = 'idprof'.$i; |
|
2135 | 2135 | print $object->$key; |
2136 | 2136 | if ($object->$key) { |
2137 | 2137 | if ($object->id_prof_check($i, $object) > 0) |
2138 | - print ' ' . $object->id_prof_url($i, $object); |
|
2138 | + print ' '.$object->id_prof_url($i, $object); |
|
2139 | 2139 | else |
2140 | - print ' <font class="error">(' . $langs->trans("ErrorWrongValue") . ')</font>'; |
|
2140 | + print ' <font class="error">('.$langs->trans("ErrorWrongValue").')</font>'; |
|
2141 | 2141 | } |
2142 | 2142 | print '</td>'; |
2143 | 2143 | //if (($j % 2) == 1) print '</tr>'; |
@@ -2164,74 +2164,74 @@ discard block |
||
2164 | 2164 | // Local Taxes |
2165 | 2165 | if ($object->fournisseur || $mysoc->country_code == 'ES') { |
2166 | 2166 | if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") { |
2167 | - print '<tr><td>' . $langs->transcountry("LocalTax1IsUsed", $mysoc->country_code) . '</td><td>'; |
|
2167 | + print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).'</td><td>'; |
|
2168 | 2168 | print yn($object->localtax1_assuj); |
2169 | - print '</td></tr><tr><td>' . $langs->transcountry("LocalTax2IsUsed", $mysoc->country_code) . '</td><td>'; |
|
2169 | + print '</td></tr><tr><td>'.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).'</td><td>'; |
|
2170 | 2170 | print yn($object->localtax2_assuj); |
2171 | 2171 | print '</td></tr>'; |
2172 | 2172 | |
2173 | 2173 | if ($object->localtax1_assuj == "1" && (!isOnlyOneLocalTax(1))) { |
2174 | - print '<form method="post" action="' . $_SERVER['PHP_SELF'] . '?socid=' . $object->id . '">'; |
|
2174 | + print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?socid='.$object->id.'">'; |
|
2175 | 2175 | print '<input type="hidden" name="action" value="set_localtax1">'; |
2176 | - print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; |
|
2177 | - print '<tr><td>' . $langs->transcountry("TypeLocaltax1", $mysoc->country_code) . ' <a href="' . $_SERVER["PHP_SELF"] . '?action=editRE&socid=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('Edit'), 1) . '</td>'; |
|
2176 | + print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; |
|
2177 | + print '<tr><td>'.$langs->transcountry("TypeLocaltax1", $mysoc->country_code).' <a href="'.$_SERVER["PHP_SELF"].'?action=editRE&socid='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).'</td>'; |
|
2178 | 2178 | if ($action == 'editRE') { |
2179 | 2179 | print '<td align="left">'; |
2180 | 2180 | $formcompany->select_localtax(1, $object->localtax1_value, "lt1"); |
2181 | - print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '"></td>'; |
|
2181 | + print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>'; |
|
2182 | 2182 | } else { |
2183 | - print '<td>' . $object->localtax1_value . '</td>'; |
|
2183 | + print '<td>'.$object->localtax1_value.'</td>'; |
|
2184 | 2184 | } |
2185 | 2185 | print '</tr></form>'; |
2186 | 2186 | } |
2187 | 2187 | if ($object->localtax2_assuj == "1" && (!isOnlyOneLocalTax(2))) { |
2188 | - print '<form method="post" action="' . $_SERVER['PHP_SELF'] . '?socid=' . $object->id . '">'; |
|
2188 | + print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?socid='.$object->id.'">'; |
|
2189 | 2189 | print '<input type="hidden" name="action" value="set_localtax2">'; |
2190 | - print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; |
|
2191 | - print '<tr><td>' . $langs->transcountry("TypeLocaltax2", $mysoc->country_code) . '<a href="' . $_SERVER["PHP_SELF"] . '?action=editIRPF&socid=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('Edit'), 1) . '</td>'; |
|
2190 | + print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; |
|
2191 | + print '<tr><td>'.$langs->transcountry("TypeLocaltax2", $mysoc->country_code).'<a href="'.$_SERVER["PHP_SELF"].'?action=editIRPF&socid='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).'</td>'; |
|
2192 | 2192 | if ($action == 'editIRPF') { |
2193 | 2193 | print '<td align="left">'; |
2194 | 2194 | $formcompany->select_localtax(2, $object->localtax2_value, "lt2"); |
2195 | - print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '"></td>'; |
|
2195 | + print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>'; |
|
2196 | 2196 | } else { |
2197 | - print '<td>' . $object->localtax2_value . '</td>'; |
|
2197 | + print '<td>'.$object->localtax2_value.'</td>'; |
|
2198 | 2198 | } |
2199 | 2199 | print '</tr></form>'; |
2200 | 2200 | } |
2201 | 2201 | } elseif ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj != "1") { |
2202 | - print '<tr><td>' . $langs->transcountry("LocalTax1IsUsed", $mysoc->country_code) . '</td><td>'; |
|
2202 | + print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).'</td><td>'; |
|
2203 | 2203 | print yn($object->localtax1_assuj); |
2204 | 2204 | print '</td></tr>'; |
2205 | 2205 | if ($object->localtax1_assuj == "1" && (!isOnlyOneLocalTax(1))) { |
2206 | - print '<form method="post" action="' . $_SERVER['PHP_SELF'] . '?socid=' . $object->id . '">'; |
|
2206 | + print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?socid='.$object->id.'">'; |
|
2207 | 2207 | print '<input type="hidden" name="action" value="set_localtax1">'; |
2208 | - print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; |
|
2209 | - print '<tr><td> ' . $langs->transcountry("TypeLocaltax1", $mysoc->country_code) . '<a href="' . $_SERVER["PHP_SELF"] . '?action=editRE&socid=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('Edit'), 1) . '</td>'; |
|
2208 | + print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; |
|
2209 | + print '<tr><td> '.$langs->transcountry("TypeLocaltax1", $mysoc->country_code).'<a href="'.$_SERVER["PHP_SELF"].'?action=editRE&socid='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).'</td>'; |
|
2210 | 2210 | if ($action == 'editRE') { |
2211 | 2211 | print '<td align="left">'; |
2212 | 2212 | $formcompany->select_localtax(1, $object->localtax1_value, "lt1"); |
2213 | - print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '"></td>'; |
|
2213 | + print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>'; |
|
2214 | 2214 | } else { |
2215 | - print '<td>' . $object->localtax1_value . '</td>'; |
|
2215 | + print '<td>'.$object->localtax1_value.'</td>'; |
|
2216 | 2216 | } |
2217 | 2217 | print '</tr></form>'; |
2218 | 2218 | } |
2219 | 2219 | } elseif ($mysoc->localtax2_assuj == "1" && $mysoc->localtax1_assuj != "1") { |
2220 | - print '<tr><td>' . $langs->transcountry("LocalTax2IsUsed", $mysoc->country_code) . '</td><td>'; |
|
2220 | + print '<tr><td>'.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).'</td><td>'; |
|
2221 | 2221 | print yn($object->localtax2_assuj); |
2222 | 2222 | print '</td></tr>'; |
2223 | 2223 | if ($object->localtax2_assuj == "1" && (!isOnlyOneLocalTax(2))) { |
2224 | 2224 | |
2225 | - print '<form method="post" action="' . $_SERVER['PHP_SELF'] . '?socid=' . $object->id . '">'; |
|
2225 | + print '<form method="post" action="'.$_SERVER['PHP_SELF'].'?socid='.$object->id.'">'; |
|
2226 | 2226 | print '<input type="hidden" name="action" value="set_localtax2">'; |
2227 | - print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">'; |
|
2228 | - print '<tr><td> ' . $langs->transcountry("TypeLocaltax2", $mysoc->country_code) . ' <a href="' . $_SERVER["PHP_SELF"] . '?action=editIRPF&socid=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('Edit'), 1) . '</td>'; |
|
2227 | + print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; |
|
2228 | + print '<tr><td> '.$langs->transcountry("TypeLocaltax2", $mysoc->country_code).' <a href="'.$_SERVER["PHP_SELF"].'?action=editIRPF&socid='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).'</td>'; |
|
2229 | 2229 | if ($action == 'editIRPF') { |
2230 | 2230 | print '<td align="left">'; |
2231 | 2231 | $formcompany->select_localtax(2, $object->localtax2_value, "lt2"); |
2232 | - print '<input type="submit" class="button" value="' . $langs->trans("Modify") . '"></td>'; |
|
2232 | + print '<input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>'; |
|
2233 | 2233 | } else { |
2234 | - print '<td>' . $object->localtax2_value . '</td>'; |
|
2234 | + print '<td>'.$object->localtax2_value.'</td>'; |
|
2235 | 2235 | } |
2236 | 2236 | print '</tr></form>'; |
2237 | 2237 | } |
@@ -2240,11 +2240,11 @@ discard block |
||
2240 | 2240 | |
2241 | 2241 | // Sale tax code (VAT code) |
2242 | 2242 | print '<tr>'; |
2243 | - print '<td class="nowrap">' . $langs->trans('VATIntra') . '</td><td>'; |
|
2243 | + print '<td class="nowrap">'.$langs->trans('VATIntra').'</td><td>'; |
|
2244 | 2244 | if ($object->tva_intra) { |
2245 | 2245 | $s = ''; |
2246 | 2246 | $s .= $object->tva_intra; |
2247 | - $s .= '<input type="hidden" id="tva_intra" name="tva_intra" maxlength="20" value="' . $object->tva_intra . '">'; |
|
2247 | + $s .= '<input type="hidden" id="tva_intra" name="tva_intra" maxlength="20" value="'.$object->tva_intra.'">'; |
|
2248 | 2248 | |
2249 | 2249 | if (empty($conf->global->MAIN_DISABLEVATCHECK) && isInEEC($object)) { |
2250 | 2250 | $s .= ' '; |
@@ -2253,14 +2253,14 @@ discard block |
||
2253 | 2253 | print "\n"; |
2254 | 2254 | print '<script language="JavaScript" type="text/javascript">'; |
2255 | 2255 | print "function CheckVAT(a) {\n"; |
2256 | - print "newpopup('" . DOL_URL_ROOT . "/societe/checkvat/checkVatPopup.php?vatNumber='+a,'" . dol_escape_js($langs->trans("VATIntraCheckableOnEUSite")) . "',500,285);\n"; |
|
2256 | + print "newpopup('".DOL_URL_ROOT."/societe/checkvat/checkVatPopup.php?vatNumber='+a,'".dol_escape_js($langs->trans("VATIntraCheckableOnEUSite"))."',500,285);\n"; |
|
2257 | 2257 | print "}\n"; |
2258 | 2258 | print '</script>'; |
2259 | 2259 | print "\n"; |
2260 | - $s .= '<a href="#" class="hideonsmartphone" onclick="javascript: CheckVAT( $(\'#tva_intra\').val() );">' . $langs->trans("VATIntraCheck") . '</a>'; |
|
2260 | + $s .= '<a href="#" class="hideonsmartphone" onclick="javascript: CheckVAT( $(\'#tva_intra\').val() );">'.$langs->trans("VATIntraCheck").'</a>'; |
|
2261 | 2261 | $s = $form->textwithpicto($s, $langs->trans("VATIntraCheckDesc", $langs->trans("VATIntraCheck")), 1); |
2262 | 2262 | } else { |
2263 | - $s .= '<a href="' . $langs->transcountry("VATIntraCheckURL", $object->country_id) . '" class="hideonsmartphone" target="_blank">' . img_picto($langs->trans("VATIntraCheckableOnEUSite"), 'help') . '</a>'; |
|
2263 | + $s .= '<a href="'.$langs->transcountry("VATIntraCheckURL", $object->country_id).'" class="hideonsmartphone" target="_blank">'.img_picto($langs->trans("VATIntraCheckableOnEUSite"), 'help').'</a>'; |
|
2264 | 2264 | } |
2265 | 2265 | } |
2266 | 2266 | print $s; |
@@ -2273,8 +2273,8 @@ discard block |
||
2273 | 2273 | // Type + Staff |
2274 | 2274 | $arr = $formcompany->typent_array(1); |
2275 | 2275 | $object->typent = $arr[$object->typent_code]; |
2276 | - print '<tr><td>' . $langs->trans("ThirdPartyType") . '</td><td>' . $object->typent . '</td>'; |
|
2277 | - print '<tr><td>' . $langs->trans("Staff") . '</td><td>' . $object->effectif . '</td></tr>'; |
|
2276 | + print '<tr><td>'.$langs->trans("ThirdPartyType").'</td><td>'.$object->typent.'</td>'; |
|
2277 | + print '<tr><td>'.$langs->trans("Staff").'</td><td>'.$object->effectif.'</td></tr>'; |
|
2278 | 2278 | |
2279 | 2279 | print '</table>'; |
2280 | 2280 | |
@@ -2288,7 +2288,7 @@ discard block |
||
2288 | 2288 | if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { |
2289 | 2289 | // Customer |
2290 | 2290 | if ($object->prospect || $object->client || (!$object->fournisseur && !empty($conf->global->THIRDPARTY_CAN_HAVE_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT_SUPPLIER))) { |
2291 | - print '<tr><td>' . $langs->trans("CustomersCategoriesShort") . '</td>'; |
|
2291 | + print '<tr><td>'.$langs->trans("CustomersCategoriesShort").'</td>'; |
|
2292 | 2292 | print '<td>'; |
2293 | 2293 | print $form->showCategories($object->id, 'customer', 1); |
2294 | 2294 | print "</td></tr>"; |
@@ -2296,7 +2296,7 @@ discard block |
||
2296 | 2296 | |
2297 | 2297 | // Supplier |
2298 | 2298 | if ($object->fournisseur) { |
2299 | - print '<tr><td>' . $langs->trans("SuppliersCategoriesShort") . '</td>'; |
|
2299 | + print '<tr><td>'.$langs->trans("SuppliersCategoriesShort").'</td>'; |
|
2300 | 2300 | print '<td>'; |
2301 | 2301 | print $form->showCategories($object->id, 'supplier', 1); |
2302 | 2302 | print "</td></tr>"; |
@@ -2304,10 +2304,10 @@ discard block |
||
2304 | 2304 | } |
2305 | 2305 | |
2306 | 2306 | // Legal |
2307 | - print '<tr><td class="titlefield">' . $langs->trans('JuridicalStatus') . '</td><td>' . $object->forme_juridique . '</td></tr>'; |
|
2307 | + print '<tr><td class="titlefield">'.$langs->trans('JuridicalStatus').'</td><td>'.$object->forme_juridique.'</td></tr>'; |
|
2308 | 2308 | |
2309 | 2309 | // Capital |
2310 | - print '<tr><td>' . $langs->trans('Capital') . '</td><td>'; |
|
2310 | + print '<tr><td>'.$langs->trans('Capital').'</td><td>'; |
|
2311 | 2311 | if ($object->capital) |
2312 | 2312 | print price($object->capital, '', $langs, 0, -1, -1, $conf->currency); |
2313 | 2313 | else |
@@ -2316,12 +2316,12 @@ discard block |
||
2316 | 2316 | |
2317 | 2317 | // Default language |
2318 | 2318 | if (!empty($conf->global->MAIN_MULTILANGS)) { |
2319 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php'; |
|
2320 | - print '<tr><td>' . $langs->trans("DefaultLang") . '</td><td>'; |
|
2319 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; |
|
2320 | + print '<tr><td>'.$langs->trans("DefaultLang").'</td><td>'; |
|
2321 | 2321 | //$s=picto_from_langcode($object->default_lang); |
2322 | 2322 | //print ($s?$s.' ':''); |
2323 | 2323 | $langs->load("languages"); |
2324 | - $labellang = ($object->default_lang ? $langs->trans('Language_' . $object->default_lang) : ''); |
|
2324 | + $labellang = ($object->default_lang ? $langs->trans('Language_'.$object->default_lang) : ''); |
|
2325 | 2325 | print $labellang; |
2326 | 2326 | print '</td></tr>'; |
2327 | 2327 | } |
@@ -2333,7 +2333,7 @@ discard block |
||
2333 | 2333 | print $langs->trans('IncotermLabel'); |
2334 | 2334 | print '<td><td align="right">'; |
2335 | 2335 | if ($user->rights->societe->creer) |
2336 | - print '<a href="' . DOL_URL_ROOT . '/societe/card.php?socid=' . $object->id . '&action=editincoterm">' . img_edit('', 1) . '</a>'; |
|
2336 | + print '<a href="'.DOL_URL_ROOT.'/societe/card.php?socid='.$object->id.'&action=editincoterm">'.img_edit('', 1).'</a>'; |
|
2337 | 2337 | else |
2338 | 2338 | print ' '; |
2339 | 2339 | print '</td></tr></table>'; |
@@ -2342,7 +2342,7 @@ discard block |
||
2342 | 2342 | if ($action != 'editincoterm') { |
2343 | 2343 | print $form->textwithpicto($object->display_incoterms(), $object->libelle_incoterms, 1); |
2344 | 2344 | } else { |
2345 | - print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'] . '?socid=' . $object->id); |
|
2345 | + print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'].'?socid='.$object->id); |
|
2346 | 2346 | } |
2347 | 2347 | print '</td></tr>'; |
2348 | 2348 | } |
@@ -2350,7 +2350,7 @@ discard block |
||
2350 | 2350 | // Multicurrency |
2351 | 2351 | if (!empty($conf->multicurrency->enabled)) { |
2352 | 2352 | print '<tr>'; |
2353 | - print '<td>' . $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0) . '</td>'; |
|
2353 | + print '<td>'.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).'</td>'; |
|
2354 | 2354 | print '<td>'; |
2355 | 2355 | print !empty($object->multicurrency_code) ? currency_name($object->multicurrency_code, 1) : ''; |
2356 | 2356 | print '</td></tr>'; |
@@ -2358,7 +2358,7 @@ discard block |
||
2358 | 2358 | |
2359 | 2359 | // Other attributes |
2360 | 2360 | $parameters = array('socid' => $socid, 'colspan' => ' colspan="3"', 'colspanvalue' => '3'); |
2361 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; |
|
2361 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; |
|
2362 | 2362 | |
2363 | 2363 | // Parent company |
2364 | 2364 | if (empty($conf->global->SOCIETE_DISABLE_PARENTCOMPANY)) { |
@@ -2368,25 +2368,25 @@ discard block |
||
2368 | 2368 | print $langs->trans('ParentCompany'); |
2369 | 2369 | print '</td>'; |
2370 | 2370 | if ($action != 'editparentcompany') |
2371 | - print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editparentcompany&socid=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('Edit'), 1) . '</a></td>'; |
|
2371 | + print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editparentcompany&socid='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('Edit'), 1).'</a></td>'; |
|
2372 | 2372 | print '</tr></table>'; |
2373 | 2373 | print '</td><td colspan="3">'; |
2374 | 2374 | if ($action == 'editparentcompany') { |
2375 | - $form->form_thirdparty($_SERVER['PHP_SELF'] . '?socid=' . $object->id, $object->parent, 'editparentcompany', 's.rowid <> ' . $object->id, 1); |
|
2375 | + $form->form_thirdparty($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->parent, 'editparentcompany', 's.rowid <> '.$object->id, 1); |
|
2376 | 2376 | } else { |
2377 | - $form->form_thirdparty($_SERVER['PHP_SELF'] . '?socid=' . $object->id, $object->parent, 'none', 's.rowid <> ' . $object->id, 1); |
|
2377 | + $form->form_thirdparty($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->parent, 'none', 's.rowid <> '.$object->id, 1); |
|
2378 | 2378 | } |
2379 | 2379 | print '</td>'; |
2380 | 2380 | print '</tr>'; |
2381 | 2381 | } |
2382 | 2382 | |
2383 | 2383 | // Sales representative |
2384 | - include DOL_DOCUMENT_ROOT . '/societe/tpl/linesalesrepresentative.tpl.php'; |
|
2384 | + include DOL_DOCUMENT_ROOT.'/societe/tpl/linesalesrepresentative.tpl.php'; |
|
2385 | 2385 | |
2386 | 2386 | // Module Adherent |
2387 | 2387 | if (!empty($conf->adherent->enabled)) { |
2388 | 2388 | $langs->load("members"); |
2389 | - print '<tr><td>' . $langs->trans("LinkedToDolibarrMember") . '</td>'; |
|
2389 | + print '<tr><td>'.$langs->trans("LinkedToDolibarrMember").'</td>'; |
|
2390 | 2390 | print '<td colspan="3">'; |
2391 | 2391 | $adh = new Adherent($db); |
2392 | 2392 | $result = $adh->fetch('', '', $object->id); |
@@ -2394,7 +2394,7 @@ discard block |
||
2394 | 2394 | $adh->ref = $adh->getFullName($langs); |
2395 | 2395 | print $adh->getNomUrl(1); |
2396 | 2396 | } else { |
2397 | - print '<span class="opacitymedium">' . $langs->trans("ThirdpartyNotLinkedToMember") . '</span>'; |
|
2397 | + print '<span class="opacitymedium">'.$langs->trans("ThirdpartyNotLinkedToMember").'</span>'; |
|
2398 | 2398 | } |
2399 | 2399 | print '</td>'; |
2400 | 2400 | print "</tr>\n"; |
@@ -2402,8 +2402,8 @@ discard block |
||
2402 | 2402 | |
2403 | 2403 | // Webservices url/key |
2404 | 2404 | if (!empty($conf->syncsupplierwebservices->enabled)) { |
2405 | - print '<tr><td>' . $langs->trans("WebServiceURL") . '</td><td>' . dol_print_url($object->webservices_url) . '</td>'; |
|
2406 | - print '<td class="nowrap">' . $langs->trans('WebServiceKey') . '</td><td>' . $object->webservices_key . '</td></tr>'; |
|
2405 | + print '<tr><td>'.$langs->trans("WebServiceURL").'</td><td>'.dol_print_url($object->webservices_url).'</td>'; |
|
2406 | + print '<td class="nowrap">'.$langs->trans('WebServiceKey').'</td><td>'.$object->webservices_key.'</td></tr>'; |
|
2407 | 2407 | } |
2408 | 2408 | |
2409 | 2409 | print '</table>'; |
@@ -2419,10 +2419,10 @@ discard block |
||
2419 | 2419 | * Actions |
2420 | 2420 | */ |
2421 | 2421 | if ($action != 'presend') { |
2422 | - print '<div class="tabsAction">' . "\n"; |
|
2422 | + print '<div class="tabsAction">'."\n"; |
|
2423 | 2423 | |
2424 | 2424 | $parameters = array(); |
2425 | - $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
|
2425 | + $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
|
2426 | 2426 | if (empty($reshook)) { |
2427 | 2427 | $at_least_one_email_contact = false; |
2428 | 2428 | $TContact = $object->contact_array_objects(); |
@@ -2435,30 +2435,30 @@ discard block |
||
2435 | 2435 | |
2436 | 2436 | if (!empty($object->email) || $at_least_one_email_contact) { |
2437 | 2437 | $langs->load("mails"); |
2438 | - print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?socid=' . $object->id . '&action=presend&mode=init#formmailbeforetitle">' . $langs->trans('SendMail') . '</a></div>'; |
|
2438 | + print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?socid='.$object->id.'&action=presend&mode=init#formmailbeforetitle">'.$langs->trans('SendMail').'</a></div>'; |
|
2439 | 2439 | } else { |
2440 | 2440 | $langs->load("mails"); |
2441 | - print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="' . dol_escape_htmltag($langs->trans("NoEMail")) . '">' . $langs->trans('SendMail') . '</a></div>'; |
|
2441 | + print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NoEMail")).'">'.$langs->trans('SendMail').'</a></div>'; |
|
2442 | 2442 | } |
2443 | 2443 | |
2444 | 2444 | if ($user->rights->societe->creer) { |
2445 | - print '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?socid=' . $object->id . '&action=edit">' . $langs->trans("Modify") . '</a></div>' . "\n"; |
|
2445 | + print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER["PHP_SELF"].'?socid='.$object->id.'&action=edit">'.$langs->trans("Modify").'</a></div>'."\n"; |
|
2446 | 2446 | } |
2447 | 2447 | |
2448 | 2448 | if ($user->rights->societe->supprimer) { |
2449 | - print '<div class="inline-block divButAction"><a class="butActionDelete" href="card.php?action=merge&socid=' . $object->id . '" title="' . dol_escape_htmltag($langs->trans("MergeThirdparties")) . '">' . $langs->trans('Merge') . '</a></div>'; |
|
2449 | + print '<div class="inline-block divButAction"><a class="butActionDelete" href="card.php?action=merge&socid='.$object->id.'" title="'.dol_escape_htmltag($langs->trans("MergeThirdparties")).'">'.$langs->trans('Merge').'</a></div>'; |
|
2450 | 2450 | } |
2451 | 2451 | |
2452 | 2452 | if ($user->rights->societe->supprimer) { |
2453 | 2453 | if ($conf->use_javascript_ajax && empty($conf->dol_use_jmobile)) { // We can't use preloaded confirm form with jmobile |
2454 | - print '<div class="inline-block divButAction"><span id="action-delete" class="butActionDelete">' . $langs->trans('Delete') . '</span></div>' . "\n"; |
|
2454 | + print '<div class="inline-block divButAction"><span id="action-delete" class="butActionDelete">'.$langs->trans('Delete').'</span></div>'."\n"; |
|
2455 | 2455 | } else { |
2456 | - print '<div class="inline-block divButAction"><a class="butActionDelete" href="' . $_SERVER["PHP_SELF"] . '?socid=' . $object->id . '&action=delete">' . $langs->trans('Delete') . '</a></div>' . "\n"; |
|
2456 | + print '<div class="inline-block divButAction"><a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?socid='.$object->id.'&action=delete">'.$langs->trans('Delete').'</a></div>'."\n"; |
|
2457 | 2457 | } |
2458 | 2458 | } |
2459 | 2459 | } |
2460 | 2460 | |
2461 | - print '</div>' . "\n"; |
|
2461 | + print '</div>'."\n"; |
|
2462 | 2462 | } |
2463 | 2463 | |
2464 | 2464 | //Select mail models is same action as presend |
@@ -2475,12 +2475,12 @@ discard block |
||
2475 | 2475 | /* |
2476 | 2476 | * Documents generes |
2477 | 2477 | */ |
2478 | - $filedir = $conf->societe->multidir_output[$object->entity] . '/' . $object->id; |
|
2479 | - $urlsource = $_SERVER["PHP_SELF"] . "?socid=" . $object->id; |
|
2478 | + $filedir = $conf->societe->multidir_output[$object->entity].'/'.$object->id; |
|
2479 | + $urlsource = $_SERVER["PHP_SELF"]."?socid=".$object->id; |
|
2480 | 2480 | $genallowed = $user->rights->societe->lire; |
2481 | 2481 | $delallowed = $user->rights->societe->creer; |
2482 | 2482 | |
2483 | - print $formfile->showdocuments('company', $object->id, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 0, 0, 0, 28, 0, 'entity=' . $object->entity, 0, '', $object->default_lang); |
|
2483 | + print $formfile->showdocuments('company', $object->id, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 0, 0, 0, 28, 0, 'entity='.$object->entity, 0, '', $object->default_lang); |
|
2484 | 2484 | } |
2485 | 2485 | |
2486 | 2486 | // Subsidiaries list |
@@ -2492,26 +2492,26 @@ discard block |
||
2492 | 2492 | |
2493 | 2493 | $MAXEVENT = 10; |
2494 | 2494 | |
2495 | - $morehtmlright = '<a href="' . DOL_URL_ROOT . '/societe/agenda.php?socid=' . $object->id . '">'; |
|
2495 | + $morehtmlright = '<a href="'.DOL_URL_ROOT.'/societe/agenda.php?socid='.$object->id.'">'; |
|
2496 | 2496 | $morehtmlright .= $langs->trans("SeeAll"); |
2497 | 2497 | $morehtmlright .= '</a>'; |
2498 | 2498 | |
2499 | 2499 | // List of actions on element |
2500 | - include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; |
|
2500 | + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; |
|
2501 | 2501 | $formactions = new FormActions($db); |
2502 | - $somethingshown = $formactions->showactions($object, '', $socid, 1, '', $MAXEVENT, '', $morehtmlright); // Show all action for thirdparty |
|
2502 | + $somethingshown = $formactions->showactions($object, '', $socid, 1, '', $MAXEVENT, '', $morehtmlright); // Show all action for thirdparty |
|
2503 | 2503 | |
2504 | 2504 | print '</div></div></div>'; |
2505 | 2505 | |
2506 | 2506 | if (!empty($conf->global->MAIN_DUPLICATE_CONTACTS_TAB_ON_MAIN_CARD)) { |
2507 | 2507 | // Contacts list |
2508 | 2508 | if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) { |
2509 | - $result = show_contacts($conf, $langs, $db, $object, $_SERVER["PHP_SELF"] . '?socid=' . $object->id); |
|
2509 | + $result = show_contacts($conf, $langs, $db, $object, $_SERVER["PHP_SELF"].'?socid='.$object->id); |
|
2510 | 2510 | } |
2511 | 2511 | |
2512 | 2512 | // Addresses list |
2513 | 2513 | if (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT)) { |
2514 | - $result = show_addresses($conf, $langs, $db, $object, $_SERVER["PHP_SELF"] . '?socid=' . $object->id); |
|
2514 | + $result = show_addresses($conf, $langs, $db, $object, $_SERVER["PHP_SELF"].'?socid='.$object->id); |
|
2515 | 2515 | } |
2516 | 2516 | } |
2517 | 2517 | } |
@@ -2520,9 +2520,9 @@ discard block |
||
2520 | 2520 | $modelmail = 'thirdparty'; |
2521 | 2521 | $defaulttopic = 'Information'; |
2522 | 2522 | $diroutput = $conf->societe->dir_output; |
2523 | - $trackid = 'thi' . $object->id; |
|
2523 | + $trackid = 'thi'.$object->id; |
|
2524 | 2524 | |
2525 | - include DOL_DOCUMENT_ROOT . '/core/tpl/card_presend.tpl.php'; |
|
2525 | + include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; |
|
2526 | 2526 | } |
2527 | 2527 | } |
2528 | 2528 |