@@ -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)) { |
@@ -151,12 +151,12 @@ discard block |
||
151 | 151 | } |
152 | 152 | |
153 | 153 | // Permissions |
154 | -$permissiontoread = $user->hasRight('societe', 'lire'); |
|
155 | -$permissiontoadd = $user->hasRight('societe', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
154 | +$permissiontoread = $user->hasRight('societe', 'lire'); |
|
155 | +$permissiontoadd = $user->hasRight('societe', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
156 | 156 | $permissiontodelete = $user->hasRight('societe', 'supprimer') || ($permissiontoadd && isset($object->status) && $object->status == 0); |
157 | -$permissionnote = $user->hasRight('societe', 'creer'); // Used by the include of actions_setnotes.inc.php |
|
157 | +$permissionnote = $user->hasRight('societe', 'creer'); // Used by the include of actions_setnotes.inc.php |
|
158 | 158 | $permissiondellink = $user->hasRight('societe', 'creer'); // Used by the include of actions_dellink.inc.php |
159 | -$upload_dir = $conf->societe->multidir_output[isset($object->entity) ? $object->entity : 1]; |
|
159 | +$upload_dir = $conf->societe->multidir_output[isset($object->entity) ? $object->entity : 1]; |
|
160 | 160 | |
161 | 161 | // Security check |
162 | 162 | $result = restrictedArea($user, 'societe', $socid, '&societe', '', 'fk_soc', 'rowid', 0); |
@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | |
200 | 200 | if ($action == 'confirm_merge' && $confirm == 'yes' && $user->hasRight('societe', 'creer')) { |
201 | 201 | $soc_origin_id = GETPOST('soc_origin', 'int'); |
202 | - $soc_origin = new Societe($db); // The thirdparty that we will delete |
|
202 | + $soc_origin = new Societe($db); // The thirdparty that we will delete |
|
203 | 203 | |
204 | 204 | if ($soc_origin_id <= 0) { |
205 | 205 | $langs->load('errors'); |
@@ -288,12 +288,12 @@ discard block |
||
288 | 288 | $error++; |
289 | 289 | } |
290 | 290 | |
291 | - if (isModEnabled('mailing') && getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2 && GETPOST('contact_no_email', 'int')==-1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) { |
|
291 | + if (isModEnabled('mailing') && getDolGlobalInt('MAILING_CONTACT_DEFAULT_BULK_STATUS') == 2 && GETPOST('contact_no_email', 'int') == -1 && !empty(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL))) { |
|
292 | 292 | $error++; |
293 | 293 | setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("No_Email")), null, 'errors'); |
294 | 294 | } |
295 | 295 | |
296 | - 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))) { |
|
296 | + 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))) { |
|
297 | 297 | $error++; |
298 | 298 | setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("No_Email")), null, 'errors'); |
299 | 299 | } |
@@ -312,19 +312,19 @@ discard block |
||
312 | 312 | $object->name = dolGetFirstLastname(GETPOST('firstname', 'alphanohtml'), GETPOST('name', 'alphanohtml')); |
313 | 313 | $object->civility_id = GETPOST('civility_id', 'alphanohtml'); // Note: civility id is a code, not an int |
314 | 314 | // Add non official properties |
315 | - $object->name_bis = GETPOST('name', 'alphanohtml'); |
|
316 | - $object->firstname = GETPOST('firstname', 'alphanohtml'); |
|
315 | + $object->name_bis = GETPOST('name', 'alphanohtml'); |
|
316 | + $object->firstname = GETPOST('firstname', 'alphanohtml'); |
|
317 | 317 | } else { |
318 | - $object->name = GETPOST('name', 'alphanohtml'); |
|
318 | + $object->name = GETPOST('name', 'alphanohtml'); |
|
319 | 319 | } |
320 | 320 | $object->entity = (GETPOSTISSET('entity') ? GETPOST('entity', 'int') : $conf->entity); |
321 | - $object->name_alias = GETPOST('name_alias', 'alphanohtml'); |
|
321 | + $object->name_alias = GETPOST('name_alias', 'alphanohtml'); |
|
322 | 322 | $object->parent = GETPOST('parent_company_id', 'int'); |
323 | 323 | $object->address = GETPOST('address', 'alphanohtml'); |
324 | - $object->zip = GETPOST('zipcode', 'alphanohtml'); |
|
325 | - $object->town = GETPOST('town', 'alphanohtml'); |
|
326 | - $object->country_id = GETPOST('country_id', 'int'); |
|
327 | - $object->state_id = GETPOST('state_id', 'int'); |
|
324 | + $object->zip = GETPOST('zipcode', 'alphanohtml'); |
|
325 | + $object->town = GETPOST('town', 'alphanohtml'); |
|
326 | + $object->country_id = GETPOST('country_id', 'int'); |
|
327 | + $object->state_id = GETPOST('state_id', 'int'); |
|
328 | 328 | |
329 | 329 | $object->socialnetworks = array(); |
330 | 330 | if (isModEnabled('socialnetworks')) { |
@@ -338,7 +338,7 @@ discard block |
||
338 | 338 | $object->phone = GETPOST('phone', 'alpha'); |
339 | 339 | $object->fax = GETPOST('fax', 'alpha'); |
340 | 340 | $object->email = trim(GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL)); |
341 | - $object->no_email = GETPOST("no_email", "int"); |
|
341 | + $object->no_email = GETPOST("no_email", "int"); |
|
342 | 342 | $object->url = trim(GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL)); |
343 | 343 | $object->idprof1 = trim(GETPOST('idprof1', 'alphanohtml')); |
344 | 344 | $object->idprof2 = trim(GETPOST('idprof2', 'alphanohtml')); |
@@ -348,13 +348,13 @@ discard block |
||
348 | 348 | $object->idprof6 = trim(GETPOST('idprof6', 'alphanohtml')); |
349 | 349 | $object->prefix_comm = GETPOST('prefix_comm', 'alphanohtml'); |
350 | 350 | $object->code_client = GETPOSTISSET('customer_code') ? GETPOST('customer_code', 'alpha') : GETPOST('code_client', 'alpha'); |
351 | - $object->code_fournisseur = GETPOSTISSET('supplier_code') ? GETPOST('supplier_code', 'alpha') : GETPOST('code_fournisseur', 'alpha'); |
|
351 | + $object->code_fournisseur = GETPOSTISSET('supplier_code') ? GETPOST('supplier_code', 'alpha') : GETPOST('code_fournisseur', 'alpha'); |
|
352 | 352 | $object->capital = GETPOST('capital', 'alphanohtml'); |
353 | 353 | $object->barcode = GETPOST('barcode', 'alphanohtml'); |
354 | 354 | |
355 | 355 | $object->tva_intra = GETPOST('tva_intra', 'alphanohtml'); |
356 | 356 | $object->tva_assuj = GETPOST('assujtva_value', 'alpha'); |
357 | - $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
|
357 | + $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
|
358 | 358 | $object->status = GETPOST('status', 'alpha'); |
359 | 359 | |
360 | 360 | // Local Taxes |
@@ -364,24 +364,24 @@ discard block |
||
364 | 364 | $object->localtax1_value = GETPOST('lt1', 'alpha'); |
365 | 365 | $object->localtax2_value = GETPOST('lt2', 'alpha'); |
366 | 366 | |
367 | - $object->forme_juridique_code = GETPOST('forme_juridique_code', 'int'); |
|
367 | + $object->forme_juridique_code = GETPOST('forme_juridique_code', 'int'); |
|
368 | 368 | $object->effectif_id = GETPOST('effectif_id', 'int'); |
369 | - $object->typent_id = GETPOST('typent_id', 'int'); |
|
369 | + $object->typent_id = GETPOST('typent_id', 'int'); |
|
370 | 370 | |
371 | 371 | $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 |
372 | 372 | |
373 | - $object->client = GETPOST('client', 'int'); |
|
373 | + $object->client = GETPOST('client', 'int'); |
|
374 | 374 | $object->fournisseur = GETPOST('fournisseur', 'int'); |
375 | 375 | |
376 | - $object->commercial_id = GETPOST('commercial_id', 'int'); |
|
377 | - $object->default_lang = GETPOST('default_lang'); |
|
376 | + $object->commercial_id = GETPOST('commercial_id', 'int'); |
|
377 | + $object->default_lang = GETPOST('default_lang'); |
|
378 | 378 | |
379 | 379 | // Webservices url/key |
380 | 380 | $object->webservices_url = GETPOST('webservices_url', 'custom', 0, FILTER_SANITIZE_URL); |
381 | 381 | $object->webservices_key = GETPOST('webservices_key', 'san_alpha'); |
382 | 382 | |
383 | 383 | if (GETPOSTISSET('accountancy_code_sell')) { |
384 | - $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
384 | + $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
385 | 385 | |
386 | 386 | if (empty($accountancy_code_sell) || $accountancy_code_sell == '-1') { |
387 | 387 | $object->accountancy_code_sell = ''; |
@@ -390,7 +390,7 @@ discard block |
||
390 | 390 | } |
391 | 391 | } |
392 | 392 | if (GETPOSTISSET('accountancy_code_buy')) { |
393 | - $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
393 | + $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
394 | 394 | |
395 | 395 | if (empty($accountancy_code_buy) || $accountancy_code_buy == '-1') { |
396 | 396 | $object->accountancy_code_buy = ''; |
@@ -1004,7 +1004,7 @@ discard block |
||
1004 | 1004 | $object->civility_id = GETPOST('civility_id', 'alpha'); |
1005 | 1005 | |
1006 | 1006 | $object->tva_assuj = GETPOST('assujtva_value', 'int'); |
1007 | - $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
|
1007 | + $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
|
1008 | 1008 | $object->status = GETPOST('status', 'int'); |
1009 | 1009 | |
1010 | 1010 | //Local Taxes |
@@ -1020,7 +1020,7 @@ discard block |
||
1020 | 1020 | $object->default_lang = GETPOST('default_lang'); |
1021 | 1021 | |
1022 | 1022 | if (GETPOSTISSET('accountancy_code_sell')) { |
1023 | - $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
1023 | + $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
1024 | 1024 | |
1025 | 1025 | if (empty($accountancy_code_sell) || $accountancy_code_sell == '-1') { |
1026 | 1026 | $object->accountancy_code_sell = ''; |
@@ -1029,7 +1029,7 @@ discard block |
||
1029 | 1029 | } |
1030 | 1030 | } |
1031 | 1031 | if (GETPOSTISSET('accountancy_code_buy')) { |
1032 | - $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
1032 | + $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
1033 | 1033 | |
1034 | 1034 | if (empty($accountancy_code_buy) || $accountancy_code_buy == '-1') { |
1035 | 1035 | $object->accountancy_code_buy = ''; |
@@ -1154,7 +1154,7 @@ discard block |
||
1154 | 1154 | |
1155 | 1155 | print '<script type="text/javascript">'; |
1156 | 1156 | print '$(document).ready(function () { |
1157 | - var canHaveCategoryIfNotCustomerProspectSupplier = ' . (!getDolGlobalString('THIRDPARTY_CAN_HAVE_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT') ? '0' : '1') . '; |
|
1157 | + var canHaveCategoryIfNotCustomerProspectSupplier = ' . (!getDolGlobalString('THIRDPARTY_CAN_HAVE_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT') ? '0' : '1').'; |
|
1158 | 1158 | |
1159 | 1159 | init_customer_categ(); |
1160 | 1160 | $("#customerprospect").change(function() { |
@@ -1226,7 +1226,7 @@ discard block |
||
1226 | 1226 | print '</td><td'.(!getDolGlobalString('SOCIETE_USEPREFIX') ? ' colspan="3"' : '').'>'; |
1227 | 1227 | |
1228 | 1228 | print '<input type="text" class="minwidth300" maxlength="128" name="name" id="name" value="'.dol_escape_htmltag($object->name).'" autofocus="autofocus">'; |
1229 | - print $form->widgetForTranslation("name", $object, $permissiontoadd, 'string', 'alpahnohtml', 'minwidth300'); // For some countries that need the company name in 2 languages |
|
1229 | + print $form->widgetForTranslation("name", $object, $permissiontoadd, 'string', 'alpahnohtml', 'minwidth300'); // For some countries that need the company name in 2 languages |
|
1230 | 1230 | // 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 |
1231 | 1231 | // 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. |
1232 | 1232 | /* |
@@ -1484,7 +1484,7 @@ discard block |
||
1484 | 1484 | if ($conf->browser->layout == 'phone') { |
1485 | 1485 | print '</tr><tr>'; |
1486 | 1486 | } |
1487 | - print '<td class="individualline noemail">'.$form->editfieldkey($langs->trans('No_Email') .' ('.$langs->trans('Contact').')', 'contact_no_email', '', $object, 0).'</td>'; |
|
1487 | + print '<td class="individualline noemail">'.$form->editfieldkey($langs->trans('No_Email').' ('.$langs->trans('Contact').')', 'contact_no_email', '', $object, 0).'</td>'; |
|
1488 | 1488 | 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>'; |
1489 | 1489 | } |
1490 | 1490 | print '</tr>'; |
@@ -1557,7 +1557,7 @@ discard block |
||
1557 | 1557 | // Vat is used |
1558 | 1558 | print '<tr><td>'.$form->editfieldkey('VATIsUsed', 'assujtva_value', '', $object, 0).'</td>'; |
1559 | 1559 | print '<td>'; |
1560 | - print '<input id="assujtva_value" name="assujtva_value" type="checkbox" ' . (GETPOSTISSET('assujtva_value') ? 'checked="checked"' : 'checked="checked"') . ' value="1">'; // Assujeti par defaut en creation |
|
1560 | + print '<input id="assujtva_value" name="assujtva_value" type="checkbox" '.(GETPOSTISSET('assujtva_value') ? 'checked="checked"' : 'checked="checked"').' value="1">'; // Assujeti par defaut en creation |
|
1561 | 1561 | print '</td>'; |
1562 | 1562 | if ($conf->browser->layout == 'phone') { |
1563 | 1563 | print '</tr><tr>'; |
@@ -1598,7 +1598,7 @@ discard block |
||
1598 | 1598 | |
1599 | 1599 | // VAT reverse charge by default |
1600 | 1600 | if (getDolGlobalString('ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE')) { |
1601 | - print '<tr><td>' . $form->editfieldkey('VATReverseChargeByDefault', 'vat_reverse_charge', '', $object, 0) . '</td><td colspan="3">'; |
|
1601 | + print '<tr><td>'.$form->editfieldkey('VATReverseChargeByDefault', 'vat_reverse_charge', '', $object, 0).'</td><td colspan="3">'; |
|
1602 | 1602 | print '<input type="checkbox" name="vat_reverse_charge" '.($object->vat_reverse_charge == '1' ? ' checked' : '').'>'; |
1603 | 1603 | print '</td></tr>'; |
1604 | 1604 | } |
@@ -1607,21 +1607,21 @@ discard block |
||
1607 | 1607 | //TODO: Place into a function to control showing by country or study better option |
1608 | 1608 | if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") { |
1609 | 1609 | print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).'</td><td>'; |
1610 | - print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" ' . (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? 'checked="checked"' : '') . ' value="1">'; |
|
1610 | + print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" '.(isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX1) ? 'checked="checked"' : '').' value="1">'; |
|
1611 | 1611 | print '</td>'; |
1612 | 1612 | if ($conf->browser->layout == 'phone') { |
1613 | 1613 | print '</tr><tr>'; |
1614 | 1614 | } |
1615 | 1615 | print '<td>'.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).'</td><td>'; |
1616 | - print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" ' . (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? 'checked="checked"' : '') . ' value="1">'; |
|
1616 | + print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" '.(isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? 'checked="checked"' : '').' value="1">'; |
|
1617 | 1617 | print '</td></tr>'; |
1618 | 1618 | } elseif ($mysoc->localtax1_assuj == "1") { |
1619 | 1619 | print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).'</td><td colspan="3">'; |
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></tr>'; |
1622 | 1622 | } elseif ($mysoc->localtax2_assuj == "1") { |
1623 | 1623 | print '<tr><td>'.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).'</td><td colspan="3">'; |
1624 | - print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" ' . (isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? 'checked="checked"' : '') . ' value="1">'; |
|
1624 | + print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" '.(isset($conf->global->THIRDPARTY_DEFAULT_USELOCALTAX2) ? 'checked="checked"' : '').' value="1">'; |
|
1625 | 1625 | print '</td></tr>'; |
1626 | 1626 | } |
1627 | 1627 | |
@@ -1863,7 +1863,7 @@ discard block |
||
1863 | 1863 | $object->phone = GETPOST('phone', 'alpha'); |
1864 | 1864 | $object->fax = GETPOST('fax', 'alpha'); |
1865 | 1865 | $object->email = GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL); |
1866 | - $object->no_email = GETPOST("no_email", "int"); |
|
1866 | + $object->no_email = GETPOST("no_email", "int"); |
|
1867 | 1867 | $object->url = GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL); |
1868 | 1868 | $object->capital = GETPOST('capital', 'alphanohtml'); |
1869 | 1869 | $object->idprof1 = GETPOST('idprof1', 'alphanohtml'); |
@@ -1879,16 +1879,16 @@ discard block |
||
1879 | 1879 | $object->default_lang = GETPOST('default_lang', 'alpha'); |
1880 | 1880 | |
1881 | 1881 | $object->tva_assuj = GETPOST('assujtva_value', 'int'); |
1882 | - $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
|
1882 | + $object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0; |
|
1883 | 1883 | $object->tva_intra = GETPOST('tva_intra', 'alphanohtml'); |
1884 | - $object->status = GETPOST('status', 'int'); |
|
1884 | + $object->status = GETPOST('status', 'int'); |
|
1885 | 1885 | |
1886 | 1886 | // Webservices url/key |
1887 | 1887 | $object->webservices_url = GETPOST('webservices_url', 'custom', 0, FILTER_SANITIZE_URL); |
1888 | 1888 | $object->webservices_key = GETPOST('webservices_key', 'san_alpha'); |
1889 | 1889 | |
1890 | 1890 | if (GETPOSTISSET('accountancy_code_sell')) { |
1891 | - $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
1891 | + $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
|
1892 | 1892 | |
1893 | 1893 | if (empty($accountancy_code_sell) || $accountancy_code_sell == '-1') { |
1894 | 1894 | $object->accountancy_code_sell = ''; |
@@ -1897,7 +1897,7 @@ discard block |
||
1897 | 1897 | } |
1898 | 1898 | } |
1899 | 1899 | if (GETPOSTISSET('accountancy_code_buy')) { |
1900 | - $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
1900 | + $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); |
|
1901 | 1901 | |
1902 | 1902 | if (empty($accountancy_code_buy) || $accountancy_code_buy == '-1') { |
1903 | 1903 | $object->accountancy_code_buy = ''; |
@@ -1979,7 +1979,7 @@ discard block |
||
1979 | 1979 | } |
1980 | 1980 | }); |
1981 | 1981 | |
1982 | - var canHaveCategoryIfNotCustomerProspectSupplier = ' . (!getDolGlobalString('THIRDPARTY_CAN_HAVE_CUSTOMER_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT') ? '0' : '1') . '; |
|
1982 | + var canHaveCategoryIfNotCustomerProspectSupplier = ' . (!getDolGlobalString('THIRDPARTY_CAN_HAVE_CUSTOMER_CATEGORY_EVEN_IF_NOT_CUSTOMER_PROSPECT') ? '0' : '1').'; |
|
1983 | 1983 | |
1984 | 1984 | init_customer_categ(); |
1985 | 1985 | $("#customerprospect").change(function() { |
@@ -2293,14 +2293,14 @@ discard block |
||
2293 | 2293 | |
2294 | 2294 | // VAT is used |
2295 | 2295 | print '<tr><td>'.$form->editfieldkey('VATIsUsed', 'assujtva_value', '', $object, 0).'</td><td colspan="3">'; |
2296 | - print '<input id="assujtva_value" name="assujtva_value" type="checkbox" ' . ($object->tva_assuj ? 'checked="checked"' : '') . ' value="1">'; |
|
2296 | + print '<input id="assujtva_value" name="assujtva_value" type="checkbox" '.($object->tva_assuj ? 'checked="checked"' : '').' value="1">'; |
|
2297 | 2297 | print '</td></tr>'; |
2298 | 2298 | |
2299 | 2299 | // Local Taxes |
2300 | 2300 | //TODO: Place into a function to control showing by country or study better option |
2301 | 2301 | if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") { |
2302 | 2302 | print '<tr><td>'.$form->editfieldkey($langs->transcountry("LocalTax1IsUsed", $mysoc->country_code), 'localtax1assuj_value', '', $object, 0).'</td><td>'; |
2303 | - print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" ' . ($object->localtax1_assuj ? 'checked="checked"' : '') . ' value="1">'; |
|
2303 | + print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" '.($object->localtax1_assuj ? 'checked="checked"' : '').' value="1">'; |
|
2304 | 2304 | if (!isOnlyOneLocalTax(1)) { |
2305 | 2305 | print '<span class="cblt1"> '.$langs->transcountry("Type", $mysoc->country_code).': '; |
2306 | 2306 | $formcompany->select_localtax(1, $object->localtax1_value, "lt1"); |
@@ -2309,7 +2309,7 @@ discard block |
||
2309 | 2309 | print '</td>'; |
2310 | 2310 | print '</tr><tr>'; |
2311 | 2311 | print '<td>'.$form->editfieldkey($langs->transcountry("LocalTax2IsUsed", $mysoc->country_code), 'localtax2assuj_value', '', $object, 0).'</td><td>'; |
2312 | - print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" ' . ($object->localtax2_assuj ? 'checked="checked"' : '') . ' value="1"></td></tr>'; |
|
2312 | + print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" '.($object->localtax2_assuj ? 'checked="checked"' : '').' value="1"></td></tr>'; |
|
2313 | 2313 | if (!isOnlyOneLocalTax(2)) { |
2314 | 2314 | print '<span class="cblt2"> '.$langs->transcountry("Type", $mysoc->country_code).': '; |
2315 | 2315 | $formcompany->select_localtax(2, $object->localtax2_value, "lt2"); |
@@ -2318,7 +2318,7 @@ discard block |
||
2318 | 2318 | print '</td></tr>'; |
2319 | 2319 | } elseif ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj != "1") { |
2320 | 2320 | print '<tr><td>'.$form->editfieldkey($langs->transcountry("LocalTax1IsUsed", $mysoc->country_code), 'localtax1assuj_value', '', $object, 0).'</td><td colspan="3">'; |
2321 | - print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" ' . ($object->localtax1_assuj ? 'checked="checked"' : '') . ' value="1">'; |
|
2321 | + print '<input id="localtax1assuj_value" name="localtax1assuj_value" type="checkbox" '.($object->localtax1_assuj ? 'checked="checked"' : '').' value="1">'; |
|
2322 | 2322 | if (!isOnlyOneLocalTax(1)) { |
2323 | 2323 | print '<span class="cblt1"> '.$langs->transcountry("Type", $mysoc->country_code).': '; |
2324 | 2324 | $formcompany->select_localtax(1, $object->localtax1_value, "lt1"); |
@@ -2327,7 +2327,7 @@ discard block |
||
2327 | 2327 | print '</td></tr>'; |
2328 | 2328 | } elseif ($mysoc->localtax2_assuj == "1" && $mysoc->localtax1_assuj != "1") { |
2329 | 2329 | print '<tr><td>'.$form->editfieldkey($langs->transcountry("LocalTax2IsUsed", $mysoc->country_code), 'localtax2assuj_value', '', $object, 0).'</td><td colspan="3">'; |
2330 | - print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" ' . ($object->localtax2_assuj ? 'checked="checked"' : '') . ' value="1">'; |
|
2330 | + print '<input id="localtax2assuj_value" name="localtax2assuj_value" type="checkbox" '.($object->localtax2_assuj ? 'checked="checked"' : '').' value="1">'; |
|
2331 | 2331 | if (!isOnlyOneLocalTax(2)) { |
2332 | 2332 | print '<span class="cblt2"> '.$langs->transcountry("Type", $mysoc->country_code).': '; |
2333 | 2333 | $formcompany->select_localtax(2, $object->localtax2_value, "lt2"); |
@@ -2338,7 +2338,7 @@ discard block |
||
2338 | 2338 | |
2339 | 2339 | // VAT reverse charge by default |
2340 | 2340 | if (getDolGlobalString('ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE')) { |
2341 | - print '<tr><td>' . $form->editfieldkey('VATReverseChargeByDefault', 'vat_reverse_charge', '', $object, 0) . '</td><td colspan="3">'; |
|
2341 | + print '<tr><td>'.$form->editfieldkey('VATReverseChargeByDefault', 'vat_reverse_charge', '', $object, 0).'</td><td colspan="3">'; |
|
2342 | 2342 | print '<input type="checkbox" name="vat_reverse_charge" '.($object->vat_reverse_charge == '1' ? ' checked' : '').'>'; |
2343 | 2343 | print '</td></tr>'; |
2344 | 2344 | } |
@@ -2515,7 +2515,7 @@ discard block |
||
2515 | 2515 | $maxfilesizearray = getMaxFileSizeArray(); |
2516 | 2516 | $maxmin = $maxfilesizearray['maxmin']; |
2517 | 2517 | if ($maxmin > 0) { |
2518 | - print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
2518 | + print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
2519 | 2519 | } |
2520 | 2520 | print '<input type="file" class="flat" name="photo" id="photoinput">'; |
2521 | 2521 | print '</td></tr>'; |
@@ -2736,7 +2736,7 @@ discard block |
||
2736 | 2736 | print '<tr><td>'; |
2737 | 2737 | print $form->textwithpicto($langs->trans('VATReverseChargeByDefault'), $langs->trans('VATReverseChargeByDefaultDesc')); |
2738 | 2738 | print '</td><td>'; |
2739 | - print '<input type="checkbox" name="vat_reverse_charge" ' . ($object->vat_reverse_charge == '1' ? ' checked' : '') . ' disabled>'; |
|
2739 | + print '<input type="checkbox" name="vat_reverse_charge" '.($object->vat_reverse_charge == '1' ? ' checked' : '').' disabled>'; |
|
2740 | 2740 | print '</td>'; |
2741 | 2741 | print '</tr>'; |
2742 | 2742 | } |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | // Ajout |
292 | 292 | $companybankaccount = new CompanyBankAccount($db); |
293 | 293 | |
294 | - $companybankaccount->socid = $object->id; |
|
294 | + $companybankaccount->socid = $object->id; |
|
295 | 295 | |
296 | 296 | $companybankaccount->fetch_thirdparty(); |
297 | 297 | |
@@ -586,7 +586,7 @@ discard block |
||
586 | 586 | } |
587 | 587 | if ($action == 'syncsepatostripe') { |
588 | 588 | // Create the bank account on current Stripe env |
589 | - $companypaymentmode = new CompanyPaymentMode($db); // Get record in llx_societe_rib |
|
589 | + $companypaymentmode = new CompanyPaymentMode($db); // Get record in llx_societe_rib |
|
590 | 590 | $companypaymentmode->fetch($id); |
591 | 591 | |
592 | 592 | if ($companypaymentmode->type != 'ban') { |
@@ -1180,7 +1180,7 @@ discard block |
||
1180 | 1180 | print '<table class="liste centpercent">'."\n"; |
1181 | 1181 | print '<tr class="liste_titre">'; |
1182 | 1182 | print '<td>'.$langs->trans('Label').'</td>'; |
1183 | - print '<td>'.$form->textwithpicto($langs->trans('ExternalSystemID'), $langs->trans("IDOfPaymentInAnExternalSystem")).'</td>'; // external system ID |
|
1183 | + print '<td>'.$form->textwithpicto($langs->trans('ExternalSystemID'), $langs->trans("IDOfPaymentInAnExternalSystem")).'</td>'; // external system ID |
|
1184 | 1184 | print '<td>'.$langs->trans('Type').'</td>'; |
1185 | 1185 | print '<td>'.$langs->trans('Informations').'</td>'; |
1186 | 1186 | print '<td></td>'; |
@@ -1520,7 +1520,7 @@ discard block |
||
1520 | 1520 | |
1521 | 1521 | // List of bank accounts |
1522 | 1522 | if ($permissiontoaddupdatepaymentinformation) { |
1523 | - $morehtmlright = dolGetButtonTitle($langs->trans('Add'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"] . '?socid=' . $object->id . '&action=create'); |
|
1523 | + $morehtmlright = dolGetButtonTitle($langs->trans('Add'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?socid='.$object->id.'&action=create'); |
|
1524 | 1524 | } |
1525 | 1525 | |
1526 | 1526 | print load_fiche_titre($langs->trans("BankAccounts"), $morehtmlright, 'bank'); |
@@ -1537,7 +1537,7 @@ discard block |
||
1537 | 1537 | |
1538 | 1538 | print '<tr class="liste_titre">'; |
1539 | 1539 | print_liste_field_titre("Label"); |
1540 | - print_liste_field_titre($form->textwithpicto($langs->trans('ExternalSystemID'), $langs->trans("IDOfPaymentInAnExternalSystem"))); // external system ID |
|
1540 | + print_liste_field_titre($form->textwithpicto($langs->trans('ExternalSystemID'), $langs->trans("IDOfPaymentInAnExternalSystem"))); // external system ID |
|
1541 | 1541 | print_liste_field_titre("Bank"); |
1542 | 1542 | print_liste_field_titre("RIB"); |
1543 | 1543 | print_liste_field_titre("IBAN"); |
@@ -1733,7 +1733,7 @@ discard block |
||
1733 | 1733 | print '<td class="right nowraponall">'; |
1734 | 1734 | $useonlinesignature = 1; |
1735 | 1735 | if ($useonlinesignature) { |
1736 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/signature.lib.php'; |
|
1736 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/signature.lib.php'; |
|
1737 | 1737 | print showOnlineSignatureUrl($companybankaccount->element, $rib->id); |
1738 | 1738 | } |
1739 | 1739 | print '</td>'; |
@@ -67,7 +67,7 @@ |
||
67 | 67 | $action = (GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'); |
68 | 68 | $cancel = GETPOST('cancel', 'alpha'); |
69 | 69 | $backtopage = GETPOST('backtopage', 'alpha'); |
70 | -$confirm = GETPOST('confirm'); |
|
70 | +$confirm = GETPOST('confirm'); |
|
71 | 71 | $socid = GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int'); |
72 | 72 | |
73 | 73 | if ($user->socid) { |
@@ -21,7 +21,7 @@ |
||
21 | 21 | * \brief Popup screen to validate VAT |
22 | 22 | */ |
23 | 23 | |
24 | -if (! defined('NOTOKENRENEWAL')) { |
|
24 | +if (!defined('NOTOKENRENEWAL')) { |
|
25 | 25 | define('NOTOKENRENEWAL', '1'); |
26 | 26 | } // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) |
27 | 27 |
@@ -52,10 +52,10 @@ |
||
52 | 52 | } |
53 | 53 | |
54 | 54 | // Sort & Order fields |
55 | -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; |
|
55 | +$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; |
|
56 | 56 | $sortfield = GETPOST('sortfield', 'aZ09comma'); |
57 | 57 | $sortorder = GETPOST('sortorder', 'aZ09comma'); |
58 | -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); |
|
58 | +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); |
|
59 | 59 | $optioncss = GETPOST('optioncss', 'alpha'); |
60 | 60 | |
61 | 61 | if (empty($page) || $page == -1) { |
@@ -45,11 +45,11 @@ discard block |
||
45 | 45 | // Get parameters |
46 | 46 | $id = GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('socid', 'int'); |
47 | 47 | |
48 | -$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... |
|
48 | +$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... |
|
49 | 49 | $show_files = GETPOST('show_files', 'int'); |
50 | -$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'websitelist'; // To manage different context of search |
|
51 | -$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page |
|
52 | -$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
|
50 | +$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'websitelist'; // To manage different context of search |
|
51 | +$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page |
|
52 | +$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
|
53 | 53 | $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list |
54 | 54 | $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
55 | 55 | $mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...) |
@@ -489,7 +489,7 @@ discard block |
||
489 | 489 | } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { |
490 | 490 | $cssforfield .= ($cssforfield ? ' ' : '').'right'; |
491 | 491 | } |
492 | - $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
492 | + $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
493 | 493 | if (!empty($arrayfields['t.'.$key]['checked'])) { |
494 | 494 | print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist']))."\n"; |
495 | 495 | $totalarray['nbfield']++; |
@@ -976,8 +976,8 @@ discard block |
||
976 | 976 | $sql .= ", '".$this->db->escape($this->multicurrency_code)."'"; |
977 | 977 | if (!getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) { |
978 | 978 | $sql .= ", ".(empty($this->vat_reverse_charge) ? '0' : '1'); |
979 | - $sql .= ", '" . $this->db->escape($this->accountancy_code_buy) . "'"; |
|
980 | - $sql .= ", '" . $this->db->escape($this->accountancy_code_sell) . "'"; |
|
979 | + $sql .= ", '".$this->db->escape($this->accountancy_code_buy)."'"; |
|
980 | + $sql .= ", '".$this->db->escape($this->accountancy_code_sell)."'"; |
|
981 | 981 | } |
982 | 982 | $sql .= ")"; |
983 | 983 | |
@@ -1025,7 +1025,7 @@ discard block |
||
1025 | 1025 | } |
1026 | 1026 | |
1027 | 1027 | if ($ret >= 0) { |
1028 | - if (! $notrigger) { |
|
1028 | + if (!$notrigger) { |
|
1029 | 1029 | // Call trigger |
1030 | 1030 | $result = $this->call_trigger('COMPANY_CREATE', $user); |
1031 | 1031 | if ($result < 0) { |
@@ -1268,7 +1268,7 @@ discard block |
||
1268 | 1268 | if ($this->id_prof_exists($keymin, $vallabel, ($this->id > 0 ? $this->id : 0))) { |
1269 | 1269 | $langs->loadLangs(array("errors", 'compta')); |
1270 | 1270 | $error++; |
1271 | - $this->errors[] = $langs->trans('CustomerAccountancyCodeShort') . " " . $langs->trans("ErrorProdIdAlreadyExist", $vallabel) . ' (' . $langs->trans("ForbiddenBySetupRules") . ')'; |
|
1271 | + $this->errors[] = $langs->trans('CustomerAccountancyCodeShort')." ".$langs->trans("ErrorProdIdAlreadyExist", $vallabel).' ('.$langs->trans("ForbiddenBySetupRules").')'; |
|
1272 | 1272 | } |
1273 | 1273 | } |
1274 | 1274 | |
@@ -1276,7 +1276,7 @@ discard block |
||
1276 | 1276 | if (getDolGlobalString('SOCIETE_ACCOUNTANCY_CODE_CUSTOMER_MANDATORY') && (!isset($vallabel) || trim($vallabel) === '')) { |
1277 | 1277 | $langs->loadLangs(array("errors", 'compta')); |
1278 | 1278 | $error++; |
1279 | - $this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv('CustomerAccountancyCodeShort')) . ' (' . $langs->trans("ForbiddenBySetupRules") . ')'; |
|
1279 | + $this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv('CustomerAccountancyCodeShort')).' ('.$langs->trans("ForbiddenBySetupRules").')'; |
|
1280 | 1280 | } |
1281 | 1281 | } elseif ($key == 'ACCOUNTANCY_CODE_SUPPLIER' && !empty($this->fournisseur)) { |
1282 | 1282 | // Check for unicity |
@@ -1284,7 +1284,7 @@ discard block |
||
1284 | 1284 | if ($this->id_prof_exists($keymin, $vallabel, ($this->id > 0 ? $this->id : 0))) { |
1285 | 1285 | $langs->loadLangs(array("errors", 'compta')); |
1286 | 1286 | $error++; |
1287 | - $this->errors[] = $langs->trans('SupplierAccountancyCodeShort') . " " . $langs->trans("ErrorProdIdAlreadyExist", $vallabel) . ' (' . $langs->trans("ForbiddenBySetupRules") . ')'; |
|
1287 | + $this->errors[] = $langs->trans('SupplierAccountancyCodeShort')." ".$langs->trans("ErrorProdIdAlreadyExist", $vallabel).' ('.$langs->trans("ForbiddenBySetupRules").')'; |
|
1288 | 1288 | } |
1289 | 1289 | } |
1290 | 1290 | |
@@ -1292,7 +1292,7 @@ discard block |
||
1292 | 1292 | if (getDolGlobalString('SOCIETE_ACCOUNTANCY_CODE_SUPPLIER_MANDATORY') && (!isset($vallabel) || trim($vallabel) === '')) { |
1293 | 1293 | $langs->loadLangs(array("errors", 'compta')); |
1294 | 1294 | $error++; |
1295 | - $this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv('SupplierAccountancyCodeShort')) . ' (' . $langs->trans("ForbiddenBySetupRules") . ')'; |
|
1295 | + $this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv('SupplierAccountancyCodeShort')).' ('.$langs->trans("ForbiddenBySetupRules").')'; |
|
1296 | 1296 | } |
1297 | 1297 | } |
1298 | 1298 | } |
@@ -1351,7 +1351,7 @@ discard block |
||
1351 | 1351 | $this->fax = trim($this->fax); |
1352 | 1352 | $this->fax = preg_replace("/\s/", "", $this->fax); |
1353 | 1353 | $this->fax = preg_replace("/\./", "", $this->fax); |
1354 | - $this->email = trim($this->email); |
|
1354 | + $this->email = trim($this->email); |
|
1355 | 1355 | $this->url = $this->url ? clean_url($this->url, 0) : ''; |
1356 | 1356 | $this->note_private = trim($this->note_private); |
1357 | 1357 | $this->note_public = trim($this->note_public); |
@@ -1368,7 +1368,7 @@ discard block |
||
1368 | 1368 | |
1369 | 1369 | $this->tva_assuj = trim($this->tva_assuj); |
1370 | 1370 | $this->tva_intra = dol_sanitizeFileName($this->tva_intra, ''); |
1371 | - $this->vat_reverse_charge = empty($this->vat_reverse_charge) ? '0' : '1'; |
|
1371 | + $this->vat_reverse_charge = empty($this->vat_reverse_charge) ? '0' : '1'; |
|
1372 | 1372 | if (empty($this->status)) { |
1373 | 1373 | $this->status = 0; |
1374 | 1374 | } |
@@ -1523,7 +1523,7 @@ discard block |
||
1523 | 1523 | $sql .= ",tva_assuj = ".($this->tva_assuj != '' ? "'".$this->db->escape($this->tva_assuj)."'" : "null"); |
1524 | 1524 | $sql .= ",tva_intra = '".$this->db->escape($this->tva_intra)."'"; |
1525 | 1525 | if (!getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) { |
1526 | - $sql .= ",vat_reverse_charge = " . ($this->vat_reverse_charge != '' ? "'" . $this->db->escape($this->vat_reverse_charge) . "'" : 0); |
|
1526 | + $sql .= ",vat_reverse_charge = ".($this->vat_reverse_charge != '' ? "'".$this->db->escape($this->vat_reverse_charge)."'" : 0); |
|
1527 | 1527 | } |
1528 | 1528 | $sql .= ",status = ".((int) $this->status); |
1529 | 1529 | |
@@ -1584,8 +1584,8 @@ discard block |
||
1584 | 1584 | $sql .= ",supplier_order_min_amount= ".($this->supplier_order_min_amount != '' ? $this->supplier_order_min_amount : 'null'); |
1585 | 1585 | $sql .= ",fk_prospectlevel='".$this->db->escape($this->fk_prospectlevel)."'"; |
1586 | 1586 | if (!getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) { |
1587 | - $sql .= ", accountancy_code_buy = '" . $this->db->escape($this->accountancy_code_buy) . "'"; |
|
1588 | - $sql .= ", accountancy_code_sell= '" . $this->db->escape($this->accountancy_code_sell) . "'"; |
|
1587 | + $sql .= ", accountancy_code_buy = '".$this->db->escape($this->accountancy_code_buy)."'"; |
|
1588 | + $sql .= ", accountancy_code_sell= '".$this->db->escape($this->accountancy_code_sell)."'"; |
|
1589 | 1589 | if ($customer) { |
1590 | 1590 | $sql .= ", code_compta = ".(!empty($this->code_compta_client) ? "'".$this->db->escape($this->code_compta_client)."'" : "null"); |
1591 | 1591 | } |
@@ -1943,7 +1943,7 @@ discard block |
||
1943 | 1943 | $this->code_client = $obj->code_client; |
1944 | 1944 | $this->code_fournisseur = $obj->code_fournisseur; |
1945 | 1945 | |
1946 | - $this->code_compta = $obj->code_compta; // For backward compatibility |
|
1946 | + $this->code_compta = $obj->code_compta; // For backward compatibility |
|
1947 | 1947 | $this->code_compta_client = $obj->code_compta; |
1948 | 1948 | $this->code_compta_fournisseur = $obj->code_compta_fournisseur; |
1949 | 1949 | |
@@ -1960,7 +1960,7 @@ discard block |
||
1960 | 1960 | $this->vat_reverse_charge = 0; |
1961 | 1961 | } |
1962 | 1962 | |
1963 | - $this->status = $obj->status; |
|
1963 | + $this->status = $obj->status; |
|
1964 | 1964 | |
1965 | 1965 | // Local Taxes |
1966 | 1966 | $this->localtax1_assuj = $obj->localtax1_assuj; |
@@ -1987,7 +1987,7 @@ discard block |
||
1987 | 1987 | |
1988 | 1988 | $this->mode_reglement_id = $obj->mode_reglement; |
1989 | 1989 | $this->cond_reglement_id = $obj->cond_reglement; |
1990 | - $this->deposit_percent = $obj->deposit_percent; |
|
1990 | + $this->deposit_percent = $obj->deposit_percent; |
|
1991 | 1991 | $this->transport_mode_id = $obj->transport_mode; |
1992 | 1992 | $this->mode_reglement_supplier_id = $obj->mode_reglement_supplier; |
1993 | 1993 | $this->cond_reglement_supplier_id = $obj->cond_reglement_supplier; |
@@ -2523,10 +2523,10 @@ discard block |
||
2523 | 2523 | $reparray[$i]['firstname'] = $obj->firstname; |
2524 | 2524 | $reparray[$i]['email'] = $obj->email; |
2525 | 2525 | $reparray[$i]['phone'] = $obj->office_phone; |
2526 | - $reparray[$i]['office_phone'] = $obj->office_phone; // Pro phone |
|
2526 | + $reparray[$i]['office_phone'] = $obj->office_phone; // Pro phone |
|
2527 | 2527 | $reparray[$i]['office_fax'] = $obj->office_fax; |
2528 | - $reparray[$i]['user_mobile'] = $obj->user_mobile; // Pro mobile |
|
2529 | - $reparray[$i]['personal_mobile'] = $obj->personal_mobile; // Personal mobile |
|
2528 | + $reparray[$i]['user_mobile'] = $obj->user_mobile; // Pro mobile |
|
2529 | + $reparray[$i]['personal_mobile'] = $obj->personal_mobile; // Personal mobile |
|
2530 | 2530 | $reparray[$i]['job'] = $obj->job; |
2531 | 2531 | $reparray[$i]['statut'] = $obj->status; // deprecated |
2532 | 2532 | $reparray[$i]['status'] = $obj->status; |
@@ -2732,7 +2732,7 @@ discard block |
||
2732 | 2732 | $datas['status'] = ' '.$this->getLibStatut(5); |
2733 | 2733 | } |
2734 | 2734 | if (isset($this->client) && isset($this->fournisseur)) { |
2735 | - $datas['type'] = ' ' . $this->getTypeUrl(1); |
|
2735 | + $datas['type'] = ' '.$this->getTypeUrl(1); |
|
2736 | 2736 | } |
2737 | 2737 | $datas['name'] = '<br><b>'.$langs->trans('Name').':</b> '.dol_escape_htmltag(dol_string_nohtmltag($this->name)); |
2738 | 2738 | if (!empty($this->name_alias) && empty($noaliasinname)) { |
@@ -2796,9 +2796,9 @@ discard block |
||
2796 | 2796 | } |
2797 | 2797 | // show categories for this record only in ajax to not overload lists |
2798 | 2798 | if (!$nofetch && isModEnabled('categorie') && $this->client) { |
2799 | - require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; |
|
2799 | + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; |
|
2800 | 2800 | $form = new Form($this->db); |
2801 | - $datas['categories_customer'] = '<br>' . $form->showCategories($this->id, Categorie::TYPE_CUSTOMER, 1, 1); |
|
2801 | + $datas['categories_customer'] = '<br>'.$form->showCategories($this->id, Categorie::TYPE_CUSTOMER, 1, 1); |
|
2802 | 2802 | } |
2803 | 2803 | if (!empty($this->code_fournisseur) && $this->fournisseur) { |
2804 | 2804 | $datas['suppliercode'] = '<br><b>'.$langs->trans('SupplierCode').':</b> '.$this->code_fournisseur; |
@@ -2809,9 +2809,9 @@ discard block |
||
2809 | 2809 | } |
2810 | 2810 | // show categories for this record only in ajax to not overload lists |
2811 | 2811 | if (!$nofetch && isModEnabled('categorie') && $this->fournisseur) { |
2812 | - require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; |
|
2812 | + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; |
|
2813 | 2813 | $form = new Form($this->db); |
2814 | - $datas['categories_supplier'] = '<br>' . $form->showCategories($this->id, Categorie::TYPE_SUPPLIER, 1, 1); |
|
2814 | + $datas['categories_supplier'] = '<br>'.$form->showCategories($this->id, Categorie::TYPE_SUPPLIER, 1, 1); |
|
2815 | 2815 | } |
2816 | 2816 | |
2817 | 2817 | $datas['divclose'] = '</div>'; |
@@ -3581,7 +3581,7 @@ discard block |
||
3581 | 3581 | global $conf; |
3582 | 3582 | |
3583 | 3583 | if (getDolGlobalString('SOCIETE_CODECOMPTA_ADDON')) { |
3584 | - $module=$conf->global->SOCIETE_CODECOMPTA_ADDON; |
|
3584 | + $module = $conf->global->SOCIETE_CODECOMPTA_ADDON; |
|
3585 | 3585 | $res = false; |
3586 | 3586 | $dirsociete = array_merge(array('/core/modules/societe/'), $conf->modules_parts['societe']); |
3587 | 3587 | foreach ($dirsociete as $dirroot) { |
@@ -3704,7 +3704,7 @@ discard block |
||
3704 | 3704 | global $langs; |
3705 | 3705 | |
3706 | 3706 | if ($company_id > 0) { |
3707 | - $sql = "SELECT parent FROM " . MAIN_DB_PREFIX . "societe WHERE rowid = ".((int) $company_id); |
|
3707 | + $sql = "SELECT parent FROM ".MAIN_DB_PREFIX."societe WHERE rowid = ".((int) $company_id); |
|
3708 | 3708 | $resql = $this->db->query($sql); |
3709 | 3709 | if ($resql) { |
3710 | 3710 | if ($obj = $this->db->fetch_object($resql)) { |
@@ -4550,7 +4550,7 @@ discard block |
||
4550 | 4550 | $this->forme_juridique_code = getDolGlobalString('MAIN_INFO_SOCIETE_FORME_JURIDIQUE'); |
4551 | 4551 | $this->email = getDolGlobalString('MAIN_INFO_SOCIETE_MAIL'); |
4552 | 4552 | $this->default_lang = getDolGlobalString('MAIN_LANG_DEFAULT', 'auto'); |
4553 | - $this->logo =getDolGlobalString('MAIN_INFO_SOCIETE_LOGO'); |
|
4553 | + $this->logo = getDolGlobalString('MAIN_INFO_SOCIETE_LOGO'); |
|
4554 | 4554 | $this->logo_small = getDolGlobalString('MAIN_INFO_SOCIETE_LOGO_SMALL'); |
4555 | 4555 | $this->logo_mini = getDolGlobalString('MAIN_INFO_SOCIETE_LOGO_MINI'); |
4556 | 4556 | $this->logo_squarred = getDolGlobalString('MAIN_INFO_SOCIETE_LOGO_SQUARRED'); |
@@ -5050,7 +5050,7 @@ discard block |
||
5050 | 5050 | dol_print_error($this->db, $companybankaccount->error, $companybankaccount->errors); |
5051 | 5051 | } |
5052 | 5052 | $result = $companybankaccount->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); |
5053 | - $this->last_main_doc=$companybankaccount->last_main_doc; |
|
5053 | + $this->last_main_doc = $companybankaccount->last_main_doc; |
|
5054 | 5054 | } else { |
5055 | 5055 | // Positionne le modele sur le nom du modele a utiliser |
5056 | 5056 | if (!dol_strlen($modele)) { |
@@ -5428,7 +5428,7 @@ discard block |
||
5428 | 5428 | global $langs, $hookmanager, $user, $action; |
5429 | 5429 | |
5430 | 5430 | $error = 0; |
5431 | - $soc_origin = new Societe($this->db); // The thirdparty that we will delete |
|
5431 | + $soc_origin = new Societe($this->db); // The thirdparty that we will delete |
|
5432 | 5432 | |
5433 | 5433 | if (!$error && $soc_origin->fetch($soc_origin_id) < 1) { |
5434 | 5434 | $this->error = $langs->trans('ErrorRecordNotFound'); |
@@ -156,7 +156,7 @@ |
||
156 | 156 | $textright = make_substitutions(getDolGlobalString('ADHERENT_CARD_TEXT_RIGHT'), $substitutionarray); |
157 | 157 | |
158 | 158 | if (is_numeric($foruserid) || $foruserlogin) { |
159 | - $nb = $_Avery_Labels[$model]['NX'] * $_Avery_Labels[$model]['NY']; // $_Avery_Labels is defined into an include |
|
159 | + $nb = $_Avery_Labels[$model]['NX'] * $_Avery_Labels[$model]['NY']; // $_Avery_Labels is defined into an include |
|
160 | 160 | if ($nb <= 0) { |
161 | 161 | $nb = 1; // Protection to avoid empty page |
162 | 162 | } |
@@ -462,7 +462,7 @@ discard block |
||
462 | 462 | //include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; |
463 | 463 | |
464 | 464 | |
465 | -if (! ($object->id > 0)) { |
|
465 | +if (!($object->id > 0)) { |
|
466 | 466 | $langs->load("errors"); |
467 | 467 | print $langs->trans("ErrorRecordNotFound"); |
468 | 468 | } |
@@ -1010,7 +1010,7 @@ discard block |
||
1010 | 1010 | |
1011 | 1011 | if ($adht->subscription) { |
1012 | 1012 | // Amount |
1013 | - print '<tr><td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input type="text" name="subscription" size="6" value="'.(GETPOSTISSET('subscription') ? GETPOST('subscription') : price($adht->amount, 0, '', 0)).'"> '.$langs->trans("Currency".$conf->currency) .'</td></tr>'; |
|
1013 | + print '<tr><td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input type="text" name="subscription" size="6" value="'.(GETPOSTISSET('subscription') ? GETPOST('subscription') : price($adht->amount, 0, '', 0)).'"> '.$langs->trans("Currency".$conf->currency).'</td></tr>'; |
|
1014 | 1014 | |
1015 | 1015 | // Label |
1016 | 1016 | print '<tr><td>'.$langs->trans("Label").'</td>'; |
@@ -1089,7 +1089,7 @@ discard block |
||
1089 | 1089 | if (!getDolGlobalString('ADHERENT_VAT_FOR_SUBSCRIPTIONS') || getDolGlobalString('ADHERENT_VAT_FOR_SUBSCRIPTIONS') != 'defaultforfoundationcountry') { |
1090 | 1090 | print '. <span class="opacitymedium">'.$langs->trans("NoVatOnSubscription", 0).'</span>'; |
1091 | 1091 | } |
1092 | - if (getDolGlobalString('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS') && (isModEnabled('product')|| isModEnabled('service'))) { |
|
1092 | + if (getDolGlobalString('ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS') && (isModEnabled('product') || isModEnabled('service'))) { |
|
1093 | 1093 | $prodtmp = new Product($db); |
1094 | 1094 | $result = $prodtmp->fetch($conf->global->ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS); |
1095 | 1095 | if ($result < 0) { |