@@ -438,21 +438,21 @@ |
||
| 438 | 438 | // Roles |
| 439 | 439 | $resql = $this->db->query("SELECT rowid FROM ".MAIN_DB_PREFIX."c_type_contact WHERE code = 'STDEST' AND element = 'stocktransfer' AND source = 'internal'"); |
| 440 | 440 | $res = $this->db->fetch_object($resql); |
| 441 | - $nextid=$this->getNextId(); |
|
| 441 | + $nextid = $this->getNextId(); |
|
| 442 | 442 | if (empty($res)) { |
| 443 | 443 | $this->db->query("INSERT INTO ".MAIN_DB_PREFIX."c_type_contact(rowid, element, source, code, libelle, active, module, position) VALUES(".((int) $nextid).", 'stocktransfer', 'internal', 'STRESP', 'Responsible for stock transfers', 1, NULL, 0)"); |
| 444 | 444 | } |
| 445 | 445 | |
| 446 | 446 | $resql = $this->db->query("SELECT rowid FROM ".MAIN_DB_PREFIX."c_type_contact WHERE code = 'STFROM' AND element = 'stocktransfer' AND source = 'external'"); |
| 447 | 447 | $res = $this->db->fetch_object($resql); |
| 448 | - $nextid=$this->getNextId(); |
|
| 448 | + $nextid = $this->getNextId(); |
|
| 449 | 449 | if (empty($res)) { |
| 450 | 450 | $this->db->query("INSERT INTO ".MAIN_DB_PREFIX."c_type_contact(rowid, element, source, code, libelle, active, module, position) VALUES(".((int) $nextid).", 'stocktransfer', 'external', 'STFROM', 'Contact sending the stock transfer', 1, NULL, 0)"); |
| 451 | 451 | } |
| 452 | 452 | |
| 453 | 453 | $resql = $this->db->query("SELECT rowid FROM ".MAIN_DB_PREFIX."c_type_contact WHERE code = 'STDEST' AND element = 'stocktransfer' AND source = 'external'"); |
| 454 | 454 | $res = $this->db->fetch_object($resql); |
| 455 | - $nextid=$this->getNextId(); |
|
| 455 | + $nextid = $this->getNextId(); |
|
| 456 | 456 | if (empty($res)) { |
| 457 | 457 | $this->db->query("INSERT INTO ".MAIN_DB_PREFIX."c_type_contact(rowid, element, source, code, libelle, active, module, position) VALUES(".((int) $nextid).", 'stocktransfer', 'external', 'STDEST', 'Contact receiving the stock transfer', 1, NULL, 0)"); |
| 458 | 458 | } |
@@ -298,7 +298,7 @@ discard block |
||
| 298 | 298 | $this->tpl['country'] = ($img ? $img.' ' : '').$this->object->country; |
| 299 | 299 | |
| 300 | 300 | $this->tpl['phone'] = dol_print_phone($this->object->phone, $this->object->country_code, 0, $this->object->id, 'AC_TEL'); |
| 301 | - $this->tpl['phone_mobile'] = dol_print_phone($this->object->phone_mobile, $this->object->country_code, 0, $this->object->id, 'AC_MOB'); |
|
| 301 | + $this->tpl['phone_mobile'] = dol_print_phone($this->object->phone_mobile, $this->object->country_code, 0, $this->object->id, 'AC_MOB'); |
|
| 302 | 302 | $this->tpl['fax'] = dol_print_phone($this->object->fax, $this->object->country_code, 0, $this->object->id, 'AC_FAX'); |
| 303 | 303 | $this->tpl['email'] = dol_print_email($this->object->email, 0, $this->object->id, 1); |
| 304 | 304 | $this->tpl['url'] = dol_print_url($this->object->url); |
@@ -403,7 +403,7 @@ discard block |
||
| 403 | 403 | $this->object->country_id = GETPOST("country_id") ? GETPOST("country_id") : $mysoc->country_id; |
| 404 | 404 | $this->object->state_id = GETPOST("state_id"); |
| 405 | 405 | $this->object->phone = GETPOST("phone"); |
| 406 | - $this->object->phone_mobile = GETPOST("phone_mobile"); |
|
| 406 | + $this->object->phone_mobile = GETPOST("phone_mobile"); |
|
| 407 | 407 | $this->object->fax = GETPOST("fax"); |
| 408 | 408 | $this->object->email = GETPOST("email", 'alphawithlgt'); |
| 409 | 409 | $this->object->url = GETPOST("url"); |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | $backtopage = GETPOST('backtopage', 'alpha'); |
| 103 | 103 | $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); |
| 104 | 104 | $backtopagejsfields = GETPOST('backtopagejsfields', 'alpha'); |
| 105 | -$confirm = GETPOST('confirm', 'alpha'); |
|
| 105 | +$confirm = GETPOST('confirm', 'alpha'); |
|
| 106 | 106 | |
| 107 | 107 | $dol_openinpopup = ''; |
| 108 | 108 | if (!empty($backtopagejsfields)) { |
@@ -155,12 +155,12 @@ discard block |
||
| 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 |
||
| 203 | 203 | |
| 204 | 204 | if ($action == 'confirm_merge' && $confirm == 'yes' && $user->hasRight('societe', 'creer')) { |
| 205 | 205 | $soc_origin_id = GETPOST('soc_origin', 'int'); |
| 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'); |
@@ -292,12 +292,12 @@ discard block |
||
| 292 | 292 | $error++; |
| 293 | 293 | } |
| 294 | 294 | |
| 295 | - if (isModEnabled('mailing') && getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2 && GETPOST('contact_no_email', 'int')==-1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) { |
|
| 295 | + if (isModEnabled('mailing') && getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2 && GETPOST('contact_no_email', 'int') == -1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) { |
|
| 296 | 296 | $error++; |
| 297 | 297 | setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("No_Email")), null, 'errors'); |
| 298 | 298 | } |
| 299 | 299 | |
| 300 | - if (isModEnabled('mailing') && GETPOST("private", 'int') == 1 && getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2 && GETPOST('contact_no_email', 'int')==-1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) { |
|
| 300 | + if (isModEnabled('mailing') && GETPOST("private", 'int') == 1 && getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2 && GETPOST('contact_no_email', 'int') == -1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) { |
|
| 301 | 301 | $error++; |
| 302 | 302 | setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("No_Email")), null, 'errors'); |
| 303 | 303 | } |
@@ -316,19 +316,19 @@ discard block |
||
| 316 | 316 | $object->name = dolGetFirstLastname(GETPOST('firstname', 'alphanohtml'), GETPOST('name', 'alphanohtml')); |
| 317 | 317 | $object->civility_id = GETPOST('civility_id', 'alphanohtml'); // Note: civility id is a code, not an int |
| 318 | 318 | // Add non official properties |
| 319 | - $object->name_bis = GETPOST('name', 'alphanohtml'); |
|
| 320 | - $object->firstname = GETPOST('firstname', 'alphanohtml'); |
|
| 319 | + $object->name_bis = GETPOST('name', 'alphanohtml'); |
|
| 320 | + $object->firstname = GETPOST('firstname', 'alphanohtml'); |
|
| 321 | 321 | } else { |
| 322 | - $object->name = GETPOST('name', 'alphanohtml'); |
|
| 322 | + $object->name = GETPOST('name', 'alphanohtml'); |
|
| 323 | 323 | } |
| 324 | 324 | $object->entity = (GETPOSTISSET('entity') ? GETPOST('entity', 'int') : $conf->entity); |
| 325 | - $object->name_alias = GETPOST('name_alias', 'alphanohtml'); |
|
| 325 | + $object->name_alias = GETPOST('name_alias', 'alphanohtml'); |
|
| 326 | 326 | $object->parent = GETPOSTISSET('parent_company_id') ? GETPOST('parent_company_id', 'int') : $object->parent; |
| 327 | 327 | $object->address = GETPOST('address', 'alphanohtml'); |
| 328 | - $object->zip = GETPOST('zipcode', 'alphanohtml'); |
|
| 329 | - $object->town = GETPOST('town', 'alphanohtml'); |
|
| 330 | - $object->country_id = GETPOST('country_id', 'int'); |
|
| 331 | - $object->state_id = GETPOST('state_id', 'int'); |
|
| 328 | + $object->zip = GETPOST('zipcode', 'alphanohtml'); |
|
| 329 | + $object->town = GETPOST('town', 'alphanohtml'); |
|
| 330 | + $object->country_id = GETPOST('country_id', 'int'); |
|
| 331 | + $object->state_id = GETPOST('state_id', 'int'); |
|
| 332 | 332 | |
| 333 | 333 | $object->socialnetworks = array(); |
| 334 | 334 | if (isModEnabled('socialnetworks')) { |
@@ -340,10 +340,10 @@ discard block |
||
| 340 | 340 | } |
| 341 | 341 | |
| 342 | 342 | $object->phone = GETPOST('phone', 'alpha'); |
| 343 | - $object->phone_mobile = (string) GETPOST("phone_mobile", 'alpha'); |
|
| 343 | + $object->phone_mobile = (string) GETPOST("phone_mobile", 'alpha'); |
|
| 344 | 344 | $object->fax = GETPOST('fax', 'alpha'); |
| 345 | 345 | $object->email = trim(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL)); |
| 346 | - $object->no_email = GETPOST("no_email", "int"); |
|
| 346 | + $object->no_email = GETPOST("no_email", "int"); |
|
| 347 | 347 | $object->url = trim(GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL)); |
| 348 | 348 | $object->idprof1 = trim(GETPOST('idprof1', 'alphanohtml')); |
| 349 | 349 | $object->idprof2 = trim(GETPOST('idprof2', 'alphanohtml')); |
@@ -353,13 +353,13 @@ discard block |
||
| 353 | 353 | $object->idprof6 = trim(GETPOST('idprof6', 'alphanohtml')); |
| 354 | 354 | $object->prefix_comm = GETPOST('prefix_comm', 'alphanohtml'); |
| 355 | 355 | $object->code_client = GETPOSTISSET('customer_code') ? GETPOST('customer_code', 'alpha') : GETPOST('code_client', 'alpha'); |
| 356 | - $object->code_fournisseur = GETPOSTISSET('supplier_code') ? GETPOST('supplier_code', 'alpha') : GETPOST('code_fournisseur', 'alpha'); |
|
| 356 | + $object->code_fournisseur = GETPOSTISSET('supplier_code') ? GETPOST('supplier_code', 'alpha') : GETPOST('code_fournisseur', 'alpha'); |
|
| 357 | 357 | $object->capital = GETPOST('capital', 'alphanohtml'); |
| 358 | 358 | $object->barcode = GETPOST('barcode', 'alphanohtml'); |
| 359 | 359 | |
| 360 | 360 | $object->tva_intra = GETPOST('tva_intra', 'alphanohtml'); |
| 361 | 361 | $object->tva_assuj = GETPOST('assujtva_value', 'alpha'); |
| 362 | - $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
|
| 362 | + $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
|
| 363 | 363 | $object->status = GETPOST('status', 'alpha'); |
| 364 | 364 | |
| 365 | 365 | // Local Taxes |
@@ -369,24 +369,24 @@ discard block |
||
| 369 | 369 | $object->localtax1_value = GETPOST('lt1', 'alpha'); |
| 370 | 370 | $object->localtax2_value = GETPOST('lt2', 'alpha'); |
| 371 | 371 | |
| 372 | - $object->forme_juridique_code = GETPOST('forme_juridique_code', 'int'); |
|
| 372 | + $object->forme_juridique_code = GETPOST('forme_juridique_code', 'int'); |
|
| 373 | 373 | $object->effectif_id = GETPOST('effectif_id', 'int'); |
| 374 | - $object->typent_id = GETPOST('typent_id', 'int'); |
|
| 374 | + $object->typent_id = GETPOST('typent_id', 'int'); |
|
| 375 | 375 | |
| 376 | 376 | $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 |
| 377 | 377 | |
| 378 | - $object->client = GETPOST('client', 'int'); |
|
| 378 | + $object->client = GETPOST('client', 'int'); |
|
| 379 | 379 | $object->fournisseur = GETPOST('fournisseur', 'int'); |
| 380 | 380 | |
| 381 | - $object->commercial_id = GETPOST('commercial_id', 'int'); |
|
| 382 | - $object->default_lang = GETPOST('default_lang'); |
|
| 381 | + $object->commercial_id = GETPOST('commercial_id', 'int'); |
|
| 382 | + $object->default_lang = GETPOST('default_lang'); |
|
| 383 | 383 | |
| 384 | 384 | // Webservices url/key |
| 385 | 385 | $object->webservices_url = GETPOST('webservices_url', 'custom', 0, FILTER_SANITIZE_URL); |
| 386 | 386 | $object->webservices_key = GETPOST('webservices_key', 'san_alpha'); |
| 387 | 387 | |
| 388 | 388 | if (GETPOSTISSET('accountancy_code_sell')) { |
| 389 | - $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
| 389 | + $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
| 390 | 390 | |
| 391 | 391 | if (empty($accountancy_code_sell) || $accountancy_code_sell == '-1') { |
| 392 | 392 | $object->accountancy_code_sell = ''; |
@@ -395,7 +395,7 @@ discard block |
||
| 395 | 395 | } |
| 396 | 396 | } |
| 397 | 397 | if (GETPOSTISSET('accountancy_code_buy')) { |
| 398 | - $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
| 398 | + $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
| 399 | 399 | |
| 400 | 400 | if (empty($accountancy_code_buy) || $accountancy_code_buy == '-1') { |
| 401 | 401 | $object->accountancy_code_buy = ''; |
@@ -993,7 +993,7 @@ discard block |
||
| 993 | 993 | } |
| 994 | 994 | |
| 995 | 995 | $object->phone = GETPOST('phone', 'alpha'); |
| 996 | - $object->phone_mobile = (string) GETPOST("phone_mobile", 'alpha'); |
|
| 996 | + $object->phone_mobile = (string) GETPOST("phone_mobile", 'alpha'); |
|
| 997 | 997 | $object->fax = GETPOST('fax', 'alpha'); |
| 998 | 998 | $object->email = GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL); |
| 999 | 999 | $object->url = GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL); |
@@ -1010,7 +1010,7 @@ discard block |
||
| 1010 | 1010 | $object->civility_id = GETPOST('civility_id', 'alpha'); |
| 1011 | 1011 | |
| 1012 | 1012 | $object->tva_assuj = GETPOST('assujtva_value', 'int'); |
| 1013 | - $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
|
| 1013 | + $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
|
| 1014 | 1014 | $object->status = GETPOST('status', 'int'); |
| 1015 | 1015 | |
| 1016 | 1016 | //Local Taxes |
@@ -1026,7 +1026,7 @@ discard block |
||
| 1026 | 1026 | $object->default_lang = GETPOST('default_lang'); |
| 1027 | 1027 | |
| 1028 | 1028 | if (GETPOSTISSET('accountancy_code_sell')) { |
| 1029 | - $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
| 1029 | + $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
| 1030 | 1030 | |
| 1031 | 1031 | if (empty($accountancy_code_sell) || $accountancy_code_sell == '-1') { |
| 1032 | 1032 | $object->accountancy_code_sell = ''; |
@@ -1035,7 +1035,7 @@ discard block |
||
| 1035 | 1035 | } |
| 1036 | 1036 | } |
| 1037 | 1037 | if (GETPOSTISSET('accountancy_code_buy')) { |
| 1038 | - $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
| 1038 | + $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
| 1039 | 1039 | |
| 1040 | 1040 | if (empty($accountancy_code_buy) || $accountancy_code_buy == '-1') { |
| 1041 | 1041 | $object->accountancy_code_buy = ''; |
@@ -1160,7 +1160,7 @@ discard block |
||
| 1160 | 1160 | |
| 1161 | 1161 | print '<script type="text/javascript">'; |
| 1162 | 1162 | print '$(document).ready(function () { |
| 1163 | - var canHaveCustomerCategoryIfNotCustomerProspectSupplier = ' . (!getDolGlobalString('THIRDPARTY_CAN_HAVE_CUSTOMER_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT') ? '0' : '1') . '; |
|
| 1163 | + var canHaveCustomerCategoryIfNotCustomerProspectSupplier = ' . (!getDolGlobalString('THIRDPARTY_CAN_HAVE_CUSTOMER_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT') ? '0' : '1').'; |
|
| 1164 | 1164 | |
| 1165 | 1165 | init_customer_categ(); |
| 1166 | 1166 | $("#customerprospect").change(function() { |
@@ -1232,7 +1232,7 @@ discard block |
||
| 1232 | 1232 | print '</td><td'.(!getDolGlobalString('SOCIETE_USEPREFIX') ? ' colspan="3"' : '').'>'; |
| 1233 | 1233 | |
| 1234 | 1234 | print '<input type="text" class="minwidth300" maxlength="128" name="name" id="name" value="'.dol_escape_htmltag($object->name).'" autofocus="autofocus">'; |
| 1235 | - print $form->widgetForTranslation("name", $object, $permissiontoadd, 'string', 'alphanohtml', 'minwidth300'); // For some countries that need the company name in 2 languages |
|
| 1235 | + print $form->widgetForTranslation("name", $object, $permissiontoadd, 'string', 'alphanohtml', 'minwidth300'); // For some countries that need the company name in 2 languages |
|
| 1236 | 1236 | // 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 |
| 1237 | 1237 | // 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. |
| 1238 | 1238 | /* |
@@ -1494,7 +1494,7 @@ discard block |
||
| 1494 | 1494 | if ($conf->browser->layout == 'phone') { |
| 1495 | 1495 | print '</tr><tr>'; |
| 1496 | 1496 | } |
| 1497 | - print '<td class="individualline noemail">'.$form->editfieldkey($langs->trans('No_Email') .' ('.$langs->trans('Contact').')', 'contact_no_email', '', $object, 0).'</td>'; |
|
| 1497 | + print '<td class="individualline noemail">'.$form->editfieldkey($langs->trans('No_Email').' ('.$langs->trans('Contact').')', 'contact_no_email', '', $object, 0).'</td>'; |
|
| 1498 | 1498 | 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>'; |
| 1499 | 1499 | } |
| 1500 | 1500 | print '</tr>'; |
@@ -1567,7 +1567,7 @@ discard block |
||
| 1567 | 1567 | // Vat is used |
| 1568 | 1568 | print '<tr><td>'.$form->editfieldkey('VATIsUsed', 'assujtva_value', '', $object, 0).'</td>'; |
| 1569 | 1569 | print '<td>'; |
| 1570 | - print '<input id="assujtva_value" name="assujtva_value" type="checkbox" ' . (GETPOSTISSET('assujtva_value') ? 'checked="checked"' : 'checked="checked"') . ' value="1">'; // Assujeti par default en creation |
|
| 1570 | + print '<input id="assujtva_value" name="assujtva_value" type="checkbox" '.(GETPOSTISSET('assujtva_value') ? 'checked="checked"' : 'checked="checked"').' value="1">'; // Assujeti par default en creation |
|
| 1571 | 1571 | print '</td>'; |
| 1572 | 1572 | if ($conf->browser->layout == 'phone') { |
| 1573 | 1573 | print '</tr><tr>'; |
@@ -1608,7 +1608,7 @@ discard block |
||
| 1608 | 1608 | |
| 1609 | 1609 | // VAT reverse charge by default |
| 1610 | 1610 | if (getDolGlobalString('ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE')) { |
| 1611 | - print '<tr><td>' . $form->editfieldkey('VATReverseChargeByDefault', 'vat_reverse_charge', '', $object, 0) . '</td><td colspan="3">'; |
|
| 1611 | + print '<tr><td>'.$form->editfieldkey('VATReverseChargeByDefault', 'vat_reverse_charge', '', $object, 0).'</td><td colspan="3">'; |
|
| 1612 | 1612 | print '<input type="checkbox" name="vat_reverse_charge" '.($object->vat_reverse_charge == '1' ? ' checked' : '').'>'; |
| 1613 | 1613 | print '</td></tr>'; |
| 1614 | 1614 | } |
@@ -1617,21 +1617,21 @@ discard block |
||
| 1617 | 1617 | //TODO: Place into a function to control showing by country or study better option |
| 1618 | 1618 | if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") { |
| 1619 | 1619 | print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).'</td><td>'; |
| 1620 | - print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" ' . (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? 'checked="checked"' : '') . ' value="1">'; |
|
| 1620 | + print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" '.(isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? 'checked="checked"' : '').' value="1">'; |
|
| 1621 | 1621 | print '</td>'; |
| 1622 | 1622 | if ($conf->browser->layout == 'phone') { |
| 1623 | 1623 | print '</tr><tr>'; |
| 1624 | 1624 | } |
| 1625 | 1625 | print '<td>'.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).'</td><td>'; |
| 1626 | - print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" ' . (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? 'checked="checked"' : '') . ' value="1">'; |
|
| 1626 | + print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" '.(isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? 'checked="checked"' : '').' value="1">'; |
|
| 1627 | 1627 | print '</td></tr>'; |
| 1628 | 1628 | } elseif ($mysoc->localtax1_assuj == "1") { |
| 1629 | 1629 | print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).'</td><td colspan="3">'; |
| 1630 | - print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" ' . (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? 'checked="checked"' : '') . ' value="1">'; |
|
| 1630 | + print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" '.(isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? 'checked="checked"' : '').' value="1">'; |
|
| 1631 | 1631 | print '</td></tr>'; |
| 1632 | 1632 | } elseif ($mysoc->localtax2_assuj == "1") { |
| 1633 | 1633 | print '<tr><td>'.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).'</td><td colspan="3">'; |
| 1634 | - print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" ' . (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? 'checked="checked"' : '') . ' value="1">'; |
|
| 1634 | + print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" '.(isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? 'checked="checked"' : '').' value="1">'; |
|
| 1635 | 1635 | print '</td></tr>'; |
| 1636 | 1636 | } |
| 1637 | 1637 | |
@@ -1871,10 +1871,10 @@ discard block |
||
| 1871 | 1871 | } |
| 1872 | 1872 | |
| 1873 | 1873 | $object->phone = GETPOST('phone', 'alpha'); |
| 1874 | - $object->phone_mobile = (string) GETPOST('phone_mobile', 'alpha'); |
|
| 1874 | + $object->phone_mobile = (string) GETPOST('phone_mobile', 'alpha'); |
|
| 1875 | 1875 | $object->fax = GETPOST('fax', 'alpha'); |
| 1876 | 1876 | $object->email = GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL); |
| 1877 | - $object->no_email = GETPOST("no_email", "int"); |
|
| 1877 | + $object->no_email = GETPOST("no_email", "int"); |
|
| 1878 | 1878 | $object->url = GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL); |
| 1879 | 1879 | $object->capital = GETPOST('capital', 'alphanohtml'); |
| 1880 | 1880 | $object->idprof1 = GETPOST('idprof1', 'alphanohtml'); |
@@ -1890,16 +1890,16 @@ discard block |
||
| 1890 | 1890 | $object->default_lang = GETPOST('default_lang', 'alpha'); |
| 1891 | 1891 | |
| 1892 | 1892 | $object->tva_assuj = GETPOST('assujtva_value', 'int'); |
| 1893 | - $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
|
| 1893 | + $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
|
| 1894 | 1894 | $object->tva_intra = GETPOST('tva_intra', 'alphanohtml'); |
| 1895 | - $object->status = GETPOST('status', 'int'); |
|
| 1895 | + $object->status = GETPOST('status', 'int'); |
|
| 1896 | 1896 | |
| 1897 | 1897 | // Webservices url/key |
| 1898 | 1898 | $object->webservices_url = GETPOST('webservices_url', 'custom', 0, FILTER_SANITIZE_URL); |
| 1899 | 1899 | $object->webservices_key = GETPOST('webservices_key', 'san_alpha'); |
| 1900 | 1900 | |
| 1901 | 1901 | if (GETPOSTISSET('accountancy_code_sell')) { |
| 1902 | - $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
| 1902 | + $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
| 1903 | 1903 | |
| 1904 | 1904 | if (empty($accountancy_code_sell) || $accountancy_code_sell == '-1') { |
| 1905 | 1905 | $object->accountancy_code_sell = ''; |
@@ -1908,7 +1908,7 @@ discard block |
||
| 1908 | 1908 | } |
| 1909 | 1909 | } |
| 1910 | 1910 | if (GETPOSTISSET('accountancy_code_buy')) { |
| 1911 | - $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
| 1911 | + $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
| 1912 | 1912 | |
| 1913 | 1913 | if (empty($accountancy_code_buy) || $accountancy_code_buy == '-1') { |
| 1914 | 1914 | $object->accountancy_code_buy = ''; |
@@ -1990,7 +1990,7 @@ discard block |
||
| 1990 | 1990 | } |
| 1991 | 1991 | }); |
| 1992 | 1992 | |
| 1993 | - var canHaveCustomerCategoryIfNotCustomerProspect = ' . (getDolGlobalInt('THIRDPARTY_CAN_HAVE_CUSTOMER_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT') ? '1' : '0') . '; |
|
| 1993 | + var canHaveCustomerCategoryIfNotCustomerProspect = ' . (getDolGlobalInt('THIRDPARTY_CAN_HAVE_CUSTOMER_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT') ? '1' : '0').'; |
|
| 1994 | 1994 | |
| 1995 | 1995 | init_customer_categ(); |
| 1996 | 1996 | $("#customerprospect").change(function() { |
@@ -2307,14 +2307,14 @@ discard block |
||
| 2307 | 2307 | |
| 2308 | 2308 | // VAT is used |
| 2309 | 2309 | print '<tr><td>'.$form->editfieldkey('VATIsUsed', 'assujtva_value', '', $object, 0).'</td><td colspan="3">'; |
| 2310 | - print '<input id="assujtva_value" name="assujtva_value" type="checkbox" ' . ($object->tva_assuj ? 'checked="checked"' : '') . ' value="1">'; |
|
| 2310 | + print '<input id="assujtva_value" name="assujtva_value" type="checkbox" '.($object->tva_assuj ? 'checked="checked"' : '').' value="1">'; |
|
| 2311 | 2311 | print '</td></tr>'; |
| 2312 | 2312 | |
| 2313 | 2313 | // Local Taxes |
| 2314 | 2314 | //TODO: Place into a function to control showing by country or study better option |
| 2315 | 2315 | if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") { |
| 2316 | 2316 | print '<tr><td>'.$form->editfieldkey($langs->transcountry("LocalTax1IsUsed", $mysoc->country_code), 'localtax1assuj_value', '', $object, 0).'</td><td>'; |
| 2317 | - print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" ' . ($object->localtax1_assuj ? 'checked="checked"' : '') . ' value="1">'; |
|
| 2317 | + print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" '.($object->localtax1_assuj ? 'checked="checked"' : '').' value="1">'; |
|
| 2318 | 2318 | if (!isOnlyOneLocalTax(1)) { |
| 2319 | 2319 | print '<span class="cblt1"> '.$langs->transcountry("Type", $mysoc->country_code).': '; |
| 2320 | 2320 | $formcompany->select_localtax(1, $object->localtax1_value, "lt1"); |
@@ -2323,7 +2323,7 @@ discard block |
||
| 2323 | 2323 | print '</td>'; |
| 2324 | 2324 | print '</tr><tr>'; |
| 2325 | 2325 | print '<td>'.$form->editfieldkey($langs->transcountry("LocalTax2IsUsed", $mysoc->country_code), 'localtax2assuj_value', '', $object, 0).'</td><td>'; |
| 2326 | - print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" ' . ($object->localtax2_assuj ? 'checked="checked"' : '') . ' value="1"></td></tr>'; |
|
| 2326 | + print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" '.($object->localtax2_assuj ? 'checked="checked"' : '').' value="1"></td></tr>'; |
|
| 2327 | 2327 | if (!isOnlyOneLocalTax(2)) { |
| 2328 | 2328 | print '<span class="cblt2"> '.$langs->transcountry("Type", $mysoc->country_code).': '; |
| 2329 | 2329 | $formcompany->select_localtax(2, $object->localtax2_value, "lt2"); |
@@ -2332,7 +2332,7 @@ discard block |
||
| 2332 | 2332 | print '</td></tr>'; |
| 2333 | 2333 | } elseif ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj != "1") { |
| 2334 | 2334 | print '<tr><td>'.$form->editfieldkey($langs->transcountry("LocalTax1IsUsed", $mysoc->country_code), 'localtax1assuj_value', '', $object, 0).'</td><td colspan="3">'; |
| 2335 | - print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" ' . ($object->localtax1_assuj ? 'checked="checked"' : '') . ' value="1">'; |
|
| 2335 | + print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" '.($object->localtax1_assuj ? 'checked="checked"' : '').' value="1">'; |
|
| 2336 | 2336 | if (!isOnlyOneLocalTax(1)) { |
| 2337 | 2337 | print '<span class="cblt1"> '.$langs->transcountry("Type", $mysoc->country_code).': '; |
| 2338 | 2338 | $formcompany->select_localtax(1, $object->localtax1_value, "lt1"); |
@@ -2341,7 +2341,7 @@ discard block |
||
| 2341 | 2341 | print '</td></tr>'; |
| 2342 | 2342 | } elseif ($mysoc->localtax2_assuj == "1" && $mysoc->localtax1_assuj != "1") { |
| 2343 | 2343 | print '<tr><td>'.$form->editfieldkey($langs->transcountry("LocalTax2IsUsed", $mysoc->country_code), 'localtax2assuj_value', '', $object, 0).'</td><td colspan="3">'; |
| 2344 | - print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" ' . ($object->localtax2_assuj ? 'checked="checked"' : '') . ' value="1">'; |
|
| 2344 | + print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" '.($object->localtax2_assuj ? 'checked="checked"' : '').' value="1">'; |
|
| 2345 | 2345 | if (!isOnlyOneLocalTax(2)) { |
| 2346 | 2346 | print '<span class="cblt2"> '.$langs->transcountry("Type", $mysoc->country_code).': '; |
| 2347 | 2347 | $formcompany->select_localtax(2, $object->localtax2_value, "lt2"); |
@@ -2352,7 +2352,7 @@ discard block |
||
| 2352 | 2352 | |
| 2353 | 2353 | // VAT reverse charge by default |
| 2354 | 2354 | if (getDolGlobalString('ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE')) { |
| 2355 | - print '<tr><td>' . $form->editfieldkey('VATReverseChargeByDefault', 'vat_reverse_charge', '', $object, 0) . '</td><td colspan="3">'; |
|
| 2355 | + print '<tr><td>'.$form->editfieldkey('VATReverseChargeByDefault', 'vat_reverse_charge', '', $object, 0).'</td><td colspan="3">'; |
|
| 2356 | 2356 | print '<input type="checkbox" name="vat_reverse_charge" '.($object->vat_reverse_charge == '1' ? ' checked' : '').'>'; |
| 2357 | 2357 | print '</td></tr>'; |
| 2358 | 2358 | } |
@@ -2529,7 +2529,7 @@ discard block |
||
| 2529 | 2529 | $maxfilesizearray = getMaxFileSizeArray(); |
| 2530 | 2530 | $maxmin = $maxfilesizearray['maxmin']; |
| 2531 | 2531 | if ($maxmin > 0) { |
| 2532 | - print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 2532 | + print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 2533 | 2533 | } |
| 2534 | 2534 | print '<input type="file" class="flat" name="photo" id="photoinput">'; |
| 2535 | 2535 | print '</td></tr>'; |
@@ -2750,7 +2750,7 @@ discard block |
||
| 2750 | 2750 | print '<tr><td>'; |
| 2751 | 2751 | print $form->textwithpicto($langs->trans('VATReverseChargeByDefault'), $langs->trans('VATReverseChargeByDefaultDesc')); |
| 2752 | 2752 | print '</td><td>'; |
| 2753 | - print '<input type="checkbox" name="vat_reverse_charge" ' . ($object->vat_reverse_charge == '1' ? ' checked' : '') . ' disabled>'; |
|
| 2753 | + print '<input type="checkbox" name="vat_reverse_charge" '.($object->vat_reverse_charge == '1' ? ' checked' : '').' disabled>'; |
|
| 2754 | 2754 | print '</td>'; |
| 2755 | 2755 | print '</tr>'; |
| 2756 | 2756 | } |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | * \remarks Class that extends all PHPunit tests. To share similare code between each test. |
| 26 | 26 | */ |
| 27 | 27 | |
| 28 | -global $conf,$user,$langs,$db; |
|
| 28 | +global $conf, $user, $langs, $db; |
|
| 29 | 29 | //define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver |
| 30 | 30 | //require_once 'PHPUnit/Autoload.php'; |
| 31 | 31 | require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | parent::__construct($name, $data, $dataName); |
| 75 | 75 | |
| 76 | 76 | //$this->sharedFixture |
| 77 | - global $conf,$user,$langs,$db; |
|
| 77 | + global $conf, $user, $langs, $db; |
|
| 78 | 78 | $this->savconf = $conf; |
| 79 | 79 | $this->savuser = $user; |
| 80 | 80 | $this->savlangs = $langs; |
@@ -93,7 +93,7 @@ discard block |
||
| 93 | 93 | */ |
| 94 | 94 | public static function setUpBeforeClass(): void |
| 95 | 95 | { |
| 96 | - global $conf,$user,$langs,$db; |
|
| 96 | + global $conf, $user, $langs, $db; |
|
| 97 | 97 | $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. |
| 98 | 98 | |
| 99 | 99 | if ((int) getenv('PHPUNIT_DEBUG') > 0) { |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | */ |
| 152 | 152 | protected function setUp(): void |
| 153 | 153 | { |
| 154 | - global $conf,$user,$langs,$db; |
|
| 154 | + global $conf, $user, $langs, $db; |
|
| 155 | 155 | |
| 156 | 156 | $conf = $this->savconf; |
| 157 | 157 | $user = $this->savuser; |
@@ -221,7 +221,7 @@ discard block |
||
| 221 | 221 | 'accounting' => 'Accounting', |
| 222 | 222 | 'agenda' => 'Agenda', |
| 223 | 223 | 'ai' => 'Ai', |
| 224 | - 'anothermodule' => null, // Not used in code, used in translations.lang |
|
| 224 | + 'anothermodule' => null, // Not used in code, used in translations.lang |
|
| 225 | 225 | 'api' => 'Api', |
| 226 | 226 | 'asset' => 'Asset', |
| 227 | 227 | 'bank' => 'Banque', |
@@ -233,9 +233,9 @@ discard block |
||
| 233 | 233 | 'cashdesk' => null, |
| 234 | 234 | 'category' => 'Categorie', |
| 235 | 235 | 'clicktodial' => 'ClickToDial', |
| 236 | - 'collab' => 'Collab', // TODO: fill in proper name |
|
| 236 | + 'collab' => 'Collab', // TODO: fill in proper name |
|
| 237 | 237 | 'comptabilite' => 'Comptabilite', |
| 238 | - 'contact' => null, // TODO: fill in proper class |
|
| 238 | + 'contact' => null, // TODO: fill in proper class |
|
| 239 | 239 | 'contract' => 'Contrat', |
| 240 | 240 | 'cron' => 'Cron', |
| 241 | 241 | 'datapolicy' => 'DataPolicy', |
@@ -243,22 +243,22 @@ discard block |
||
| 243 | 243 | 'debugbar' => 'DebugBar', |
| 244 | 244 | 'delivery_note' => 'Expedition', |
| 245 | 245 | 'deplacement' => 'Deplacement', |
| 246 | - "documentgeneration" => 'DocumentGeneration', // TODO: fill in proper name |
|
| 246 | + "documentgeneration" => 'DocumentGeneration', // TODO: fill in proper name |
|
| 247 | 247 | 'don' => 'Don', |
| 248 | 248 | 'dynamicprices' => 'DynamicPrices', |
| 249 | 249 | 'ecm' => 'ECM', |
| 250 | - 'ecotax' => null, // TODO: External module ? |
|
| 250 | + 'ecotax' => null, // TODO: External module ? |
|
| 251 | 251 | 'emailcollector' => 'EmailCollector', |
| 252 | 252 | 'eventorganization' => 'EventOrganization', |
| 253 | 253 | 'expensereport' => 'ExpenseReport', |
| 254 | 254 | 'export' => 'Export', |
| 255 | - 'externalrss' => 'ExternalRss', // TODO: fill in proper name |
|
| 255 | + 'externalrss' => 'ExternalRss', // TODO: fill in proper name |
|
| 256 | 256 | 'externalsite' => 'ExternalSite', |
| 257 | 257 | 'fckeditor' => 'Fckeditor', |
| 258 | 258 | 'fournisseur' => 'Fournisseur', |
| 259 | 259 | 'ftp' => 'FTP', |
| 260 | - 'geoipmaxmind' => 'GeoIPMaxmind', // TODO: fill in proper name |
|
| 261 | - 'google' => null, // External ? |
|
| 260 | + 'geoipmaxmind' => 'GeoIPMaxmind', // TODO: fill in proper name |
|
| 261 | + 'google' => null, // External ? |
|
| 262 | 262 | 'gravatar' => 'Gravatar', |
| 263 | 263 | 'holiday' => 'Holiday', |
| 264 | 264 | 'hrm' => 'HRM', |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | 'ldap' => 'Ldap', |
| 273 | 273 | 'loan' => 'Loan', |
| 274 | 274 | 'mailing' => 'Mailing', |
| 275 | - 'mailman' => null, // Same module as mailmanspip -> MailmanSpip ?? |
|
| 275 | + 'mailman' => null, // Same module as mailmanspip -> MailmanSpip ?? |
|
| 276 | 276 | 'mailmanspip' => 'MailmanSpip', |
| 277 | 277 | 'margin' => 'Margin', |
| 278 | 278 | 'member' => 'Adherent', |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | 'notification' => 'Notification', |
| 286 | 286 | 'numberwords' => null, // Not provided by default, no module tests |
| 287 | 287 | 'oauth' => 'Oauth', |
| 288 | - 'openstreetmap' => null, // External module? |
|
| 288 | + 'openstreetmap' => null, // External module? |
|
| 289 | 289 | 'opensurvey' => 'OpenSurvey', |
| 290 | 290 | 'order' => 'Commande', |
| 291 | 291 | 'partnership' => 'Partnership', |
@@ -312,8 +312,8 @@ discard block |
||
| 312 | 312 | 'stock' => 'Stock', |
| 313 | 313 | 'stocktransfer' => 'StockTransfer', |
| 314 | 314 | 'stripe' => 'Stripe', |
| 315 | - 'supplier_invoice' => null, // Special case, uses invoice |
|
| 316 | - 'supplier_order' => null, // Special case, uses invoice |
|
| 315 | + 'supplier_invoice' => null, // Special case, uses invoice |
|
| 316 | + 'supplier_order' => null, // Special case, uses invoice |
|
| 317 | 317 | 'supplier_proposal' => 'SupplierProposal', |
| 318 | 318 | 'syslog' => 'Syslog', |
| 319 | 319 | 'takepos' => 'TakePos', |
@@ -324,7 +324,7 @@ discard block |
||
| 324 | 324 | 'webhook' => 'Webhook', |
| 325 | 325 | 'webportal' => 'WebPortal', |
| 326 | 326 | 'webservices' => 'WebServices', |
| 327 | - 'webservicesclient' => 'WebServicesClient', // TODO: set proper name |
|
| 327 | + 'webservicesclient' => 'WebServicesClient', // TODO: set proper name |
|
| 328 | 328 | 'website' => 'Website', |
| 329 | 329 | 'workflow' => 'Workflow', |
| 330 | 330 | 'workstation' => 'Workstation', |