Completed
Branch develop (ac1704)
by
unknown
21:14
created
htdocs/societe/card.php 1 patch
Spacing   +54 added lines, -54 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 $backtopage = GETPOST('backtopage', 'alpha');
105 105
 $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
106 106
 $backtopagejsfields = GETPOST('backtopagejsfields', 'alpha');
107
-$confirm 	= GETPOST('confirm', 'alpha');
107
+$confirm = GETPOST('confirm', 'alpha');
108 108
 
109 109
 $dol_openinpopup = '';
110 110
 if (!empty($backtopagejsfields)) {
@@ -155,12 +155,12 @@  discard block
 block discarded – undo
155 155
 }
156 156
 
157 157
 // Permissions
158
-$permissiontoread 	= $user->hasRight('societe', 'lire');
159
-$permissiontoadd 	= $user->hasRight('societe', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
158
+$permissiontoread = $user->hasRight('societe', 'lire');
159
+$permissiontoadd = $user->hasRight('societe', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
160 160
 $permissiontodelete = $user->hasRight('societe', 'supprimer') || ($permissiontoadd && isset($object->status) && $object->status == 0);
161
-$permissionnote 	= $user->hasRight('societe', 'creer'); // Used by the include of actions_setnotes.inc.php
161
+$permissionnote = $user->hasRight('societe', 'creer'); // Used by the include of actions_setnotes.inc.php
162 162
 $permissiondellink 	= $user->hasRight('societe', 'creer'); // Used by the include of actions_dellink.inc.php
163
-$upload_dir 		= $conf->societe->multidir_output[isset($object->entity) ? $object->entity : 1];
163
+$upload_dir = $conf->societe->multidir_output[isset($object->entity) ? $object->entity : 1];
164 164
 
165 165
 // Security check
166 166
 $result = restrictedArea($user, 'societe', $socid, '&societe', '', 'fk_soc', 'rowid', 0);
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 
204 204
 	if ($action == 'confirm_merge' && $confirm == 'yes' && $user->hasRight('societe', 'creer')) {
205 205
 		$soc_origin_id = GETPOSTINT('soc_origin');
206
-		$soc_origin = new Societe($db);		// The thirdparty that we will delete
206
+		$soc_origin = new Societe($db); // The thirdparty that we will delete
207 207
 
208 208
 		if ($soc_origin_id <= 0) {
209 209
 			$langs->load('errors');
@@ -320,19 +320,19 @@  discard block
 block discarded – undo
320 320
 				$object->name = dolGetFirstLastname(GETPOST('firstname', 'alphanohtml'), GETPOST('name', 'alphanohtml'));
321 321
 				$object->civility_id		= GETPOST('civility_id', 'alphanohtml'); // Note: civility id is a code, not an int
322 322
 				// Add non official properties
323
-				$object->name_bis			= GETPOST('name', 'alphanohtml');
324
-				$object->firstname			= GETPOST('firstname', 'alphanohtml');
323
+				$object->name_bis = GETPOST('name', 'alphanohtml');
324
+				$object->firstname = GETPOST('firstname', 'alphanohtml');
325 325
 			} else {
326
-				$object->name				= GETPOST('name', 'alphanohtml');
326
+				$object->name = GETPOST('name', 'alphanohtml');
327 327
 			}
328 328
 			$object->entity					= (GETPOSTISSET('entity') ? GETPOSTINT('entity') : $conf->entity);
329
-			$object->name_alias				= GETPOST('name_alias', 'alphanohtml');
329
+			$object->name_alias = GETPOST('name_alias', 'alphanohtml');
330 330
 			$object->parent					= GETPOSTISSET('parent_company_id') ? GETPOSTINT('parent_company_id') : $object->parent;
331 331
 			$object->address				= GETPOST('address', 'alphanohtml');
332
-			$object->zip					= GETPOST('zipcode', 'alphanohtml');
333
-			$object->town					= GETPOST('town', 'alphanohtml');
334
-			$object->country_id				= GETPOSTINT('country_id');
335
-			$object->state_id				= GETPOSTINT('state_id');
332
+			$object->zip = GETPOST('zipcode', 'alphanohtml');
333
+			$object->town = GETPOST('town', 'alphanohtml');
334
+			$object->country_id = GETPOSTINT('country_id');
335
+			$object->state_id = GETPOSTINT('state_id');
336 336
 
337 337
 			$object->socialnetworks = array();
338 338
 			if (isModEnabled('socialnetworks')) {
@@ -344,10 +344,10 @@  discard block
 block discarded – undo
344 344
 			}
345 345
 
346 346
 			$object->phone					= GETPOST('phone', 'alpha');
347
-			$object->phone_mobile 			= (string) GETPOST("phone_mobile", 'alpha');
347
+			$object->phone_mobile = (string) GETPOST("phone_mobile", 'alpha');
348 348
 			$object->fax					= GETPOST('fax', 'alpha');
349 349
 			$object->email					= trim(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL));
350
-			$object->no_email 				= GETPOSTINT("no_email");
350
+			$object->no_email = GETPOSTINT("no_email");
351 351
 			$object->url					= trim(GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL));
352 352
 			$object->idprof1				= trim(GETPOST('idprof1', 'alphanohtml'));
353 353
 			$object->idprof2				= trim(GETPOST('idprof2', 'alphanohtml'));
@@ -357,13 +357,13 @@  discard block
 block discarded – undo
357 357
 			$object->idprof6				= trim(GETPOST('idprof6', 'alphanohtml'));
358 358
 			$object->prefix_comm			= GETPOST('prefix_comm', 'alphanohtml');
359 359
 			$object->code_client			= GETPOSTISSET('customer_code') ? GETPOST('customer_code', 'alpha') : GETPOST('code_client', 'alpha');
360
-			$object->code_fournisseur		= GETPOSTISSET('supplier_code') ? GETPOST('supplier_code', 'alpha') : GETPOST('code_fournisseur', 'alpha');
360
+			$object->code_fournisseur = GETPOSTISSET('supplier_code') ? GETPOST('supplier_code', 'alpha') : GETPOST('code_fournisseur', 'alpha');
361 361
 			$object->capital				= GETPOST('capital', 'alphanohtml');
362 362
 			$object->barcode				= GETPOST('barcode', 'alphanohtml');
363 363
 
364 364
 			$object->tva_intra				= GETPOST('tva_intra', 'alphanohtml');
365 365
 			$object->tva_assuj				= GETPOST('assujtva_value', 'alpha');
366
-			$object->vat_reverse_charge		= GETPOST('vat_reverse_charge') == 'on' ? 1 : 0;
366
+			$object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0;
367 367
 			$object->status = GETPOST('status', 'alpha');
368 368
 
369 369
 			// Local Taxes
@@ -373,9 +373,9 @@  discard block
 block discarded – undo
373 373
 			$object->localtax1_value		= GETPOST('lt1', 'alpha');
374 374
 			$object->localtax2_value		= GETPOST('lt2', 'alpha');
375 375
 
376
-			$object->forme_juridique_code	= GETPOSTINT('forme_juridique_code');
376
+			$object->forme_juridique_code = GETPOSTINT('forme_juridique_code');
377 377
 			$object->effectif_id			= GETPOSTINT('effectif_id');
378
-			$object->typent_id				= GETPOSTINT('typent_id');
378
+			$object->typent_id = GETPOSTINT('typent_id');
379 379
 
380 380
 			$object->typent_code			= dol_getIdFromCode($db, $object->typent_id, 'c_typent', 'id', 'code'); // Force typent_code too so check in verify() will be done on new type
381 381
 
@@ -384,18 +384,18 @@  discard block
 block discarded – undo
384 384
 			$prospect = (GETPOSTINT('prospect') > 0 ? 2 : 0);
385 385
 			$prospectcustomer = $customer + $prospect;
386 386
 
387
-			$object->client					= $prospectcustomer;
388
-			$object->fournisseur			= (GETPOSTINT('supplier') > 0 ? 1 : 0);
387
+			$object->client = $prospectcustomer;
388
+			$object->fournisseur = (GETPOSTINT('supplier') > 0 ? 1 : 0);
389 389
 
390
-			$object->commercial_id			= GETPOSTINT('commercial_id');
391
-			$object->default_lang			= GETPOST('default_lang');
390
+			$object->commercial_id = GETPOSTINT('commercial_id');
391
+			$object->default_lang = GETPOST('default_lang');
392 392
 
393 393
 			// Webservices url/key
394 394
 			$object->webservices_url		= GETPOST('webservices_url', 'custom', 0, FILTER_SANITIZE_URL);
395 395
 			$object->webservices_key		= GETPOST('webservices_key', 'san_alpha');
396 396
 
397 397
 			if (GETPOSTISSET('accountancy_code_sell')) {
398
-				$accountancy_code_sell		= GETPOST('accountancy_code_sell', 'alpha');
398
+				$accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha');
399 399
 
400 400
 				if (empty($accountancy_code_sell) || $accountancy_code_sell == '-1') {
401 401
 					$object->accountancy_code_sell = '';
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
 				}
405 405
 			}
406 406
 			if (GETPOSTISSET('accountancy_code_buy')) {
407
-				$accountancy_code_buy		= GETPOST('accountancy_code_buy', 'alpha');
407
+				$accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha');
408 408
 
409 409
 				if (empty($accountancy_code_buy) || $accountancy_code_buy == '-1') {
410 410
 					$object->accountancy_code_buy = '';
@@ -1002,7 +1002,7 @@  discard block
 block discarded – undo
1002 1002
 		}
1003 1003
 
1004 1004
 		$object->phone				= GETPOST('phone', 'alpha');
1005
-		$object->phone_mobile       = (string) GETPOST("phone_mobile", 'alpha');
1005
+		$object->phone_mobile = (string) GETPOST("phone_mobile", 'alpha');
1006 1006
 		$object->fax				= GETPOST('fax', 'alpha');
1007 1007
 		$object->email				= GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL);
1008 1008
 		$object->url				= GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL);
@@ -1019,7 +1019,7 @@  discard block
 block discarded – undo
1019 1019
 		$object->civility_id		= GETPOST('civility_id', 'alpha');
1020 1020
 
1021 1021
 		$object->tva_assuj = GETPOSTINT('assujtva_value');
1022
-		$object->vat_reverse_charge	= GETPOST('vat_reverse_charge') == 'on' ? 1 : 0;
1022
+		$object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0;
1023 1023
 		$object->status = GETPOSTINT('status');
1024 1024
 
1025 1025
 		//Local Taxes
@@ -1035,7 +1035,7 @@  discard block
 block discarded – undo
1035 1035
 		$object->default_lang = GETPOST('default_lang');
1036 1036
 
1037 1037
 		if (GETPOSTISSET('accountancy_code_sell')) {
1038
-			$accountancy_code_sell  = GETPOST('accountancy_code_sell', 'alpha');
1038
+			$accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha');
1039 1039
 
1040 1040
 			if (empty($accountancy_code_sell) || $accountancy_code_sell == '-1') {
1041 1041
 				$object->accountancy_code_sell = '';
@@ -1044,7 +1044,7 @@  discard block
 block discarded – undo
1044 1044
 			}
1045 1045
 		}
1046 1046
 		if (GETPOSTISSET('accountancy_code_buy')) {
1047
-			$accountancy_code_buy   = GETPOST('accountancy_code_buy', 'alpha');
1047
+			$accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha');
1048 1048
 
1049 1049
 			if (empty($accountancy_code_buy) || $accountancy_code_buy == '-1') {
1050 1050
 				$object->accountancy_code_buy = '';
@@ -1169,7 +1169,7 @@  discard block
 block discarded – undo
1169 1169
 
1170 1170
 			print '<script type="text/javascript">';
1171 1171
 			print '$(document).ready(function () {
1172
-					var canHaveCustomerCategoryIfNotCustomerProspectSupplier = ' . (!getDolGlobalString('THIRDPARTY_CAN_HAVE_CUSTOMER_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT') ? '0' : '1') . ';
1172
+					var canHaveCustomerCategoryIfNotCustomerProspectSupplier = ' . (!getDolGlobalString('THIRDPARTY_CAN_HAVE_CUSTOMER_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT') ? '0' : '1').';
1173 1173
 
1174 1174
 					init_customer_categ();
1175 1175
 			  		$("#customerprospect").change(function() {
@@ -1241,7 +1241,7 @@  discard block
 block discarded – undo
1241 1241
 			print '</td><td'.(!getDolGlobalString('SOCIETE_USEPREFIX') ? ' colspan="3"' : '').'>';
1242 1242
 
1243 1243
 			print '<input type="text" class="minwidth300" maxlength="128" name="name" id="name" value="'.dol_escape_htmltag($object->name).'" autofocus="autofocus">';
1244
-			print $form->widgetForTranslation("name", $object, $permissiontoadd, 'string', 'alphanohtml', 'minwidth300');	// For some countries that need the company name in 2 languages
1244
+			print $form->widgetForTranslation("name", $object, $permissiontoadd, 'string', 'alphanohtml', 'minwidth300'); // For some countries that need the company name in 2 languages
1245 1245
 			// This implementation of the feature to search already existing company has been disabled. It must be implemented by keeping the "input text" and we must call the search ajax societe/ajax/ajaxcompanies.php
1246 1246
 			// on a keydown of the input. We should show data about a duplicate found if we found less than 5 answers into a div under the input.
1247 1247
 			/*
@@ -1589,7 +1589,7 @@  discard block
 block discarded – undo
1589 1589
 					print '<td></td>';
1590 1590
 					print '<td></td>';
1591 1591
 				}
1592
-				print '<td class="individualline noemail">'.$form->editfieldkey($langs->trans('No_Email') .' ('.$langs->trans('Contact').')', 'contact_no_email', '', $object, 0).'</td>';
1592
+				print '<td class="individualline noemail">'.$form->editfieldkey($langs->trans('No_Email').' ('.$langs->trans('Contact').')', 'contact_no_email', '', $object, 0).'</td>';
1593 1593
 				print '<td class="individualline" '.(($conf->browser->layout == 'phone') || !isModEnabled('mailing') ? ' colspan="3"' : '').'>'.$form->selectyesno('contact_no_email', (GETPOSTISSET("contact_no_email") ? GETPOST("contact_no_email", 'alpha') : (empty($object->no_email) ? 0 : 1)), 1, false, 1).'</td>';
1594 1594
 				print '</tr>';
1595 1595
 			}
@@ -1637,7 +1637,7 @@  discard block
 block discarded – undo
1637 1637
 			// Vat is used
1638 1638
 			print '<tr><td><label for="assujtva_value">'.$form->editfieldkey('VATIsUsed', 'assujtva_value', '', $object, 0).'</label></td>';
1639 1639
 			print '<td>';
1640
-			print '<input id="assujtva_value" name="assujtva_value" type="checkbox" ' . (GETPOSTISSET('assujtva_value') ? (GETPOST('assujtva', 'alpha') != '' ? ' checked="checked"' : '') : 'checked="checked"') . ' value="1">'; // Assujeti par default en creation
1640
+			print '<input id="assujtva_value" name="assujtva_value" type="checkbox" '.(GETPOSTISSET('assujtva_value') ? (GETPOST('assujtva', 'alpha') != '' ? ' checked="checked"' : '') : 'checked="checked"').' value="1">'; // Assujeti par default en creation
1641 1641
 			print '</td>';
1642 1642
 			if ($conf->browser->layout == 'phone') {
1643 1643
 				print '</tr><tr>';
@@ -1678,7 +1678,7 @@  discard block
 block discarded – undo
1678 1678
 
1679 1679
 			// VAT reverse charge by default
1680 1680
 			if (getDolGlobalString('ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE')) {
1681
-				print '<tr><td><label for="vat_reverse_charge">' . $form->editfieldkey('VATReverseChargeByDefault', 'vat_reverse_charge', '', $object, 0) . '</label></td><td colspan="3">';
1681
+				print '<tr><td><label for="vat_reverse_charge">'.$form->editfieldkey('VATReverseChargeByDefault', 'vat_reverse_charge', '', $object, 0).'</label></td><td colspan="3">';
1682 1682
 				print '<input type="checkbox" name="vat_reverse_charge" id="vat_reverse_charge" '.($object->vat_reverse_charge == '1' ? ' checked' : '').'>';
1683 1683
 				print '</td></tr>';
1684 1684
 			}
@@ -1687,21 +1687,21 @@  discard block
 block discarded – undo
1687 1687
 			//TODO: Place into a function to control showing by country or study better option
1688 1688
 			if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") {
1689 1689
 				print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).'</td><td>';
1690
-				print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" ' . (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? 'checked="checked"' : '') . ' value="1">';
1690
+				print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" '.(isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? 'checked="checked"' : '').' value="1">';
1691 1691
 				print '</td>';
1692 1692
 				if ($conf->browser->layout == 'phone') {
1693 1693
 					print '</tr><tr>';
1694 1694
 				}
1695 1695
 				print '<td>'.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).'</td><td>';
1696
-				print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" ' . (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? 'checked="checked"' : '') . ' value="1">';
1696
+				print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" '.(isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? 'checked="checked"' : '').' value="1">';
1697 1697
 				print '</td></tr>';
1698 1698
 			} elseif ($mysoc->localtax1_assuj == "1") {
1699 1699
 				print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).'</td><td colspan="3">';
1700
-				print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" ' . (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? 'checked="checked"' : '') . ' value="1">';
1700
+				print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" '.(isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? 'checked="checked"' : '').' value="1">';
1701 1701
 				print '</td></tr>';
1702 1702
 			} elseif ($mysoc->localtax2_assuj == "1") {
1703 1703
 				print '<tr><td>'.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).'</td><td colspan="3">';
1704
-				print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" ' . (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? 'checked="checked"' : '') . ' value="1">';
1704
+				print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" '.(isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? 'checked="checked"' : '').' value="1">';
1705 1705
 				print '</td></tr>';
1706 1706
 			}
1707 1707
 
@@ -1942,10 +1942,10 @@  discard block
 block discarded – undo
1942 1942
 				}
1943 1943
 
1944 1944
 				$object->phone					= GETPOST('phone', 'alpha');
1945
-				$object->phone_mobile			= (string) GETPOST('phone_mobile', 'alpha');
1945
+				$object->phone_mobile = (string) GETPOST('phone_mobile', 'alpha');
1946 1946
 				$object->fax					= GETPOST('fax', 'alpha');
1947 1947
 				$object->email					= GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL);
1948
-				$object->no_email				= GETPOSTINT("no_email");
1948
+				$object->no_email = GETPOSTINT("no_email");
1949 1949
 				$object->url					= GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL);
1950 1950
 				$object->capital				= GETPOST('capital', 'alphanohtml');
1951 1951
 				$object->idprof1				= GETPOST('idprof1', 'alphanohtml');
@@ -1961,16 +1961,16 @@  discard block
 block discarded – undo
1961 1961
 				$object->default_lang = GETPOST('default_lang', 'alpha');
1962 1962
 
1963 1963
 				$object->tva_assuj				= GETPOSTINT('assujtva_value');
1964
-				$object->vat_reverse_charge		= GETPOST('vat_reverse_charge') == 'on' ? 1 : 0;
1964
+				$object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0;
1965 1965
 				$object->tva_intra				= GETPOST('tva_intra', 'alphanohtml');
1966
-				$object->status =				GETPOSTINT('status');
1966
+				$object->status = GETPOSTINT('status');
1967 1967
 
1968 1968
 				// Webservices url/key
1969 1969
 				$object->webservices_url        = GETPOST('webservices_url', 'custom', 0, FILTER_SANITIZE_URL);
1970 1970
 				$object->webservices_key        = GETPOST('webservices_key', 'san_alpha');
1971 1971
 
1972 1972
 				if (GETPOSTISSET('accountancy_code_sell')) {
1973
-					$accountancy_code_sell  = GETPOST('accountancy_code_sell', 'alpha');
1973
+					$accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha');
1974 1974
 
1975 1975
 					if (empty($accountancy_code_sell) || $accountancy_code_sell == '-1') {
1976 1976
 						$object->accountancy_code_sell = '';
@@ -1979,7 +1979,7 @@  discard block
 block discarded – undo
1979 1979
 					}
1980 1980
 				}
1981 1981
 				if (GETPOSTISSET('accountancy_code_buy')) {
1982
-					$accountancy_code_buy   = GETPOST('accountancy_code_buy', 'alpha');
1982
+					$accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha');
1983 1983
 
1984 1984
 					if (empty($accountancy_code_buy) || $accountancy_code_buy == '-1') {
1985 1985
 						$object->accountancy_code_buy = '';
@@ -2061,7 +2061,7 @@  discard block
 block discarded – undo
2061 2061
     				}
2062 2062
     			});
2063 2063
 
2064
-				var canHaveCustomerCategoryIfNotCustomerProspect = ' . (getDolGlobalInt('THIRDPARTY_CAN_HAVE_CUSTOMER_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT') ? '1' : '0') . ';
2064
+				var canHaveCustomerCategoryIfNotCustomerProspect = ' . (getDolGlobalInt('THIRDPARTY_CAN_HAVE_CUSTOMER_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT') ? '1' : '0').';
2065 2065
 
2066 2066
 				init_customer_categ();
2067 2067
 	  			$("#customerprospect").change(function() {
@@ -2410,14 +2410,14 @@  discard block
 block discarded – undo
2410 2410
 
2411 2411
 				// VAT is used
2412 2412
 				print '<tr><td>'.$form->editfieldkey('VATIsUsed', 'assujtva_value', '', $object, 0).'</td><td colspan="3">';
2413
-				print '<input id="assujtva_value" name="assujtva_value" type="checkbox" ' . ($object->tva_assuj ? 'checked="checked"' : '') . ' value="1">';
2413
+				print '<input id="assujtva_value" name="assujtva_value" type="checkbox" '.($object->tva_assuj ? 'checked="checked"' : '').' value="1">';
2414 2414
 				print '</td></tr>';
2415 2415
 
2416 2416
 				// Local Taxes
2417 2417
 				//TODO: Place into a function to control showing by country or study better option
2418 2418
 				if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") {
2419 2419
 					print '<tr><td>'.$form->editfieldkey($langs->transcountry("LocalTax1IsUsed", $mysoc->country_code), 'localtax1assuj_value', '', $object, 0).'</td><td>';
2420
-					print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" ' . ($object->localtax1_assuj ? 'checked="checked"' : '') . ' value="1">';
2420
+					print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" '.($object->localtax1_assuj ? 'checked="checked"' : '').' value="1">';
2421 2421
 					if (!isOnlyOneLocalTax(1)) {
2422 2422
 						print '<span class="cblt1">     '.$langs->transcountry("Type", $mysoc->country_code).': ';
2423 2423
 						$formcompany->select_localtax(1, $object->localtax1_value, "lt1");
@@ -2426,7 +2426,7 @@  discard block
 block discarded – undo
2426 2426
 					print '</td>';
2427 2427
 					print '</tr><tr>';
2428 2428
 					print '<td>'.$form->editfieldkey($langs->transcountry("LocalTax2IsUsed", $mysoc->country_code), 'localtax2assuj_value', '', $object, 0).'</td><td>';
2429
-					print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" ' . ($object->localtax2_assuj ? 'checked="checked"' : '') . ' value="1"></td></tr>';
2429
+					print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" '.($object->localtax2_assuj ? 'checked="checked"' : '').' value="1"></td></tr>';
2430 2430
 					if (!isOnlyOneLocalTax(2)) {
2431 2431
 						print '<span class="cblt2">     '.$langs->transcountry("Type", $mysoc->country_code).': ';
2432 2432
 						$formcompany->select_localtax(2, $object->localtax2_value, "lt2");
@@ -2435,7 +2435,7 @@  discard block
 block discarded – undo
2435 2435
 					print '</td></tr>';
2436 2436
 				} elseif ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj != "1") {
2437 2437
 					print '<tr><td>'.$form->editfieldkey($langs->transcountry("LocalTax1IsUsed", $mysoc->country_code), 'localtax1assuj_value', '', $object, 0).'</td><td colspan="3">';
2438
-					print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" ' . ($object->localtax1_assuj ? 'checked="checked"' : '') . ' value="1">';
2438
+					print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" '.($object->localtax1_assuj ? 'checked="checked"' : '').' value="1">';
2439 2439
 					if (!isOnlyOneLocalTax(1)) {
2440 2440
 						print '<span class="cblt1">     '.$langs->transcountry("Type", $mysoc->country_code).': ';
2441 2441
 						$formcompany->select_localtax(1, $object->localtax1_value, "lt1");
@@ -2444,7 +2444,7 @@  discard block
 block discarded – undo
2444 2444
 					print '</td></tr>';
2445 2445
 				} elseif ($mysoc->localtax2_assuj == "1" && $mysoc->localtax1_assuj != "1") {
2446 2446
 					print '<tr><td>'.$form->editfieldkey($langs->transcountry("LocalTax2IsUsed", $mysoc->country_code), 'localtax2assuj_value', '', $object, 0).'</td><td colspan="3">';
2447
-					print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" ' . ($object->localtax2_assuj ? 'checked="checked"' : '') . ' value="1">';
2447
+					print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" '.($object->localtax2_assuj ? 'checked="checked"' : '').' value="1">';
2448 2448
 					if (!isOnlyOneLocalTax(2)) {
2449 2449
 						print '<span class="cblt2">     '.$langs->transcountry("Type", $mysoc->country_code).': ';
2450 2450
 						$formcompany->select_localtax(2, $object->localtax2_value, "lt2");
@@ -2455,7 +2455,7 @@  discard block
 block discarded – undo
2455 2455
 
2456 2456
 				// VAT reverse charge by default
2457 2457
 				if (getDolGlobalString('ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE')) {
2458
-					print '<tr><td>' . $form->editfieldkey('VATReverseChargeByDefault', 'vat_reverse_charge', '', $object, 0) . '</td><td colspan="3">';
2458
+					print '<tr><td>'.$form->editfieldkey('VATReverseChargeByDefault', 'vat_reverse_charge', '', $object, 0).'</td><td colspan="3">';
2459 2459
 					print '<input type="checkbox" name="vat_reverse_charge" '.($object->vat_reverse_charge == '1' ? ' checked' : '').'>';
2460 2460
 					print '</td></tr>';
2461 2461
 				}
@@ -2632,7 +2632,7 @@  discard block
 block discarded – undo
2632 2632
 					$maxfilesizearray = getMaxFileSizeArray();
2633 2633
 					$maxmin = $maxfilesizearray['maxmin'];
2634 2634
 					if ($maxmin > 0) {
2635
-						print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">';	// MAX_FILE_SIZE must precede the field type=file
2635
+						print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
2636 2636
 					}
2637 2637
 					print '<input type="file" class="flat" name="photo" id="photoinput">';
2638 2638
 					print '</td></tr>';
@@ -2855,7 +2855,7 @@  discard block
 block discarded – undo
2855 2855
 					print '<tr><td>';
2856 2856
 					print $form->textwithpicto($langs->trans('VATReverseChargeByDefault'), $langs->trans('VATReverseChargeByDefaultDesc'));
2857 2857
 					print '</td><td>';
2858
-					print '<input type="checkbox" name="vat_reverse_charge" ' . ($object->vat_reverse_charge == '1' ? ' checked' : '') . ' disabled>';
2858
+					print '<input type="checkbox" name="vat_reverse_charge" '.($object->vat_reverse_charge == '1' ? ' checked' : '').' disabled>';
2859 2859
 					print '</td>';
2860 2860
 					print '</tr>';
2861 2861
 				}
Please login to merge, or discard this patch.