@@ -27,12 +27,12 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | $sapi_type = php_sapi_name(); |
| 29 | 29 | $script_file = basename(__FILE__); |
| 30 | -$path = dirname(__FILE__) . '/'; |
|
| 30 | +$path = dirname(__FILE__).'/'; |
|
| 31 | 31 | |
| 32 | 32 | // Test si mode batch |
| 33 | 33 | $sapi_type = php_sapi_name(); |
| 34 | 34 | if (substr($sapi_type, 0, 3) == 'cgi') { |
| 35 | - echo "Error: You are using PHP for CGI. To execute " . $script_file . " from command line, you must use PHP for CLI mode.\n"; |
|
| 35 | + echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n"; |
|
| 36 | 36 | exit(); |
| 37 | 37 | } |
| 38 | 38 | |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | |
| 103 | 103 | // PHAN setup. Configuration is required, otherwise phan is disabled. |
| 104 | 104 | $PHAN_CONFIG = "{$path}phan/config_extended.php"; |
| 105 | -$PHAN_BASELINE = "{$path}phan/baseline_extended.txt"; // BASELINE is ignored if it does not exist |
|
| 105 | +$PHAN_BASELINE = "{$path}phan/baseline_extended.txt"; // BASELINE is ignored if it does not exist |
|
| 106 | 106 | $PHAN_MIN_PHP = "7.0"; |
| 107 | 107 | $PHAN_MEMORY_OPT = "--memory-limit 5G"; |
| 108 | 108 | |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | // Get technical debt with Phan |
| 159 | 159 | $output_arrverphan = array(); |
| 160 | 160 | if ($dirphpstan != 'disabled') { |
| 161 | - $commandcheck = ($dir_phan ? $dir_phan.DIRECTORY_SEPARATOR : '') .'phan --version'; |
|
| 161 | + $commandcheck = ($dir_phan ? $dir_phan.DIRECTORY_SEPARATOR : '').'phan --version'; |
|
| 162 | 162 | print 'Execute Phan to get the version: '.$commandcheck."\n"; |
| 163 | 163 | $resexecverphan = 0; |
| 164 | 164 | exec($commandcheck, $output_arrverphan, $resexecverphan); |
@@ -350,7 +350,7 @@ discard block |
||
| 350 | 350 | var_dump($arrayofalerts[$alreadyfoundcommitid]['branch']); |
| 351 | 351 | var_dump($tmpval);*/ |
| 352 | 352 | |
| 353 | - $arrayofalerts[$alreadyfoundcommitid]['commitidbis'][] = $tmpval['commitid']; // Concat the new commitid to the list of commitidbis array of the already found case. |
|
| 353 | + $arrayofalerts[$alreadyfoundcommitid]['commitidbis'][] = $tmpval['commitid']; // Concat the new commitid to the list of commitidbis array of the already found case. |
|
| 354 | 354 | |
| 355 | 355 | if (empty($arrayofalerts[$alreadyfoundcommitid]['issueid']) && !empty($tmpval['issueid'])) { // If not Github was defined, we set it. |
| 356 | 356 | $arrayofalerts[$alreadyfoundcommitid]['issueid'] = $tmpval['issueid']; |
@@ -952,8 +952,8 @@ discard block |
||
| 952 | 952 | fwrite($fh, '<?xml version="1.0" encoding="UTF-8" ?>'."\n"); |
| 953 | 953 | fwrite($fh, '<rss version="2.0">'."\n"); |
| 954 | 954 | fwrite($fh, '<channel>'."\n"); |
| 955 | - fwrite($fh, '<title>' . htmlspecialchars($title_security) . '</title>'."\n"); |
|
| 956 | - fwrite($fh, '<description>' . htmlspecialchars("Feed of the latest security reports on the project") . '</description>'."\n"); |
|
| 955 | + fwrite($fh, '<title>'.htmlspecialchars($title_security).'</title>'."\n"); |
|
| 956 | + fwrite($fh, '<description>'.htmlspecialchars("Feed of the latest security reports on the project").'</description>'."\n"); |
|
| 957 | 957 | //fwrite($fh, '<atom:link href="https://cti.dolibarr.org/index-security.rss" rel="self" type="application/rss+xml" />'."\n"); |
| 958 | 958 | fwrite($fh, '<language>en-US</language>'."\n"); |
| 959 | 959 | fwrite($fh, '<lastBuildDate>'.date('r').'</lastBuildDate>'."\n"); |
@@ -962,14 +962,14 @@ discard block |
||
| 962 | 962 | <atom:link href="https://cti.dolibarr.org/security-index.rss" rel="self" type="application/rss+xml" /> |
| 963 | 963 | */ |
| 964 | 964 | if ($url_site) { |
| 965 | - fwrite($fh, '<link>' . htmlspecialchars($url_site) . '</link>'."\n"); |
|
| 965 | + fwrite($fh, '<link>'.htmlspecialchars($url_site).'</link>'."\n"); |
|
| 966 | 966 | } |
| 967 | 967 | // Image |
| 968 | 968 | fwrite($fh, '<image>'."\n"); |
| 969 | 969 | fwrite($fh, '<url>https://www.dolibarr.org/medias/image/www.dolibarr.org/badge-openssf.png</url>'."\n"); |
| 970 | - fwrite($fh, '<title>' . htmlspecialchars($title_security) . '</title>'."\n"); |
|
| 970 | + fwrite($fh, '<title>'.htmlspecialchars($title_security).'</title>'."\n"); |
|
| 971 | 971 | if ($url_site) { |
| 972 | - fwrite($fh, '<link>' . htmlspecialchars($url_site) . '</link>'."\n"); |
|
| 972 | + fwrite($fh, '<link>'.htmlspecialchars($url_site).'</link>'."\n"); |
|
| 973 | 973 | } |
| 974 | 974 | fwrite($fh, '</image>'."\n"); |
| 975 | 975 | |
@@ -977,13 +977,13 @@ discard block |
||
| 977 | 977 | $alert['url_commit'] = 'https://github.com/Dolibarr/dolibarr/commit/'.$alert['commitid']; |
| 978 | 978 | |
| 979 | 979 | fwrite($fh, '<item>'."\n"); |
| 980 | - fwrite($fh, '<title>' . htmlspecialchars($alert['title']) . '</title>'."\n"); |
|
| 980 | + fwrite($fh, '<title>'.htmlspecialchars($alert['title']).'</title>'."\n"); |
|
| 981 | 981 | // Description of alert, list of links to sources and branches of fixes |
| 982 | - fwrite($fh, '<description>' . $alert['description'] . '</description>'."\n"); // no htmlspeciachars here |
|
| 983 | - fwrite($fh, '<link>' . htmlspecialchars($alert['url_commit']) . '</link>'."\n"); |
|
| 982 | + fwrite($fh, '<description>'.$alert['description'].'</description>'."\n"); // no htmlspeciachars here |
|
| 983 | + fwrite($fh, '<link>'.htmlspecialchars($alert['url_commit']).'</link>'."\n"); |
|
| 984 | 984 | $tmpdate = strtotime($alert['created_at']); |
| 985 | - fwrite($fh, '<pubDate>' . htmlspecialchars(date('r', $tmpdate)) . '</pubDate>'."\n"); |
|
| 986 | - fwrite($fh, '<guid isPermaLink="false"><![CDATA['.htmlspecialchars($alert['commitid']).']]></guid>'."\n"); // A hidden unique ID |
|
| 985 | + fwrite($fh, '<pubDate>'.htmlspecialchars(date('r', $tmpdate)).'</pubDate>'."\n"); |
|
| 986 | + fwrite($fh, '<guid isPermaLink="false"><![CDATA['.htmlspecialchars($alert['commitid']).']]></guid>'."\n"); // A hidden unique ID |
|
| 987 | 987 | |
| 988 | 988 | fwrite($fh, '</item>'."\n"); |
| 989 | 989 | } |
@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | throw new RestException(500, 'Error generating document'); |
| 212 | 212 | } |
| 213 | 213 | } elseif ($modulepart == 'facture_fournisseur' || $modulepart == 'invoice_supplier') { |
| 214 | - require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php'; |
|
| 214 | + require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; |
|
| 215 | 215 | $tmpobject = new FactureFournisseur($this->db); |
| 216 | 216 | $result = $tmpobject->fetch(0, preg_replace('/\.[^\.]+$/', '', basename($original_file))); |
| 217 | 217 | if (!$result) { |
@@ -248,7 +248,7 @@ discard block |
||
| 248 | 248 | throw new RestException(500, 'Error generating document'); |
| 249 | 249 | } |
| 250 | 250 | } elseif ($modulepart == 'contrat' || $modulepart == 'contract') { |
| 251 | - require_once DOL_DOCUMENT_ROOT . '/contrat/class/contrat.class.php'; |
|
| 251 | + require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; |
|
| 252 | 252 | |
| 253 | 253 | $tmpobject = new Contrat($this->db); |
| 254 | 254 | $result = $tmpobject->fetch(0, preg_replace('/\.[^\.]+$/', '', basename($original_file))); |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | throw new RestException(500, 'Error generating document missing doctemplate parameter'); |
| 265 | 265 | } |
| 266 | 266 | } elseif ($modulepart == 'expedition' || $modulepart == 'shipment') { |
| 267 | - require_once DOL_DOCUMENT_ROOT . '/expedition/class/expedition.class.php'; |
|
| 267 | + require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; |
|
| 268 | 268 | |
| 269 | 269 | $tmpobject = new Expedition($this->db); |
| 270 | 270 | $result = $tmpobject->fetch(0, preg_replace('/\.[^\.]+$/', '', basename($original_file))); |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | throw new RestException(500, 'Error generating document missing doctemplate parameter'); |
| 281 | 281 | } |
| 282 | 282 | } elseif ($modulepart == 'mrp') { |
| 283 | - require_once DOL_DOCUMENT_ROOT . '/mrp/class/mo.class.php'; |
|
| 283 | + require_once DOL_DOCUMENT_ROOT.'/mrp/class/mo.class.php'; |
|
| 284 | 284 | |
| 285 | 285 | $tmpobject = new Mo($this->db); |
| 286 | 286 | $result = $tmpobject->fetch(0, preg_replace('/\.[^\.]+$/', '', basename($original_file))); |
@@ -605,7 +605,7 @@ discard block |
||
| 605 | 605 | // $recursive = 0; |
| 606 | 606 | } elseif ($modulepart == 'contrat' || $modulepart == 'contract') { |
| 607 | 607 | $modulepart = 'contrat'; |
| 608 | - require_once DOL_DOCUMENT_ROOT . '/contrat/class/contrat.class.php'; |
|
| 608 | + require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; |
|
| 609 | 609 | |
| 610 | 610 | $object = new Contrat($this->db); |
| 611 | 611 | $result = $object->fetch($id, $ref); |
@@ -613,10 +613,10 @@ discard block |
||
| 613 | 613 | throw new RestException(404, 'Contract not found'); |
| 614 | 614 | } |
| 615 | 615 | |
| 616 | - $upload_dir = $conf->contract->dir_output . "/" . get_exdir(0, 0, 0, 1, $object, 'contract'); |
|
| 616 | + $upload_dir = $conf->contract->dir_output."/".get_exdir(0, 0, 0, 1, $object, 'contract'); |
|
| 617 | 617 | } elseif ($modulepart == 'intervention' || $modulepart == 'ficheinter') { |
| 618 | 618 | $modulepart = 'ficheinter'; |
| 619 | - require_once DOL_DOCUMENT_ROOT . '/fichinter/class/fichinter.class.php'; |
|
| 619 | + require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; |
|
| 620 | 620 | |
| 621 | 621 | $object = new Fichinter($this->db); |
| 622 | 622 | $result = $object->fetch($id, $ref); |
@@ -624,10 +624,10 @@ discard block |
||
| 624 | 624 | throw new RestException(404, 'Interventional not found'); |
| 625 | 625 | } |
| 626 | 626 | |
| 627 | - $upload_dir = $conf->ficheinter->dir_output . "/" . get_exdir(0, 0, 0, 1, $object, 'ficheinter'); |
|
| 627 | + $upload_dir = $conf->ficheinter->dir_output."/".get_exdir(0, 0, 0, 1, $object, 'ficheinter'); |
|
| 628 | 628 | } elseif ($modulepart == 'projet' || $modulepart == 'project') { |
| 629 | 629 | $modulepart = 'project'; |
| 630 | - require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
| 630 | + require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
| 631 | 631 | |
| 632 | 632 | $object = new Project($this->db); |
| 633 | 633 | $result = $object->fetch($id, $ref); |
@@ -635,10 +635,10 @@ discard block |
||
| 635 | 635 | throw new RestException(404, 'Project not found'); |
| 636 | 636 | } |
| 637 | 637 | |
| 638 | - $upload_dir = $conf->project->dir_output . "/" . get_exdir(0, 0, 0, 1, $object, 'project'); |
|
| 638 | + $upload_dir = $conf->project->dir_output."/".get_exdir(0, 0, 0, 1, $object, 'project'); |
|
| 639 | 639 | } elseif ($modulepart == 'mrp') { |
| 640 | 640 | $modulepart = 'mrp'; |
| 641 | - require_once DOL_DOCUMENT_ROOT . '/mrp/class/mo.class.php'; |
|
| 641 | + require_once DOL_DOCUMENT_ROOT.'/mrp/class/mo.class.php'; |
|
| 642 | 642 | |
| 643 | 643 | $object = new Mo($this->db); |
| 644 | 644 | $result = $object->fetch($id, $ref); |
@@ -646,23 +646,23 @@ discard block |
||
| 646 | 646 | throw new RestException(404, 'MO not found'); |
| 647 | 647 | } |
| 648 | 648 | |
| 649 | - $upload_dir = $conf->mrp->dir_output . "/" . get_exdir(0, 0, 0, 1, $object, 'mrp'); |
|
| 649 | + $upload_dir = $conf->mrp->dir_output."/".get_exdir(0, 0, 0, 1, $object, 'mrp'); |
|
| 650 | 650 | } elseif ($modulepart == 'contact' || $modulepart == 'socpeople') { |
| 651 | 651 | $modulepart = 'contact'; |
| 652 | 652 | require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; |
| 653 | 653 | |
| 654 | 654 | $object = new Contact($this->db); |
| 655 | - $result = $object->fetch($id?$id:$ref); |
|
| 655 | + $result = $object->fetch($id ? $id : $ref); |
|
| 656 | 656 | if (!$result) { |
| 657 | 657 | throw new RestException(404, 'Contact not found'); |
| 658 | 658 | } |
| 659 | - $upload_dir = $conf->societe->multidir_output[$object->entity ?? $conf->entity] . "/contact/" . get_exdir(0, 0, 0, 1, $object, 'contact'); |
|
| 659 | + $upload_dir = $conf->societe->multidir_output[$object->entity ?? $conf->entity]."/contact/".get_exdir(0, 0, 0, 1, $object, 'contact'); |
|
| 660 | 660 | } else { |
| 661 | 661 | throw new RestException(500, 'Modulepart '.$modulepart.' not implemented yet.'); |
| 662 | 662 | } |
| 663 | 663 | |
| 664 | 664 | $objectType = $modulepart; |
| 665 | - if (! empty($object->id) && ! empty($object->table_element)) { |
|
| 665 | + if (!empty($object->id) && !empty($object->table_element)) { |
|
| 666 | 666 | $objectType = $object->table_element; |
| 667 | 667 | } |
| 668 | 668 | |
@@ -680,7 +680,7 @@ discard block |
||
| 680 | 680 | throw new RestException(503, 'Error when retrieve ecm list : '.$this->db->lasterror()); |
| 681 | 681 | } elseif (is_array($ecmfile->lines) && count($ecmfile->lines) > 0) { |
| 682 | 682 | $count = count($filearray); |
| 683 | - for ($i = 0 ; $i < $count ; $i++) { |
|
| 683 | + for ($i = 0; $i < $count; $i++) { |
|
| 684 | 684 | foreach ($ecmfile->lines as $line) { |
| 685 | 685 | unset($line->db); |
| 686 | 686 | if ($filearray[$i]['name'] == $line->filename) { |
@@ -860,7 +860,7 @@ discard block |
||
| 860 | 860 | $object = new Propal($this->db); |
| 861 | 861 | } elseif ($modulepart == 'agenda' || $modulepart == 'action' || $modulepart == 'event') { |
| 862 | 862 | $modulepart = 'agenda'; |
| 863 | - require_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php'; |
|
| 863 | + require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; |
|
| 864 | 864 | $object = new ActionComm($this->db); |
| 865 | 865 | } elseif ($modulepart == 'contact' || $modulepart == 'socpeople') { |
| 866 | 866 | $modulepart = 'contact'; |
@@ -869,11 +869,11 @@ discard block |
||
| 869 | 869 | $fetchbyid = true; |
| 870 | 870 | } elseif ($modulepart == 'contrat' || $modulepart == 'contract') { |
| 871 | 871 | $modulepart = 'contrat'; |
| 872 | - require_once DOL_DOCUMENT_ROOT . '/contrat/class/contrat.class.php'; |
|
| 872 | + require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; |
|
| 873 | 873 | $object = new Contrat($this->db); |
| 874 | 874 | } elseif ($modulepart == 'mrp') { |
| 875 | 875 | $modulepart = 'mrp'; |
| 876 | - require_once DOL_DOCUMENT_ROOT . '/mrp/class/mo.class.php'; |
|
| 876 | + require_once DOL_DOCUMENT_ROOT.'/mrp/class/mo.class.php'; |
|
| 877 | 877 | $object = new Mo($this->db); |
| 878 | 878 | } elseif ($modulepart == 'ecm') { |
| 879 | 879 | throw new RestException(500, 'Using a non empty "ref" is not compatible with using modulepart = '.$modulepart); |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | // Check permission on company |
| 98 | 98 | $result = restrictedArea($user, 'societe', '', ''); |
| 99 | 99 | |
| 100 | -$stripe = null; // Stripe object |
|
| 100 | +$stripe = null; // Stripe object |
|
| 101 | 101 | $stripeacc = null; // Stripe Account |
| 102 | 102 | $stripecu = null; // Remote stripe customer |
| 103 | 103 | |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | if (!$error) { |
| 180 | - $companybankaccount->oldcopy = dol_clone($companybankaccount, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 180 | + $companybankaccount->oldcopy = dol_clone($companybankaccount, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 181 | 181 | |
| 182 | 182 | $companybankaccount->socid = $object->id; |
| 183 | 183 | |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | |
| 255 | 255 | $companypaymentmode->fetch($id); |
| 256 | 256 | if (!$error) { |
| 257 | - $companypaymentmode->oldcopy = dol_clone($companypaymentmode, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 257 | + $companypaymentmode->oldcopy = dol_clone($companypaymentmode, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 258 | 258 | |
| 259 | 259 | $companypaymentmode->fk_soc = $object->id; |
| 260 | 260 | |
@@ -540,8 +540,8 @@ discard block |
||
| 540 | 540 | 'use_companybankid' => GETPOST('companybankid'), |
| 541 | 541 | 'force_dir_output' => $conf->societe->multidir_output[$object->entity ?? $conf->entity].'/'.dol_sanitizeFileName((string) $object->id) |
| 542 | 542 | ); |
| 543 | - $_POST['lang_id'] = GETPOST('lang_idrib'.GETPOSTINT('companybankid'), 'alphanohtml'); // This is required by core/action_builddoc.inc.php |
|
| 544 | - $_POST['model'] = GETPOST('modelrib'.GETPOSTINT('companybankid'), 'alphanohtml'); // This is required by core/action_builddoc.inc.php |
|
| 543 | + $_POST['lang_id'] = GETPOST('lang_idrib'.GETPOSTINT('companybankid'), 'alphanohtml'); // This is required by core/action_builddoc.inc.php |
|
| 544 | + $_POST['model'] = GETPOST('modelrib'.GETPOSTINT('companybankid'), 'alphanohtml'); // This is required by core/action_builddoc.inc.php |
|
| 545 | 545 | } |
| 546 | 546 | |
| 547 | 547 | $id = $socid; |
@@ -612,7 +612,7 @@ discard block |
||
| 612 | 612 | } |
| 613 | 613 | if ($action == 'syncsepatostripe' && $permissiontoaddupdatepaymentinformation && $stripeacc !== null) { |
| 614 | 614 | // Create the bank account on current Stripe env |
| 615 | - $companypaymentmode = new CompanyPaymentMode($db); // Get record in llx_societe_rib |
|
| 615 | + $companypaymentmode = new CompanyPaymentMode($db); // Get record in llx_societe_rib |
|
| 616 | 616 | $companypaymentmode->fetch($id); |
| 617 | 617 | |
| 618 | 618 | if ($companypaymentmode->type != 'ban') { |
@@ -1217,7 +1217,7 @@ discard block |
||
| 1217 | 1217 | print '<table class="liste centpercent noborder">'."\n"; |
| 1218 | 1218 | print '<tr class="liste_titre">'; |
| 1219 | 1219 | print '<td>'.$langs->trans('Label').'</td>'; |
| 1220 | - print '<td>'.$form->textwithpicto($langs->trans('ExternalSystemID'), $langs->trans("IDOfPaymentInAnExternalSystem")).'</td>'; // external system ID |
|
| 1220 | + print '<td>'.$form->textwithpicto($langs->trans('ExternalSystemID'), $langs->trans("IDOfPaymentInAnExternalSystem")).'</td>'; // external system ID |
|
| 1221 | 1221 | print '<td>'.$langs->trans('Type').'</td>'; |
| 1222 | 1222 | print '<td>'.$langs->trans('Informations').'</td>'; |
| 1223 | 1223 | print '<td></td>'; |
@@ -1559,7 +1559,7 @@ discard block |
||
| 1559 | 1559 | |
| 1560 | 1560 | // List of bank accounts |
| 1561 | 1561 | if ($permissiontoaddupdatepaymentinformation) { |
| 1562 | - $morehtmlright = dolGetButtonTitle($langs->trans('Add'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"] . '?socid=' . $object->id . '&action=create'); |
|
| 1562 | + $morehtmlright = dolGetButtonTitle($langs->trans('Add'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?socid='.$object->id.'&action=create'); |
|
| 1563 | 1563 | } |
| 1564 | 1564 | |
| 1565 | 1565 | print load_fiche_titre($langs->trans("BankAccounts"), $morehtmlright, 'bank'); |
@@ -1577,7 +1577,7 @@ discard block |
||
| 1577 | 1577 | |
| 1578 | 1578 | print '<tr class="liste_titre">'; |
| 1579 | 1579 | print_liste_field_titre("Label"); |
| 1580 | - print_liste_field_titre($form->textwithpicto($langs->trans('ExternalSystemID'), $langs->trans("IDOfPaymentInAnExternalSystem"))); // external system ID |
|
| 1580 | + print_liste_field_titre($form->textwithpicto($langs->trans('ExternalSystemID'), $langs->trans("IDOfPaymentInAnExternalSystem"))); // external system ID |
|
| 1581 | 1581 | //print_liste_field_titre("Bank"); |
| 1582 | 1582 | print_liste_field_titre("RIB"); |
| 1583 | 1583 | print_liste_field_titre("IBAN"); |
@@ -1685,7 +1685,7 @@ discard block |
||
| 1685 | 1685 | if (isModEnabled('prelevement')) { |
| 1686 | 1686 | // RUM |
| 1687 | 1687 | print '<td class="tdoverflowmax100 small" title="'.dolPrintHTMLForAttribute($rib->rum).'">'.dolPrintHTML($rib->rum); |
| 1688 | - print '<br><span class="opacitymedium">'.dolPrintHTML($rib->frstrecur).'</span>'; // FRST or RCUR |
|
| 1688 | + print '<br><span class="opacitymedium">'.dolPrintHTML($rib->frstrecur).'</span>'; // FRST or RCUR |
|
| 1689 | 1689 | print '</td>'; |
| 1690 | 1690 | |
| 1691 | 1691 | // Date |
@@ -1764,7 +1764,7 @@ discard block |
||
| 1764 | 1764 | $useonlinesignature = 1; |
| 1765 | 1765 | if ($useonlinesignature) { |
| 1766 | 1766 | $rib->entity = $object->entity; //Assign $rib->entity necessary for a valid multicompany hash |
| 1767 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/signature.lib.php'; |
|
| 1767 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/signature.lib.php'; |
|
| 1768 | 1768 | print showOnlineSignatureUrl($companybankaccount->element, (string) $rib->id, $rib, 'short'); |
| 1769 | 1769 | } |
| 1770 | 1770 | print '</td>'; |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | $this->situationinvoice = false; |
| 169 | 169 | |
| 170 | 170 | if ($mysoc === null) { |
| 171 | - dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'. getCallerInfoString(), LOG_ERR); |
|
| 171 | + dol_syslog(get_class($this).'::__construct() Global $mysoc should not be null.'.getCallerInfoString(), LOG_ERR); |
|
| 172 | 172 | return; |
| 173 | 173 | } |
| 174 | 174 | |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | if (!empty($conf->mycompany->multidir_output[$object->entity ?? $conf->entity])) { |
| 276 | 276 | $logodir = $conf->mycompany->multidir_output[$object->entity ?? $conf->entity]; |
| 277 | 277 | } |
| 278 | - $pagecount = $pdf->setSourceFile($logodir.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
| 278 | + $pagecount = $pdf->setSourceFile($logodir.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND')); |
|
| 279 | 279 | $tplidx = $pdf->importPage(1); |
| 280 | 280 | } |
| 281 | 281 | |
@@ -616,7 +616,7 @@ discard block |
||
| 616 | 616 | // Pagefoot |
| 617 | 617 | $this->_pagefoot($pdf, $object, $outputlangs); |
| 618 | 618 | if (method_exists($pdf, 'AliasNbPages')) { |
| 619 | - $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 619 | + $pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 620 | 620 | } |
| 621 | 621 | |
| 622 | 622 | $pdf->Close(); |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | $formbarcode = null; |
| 109 | 109 | |
| 110 | 110 | // Get parameters |
| 111 | -$id = GETPOSTINT('id'); |
|
| 111 | +$id = GETPOSTINT('id'); |
|
| 112 | 112 | if (getDolGlobalString('MAIN_SECURITY_ALLOW_UNSECURED_REF_LABELS')) { |
| 113 | 113 | $ref = (GETPOSTISSET('ref') ? GETPOST('ref', 'nohtml') : null); |
| 114 | 114 | } else { |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | $backtopage = GETPOST('backtopage', 'alpha'); |
| 121 | 121 | $confirm = GETPOST('confirm', 'alpha'); |
| 122 | 122 | $socid = GETPOSTINT('socid'); |
| 123 | -$duration_value = GETPOST('duration_value') === '' ? null : GETPOSTINT('duration_value'); // duration value can be an empty string |
|
| 123 | +$duration_value = GETPOST('duration_value') === '' ? null : GETPOSTINT('duration_value'); // duration value can be an empty string |
|
| 124 | 124 | $duration_unit = GETPOST('duration_unit', 'alpha'); |
| 125 | 125 | |
| 126 | 126 | $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); |
@@ -496,7 +496,7 @@ discard block |
||
| 496 | 496 | |
| 497 | 497 | // Quick edit for extrafields |
| 498 | 498 | if ($action == 'update_extras' && $permissiontoeditextra) { |
| 499 | - $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 499 | + $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 500 | 500 | |
| 501 | 501 | $attribute_name = GETPOST('attribute', 'aZ09'); |
| 502 | 502 | |
@@ -655,7 +655,7 @@ discard block |
||
| 655 | 655 | $object->width = GETPOST('sizewidth'); |
| 656 | 656 | $object->height = GETPOST('sizeheight'); |
| 657 | 657 | $object->surface = GETPOST('surface'); |
| 658 | - $object->surface_units = GETPOST('surface_units') === '' ? null : GETPOSTINT('surface_units'); // This is not the fk_unit but the power of unit |
|
| 658 | + $object->surface_units = GETPOST('surface_units') === '' ? null : GETPOSTINT('surface_units'); // This is not the fk_unit but the power of unit |
|
| 659 | 659 | $object->volume = GETPOST('volume'); |
| 660 | 660 | $object->volume_units = GETPOST('volume_units') === '' ? null : GETPOSTINT('volume_units'); // This is not the fk_unit but the power of unit |
| 661 | 661 | $finished = GETPOSTINT('finished'); |
@@ -791,7 +791,7 @@ discard block |
||
| 791 | 791 | } else { |
| 792 | 792 | if ($object->id > 0) { |
| 793 | 793 | // Need dol_clone methode 1 (same object class) because update product use hasbatch() method on oldcopy |
| 794 | - $object->oldcopy = dol_clone($object, 1); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 794 | + $object->oldcopy = dol_clone($object, 1); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 795 | 795 | |
| 796 | 796 | if (!getDolGlobalString('PRODUCT_GENERATE_REF_AFTER_FORM')) { |
| 797 | 797 | $object->ref = (string) $ref; |
@@ -923,7 +923,7 @@ discard block |
||
| 923 | 923 | $object->accountancy_code_buy_export = $accountancy_code_buy_export; |
| 924 | 924 | } |
| 925 | 925 | if ($object->isService()) { |
| 926 | - $object->mandatory_period = (!empty($checkmandatory)) ? 1 : 0 ; |
|
| 926 | + $object->mandatory_period = (!empty($checkmandatory)) ? 1 : 0; |
|
| 927 | 927 | } |
| 928 | 928 | |
| 929 | 929 | |
@@ -1057,7 +1057,7 @@ discard block |
||
| 1057 | 1057 | $action = ""; |
| 1058 | 1058 | |
| 1059 | 1059 | $mesg = $langs->trans("ErrorProductAlreadyExists", $clone->ref); |
| 1060 | - $mesg .= ' <a href="' . $_SERVER["PHP_SELF"] . '?ref=' . $clone->ref . '">' . $langs->trans("ShowCardHere") . '</a>.'; |
|
| 1060 | + $mesg .= ' <a href="'.$_SERVER["PHP_SELF"].'?ref='.$clone->ref.'">'.$langs->trans("ShowCardHere").'</a>.'; |
|
| 1061 | 1061 | setEventMessages($mesg, null, 'errors'); |
| 1062 | 1062 | } else { |
| 1063 | 1063 | setEventMessages(empty($clone->error) ? '' : $langs->trans($clone->error), $clone->errors, 'errors'); |
@@ -1072,7 +1072,7 @@ discard block |
||
| 1072 | 1072 | } else { |
| 1073 | 1073 | $db->commit(); |
| 1074 | 1074 | $db->close(); |
| 1075 | - header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); |
|
| 1075 | + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); |
|
| 1076 | 1076 | exit; |
| 1077 | 1077 | } |
| 1078 | 1078 | } else { |
@@ -2283,9 +2283,9 @@ discard block |
||
| 2283 | 2283 | if (isModEnabled('productbatch') && $object->hasbatch()) { |
| 2284 | 2284 | print '<tr><td><input type="hidden" id="stockable_product" name="stockable_product" value="on" /></td><td></td></tr>'; |
| 2285 | 2285 | } else { |
| 2286 | - print '<tr><td><label for="stockable_product">' . $langs->trans("StockableProduct") . '</label></td>'; |
|
| 2286 | + print '<tr><td><label for="stockable_product">'.$langs->trans("StockableProduct").'</label></td>'; |
|
| 2287 | 2287 | $checked = empty($object->stockable_product) ? "" : "checked"; |
| 2288 | - print '<td><input type="checkbox" id="stockable_product" name="stockable_product" '. $checked . ' /></td></tr>'; |
|
| 2288 | + print '<td><input type="checkbox" id="stockable_product" name="stockable_product" '.$checked.' /></td></tr>'; |
|
| 2289 | 2289 | } |
| 2290 | 2290 | |
| 2291 | 2291 | // Default warehouse |
@@ -2345,9 +2345,9 @@ discard block |
||
| 2345 | 2345 | print '</td></tr>'; |
| 2346 | 2346 | |
| 2347 | 2347 | if (isModEnabled('stock') && getDolGlobalString('STOCK_SUPPORTS_SERVICES')) { |
| 2348 | - print '<tr><td>' . $langs->trans("StockableProduct") . '</td>'; |
|
| 2348 | + print '<tr><td>'.$langs->trans("StockableProduct").'</td>'; |
|
| 2349 | 2349 | $checked = $object->stockable_product == 1 ? "checked" : ""; |
| 2350 | - print '<td><input type="checkbox" id="stockable_product" name="stockable_product" ' . $checked . ' /></td></tr>'; |
|
| 2350 | + print '<td><input type="checkbox" id="stockable_product" name="stockable_product" '.$checked.' /></td></tr>'; |
|
| 2351 | 2351 | } |
| 2352 | 2352 | } else { |
| 2353 | 2353 | if (!getDolGlobalString('PRODUCT_DISABLE_NATURE')) { |
@@ -2814,7 +2814,7 @@ discard block |
||
| 2814 | 2814 | |
| 2815 | 2815 | // Stockable product / default warehouse |
| 2816 | 2816 | if (($object->isProduct() || getDolGlobalInt('STOCK_SUPPORTS_SERVICES')) && isModEnabled('stock')) { |
| 2817 | - print '<tr><td>' . $form->textwithpicto($langs->trans("StockableProduct"), $langs->trans('StockableProductDescription')) . '</td>'; |
|
| 2817 | + print '<tr><td>'.$form->textwithpicto($langs->trans("StockableProduct"), $langs->trans('StockableProductDescription')).'</td>'; |
|
| 2818 | 2818 | print '<td><input type="checkbox" readonly disabled '.($object->stockable_product == 1 ? 'checked' : '').'></td></tr>'; |
| 2819 | 2819 | |
| 2820 | 2820 | if ($object->isStockManaged()) { |
@@ -2871,7 +2871,7 @@ discard block |
||
| 2871 | 2871 | $result = $measuringUnits->fetchAll('', 'scale', 0, 0, ['t.active' => 1, 't.unit_type' => 'time']); |
| 2872 | 2872 | if ($result !== -1) { |
| 2873 | 2873 | foreach ($measuringUnits->records as $record) { |
| 2874 | - $durations[$record->short_label] = dol_ucfirst($record->label) . $plural; |
|
| 2874 | + $durations[$record->short_label] = dol_ucfirst($record->label).$plural; |
|
| 2875 | 2875 | } |
| 2876 | 2876 | } |
| 2877 | 2877 | print '<tr><td class="titlefieldmiddle">'.$langs->trans("Duration").'</td><td>'; |
@@ -3111,7 +3111,7 @@ discard block |
||
| 3111 | 3111 | } |
| 3112 | 3112 | |
| 3113 | 3113 | //Send |
| 3114 | - print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=presend&mode=init&token=' . newToken() . '#formmailbeforetitle'); |
|
| 3114 | + print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init&token='.newToken().'#formmailbeforetitle'); |
|
| 3115 | 3115 | |
| 3116 | 3116 | if (!isset($hookmanager->resArray['no_button_copy']) || $hookmanager->resArray['no_button_copy'] != 1) { |
| 3117 | 3117 | if (!empty($conf->use_javascript_ajax) && empty($conf->dol_use_jmobile)) { |
@@ -3293,7 +3293,7 @@ discard block |
||
| 3293 | 3293 | $modelmail = 'product_send'; |
| 3294 | 3294 | $defaulttopic = $object->label; |
| 3295 | 3295 | $diroutput = $conf->product->multidir_output[$object->entity ?? $conf->entity]; |
| 3296 | - $trackid = 'prod' . $object->id; |
|
| 3296 | + $trackid = 'prod'.$object->id; |
|
| 3297 | 3297 | |
| 3298 | 3298 | include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; |
| 3299 | 3299 | } |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | 'description' => array('type' => 'text', 'label' => 'Description', 'enabled' => 1, 'position' => 21, 'notnull' => 0, 'visible' => 1,), |
| 99 | 99 | 'date_creation' => array('type' => 'datetime', 'label' => 'DateCreation', 'enabled' => 1, 'position' => 500, 'notnull' => 1, 'visible' => -2,), |
| 100 | 100 | 'tms' => array('type' => 'timestamp', 'label' => 'DateModification', 'enabled' => 1, 'position' => 501, 'notnull' => 0, 'visible' => -2,), |
| 101 | - 'deplacement' => array('type' => 'select', 'required' => 1,'label' => 'NeedBusinessTravels', 'enabled' => 1, 'position' => 90, 'notnull' => 1, 'visible' => 1, 'arrayofkeyval' => array(0 => "No", 1 => "Yes"), 'default' => '0'), |
|
| 101 | + 'deplacement' => array('type' => 'select', 'required' => 1, 'label' => 'NeedBusinessTravels', 'enabled' => 1, 'position' => 90, 'notnull' => 1, 'visible' => 1, 'arrayofkeyval' => array(0 => "No", 1 => "Yes"), 'default' => '0'), |
|
| 102 | 102 | 'note_public' => array('type' => 'html', 'label' => 'NotePublic', 'enabled' => 1, 'position' => 70, 'notnull' => 0, 'visible' => 0,), |
| 103 | 103 | 'note_private' => array('type' => 'html', 'label' => 'NotePrivate', 'enabled' => 1, 'position' => 71, 'notnull' => 0, 'visible' => 0,), |
| 104 | 104 | 'fk_user_creat' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserAuthor', 'enabled' => 1, 'position' => 510, 'notnull' => 1, 'visible' => -2, 'foreignkey' => 'user.rowid',), |
@@ -823,7 +823,7 @@ discard block |
||
| 823 | 823 | { |
| 824 | 824 | // phpcs:enable |
| 825 | 825 | |
| 826 | - return ''; // There is no status on job profile for the moment |
|
| 826 | + return ''; // There is no status on job profile for the moment |
|
| 827 | 827 | } |
| 828 | 828 | |
| 829 | 829 | /** |
@@ -910,7 +910,7 @@ discard block |
||
| 910 | 910 | if (getDolGlobalString('hrm_JOB_ADDON')) { |
| 911 | 911 | $mybool = false; |
| 912 | 912 | |
| 913 | - $file = getDolGlobalString('hrm_JOB_ADDON') . ".php"; |
|
| 913 | + $file = getDolGlobalString('hrm_JOB_ADDON').".php"; |
|
| 914 | 914 | $classname = getDolGlobalString('hrm_JOB_ADDON'); |
| 915 | 915 | |
| 916 | 916 | // Include file with class |
@@ -1007,7 +1007,7 @@ discard block |
||
| 1007 | 1007 | $return .= img_picto('', $this->picto); |
| 1008 | 1008 | $return .= '</span>'; |
| 1009 | 1009 | $return .= '<div class="info-box-content">'; |
| 1010 | - $return .= '<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">' . $this->getNomUrl(0) . '</span>'; |
|
| 1010 | + $return .= '<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">'.$this->getNomUrl(0).'</span>'; |
|
| 1011 | 1011 | if ($selected >= 0) { |
| 1012 | 1012 | $return .= '<input id="cb'.$this->id.'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->id.'"'.($selected ? ' checked="checked"' : '').'>'; |
| 1013 | 1013 | } |
@@ -1017,7 +1017,7 @@ discard block |
||
| 1017 | 1017 | }*/ |
| 1018 | 1018 | if (empty($this->description)) { |
| 1019 | 1019 | //$return .= '<br><span class="info-box-label opacitymedium">'.$langs->trans("Description").'</span> : '; |
| 1020 | - $return .= '<br><span class="info-box-label ">' . dol_trunc($this->description, 25) . '</span>'; |
|
| 1020 | + $return .= '<br><span class="info-box-label ">'.dol_trunc($this->description, 25).'</span>'; |
|
| 1021 | 1021 | } |
| 1022 | 1022 | $return .= '</div>'; |
| 1023 | 1023 | $return .= '</div>'; |
@@ -43,24 +43,24 @@ discard block |
||
| 43 | 43 | |
| 44 | 44 | // Load Dolibarr environment |
| 45 | 45 | require '../../main.inc.php'; |
| 46 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php'; |
|
| 47 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php'; |
|
| 48 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formpropal.class.php'; |
|
| 49 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formmargin.class.php'; |
|
| 50 | -require_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php'; |
|
| 51 | -require_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php'; |
|
| 52 | -require_once DOL_DOCUMENT_ROOT . '/core/modules/propale/modules_propale.php'; |
|
| 53 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/propal.lib.php'; |
|
| 54 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php'; |
|
| 55 | -require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php'; |
|
| 56 | -require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; |
|
| 46 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; |
|
| 47 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; |
|
| 48 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formpropal.class.php'; |
|
| 49 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formmargin.class.php'; |
|
| 50 | +require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; |
|
| 51 | +require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; |
|
| 52 | +require_once DOL_DOCUMENT_ROOT.'/core/modules/propale/modules_propale.php'; |
|
| 53 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/propal.lib.php'; |
|
| 54 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; |
|
| 55 | +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; |
|
| 56 | +require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; |
|
| 57 | 57 | if (isModEnabled('project')) { |
| 58 | - require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
| 59 | - require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; |
|
| 58 | + require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
| 59 | + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; |
|
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | if (isModEnabled('variants')) { |
| 63 | - require_once DOL_DOCUMENT_ROOT . '/variants/class/ProductCombination.class.php'; |
|
| 63 | + require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductCombination.class.php'; |
|
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | /** |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | $cancel = GETPOST('cancel', 'alpha'); |
| 93 | 93 | $origin = GETPOST('origin', 'alpha'); |
| 94 | 94 | $originid = GETPOSTINT('originid'); |
| 95 | -$renewal = GETPOST('renewal'); // for contract renewal |
|
| 95 | +$renewal = GETPOST('renewal'); // for contract renewal |
|
| 96 | 96 | $confirm = GETPOST('confirm', 'alpha'); |
| 97 | 97 | $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page |
| 98 | 98 | $lineid = GETPOSTINT('lineid'); |
@@ -177,34 +177,34 @@ discard block |
||
| 177 | 177 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
| 178 | 178 | } |
| 179 | 179 | if (empty($reshook)) { |
| 180 | - $backurlforlist = DOL_URL_ROOT . '/comm/propal/list.php'; |
|
| 180 | + $backurlforlist = DOL_URL_ROOT.'/comm/propal/list.php'; |
|
| 181 | 181 | |
| 182 | 182 | if (empty($backtopage) || ($cancel && empty($id))) { |
| 183 | 183 | if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) { |
| 184 | 184 | if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) { |
| 185 | 185 | $backtopage = $backurlforlist; |
| 186 | 186 | } else { |
| 187 | - $backtopage = DOL_URL_ROOT . '/comm/propal/card.php?id=' . ((!empty($id) && $id > 0) ? $id : '__ID__'); |
|
| 187 | + $backtopage = DOL_URL_ROOT.'/comm/propal/card.php?id='.((!empty($id) && $id > 0) ? $id : '__ID__'); |
|
| 188 | 188 | } |
| 189 | 189 | } |
| 190 | 190 | } |
| 191 | 191 | |
| 192 | 192 | if ($cancel) { |
| 193 | 193 | if (!empty($backtopageforcancel)) { |
| 194 | - header("Location: " . $backtopageforcancel); |
|
| 194 | + header("Location: ".$backtopageforcancel); |
|
| 195 | 195 | exit; |
| 196 | 196 | } elseif (!empty($backtopage)) { |
| 197 | - header("Location: " . $backtopage); |
|
| 197 | + header("Location: ".$backtopage); |
|
| 198 | 198 | exit; |
| 199 | 199 | } |
| 200 | 200 | $action = ''; |
| 201 | 201 | } |
| 202 | 202 | |
| 203 | - include DOL_DOCUMENT_ROOT . '/core/actions_setnotes.inc.php'; // Must be include, not includ_once |
|
| 203 | + include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once |
|
| 204 | 204 | |
| 205 | - include DOL_DOCUMENT_ROOT . '/core/actions_dellink.inc.php'; // Must be 'include', not 'include_once' |
|
| 205 | + include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be 'include', not 'include_once' |
|
| 206 | 206 | |
| 207 | - include DOL_DOCUMENT_ROOT . '/core/actions_lineupdown.inc.php'; // Must be 'include', not 'include_once' |
|
| 207 | + include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be 'include', not 'include_once' |
|
| 208 | 208 | // Action clone object |
| 209 | 209 | if ($action == 'confirm_clone' && $confirm == 'yes' && $usercancreate) { |
| 210 | 210 | if (!($socid > 0)) { |
@@ -238,7 +238,7 @@ discard block |
||
| 238 | 238 | $object->delivery_date = $date_delivery; |
| 239 | 239 | foreach ($object->lines as $line) { |
| 240 | 240 | if (isset($line->date_start)) { |
| 241 | - $line->date_start += $difference; |
|
| 241 | + $line->date_start += $difference; |
|
| 242 | 242 | } |
| 243 | 243 | if (isset($line->date_end)) { |
| 244 | 244 | $line->date_end += $difference; |
@@ -266,7 +266,7 @@ discard block |
||
| 266 | 266 | setEventMessages('', $warningMsgLineList, 'warnings'); |
| 267 | 267 | } |
| 268 | 268 | |
| 269 | - header("Location: " . $_SERVER['PHP_SELF'] . '?id=' . $result); |
|
| 269 | + header("Location: ".$_SERVER['PHP_SELF'].'?id='.$result); |
|
| 270 | 270 | exit(); |
| 271 | 271 | } else { |
| 272 | 272 | if (count($object->errors) > 0) { |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | // Cancel proposal |
| 281 | 281 | $result = $object->setCancel($user); |
| 282 | 282 | if ($result > 0) { |
| 283 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
| 283 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
| 284 | 284 | exit(); |
| 285 | 285 | } else { |
| 286 | 286 | $langs->load("errors"); |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | // Delete proposal |
| 291 | 291 | $result = $object->delete($user); |
| 292 | 292 | if ($result > 0) { |
| 293 | - header('Location: ' . DOL_URL_ROOT . '/comm/propal/list.php?restore_lastsearch_values=1'); |
|
| 293 | + header('Location: '.DOL_URL_ROOT.'/comm/propal/list.php?restore_lastsearch_values=1'); |
|
| 294 | 294 | exit(); |
| 295 | 295 | } else { |
| 296 | 296 | $langs->load("errors"); |
@@ -322,7 +322,7 @@ discard block |
||
| 322 | 322 | $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); |
| 323 | 323 | } |
| 324 | 324 | |
| 325 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
| 325 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
| 326 | 326 | exit(); |
| 327 | 327 | } elseif ($action == 'confirm_delete_subtotalline' && $confirm == 'yes' && $usercancreate) { |
| 328 | 328 | // Delete line |
@@ -352,7 +352,7 @@ discard block |
||
| 352 | 352 | $result = $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); |
| 353 | 353 | } |
| 354 | 354 | if ($result >= 0) { |
| 355 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id); |
|
| 355 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); |
|
| 356 | 356 | exit(); |
| 357 | 357 | } |
| 358 | 358 | } else { |
@@ -621,13 +621,13 @@ discard block |
||
| 621 | 621 | |
| 622 | 622 | $id = $object->create($user); |
| 623 | 623 | if ($id > 0) { |
| 624 | - dol_include_once('/' . $element . '/class/' . $subelement . '.class.php'); |
|
| 624 | + dol_include_once('/'.$element.'/class/'.$subelement.'.class.php'); |
|
| 625 | 625 | |
| 626 | 626 | $classname = ucfirst($subelement); |
| 627 | 627 | $srcobject = new $classname($db); |
| 628 | - '@phan-var-force Commande|Propal|Contrat|Fichinter|Expedition $srcobject'; // Can be other class, but CommonObject is too generic |
|
| 628 | + '@phan-var-force Commande|Propal|Contrat|Fichinter|Expedition $srcobject'; // Can be other class, but CommonObject is too generic |
|
| 629 | 629 | |
| 630 | - dol_syslog("Try to find source object origin=" . $object->origin . " originid=" . $object->origin_id . " to add lines"); |
|
| 630 | + dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add lines"); |
|
| 631 | 631 | $result = $srcobject->fetch($object->origin_id); |
| 632 | 632 | |
| 633 | 633 | if ($result > 0) { |
@@ -692,7 +692,7 @@ discard block |
||
| 692 | 692 | |
| 693 | 693 | $tva_tx = $lines[$i]->tva_tx; |
| 694 | 694 | if (!empty($lines[$i]->vat_src_code) && !preg_match('/\(/', $tva_tx)) { |
| 695 | - $tva_tx .= ' (' . $lines[$i]->vat_src_code . ')'; |
|
| 695 | + $tva_tx .= ' ('.$lines[$i]->vat_src_code.')'; |
|
| 696 | 696 | } |
| 697 | 697 | |
| 698 | 698 | $result = $object->addline($desc, $lines[$i]->subprice, $lines[$i]->qty, $tva_tx, $lines[$i]->localtax1_tx, $lines[$i]->localtax2_tx, $lines[$i]->fk_product, $lines[$i]->remise_percent, 'HT', 0, $lines[$i]->info_bits, $product_type, $lines[$i]->rang, $lines[$i]->special_code, $fk_parent_line, $lines[$i]->fk_fournprice, $lines[$i]->pa_ht, $label, $date_start, $date_end, $array_options, $lines[$i]->fk_unit); |
@@ -776,7 +776,7 @@ discard block |
||
| 776 | 776 | } |
| 777 | 777 | } |
| 778 | 778 | |
| 779 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id); |
|
| 779 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); |
|
| 780 | 780 | exit(); |
| 781 | 781 | } else { |
| 782 | 782 | $db->rollback(); |
@@ -824,7 +824,7 @@ discard block |
||
| 824 | 824 | $error++; |
| 825 | 825 | } else { |
| 826 | 826 | // Needed if object linked modified by trigger (because linked objects can't be fetched two times : linkedObjectsFullLoaded) |
| 827 | - $locationTarget = DOL_URL_ROOT . '/comm/propal/card.php?id=' . $object->id; |
|
| 827 | + $locationTarget = DOL_URL_ROOT.'/comm/propal/card.php?id='.$object->id; |
|
| 828 | 828 | } |
| 829 | 829 | |
| 830 | 830 | $deposit = null; |
@@ -835,7 +835,7 @@ discard block |
||
| 835 | 835 | !$error && GETPOSTINT('statut') == $object::STATUS_SIGNED && GETPOST('generate_deposit') == 'on' |
| 836 | 836 | && !empty($deposit_percent_from_payment_terms) && isModEnabled('invoice') && $user->hasRight('facture', 'creer') |
| 837 | 837 | ) { |
| 838 | - require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
| 838 | + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
| 839 | 839 | |
| 840 | 840 | $date = dol_mktime(0, 0, 0, GETPOSTINT('datefmonth'), GETPOSTINT('datefday'), GETPOSTINT('datefyear')); |
| 841 | 841 | $forceFields = array(); |
@@ -848,10 +848,10 @@ discard block |
||
| 848 | 848 | |
| 849 | 849 | if ($deposit) { |
| 850 | 850 | setEventMessage('DepositGenerated'); |
| 851 | - $locationTarget = DOL_URL_ROOT . '/compta/facture/card.php?id=' . $deposit->id; |
|
| 851 | + $locationTarget = DOL_URL_ROOT.'/compta/facture/card.php?id='.$deposit->id; |
|
| 852 | 852 | } else { |
| 853 | 853 | $error++; |
| 854 | - setEventMessages("Failed to create down payment - " . $object->error, $object->errors, 'errors'); |
|
| 854 | + setEventMessages("Failed to create down payment - ".$object->error, $object->errors, 'errors'); |
|
| 855 | 855 | } |
| 856 | 856 | } |
| 857 | 857 | |
@@ -876,12 +876,12 @@ discard block |
||
| 876 | 876 | } |
| 877 | 877 | |
| 878 | 878 | if ($locationTarget) { |
| 879 | - header('Location: ' . $locationTarget); |
|
| 879 | + header('Location: '.$locationTarget); |
|
| 880 | 880 | exit; |
| 881 | 881 | } |
| 882 | 882 | } else { |
| 883 | 883 | $object->status = $oldstatus; |
| 884 | - $object->statut = $oldstatus; // deprecated |
|
| 884 | + $object->statut = $oldstatus; // deprecated |
|
| 885 | 885 | |
| 886 | 886 | $db->rollback(); |
| 887 | 887 | $action = ''; |
@@ -900,7 +900,7 @@ discard block |
||
| 900 | 900 | setEventMessages($object->error, $object->errors, 'errors'); |
| 901 | 901 | $error++; |
| 902 | 902 | } else { |
| 903 | - $object->statut = $newstatus; // deprecated |
|
| 903 | + $object->statut = $newstatus; // deprecated |
|
| 904 | 904 | $object->status = $newstatus; |
| 905 | 905 | } |
| 906 | 906 | |
@@ -918,13 +918,13 @@ discard block |
||
| 918 | 918 | |
| 919 | 919 | if (!empty($importLines) && is_array($importLines) && !empty($fromElement) && ctype_alpha($fromElement) && !empty($fromElementid)) { |
| 920 | 920 | if ($fromElement == 'commande') { |
| 921 | - dol_include_once('/' . $fromElement . '/class/' . $fromElement . '.class.php'); |
|
| 921 | + dol_include_once('/'.$fromElement.'/class/'.$fromElement.'.class.php'); |
|
| 922 | 922 | $lineClassName = 'OrderLine'; |
| 923 | 923 | } elseif ($fromElement == 'propal') { |
| 924 | - dol_include_once('/comm/' . $fromElement . '/class/' . $fromElement . '.class.php'); |
|
| 924 | + dol_include_once('/comm/'.$fromElement.'/class/'.$fromElement.'.class.php'); |
|
| 925 | 925 | $lineClassName = 'PropaleLigne'; |
| 926 | 926 | } elseif ($fromElement == 'facture') { |
| 927 | - dol_include_once('/compta/' . $fromElement . '/class/' . $fromElement . '.class.php'); |
|
| 927 | + dol_include_once('/compta/'.$fromElement.'/class/'.$fromElement.'.class.php'); |
|
| 928 | 928 | $lineClassName = 'FactureLigne'; |
| 929 | 929 | } else { |
| 930 | 930 | $lineClassName = null; |
@@ -991,14 +991,14 @@ discard block |
||
| 991 | 991 | $object->updateSubtotalLineBlockLines($langs, $object->getRangOfLine($lineid), 'discount', $discount); |
| 992 | 992 | } |
| 993 | 993 | |
| 994 | - include DOL_DOCUMENT_ROOT . '/core/actions_printing.inc.php'; |
|
| 994 | + include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; |
|
| 995 | 995 | |
| 996 | 996 | // Actions to send emails |
| 997 | 997 | $actiontypecode = 'AC_OTH_AUTO'; |
| 998 | 998 | $triggersendname = 'PROPAL_SENTBYMAIL'; |
| 999 | 999 | $autocopy = 'MAIN_MAIL_AUTOCOPY_PROPOSAL_TO'; |
| 1000 | - $trackid = 'pro' . $object->id; |
|
| 1001 | - include DOL_DOCUMENT_ROOT . '/core/actions_sendmails.inc.php'; |
|
| 1000 | + $trackid = 'pro'.$object->id; |
|
| 1001 | + include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; |
|
| 1002 | 1002 | |
| 1003 | 1003 | |
| 1004 | 1004 | // Go back to draft |
@@ -1067,7 +1067,7 @@ discard block |
||
| 1067 | 1067 | } |
| 1068 | 1068 | $tvatx = $line->tva_tx; |
| 1069 | 1069 | if (!empty($line->vat_src_code)) { |
| 1070 | - $tvatx .= ' (' . $line->vat_src_code . ')'; |
|
| 1070 | + $tvatx .= ' ('.$line->vat_src_code.')'; |
|
| 1071 | 1071 | } |
| 1072 | 1072 | $result = $object->updateline($line->id, $line->subprice, $line->qty, (float) $remise_percent, $tvatx, $line->localtax1_tx, $line->localtax2_tx, $line->desc, 'HT', $line->info_bits, $line->special_code, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->product_type, $line->date_start, $line->date_end, $line->array_options, $line->fk_unit, $line->multicurrency_subprice); |
| 1073 | 1073 | $object->lines[$key] = $object->line; |
@@ -1085,7 +1085,7 @@ discard block |
||
| 1085 | 1085 | if ($prod->price_min > $subprice) { |
| 1086 | 1086 | $price_subprice = price($subprice, 0, $outlangs, 1, -1, -1, 'auto'); |
| 1087 | 1087 | $price_price_min = price($prod->price_min, 0, $outlangs, 1, -1, -1, 'auto'); |
| 1088 | - setEventMessages($prod->ref . ' - ' . $prod->label . ' (' . $price_subprice . ' < ' . $price_price_min . ' ' . strtolower($langs->trans("MinPrice")) . ')' . "\n", null, 'warnings'); |
|
| 1088 | + setEventMessages($prod->ref.' - '.$prod->label.' ('.$price_subprice.' < '.$price_price_min.' '.strtolower($langs->trans("MinPrice")).')'."\n", null, 'warnings'); |
|
| 1089 | 1089 | } |
| 1090 | 1090 | // Manage $line->subprice and $line->multicurrency_subprice |
| 1091 | 1091 | if ($line->subprice <> 0) { |
@@ -1155,7 +1155,7 @@ discard block |
||
| 1155 | 1155 | } else { |
| 1156 | 1156 | setEventMessages($object->error, $object->errors, 'errors'); |
| 1157 | 1157 | } |
| 1158 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id); |
|
| 1158 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); |
|
| 1159 | 1159 | exit(); |
| 1160 | 1160 | } elseif ($action == 'confirm_addsubtotalline' && $usercancreate) { |
| 1161 | 1161 | // Handling adding a new subtotal line for subtotals module |
@@ -1207,7 +1207,7 @@ discard block |
||
| 1207 | 1207 | } else { |
| 1208 | 1208 | setEventMessages($object->error, $object->errors, 'errors'); |
| 1209 | 1209 | } |
| 1210 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id); |
|
| 1210 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); |
|
| 1211 | 1211 | exit(); |
| 1212 | 1212 | } elseif ( |
| 1213 | 1213 | $action == 'addline' && !GETPOST('submitforalllines', 'alpha') |
@@ -1252,8 +1252,8 @@ discard block |
||
| 1252 | 1252 | |
| 1253 | 1253 | $tva_tx = GETPOST('tva_tx', 'alpha'); |
| 1254 | 1254 | |
| 1255 | - $qty = price2num(GETPOST('qty' . $predef, 'alpha'), 'MS', 2); |
|
| 1256 | - $remise_percent = (GETPOSTISSET('remise_percent' . $predef) ? price2num(GETPOST('remise_percent' . $predef, 'alpha'), '', 2) : 0); |
|
| 1255 | + $qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS', 2); |
|
| 1256 | + $remise_percent = (GETPOSTISSET('remise_percent'.$predef) ? price2num(GETPOST('remise_percent'.$predef, 'alpha'), '', 2) : 0); |
|
| 1257 | 1257 | if (empty($remise_percent)) { |
| 1258 | 1258 | $remise_percent = 0; |
| 1259 | 1259 | } |
@@ -1265,7 +1265,7 @@ discard block |
||
| 1265 | 1265 | if (is_array($extralabelsline)) { |
| 1266 | 1266 | // Get extra fields |
| 1267 | 1267 | foreach ($extralabelsline as $key => $value) { |
| 1268 | - unset($_POST["options_" . $key]); |
|
| 1268 | + unset($_POST["options_".$key]); |
|
| 1269 | 1269 | } |
| 1270 | 1270 | } |
| 1271 | 1271 | |
@@ -1337,7 +1337,7 @@ discard block |
||
| 1337 | 1337 | |
| 1338 | 1338 | if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) { |
| 1339 | 1339 | // If price per customer |
| 1340 | - require_once DOL_DOCUMENT_ROOT . '/product/class/productcustomerprice.class.php'; |
|
| 1340 | + require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php'; |
|
| 1341 | 1341 | $prodcustprice = new ProductCustomerPrice($db); |
| 1342 | 1342 | $filter = array('t.fk_product' => (string) $prod->id, 't.fk_soc' => (string) $object->thirdparty->id); |
| 1343 | 1343 | |
@@ -1401,7 +1401,7 @@ discard block |
||
| 1401 | 1401 | } |
| 1402 | 1402 | } elseif (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) { |
| 1403 | 1403 | // If price per customer |
| 1404 | - require_once DOL_DOCUMENT_ROOT . '/product/class/productcustomerprice.class.php'; |
|
| 1404 | + require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php'; |
|
| 1405 | 1405 | |
| 1406 | 1406 | $prodcustprice = new ProductCustomerPrice($db); |
| 1407 | 1407 | |
@@ -1548,23 +1548,23 @@ discard block |
||
| 1548 | 1548 | $outputlangs->load('products'); |
| 1549 | 1549 | } |
| 1550 | 1550 | if (!empty($prod->customcode)) { |
| 1551 | - $tmptxt .= $outputlangs->transnoentitiesnoconv("CustomsCode") . ': ' . $prod->customcode; |
|
| 1551 | + $tmptxt .= $outputlangs->transnoentitiesnoconv("CustomsCode").': '.$prod->customcode; |
|
| 1552 | 1552 | } |
| 1553 | 1553 | if (!empty($prod->customcode) && !empty($prod->country_code)) { |
| 1554 | 1554 | $tmptxt .= ' - '; |
| 1555 | 1555 | } |
| 1556 | 1556 | if (!empty($prod->country_code)) { |
| 1557 | - $tmptxt .= $outputlangs->transnoentitiesnoconv("CountryOrigin") . ': ' . getCountry($prod->country_code, '', $db, $outputlangs, 0); |
|
| 1557 | + $tmptxt .= $outputlangs->transnoentitiesnoconv("CountryOrigin").': '.getCountry($prod->country_code, '', $db, $outputlangs, 0); |
|
| 1558 | 1558 | } |
| 1559 | 1559 | } else { |
| 1560 | 1560 | if (!empty($prod->customcode)) { |
| 1561 | - $tmptxt .= $langs->transnoentitiesnoconv("CustomsCode") . ': ' . $prod->customcode; |
|
| 1561 | + $tmptxt .= $langs->transnoentitiesnoconv("CustomsCode").': '.$prod->customcode; |
|
| 1562 | 1562 | } |
| 1563 | 1563 | if (!empty($prod->customcode) && !empty($prod->country_code)) { |
| 1564 | 1564 | $tmptxt .= ' - '; |
| 1565 | 1565 | } |
| 1566 | 1566 | if (!empty($prod->country_code)) { |
| 1567 | - $tmptxt .= $langs->transnoentitiesnoconv("CountryOrigin") . ': ' . getCountry($prod->country_code, '', $db, $langs, 0); |
|
| 1567 | + $tmptxt .= $langs->transnoentitiesnoconv("CountryOrigin").': '.getCountry($prod->country_code, '', $db, $langs, 0); |
|
| 1568 | 1568 | } |
| 1569 | 1569 | } |
| 1570 | 1570 | $tmptxt .= ')'; |
@@ -1603,11 +1603,11 @@ discard block |
||
| 1603 | 1603 | $localtax2_tx = get_localtax($tva_tx, 2, $object->thirdparty, $mysoc, $tva_npr); |
| 1604 | 1604 | |
| 1605 | 1605 | // Margin |
| 1606 | - $fournprice = (int) (GETPOST('fournprice' . $predef) ? GETPOST('fournprice' . $predef) : ''); // This can be id of supplier price, or 'pmpprice' or 'costprice', or 'inputprice', we force to keep ID only |
|
| 1607 | - $buyingprice = price2num((GETPOST('buying_price' . $predef) != '' ? GETPOST('buying_price' . $predef) : ''), '', 2); // If buying_price is '0', we must keep this value |
|
| 1606 | + $fournprice = (int) (GETPOST('fournprice'.$predef) ? GETPOST('fournprice'.$predef) : ''); // This can be id of supplier price, or 'pmpprice' or 'costprice', or 'inputprice', we force to keep ID only |
|
| 1607 | + $buyingprice = price2num((GETPOST('buying_price'.$predef) != '' ? GETPOST('buying_price'.$predef) : ''), '', 2); // If buying_price is '0', we must keep this value |
|
| 1608 | 1608 | |
| 1609 | - $date_start = dol_mktime(GETPOSTINT('date_start' . $predef . 'hour'), GETPOSTINT('date_start' . $predef . 'min'), GETPOSTINT('date_start' . $predef . 'sec'), GETPOSTINT('date_start' . $predef . 'month'), GETPOSTINT('date_start' . $predef . 'day'), GETPOSTINT('date_start' . $predef . 'year')); |
|
| 1610 | - $date_end = dol_mktime(GETPOSTINT('date_end' . $predef . 'hour'), GETPOSTINT('date_end' . $predef . 'min'), GETPOSTINT('date_end' . $predef . 'sec'), GETPOSTINT('date_end' . $predef . 'month'), GETPOSTINT('date_end' . $predef . 'day'), GETPOSTINT('date_end' . $predef . 'year')); |
|
| 1609 | + $date_start = dol_mktime(GETPOSTINT('date_start'.$predef.'hour'), GETPOSTINT('date_start'.$predef.'min'), GETPOSTINT('date_start'.$predef.'sec'), GETPOSTINT('date_start'.$predef.'month'), GETPOSTINT('date_start'.$predef.'day'), GETPOSTINT('date_start'.$predef.'year')); |
|
| 1610 | + $date_end = dol_mktime(GETPOSTINT('date_end'.$predef.'hour'), GETPOSTINT('date_end'.$predef.'min'), GETPOSTINT('date_end'.$predef.'sec'), GETPOSTINT('date_end'.$predef.'month'), GETPOSTINT('date_end'.$predef.'day'), GETPOSTINT('date_end'.$predef.'year')); |
|
| 1611 | 1611 | |
| 1612 | 1612 | // Prepare a price equivalent for minimum price check |
| 1613 | 1613 | $pu_equivalent = $pu_ht; |
@@ -1738,7 +1738,7 @@ discard block |
||
| 1738 | 1738 | if ($prod->price_min > $line->subprice) { |
| 1739 | 1739 | $price_subprice = price($line->subprice, 0, $outlangs, 1, -1, -1, 'auto'); |
| 1740 | 1740 | $price_price_min = price($prod->price_min, 0, $outlangs, 1, -1, -1, 'auto'); |
| 1741 | - setEventMessages($prod->ref . ' - ' . $prod->label . ' (' . $price_subprice . ' < ' . $price_price_min . ' ' . strtolower($langs->trans("MinPrice")) . ')' . "\n", null, 'warnings'); |
|
| 1741 | + setEventMessages($prod->ref.' - '.$prod->label.' ('.$price_subprice.' < '.$price_price_min.' '.strtolower($langs->trans("MinPrice")).')'."\n", null, 'warnings'); |
|
| 1742 | 1742 | } else { |
| 1743 | 1743 | setEventMessages($prod->error, $prod->errors, 'errors'); |
| 1744 | 1744 | } |
@@ -1876,7 +1876,7 @@ discard block |
||
| 1876 | 1876 | $pu_ttc = price2num(GETPOST('price_ttc'), '', 2); |
| 1877 | 1877 | |
| 1878 | 1878 | // Add buying price |
| 1879 | - $fournprice = (int) (GETPOST('fournprice') ? GETPOST('fournprice') : ''); // This can be id of supplier price, or 'pmpprice' or 'costprice', or 'inputprice', we force to keep ID only |
|
| 1879 | + $fournprice = (int) (GETPOST('fournprice') ? GETPOST('fournprice') : ''); // This can be id of supplier price, or 'pmpprice' or 'costprice', or 'inputprice', we force to keep ID only |
|
| 1880 | 1880 | $buyingprice = price2num((GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''), '', 2); // If buying_price is '0', we must keep this value |
| 1881 | 1881 | |
| 1882 | 1882 | $pu_ht_devise = price2num(GETPOST('multicurrency_subprice'), '', 2); |
@@ -1923,7 +1923,7 @@ discard block |
||
| 1923 | 1923 | if (is_array($extralabelsline)) { |
| 1924 | 1924 | // Get extra fields |
| 1925 | 1925 | foreach ($extralabelsline as $key => $value) { |
| 1926 | - unset($_POST["options_" . $key]); |
|
| 1926 | + unset($_POST["options_".$key]); |
|
| 1927 | 1927 | } |
| 1928 | 1928 | } |
| 1929 | 1929 | |
@@ -2055,7 +2055,7 @@ discard block |
||
| 2055 | 2055 | } |
| 2056 | 2056 | } |
| 2057 | 2057 | } elseif ($action == 'updateline' && $usercancreate && GETPOST('cancel', 'alpha')) { |
| 2058 | - header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // To re-display card in edit mode |
|
| 2058 | + header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); // To re-display card in edit mode |
|
| 2059 | 2059 | exit(); |
| 2060 | 2060 | } elseif ($action == 'classin' && $usercancreate) { |
| 2061 | 2061 | // Set project |
@@ -2069,8 +2069,8 @@ discard block |
||
| 2069 | 2069 | } elseif ($action == 'setconditions' && $usercancreate) { |
| 2070 | 2070 | // Terms of payment |
| 2071 | 2071 | $sql = "SELECT code "; |
| 2072 | - $sql .= "FROM " . $db->prefix() . "c_payment_term"; |
|
| 2073 | - $sql .= " WHERE rowid = " . ((int) GETPOST('cond_reglement_id', 'int')); |
|
| 2072 | + $sql .= "FROM ".$db->prefix()."c_payment_term"; |
|
| 2073 | + $sql .= " WHERE rowid = ".((int) GETPOST('cond_reglement_id', 'int')); |
|
| 2074 | 2074 | $result = $db->query($sql); |
| 2075 | 2075 | if ($result) { |
| 2076 | 2076 | $obj = $db->fetch_object($result); |
@@ -2135,7 +2135,7 @@ discard block |
||
| 2135 | 2135 | } |
| 2136 | 2136 | |
| 2137 | 2137 | if ($result >= 0) { |
| 2138 | - header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id); |
|
| 2138 | + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); |
|
| 2139 | 2139 | exit(); |
| 2140 | 2140 | } else { |
| 2141 | 2141 | if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { |
@@ -2158,7 +2158,7 @@ discard block |
||
| 2158 | 2158 | $result = $object->delete_contact($lineid); |
| 2159 | 2159 | |
| 2160 | 2160 | if ($result >= 0) { |
| 2161 | - header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id); |
|
| 2161 | + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); |
|
| 2162 | 2162 | exit(); |
| 2163 | 2163 | } else { |
| 2164 | 2164 | dol_print_error($db); |
@@ -2169,7 +2169,7 @@ discard block |
||
| 2169 | 2169 | // Actions to build doc |
| 2170 | 2170 | $upload_dir = !empty($conf->propal->multidir_output[$object->entity ?? $conf->entity]) ? $conf->propal->multidir_output[$object->entity ?? $conf->entity] : $conf->propal->dir_output; |
| 2171 | 2171 | $permissiontoadd = $usercancreate; |
| 2172 | - include DOL_DOCUMENT_ROOT . '/core/actions_builddoc.inc.php'; |
|
| 2172 | + include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; |
|
| 2173 | 2173 | } |
| 2174 | 2174 | |
| 2175 | 2175 | |
@@ -2186,7 +2186,7 @@ discard block |
||
| 2186 | 2186 | $formproject = new FormProjets($db); |
| 2187 | 2187 | } |
| 2188 | 2188 | |
| 2189 | -$title = $object->ref . " - " . $langs->trans('Card'); |
|
| 2189 | +$title = $object->ref." - ".$langs->trans('Card'); |
|
| 2190 | 2190 | if ($action == 'create') { |
| 2191 | 2191 | $title = $langs->trans("NewPropal"); |
| 2192 | 2192 | } |
@@ -2252,11 +2252,11 @@ discard block |
||
| 2252 | 2252 | $element = $subelement = 'expedition'; |
| 2253 | 2253 | } |
| 2254 | 2254 | |
| 2255 | - dol_include_once('/' . $element . '/class/' . $subelement . '.class.php'); |
|
| 2255 | + dol_include_once('/'.$element.'/class/'.$subelement.'.class.php'); |
|
| 2256 | 2256 | |
| 2257 | 2257 | $classname = ucfirst($subelement); |
| 2258 | 2258 | $objectsrc = new $classname($db); |
| 2259 | - '@phan-var-force Commande|Propal|Contrat|Expedition $objectsrc'; // Can be other class, but CommonObject is too generic |
|
| 2259 | + '@phan-var-force Commande|Propal|Contrat|Expedition $objectsrc'; // Can be other class, but CommonObject is too generic |
|
| 2260 | 2260 | $objectsrc->fetch($originid); |
| 2261 | 2261 | if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines')) { |
| 2262 | 2262 | $objectsrc->fetch_lines(); |
@@ -2270,7 +2270,7 @@ discard block |
||
| 2270 | 2270 | |
| 2271 | 2271 | $cond_reglement_id = (!empty($objectsrc->cond_reglement_id) ? $objectsrc->cond_reglement_id : (!empty($soc->cond_reglement_id) ? $soc->cond_reglement_id : 0)); |
| 2272 | 2272 | $mode_reglement_id = (!empty($objectsrc->mode_reglement_id) ? $objectsrc->mode_reglement_id : (!empty($soc->mode_reglement_id) ? $soc->mode_reglement_id : 0)); |
| 2273 | - $warehouse_id = (!empty($objectsrc->warehouse_id) ? $objectsrc->warehouse_id : (!empty($soc->warehouse_id) ? $soc->warehouse_id : 0)); |
|
| 2273 | + $warehouse_id = (!empty($objectsrc->warehouse_id) ? $objectsrc->warehouse_id : (!empty($soc->warehouse_id) ? $soc->warehouse_id : 0)); |
|
| 2274 | 2274 | |
| 2275 | 2275 | // Replicate extrafields |
| 2276 | 2276 | $objectsrc->fetch_optionals(); |
@@ -2331,19 +2331,19 @@ discard block |
||
| 2331 | 2331 | } |
| 2332 | 2332 | } |
| 2333 | 2333 | |
| 2334 | - print '<form name="addprop" action="' . $_SERVER["PHP_SELF"] . '" method="POST">'; |
|
| 2335 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 2334 | + print '<form name="addprop" action="'.$_SERVER["PHP_SELF"].'" method="POST">'; |
|
| 2335 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 2336 | 2336 | print '<input type="hidden" name="action" value="add">'; |
| 2337 | - print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change |
|
| 2338 | - print '<input type="hidden" name="backtopage" value="' . $backtopage . '">'; |
|
| 2337 | + print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change |
|
| 2338 | + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; |
|
| 2339 | 2339 | if ($origin != 'project' && $originid) { |
| 2340 | - print '<input type="hidden" name="origin" value="' . $origin . '">'; |
|
| 2341 | - print '<input type="hidden" name="originid" value="' . $originid . '">'; |
|
| 2340 | + print '<input type="hidden" name="origin" value="'.$origin.'">'; |
|
| 2341 | + print '<input type="hidden" name="originid" value="'.$originid.'">'; |
|
| 2342 | 2342 | if ($origin == 'contrat' && !empty($renewal)) { |
| 2343 | - print '<input type="hidden" name="renewal" value="' . $renewal . '">'; |
|
| 2343 | + print '<input type="hidden" name="renewal" value="'.$renewal.'">'; |
|
| 2344 | 2344 | } |
| 2345 | 2345 | } elseif ($origin == 'project' && !empty($projectid)) { |
| 2346 | - print '<input type="hidden" name="projectid" value="' . $projectid . '">'; |
|
| 2346 | + print '<input type="hidden" name="projectid" value="'.$projectid.'">'; |
|
| 2347 | 2347 | } |
| 2348 | 2348 | |
| 2349 | 2349 | print dol_get_fiche_head(); |
@@ -2356,22 +2356,22 @@ discard block |
||
| 2356 | 2356 | print '<table class="border centpercent">'; |
| 2357 | 2357 | |
| 2358 | 2358 | // Reference |
| 2359 | - print '<tr class="field_ref"><td class="titlefieldcreate fieldrequired">' . $langs->trans('Ref') . '</td><td class="valuefieldcreate">' . $langs->trans("Draft") . '</td></tr>'; |
|
| 2359 | + print '<tr class="field_ref"><td class="titlefieldcreate fieldrequired">'.$langs->trans('Ref').'</td><td class="valuefieldcreate">'.$langs->trans("Draft").'</td></tr>'; |
|
| 2360 | 2360 | |
| 2361 | 2361 | // Ref customer |
| 2362 | - print '<tr class="field_ref_client"><td class="titlefieldcreate">' . $langs->trans('RefCustomer') . '</td><td class="valuefieldcreate">'; |
|
| 2363 | - print '<input type="text" name="ref_client" value="' . (!empty($ref_client) ? $ref_client : GETPOST('ref_client')) . '"></td>'; |
|
| 2362 | + print '<tr class="field_ref_client"><td class="titlefieldcreate">'.$langs->trans('RefCustomer').'</td><td class="valuefieldcreate">'; |
|
| 2363 | + print '<input type="text" name="ref_client" value="'.(!empty($ref_client) ? $ref_client : GETPOST('ref_client')).'"></td>'; |
|
| 2364 | 2364 | print '</tr>'; |
| 2365 | 2365 | |
| 2366 | 2366 | // Third party |
| 2367 | 2367 | print '<tr class="field_socid">'; |
| 2368 | - print '<td class="titlefieldcreate fieldrequired">' . $langs->trans('Customer') . '</td>'; |
|
| 2368 | + print '<td class="titlefieldcreate fieldrequired">'.$langs->trans('Customer').'</td>'; |
|
| 2369 | 2369 | $shipping_method_id = 0; |
| 2370 | 2370 | $warehouse_id = 0; |
| 2371 | 2371 | if ($socid > 0) { |
| 2372 | 2372 | print '<td class="valuefieldcreate">'; |
| 2373 | 2373 | print $soc->getNomUrl(1, 'customer'); |
| 2374 | - print '<input type="hidden" name="socid" value="' . $soc->id . '">'; |
|
| 2374 | + print '<input type="hidden" name="socid" value="'.$soc->id.'">'; |
|
| 2375 | 2375 | print '</td>'; |
| 2376 | 2376 | if (getDolGlobalString('SOCIETE_ASK_FOR_SHIPPING_METHOD') && !empty($soc->shipping_method_id)) { |
| 2377 | 2377 | $shipping_method_id = $soc->shipping_method_id; |
@@ -2380,7 +2380,7 @@ discard block |
||
| 2380 | 2380 | } else { |
| 2381 | 2381 | print '<td class="valuefieldcreate">'; |
| 2382 | 2382 | $filter = '((s.client:IN:1,2,3) AND (s.status:=:1))'; |
| 2383 | - print img_picto('', 'company', 'class="pictofixedwidth"') . $form->select_company('', 'socid', $filter, 'SelectThirdParty', 1, 0, array(), 0, 'minwidth300 maxwidth500 widthcentpercentminusxx'); |
|
| 2383 | + print img_picto('', 'company', 'class="pictofixedwidth"').$form->select_company('', 'socid', $filter, 'SelectThirdParty', 1, 0, array(), 0, 'minwidth300 maxwidth500 widthcentpercentminusxx'); |
|
| 2384 | 2384 | // reload page to retrieve customer information |
| 2385 | 2385 | if (!getDolGlobalString('RELOAD_PAGE_ON_CUSTOMER_CHANGE_DISABLED')) { |
| 2386 | 2386 | print '<script> |
@@ -2396,63 +2396,63 @@ discard block |
||
| 2396 | 2396 | }); |
| 2397 | 2397 | </script>'; |
| 2398 | 2398 | } |
| 2399 | - print ' <a href="' . DOL_URL_ROOT . '/societe/card.php?action=create&prospect=3&fournisseur=0&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?action=create') . '"><span class="fa fa-plus-circle valignmiddle paddingleft" title="' . $langs->trans("AddThirdParty") . '"></span></a>'; |
|
| 2399 | + print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&prospect=3&fournisseur=0&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddThirdParty").'"></span></a>'; |
|
| 2400 | 2400 | print '</td>'; |
| 2401 | 2401 | } |
| 2402 | - print '</tr>' . "\n"; |
|
| 2402 | + print '</tr>'."\n"; |
|
| 2403 | 2403 | |
| 2404 | 2404 | if ($socid > 0) { |
| 2405 | 2405 | // Contacts (ask contact only if thirdparty already defined). |
| 2406 | - print '<tr class="field_contactid"><td class="titlefieldcreate">' . $langs->trans("DefaultContact") . '</td><td class="valuefieldcreate">'; |
|
| 2406 | + print '<tr class="field_contactid"><td class="titlefieldcreate">'.$langs->trans("DefaultContact").'</td><td class="valuefieldcreate">'; |
|
| 2407 | 2407 | print img_picto('', 'contact', 'class="pictofixedwidth"'); |
| 2408 | 2408 | //print $form->selectcontacts($soc->id, $contactid, 'contactid', 1, '', '', 0, 'minwidth300 widthcentpercentminusx'); |
| 2409 | 2409 | print $form->select_contact($soc->id, $contactid, 'contactid', 1, '', '', 1, 'maxwidth300 widthcentpercentminusx', true); |
| 2410 | 2410 | print '</td></tr>'; |
| 2411 | 2411 | |
| 2412 | 2412 | // Third party discounts info line |
| 2413 | - print '<tr class="field_discount_info"><td class="titlefieldcreate">' . $langs->trans('Discounts') . '</td><td class="valuefieldcreate">'; |
|
| 2413 | + print '<tr class="field_discount_info"><td class="titlefieldcreate">'.$langs->trans('Discounts').'</td><td class="valuefieldcreate">'; |
|
| 2414 | 2414 | |
| 2415 | 2415 | $absolute_discount = $soc->getAvailableDiscounts(); |
| 2416 | 2416 | |
| 2417 | 2417 | $thirdparty = $soc; |
| 2418 | 2418 | $discount_type = 0; |
| 2419 | - $backtopage = $_SERVER["PHP_SELF"] . '?socid=' . $thirdparty->id . '&action=' . $action . '&origin=' . urlencode((string) (GETPOST('origin'))) . '&originid=' . urlencode((string) (GETPOSTINT('originid'))); |
|
| 2420 | - include DOL_DOCUMENT_ROOT . '/core/tpl/object_discounts.tpl.php'; |
|
| 2419 | + $backtopage = $_SERVER["PHP_SELF"].'?socid='.$thirdparty->id.'&action='.$action.'&origin='.urlencode((string) (GETPOST('origin'))).'&originid='.urlencode((string) (GETPOSTINT('originid'))); |
|
| 2420 | + include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php'; |
|
| 2421 | 2421 | print '</td></tr>'; |
| 2422 | 2422 | } |
| 2423 | 2423 | |
| 2424 | 2424 | $newdatepropal = dol_mktime(0, 0, 0, GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear'), 'tzserver'); |
| 2425 | 2425 | // Date |
| 2426 | - print '<tr class="field_addprop"><td class="titlefieldcreate fieldrequired">' . $langs->trans('DatePropal') . '</td><td class="valuefieldcreate">'; |
|
| 2426 | + print '<tr class="field_addprop"><td class="titlefieldcreate fieldrequired">'.$langs->trans('DatePropal').'</td><td class="valuefieldcreate">'; |
|
| 2427 | 2427 | print img_picto('', 'action', 'class="pictofixedwidth"'); |
| 2428 | 2428 | print $form->selectDate($newdatepropal ? $newdatepropal : $datepropal, '', 0, 0, 0, "addprop", 1, 1); |
| 2429 | 2429 | print '</td></tr>'; |
| 2430 | 2430 | |
| 2431 | 2431 | // Validaty duration |
| 2432 | - print '<tr class="field_duree_validitee"><td class="titlefieldcreate fieldrequired">' . $langs->trans("ValidityDuration") . '</td><td class="valuefieldcreate">' . img_picto('', 'clock', 'class="pictofixedwidth"') . '<input name="duree_validite" class="width50" value="' . (GETPOSTISSET('duree_validite') ? GETPOST('duree_validite', 'alphanohtml') : getDolGlobalString('PROPALE_VALIDITY_DURATION')) . '"> ' . $langs->trans("days") . '</td></tr>'; |
|
| 2432 | + print '<tr class="field_duree_validitee"><td class="titlefieldcreate fieldrequired">'.$langs->trans("ValidityDuration").'</td><td class="valuefieldcreate">'.img_picto('', 'clock', 'class="pictofixedwidth"').'<input name="duree_validite" class="width50" value="'.(GETPOSTISSET('duree_validite') ? GETPOST('duree_validite', 'alphanohtml') : getDolGlobalString('PROPALE_VALIDITY_DURATION')).'"> '.$langs->trans("days").'</td></tr>'; |
|
| 2433 | 2433 | |
| 2434 | 2434 | // Terms of payment |
| 2435 | - print '<tr class="field_cond_reglement_id"><td class="nowrap">' . $langs->trans('PaymentConditionsShort') . '</td><td>'; |
|
| 2435 | + print '<tr class="field_cond_reglement_id"><td class="nowrap">'.$langs->trans('PaymentConditionsShort').'</td><td>'; |
|
| 2436 | 2436 | print img_picto('', 'payment', 'class="pictofixedwidth"'); |
| 2437 | 2437 | // at last resort we take the payment term id which may be filled by default values set (if not getpostisset) |
| 2438 | 2438 | print $form->getSelectConditionsPaiements((int) $cond_reglement_id, 'cond_reglement_id', 1, 1, 0, '', $deposit_percent); |
| 2439 | 2439 | print '</td></tr>'; |
| 2440 | 2440 | |
| 2441 | 2441 | // Mode of payment |
| 2442 | - print '<tr class="field_mode_reglement_id"><td class="titlefieldcreate">' . $langs->trans('PaymentMode') . '</td><td class="valuefieldcreate">'; |
|
| 2442 | + print '<tr class="field_mode_reglement_id"><td class="titlefieldcreate">'.$langs->trans('PaymentMode').'</td><td class="valuefieldcreate">'; |
|
| 2443 | 2443 | print img_picto('', 'bank', 'class="pictofixedwidth"'); |
| 2444 | 2444 | print $form->select_types_paiements((string) $mode_reglement_id, 'mode_reglement_id', 'CRDT', 0, 1, 0, 0, 1, 'maxwidth200 widthcentpercentminusx', 1); |
| 2445 | 2445 | print '</td></tr>'; |
| 2446 | 2446 | |
| 2447 | 2447 | // Bank Account |
| 2448 | 2448 | if (getDolGlobalString('BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL') && isModEnabled("bank")) { |
| 2449 | - print '<tr class="field_fk_account"><td class="titlefieldcreate">' . $langs->trans('BankAccount') . '</td><td class="valuefieldcreate">'; |
|
| 2450 | - print img_picto('', 'bank_account', 'class="pictofixedwidth"') . $form->select_comptes($fk_account, 'fk_account', 0, '', 1, '', 0, 'maxwidth200 widthcentpercentminusx', 1); |
|
| 2449 | + print '<tr class="field_fk_account"><td class="titlefieldcreate">'.$langs->trans('BankAccount').'</td><td class="valuefieldcreate">'; |
|
| 2450 | + print img_picto('', 'bank_account', 'class="pictofixedwidth"').$form->select_comptes($fk_account, 'fk_account', 0, '', 1, '', 0, 'maxwidth200 widthcentpercentminusx', 1); |
|
| 2451 | 2451 | print '</td></tr>'; |
| 2452 | 2452 | } |
| 2453 | 2453 | |
| 2454 | 2454 | // Source / Channel - What trigger creation |
| 2455 | - print '<tr class="field_demand_reason_id"><td class="titlefieldcreate">' . $langs->trans('Source') . '</td><td class="valuefieldcreate">'; |
|
| 2455 | + print '<tr class="field_demand_reason_id"><td class="titlefieldcreate">'.$langs->trans('Source').'</td><td class="valuefieldcreate">'; |
|
| 2456 | 2456 | print img_picto('', 'question', 'class="pictofixedwidth"'); |
| 2457 | 2457 | $form->selectInputReason((GETPOSTISSET('demand_reason_id') ? GETPOSTINT('demand_reason_id') : ''), 'demand_reason_id', "SRC_PROP", 1, 'maxwidth200 widthcentpercentminusx'); |
| 2458 | 2458 | print '</td></tr>'; |
@@ -2462,7 +2462,7 @@ discard block |
||
| 2462 | 2462 | if (getDolGlobalString('SOCIETE_ASK_FOR_SHIPPING_METHOD') && !empty($soc->shipping_method_id)) { |
| 2463 | 2463 | $shipping_method_id = $soc->shipping_method_id; |
| 2464 | 2464 | } |
| 2465 | - print '<tr class="field_shipping_method_id"><td class="titlefieldcreate">' . $langs->trans('SendingMethod') . '</td><td class="valuefieldcreate">'; |
|
| 2465 | + print '<tr class="field_shipping_method_id"><td class="titlefieldcreate">'.$langs->trans('SendingMethod').'</td><td class="valuefieldcreate">'; |
|
| 2466 | 2466 | print img_picto('', 'dolly', 'class="pictofixedwidth"'); |
| 2467 | 2467 | $form->selectShippingMethod((string) (GETPOSTISSET('shipping_method_id') ? GETPOSTINT('shipping_method_id') : $shipping_method_id), 'shipping_method_id', '', 1, '', 0, 'maxwidth200 widthcentpercentminusx'); |
| 2468 | 2468 | print '</td></tr>'; |
@@ -2471,17 +2471,17 @@ discard block |
||
| 2471 | 2471 | $formproduct = null; |
| 2472 | 2472 | // Warehouse |
| 2473 | 2473 | if (isModEnabled('stock') && getDolGlobalString('WAREHOUSE_ASK_WAREHOUSE_DURING_PROPAL')) { |
| 2474 | - require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php'; |
|
| 2474 | + require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; |
|
| 2475 | 2475 | $formproduct = new FormProduct($db); |
| 2476 | - print '<tr class="field_warehouse_id"><td class="titlefieldcreate">' . $langs->trans('Warehouse') . '</td><td class="valuefieldcreate">'; |
|
| 2477 | - print img_picto('', 'stock', 'class="pictofixedwidth"') . $formproduct->selectWarehouses($warehouse_id, 'warehouse_id', '', 1, 0, 0, '', 0, 0, array(), 'maxwidth500 widthcentpercentminusxx'); |
|
| 2476 | + print '<tr class="field_warehouse_id"><td class="titlefieldcreate">'.$langs->trans('Warehouse').'</td><td class="valuefieldcreate">'; |
|
| 2477 | + print img_picto('', 'stock', 'class="pictofixedwidth"').$formproduct->selectWarehouses($warehouse_id, 'warehouse_id', '', 1, 0, 0, '', 0, 0, array(), 'maxwidth500 widthcentpercentminusxx'); |
|
| 2478 | 2478 | print '</td></tr>'; |
| 2479 | 2479 | } |
| 2480 | 2480 | |
| 2481 | 2481 | // Delivery delay |
| 2482 | - print '<tr class="field_availability_id"><td class="titlefieldcreate">' . $langs->trans('AvailabilityPeriod'); |
|
| 2482 | + print '<tr class="field_availability_id"><td class="titlefieldcreate">'.$langs->trans('AvailabilityPeriod'); |
|
| 2483 | 2483 | if (isModEnabled('order')) { |
| 2484 | - print ' (' . $langs->trans('AfterOrder') . ')'; |
|
| 2484 | + print ' ('.$langs->trans('AfterOrder').')'; |
|
| 2485 | 2485 | } |
| 2486 | 2486 | print '</td><td class="valuefieldcreate">'; |
| 2487 | 2487 | print img_picto('', 'clock', 'class="pictofixedwidth"'); |
@@ -2489,7 +2489,7 @@ discard block |
||
| 2489 | 2489 | print '</td></tr>'; |
| 2490 | 2490 | |
| 2491 | 2491 | // Delivery date (or manufacturing) |
| 2492 | - print '<tr class="field_date_livraison"><td class="titlefieldcreate">' . $langs->trans("DeliveryDate") . '</td>'; |
|
| 2492 | + print '<tr class="field_date_livraison"><td class="titlefieldcreate">'.$langs->trans("DeliveryDate").'</td>'; |
|
| 2493 | 2493 | print '<td class="valuefieldcreate">'; |
| 2494 | 2494 | print img_picto('', 'action', 'class="pictofixedwidth"'); |
| 2495 | 2495 | if (is_numeric(getDolGlobalString('DATE_LIVRAISON_WEEK_DELAY'))) { // If value set to 0 or a num, not empty |
@@ -2497,7 +2497,7 @@ discard block |
||
| 2497 | 2497 | $syear = date("Y", $tmpdte); |
| 2498 | 2498 | $smonth = date("m", $tmpdte); |
| 2499 | 2499 | $sday = date("d", $tmpdte); |
| 2500 | - print $form->selectDate($syear . "-" . $smonth . "-" . $sday, 'date_livraison', 0, 0, 0, "addprop"); |
|
| 2500 | + print $form->selectDate($syear."-".$smonth."-".$sday, 'date_livraison', 0, 0, 0, "addprop"); |
|
| 2501 | 2501 | } else { |
| 2502 | 2502 | $tmp_date_delivery = GETPOST('date_delivery') ?: -1; |
| 2503 | 2503 | print $form->selectDate($tmp_date_delivery, 'date_livraison', 0, 0, 0, "addprop", 1, 1); |
@@ -2508,9 +2508,9 @@ discard block |
||
| 2508 | 2508 | if (isModEnabled('project') && is_object($formproject)) { |
| 2509 | 2509 | $langs->load("projects"); |
| 2510 | 2510 | print '<tr class="field_projectid">'; |
| 2511 | - print '<td class="titlefieldcreate">' . $langs->trans("Project") . '</td><td class="valuefieldcreate">'; |
|
| 2512 | - print img_picto('', 'project', 'class="pictofixedwidth"') . $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), (string) $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500 widthcentpercentminusxx'); |
|
| 2513 | - print ' <a href="' . DOL_URL_ROOT . '/projet/card.php?socid=' . $soc->id . '&action=create&status=1&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?action=create&socid=' . $soc->id) . '"><span class="fa fa-plus-circle valignmiddle paddingleft" title="' . $langs->trans("AddProject") . '"></span></a>'; |
|
| 2511 | + print '<td class="titlefieldcreate">'.$langs->trans("Project").'</td><td class="valuefieldcreate">'; |
|
| 2512 | + print img_picto('', 'project', 'class="pictofixedwidth"').$formproject->select_projects(($soc->id > 0 ? $soc->id : -1), (string) $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500 widthcentpercentminusxx'); |
|
| 2513 | + print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddProject").'"></span></a>'; |
|
| 2514 | 2514 | print '</td>'; |
| 2515 | 2515 | print '</tr>'; |
| 2516 | 2516 | } |
@@ -2518,7 +2518,7 @@ discard block |
||
| 2518 | 2518 | // Incoterms |
| 2519 | 2519 | if (isModEnabled('incoterm')) { |
| 2520 | 2520 | print '<tr class="field_incoterm_id">'; |
| 2521 | - print '<td class="titlefieldcreate"><label for="incoterm_id">' . $form->textwithpicto($langs->trans("IncotermLabel"), $soc->label_incoterms, 1) . '</label></td>'; |
|
| 2521 | + print '<td class="titlefieldcreate"><label for="incoterm_id">'.$form->textwithpicto($langs->trans("IncotermLabel"), $soc->label_incoterms, 1).'</label></td>'; |
|
| 2522 | 2522 | print '<td class="valuefieldcreate maxwidthonsmartphone">'; |
| 2523 | 2523 | print img_picto('', 'incoterm', 'class="pictofixedwidth"'); |
| 2524 | 2524 | print $form->select_incoterms((!empty($soc->fk_incoterms) ? $soc->fk_incoterms : ''), (!empty($soc->location_incoterms) ? $soc->location_incoterms : '')); |
@@ -2527,7 +2527,7 @@ discard block |
||
| 2527 | 2527 | |
| 2528 | 2528 | // Template to use by default |
| 2529 | 2529 | print '<tr class="field_model">'; |
| 2530 | - print '<td class="titlefieldcreate">' . $langs->trans("DefaultModel") . '</td>'; |
|
| 2530 | + print '<td class="titlefieldcreate">'.$langs->trans("DefaultModel").'</td>'; |
|
| 2531 | 2531 | print '<td class="valuefieldcreate">'; |
| 2532 | 2532 | print img_picto('', 'pdf', 'class="pictofixedwidth"'); |
| 2533 | 2533 | $liste = ModelePDFPropales::liste_modeles($db); |
@@ -2538,15 +2538,15 @@ discard block |
||
| 2538 | 2538 | // Multicurrency |
| 2539 | 2539 | if (isModEnabled("multicurrency")) { |
| 2540 | 2540 | print '<tr class="field_currency">'; |
| 2541 | - print '<td class="titlefieldcreate">' . $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0) . '</td>'; |
|
| 2541 | + print '<td class="titlefieldcreate">'.$form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0).'</td>'; |
|
| 2542 | 2542 | print '<td class="valuefieldcreate maxwidthonsmartphone">'; |
| 2543 | - print img_picto('', 'currency', 'class="pictofixedwidth"') . $form->selectMultiCurrency(((GETPOSTISSET('multicurrency_code') && !GETPOST('changecompany')) ? GETPOST('multicurrency_code') : $currency_code), 'multicurrency_code', 0, '', false, 'maxwidth200 widthcentpercentminusx'); |
|
| 2543 | + print img_picto('', 'currency', 'class="pictofixedwidth"').$form->selectMultiCurrency(((GETPOSTISSET('multicurrency_code') && !GETPOST('changecompany')) ? GETPOST('multicurrency_code') : $currency_code), 'multicurrency_code', 0, '', false, 'maxwidth200 widthcentpercentminusx'); |
|
| 2544 | 2544 | print '</td></tr>'; |
| 2545 | 2545 | } |
| 2546 | 2546 | |
| 2547 | 2547 | // Public note |
| 2548 | 2548 | print '<tr class="field_note_public">'; |
| 2549 | - print '<td class="titlefieldcreate tdtop">' . $langs->trans('NotePublic') . '</td>'; |
|
| 2549 | + print '<td class="titlefieldcreate tdtop">'.$langs->trans('NotePublic').'</td>'; |
|
| 2550 | 2550 | print '<td class="valuefieldcreate">'; |
| 2551 | 2551 | $note_public = $object->getDefaultCreateValueFor('note_public', (!empty($objectsrc) ? $objectsrc->note_public : (getDolGlobalString('PROPALE_ADDON_NOTE_PUBLIC_DEFAULT') ? $conf->global->PROPALE_ADDON_NOTE_PUBLIC_DEFAULT : null)), 'restricthtml'); |
| 2552 | 2552 | $doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', false, false, !getDolGlobalString('FCKEDITOR_ENABLE_NOTE_PUBLIC') ? 0 : 1, ROWS_3, '90%'); |
@@ -2555,7 +2555,7 @@ discard block |
||
| 2555 | 2555 | // Private note |
| 2556 | 2556 | if (empty($user->socid)) { |
| 2557 | 2557 | print '<tr class="field_note_private">'; |
| 2558 | - print '<td class="titlefieldcreate tdtop">' . $langs->trans('NotePrivate') . '</td>'; |
|
| 2558 | + print '<td class="titlefieldcreate tdtop">'.$langs->trans('NotePrivate').'</td>'; |
|
| 2559 | 2559 | print '<td class="valuefieldcreate">'; |
| 2560 | 2560 | $note_private = $object->getDefaultCreateValueFor('note_private', ((!empty($origin) && !empty($originid) && is_object($objectsrc)) ? $objectsrc->note_private : null)); |
| 2561 | 2561 | $doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', false, false, !getDolGlobalString('FCKEDITOR_ENABLE_NOTE_PRIVATE') ? 0 : 1, ROWS_3, '90%'); |
@@ -2565,7 +2565,7 @@ discard block |
||
| 2565 | 2565 | } |
| 2566 | 2566 | |
| 2567 | 2567 | // Other attributes |
| 2568 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_add.tpl.php'; |
|
| 2568 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; |
|
| 2569 | 2569 | |
| 2570 | 2570 | // Lines from source |
| 2571 | 2571 | if (!empty($origin) && !empty($originid) && is_object($objectsrc)) { |
@@ -2577,13 +2577,13 @@ discard block |
||
| 2577 | 2577 | $objectsrc->update_price(1, 'auto', 1); |
| 2578 | 2578 | } |
| 2579 | 2579 | |
| 2580 | - print "\n<!-- " . $classname . " info -->"; |
|
| 2580 | + print "\n<!-- ".$classname." info -->"; |
|
| 2581 | 2581 | print "\n"; |
| 2582 | - print '<input type="hidden" name="amount" value="' . $objectsrc->total_ht . '">' . "\n"; |
|
| 2583 | - print '<input type="hidden" name="total" value="' . $objectsrc->total_ttc . '">' . "\n"; |
|
| 2584 | - print '<input type="hidden" name="tva" value="' . $objectsrc->total_tva . '">' . "\n"; |
|
| 2585 | - print '<input type="hidden" name="origin" value="' . $objectsrc->element . '">'; |
|
| 2586 | - print '<input type="hidden" name="originid" value="' . $objectsrc->id . '">'; |
|
| 2582 | + print '<input type="hidden" name="amount" value="'.$objectsrc->total_ht.'">'."\n"; |
|
| 2583 | + print '<input type="hidden" name="total" value="'.$objectsrc->total_ttc.'">'."\n"; |
|
| 2584 | + print '<input type="hidden" name="tva" value="'.$objectsrc->total_tva.'">'."\n"; |
|
| 2585 | + print '<input type="hidden" name="origin" value="'.$objectsrc->element.'">'; |
|
| 2586 | + print '<input type="hidden" name="originid" value="'.$objectsrc->id.'">'; |
|
| 2587 | 2587 | |
| 2588 | 2588 | $newclassname = $classname; |
| 2589 | 2589 | if ($newclassname == 'Propal') { |
@@ -2596,22 +2596,22 @@ discard block |
||
| 2596 | 2596 | $newclassname = 'Intervention'; |
| 2597 | 2597 | } |
| 2598 | 2598 | |
| 2599 | - print '<tr><td>' . $langs->trans($newclassname) . '</td><td>' . $objectsrc->getNomUrl(1) . '</td></tr>'; |
|
| 2600 | - print '<tr><td>' . $langs->trans('AmountHT') . '</td><td>' . price($objectsrc->total_ht, 0, $langs, 1, -1, -1, $conf->currency) . '</td></tr>'; |
|
| 2601 | - print '<tr><td>' . $langs->trans('AmountVAT') . '</td><td>' . price($objectsrc->total_tva, 0, $langs, 1, -1, -1, $conf->currency) . "</td></tr>"; |
|
| 2599 | + print '<tr><td>'.$langs->trans($newclassname).'</td><td>'.$objectsrc->getNomUrl(1).'</td></tr>'; |
|
| 2600 | + print '<tr><td>'.$langs->trans('AmountHT').'</td><td>'.price($objectsrc->total_ht, 0, $langs, 1, -1, -1, $conf->currency).'</td></tr>'; |
|
| 2601 | + print '<tr><td>'.$langs->trans('AmountVAT').'</td><td>'.price($objectsrc->total_tva, 0, $langs, 1, -1, -1, $conf->currency)."</td></tr>"; |
|
| 2602 | 2602 | if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) { // Localtax1 |
| 2603 | - print '<tr><td>' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td><td>' . price($objectsrc->total_localtax1, 0, $langs, 1, -1, -1, $conf->currency) . "</td></tr>"; |
|
| 2603 | + print '<tr><td>'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td><td>'.price($objectsrc->total_localtax1, 0, $langs, 1, -1, -1, $conf->currency)."</td></tr>"; |
|
| 2604 | 2604 | } |
| 2605 | 2605 | |
| 2606 | 2606 | if ($mysoc->localtax2_assuj == "1" || $objectsrc->total_localtax2 != 0) { // Localtax2 |
| 2607 | - print '<tr><td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td><td>' . price($objectsrc->total_localtax2, 0, $langs, 1, -1, -1, $conf->currency) . "</td></tr>"; |
|
| 2607 | + print '<tr><td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td><td>'.price($objectsrc->total_localtax2, 0, $langs, 1, -1, -1, $conf->currency)."</td></tr>"; |
|
| 2608 | 2608 | } |
| 2609 | - print '<tr><td>' . $langs->trans('AmountTTC') . '</td><td>' . price($objectsrc->total_ttc, 0, $langs, 1, -1, -1, $conf->currency) . "</td></tr>"; |
|
| 2609 | + print '<tr><td>'.$langs->trans('AmountTTC').'</td><td>'.price($objectsrc->total_ttc, 0, $langs, 1, -1, -1, $conf->currency)."</td></tr>"; |
|
| 2610 | 2610 | |
| 2611 | 2611 | if (isModEnabled("multicurrency")) { |
| 2612 | - print '<tr><td>' . $langs->trans('MulticurrencyAmountHT') . '</td><td>' . price($objectsrc->multicurrency_total_ht) . '</td></tr>'; |
|
| 2613 | - print '<tr><td>' . $langs->trans('MulticurrencyAmountVAT') . '</td><td>' . price($objectsrc->multicurrency_total_tva) . "</td></tr>"; |
|
| 2614 | - print '<tr><td>' . $langs->trans('MulticurrencyAmountTTC') . '</td><td>' . price($objectsrc->multicurrency_total_ttc) . "</td></tr>"; |
|
| 2612 | + print '<tr><td>'.$langs->trans('MulticurrencyAmountHT').'</td><td>'.price($objectsrc->multicurrency_total_ht).'</td></tr>'; |
|
| 2613 | + print '<tr><td>'.$langs->trans('MulticurrencyAmountVAT').'</td><td>'.price($objectsrc->multicurrency_total_tva)."</td></tr>"; |
|
| 2614 | + print '<tr><td>'.$langs->trans('MulticurrencyAmountTTC').'</td><td>'.price($objectsrc->multicurrency_total_ttc)."</td></tr>"; |
|
| 2615 | 2615 | } |
| 2616 | 2616 | } |
| 2617 | 2617 | |
@@ -2632,16 +2632,16 @@ discard block |
||
| 2632 | 2632 | // For backward compatibility |
| 2633 | 2633 | print '<tr>'; |
| 2634 | 2634 | print '<td><input type="radio" name="createmode" value="copy"></td>'; |
| 2635 | - print '<td>' . $langs->trans("CopyPropalFrom") . ' </td>'; |
|
| 2635 | + print '<td>'.$langs->trans("CopyPropalFrom").' </td>'; |
|
| 2636 | 2636 | print '<td>'; |
| 2637 | 2637 | $liste_propal = array(); |
| 2638 | 2638 | $liste_propal[0] = ''; |
| 2639 | 2639 | |
| 2640 | 2640 | $sql = "SELECT p.rowid as id, p.ref, s.nom"; |
| 2641 | - $sql .= " FROM " . MAIN_DB_PREFIX . "propal p"; |
|
| 2642 | - $sql .= ", " . MAIN_DB_PREFIX . "societe s"; |
|
| 2641 | + $sql .= " FROM ".MAIN_DB_PREFIX."propal p"; |
|
| 2642 | + $sql .= ", ".MAIN_DB_PREFIX."societe s"; |
|
| 2643 | 2643 | $sql .= " WHERE s.rowid = p.fk_soc"; |
| 2644 | - $sql .= " AND p.entity IN (" . getEntity('propal') . ")"; |
|
| 2644 | + $sql .= " AND p.entity IN (".getEntity('propal').")"; |
|
| 2645 | 2645 | $sql .= " AND p.fk_statut <> 0"; |
| 2646 | 2646 | $sql .= " ORDER BY Id"; |
| 2647 | 2647 | |
@@ -2651,7 +2651,7 @@ discard block |
||
| 2651 | 2651 | $i = 0; |
| 2652 | 2652 | while ($i < $num) { |
| 2653 | 2653 | $row = $db->fetch_row($resql); |
| 2654 | - $propalRefAndSocName = $row[1] . " - " . $row[2]; |
|
| 2654 | + $propalRefAndSocName = $row[1]." - ".$row[2]; |
|
| 2655 | 2655 | $liste_propal[$row[0]] = $propalRefAndSocName; |
| 2656 | 2656 | $i++; |
| 2657 | 2657 | } |
@@ -2662,7 +2662,7 @@ discard block |
||
| 2662 | 2662 | print '</td></tr>'; |
| 2663 | 2663 | |
| 2664 | 2664 | print '<tr><td class="tdtop"><input type="radio" name="createmode" value="empty" checked></td>'; |
| 2665 | - print '<td valign="top" colspan="2">' . $langs->trans("CreateEmptyPropal") . '</td></tr>'; |
|
| 2665 | + print '<td valign="top" colspan="2">'.$langs->trans("CreateEmptyPropal").'</td></tr>'; |
|
| 2666 | 2666 | print '</table>'; |
| 2667 | 2667 | } |
| 2668 | 2668 | } |
@@ -2722,7 +2722,7 @@ discard block |
||
| 2722 | 2722 | $formquestion[] = array('type' => 'date', 'name' => 'date_delivery', 'label' => $langs->trans("DeliveryDate"), 'value' => $object->delivery_date); |
| 2723 | 2723 | } |
| 2724 | 2724 | // Incomplete payment. We ask if reason = discount or other |
| 2725 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmClonePropal', $object->ref), 'confirm_clone', $formquestion, 'yes', 1, 250, 600); |
|
| 2725 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmClonePropal', $object->ref), 'confirm_clone', $formquestion, 'yes', 1, 250, 600); |
|
| 2726 | 2726 | } |
| 2727 | 2727 | |
| 2728 | 2728 | // Subtotal line form |
@@ -2742,9 +2742,9 @@ discard block |
||
| 2742 | 2742 | //Form to close proposal (signed or not) |
| 2743 | 2743 | $formquestion = array(); |
| 2744 | 2744 | if (!getDolGlobalString('PROPAL_SKIP_ACCEPT_REFUSE')) { |
| 2745 | - $formquestion[] = array('type' => 'select', 'name' => 'statut', 'label' => '<span class="fieldrequired">' . $langs->trans("CloseAs") . '</span>', 'values' => array($object::STATUS_SIGNED => $object->LibStatut($object::STATUS_SIGNED), $object::STATUS_NOTSIGNED => $object->LibStatut($object::STATUS_NOTSIGNED))); |
|
| 2745 | + $formquestion[] = array('type' => 'select', 'name' => 'statut', 'label' => '<span class="fieldrequired">'.$langs->trans("CloseAs").'</span>', 'values' => array($object::STATUS_SIGNED => $object->LibStatut($object::STATUS_SIGNED), $object::STATUS_NOTSIGNED => $object->LibStatut($object::STATUS_NOTSIGNED))); |
|
| 2746 | 2746 | } |
| 2747 | - $formquestion[] = array('type' => 'text', 'name' => 'note_private', 'label' => $langs->trans("Note"), 'value' => ''); // Field to complete private note (not replace) |
|
| 2747 | + $formquestion[] = array('type' => 'text', 'name' => 'note_private', 'label' => $langs->trans("Note"), 'value' => ''); // Field to complete private note (not replace) |
|
| 2748 | 2748 | |
| 2749 | 2749 | if (getDolGlobalInt('PROPOSAL_SUGGEST_DOWN_PAYMENT_INVOICE_CREATION')) { |
| 2750 | 2750 | // This is a hidden option: |
@@ -2754,7 +2754,7 @@ discard block |
||
| 2754 | 2754 | $deposit_percent_from_payment_terms = getDictionaryValue('c_payment_term', 'deposit_percent', $object->cond_reglement_id); |
| 2755 | 2755 | |
| 2756 | 2756 | if (!empty($deposit_percent_from_payment_terms) && isModEnabled('invoice') && $user->hasRight('facture', 'creer')) { |
| 2757 | - require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
| 2757 | + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
| 2758 | 2758 | |
| 2759 | 2759 | $object->fetchObjectLinked(); |
| 2760 | 2760 | |
@@ -2838,7 +2838,7 @@ discard block |
||
| 2838 | 2838 | 'type' => 'onecolumn', |
| 2839 | 2839 | 'value' => ' |
| 2840 | 2840 | <script> |
| 2841 | - let signedValue = ' . $object::STATUS_SIGNED . '; |
|
| 2841 | + let signedValue = ' . $object::STATUS_SIGNED.'; |
|
| 2842 | 2842 | |
| 2843 | 2843 | $(document).ready(function() { |
| 2844 | 2844 | $("[name=generate_deposit]").change(function () { |
@@ -2878,7 +2878,7 @@ discard block |
||
| 2878 | 2878 | } |
| 2879 | 2879 | |
| 2880 | 2880 | if (isModEnabled('notification')) { |
| 2881 | - require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; |
|
| 2881 | + require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; |
|
| 2882 | 2882 | $notify = new Notify($db); |
| 2883 | 2883 | $formquestion = array_merge($formquestion, array( |
| 2884 | 2884 | array('type' => 'onecolumn', 'value' => $notify->confirmMessage('PROPAL_CLOSE_SIGNED', $object->socid, $object)), |
@@ -2886,22 +2886,22 @@ discard block |
||
| 2886 | 2886 | } |
| 2887 | 2887 | |
| 2888 | 2888 | if (!getDolGlobalString('PROPAL_SKIP_ACCEPT_REFUSE')) { |
| 2889 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('SetAcceptedRefused'), '', 'confirm_closeas', $formquestion, '', 1, 250); |
|
| 2889 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('SetAcceptedRefused'), '', 'confirm_closeas', $formquestion, '', 1, 250); |
|
| 2890 | 2890 | } else { |
| 2891 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?statut=3&id=' . $object->id, $langs->trans('Close'), '', 'confirm_closeas', $formquestion, '', 1, 250); |
|
| 2891 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?statut=3&id='.$object->id, $langs->trans('Close'), '', 'confirm_closeas', $formquestion, '', 1, 250); |
|
| 2892 | 2892 | } |
| 2893 | 2893 | } elseif ($action == 'cancel') { |
| 2894 | 2894 | // Confirm cancel |
| 2895 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans("CancelPropal"), $langs->trans('ConfirmCancelPropal', $object->ref), 'confirm_cancel', '', 0, 1); |
|
| 2895 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("CancelPropal"), $langs->trans('ConfirmCancelPropal', $object->ref), 'confirm_cancel', '', 0, 1); |
|
| 2896 | 2896 | } elseif ($action == 'delete') { |
| 2897 | 2897 | // Confirm delete |
| 2898 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteProp'), $langs->trans('ConfirmDeleteProp', $object->ref), 'confirm_delete', '', 0, 1); |
|
| 2898 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteProp'), $langs->trans('ConfirmDeleteProp', $object->ref), 'confirm_delete', '', 0, 1); |
|
| 2899 | 2899 | } elseif ($action == 'reopen') { |
| 2900 | 2900 | // Confirm reopen |
| 2901 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenProp', $object->ref), 'confirm_reopen', '', 0, 1); |
|
| 2901 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenProp', $object->ref), 'confirm_reopen', '', 0, 1); |
|
| 2902 | 2902 | } elseif ($action == 'ask_deleteline') { |
| 2903 | 2903 | // Confirmation delete product/service line |
| 2904 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); |
|
| 2904 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); |
|
| 2905 | 2905 | } elseif ($action == 'ask_subtotal_deleteline') { |
| 2906 | 2906 | // Confirmation de la suppression d'une ligne subtotal |
| 2907 | 2907 | $langs->load("subtotals"); |
@@ -2912,7 +2912,7 @@ discard block |
||
| 2912 | 2912 | $title = "DeleteTitleLine"; |
| 2913 | 2913 | $question = "ConfirmDeleteTitleLine"; |
| 2914 | 2914 | } |
| 2915 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans($title), $langs->trans($question), 'confirm_delete_subtotalline', $formconfirm, 'no', 1); |
|
| 2915 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans($title), $langs->trans($question), 'confirm_delete_subtotalline', $formconfirm, 'no', 1); |
|
| 2916 | 2916 | } elseif ($action == 'validate') { |
| 2917 | 2917 | // Confirm validate proposal |
| 2918 | 2918 | $error = 0; |
@@ -2931,7 +2931,7 @@ discard block |
||
| 2931 | 2931 | |
| 2932 | 2932 | $text = $langs->trans('ConfirmValidateProp', $numref); |
| 2933 | 2933 | if (isModEnabled('notification')) { |
| 2934 | - require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; |
|
| 2934 | + require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; |
|
| 2935 | 2935 | $notify = new Notify($db); |
| 2936 | 2936 | $text .= '<br>'; |
| 2937 | 2937 | $text .= $notify->confirmMessage('PROPAL_VALIDATE', $object->socid, $object); |
@@ -2941,7 +2941,7 @@ discard block |
||
| 2941 | 2941 | $nbMandated = 0; |
| 2942 | 2942 | foreach ($object->lines as $line) { |
| 2943 | 2943 | $res = $line->fetch_product(); |
| 2944 | - if ($res > 0) { |
|
| 2944 | + if ($res > 0) { |
|
| 2945 | 2945 | if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end))) { |
| 2946 | 2946 | $nbMandated++; |
| 2947 | 2947 | break; |
@@ -2953,12 +2953,12 @@ discard block |
||
| 2953 | 2953 | setEventMessages($langs->trans("mandatoryPeriodNeedTobeSetMsgValidate"), null, 'errors'); |
| 2954 | 2954 | $error++; |
| 2955 | 2955 | } else { |
| 2956 | - $text .= '<div><span class="clearboth nowraponall warning">' . img_warning() . $langs->trans("mandatoryPeriodNeedTobeSetMsgValidate") . '</span></div>'; |
|
| 2956 | + $text .= '<div><span class="clearboth nowraponall warning">'.img_warning().$langs->trans("mandatoryPeriodNeedTobeSetMsgValidate").'</span></div>'; |
|
| 2957 | 2957 | } |
| 2958 | 2958 | } |
| 2959 | 2959 | |
| 2960 | 2960 | if (!$error) { |
| 2961 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateProp'), $text, 'confirm_validate', '', 0, 1, 240); |
|
| 2961 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateProp'), $text, 'confirm_validate', '', 0, 1, 240); |
|
| 2962 | 2962 | } |
| 2963 | 2963 | } |
| 2964 | 2964 | |
@@ -2977,16 +2977,16 @@ discard block |
||
| 2977 | 2977 | |
| 2978 | 2978 | // Proposal card |
| 2979 | 2979 | |
| 2980 | - $linkback = '<a href="' . DOL_URL_ROOT . '/comm/propal/list.php?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>'; |
|
| 2980 | + $linkback = '<a href="'.DOL_URL_ROOT.'/comm/propal/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; |
|
| 2981 | 2981 | |
| 2982 | 2982 | $morehtmlref = '<div class="refidno">'; |
| 2983 | 2983 | // Ref customer |
| 2984 | 2984 | $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string', '', 0, 1); |
| 2985 | - $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string' . (isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':' . getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1); |
|
| 2985 | + $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':'.getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1); |
|
| 2986 | 2986 | // Thirdparty |
| 2987 | - $morehtmlref .= '<br>' . $soc->getNomUrl(1, 'customer'); |
|
| 2987 | + $morehtmlref .= '<br>'.$soc->getNomUrl(1, 'customer'); |
|
| 2988 | 2988 | if (!getDolGlobalString('MAIN_DISABLE_OTHER_LINK') && $soc->id > 0) { |
| 2989 | - $morehtmlref .= ' (<a href="' . DOL_URL_ROOT . '/comm/propal/list.php?socid=' . $soc->id . '&search_societe=' . urlencode($soc->name) . '">' . $langs->trans("OtherProposals") . '</a>)'; |
|
| 2989 | + $morehtmlref .= ' (<a href="'.DOL_URL_ROOT.'/comm/propal/list.php?socid='.$soc->id.'&search_societe='.urlencode($soc->name).'">'.$langs->trans("OtherProposals").'</a>)'; |
|
| 2990 | 2990 | } |
| 2991 | 2991 | // Project |
| 2992 | 2992 | if (isModEnabled('project')) { |
@@ -2995,16 +2995,16 @@ discard block |
||
| 2995 | 2995 | if ($usercancreate) { |
| 2996 | 2996 | $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); |
| 2997 | 2997 | if ($action != 'classify') { |
| 2998 | - $morehtmlref .= '<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> '; |
|
| 2998 | + $morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> '; |
|
| 2999 | 2999 | } |
| 3000 | - $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); |
|
| 3000 | + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); |
|
| 3001 | 3001 | } else { |
| 3002 | 3002 | if (!empty($object->fk_project)) { |
| 3003 | 3003 | $proj = new Project($db); |
| 3004 | 3004 | $proj->fetch($object->fk_project); |
| 3005 | 3005 | $morehtmlref .= $proj->getNomUrl(1); |
| 3006 | 3006 | if ($proj->title) { |
| 3007 | - $morehtmlref .= '<span class="opacitymedium"> - ' . dol_escape_htmltag($proj->title) . '</span>'; |
|
| 3007 | + $morehtmlref .= '<span class="opacitymedium"> - '.dol_escape_htmltag($proj->title).'</span>'; |
|
| 3008 | 3008 | } |
| 3009 | 3009 | } |
| 3010 | 3010 | } |
@@ -3034,7 +3034,7 @@ discard block |
||
| 3034 | 3034 | $filtercreditnote = "fk_facture_source IS NOT NULL AND (description NOT LIKE '(DEPOSIT)%' OR description LIKE '(EXCESS RECEIVED)%')"; |
| 3035 | 3035 | } |
| 3036 | 3036 | |
| 3037 | - print '<tr><td class="titlefieldmax45">' . $langs->trans('Discounts') . '</td><td>'; |
|
| 3037 | + print '<tr><td class="titlefieldmax45">'.$langs->trans('Discounts').'</td><td>'; |
|
| 3038 | 3038 | |
| 3039 | 3039 | $absolute_discount = $soc->getAvailableDiscounts(null, $filterabsolutediscount); |
| 3040 | 3040 | $absolute_creditnote = $soc->getAvailableDiscounts(null, $filtercreditnote); |
@@ -3045,8 +3045,8 @@ discard block |
||
| 3045 | 3045 | |
| 3046 | 3046 | $thirdparty = $soc; |
| 3047 | 3047 | $discount_type = 0; |
| 3048 | - $backtopage = $_SERVER["PHP_SELF"] . '?id=' . $object->id; |
|
| 3049 | - include DOL_DOCUMENT_ROOT . '/core/tpl/object_discounts.tpl.php'; |
|
| 3048 | + $backtopage = $_SERVER["PHP_SELF"].'?id='.$object->id; |
|
| 3049 | + include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php'; |
|
| 3050 | 3050 | |
| 3051 | 3051 | print '</td></tr>'; |
| 3052 | 3052 | |
@@ -3065,12 +3065,12 @@ discard block |
||
| 3065 | 3065 | print $form->editfieldkey("DatePropal", 'date', '', $object, (int) $editenable); |
| 3066 | 3066 | print '</td><td class="valuefield">'; |
| 3067 | 3067 | if ($action == 'editdate' && $usercancreate && $caneditfield) { |
| 3068 | - print '<form name="editdate" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">'; |
|
| 3069 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 3068 | + print '<form name="editdate" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">'; |
|
| 3069 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 3070 | 3070 | print '<input type="hidden" name="action" value="setdate">'; |
| 3071 | - print '<input type="hidden" name="backtopage" value="' . $backtopage . '">'; |
|
| 3071 | + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; |
|
| 3072 | 3072 | print $form->selectDate($object->date, 're', 0, 0, 0, "editdate"); |
| 3073 | - print '<input type="submit" class="button button-edit" value="' . $langs->trans('Modify') . '">'; |
|
| 3073 | + print '<input type="submit" class="button button-edit" value="'.$langs->trans('Modify').'">'; |
|
| 3074 | 3074 | print '</form>'; |
| 3075 | 3075 | } else { |
| 3076 | 3076 | if ($object->date) { |
@@ -3088,17 +3088,17 @@ discard block |
||
| 3088 | 3088 | print $langs->trans('DateEndPropal'); |
| 3089 | 3089 | print '</td>'; |
| 3090 | 3090 | if ($action != 'editecheance' && $usercancreate && $caneditfield) { |
| 3091 | - print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editecheance&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->trans('SetConditions'), 1) . '</a></td>'; |
|
| 3091 | + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editecheance&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetConditions'), 1).'</a></td>'; |
|
| 3092 | 3092 | } |
| 3093 | 3093 | print '</tr></table>'; |
| 3094 | 3094 | print '</td><td class="valuefield">'; |
| 3095 | 3095 | if ($action == 'editecheance' && $usercancreate && $caneditfield) { |
| 3096 | - print '<form name="editecheance" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">'; |
|
| 3097 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 3096 | + print '<form name="editecheance" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">'; |
|
| 3097 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 3098 | 3098 | print '<input type="hidden" name="action" value="setecheance">'; |
| 3099 | - print '<input type="hidden" name="backtopage" value="' . $backtopage . '">'; |
|
| 3099 | + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; |
|
| 3100 | 3100 | print $form->selectDate($object->fin_validite, 'ech', 0, 0, 0, "editecheance"); |
| 3101 | - print '<input type="submit" class="button button-edit" value="' . $langs->trans('Modify') . '">'; |
|
| 3101 | + print '<input type="submit" class="button button-edit" value="'.$langs->trans('Modify').'">'; |
|
| 3102 | 3102 | print '</form>'; |
| 3103 | 3103 | } else { |
| 3104 | 3104 | if (!empty($object->fin_validite)) { |
@@ -3119,14 +3119,14 @@ discard block |
||
| 3119 | 3119 | print $langs->trans('PaymentConditionsShort'); |
| 3120 | 3120 | print '</td>'; |
| 3121 | 3121 | if ($action != 'editconditions' && $usercancreate && $caneditfield) { |
| 3122 | - print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editconditions&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetConditions'), 1) . '</a></td>'; |
|
| 3122 | + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editconditions&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetConditions'), 1).'</a></td>'; |
|
| 3123 | 3123 | } |
| 3124 | 3124 | print '</tr></table>'; |
| 3125 | 3125 | print '</td><td class="valuefield">'; |
| 3126 | 3126 | if ($action == 'editconditions' && $usercancreate && $caneditfield) { |
| 3127 | - $form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->cond_reglement_id, 'cond_reglement_id', 0, '', 1, $object->deposit_percent); |
|
| 3127 | + $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->cond_reglement_id, 'cond_reglement_id', 0, '', 1, $object->deposit_percent); |
|
| 3128 | 3128 | } else { |
| 3129 | - $form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->cond_reglement_id, 'none', 0, '', 1, $object->deposit_percent); |
|
| 3129 | + $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->cond_reglement_id, 'none', 0, '', 1, $object->deposit_percent); |
|
| 3130 | 3130 | } |
| 3131 | 3131 | print '</td>'; |
| 3132 | 3132 | print '</tr>'; |
@@ -3138,14 +3138,14 @@ discard block |
||
| 3138 | 3138 | print $langs->trans('PaymentMode'); |
| 3139 | 3139 | print '</td>'; |
| 3140 | 3140 | if ($action != 'editmode' && $usercancreate && $caneditfield) { |
| 3141 | - print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editmode&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetMode'), 1) . '</a></td>'; |
|
| 3141 | + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editmode&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetMode'), 1).'</a></td>'; |
|
| 3142 | 3142 | } |
| 3143 | 3143 | print '</tr></table>'; |
| 3144 | 3144 | print '</td><td class="valuefieldcreate">'; |
| 3145 | 3145 | if ($action == 'editmode' && $usercancreate && $caneditfield) { |
| 3146 | - $form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->mode_reglement_id, 'mode_reglement_id', 'CRDT', 1, 1); |
|
| 3146 | + $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->mode_reglement_id, 'mode_reglement_id', 'CRDT', 1, 1); |
|
| 3147 | 3147 | } else { |
| 3148 | - $form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->mode_reglement_id, 'none'); |
|
| 3148 | + $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->mode_reglement_id, 'none'); |
|
| 3149 | 3149 | } |
| 3150 | 3150 | print '</td></tr>'; |
| 3151 | 3151 | |
@@ -3162,20 +3162,20 @@ discard block |
||
| 3162 | 3162 | print '<tr class="fielddeliverydelay"><td>'; |
| 3163 | 3163 | print '<table class="nobordernopadding centpercent"><tr><td>'; |
| 3164 | 3164 | if (isModEnabled('order')) { |
| 3165 | - print $form->textwithpicto($langs->trans('AvailabilityPeriod'), $langs->trans('AvailabilityPeriod') . ' (' . $langs->trans('AfterOrder') . ')'); |
|
| 3165 | + print $form->textwithpicto($langs->trans('AvailabilityPeriod'), $langs->trans('AvailabilityPeriod').' ('.$langs->trans('AfterOrder').')'); |
|
| 3166 | 3166 | } else { |
| 3167 | 3167 | print $langs->trans('AvailabilityPeriod'); |
| 3168 | 3168 | } |
| 3169 | 3169 | print '</td>'; |
| 3170 | 3170 | if ($action != 'editavailability' && $usercancreate && $caneditfield) { |
| 3171 | - print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editavailability&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetAvailability'), 1) . '</a></td>'; |
|
| 3171 | + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editavailability&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetAvailability'), 1).'</a></td>'; |
|
| 3172 | 3172 | } |
| 3173 | 3173 | print '</tr></table>'; |
| 3174 | 3174 | print '</td><td class="valuefield">'; |
| 3175 | 3175 | if ($action == 'editavailability' && $usercancreate && $caneditfield) { |
| 3176 | - $form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->availability_id, 'availability_id', 1); |
|
| 3176 | + $form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->availability_id, 'availability_id', 1); |
|
| 3177 | 3177 | } else { |
| 3178 | - $form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->availability_id, 'none', 1); |
|
| 3178 | + $form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->availability_id, 'none', 1); |
|
| 3179 | 3179 | } |
| 3180 | 3180 | |
| 3181 | 3181 | print '</td>'; |
@@ -3188,14 +3188,14 @@ discard block |
||
| 3188 | 3188 | print $langs->trans('SendingMethod'); |
| 3189 | 3189 | print '</td>'; |
| 3190 | 3190 | if ($action != 'editshippingmethod' && $usercancreate && $caneditfield) { |
| 3191 | - print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editshippingmethod&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->trans('SetShippingMode'), 1) . '</a></td>'; |
|
| 3191 | + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editshippingmethod&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetShippingMode'), 1).'</a></td>'; |
|
| 3192 | 3192 | } |
| 3193 | 3193 | print '</tr></table>'; |
| 3194 | 3194 | print '</td><td class="valuefield">'; |
| 3195 | 3195 | if ($action == 'editshippingmethod' && $usercancreate && $caneditfield) { |
| 3196 | - $form->formSelectShippingMethod($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->shipping_method_id, 'shipping_method_id', 1); |
|
| 3196 | + $form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->shipping_method_id, 'shipping_method_id', 1); |
|
| 3197 | 3197 | } else { |
| 3198 | - $form->formSelectShippingMethod($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->shipping_method_id, 'none'); |
|
| 3198 | + $form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->shipping_method_id, 'none'); |
|
| 3199 | 3199 | } |
| 3200 | 3200 | print '</td>'; |
| 3201 | 3201 | print '</tr>'; |
@@ -3204,16 +3204,16 @@ discard block |
||
| 3204 | 3204 | // Warehouse |
| 3205 | 3205 | if (isModEnabled('stock') && getDolGlobalString('WAREHOUSE_ASK_WAREHOUSE_DURING_PROPAL')) { |
| 3206 | 3206 | $langs->load('stocks'); |
| 3207 | - require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php'; |
|
| 3207 | + require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; |
|
| 3208 | 3208 | $formproduct = new FormProduct($db); |
| 3209 | 3209 | print '<tr class="field_warehouse_id"><td>'; |
| 3210 | 3210 | $editenable = $usercancreate; |
| 3211 | 3211 | print $form->editfieldkey("Warehouse", 'warehouse', '', $object, $editenable); |
| 3212 | 3212 | print '</td><td class="valuefieldcreate">'; |
| 3213 | 3213 | if ($action == 'editwarehouse') { |
| 3214 | - $formproduct->formSelectWarehouses($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->warehouse_id, 'warehouse_id', 1); |
|
| 3214 | + $formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->warehouse_id, 'warehouse_id', 1); |
|
| 3215 | 3215 | } else { |
| 3216 | - $formproduct->formSelectWarehouses($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->warehouse_id, 'none'); |
|
| 3216 | + $formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->warehouse_id, 'none'); |
|
| 3217 | 3217 | } |
| 3218 | 3218 | print '</td>'; |
| 3219 | 3219 | print '</tr>'; |
@@ -3225,14 +3225,14 @@ discard block |
||
| 3225 | 3225 | print $langs->trans('Source'); |
| 3226 | 3226 | print '</td>'; |
| 3227 | 3227 | if ($action != 'editdemandreason' && $usercancreate) { |
| 3228 | - print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editdemandreason&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetDemandReason'), 1) . '</a></td>'; |
|
| 3228 | + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editdemandreason&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetDemandReason'), 1).'</a></td>'; |
|
| 3229 | 3229 | } |
| 3230 | 3230 | print '</tr></table>'; |
| 3231 | 3231 | print '</td><td class="valuefield">'; |
| 3232 | 3232 | if ($action == 'editdemandreason' && $usercancreate) { |
| 3233 | - $form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->demand_reason_id, 'demand_reason_id', 1); |
|
| 3233 | + $form->formInputReason($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->demand_reason_id, 'demand_reason_id', 1); |
|
| 3234 | 3234 | } else { |
| 3235 | - $form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->demand_reason_id, 'none'); |
|
| 3235 | + $form->formInputReason($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->demand_reason_id, 'none'); |
|
| 3236 | 3236 | } |
| 3237 | 3237 | print '</td>'; |
| 3238 | 3238 | print '</tr>'; |
@@ -3244,7 +3244,7 @@ discard block |
||
| 3244 | 3244 | print '</td><td class="valuefield">'; |
| 3245 | 3245 | $arrayoutstandingbills = $soc->getOutstandingBills(); |
| 3246 | 3246 | print($arrayoutstandingbills['opened'] > $soc->outstanding_limit ? img_warning() : ''); |
| 3247 | - print price($arrayoutstandingbills['opened']) . ' / '; |
|
| 3247 | + print price($arrayoutstandingbills['opened']).' / '; |
|
| 3248 | 3248 | print price($soc->outstanding_limit, 0, $langs, 1, -1, -1, $conf->currency); |
| 3249 | 3249 | print '</td>'; |
| 3250 | 3250 | print '</tr>'; |
@@ -3257,14 +3257,14 @@ discard block |
||
| 3257 | 3257 | print $langs->trans('BankAccount'); |
| 3258 | 3258 | print '</td>'; |
| 3259 | 3259 | if ($action != 'editbankaccount' && $usercancreate) { |
| 3260 | - print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editbankaccount&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->trans('SetBankAccount'), 1) . '</a></td>'; |
|
| 3260 | + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editbankaccount&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetBankAccount'), 1).'</a></td>'; |
|
| 3261 | 3261 | } |
| 3262 | 3262 | print '</tr></table>'; |
| 3263 | 3263 | print '</td><td class="valuefield">'; |
| 3264 | 3264 | if ($action == 'editbankaccount') { |
| 3265 | - $form->formSelectAccount($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->fk_account, 'fk_account', 1); |
|
| 3265 | + $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->fk_account, 'fk_account', 1); |
|
| 3266 | 3266 | } else { |
| 3267 | - $form->formSelectAccount($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->fk_account, 'none'); |
|
| 3267 | + $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->fk_account, 'none'); |
|
| 3268 | 3268 | } |
| 3269 | 3269 | print '</td>'; |
| 3270 | 3270 | print '</tr>'; |
@@ -3275,13 +3275,13 @@ discard block |
||
| 3275 | 3275 | $totalWeight = isset($tmparray['weight']) ? $tmparray['weight'] : 0; |
| 3276 | 3276 | $totalVolume = isset($tmparray['volume']) ? $tmparray['volume'] : 0; |
| 3277 | 3277 | if ($totalWeight) { |
| 3278 | - print '<tr><td>' . $langs->trans("CalculatedWeight") . '</td>'; |
|
| 3278 | + print '<tr><td>'.$langs->trans("CalculatedWeight").'</td>'; |
|
| 3279 | 3279 | print '<td class="valuefield">'; |
| 3280 | 3280 | print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, getDolGlobalInt('MAIN_WEIGHT_DEFAULT_ROUND', -1), getDolGlobalString('MAIN_WEIGHT_DEFAULT_UNIT', 'no'), 1); |
| 3281 | 3281 | print '</td></tr>'; |
| 3282 | 3282 | } |
| 3283 | 3283 | if ($totalVolume) { |
| 3284 | - print '<tr><td>' . $langs->trans("CalculatedVolume") . '</td>'; |
|
| 3284 | + print '<tr><td>'.$langs->trans("CalculatedVolume").'</td>'; |
|
| 3285 | 3285 | print '<td class="valuefield">'; |
| 3286 | 3286 | print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, getDolGlobalInt('MAIN_VOLUME_DEFAULT_ROUND', -1), getDolGlobalString('MAIN_VOLUME_DEFAULT_UNIT', 'no'), 1); |
| 3287 | 3287 | print '</td></tr>'; |
@@ -3295,7 +3295,7 @@ discard block |
||
| 3295 | 3295 | print $langs->trans('IncotermLabel'); |
| 3296 | 3296 | print '<td><td class="right">'; |
| 3297 | 3297 | if ($action != 'editincoterm' && $usercancreate && $caneditfield) { |
| 3298 | - print '<a class="editfielda" href="' . DOL_URL_ROOT . '/comm/propal/card.php?id=' . $object->id . '&action=editincoterm&token=' . newToken() . '">' . img_edit() . '</a>'; |
|
| 3298 | + print '<a class="editfielda" href="'.DOL_URL_ROOT.'/comm/propal/card.php?id='.$object->id.'&action=editincoterm&token='.newToken().'">'.img_edit().'</a>'; |
|
| 3299 | 3299 | } else { |
| 3300 | 3300 | print ' '; |
| 3301 | 3301 | } |
@@ -3303,7 +3303,7 @@ discard block |
||
| 3303 | 3303 | print '</td>'; |
| 3304 | 3304 | print '<td class="valuefield">'; |
| 3305 | 3305 | if ($action == 'editincoterm' && $usercancreate && $caneditfield) { |
| 3306 | - print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'] . '?id=' . $object->id); |
|
| 3306 | + print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'].'?id='.$object->id); |
|
| 3307 | 3307 | } else { |
| 3308 | 3308 | print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1); |
| 3309 | 3309 | } |
@@ -3311,7 +3311,7 @@ discard block |
||
| 3311 | 3311 | } |
| 3312 | 3312 | |
| 3313 | 3313 | // Other attributes |
| 3314 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; |
|
| 3314 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; |
|
| 3315 | 3315 | |
| 3316 | 3316 | print '</table>'; |
| 3317 | 3317 | |
@@ -3321,53 +3321,53 @@ discard block |
||
| 3321 | 3321 | |
| 3322 | 3322 | print '<table class="border tableforfield centpercent">'; |
| 3323 | 3323 | |
| 3324 | - include DOL_DOCUMENT_ROOT . '/core/tpl/object_currency_amount.tpl.php'; |
|
| 3324 | + include DOL_DOCUMENT_ROOT.'/core/tpl/object_currency_amount.tpl.php'; |
|
| 3325 | 3325 | |
| 3326 | 3326 | print '<tr>'; |
| 3327 | - print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>'; |
|
| 3328 | - print '<td class="nowrap amountcard right">' . price($object->total_ht, 0, $langs, 1, -1, -1, $conf->currency) . '</td>'; |
|
| 3327 | + print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>'; |
|
| 3328 | + print '<td class="nowrap amountcard right">'.price($object->total_ht, 0, $langs, 1, -1, -1, $conf->currency).'</td>'; |
|
| 3329 | 3329 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 3330 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ht, 0, $langs, 1, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 3330 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ht, 0, $langs, 1, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 3331 | 3331 | } |
| 3332 | 3332 | print '</tr>'; |
| 3333 | 3333 | |
| 3334 | 3334 | print '<tr>'; |
| 3335 | - print '<td>' . $langs->trans('AmountVAT') . '</td>'; |
|
| 3336 | - print '<td class="nowrap amountcard right">' . price($object->total_tva, 0, $langs, 1, -1, -1, $conf->currency) . '</td>'; |
|
| 3335 | + print '<td>'.$langs->trans('AmountVAT').'</td>'; |
|
| 3336 | + print '<td class="nowrap amountcard right">'.price($object->total_tva, 0, $langs, 1, -1, -1, $conf->currency).'</td>'; |
|
| 3337 | 3337 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 3338 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_tva, 0, $langs, 1, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 3338 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_tva, 0, $langs, 1, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 3339 | 3339 | } |
| 3340 | 3340 | print '</tr>'; |
| 3341 | 3341 | |
| 3342 | 3342 | if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) { |
| 3343 | 3343 | print '<tr>'; |
| 3344 | - print '<td>' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>'; |
|
| 3345 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax1, 0, $langs, 1, -1, -1, $conf->currency) . '</td>'; |
|
| 3344 | + print '<td>'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>'; |
|
| 3345 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax1, 0, $langs, 1, -1, -1, $conf->currency).'</td>'; |
|
| 3346 | 3346 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 3347 | 3347 | $object->multicurrency_total_localtax1 = price2num($object->total_localtax1 * $object->multicurrency_tx, 'MT'); |
| 3348 | 3348 | |
| 3349 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_localtax1, 0, $langs, 1, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 3349 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_localtax1, 0, $langs, 1, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 3350 | 3350 | } |
| 3351 | 3351 | print '</tr>'; |
| 3352 | 3352 | } |
| 3353 | 3353 | |
| 3354 | 3354 | if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) { |
| 3355 | 3355 | print '<tr>'; |
| 3356 | - print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>'; |
|
| 3357 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax2, 0, $langs, 1, -1, -1, $conf->currency) . '</td>'; |
|
| 3356 | + print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>'; |
|
| 3357 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax2, 0, $langs, 1, -1, -1, $conf->currency).'</td>'; |
|
| 3358 | 3358 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 3359 | 3359 | $object->multicurrency_total_localtax2 = price2num($object->total_localtax2 * $object->multicurrency_tx, 'MT'); |
| 3360 | 3360 | |
| 3361 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_localtax2, 0, $langs, 1, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 3361 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_localtax2, 0, $langs, 1, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 3362 | 3362 | } |
| 3363 | 3363 | print '</tr>'; |
| 3364 | 3364 | } |
| 3365 | 3365 | |
| 3366 | 3366 | print '<tr>'; |
| 3367 | - print '<td>' . $langs->trans('AmountTTC') . '</td>'; |
|
| 3368 | - print '<td class="nowrap amountcard right">' . price($object->total_ttc, 0, $langs, 1, -1, -1, $conf->currency) . '</td>'; |
|
| 3367 | + print '<td>'.$langs->trans('AmountTTC').'</td>'; |
|
| 3368 | + print '<td class="nowrap amountcard right">'.price($object->total_ttc, 0, $langs, 1, -1, -1, $conf->currency).'</td>'; |
|
| 3369 | 3369 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 3370 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ttc, 0, $langs, 1, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 3370 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ttc, 0, $langs, 1, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 3371 | 3371 | } |
| 3372 | 3372 | print '</tr>'; |
| 3373 | 3373 | |
@@ -3386,13 +3386,13 @@ discard block |
||
| 3386 | 3386 | if (getDolGlobalString('MAIN_DISABLE_CONTACTS_TAB')) { |
| 3387 | 3387 | $blocname = 'contacts'; |
| 3388 | 3388 | $title = $langs->trans('ContactsAddresses'); |
| 3389 | - include DOL_DOCUMENT_ROOT . '/core/tpl/bloc_showhide.tpl.php'; |
|
| 3389 | + include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'; |
|
| 3390 | 3390 | } |
| 3391 | 3391 | |
| 3392 | 3392 | if (getDolGlobalString('MAIN_DISABLE_NOTES_TAB')) { |
| 3393 | 3393 | $blocname = 'notes'; |
| 3394 | 3394 | $title = $langs->trans('Notes'); |
| 3395 | - include DOL_DOCUMENT_ROOT . '/core/tpl/bloc_showhide.tpl.php'; |
|
| 3395 | + include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'; |
|
| 3396 | 3396 | } |
| 3397 | 3397 | |
| 3398 | 3398 | /* |
@@ -3407,20 +3407,20 @@ discard block |
||
| 3407 | 3407 | global $inputalsopricewithtax; |
| 3408 | 3408 | $inputalsopricewithtax = 1; |
| 3409 | 3409 | |
| 3410 | - print ' <form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="POST"> |
|
| 3411 | - <input type="hidden" name="token" value="' . newToken() . '"> |
|
| 3412 | - <input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline') . '"> |
|
| 3410 | + print ' <form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="POST"> |
|
| 3411 | + <input type="hidden" name="token" value="' . newToken().'"> |
|
| 3412 | + <input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'"> |
|
| 3413 | 3413 | <input type="hidden" name="mode" value=""> |
| 3414 | 3414 | <input type="hidden" name="page_y" value=""> |
| 3415 | - <input type="hidden" name="backtopage" value="' . $backtopage . '"> |
|
| 3416 | - <input type="hidden" name="id" value="' . $object->id . '"> |
|
| 3415 | + <input type="hidden" name="backtopage" value="' . $backtopage.'"> |
|
| 3416 | + <input type="hidden" name="id" value="' . $object->id.'"> |
|
| 3417 | 3417 | '; |
| 3418 | 3418 | |
| 3419 | 3419 | if (!empty($conf->use_javascript_ajax) && $object->status == Propal::STATUS_DRAFT) { |
| 3420 | 3420 | if (isModEnabled('subtotals')) { |
| 3421 | - include DOL_DOCUMENT_ROOT . '/core/tpl/subtotal_ajaxrow.tpl.php'; |
|
| 3421 | + include DOL_DOCUMENT_ROOT.'/core/tpl/subtotal_ajaxrow.tpl.php'; |
|
| 3422 | 3422 | } else { |
| 3423 | - include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php'; |
|
| 3423 | + include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; |
|
| 3424 | 3424 | } |
| 3425 | 3425 | } |
| 3426 | 3426 | |
@@ -3475,7 +3475,7 @@ discard block |
||
| 3475 | 3475 | if (empty($reshook)) { |
| 3476 | 3476 | if ($action != 'editline') { |
| 3477 | 3477 | // Subtotal |
| 3478 | - if ($object->status == Propal::STATUS_DRAFT && isModEnabled('subtotals') && getDolGlobalString('SUBTOTAL_TITLE_' . strtoupper($object->element))) { |
|
| 3478 | + if ($object->status == Propal::STATUS_DRAFT && isModEnabled('subtotals') && getDolGlobalString('SUBTOTAL_TITLE_'.strtoupper($object->element))) { |
|
| 3479 | 3479 | $langs->load('subtotals'); |
| 3480 | 3480 | |
| 3481 | 3481 | $url_button = array(); |
@@ -3485,7 +3485,7 @@ discard block |
||
| 3485 | 3485 | 'enabled' => (isModEnabled('propal') && $object->status == Propal::STATUS_DRAFT), |
| 3486 | 3486 | 'perm' => (bool) $usercancreate, |
| 3487 | 3487 | 'label' => $langs->trans('AddTitleLine'), |
| 3488 | - 'url' => '/comm/propal/card.php?id=' . $object->id . '&action=add_title_line&token=' . newToken() |
|
| 3488 | + 'url' => '/comm/propal/card.php?id='.$object->id.'&action=add_title_line&token='.newToken() |
|
| 3489 | 3489 | ); |
| 3490 | 3490 | |
| 3491 | 3491 | $url_button[] = array( |
@@ -3493,7 +3493,7 @@ discard block |
||
| 3493 | 3493 | 'enabled' => (isModEnabled('propal') && $object->status == Propal::STATUS_DRAFT), |
| 3494 | 3494 | 'perm' => (bool) $usercancreate, |
| 3495 | 3495 | 'label' => $langs->trans('AddSubtotalLine'), |
| 3496 | - 'url' => '/comm/propal/card.php?id=' . $object->id . '&action=add_subtotal_line&token=' . newToken() |
|
| 3496 | + 'url' => '/comm/propal/card.php?id='.$object->id.'&action=add_subtotal_line&token='.newToken() |
|
| 3497 | 3497 | ); |
| 3498 | 3498 | |
| 3499 | 3499 | print dolGetButtonAction('', $langs->trans('Subtotal'), 'default', $url_button, '', true); |
@@ -3504,9 +3504,9 @@ discard block |
||
| 3504 | 3504 | || ($object->status == Propal::STATUS_DRAFT && getDolGlobalString('PROPAL_ENABLE_NEGATIVE') && count($object->lines) > 0) |
| 3505 | 3505 | ) { |
| 3506 | 3506 | if ($usercanvalidate) { |
| 3507 | - print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=validate&token=' . newToken() . '">' . (!getDolGlobalString('PROPAL_SKIP_ACCEPT_REFUSE') ? $langs->trans('Validate') : $langs->trans('ValidateAndSign')) . '</a>'; |
|
| 3507 | + print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=validate&token='.newToken().'">'.(!getDolGlobalString('PROPAL_SKIP_ACCEPT_REFUSE') ? $langs->trans('Validate') : $langs->trans('ValidateAndSign')).'</a>'; |
|
| 3508 | 3508 | } else { |
| 3509 | - print '<a class="butActionRefused classfortooltip" href="#">' . $langs->trans('Validate') . '</a>'; |
|
| 3509 | + print '<a class="butActionRefused classfortooltip" href="#">'.$langs->trans('Validate').'</a>'; |
|
| 3510 | 3510 | } |
| 3511 | 3511 | } |
| 3512 | 3512 | // Create event |
@@ -3516,23 +3516,23 @@ discard block |
||
| 3516 | 3516 | }*/ |
| 3517 | 3517 | // Edit |
| 3518 | 3518 | if ($object->status == Propal::STATUS_VALIDATED && $usercancreate) { |
| 3519 | - print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=modif&token=' . newToken() . '">' . $langs->trans('Modify') . '</a>'; |
|
| 3519 | + print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=modif&token='.newToken().'">'.$langs->trans('Modify').'</a>'; |
|
| 3520 | 3520 | } |
| 3521 | 3521 | |
| 3522 | 3522 | // ReOpen |
| 3523 | 3523 | if (((getDolGlobalString('PROPAL_REOPEN_UNSIGNED_ONLY') && $object->status == Propal::STATUS_NOTSIGNED) || (!getDolGlobalString('PROPAL_REOPEN_UNSIGNED_ONLY') && ($object->status == Propal::STATUS_SIGNED || $object->status == Propal::STATUS_NOTSIGNED || $object->status == Propal::STATUS_BILLED || $object->status == Propal::STATUS_CANCELED)))) { |
| 3524 | 3524 | if ($usercanreopen) { |
| 3525 | - print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=reopen&token=' . newToken() . (!getDolGlobalString('MAIN_JUMP_TAG') ? '' : '#reopen') . '"'; |
|
| 3526 | - print '>' . $langs->trans('ReOpen') . '</a>'; |
|
| 3525 | + print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen&token='.newToken().(!getDolGlobalString('MAIN_JUMP_TAG') ? '' : '#reopen').'"'; |
|
| 3526 | + print '>'.$langs->trans('ReOpen').'</a>'; |
|
| 3527 | 3527 | } else { |
| 3528 | - print '<a class="butActionRefused classfortooltip" href="#" title="' . $langs->trans("NotEnoughPermissions") . '">' . $langs->trans("ReOpen") . '</a>'; |
|
| 3528 | + print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans("ReOpen").'</a>'; |
|
| 3529 | 3529 | } |
| 3530 | 3530 | } |
| 3531 | 3531 | |
| 3532 | 3532 | // Send |
| 3533 | 3533 | if (empty($user->socid)) { |
| 3534 | 3534 | if ($object->status == Propal::STATUS_VALIDATED || $object->status == Propal::STATUS_SIGNED || getDolGlobalString('PROPOSAL_SENDBYEMAIL_FOR_ALL_STATUS')) { |
| 3535 | - print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"] . '?action=presend&token=' . newToken() . '&id=' . $object->id . '&mode=init#formmailbeforetitle', '', $usercansend); |
|
| 3535 | + print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?action=presend&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', '', $usercansend); |
|
| 3536 | 3536 | } |
| 3537 | 3537 | } |
| 3538 | 3538 | |
@@ -3544,7 +3544,7 @@ discard block |
||
| 3544 | 3544 | 'enabled' => (isModEnabled('order') && $object->status == Propal::STATUS_SIGNED), |
| 3545 | 3545 | 'perm' => $usercancreateorder, |
| 3546 | 3546 | 'label' => 'AddOrder', |
| 3547 | - 'url' => '/commande/card.php?action=create&origin=' . urlencode($object->element) . '&originid=' . ((int) $object->id) . '&socid=' . ((int) $object->socid) |
|
| 3547 | + 'url' => '/commande/card.php?action=create&origin='.urlencode($object->element).'&originid='.((int) $object->id).'&socid='.((int) $object->socid) |
|
| 3548 | 3548 | ); |
| 3549 | 3549 | /*if (isModEnabled('order') && $object->status == Propal::STATUS_SIGNED) { |
| 3550 | 3550 | if ($usercancreateorder) { |
@@ -3559,7 +3559,7 @@ discard block |
||
| 3559 | 3559 | 'enabled' => ($object->status == Propal::STATUS_SIGNED && isModEnabled("supplier_order")), |
| 3560 | 3560 | 'perm' => $usercancreatepurchaseorder, |
| 3561 | 3561 | 'label' => 'AddPurchaseOrder', |
| 3562 | - 'url' => '/fourn/commande/card.php?action=create&origin=' . urlencode($object->element) . '&originid=' . ((int) $object->id) . '&socid=' . ((int) $object->socid) |
|
| 3562 | + 'url' => '/fourn/commande/card.php?action=create&origin='.urlencode($object->element).'&originid='.((int) $object->id).'&socid='.((int) $object->socid) |
|
| 3563 | 3563 | ); |
| 3564 | 3564 | /*if ($object->status == Propal::STATUS_SIGNED && isModEnabled("supplier_order")) { |
| 3565 | 3565 | if ($usercancreatepurchaseorder) { |
@@ -3574,7 +3574,7 @@ discard block |
||
| 3574 | 3574 | 'enabled' => (isModEnabled("service") && isModEnabled('intervention') && $object->status == Propal::STATUS_SIGNED), |
| 3575 | 3575 | 'perm' => $usercancreateintervention, |
| 3576 | 3576 | 'label' => 'AddIntervention', |
| 3577 | - 'url' => '/fichinter/card.php?action=create&origin=' . urlencode($object->element) . '&originid=' . ((int) $object->id) . '&socid=' . ((int) $object->socid) |
|
| 3577 | + 'url' => '/fichinter/card.php?action=create&origin='.urlencode($object->element).'&originid='.((int) $object->id).'&socid='.((int) $object->socid) |
|
| 3578 | 3578 | ); |
| 3579 | 3579 | /*if (isModEnabled("service") && isModEnabled('intervention') && $object->status == Propal::STATUS_SIGNED) { |
| 3580 | 3580 | if ($usercancreateintervention) { |
@@ -3589,7 +3589,7 @@ discard block |
||
| 3589 | 3589 | 'enabled' => (isModEnabled('contract') && $object->status == Propal::STATUS_SIGNED), |
| 3590 | 3590 | 'perm' => $usercancreatecontract, |
| 3591 | 3591 | 'label' => 'AddContract', |
| 3592 | - 'url' => '/contrat/card.php?action=create&origin=' . urlencode($object->element) . '&originid=' . ((int) $object->id) . '&socid=' . ((int) $object->socid) |
|
| 3592 | + 'url' => '/contrat/card.php?action=create&origin='.urlencode($object->element).'&originid='.((int) $object->id).'&socid='.((int) $object->socid) |
|
| 3593 | 3593 | ); |
| 3594 | 3594 | /*if (isModEnabled('contract') && $object->status == Propal::STATUS_SIGNED) { |
| 3595 | 3595 | $langs->load("contracts"); |
@@ -3606,7 +3606,7 @@ discard block |
||
| 3606 | 3606 | 'enabled' => isModEnabled('invoice'), |
| 3607 | 3607 | 'perm' => $usercancreateinvoice, |
| 3608 | 3608 | 'label' => 'CreateBill', |
| 3609 | - 'url' => '/compta/facture/card.php?action=create&origin=' . urlencode($object->element) . '&originid=' . ((int) $object->id) . '&socid=' . ((int) $object->socid), |
|
| 3609 | + 'url' => '/compta/facture/card.php?action=create&origin='.urlencode($object->element).'&originid='.((int) $object->id).'&socid='.((int) $object->socid), |
|
| 3610 | 3610 | ]; |
| 3611 | 3611 | /*if (isModEnabled('invoice') && $usercancreateinvoice) { |
| 3612 | 3612 | print '<a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid.'">'.$langs->trans("CreateBill").'</a>'; |
@@ -3615,7 +3615,7 @@ discard block |
||
| 3615 | 3615 | |
| 3616 | 3616 | $actionButtonsParameters = [ |
| 3617 | 3617 | "areDropdownButtons" => !getDolGlobalInt("MAIN_REMOVE_DROPDOWN_CREATE_BUTTONS_ON_ORDER"), |
| 3618 | - "backtopage" => $_SERVER["PHP_SELF"] . "?id=" . ((int) $id) |
|
| 3618 | + "backtopage" => $_SERVER["PHP_SELF"]."?id=".((int) $id) |
|
| 3619 | 3619 | ]; |
| 3620 | 3620 | |
| 3621 | 3621 | if ($numlines > 0) { |
@@ -3628,9 +3628,9 @@ discard block |
||
| 3628 | 3628 | $arrayofinvoiceforpropal = $object->getInvoiceArrayList(); |
| 3629 | 3629 | if ((is_array($arrayofinvoiceforpropal) && count($arrayofinvoiceforpropal) > 0) || !getDolGlobalString('WORKFLOW_PROPAL_NEED_INVOICE_TO_BE_CLASSIFIED_BILLED')) { |
| 3630 | 3630 | if ($usercanclose) { |
| 3631 | - print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=classifybilled&token=' . newToken() . '&socid=' . $object->socid . '">' . $langs->trans("ClassifyBilled") . '</a>'; |
|
| 3631 | + print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=classifybilled&token='.newToken().'&socid='.$object->socid.'">'.$langs->trans("ClassifyBilled").'</a>'; |
|
| 3632 | 3632 | } else { |
| 3633 | - print '<a class="butActionRefused classfortooltip" href="#" title="' . $langs->trans("NotEnoughPermissions") . '">' . $langs->trans("ClassifyBilled") . '</a>'; |
|
| 3633 | + print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotEnoughPermissions").'">'.$langs->trans("ClassifyBilled").'</a>'; |
|
| 3634 | 3634 | } |
| 3635 | 3635 | } |
| 3636 | 3636 | } |
@@ -3639,33 +3639,33 @@ discard block |
||
| 3639 | 3639 | // Close as accepted/refused |
| 3640 | 3640 | if ($object->status == Propal::STATUS_VALIDATED) { |
| 3641 | 3641 | if ($usercanclose) { |
| 3642 | - print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=closeas&token=' . newToken() . (!getDolGlobalString('MAIN_JUMP_TAG') ? '' : '#close') . '"'; |
|
| 3643 | - print '>' . $langs->trans('SetAcceptedRefused') . '</a>'; |
|
| 3642 | + print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=closeas&token='.newToken().(!getDolGlobalString('MAIN_JUMP_TAG') ? '' : '#close').'"'; |
|
| 3643 | + print '>'.$langs->trans('SetAcceptedRefused').'</a>'; |
|
| 3644 | 3644 | } else { |
| 3645 | - print '<a class="butActionRefused classfortooltip" href="#" title="' . $langs->trans("NotEnoughPermissions") . '"'; |
|
| 3646 | - print '>' . $langs->trans('SetAcceptedRefused') . '</a>'; |
|
| 3645 | + print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("NotEnoughPermissions").'"'; |
|
| 3646 | + print '>'.$langs->trans('SetAcceptedRefused').'</a>'; |
|
| 3647 | 3647 | } |
| 3648 | 3648 | } |
| 3649 | 3649 | } else { |
| 3650 | 3650 | // Set not signed (close) |
| 3651 | 3651 | if ($object->status == Propal::STATUS_DRAFT && $usercanclose) { |
| 3652 | - print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&token=' . newToken() . '&action=closeas&token=' . newToken() . (!getDolGlobalString('MAIN_JUMP_TAG') ? '' : '#close') . '"'; |
|
| 3653 | - print '>' . $langs->trans('SetRefusedAndClose') . '</a>'; |
|
| 3652 | + print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&token='.newToken().'&action=closeas&token='.newToken().(!getDolGlobalString('MAIN_JUMP_TAG') ? '' : '#close').'"'; |
|
| 3653 | + print '>'.$langs->trans('SetRefusedAndClose').'</a>'; |
|
| 3654 | 3654 | } |
| 3655 | 3655 | } |
| 3656 | 3656 | |
| 3657 | 3657 | // Cancel propal |
| 3658 | 3658 | if ($object->status > Propal::STATUS_DRAFT && $usercanclose) { |
| 3659 | - print '<a class="butAction" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=cancel&token=' . newToken() . '">' . $langs->trans("CancelPropal") . '</a>'; |
|
| 3659 | + print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=cancel&token='.newToken().'">'.$langs->trans("CancelPropal").'</a>'; |
|
| 3660 | 3660 | } |
| 3661 | 3661 | |
| 3662 | 3662 | // Clone |
| 3663 | 3663 | if ($usercancreate) { |
| 3664 | - print '<a class="butAction" href="' . $_SERVER['PHP_SELF'] . '?id=' . $object->id . '&socid=' . $object->socid . '&action=clone&token=' . newToken() . '&object=' . $object->element . '">' . $langs->trans("ToClone") . '</a>'; |
|
| 3664 | + print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&socid='.$object->socid.'&action=clone&token='.newToken().'&object='.$object->element.'">'.$langs->trans("ToClone").'</a>'; |
|
| 3665 | 3665 | } |
| 3666 | 3666 | |
| 3667 | 3667 | // Delete |
| 3668 | - print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=delete&token=' . newToken(), 'delete', $usercandelete); |
|
| 3668 | + print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', $usercandelete); |
|
| 3669 | 3669 | } |
| 3670 | 3670 | } |
| 3671 | 3671 | |
@@ -3684,8 +3684,8 @@ discard block |
||
| 3684 | 3684 | * Generated documents |
| 3685 | 3685 | */ |
| 3686 | 3686 | $objref = dol_sanitizeFileName($object->ref); |
| 3687 | - $filedir = $conf->propal->multidir_output[$object->entity ?? $conf->entity] . "/" . dol_sanitizeFileName($object->ref); |
|
| 3688 | - $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id; |
|
| 3687 | + $filedir = $conf->propal->multidir_output[$object->entity ?? $conf->entity]."/".dol_sanitizeFileName($object->ref); |
|
| 3688 | + $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; |
|
| 3689 | 3689 | $genallowed = $usercanread; |
| 3690 | 3690 | $delallowed = $usercancreate; |
| 3691 | 3691 | |
@@ -3708,19 +3708,19 @@ discard block |
||
| 3708 | 3708 | |
| 3709 | 3709 | if ($object->status != Propal::STATUS_DRAFT && $useonlinesignature) { |
| 3710 | 3710 | print '<br><!-- Link to sign -->'; |
| 3711 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/signature.lib.php'; |
|
| 3712 | - print showOnlineSignatureUrl('proposal', $object->ref, $object) . '<br>'; |
|
| 3711 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/signature.lib.php'; |
|
| 3712 | + print showOnlineSignatureUrl('proposal', $object->ref, $object).'<br>'; |
|
| 3713 | 3713 | } |
| 3714 | 3714 | |
| 3715 | 3715 | print '</div><div class="fichehalfright">'; |
| 3716 | 3716 | |
| 3717 | 3717 | $MAXEVENT = 10; |
| 3718 | 3718 | |
| 3719 | - $morehtmlcenter = dolGetButtonTitle($langs->trans('FullConversation'), '', 'fa fa-comments imgforviewmode', DOL_URL_ROOT . '/comm/propal/messaging.php?id=' . $object->id); |
|
| 3720 | - $morehtmlcenter .= dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT . '/comm/propal/agenda.php?id=' . $object->id); |
|
| 3719 | + $morehtmlcenter = dolGetButtonTitle($langs->trans('FullConversation'), '', 'fa fa-comments imgforviewmode', DOL_URL_ROOT.'/comm/propal/messaging.php?id='.$object->id); |
|
| 3720 | + $morehtmlcenter .= dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/comm/propal/agenda.php?id='.$object->id); |
|
| 3721 | 3721 | |
| 3722 | 3722 | // List of actions on element |
| 3723 | - include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; |
|
| 3723 | + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; |
|
| 3724 | 3724 | $formactions = new FormActions($db); |
| 3725 | 3725 | $somethingshown = $formactions->showactions($object, 'propal', $socid, 1, '', $MAXEVENT, '', $morehtmlcenter); // Show all action for thirdparty |
| 3726 | 3726 | |
@@ -3731,9 +3731,9 @@ discard block |
||
| 3731 | 3731 | $modelmail = 'propal_send'; |
| 3732 | 3732 | $defaulttopic = 'SendPropalRef'; |
| 3733 | 3733 | $diroutput = $conf->propal->multidir_output[$object->entity ?? $conf->entity]; |
| 3734 | - $trackid = 'pro' . $object->id; |
|
| 3734 | + $trackid = 'pro'.$object->id; |
|
| 3735 | 3735 | |
| 3736 | - include DOL_DOCUMENT_ROOT . '/core/tpl/card_presend.tpl.php'; |
|
| 3736 | + include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; |
|
| 3737 | 3737 | } |
| 3738 | 3738 | |
| 3739 | 3739 | // End of page |
@@ -40,30 +40,30 @@ discard block |
||
| 40 | 40 | |
| 41 | 41 | // Load Dolibarr environment |
| 42 | 42 | require '../main.inc.php'; |
| 43 | -require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php'; |
|
| 44 | -require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php'; |
|
| 45 | -require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php'; |
|
| 46 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formfile.class.php'; |
|
| 47 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formorder.class.php'; |
|
| 48 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formmargin.class.php'; |
|
| 49 | -require_once DOL_DOCUMENT_ROOT . '/core/modules/commande/modules_commande.php'; |
|
| 50 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php'; |
|
| 51 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/order.lib.php'; |
|
| 52 | - |
|
| 53 | -require_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php'; |
|
| 54 | -require_once DOL_DOCUMENT_ROOT . '/commande/class/commande.class.php'; |
|
| 43 | +require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; |
|
| 44 | +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; |
|
| 45 | +require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; |
|
| 46 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; |
|
| 47 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formorder.class.php'; |
|
| 48 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formmargin.class.php'; |
|
| 49 | +require_once DOL_DOCUMENT_ROOT.'/core/modules/commande/modules_commande.php'; |
|
| 50 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; |
|
| 51 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php'; |
|
| 52 | + |
|
| 53 | +require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; |
|
| 54 | +require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; |
|
| 55 | 55 | |
| 56 | 56 | if (isModEnabled("propal")) { |
| 57 | - require_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php'; |
|
| 57 | + require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; |
|
| 58 | 58 | } |
| 59 | 59 | |
| 60 | 60 | if (isModEnabled('project')) { |
| 61 | - require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; |
|
| 62 | - require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
| 61 | + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; |
|
| 62 | + require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | if (isModEnabled('variants')) { |
| 66 | - require_once DOL_DOCUMENT_ROOT . '/variants/class/ProductCombination.class.php'; |
|
| 66 | + require_once DOL_DOCUMENT_ROOT.'/variants/class/ProductCombination.class.php'; |
|
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | |
@@ -91,18 +91,18 @@ discard block |
||
| 91 | 91 | |
| 92 | 92 | |
| 93 | 93 | $id = (GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('orderid')); |
| 94 | -$ref = GETPOST('ref', 'alpha'); |
|
| 95 | -$socid = GETPOSTINT('socid'); |
|
| 96 | -$action = GETPOST('action', 'aZ09'); |
|
| 97 | -$cancel = GETPOST('cancel', 'alpha'); |
|
| 98 | -$confirm = GETPOST('confirm', 'alpha'); |
|
| 94 | +$ref = GETPOST('ref', 'alpha'); |
|
| 95 | +$socid = GETPOSTINT('socid'); |
|
| 96 | +$action = GETPOST('action', 'aZ09'); |
|
| 97 | +$cancel = GETPOST('cancel', 'alpha'); |
|
| 98 | +$confirm = GETPOST('confirm', 'alpha'); |
|
| 99 | 99 | $backtopage = GETPOST('backtopage', 'alpha'); |
| 100 | 100 | |
| 101 | -$lineid = GETPOSTINT('lineid'); |
|
| 102 | -$contactid = GETPOSTINT('contactid'); |
|
| 103 | -$projectid = GETPOSTINT('projectid'); |
|
| 104 | -$origin = GETPOST('origin', 'alpha'); |
|
| 105 | -$originid = (GETPOSTINT('originid') ? GETPOSTINT('originid') : GETPOSTINT('origin_id')); // For backward compatibility |
|
| 101 | +$lineid = GETPOSTINT('lineid'); |
|
| 102 | +$contactid = GETPOSTINT('contactid'); |
|
| 103 | +$projectid = GETPOSTINT('projectid'); |
|
| 104 | +$origin = GETPOST('origin', 'alpha'); |
|
| 105 | +$originid = (GETPOSTINT('originid') ? GETPOSTINT('originid') : GETPOSTINT('origin_id')); // For backward compatibility |
|
| 106 | 106 | $rank = (GETPOSTINT('rank') > 0) ? GETPOSTINT('rank') : -1; |
| 107 | 107 | |
| 108 | 108 | // Type Contact default |
@@ -147,26 +147,26 @@ discard block |
||
| 147 | 147 | $extrafields->fetch_name_optionals_label($object->table_element); |
| 148 | 148 | |
| 149 | 149 | // Load object |
| 150 | -include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once' |
|
| 150 | +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once' |
|
| 151 | 151 | |
| 152 | 152 | // Permissions / Rights |
| 153 | -$usercanread = $user->hasRight("commande", "lire"); |
|
| 154 | -$usercancreate = $user->hasRight("commande", "creer"); |
|
| 155 | -$usercandelete = $user->hasRight("commande", "supprimer"); |
|
| 153 | +$usercanread = $user->hasRight("commande", "lire"); |
|
| 154 | +$usercancreate = $user->hasRight("commande", "creer"); |
|
| 155 | +$usercandelete = $user->hasRight("commande", "supprimer"); |
|
| 156 | 156 | |
| 157 | 157 | // Advanced permissions |
| 158 | -$usercanclose = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && !empty($usercancreate)) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'close'))); |
|
| 159 | -$usercanvalidate = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $usercancreate) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'validate'))); |
|
| 160 | -$usercancancel = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $usercancreate) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'annuler'))); |
|
| 161 | -$usercansend = (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || $user->hasRight('commande', 'order_advance', 'send')); |
|
| 162 | -$usercangeneretedoc = (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || $user->hasRight('commande', 'order_advance', 'generetedoc')); |
|
| 158 | +$usercanclose = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && !empty($usercancreate)) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'close'))); |
|
| 159 | +$usercanvalidate = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $usercancreate) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'validate'))); |
|
| 160 | +$usercancancel = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $usercancreate) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'annuler'))); |
|
| 161 | +$usercansend = (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || $user->hasRight('commande', 'order_advance', 'send')); |
|
| 162 | +$usercangeneretedoc = (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || $user->hasRight('commande', 'order_advance', 'generetedoc')); |
|
| 163 | 163 | |
| 164 | 164 | $usermustrespectpricemin = ((getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && !$user->hasRight('produit', 'ignore_price_min_advance')) || !getDolGlobalString('MAIN_USE_ADVANCED_PERMS')); |
| 165 | 165 | $usercancreatepurchaseorder = ($user->hasRight('fournisseur', 'commande', 'creer') || $user->hasRight('supplier_order', 'creer')); |
| 166 | 166 | |
| 167 | -$permissionnote = $usercancreate; // Used by the include of actions_setnotes.inc.php |
|
| 168 | -$permissiondellink = $usercancreate; // Used by the include of actions_dellink.inc.php |
|
| 169 | -$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
| 167 | +$permissionnote = $usercancreate; // Used by the include of actions_setnotes.inc.php |
|
| 168 | +$permissiondellink = $usercancreate; // Used by the include of actions_dellink.inc.php |
|
| 169 | +$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
| 170 | 170 | $permissiontoeditextra = $usercancreate; |
| 171 | 171 | if (GETPOST('attribute', 'aZ09') && isset($extrafields->attributes[$object->table_element]['perms'][GETPOST('attribute', 'aZ09')])) { |
| 172 | 172 | // For action 'update_extras', is there a specific permission set for the attribute to update |
@@ -192,14 +192,14 @@ discard block |
||
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | if (empty($reshook)) { |
| 195 | - $backurlforlist = DOL_URL_ROOT . '/commande/list.php'; |
|
| 195 | + $backurlforlist = DOL_URL_ROOT.'/commande/list.php'; |
|
| 196 | 196 | |
| 197 | 197 | if (empty($backtopage) || ($cancel && empty($id))) { |
| 198 | 198 | if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) { |
| 199 | 199 | if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) { |
| 200 | 200 | $backtopage = $backurlforlist; |
| 201 | 201 | } else { |
| 202 | - $backtopage = DOL_URL_ROOT . '/commande/card.php?id=' . ((!empty($id) && $id > 0) ? $id : '__ID__'); |
|
| 202 | + $backtopage = DOL_URL_ROOT.'/commande/card.php?id='.((!empty($id) && $id > 0) ? $id : '__ID__'); |
|
| 203 | 203 | } |
| 204 | 204 | } |
| 205 | 205 | } |
@@ -208,20 +208,20 @@ discard block |
||
| 208 | 208 | |
| 209 | 209 | if ($cancel) { |
| 210 | 210 | if (!empty($backtopageforcancel)) { |
| 211 | - header("Location: " . $backtopageforcancel); |
|
| 211 | + header("Location: ".$backtopageforcancel); |
|
| 212 | 212 | exit; |
| 213 | 213 | } elseif (!empty($backtopage)) { |
| 214 | - header("Location: " . $backtopage); |
|
| 214 | + header("Location: ".$backtopage); |
|
| 215 | 215 | exit; |
| 216 | 216 | } |
| 217 | 217 | $action = ''; |
| 218 | 218 | } |
| 219 | 219 | |
| 220 | - include DOL_DOCUMENT_ROOT . '/core/actions_setnotes.inc.php'; // Must be 'include', not 'include_once' |
|
| 220 | + include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be 'include', not 'include_once' |
|
| 221 | 221 | |
| 222 | - include DOL_DOCUMENT_ROOT . '/core/actions_dellink.inc.php'; // Must be 'include', not 'include_once' |
|
| 222 | + include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be 'include', not 'include_once' |
|
| 223 | 223 | |
| 224 | - include DOL_DOCUMENT_ROOT . '/core/actions_lineupdown.inc.php'; // Must be 'include', not 'include_once' |
|
| 224 | + include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be 'include', not 'include_once' |
|
| 225 | 225 | |
| 226 | 226 | // Action clone object |
| 227 | 227 | if ($action == 'confirm_clone' && $confirm == 'yes' && $usercancreate) { |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | setEventMessages('', $warningMsgLineList, 'warnings'); |
| 251 | 251 | } |
| 252 | 252 | |
| 253 | - header("Location: " . $_SERVER['PHP_SELF'] . '?id=' . $result); |
|
| 253 | + header("Location: ".$_SERVER['PHP_SELF'].'?id='.$result); |
|
| 254 | 254 | exit; |
| 255 | 255 | } else { |
| 256 | 256 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); |
| 310 | 310 | } |
| 311 | 311 | |
| 312 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
| 312 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
| 313 | 313 | exit; |
| 314 | 314 | } else { |
| 315 | 315 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -337,7 +337,7 @@ discard block |
||
| 337 | 337 | $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); |
| 338 | 338 | } |
| 339 | 339 | |
| 340 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); |
|
| 340 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); |
|
| 341 | 341 | exit; |
| 342 | 342 | } else { |
| 343 | 343 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -435,13 +435,13 @@ discard block |
||
| 435 | 435 | $object_id = $object->create($user); |
| 436 | 436 | |
| 437 | 437 | if ($object_id > 0) { |
| 438 | - dol_include_once('/' . $element . '/class/' . $subelement . '.class.php'); |
|
| 438 | + dol_include_once('/'.$element.'/class/'.$subelement.'.class.php'); |
|
| 439 | 439 | |
| 440 | 440 | $classname = ucfirst($subelement); |
| 441 | 441 | $srcobject = new $classname($db); |
| 442 | 442 | '@phan-var-force Commande|Propal|Contrat $srcobject'; |
| 443 | 443 | |
| 444 | - dol_syslog("Try to find source object origin=" . $object->origin . " originid=" . $object->origin_id . " to add lines"); |
|
| 444 | + dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add lines"); |
|
| 445 | 445 | $result = $srcobject->fetch($object->origin_id); |
| 446 | 446 | if ($result > 0) { |
| 447 | 447 | $lines = $srcobject->lines; |
@@ -492,7 +492,7 @@ discard block |
||
| 492 | 492 | |
| 493 | 493 | $tva_tx = $lines[$i]->tva_tx; |
| 494 | 494 | if (!empty($lines[$i]->vat_src_code) && !preg_match('/\(/', $tva_tx)) { |
| 495 | - $tva_tx .= ' (' . $lines[$i]->vat_src_code . ')'; |
|
| 495 | + $tva_tx .= ' ('.$lines[$i]->vat_src_code.')'; |
|
| 496 | 496 | } |
| 497 | 497 | |
| 498 | 498 | $result = $object->addline( |
@@ -620,7 +620,7 @@ discard block |
||
| 620 | 620 | // End of object creation, we show it |
| 621 | 621 | if ($object_id > 0 && !$error) { |
| 622 | 622 | $db->commit(); |
| 623 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object_id); |
|
| 623 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object_id); |
|
| 624 | 624 | exit(); |
| 625 | 625 | } else { |
| 626 | 626 | $db->rollback(); |
@@ -796,7 +796,7 @@ discard block |
||
| 796 | 796 | } |
| 797 | 797 | $tvatx = $line->tva_tx; |
| 798 | 798 | if (!empty($line->vat_src_code)) { |
| 799 | - $tvatx .= ' (' . $line->vat_src_code . ')'; |
|
| 799 | + $tvatx .= ' ('.$line->vat_src_code.')'; |
|
| 800 | 800 | } |
| 801 | 801 | $result = $object->updateline($line->id, $line->desc, $line->subprice, $line->qty, (float) $remise_percent, $tvatx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->date_start, $line->date_end, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->fk_unit, $line->multicurrency_subprice); |
| 802 | 802 | } |
@@ -826,7 +826,7 @@ discard block |
||
| 826 | 826 | if ($prod->price_min > $line->subprice) { |
| 827 | 827 | $price_subprice = price($line->subprice, 0, $outlangs, 1, -1, -1, 'auto'); |
| 828 | 828 | $price_price_min = price($prod->price_min, 0, $outlangs, 1, -1, -1, 'auto'); |
| 829 | - setEventMessages($prod->ref . ' - ' . $prod->label . ' (' . $price_subprice . ' < ' . $price_price_min . ' ' . strtolower($langs->trans("MinPrice")) . ')' . "\n", null, 'warnings'); |
|
| 829 | + setEventMessages($prod->ref.' - '.$prod->label.' ('.$price_subprice.' < '.$price_price_min.' '.strtolower($langs->trans("MinPrice")).')'."\n", null, 'warnings'); |
|
| 830 | 830 | } else { |
| 831 | 831 | setEventMessages($prod->error, $prod->errors, 'errors'); |
| 832 | 832 | } |
@@ -901,7 +901,7 @@ discard block |
||
| 901 | 901 | } else { |
| 902 | 902 | setEventMessages($object->error, $object->errors, 'errors'); |
| 903 | 903 | } |
| 904 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id); |
|
| 904 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); |
|
| 905 | 905 | exit(); |
| 906 | 906 | } elseif ($action == 'confirm_addsubtotalline' && $usercancreate) { |
| 907 | 907 | // Handling adding a new subtotal line for subtotals module |
@@ -953,7 +953,7 @@ discard block |
||
| 953 | 953 | } else { |
| 954 | 954 | setEventMessages($object->error, $object->errors, 'errors'); |
| 955 | 955 | } |
| 956 | - header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id); |
|
| 956 | + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); |
|
| 957 | 957 | exit(); |
| 958 | 958 | } elseif ($action == 'addline' && !GETPOST('submitforalllines', 'alpha') && $usercancreate) { // Add a new line |
| 959 | 959 | $langs->load('errors'); |
@@ -970,7 +970,7 @@ discard block |
||
| 970 | 970 | $pu_ht = ''; |
| 971 | 971 | $pu_ttc = ''; |
| 972 | 972 | $pu_ht_devise = ''; |
| 973 | - $pu_ttc_devise = ''; |
|
| 973 | + $pu_ttc_devise = ''; |
|
| 974 | 974 | |
| 975 | 975 | if (GETPOST('price_ht') !== '') { |
| 976 | 976 | $price_ht = price2num(GETPOST('price_ht'), 'MU', 2); |
@@ -999,9 +999,9 @@ discard block |
||
| 999 | 999 | |
| 1000 | 1000 | $tva_tx = GETPOST('tva_tx', 'alpha'); |
| 1001 | 1001 | |
| 1002 | - $qty = price2num(GETPOST('qty' . $predef, 'alpha'), 'MS', 2); |
|
| 1002 | + $qty = price2num(GETPOST('qty'.$predef, 'alpha'), 'MS', 2); |
|
| 1003 | 1003 | |
| 1004 | - $remise_percent = (GETPOSTISSET('remise_percent' . $predef) ? price2num(GETPOST('remise_percent' . $predef, 'alpha'), '', 2) : 0); |
|
| 1004 | + $remise_percent = (GETPOSTISSET('remise_percent'.$predef) ? price2num(GETPOST('remise_percent'.$predef, 'alpha'), '', 2) : 0); |
|
| 1005 | 1005 | if (empty($remise_percent)) { |
| 1006 | 1006 | $remise_percent = 0; |
| 1007 | 1007 | } |
@@ -1013,7 +1013,7 @@ discard block |
||
| 1013 | 1013 | if (is_array($extralabelsline)) { |
| 1014 | 1014 | // Get extra fields |
| 1015 | 1015 | foreach ($extralabelsline as $key => $value) { |
| 1016 | - unset($_POST["options_" . $key]); |
|
| 1016 | + unset($_POST["options_".$key]); |
|
| 1017 | 1017 | } |
| 1018 | 1018 | } |
| 1019 | 1019 | |
@@ -1058,8 +1058,8 @@ discard block |
||
| 1058 | 1058 | |
| 1059 | 1059 | if (!$error && ($qty >= 0) && (!empty($line_desc) || (!empty($idprod) && $idprod > 0))) { |
| 1060 | 1060 | // Clean parameters |
| 1061 | - $date_start = dol_mktime(GETPOSTINT('date_start' . $predef . 'hour'), GETPOSTINT('date_start' . $predef . 'min'), GETPOSTINT('date_start' . $predef . 'sec'), GETPOSTINT('date_start' . $predef . 'month'), GETPOSTINT('date_start' . $predef . 'day'), GETPOSTINT('date_start' . $predef . 'year')); |
|
| 1062 | - $date_end = dol_mktime(GETPOSTINT('date_end' . $predef . 'hour'), GETPOSTINT('date_end' . $predef . 'min'), GETPOSTINT('date_end' . $predef . 'sec'), GETPOSTINT('date_end' . $predef . 'month'), GETPOSTINT('date_end' . $predef . 'day'), GETPOSTINT('date_end' . $predef . 'year')); |
|
| 1061 | + $date_start = dol_mktime(GETPOSTINT('date_start'.$predef.'hour'), GETPOSTINT('date_start'.$predef.'min'), GETPOSTINT('date_start'.$predef.'sec'), GETPOSTINT('date_start'.$predef.'month'), GETPOSTINT('date_start'.$predef.'day'), GETPOSTINT('date_start'.$predef.'year')); |
|
| 1062 | + $date_end = dol_mktime(GETPOSTINT('date_end'.$predef.'hour'), GETPOSTINT('date_end'.$predef.'min'), GETPOSTINT('date_end'.$predef.'sec'), GETPOSTINT('date_end'.$predef.'month'), GETPOSTINT('date_end'.$predef.'day'), GETPOSTINT('date_end'.$predef.'year')); |
|
| 1063 | 1063 | $price_base_type = (GETPOST('price_base_type', 'alpha') ? GETPOST('price_base_type', 'alpha') : 'HT'); |
| 1064 | 1064 | |
| 1065 | 1065 | $price_min = $price_min_ttc = 0; |
@@ -1089,7 +1089,7 @@ discard block |
||
| 1089 | 1089 | |
| 1090 | 1090 | if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) { |
| 1091 | 1091 | // If price per customer |
| 1092 | - require_once DOL_DOCUMENT_ROOT . '/product/class/productcustomerprice.class.php'; |
|
| 1092 | + require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php'; |
|
| 1093 | 1093 | |
| 1094 | 1094 | $prodcustprice = new ProductCustomerPrice($db); |
| 1095 | 1095 | |
@@ -1111,7 +1111,7 @@ discard block |
||
| 1111 | 1111 | $price_base_type = $custprice_line->price_base_type; |
| 1112 | 1112 | $tva_tx = $custprice_line->tva_tx; |
| 1113 | 1113 | if ($custprice_line->default_vat_code && !preg_match('/\(.*\)/', (string) $tva_tx)) { |
| 1114 | - $tva_tx .= ' (' . $custprice_line->default_vat_code . ')'; |
|
| 1114 | + $tva_tx .= ' ('.$custprice_line->default_vat_code.')'; |
|
| 1115 | 1115 | } |
| 1116 | 1116 | $tva_npr = $custprice_line->recuperableonly; |
| 1117 | 1117 | if (empty($tva_tx)) { |
@@ -1158,7 +1158,7 @@ discard block |
||
| 1158 | 1158 | } |
| 1159 | 1159 | } elseif (getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) { |
| 1160 | 1160 | // If price per customer |
| 1161 | - require_once DOL_DOCUMENT_ROOT . '/product/class/productcustomerprice.class.php'; |
|
| 1161 | + require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php'; |
|
| 1162 | 1162 | |
| 1163 | 1163 | $prodcustprice = new ProductCustomerPrice($db); |
| 1164 | 1164 | |
@@ -1177,7 +1177,7 @@ discard block |
||
| 1177 | 1177 | $price_base_type = $custprice_line->price_base_type; |
| 1178 | 1178 | $tva_tx = $custprice_line->tva_tx; |
| 1179 | 1179 | if ($custprice_line->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) { |
| 1180 | - $tva_tx .= ' (' . $custprice_line->default_vat_code . ')'; |
|
| 1180 | + $tva_tx .= ' ('.$custprice_line->default_vat_code.')'; |
|
| 1181 | 1181 | } |
| 1182 | 1182 | $tva_npr = $custprice_line->recuperableonly; |
| 1183 | 1183 | if (empty($tva_tx)) { |
@@ -1301,23 +1301,23 @@ discard block |
||
| 1301 | 1301 | $outputlangs->load('products'); |
| 1302 | 1302 | } |
| 1303 | 1303 | if (!empty($prod->customcode)) { |
| 1304 | - $tmptxt .= $outputlangs->transnoentitiesnoconv("CustomsCode") . ': ' . $prod->customcode; |
|
| 1304 | + $tmptxt .= $outputlangs->transnoentitiesnoconv("CustomsCode").': '.$prod->customcode; |
|
| 1305 | 1305 | } |
| 1306 | 1306 | if (!empty($prod->customcode) && !empty($prod->country_code)) { |
| 1307 | 1307 | $tmptxt .= ' - '; |
| 1308 | 1308 | } |
| 1309 | 1309 | if (!empty($prod->country_code)) { |
| 1310 | - $tmptxt .= $outputlangs->transnoentitiesnoconv("CountryOrigin") . ': ' . getCountry($prod->country_code, '', $db, $outputlangs, 0); |
|
| 1310 | + $tmptxt .= $outputlangs->transnoentitiesnoconv("CountryOrigin").': '.getCountry($prod->country_code, '', $db, $outputlangs, 0); |
|
| 1311 | 1311 | } |
| 1312 | 1312 | } else { |
| 1313 | 1313 | if (!empty($prod->customcode)) { |
| 1314 | - $tmptxt .= $langs->transnoentitiesnoconv("CustomsCode") . ': ' . $prod->customcode; |
|
| 1314 | + $tmptxt .= $langs->transnoentitiesnoconv("CustomsCode").': '.$prod->customcode; |
|
| 1315 | 1315 | } |
| 1316 | 1316 | if (!empty($prod->customcode) && !empty($prod->country_code)) { |
| 1317 | 1317 | $tmptxt .= ' - '; |
| 1318 | 1318 | } |
| 1319 | 1319 | if (!empty($prod->country_code)) { |
| 1320 | - $tmptxt .= $langs->transnoentitiesnoconv("CountryOrigin") . ': ' . getCountry($prod->country_code, '', $db, $langs, 0); |
|
| 1320 | + $tmptxt .= $langs->transnoentitiesnoconv("CountryOrigin").': '.getCountry($prod->country_code, '', $db, $langs, 0); |
|
| 1321 | 1321 | } |
| 1322 | 1322 | } |
| 1323 | 1323 | $tmptxt .= ')'; |
@@ -1356,8 +1356,8 @@ discard block |
||
| 1356 | 1356 | $localtax2_tx = get_localtax($tva_tx, 2, $object->thirdparty); |
| 1357 | 1357 | |
| 1358 | 1358 | // Margin |
| 1359 | - $fournprice = (int) (GETPOST('fournprice' . $predef) ? GETPOSTINT('fournprice' . $predef) : 0); // This can be id of supplier price, or 'pmpprice' or 'costprice', or 'inputprice', we force to keep ID only |
|
| 1360 | - $buyingprice = price2num(GETPOST('buying_price' . $predef) != '' ? GETPOST('buying_price' . $predef) : ''); // If buying_price is '0', we must keep this value |
|
| 1359 | + $fournprice = (int) (GETPOST('fournprice'.$predef) ? GETPOSTINT('fournprice'.$predef) : 0); // This can be id of supplier price, or 'pmpprice' or 'costprice', or 'inputprice', we force to keep ID only |
|
| 1360 | + $buyingprice = price2num(GETPOST('buying_price'.$predef) != '' ? GETPOST('buying_price'.$predef) : ''); // If buying_price is '0', we must keep this value |
|
| 1361 | 1361 | |
| 1362 | 1362 | // Prepare a price equivalent for minimum price check |
| 1363 | 1363 | $pu_equivalent = $pu_ht; |
@@ -1601,7 +1601,7 @@ discard block |
||
| 1601 | 1601 | */ |
| 1602 | 1602 | |
| 1603 | 1603 | // Add buying price |
| 1604 | - $fournprice = (int) (GETPOST('fournprice') ? GETPOST('fournprice') : ''); // This can be id of supplier price, or 'pmpprice' or 'costprice', or 'inputprice', we force to keep ID only |
|
| 1604 | + $fournprice = (int) (GETPOST('fournprice') ? GETPOST('fournprice') : ''); // This can be id of supplier price, or 'pmpprice' or 'costprice', or 'inputprice', we force to keep ID only |
|
| 1605 | 1605 | $buyingprice = price2num(GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''); // If buying_price is '0', we must keep this value |
| 1606 | 1606 | |
| 1607 | 1607 | // Extrafields Lines |
@@ -1610,7 +1610,7 @@ discard block |
||
| 1610 | 1610 | // Unset extrafield POST Data |
| 1611 | 1611 | if (is_array($extralabelsline)) { |
| 1612 | 1612 | foreach ($extralabelsline as $key => $value) { |
| 1613 | - unset($_POST["options_" . $key]); |
|
| 1613 | + unset($_POST["options_".$key]); |
|
| 1614 | 1614 | } |
| 1615 | 1615 | } |
| 1616 | 1616 | |
@@ -1753,7 +1753,7 @@ discard block |
||
| 1753 | 1753 | } |
| 1754 | 1754 | } |
| 1755 | 1755 | } elseif ($action == 'updateline' && $usercancreate && GETPOST('cancel', 'alpha')) { |
| 1756 | - header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // To re-display card in edit mode |
|
| 1756 | + header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); // To re-display card in edit mode |
|
| 1757 | 1757 | exit(); |
| 1758 | 1758 | } elseif ($action == 'confirm_validate' && $confirm == 'yes' && $usercanvalidate) { |
| 1759 | 1759 | $idwarehouse = GETPOSTINT('idwarehouse'); |
@@ -1790,7 +1790,7 @@ discard block |
||
| 1790 | 1790 | GETPOST('generate_deposit', 'alpha') == 'on' && !empty($deposit_percent_from_payment_terms) |
| 1791 | 1791 | && isModEnabled('invoice') && $user->hasRight('facture', 'creer') |
| 1792 | 1792 | ) { |
| 1793 | - require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
| 1793 | + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
| 1794 | 1794 | |
| 1795 | 1795 | $date = dol_mktime(0, 0, 0, GETPOSTINT('datefmonth'), GETPOSTINT('datefday'), GETPOSTINT('datefyear')); |
| 1796 | 1796 | $forceFields = array(); |
@@ -1803,7 +1803,7 @@ discard block |
||
| 1803 | 1803 | |
| 1804 | 1804 | if ($deposit) { |
| 1805 | 1805 | setEventMessage('DepositGenerated'); |
| 1806 | - $locationTarget = DOL_URL_ROOT . '/compta/facture/card.php?id=' . $deposit->id; |
|
| 1806 | + $locationTarget = DOL_URL_ROOT.'/compta/facture/card.php?id='.$deposit->id; |
|
| 1807 | 1807 | } else { |
| 1808 | 1808 | $error++; |
| 1809 | 1809 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -1811,7 +1811,7 @@ discard block |
||
| 1811 | 1811 | } |
| 1812 | 1812 | |
| 1813 | 1813 | // Define output language |
| 1814 | - if (! $error) { |
|
| 1814 | + if (!$error) { |
|
| 1815 | 1815 | $db->commit(); |
| 1816 | 1816 | |
| 1817 | 1817 | if (!getDolGlobalString('MAIN_DISABLE_PDF_AUTOUPDATE')) { |
@@ -1839,7 +1839,7 @@ discard block |
||
| 1839 | 1839 | } |
| 1840 | 1840 | |
| 1841 | 1841 | if ($locationTarget) { |
| 1842 | - header('Location: ' . $locationTarget); |
|
| 1842 | + header('Location: '.$locationTarget); |
|
| 1843 | 1843 | exit; |
| 1844 | 1844 | } |
| 1845 | 1845 | } else { |
@@ -1930,7 +1930,7 @@ discard block |
||
| 1930 | 1930 | } |
| 1931 | 1931 | |
| 1932 | 1932 | if ($action == 'update_extras' && $permissiontoeditextra) { |
| 1933 | - $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 1933 | + $object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty |
|
| 1934 | 1934 | |
| 1935 | 1935 | $attribute_name = GETPOST('attribute', 'aZ09'); |
| 1936 | 1936 | |
@@ -1966,13 +1966,13 @@ discard block |
||
| 1966 | 1966 | |
| 1967 | 1967 | if (!empty($importLines) && is_array($importLines) && !empty($fromElement) && ctype_alpha($fromElement) && !empty($fromElementid)) { |
| 1968 | 1968 | if ($fromElement == 'commande') { |
| 1969 | - dol_include_once('/' . $fromElement . '/class/' . $fromElement . '.class.php'); |
|
| 1969 | + dol_include_once('/'.$fromElement.'/class/'.$fromElement.'.class.php'); |
|
| 1970 | 1970 | $lineClassName = 'OrderLine'; |
| 1971 | 1971 | } elseif ($fromElement == 'propal') { |
| 1972 | - dol_include_once('/comm/' . $fromElement . '/class/' . $fromElement . '.class.php'); |
|
| 1972 | + dol_include_once('/comm/'.$fromElement.'/class/'.$fromElement.'.class.php'); |
|
| 1973 | 1973 | $lineClassName = 'PropaleLigne'; |
| 1974 | 1974 | } elseif ($fromElement == 'facture') { |
| 1975 | - dol_include_once('/compta/' . $fromElement . '/class/' . $fromElement . '.class.php'); |
|
| 1975 | + dol_include_once('/compta/'.$fromElement.'/class/'.$fromElement.'.class.php'); |
|
| 1976 | 1976 | $lineClassName = 'FactureLigne'; |
| 1977 | 1977 | } |
| 1978 | 1978 | $nextRang = count($object->lines) + 1; |
@@ -2032,19 +2032,19 @@ discard block |
||
| 2032 | 2032 | } |
| 2033 | 2033 | |
| 2034 | 2034 | // Actions when printing a doc from card |
| 2035 | - include DOL_DOCUMENT_ROOT . '/core/actions_printing.inc.php'; |
|
| 2035 | + include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; |
|
| 2036 | 2036 | |
| 2037 | 2037 | // Actions to build doc |
| 2038 | 2038 | $upload_dir = !empty($conf->commande->multidir_output[$object->entity ?? $conf->entity]) ? $conf->commande->multidir_output[$object->entity ?? $conf->entity] : $conf->commande->dir_output; |
| 2039 | 2039 | $permissiontoadd = $usercancreate; |
| 2040 | - include DOL_DOCUMENT_ROOT . '/core/actions_builddoc.inc.php'; |
|
| 2040 | + include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; |
|
| 2041 | 2041 | |
| 2042 | 2042 | // Actions to send emails |
| 2043 | 2043 | $triggersendname = 'ORDER_SENTBYMAIL'; |
| 2044 | 2044 | $paramname = 'id'; |
| 2045 | 2045 | $autocopy = 'MAIN_MAIL_AUTOCOPY_ORDER_TO'; // used to know the automatic BCC to add |
| 2046 | - $trackid = 'ord' . $object->id; |
|
| 2047 | - include DOL_DOCUMENT_ROOT . '/core/actions_sendmails.inc.php'; |
|
| 2046 | + $trackid = 'ord'.$object->id; |
|
| 2047 | + include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; |
|
| 2048 | 2048 | |
| 2049 | 2049 | |
| 2050 | 2050 | if (!$error && getDolGlobalString('MAIN_DISABLE_CONTACTS_TAB') && $usercancreate) { |
@@ -2056,7 +2056,7 @@ discard block |
||
| 2056 | 2056 | } |
| 2057 | 2057 | |
| 2058 | 2058 | if ($result >= 0) { |
| 2059 | - header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id); |
|
| 2059 | + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); |
|
| 2060 | 2060 | exit(); |
| 2061 | 2061 | } else { |
| 2062 | 2062 | if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { |
@@ -2078,7 +2078,7 @@ discard block |
||
| 2078 | 2078 | $result = $object->delete_contact($lineid); |
| 2079 | 2079 | |
| 2080 | 2080 | if ($result >= 0) { |
| 2081 | - header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id); |
|
| 2081 | + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); |
|
| 2082 | 2082 | exit(); |
| 2083 | 2083 | } else { |
| 2084 | 2084 | dol_print_error($db); |
@@ -2092,7 +2092,7 @@ discard block |
||
| 2092 | 2092 | * View |
| 2093 | 2093 | */ |
| 2094 | 2094 | |
| 2095 | -$title = $object->ref . " - " . $langs->trans('Card'); |
|
| 2095 | +$title = $object->ref." - ".$langs->trans('Card'); |
|
| 2096 | 2096 | if ($action == 'create') { |
| 2097 | 2097 | $title = $langs->trans("NewOrder"); |
| 2098 | 2098 | } |
@@ -2165,11 +2165,11 @@ discard block |
||
| 2165 | 2165 | $element = $subelement = 'contrat'; |
| 2166 | 2166 | } |
| 2167 | 2167 | |
| 2168 | - dol_include_once('/' . $element . '/class/' . $subelement . '.class.php'); |
|
| 2168 | + dol_include_once('/'.$element.'/class/'.$subelement.'.class.php'); |
|
| 2169 | 2169 | |
| 2170 | 2170 | $classname = ucfirst($subelement); |
| 2171 | 2171 | $objectsrc = new $classname($db); |
| 2172 | - '@phan-var-force Commande|Propal|Contrat $objectsrc'; // Can possibly be other class but CommonObject is too general |
|
| 2172 | + '@phan-var-force Commande|Propal|Contrat $objectsrc'; // Can possibly be other class but CommonObject is too general |
|
| 2173 | 2173 | $objectsrc->fetch($originid); |
| 2174 | 2174 | if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines')) { |
| 2175 | 2175 | $objectsrc->fetch_lines(); |
@@ -2263,16 +2263,16 @@ discard block |
||
| 2263 | 2263 | } |
| 2264 | 2264 | } |
| 2265 | 2265 | |
| 2266 | - print '<form name="crea_commande" action="' . $_SERVER["PHP_SELF"] . '" method="POST">'; |
|
| 2267 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 2266 | + print '<form name="crea_commande" action="'.$_SERVER["PHP_SELF"].'" method="POST">'; |
|
| 2267 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 2268 | 2268 | print '<input type="hidden" name="action" value="add">'; |
| 2269 | - print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change |
|
| 2270 | - print '<input type="hidden" name="remise_percent" value="' . $soc->remise_percent . '">'; |
|
| 2271 | - print '<input type="hidden" name="origin" value="' . $origin . '">'; |
|
| 2272 | - print '<input type="hidden" name="originid" value="' . $originid . '">'; |
|
| 2273 | - print '<input type="hidden" name="backtopage" value="' . $backtopage . '">'; |
|
| 2269 | + print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change |
|
| 2270 | + print '<input type="hidden" name="remise_percent" value="'.$soc->remise_percent.'">'; |
|
| 2271 | + print '<input type="hidden" name="origin" value="'.$origin.'">'; |
|
| 2272 | + print '<input type="hidden" name="originid" value="'.$originid.'">'; |
|
| 2273 | + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; |
|
| 2274 | 2274 | if (!empty($currency_tx)) { |
| 2275 | - print '<input type="hidden" name="originmulticurrency_tx" value="' . $currency_tx . '">'; |
|
| 2275 | + print '<input type="hidden" name="originmulticurrency_tx" value="'.$currency_tx.'">'; |
|
| 2276 | 2276 | } |
| 2277 | 2277 | |
| 2278 | 2278 | print dol_get_fiche_head([]); |
@@ -2285,29 +2285,29 @@ discard block |
||
| 2285 | 2285 | print '<table class="border centpercent">'; |
| 2286 | 2286 | |
| 2287 | 2287 | // Reference |
| 2288 | - print '<tr><td class="titlefieldcreate fieldrequired">' . $langs->trans('Ref') . '</td><td>' . $langs->trans("Draft") . '</td></tr>'; |
|
| 2288 | + print '<tr><td class="titlefieldcreate fieldrequired">'.$langs->trans('Ref').'</td><td>'.$langs->trans("Draft").'</td></tr>'; |
|
| 2289 | 2289 | |
| 2290 | 2290 | // Reference client |
| 2291 | - print '<tr><td>' . $langs->trans('RefCustomer') . '</td><td>'; |
|
| 2291 | + print '<tr><td>'.$langs->trans('RefCustomer').'</td><td>'; |
|
| 2292 | 2292 | if (getDolGlobalString('MAIN_USE_PROPAL_REFCLIENT_FOR_ORDER') && !empty($origin) && !empty($originid)) { |
| 2293 | - print '<input type="text" name="ref_client" value="' . $ref_client . '"></td>'; |
|
| 2293 | + print '<input type="text" name="ref_client" value="'.$ref_client.'"></td>'; |
|
| 2294 | 2294 | } else { |
| 2295 | - print '<input type="text" name="ref_client" value="' . GETPOST('ref_client') . '"></td>'; |
|
| 2295 | + print '<input type="text" name="ref_client" value="'.GETPOST('ref_client').'"></td>'; |
|
| 2296 | 2296 | } |
| 2297 | 2297 | print '</tr>'; |
| 2298 | 2298 | |
| 2299 | 2299 | // Thirdparty |
| 2300 | 2300 | print '<tr>'; |
| 2301 | - print '<td class="fieldrequired">' . $langs->trans('Customer') . '</td>'; |
|
| 2301 | + print '<td class="fieldrequired">'.$langs->trans('Customer').'</td>'; |
|
| 2302 | 2302 | if ($socid > 0) { |
| 2303 | 2303 | print '<td>'; |
| 2304 | 2304 | print $soc->getNomUrl(1, 'customer'); |
| 2305 | - print '<input type="hidden" name="socid" value="' . $soc->id . '">'; |
|
| 2305 | + print '<input type="hidden" name="socid" value="'.$soc->id.'">'; |
|
| 2306 | 2306 | print '</td>'; |
| 2307 | 2307 | } else { |
| 2308 | 2308 | print '<td class="valuefieldcreate">'; |
| 2309 | 2309 | $filter = '((s.client:IN:1,2,3) AND (s.status:=:1))'; |
| 2310 | - print img_picto('', 'company', 'class="pictofixedwidth"') . $form->select_company('', 'socid', $filter, 'SelectThirdParty', 1, 0, array(), 0, 'minwidth175 maxwidth500 widthcentpercentminusxx'); |
|
| 2310 | + print img_picto('', 'company', 'class="pictofixedwidth"').$form->select_company('', 'socid', $filter, 'SelectThirdParty', 1, 0, array(), 0, 'minwidth175 maxwidth500 widthcentpercentminusxx'); |
|
| 2311 | 2311 | // reload page to retrieve customer information |
| 2312 | 2312 | if (!getDolGlobalString('RELOAD_PAGE_ON_CUSTOMER_CHANGE_DISABLED')) { |
| 2313 | 2313 | print '<script> |
@@ -2323,17 +2323,17 @@ discard block |
||
| 2323 | 2323 | }); |
| 2324 | 2324 | </script>'; |
| 2325 | 2325 | } |
| 2326 | - print ' <a href="' . DOL_URL_ROOT . '/societe/card.php?action=create&customer=3&fournisseur=0&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?action=create') . '"><span class="fa fa-plus-circle valignmiddle paddingleft" title="' . $langs->trans("AddThirdParty") . '"></span></a>'; |
|
| 2326 | + print ' <a href="'.DOL_URL_ROOT.'/societe/card.php?action=create&customer=3&fournisseur=0&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create').'"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddThirdParty").'"></span></a>'; |
|
| 2327 | 2327 | print '</td>'; |
| 2328 | 2328 | } |
| 2329 | - print '</tr>' . "\n"; |
|
| 2329 | + print '</tr>'."\n"; |
|
| 2330 | 2330 | |
| 2331 | 2331 | // Contact of order |
| 2332 | 2332 | if ($socid > 0) { |
| 2333 | 2333 | // Contacts (ask contact only if thirdparty already defined). |
| 2334 | 2334 | // print "<tr><td>".$langs->trans("DefaultContact").'</td><td>'; |
| 2335 | 2335 | print "<tr><td>"; |
| 2336 | - print $form->textwithpicto($langs->trans("DefaultContact"), $langs->trans("TypeContact_commande_external_" . $type_contact_code)); |
|
| 2336 | + print $form->textwithpicto($langs->trans("DefaultContact"), $langs->trans("TypeContact_commande_external_".$type_contact_code)); |
|
| 2337 | 2337 | print '</td><td>'; |
| 2338 | 2338 | print img_picto('', 'contact', 'class="pictofixedwidth"'); |
| 2339 | 2339 | //print $form->selectcontacts($soc->id, $contactid, 'contactid', 1, empty($srccontactslist) ? "" : $srccontactslist, '', 1, 'maxwidth300 widthcentpercentminusx'); |
@@ -2341,26 +2341,26 @@ discard block |
||
| 2341 | 2341 | print '</td></tr>'; |
| 2342 | 2342 | |
| 2343 | 2343 | // Ligne info remises tiers |
| 2344 | - print '<tr><td>' . $langs->trans('Discounts') . '</td><td>'; |
|
| 2344 | + print '<tr><td>'.$langs->trans('Discounts').'</td><td>'; |
|
| 2345 | 2345 | |
| 2346 | 2346 | $absolute_discount = $soc->getAvailableDiscounts(); |
| 2347 | 2347 | |
| 2348 | 2348 | $thirdparty = $soc; |
| 2349 | 2349 | $discount_type = 0; |
| 2350 | - $backtopage = $_SERVER["PHP_SELF"] . '?socid=' . $thirdparty->id . '&action=' . $action . '&origin=' . urlencode((string) (GETPOST('origin'))) . '&originid=' . urlencode((string) (GETPOSTINT('originid'))); |
|
| 2351 | - include DOL_DOCUMENT_ROOT . '/core/tpl/object_discounts.tpl.php'; |
|
| 2350 | + $backtopage = $_SERVER["PHP_SELF"].'?socid='.$thirdparty->id.'&action='.$action.'&origin='.urlencode((string) (GETPOST('origin'))).'&originid='.urlencode((string) (GETPOSTINT('originid'))); |
|
| 2351 | + include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php'; |
|
| 2352 | 2352 | |
| 2353 | 2353 | print '</td></tr>'; |
| 2354 | 2354 | } |
| 2355 | 2355 | |
| 2356 | 2356 | // Date |
| 2357 | - print '<tr><td class="fieldrequired">' . $langs->trans('Date') . '</td><td>'; |
|
| 2357 | + print '<tr><td class="fieldrequired">'.$langs->trans('Date').'</td><td>'; |
|
| 2358 | 2358 | print img_picto('', 'action', 'class="pictofixedwidth"'); |
| 2359 | 2359 | print $form->selectDate('', 're', 0, 0, 0, "crea_commande", 1, 1); // Always autofill date with current date |
| 2360 | 2360 | print '</td></tr>'; |
| 2361 | 2361 | |
| 2362 | 2362 | // Date delivery planned |
| 2363 | - print '<tr><td>' . $langs->trans("DateDeliveryPlanned") . '</td>'; |
|
| 2363 | + print '<tr><td>'.$langs->trans("DateDeliveryPlanned").'</td>'; |
|
| 2364 | 2364 | print '<td colspan="3">'; |
| 2365 | 2365 | $date_delivery = ($date_delivery ? $date_delivery : $object->delivery_date); |
| 2366 | 2366 | print img_picto('', 'action', 'class="pictofixedwidth"'); |
@@ -2369,33 +2369,33 @@ discard block |
||
| 2369 | 2369 | print '</tr>'; |
| 2370 | 2370 | |
| 2371 | 2371 | // Delivery delay |
| 2372 | - print '<tr class="fielddeliverydelay"><td>' . $langs->trans('AvailabilityPeriod') . '</td><td>'; |
|
| 2372 | + print '<tr class="fielddeliverydelay"><td>'.$langs->trans('AvailabilityPeriod').'</td><td>'; |
|
| 2373 | 2373 | print img_picto('', 'clock', 'class="pictofixedwidth"'); |
| 2374 | 2374 | $form->selectAvailabilityDelay((GETPOSTISSET('availability_id') ? GETPOST('availability_id') : $availability_id), 'availability_id', '', 1, 'maxwidth200 widthcentpercentminusx'); |
| 2375 | 2375 | print '</td></tr>'; |
| 2376 | 2376 | |
| 2377 | 2377 | // Terms of payment |
| 2378 | - print '<tr><td class="nowrap">' . $langs->trans('PaymentConditionsShort') . '</td><td>'; |
|
| 2378 | + print '<tr><td class="nowrap">'.$langs->trans('PaymentConditionsShort').'</td><td>'; |
|
| 2379 | 2379 | print img_picto('', 'payment', 'class="pictofixedwidth"'); |
| 2380 | 2380 | print $form->getSelectConditionsPaiements((int) $cond_reglement_id, 'cond_reglement_id', 1, 1, 0, 'maxwidth200 widthcentpercentminusx', (float) $deposit_percent); |
| 2381 | 2381 | print '</td></tr>'; |
| 2382 | 2382 | |
| 2383 | 2383 | // Payment mode |
| 2384 | - print '<tr><td>' . $langs->trans('PaymentMode') . '</td><td>'; |
|
| 2384 | + print '<tr><td>'.$langs->trans('PaymentMode').'</td><td>'; |
|
| 2385 | 2385 | print img_picto('', 'bank', 'class="pictofixedwidth"'); |
| 2386 | 2386 | print $form->select_types_paiements((string) $mode_reglement_id, 'mode_reglement_id', 'CRDT', 0, 1, 0, 0, 1, 'maxwidth200 widthcentpercentminusx', 1); |
| 2387 | 2387 | print '</td></tr>'; |
| 2388 | 2388 | |
| 2389 | 2389 | // Bank Account |
| 2390 | 2390 | if (getDolGlobalString('BANK_ASK_PAYMENT_BANK_DURING_ORDER') && isModEnabled("bank")) { |
| 2391 | - print '<tr><td>' . $langs->trans('BankAccount') . '</td><td>'; |
|
| 2392 | - print img_picto('', 'bank_account', 'class="pictofixedwidth"') . $form->select_comptes($fk_account, 'fk_account', 0, '', 1, '', 0, 'maxwidth200 widthcentpercentminusx', 1); |
|
| 2391 | + print '<tr><td>'.$langs->trans('BankAccount').'</td><td>'; |
|
| 2392 | + print img_picto('', 'bank_account', 'class="pictofixedwidth"').$form->select_comptes($fk_account, 'fk_account', 0, '', 1, '', 0, 'maxwidth200 widthcentpercentminusx', 1); |
|
| 2393 | 2393 | print '</td></tr>'; |
| 2394 | 2394 | } |
| 2395 | 2395 | |
| 2396 | 2396 | // Shipping Method |
| 2397 | 2397 | if (isModEnabled('shipping')) { |
| 2398 | - print '<tr><td>' . $langs->trans('SendingMethod') . '</td><td>'; |
|
| 2398 | + print '<tr><td>'.$langs->trans('SendingMethod').'</td><td>'; |
|
| 2399 | 2399 | print img_picto('', 'object_dolly', 'class="pictofixedwidth"'); |
| 2400 | 2400 | $form->selectShippingMethod(((GETPOSTISSET('shipping_method_id') && GETPOSTINT('shipping_method_id') != 0) ? GETPOST('shipping_method_id') : $shipping_method_id), 'shipping_method_id', '', 1, '', 0, 'maxwidth200 widthcentpercentminusx'); |
| 2401 | 2401 | print '</td></tr>'; |
@@ -2403,15 +2403,15 @@ discard block |
||
| 2403 | 2403 | |
| 2404 | 2404 | // Warehouse |
| 2405 | 2405 | if (isModEnabled('stock') && getDolGlobalString('WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER')) { |
| 2406 | - require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php'; |
|
| 2406 | + require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; |
|
| 2407 | 2407 | $formproduct = new FormProduct($db); |
| 2408 | - print '<tr><td>' . $langs->trans('Warehouse') . '</td><td>'; |
|
| 2409 | - print img_picto('', 'stock', 'class="pictofixedwidth"') . $formproduct->selectWarehouses((GETPOSTISSET('warehouse_id') ? GETPOST('warehouse_id') : $warehouse_id), 'warehouse_id', '', 1, 0, 0, '', 0, 0, array(), 'maxwidth500 widthcentpercentminusxx'); |
|
| 2408 | + print '<tr><td>'.$langs->trans('Warehouse').'</td><td>'; |
|
| 2409 | + print img_picto('', 'stock', 'class="pictofixedwidth"').$formproduct->selectWarehouses((GETPOSTISSET('warehouse_id') ? GETPOST('warehouse_id') : $warehouse_id), 'warehouse_id', '', 1, 0, 0, '', 0, 0, array(), 'maxwidth500 widthcentpercentminusxx'); |
|
| 2410 | 2410 | print '</td></tr>'; |
| 2411 | 2411 | } |
| 2412 | 2412 | |
| 2413 | 2413 | // Source / Channel - What trigger creation |
| 2414 | - print '<tr><td>' . $langs->trans('Source') . '</td><td>'; |
|
| 2414 | + print '<tr><td>'.$langs->trans('Source').'</td><td>'; |
|
| 2415 | 2415 | print img_picto('', 'question', 'class="pictofixedwidth"'); |
| 2416 | 2416 | $form->selectInputReason((GETPOSTISSET('demand_reason_id') ? GETPOST('demand_reason_id') : $demand_reason_id), 'demand_reason_id', '', 1, 'maxwidth200 widthcentpercentminusx'); |
| 2417 | 2417 | print '</td></tr>'; |
@@ -2422,9 +2422,9 @@ discard block |
||
| 2422 | 2422 | if (isModEnabled('project')) { |
| 2423 | 2423 | $langs->load("projects"); |
| 2424 | 2424 | print '<tr>'; |
| 2425 | - print '<td>' . $langs->trans("Project") . '</td><td>'; |
|
| 2426 | - print img_picto('', 'project', 'class="pictofixedwidth"') . $formproject->select_projects(($soc->id > 0 ? $soc->id : -1), (GETPOSTISSET('projectid') ? GETPOST('projectid') : $projectid), 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500 widthcentpercentminusxx'); |
|
| 2427 | - print ' <a href="' . DOL_URL_ROOT . '/projet/card.php?socid=' . $soc->id . '&action=create&status=1&backtopage=' . urlencode($_SERVER["PHP_SELF"] . '?action=create&socid=' . $soc->id) . '"><span class="fa fa-plus-circle valignmiddle" title="' . $langs->trans("AddProject") . '"></span></a>'; |
|
| 2425 | + print '<td>'.$langs->trans("Project").'</td><td>'; |
|
| 2426 | + print img_picto('', 'project', 'class="pictofixedwidth"').$formproject->select_projects(($soc->id > 0 ? $soc->id : -1), (GETPOSTISSET('projectid') ? GETPOST('projectid') : $projectid), 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500 widthcentpercentminusxx'); |
|
| 2427 | + print ' <a href="'.DOL_URL_ROOT.'/projet/card.php?socid='.$soc->id.'&action=create&status=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?action=create&socid='.$soc->id).'"><span class="fa fa-plus-circle valignmiddle" title="'.$langs->trans("AddProject").'"></span></a>'; |
|
| 2428 | 2428 | print '</td>'; |
| 2429 | 2429 | print '</tr>'; |
| 2430 | 2430 | } |
@@ -2432,7 +2432,7 @@ discard block |
||
| 2432 | 2432 | // Incoterms |
| 2433 | 2433 | if (isModEnabled('incoterm')) { |
| 2434 | 2434 | print '<tr>'; |
| 2435 | - print '<td><label for="incoterm_id">' . $form->textwithpicto($langs->trans("IncotermLabel"), !empty($objectsrc->fk_incoterms) ? (string) $objectsrc->fk_incoterms : (string) $soc->fk_incoterms, 1) . '</label></td>'; |
|
| 2435 | + print '<td><label for="incoterm_id">'.$form->textwithpicto($langs->trans("IncotermLabel"), !empty($objectsrc->fk_incoterms) ? (string) $objectsrc->fk_incoterms : (string) $soc->fk_incoterms, 1).'</label></td>'; |
|
| 2436 | 2436 | print '<td class="maxwidthonsmartphone">'; |
| 2437 | 2437 | $incoterm_id = GETPOST('incoterm_id'); |
| 2438 | 2438 | $location_incoterms = GETPOST('location_incoterms'); |
@@ -2448,7 +2448,7 @@ discard block |
||
| 2448 | 2448 | // Other attributes |
| 2449 | 2449 | $parameters = array(); |
| 2450 | 2450 | if (!empty($origin) && !empty($originid) && is_object($objectsrc)) { |
| 2451 | - $parameters['objectsrc'] = $objectsrc; |
|
| 2451 | + $parameters['objectsrc'] = $objectsrc; |
|
| 2452 | 2452 | } |
| 2453 | 2453 | $parameters['socid'] = $socid; |
| 2454 | 2454 | |
@@ -2469,9 +2469,9 @@ discard block |
||
| 2469 | 2469 | } |
| 2470 | 2470 | |
| 2471 | 2471 | // Template to use by default |
| 2472 | - print '<tr><td>' . $langs->trans('DefaultModel') . '</td>'; |
|
| 2472 | + print '<tr><td>'.$langs->trans('DefaultModel').'</td>'; |
|
| 2473 | 2473 | print '<td>'; |
| 2474 | - include_once DOL_DOCUMENT_ROOT . '/core/modules/commande/modules_commande.php'; |
|
| 2474 | + include_once DOL_DOCUMENT_ROOT.'/core/modules/commande/modules_commande.php'; |
|
| 2475 | 2475 | $liste = ModelePDFCommandes::liste_modeles($db); |
| 2476 | 2476 | $preselected = getDolGlobalString('COMMANDE_ADDON_PDF'); |
| 2477 | 2477 | print img_picto('', 'pdf', 'class="pictofixedwidth"'); |
@@ -2481,22 +2481,22 @@ discard block |
||
| 2481 | 2481 | // Multicurrency |
| 2482 | 2482 | if (isModEnabled("multicurrency")) { |
| 2483 | 2483 | print '<tr>'; |
| 2484 | - print '<td>' . $form->editfieldkey("Currency", 'multicurrency_code', '', $object, 0) . '</td>'; |
|
| 2484 | + print '<td>'.$form->editfieldkey("Currency", 'multicurrency_code', '', $object, 0).'</td>'; |
|
| 2485 | 2485 | print '<td class="maxwidthonsmartphone">'; |
| 2486 | - print img_picto('', 'currency', 'class="pictofixedwidth"') . $form->selectMultiCurrency(((GETPOSTISSET('multicurrency_code') && !GETPOST('changecompany')) ? GETPOST('multicurrency_code') : $currency_code), 'multicurrency_code', 0, '', false, 'maxwidth200 widthcentpercentminusx'); |
|
| 2486 | + print img_picto('', 'currency', 'class="pictofixedwidth"').$form->selectMultiCurrency(((GETPOSTISSET('multicurrency_code') && !GETPOST('changecompany')) ? GETPOST('multicurrency_code') : $currency_code), 'multicurrency_code', 0, '', false, 'maxwidth200 widthcentpercentminusx'); |
|
| 2487 | 2487 | print '</td></tr>'; |
| 2488 | 2488 | } |
| 2489 | 2489 | |
| 2490 | 2490 | // Categories |
| 2491 | 2491 | if (!empty($conf->categorie->enabled)) { |
| 2492 | - print '<tr><td>' . $langs->trans("Categories") . '</td><td colspan="3">'; |
|
| 2492 | + print '<tr><td>'.$langs->trans("Categories").'</td><td colspan="3">'; |
|
| 2493 | 2493 | print $form->selectCategories(Categorie::TYPE_ORDER, 'categories', $object); |
| 2494 | 2494 | print "</td></tr>"; |
| 2495 | 2495 | } |
| 2496 | 2496 | |
| 2497 | 2497 | // Note public |
| 2498 | 2498 | print '<tr>'; |
| 2499 | - print '<td class="tdtop">' . $langs->trans('NotePublic') . '</td>'; |
|
| 2499 | + print '<td class="tdtop">'.$langs->trans('NotePublic').'</td>'; |
|
| 2500 | 2500 | print '<td>'; |
| 2501 | 2501 | |
| 2502 | 2502 | $doleditor = new DolEditor('note_public', (string) $note_public, '', 80, 'dolibarr_notes', 'In', false, false, !getDolGlobalString('FCKEDITOR_ENABLE_NOTE_PUBLIC') ? 0 : 1, ROWS_3, '90%'); |
@@ -2507,7 +2507,7 @@ discard block |
||
| 2507 | 2507 | // Note private |
| 2508 | 2508 | if (empty($user->socid)) { |
| 2509 | 2509 | print '<tr>'; |
| 2510 | - print '<td class="tdtop">' . $langs->trans('NotePrivate') . '</td>'; |
|
| 2510 | + print '<td class="tdtop">'.$langs->trans('NotePrivate').'</td>'; |
|
| 2511 | 2511 | print '<td>'; |
| 2512 | 2512 | |
| 2513 | 2513 | $doleditor = new DolEditor('note_private', (string) $note_private, '', 80, 'dolibarr_notes', 'In', false, false, !getDolGlobalString('FCKEDITOR_ENABLE_NOTE_PRIVATE') ? 0 : 1, ROWS_3, '90%'); |
@@ -2525,13 +2525,13 @@ discard block |
||
| 2525 | 2525 | $objectsrc->update_price(1); |
| 2526 | 2526 | } |
| 2527 | 2527 | |
| 2528 | - print "\n<!-- " . $classname . " info -->"; |
|
| 2528 | + print "\n<!-- ".$classname." info -->"; |
|
| 2529 | 2529 | print "\n"; |
| 2530 | - print '<input type="hidden" name="amount" value="' . $objectsrc->total_ht . '">' . "\n"; |
|
| 2531 | - print '<input type="hidden" name="total" value="' . $objectsrc->total_ttc . '">' . "\n"; |
|
| 2532 | - print '<input type="hidden" name="tva" value="' . $objectsrc->total_tva . '">' . "\n"; |
|
| 2533 | - print '<input type="hidden" name="origin" value="' . $objectsrc->element . '">'; |
|
| 2534 | - print '<input type="hidden" name="originid" value="' . $objectsrc->id . '">'; |
|
| 2530 | + print '<input type="hidden" name="amount" value="'.$objectsrc->total_ht.'">'."\n"; |
|
| 2531 | + print '<input type="hidden" name="total" value="'.$objectsrc->total_ttc.'">'."\n"; |
|
| 2532 | + print '<input type="hidden" name="tva" value="'.$objectsrc->total_tva.'">'."\n"; |
|
| 2533 | + print '<input type="hidden" name="origin" value="'.$objectsrc->element.'">'; |
|
| 2534 | + print '<input type="hidden" name="originid" value="'.$objectsrc->id.'">'; |
|
| 2535 | 2535 | |
| 2536 | 2536 | switch ($classname) { |
| 2537 | 2537 | case 'Propal': |
@@ -2550,25 +2550,25 @@ discard block |
||
| 2550 | 2550 | $newclassname = $classname; |
| 2551 | 2551 | } |
| 2552 | 2552 | |
| 2553 | - print '<tr><td>' . $langs->trans($newclassname) . '</td><td>' . $objectsrc->getNomUrl(1) . '</td></tr>'; |
|
| 2553 | + print '<tr><td>'.$langs->trans($newclassname).'</td><td>'.$objectsrc->getNomUrl(1).'</td></tr>'; |
|
| 2554 | 2554 | |
| 2555 | 2555 | // Amount |
| 2556 | - print '<tr><td>' . $langs->trans('AmountHT') . '</td><td>' . price($objectsrc->total_ht) . '</td></tr>'; |
|
| 2557 | - print '<tr><td>' . $langs->trans('AmountVAT') . '</td><td>' . price($objectsrc->total_tva) . "</td></tr>"; |
|
| 2556 | + print '<tr><td>'.$langs->trans('AmountHT').'</td><td>'.price($objectsrc->total_ht).'</td></tr>'; |
|
| 2557 | + print '<tr><td>'.$langs->trans('AmountVAT').'</td><td>'.price($objectsrc->total_tva)."</td></tr>"; |
|
| 2558 | 2558 | if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) { // Localtax1 RE |
| 2559 | - print '<tr><td>' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td><td>' . price($objectsrc->total_localtax1) . "</td></tr>"; |
|
| 2559 | + print '<tr><td>'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td><td>'.price($objectsrc->total_localtax1)."</td></tr>"; |
|
| 2560 | 2560 | } |
| 2561 | 2561 | |
| 2562 | 2562 | if ($mysoc->localtax2_assuj == "1" || $objectsrc->total_localtax2 != 0) { // Localtax2 IRPF |
| 2563 | - print '<tr><td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td><td>' . price($objectsrc->total_localtax2) . "</td></tr>"; |
|
| 2563 | + print '<tr><td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td><td>'.price($objectsrc->total_localtax2)."</td></tr>"; |
|
| 2564 | 2564 | } |
| 2565 | 2565 | |
| 2566 | - print '<tr><td>' . $langs->trans('AmountTTC') . '</td><td>' . price($objectsrc->total_ttc) . "</td></tr>"; |
|
| 2566 | + print '<tr><td>'.$langs->trans('AmountTTC').'</td><td>'.price($objectsrc->total_ttc)."</td></tr>"; |
|
| 2567 | 2567 | |
| 2568 | 2568 | if (isModEnabled("multicurrency")) { |
| 2569 | - print '<tr><td>' . $langs->trans('MulticurrencyAmountHT') . '</td><td>' . price($objectsrc->multicurrency_total_ht) . '</td></tr>'; |
|
| 2570 | - print '<tr><td>' . $langs->trans('MulticurrencyAmountVAT') . '</td><td>' . price($objectsrc->multicurrency_total_tva) . "</td></tr>"; |
|
| 2571 | - print '<tr><td>' . $langs->trans('MulticurrencyAmountTTC') . '</td><td>' . price($objectsrc->multicurrency_total_ttc) . "</td></tr>"; |
|
| 2569 | + print '<tr><td>'.$langs->trans('MulticurrencyAmountHT').'</td><td>'.price($objectsrc->multicurrency_total_ht).'</td></tr>'; |
|
| 2570 | + print '<tr><td>'.$langs->trans('MulticurrencyAmountVAT').'</td><td>'.price($objectsrc->multicurrency_total_tva)."</td></tr>"; |
|
| 2571 | + print '<tr><td>'.$langs->trans('MulticurrencyAmountTTC').'</td><td>'.price($objectsrc->multicurrency_total_ttc)."</td></tr>"; |
|
| 2572 | 2572 | } |
| 2573 | 2573 | } |
| 2574 | 2574 | |
@@ -2619,7 +2619,7 @@ discard block |
||
| 2619 | 2619 | |
| 2620 | 2620 | // Confirmation to delete |
| 2621 | 2621 | if ($action == 'delete') { |
| 2622 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 1); |
|
| 2622 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 1); |
|
| 2623 | 2623 | } |
| 2624 | 2624 | |
| 2625 | 2625 | // Confirmation of validation |
@@ -2638,7 +2638,7 @@ discard block |
||
| 2638 | 2638 | |
| 2639 | 2639 | $text = $langs->trans('ConfirmValidateOrder', $numref); |
| 2640 | 2640 | if (isModEnabled('notification')) { |
| 2641 | - require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; |
|
| 2641 | + require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; |
|
| 2642 | 2642 | $notify = new Notify($db); |
| 2643 | 2643 | $text .= '<br>'; |
| 2644 | 2644 | $text .= $notify->confirmMessage('ORDER_VALIDATE', $object->socid, $object); |
@@ -2654,7 +2654,7 @@ discard block |
||
| 2654 | 2654 | $formquestion = array(); |
| 2655 | 2655 | if (isModEnabled('stock') && getDolGlobalString('STOCK_CALCULATE_ON_VALIDATE_ORDER') && $qualified_for_stock_change) { |
| 2656 | 2656 | $langs->load("stocks"); |
| 2657 | - require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php'; |
|
| 2657 | + require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; |
|
| 2658 | 2658 | $formproduct = new FormProduct($db); |
| 2659 | 2659 | $forcecombo = 0; |
| 2660 | 2660 | if ($conf->browser->name == 'ie') { |
@@ -2672,7 +2672,7 @@ discard block |
||
| 2672 | 2672 | $nbMandated = 0; |
| 2673 | 2673 | foreach ($object->lines as $line) { |
| 2674 | 2674 | $res = $line->fetch_product(); |
| 2675 | - if ($res > 0) { |
|
| 2675 | + if ($res > 0) { |
|
| 2676 | 2676 | if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end))) { |
| 2677 | 2677 | $nbMandated++; |
| 2678 | 2678 | break; |
@@ -2684,7 +2684,7 @@ discard block |
||
| 2684 | 2684 | setEventMessages($langs->trans("mandatoryPeriodNeedTobeSetMsgValidate"), null, 'errors'); |
| 2685 | 2685 | $error++; |
| 2686 | 2686 | } else { |
| 2687 | - $text .= '<div><span class="clearboth nowraponall warning">' . img_warning() . $langs->trans("mandatoryPeriodNeedTobeSetMsgValidate") . '</span></div>'; |
|
| 2687 | + $text .= '<div><span class="clearboth nowraponall warning">'.img_warning().$langs->trans("mandatoryPeriodNeedTobeSetMsgValidate").'</span></div>'; |
|
| 2688 | 2688 | } |
| 2689 | 2689 | } |
| 2690 | 2690 | |
@@ -2696,7 +2696,7 @@ discard block |
||
| 2696 | 2696 | $deposit_percent_from_payment_terms = (float) getDictionaryValue('c_payment_term', 'deposit_percent', $object->cond_reglement_id); |
| 2697 | 2697 | |
| 2698 | 2698 | if (!empty($deposit_percent_from_payment_terms) && isModEnabled('invoice') && $user->hasRight('facture', 'creer')) { |
| 2699 | - require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
| 2699 | + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
| 2700 | 2700 | |
| 2701 | 2701 | $object->fetchObjectLinked(); |
| 2702 | 2702 | |
@@ -2800,7 +2800,7 @@ discard block |
||
| 2800 | 2800 | } |
| 2801 | 2801 | |
| 2802 | 2802 | if (!$error) { |
| 2803 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateOrder'), $text, 'confirm_validate', $formquestion, 0, 1, 240); |
|
| 2803 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateOrder'), $text, 'confirm_validate', $formquestion, 0, 1, 240); |
|
| 2804 | 2804 | } |
| 2805 | 2805 | } |
| 2806 | 2806 | |
@@ -2817,7 +2817,7 @@ discard block |
||
| 2817 | 2817 | $formquestion = array(); |
| 2818 | 2818 | if (isModEnabled('stock') && getDolGlobalString('STOCK_CALCULATE_ON_VALIDATE_ORDER') && $qualified_for_stock_change) { |
| 2819 | 2819 | $langs->load("stocks"); |
| 2820 | - require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php'; |
|
| 2820 | + require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; |
|
| 2821 | 2821 | $formproduct = new FormProduct($db); |
| 2822 | 2822 | $forcecombo = 0; |
| 2823 | 2823 | if ($conf->browser->name == 'ie') { |
@@ -2831,12 +2831,12 @@ discard block |
||
| 2831 | 2831 | ); |
| 2832 | 2832 | } |
| 2833 | 2833 | |
| 2834 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('UnvalidateOrder'), $text, 'confirm_modif', $formquestion, "yes", 1, 220); |
|
| 2834 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('UnvalidateOrder'), $text, 'confirm_modif', $formquestion, "yes", 1, 220); |
|
| 2835 | 2835 | } |
| 2836 | 2836 | |
| 2837 | 2837 | // Confirmation of closing |
| 2838 | 2838 | if ($action == 'shipped') { |
| 2839 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloseOrder'), $langs->trans('ConfirmCloseOrder'), 'confirm_shipped', '', 0, 1); |
|
| 2839 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('CloseOrder'), $langs->trans('ConfirmCloseOrder'), 'confirm_shipped', '', 0, 1); |
|
| 2840 | 2840 | } |
| 2841 | 2841 | |
| 2842 | 2842 | // Confirmation of cancellation |
@@ -2852,7 +2852,7 @@ discard block |
||
| 2852 | 2852 | $formquestion = array(); |
| 2853 | 2853 | if (isModEnabled('stock') && getDolGlobalString('STOCK_CALCULATE_ON_VALIDATE_ORDER') && $qualified_for_stock_change) { |
| 2854 | 2854 | $langs->load("stocks"); |
| 2855 | - require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php'; |
|
| 2855 | + require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; |
|
| 2856 | 2856 | $formproduct = new FormProduct($db); |
| 2857 | 2857 | $forcecombo = 0; |
| 2858 | 2858 | if ($conf->browser->name == 'ie') { |
@@ -2866,12 +2866,12 @@ discard block |
||
| 2866 | 2866 | ); |
| 2867 | 2867 | } |
| 2868 | 2868 | |
| 2869 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans("Cancel"), $text, 'confirm_cancel', $formquestion, 0, 1); |
|
| 2869 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("Cancel"), $text, 'confirm_cancel', $formquestion, 0, 1); |
|
| 2870 | 2870 | } |
| 2871 | 2871 | |
| 2872 | 2872 | // Confirmation to delete line |
| 2873 | 2873 | if ($action == 'ask_deleteline') { |
| 2874 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); |
|
| 2874 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); |
|
| 2875 | 2875 | } |
| 2876 | 2876 | |
| 2877 | 2877 | // Confirmation de la suppression d'une ligne subtotal |
@@ -2884,7 +2884,7 @@ discard block |
||
| 2884 | 2884 | $title = "DeleteTitleLine"; |
| 2885 | 2885 | $question = "ConfirmDeleteTitleLine"; |
| 2886 | 2886 | } |
| 2887 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans($title), $langs->trans($question), 'confirm_delete_subtotalline', $formconfirm, 'no', 1); |
|
| 2887 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans($title), $langs->trans($question), 'confirm_delete_subtotalline', $formconfirm, 'no', 1); |
|
| 2888 | 2888 | } |
| 2889 | 2889 | |
| 2890 | 2890 | // Clone confirmation |
@@ -2894,7 +2894,7 @@ discard block |
||
| 2894 | 2894 | $formquestion = array( |
| 2895 | 2895 | array('type' => 'other', 'name' => 'socid', 'label' => $langs->trans("SelectThirdParty"), 'value' => $form->select_company(GETPOSTINT('socid'), 'socid', $filter, '', 0, 0, array(), 0, 'maxwidth300')) |
| 2896 | 2896 | ); |
| 2897 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneOrder', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); |
|
| 2897 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneOrder', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); |
|
| 2898 | 2898 | } |
| 2899 | 2899 | |
| 2900 | 2900 | // Subtotal line form |
@@ -2926,16 +2926,16 @@ discard block |
||
| 2926 | 2926 | |
| 2927 | 2927 | // Order card |
| 2928 | 2928 | |
| 2929 | - $linkback = '<a href="' . DOL_URL_ROOT . '/commande/list.php?restore_lastsearch_values=1' . (!empty($socid) ? '&socid=' . $socid : '') . '">' . $langs->trans("BackToList") . '</a>'; |
|
| 2929 | + $linkback = '<a href="'.DOL_URL_ROOT.'/commande/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>'; |
|
| 2930 | 2930 | |
| 2931 | 2931 | $morehtmlref = '<div class="refidno">'; |
| 2932 | 2932 | // Ref customer |
| 2933 | 2933 | $morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, (int) $usercancreate, 'string', '', 0, 1); |
| 2934 | - $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, (int) $usercancreate, 'string' . (isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':' . getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1); |
|
| 2934 | + $morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, (int) $usercancreate, 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':'.getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1); |
|
| 2935 | 2935 | // Thirdparty |
| 2936 | - $morehtmlref .= '<br>' . $soc->getNomUrl(1, 'customer'); |
|
| 2936 | + $morehtmlref .= '<br>'.$soc->getNomUrl(1, 'customer'); |
|
| 2937 | 2937 | if (!getDolGlobalString('MAIN_DISABLE_OTHER_LINK') && $object->thirdparty->id > 0) { |
| 2938 | - $morehtmlref .= ' (<a href="' . DOL_URL_ROOT . '/commande/list.php?socid=' . $object->thirdparty->id . '&search_societe=' . urlencode($object->thirdparty->name) . '">' . $langs->trans("OtherOrders") . '</a>)'; |
|
| 2938 | + $morehtmlref .= ' (<a href="'.DOL_URL_ROOT.'/commande/list.php?socid='.$object->thirdparty->id.'&search_societe='.urlencode($object->thirdparty->name).'">'.$langs->trans("OtherOrders").'</a>)'; |
|
| 2939 | 2939 | } |
| 2940 | 2940 | // Project |
| 2941 | 2941 | if (isModEnabled('project')) { |
@@ -2944,16 +2944,16 @@ discard block |
||
| 2944 | 2944 | if ($usercancreate) { |
| 2945 | 2945 | $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); |
| 2946 | 2946 | if ($action != 'classify') { |
| 2947 | - $morehtmlref .= '<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> '; |
|
| 2947 | + $morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> '; |
|
| 2948 | 2948 | } |
| 2949 | - $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); |
|
| 2949 | + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); |
|
| 2950 | 2950 | } else { |
| 2951 | 2951 | if (!empty($object->fk_project)) { |
| 2952 | 2952 | $proj = new Project($db); |
| 2953 | 2953 | $proj->fetch($object->fk_project); |
| 2954 | 2954 | $morehtmlref .= $proj->getNomUrl(1); |
| 2955 | 2955 | if ($proj->title) { |
| 2956 | - $morehtmlref .= '<span class="opacitymedium"> - ' . dol_escape_htmltag($proj->title) . '</span>'; |
|
| 2956 | + $morehtmlref .= '<span class="opacitymedium"> - '.dol_escape_htmltag($proj->title).'</span>'; |
|
| 2957 | 2957 | } |
| 2958 | 2958 | } |
| 2959 | 2959 | } |
@@ -2982,20 +2982,20 @@ discard block |
||
| 2982 | 2982 | print $form->textwithpicto($langs->trans('PointOfSale'), $langs->trans('POSInfo')); |
| 2983 | 2983 | print '</td>'; |
| 2984 | 2984 | if ($action != 'editposinfo' && $usercancreate) { |
| 2985 | - print '<td class="right"><a class="editfielda" href="' . $_SERVER["PHP_SELF"] . '?action=editposinfo&token=' . newToken() . '&id=' . $object->id . '">' . img_edit($langs->trans('SetPOSInfo'), 1) . '</a></td>'; |
|
| 2985 | + print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editposinfo&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->trans('SetPOSInfo'), 1).'</a></td>'; |
|
| 2986 | 2986 | } |
| 2987 | 2987 | print '</tr></table>'; |
| 2988 | 2988 | print '</td><td class="valuefield fieldname_type">'; |
| 2989 | - print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" name="formposinfo">'; |
|
| 2989 | + print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" name="formposinfo">'; |
|
| 2990 | 2990 | print '<input type="hidden" name="action" value="setposinfo">'; |
| 2991 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 2991 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 2992 | 2992 | if ($action == 'editposinfo') { |
| 2993 | - print '<input type="text" class="maxwidth150" name="posmodule" placeholder="' . $langs->trans("POSModule") . '" value="' . $object->module_source . '"> '; |
|
| 2994 | - print '<input type="text" class="maxwidth100" name="posterminal" placeholder="' . $langs->trans("Terminal") . '" value="' . $object->pos_source . '">'; |
|
| 2995 | - print '<input type="submit" class="button" name="submitposinfo" value="' . $langs->trans("Submit") . '">'; |
|
| 2993 | + print '<input type="text" class="maxwidth150" name="posmodule" placeholder="'.$langs->trans("POSModule").'" value="'.$object->module_source.'"> '; |
|
| 2994 | + print '<input type="text" class="maxwidth100" name="posterminal" placeholder="'.$langs->trans("Terminal").'" value="'.$object->pos_source.'">'; |
|
| 2995 | + print '<input type="submit" class="button" name="submitposinfo" value="'.$langs->trans("Submit").'">'; |
|
| 2996 | 2996 | } else { |
| 2997 | 2997 | if ($object->module_source) { |
| 2998 | - print '<span class="opacitymediumbycolor paddingleft">' . dolPrintHTML(ucfirst($object->module_source) . ' - ' . $langs->transnoentitiesnoconv("Terminal") . ' ' . $object->pos_source) . '</span>'; |
|
| 2998 | + print '<span class="opacitymediumbycolor paddingleft">'.dolPrintHTML(ucfirst($object->module_source).' - '.$langs->transnoentitiesnoconv("Terminal").' '.$object->pos_source).'</span>'; |
|
| 2999 | 2999 | } |
| 3000 | 3000 | } |
| 3001 | 3001 | print '</form>'; |
@@ -3008,7 +3008,7 @@ discard block |
||
| 3008 | 3008 | print $langs->trans('OutstandingBill'); |
| 3009 | 3009 | print '</td><td class="valuefield">'; |
| 3010 | 3010 | $arrayoutstandingbills = $soc->getOutstandingBills(); |
| 3011 | - print price($arrayoutstandingbills['opened']) . ' / '; |
|
| 3011 | + print price($arrayoutstandingbills['opened']).' / '; |
|
| 3012 | 3012 | print price($soc->outstanding_limit, 0, '', 1, -1, -1, $conf->currency); |
| 3013 | 3013 | print '</td>'; |
| 3014 | 3014 | print '</tr>'; |
@@ -3023,11 +3023,11 @@ discard block |
||
| 3023 | 3023 | $filtercreditnote = "fk_facture_source IS NOT NULL AND (description NOT LIKE '(DEPOSIT)%' OR description LIKE '(EXCESS RECEIVED)%')"; |
| 3024 | 3024 | } |
| 3025 | 3025 | |
| 3026 | - $addrelativediscount = '<a href="' . DOL_URL_ROOT . '/comm/remise.php?id=' . $soc->id . '&backtopage=' . urlencode($_SERVER["PHP_SELF"]) . '?facid=' . $object->id . '">' . $langs->trans("EditRelativeDiscounts") . '</a>'; |
|
| 3027 | - $addabsolutediscount = '<a href="' . DOL_URL_ROOT . '/comm/remx.php?id=' . $soc->id . '&backtopage=' . urlencode($_SERVER["PHP_SELF"]) . '?facid=' . $object->id . '">' . $langs->trans("EditGlobalDiscounts") . '</a>'; |
|
| 3028 | - $addcreditnote = '<a href="' . DOL_URL_ROOT . '/compta/facture/card.php?action=create&socid=' . $soc->id . '&type=2&backtopage=' . urlencode($_SERVER["PHP_SELF"]) . '?facid=' . $object->id . '">' . $langs->trans("AddCreditNote") . '</a>'; |
|
| 3026 | + $addrelativediscount = '<a href="'.DOL_URL_ROOT.'/comm/remise.php?id='.$soc->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"]).'?facid='.$object->id.'">'.$langs->trans("EditRelativeDiscounts").'</a>'; |
|
| 3027 | + $addabsolutediscount = '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$soc->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"]).'?facid='.$object->id.'">'.$langs->trans("EditGlobalDiscounts").'</a>'; |
|
| 3028 | + $addcreditnote = '<a href="'.DOL_URL_ROOT.'/compta/facture/card.php?action=create&socid='.$soc->id.'&type=2&backtopage='.urlencode($_SERVER["PHP_SELF"]).'?facid='.$object->id.'">'.$langs->trans("AddCreditNote").'</a>'; |
|
| 3029 | 3029 | |
| 3030 | - print '<tr><td class="titlefield">' . $langs->trans('Discounts') . '</td><td class="valuefield">'; |
|
| 3030 | + print '<tr><td class="titlefield">'.$langs->trans('Discounts').'</td><td class="valuefield">'; |
|
| 3031 | 3031 | |
| 3032 | 3032 | $absolute_discount = $soc->getAvailableDiscounts(null, $filterabsolutediscount); |
| 3033 | 3033 | $absolute_creditnote = $soc->getAvailableDiscounts(null, $filtercreditnote); |
@@ -3036,8 +3036,8 @@ discard block |
||
| 3036 | 3036 | |
| 3037 | 3037 | $thirdparty = $soc; |
| 3038 | 3038 | $discount_type = 0; |
| 3039 | - $backtopage = $_SERVER["PHP_SELF"] . '?id=' . $object->id; |
|
| 3040 | - include DOL_DOCUMENT_ROOT . '/core/tpl/object_discounts.tpl.php'; |
|
| 3039 | + $backtopage = $_SERVER["PHP_SELF"].'?id='.$object->id; |
|
| 3040 | + include DOL_DOCUMENT_ROOT.'/core/tpl/object_discounts.tpl.php'; |
|
| 3041 | 3041 | |
| 3042 | 3042 | print '</td></tr>'; |
| 3043 | 3043 | |
@@ -3047,17 +3047,17 @@ discard block |
||
| 3047 | 3047 | print $form->editfieldkey("Date", 'date', '', $object, (int) $editenable); |
| 3048 | 3048 | print '</td><td class="valuefield">'; |
| 3049 | 3049 | if ($action == 'editdate') { |
| 3050 | - print '<form name="setdate" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">'; |
|
| 3051 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 3050 | + print '<form name="setdate" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">'; |
|
| 3051 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 3052 | 3052 | print '<input type="hidden" name="action" value="setdate">'; |
| 3053 | - print '<input type="hidden" name="backtopage" value="' . $backtopage . '">'; |
|
| 3053 | + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; |
|
| 3054 | 3054 | print $form->selectDate($object->date, 'order_', 0, 0, 0, "setdate"); |
| 3055 | - print '<input type="submit" class="button button-edit" value="' . $langs->trans('Modify') . '">'; |
|
| 3055 | + print '<input type="submit" class="button button-edit" value="'.$langs->trans('Modify').'">'; |
|
| 3056 | 3056 | print '</form>'; |
| 3057 | 3057 | } else { |
| 3058 | 3058 | print $object->date ? dol_print_date($object->date, 'day') : ' '; |
| 3059 | 3059 | if ($object->hasDelay() && empty($object->delivery_date)) { // If there is a delivery date planned, warning should be on this date |
| 3060 | - print ' ' . img_picto($langs->trans("Late") . ' : ' . $object->showDelay(), "warning"); |
|
| 3060 | + print ' '.img_picto($langs->trans("Late").' : '.$object->showDelay(), "warning"); |
|
| 3061 | 3061 | } |
| 3062 | 3062 | } |
| 3063 | 3063 | print '</td>'; |
@@ -3069,17 +3069,17 @@ discard block |
||
| 3069 | 3069 | print $form->editfieldkey("DateDeliveryPlanned", 'date_livraison', '', $object, (int) $editenable); |
| 3070 | 3070 | print '</td><td class="valuefield">'; |
| 3071 | 3071 | if ($action == 'editdate_livraison') { |
| 3072 | - print '<form name="setdate_livraison" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="post">'; |
|
| 3073 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 3072 | + print '<form name="setdate_livraison" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">'; |
|
| 3073 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 3074 | 3074 | print '<input type="hidden" name="action" value="setdate_livraison">'; |
| 3075 | - print '<input type="hidden" name="backtopage" value="' . $backtopage . '">'; |
|
| 3075 | + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; |
|
| 3076 | 3076 | print $form->selectDate($object->delivery_date ? $object->delivery_date : -1, 'liv_', 1, 1, 0, "setdate_livraison", 1, 0); |
| 3077 | - print '<input type="submit" class="button button-edit" value="' . $langs->trans('Modify') . '">'; |
|
| 3077 | + print '<input type="submit" class="button button-edit" value="'.$langs->trans('Modify').'">'; |
|
| 3078 | 3078 | print '</form>'; |
| 3079 | 3079 | } else { |
| 3080 | 3080 | print $object->delivery_date ? dol_print_date($object->delivery_date, 'dayhour') : ' '; |
| 3081 | 3081 | if ($object->hasDelay() && !empty($object->delivery_date)) { |
| 3082 | - print ' ' . img_picto($langs->trans("Late") . ' : ' . $object->showDelay(), "warning"); |
|
| 3082 | + print ' '.img_picto($langs->trans("Late").' : '.$object->showDelay(), "warning"); |
|
| 3083 | 3083 | } |
| 3084 | 3084 | } |
| 3085 | 3085 | print '</td>'; |
@@ -3091,9 +3091,9 @@ discard block |
||
| 3091 | 3091 | print $form->editfieldkey("AvailabilityPeriod", 'availability', '', $object, (int) $editenable); |
| 3092 | 3092 | print '</td><td class="valuefield">'; |
| 3093 | 3093 | if ($action == 'editavailability') { |
| 3094 | - $form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->availability_id, 'availability_id', 1); |
|
| 3094 | + $form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->availability_id, 'availability_id', 1); |
|
| 3095 | 3095 | } else { |
| 3096 | - $form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->availability_id, 'none', 1); |
|
| 3096 | + $form->form_availability($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->availability_id, 'none', 1); |
|
| 3097 | 3097 | } |
| 3098 | 3098 | print '</td></tr>'; |
| 3099 | 3099 | |
@@ -3104,9 +3104,9 @@ discard block |
||
| 3104 | 3104 | print $form->editfieldkey("SendingMethod", 'shippingmethod', '', $object, (int) $editenable); |
| 3105 | 3105 | print '</td><td class="valuefield">'; |
| 3106 | 3106 | if ($action == 'editshippingmethod') { |
| 3107 | - $form->formSelectShippingMethod($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->shipping_method_id, 'shipping_method_id', 1); |
|
| 3107 | + $form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->shipping_method_id, 'shipping_method_id', 1); |
|
| 3108 | 3108 | } else { |
| 3109 | - $form->formSelectShippingMethod($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->shipping_method_id, 'none'); |
|
| 3109 | + $form->formSelectShippingMethod($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->shipping_method_id, 'none'); |
|
| 3110 | 3110 | } |
| 3111 | 3111 | print '</td>'; |
| 3112 | 3112 | print '</tr>'; |
@@ -3115,16 +3115,16 @@ discard block |
||
| 3115 | 3115 | // Warehouse |
| 3116 | 3116 | if (isModEnabled('stock') && getDolGlobalString('WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER')) { |
| 3117 | 3117 | $langs->load('stocks'); |
| 3118 | - require_once DOL_DOCUMENT_ROOT . '/product/class/html.formproduct.class.php'; |
|
| 3118 | + require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; |
|
| 3119 | 3119 | $formproduct = new FormProduct($db); |
| 3120 | 3120 | print '<tr><td>'; |
| 3121 | 3121 | $editenable = $usercancreate; |
| 3122 | 3122 | print $form->editfieldkey("Warehouse", 'warehouse', '', $object, (int) $editenable); |
| 3123 | 3123 | print '</td><td class="valuefield">'; |
| 3124 | 3124 | if ($action == 'editwarehouse') { |
| 3125 | - $formproduct->formSelectWarehouses($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->warehouse_id, 'warehouse_id', 1); |
|
| 3125 | + $formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->warehouse_id, 'warehouse_id', 1); |
|
| 3126 | 3126 | } else { |
| 3127 | - $formproduct->formSelectWarehouses($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->warehouse_id, 'none'); |
|
| 3127 | + $formproduct->formSelectWarehouses($_SERVER['PHP_SELF'].'?id='.$object->id, $object->warehouse_id, 'none'); |
|
| 3128 | 3128 | } |
| 3129 | 3129 | print '</td>'; |
| 3130 | 3130 | print '</tr>'; |
@@ -3136,9 +3136,9 @@ discard block |
||
| 3136 | 3136 | print $form->editfieldkey("Source", 'demandreason', '', $object, (int) $editenable); |
| 3137 | 3137 | print '</td><td class="valuefield">'; |
| 3138 | 3138 | if ($action == 'editdemandreason') { |
| 3139 | - $form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->demand_reason_id, 'demand_reason_id', 1); |
|
| 3139 | + $form->formInputReason($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->demand_reason_id, 'demand_reason_id', 1); |
|
| 3140 | 3140 | } else { |
| 3141 | - $form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->demand_reason_id, 'none'); |
|
| 3141 | + $form->formInputReason($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->demand_reason_id, 'none'); |
|
| 3142 | 3142 | } |
| 3143 | 3143 | print '</td></tr>'; |
| 3144 | 3144 | |
@@ -3148,9 +3148,9 @@ discard block |
||
| 3148 | 3148 | print $form->editfieldkey("PaymentConditionsShort", 'conditions', '', $object, (int) $editenable); |
| 3149 | 3149 | print '</td><td class="valuefield">'; |
| 3150 | 3150 | if ($action == 'editconditions') { |
| 3151 | - $form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->cond_reglement_id, 'cond_reglement_id', 1, '', 1, $object->deposit_percent); |
|
| 3151 | + $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->cond_reglement_id, 'cond_reglement_id', 1, '', 1, $object->deposit_percent); |
|
| 3152 | 3152 | } else { |
| 3153 | - $form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->cond_reglement_id, 'none', 1, '', 1, $object->deposit_percent); |
|
| 3153 | + $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->cond_reglement_id, 'none', 1, '', 1, $object->deposit_percent); |
|
| 3154 | 3154 | } |
| 3155 | 3155 | print '</td>'; |
| 3156 | 3156 | |
@@ -3162,9 +3162,9 @@ discard block |
||
| 3162 | 3162 | print $form->editfieldkey("PaymentMode", 'mode', '', $object, (int) $editenable); |
| 3163 | 3163 | print '</td><td class="valuefield">'; |
| 3164 | 3164 | if ($action == 'editmode') { |
| 3165 | - $form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->mode_reglement_id, 'mode_reglement_id', 'CRDT', 1, 1); |
|
| 3165 | + $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->mode_reglement_id, 'mode_reglement_id', 'CRDT', 1, 1); |
|
| 3166 | 3166 | } else { |
| 3167 | - $form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->mode_reglement_id, 'none'); |
|
| 3167 | + $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->mode_reglement_id, 'none'); |
|
| 3168 | 3168 | } |
| 3169 | 3169 | print '</td></tr>'; |
| 3170 | 3170 | |
@@ -3186,13 +3186,13 @@ discard block |
||
| 3186 | 3186 | $totalWeight = $tmparray['weight']; |
| 3187 | 3187 | $totalVolume = $tmparray['volume']; |
| 3188 | 3188 | if ($totalWeight) { |
| 3189 | - print '<tr><td>' . $langs->trans("CalculatedWeight") . '</td>'; |
|
| 3189 | + print '<tr><td>'.$langs->trans("CalculatedWeight").'</td>'; |
|
| 3190 | 3190 | print '<td class="valuefield">'; |
| 3191 | 3191 | print showDimensionInBestUnit($totalWeight, 0, "weight", $langs, getDolGlobalInt('MAIN_WEIGHT_DEFAULT_ROUND', -1), isset($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? $conf->global->MAIN_WEIGHT_DEFAULT_UNIT : 'no'); |
| 3192 | 3192 | print '</td></tr>'; |
| 3193 | 3193 | } |
| 3194 | 3194 | if ($totalVolume) { |
| 3195 | - print '<tr><td>' . $langs->trans("CalculatedVolume") . '</td>'; |
|
| 3195 | + print '<tr><td>'.$langs->trans("CalculatedVolume").'</td>'; |
|
| 3196 | 3196 | print '<td class="valuefield">'; |
| 3197 | 3197 | print showDimensionInBestUnit($totalVolume, 0, "volume", $langs, getDolGlobalInt('MAIN_VOLUME_DEFAULT_ROUND', -1), isset($conf->global->MAIN_VOLUME_DEFAULT_UNIT) ? $conf->global->MAIN_VOLUME_DEFAULT_UNIT : 'no'); |
| 3198 | 3198 | print '</td></tr>'; |
@@ -3210,7 +3210,7 @@ discard block |
||
| 3210 | 3210 | if ($action != 'editincoterm') { |
| 3211 | 3211 | print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1); |
| 3212 | 3212 | } else { |
| 3213 | - print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'] . '?id=' . $object->id); |
|
| 3213 | + print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'].'?id='.$object->id); |
|
| 3214 | 3214 | } |
| 3215 | 3215 | print '</td></tr>'; |
| 3216 | 3216 | } |
@@ -3222,9 +3222,9 @@ discard block |
||
| 3222 | 3222 | print $form->editfieldkey("BankAccount", 'bankaccount', '', $object, (int) $editenable); |
| 3223 | 3223 | print '</td><td class="valuefield">'; |
| 3224 | 3224 | if ($action == 'editbankaccount') { |
| 3225 | - $form->formSelectAccount($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->fk_account, 'fk_account', 1); |
|
| 3225 | + $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->fk_account, 'fk_account', 1); |
|
| 3226 | 3226 | } else { |
| 3227 | - $form->formSelectAccount($_SERVER['PHP_SELF'] . '?id=' . $object->id, (string) $object->fk_account, 'none'); |
|
| 3227 | + $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, (string) $object->fk_account, 'none'); |
|
| 3228 | 3228 | } |
| 3229 | 3229 | print '</td>'; |
| 3230 | 3230 | print '</tr>'; |
@@ -3237,7 +3237,7 @@ discard block |
||
| 3237 | 3237 | print $langs->trans("Categories"); |
| 3238 | 3238 | print '<td><td class="right">'; |
| 3239 | 3239 | if ($usercancreate) { |
| 3240 | - print '<a class="editfielda" href="' . DOL_URL_ROOT . '/commande/card.php?id=' . $object->id . '&action=edittags&token=' . newToken() . '">' . img_edit() . '</a>'; |
|
| 3240 | + print '<a class="editfielda" href="'.DOL_URL_ROOT.'/commande/card.php?id='.$object->id.'&action=edittags&token='.newToken().'">'.img_edit().'</a>'; |
|
| 3241 | 3241 | } else { |
| 3242 | 3242 | print ' '; |
| 3243 | 3243 | } |
@@ -3245,11 +3245,11 @@ discard block |
||
| 3245 | 3245 | print '</td>'; |
| 3246 | 3246 | print '<td>'; |
| 3247 | 3247 | if ($action == 'edittags') { |
| 3248 | - print '<form method="POST" action="' . $_SERVER['PHP_SELF'] . '?id=' . $object->id . '">'; |
|
| 3248 | + print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'">'; |
|
| 3249 | 3249 | print '<input type="hidden" name="action" value="settags">'; |
| 3250 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 3250 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 3251 | 3251 | print $form->selectCategories(Categorie::TYPE_ORDER, 'categories', $object); |
| 3252 | - print '<input type="submit" class="button valignmiddle smallpaddingimp" value="' . $langs->trans("Modify") . '">'; |
|
| 3252 | + print '<input type="submit" class="button valignmiddle smallpaddingimp" value="'.$langs->trans("Modify").'">'; |
|
| 3253 | 3253 | print '</form>'; |
| 3254 | 3254 | } else { |
| 3255 | 3255 | print $form->showCategories($object->id, Categorie::TYPE_ORDER, 1); |
@@ -3258,7 +3258,7 @@ discard block |
||
| 3258 | 3258 | } |
| 3259 | 3259 | |
| 3260 | 3260 | // Other attributes |
| 3261 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; |
|
| 3261 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; |
|
| 3262 | 3262 | |
| 3263 | 3263 | print '</table>'; |
| 3264 | 3264 | |
@@ -3268,40 +3268,40 @@ discard block |
||
| 3268 | 3268 | |
| 3269 | 3269 | print '<table class="border tableforfield centpercent">'; |
| 3270 | 3270 | |
| 3271 | - include DOL_DOCUMENT_ROOT . '/core/tpl/object_currency_amount.tpl.php'; |
|
| 3271 | + include DOL_DOCUMENT_ROOT.'/core/tpl/object_currency_amount.tpl.php'; |
|
| 3272 | 3272 | |
| 3273 | 3273 | $alert = ''; |
| 3274 | 3274 | if (getDolGlobalString('ORDER_MANAGE_MIN_AMOUNT') && $object->total_ht < $object->thirdparty->order_min_amount) { |
| 3275 | - $alert = ' ' . img_warning($langs->trans('OrderMinAmount') . ': ' . price($object->thirdparty->order_min_amount)); |
|
| 3275 | + $alert = ' '.img_warning($langs->trans('OrderMinAmount').': '.price($object->thirdparty->order_min_amount)); |
|
| 3276 | 3276 | } |
| 3277 | 3277 | |
| 3278 | 3278 | print '<tr>'; |
| 3279 | - print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>'; |
|
| 3280 | - print '<td class="nowrap amountcard right">' . price($object->total_ht, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 3279 | + print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>'; |
|
| 3280 | + print '<td class="nowrap amountcard right">'.price($object->total_ht, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 3281 | 3281 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 3282 | 3282 | // Multicurrency Amount HT |
| 3283 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 3283 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ht, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 3284 | 3284 | } |
| 3285 | 3285 | print '</tr>'; |
| 3286 | 3286 | |
| 3287 | 3287 | print '<tr>'; |
| 3288 | - print '<td class="titlefieldmiddle">' . $langs->trans('AmountVAT') . '</td>'; |
|
| 3289 | - print '<td class="nowrap amountcard right">' . price($object->total_tva, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 3288 | + print '<td class="titlefieldmiddle">'.$langs->trans('AmountVAT').'</td>'; |
|
| 3289 | + print '<td class="nowrap amountcard right">'.price($object->total_tva, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 3290 | 3290 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 3291 | 3291 | // Multicurrency Amount VAT |
| 3292 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 3292 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_tva, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 3293 | 3293 | } |
| 3294 | 3294 | print '</tr>'; |
| 3295 | 3295 | |
| 3296 | 3296 | // Amount Local Taxes |
| 3297 | 3297 | if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) { |
| 3298 | 3298 | print '<tr>'; |
| 3299 | - print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>'; |
|
| 3300 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 3299 | + print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>'; |
|
| 3300 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 3301 | 3301 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 3302 | 3302 | $object->multicurrency_total_localtax1 = price2num($object->total_localtax1 * $object->multicurrency_tx, 'MT'); |
| 3303 | 3303 | |
| 3304 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 3304 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_localtax1, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 3305 | 3305 | } |
| 3306 | 3306 | print '</tr>'; |
| 3307 | 3307 | } |
@@ -3309,24 +3309,24 @@ discard block |
||
| 3309 | 3309 | // Amount Local Taxes |
| 3310 | 3310 | if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) { |
| 3311 | 3311 | print '<tr>'; |
| 3312 | - print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>'; |
|
| 3313 | - print '<td class="nowrap amountcard right">' . price($object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency) . '</td>'; |
|
| 3312 | + print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>'; |
|
| 3313 | + print '<td class="nowrap amountcard right">'.price($object->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency).'</td>'; |
|
| 3314 | 3314 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 3315 | 3315 | $object->multicurrency_total_localtax2 = price2num($object->total_localtax2 * $object->multicurrency_tx, 'MT'); |
| 3316 | 3316 | |
| 3317 | - print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 3317 | + print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_localtax2, 0, $langs, 0, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 3318 | 3318 | } |
| 3319 | 3319 | print '</tr>'; |
| 3320 | 3320 | } |
| 3321 | 3321 | |
| 3322 | 3322 | print '<tr>'; |
| 3323 | - print '<td>' . $langs->trans('AmountTTC') . '</td>'; |
|
| 3324 | - print '<td class="valuefield nowrap right amountcard">' . price($object->total_ttc, 1, '', 1, -1, -1, $conf->currency) . '</td>'; |
|
| 3323 | + print '<td>'.$langs->trans('AmountTTC').'</td>'; |
|
| 3324 | + print '<td class="valuefield nowrap right amountcard">'.price($object->total_ttc, 1, '', 1, -1, -1, $conf->currency).'</td>'; |
|
| 3325 | 3325 | if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { |
| 3326 | 3326 | // Multicurrency Amount TTC |
| 3327 | - print '<td class="valuefield nowrap right amountcard">' . price($object->multicurrency_total_ttc, 1, '', 1, -1, -1, $object->multicurrency_code) . '</td>'; |
|
| 3327 | + print '<td class="valuefield nowrap right amountcard">'.price($object->multicurrency_total_ttc, 1, '', 1, -1, -1, $object->multicurrency_code).'</td>'; |
|
| 3328 | 3328 | } |
| 3329 | - print '</tr>' . "\n"; |
|
| 3329 | + print '</tr>'."\n"; |
|
| 3330 | 3330 | |
| 3331 | 3331 | print '</table>'; |
| 3332 | 3332 | |
@@ -3347,13 +3347,13 @@ discard block |
||
| 3347 | 3347 | if (getDolGlobalString('MAIN_DISABLE_CONTACTS_TAB')) { |
| 3348 | 3348 | $blocname = 'contacts'; |
| 3349 | 3349 | $title = $langs->trans('ContactsAddresses'); |
| 3350 | - include DOL_DOCUMENT_ROOT . '/core/tpl/bloc_showhide.tpl.php'; |
|
| 3350 | + include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'; |
|
| 3351 | 3351 | } |
| 3352 | 3352 | |
| 3353 | 3353 | if (getDolGlobalString('MAIN_DISABLE_NOTES_TAB')) { |
| 3354 | 3354 | $blocname = 'notes'; |
| 3355 | 3355 | $title = $langs->trans('Notes'); |
| 3356 | - include DOL_DOCUMENT_ROOT . '/core/tpl/bloc_showhide.tpl.php'; |
|
| 3356 | + include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'; |
|
| 3357 | 3357 | } |
| 3358 | 3358 | |
| 3359 | 3359 | /* |
@@ -3368,20 +3368,20 @@ discard block |
||
| 3368 | 3368 | global $inputalsopricewithtax; |
| 3369 | 3369 | $inputalsopricewithtax = 1; |
| 3370 | 3370 | |
| 3371 | - print '<form name="addproduct" id="addproduct" action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="POST"> |
|
| 3372 | - <input type="hidden" name="token" value="' . newToken() . '"> |
|
| 3373 | - <input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline') . '"> |
|
| 3371 | + print '<form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="POST"> |
|
| 3372 | + <input type="hidden" name="token" value="' . newToken().'"> |
|
| 3373 | + <input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'"> |
|
| 3374 | 3374 | <input type="hidden" name="mode" value=""> |
| 3375 | 3375 | <input type="hidden" name="page_y" value=""> |
| 3376 | - <input type="hidden" name="id" value="' . $object->id . '"> |
|
| 3377 | - <input type="hidden" name="backtopage" value="' . $backtopage . '"> |
|
| 3376 | + <input type="hidden" name="id" value="' . $object->id.'"> |
|
| 3377 | + <input type="hidden" name="backtopage" value="' . $backtopage.'"> |
|
| 3378 | 3378 | '; |
| 3379 | 3379 | |
| 3380 | 3380 | if (!empty($conf->use_javascript_ajax) && $object->status == Commande::STATUS_DRAFT) { |
| 3381 | 3381 | if (isModEnabled('subtotals')) { |
| 3382 | - include DOL_DOCUMENT_ROOT . '/core/tpl/subtotal_ajaxrow.tpl.php'; |
|
| 3382 | + include DOL_DOCUMENT_ROOT.'/core/tpl/subtotal_ajaxrow.tpl.php'; |
|
| 3383 | 3383 | } else { |
| 3384 | - include DOL_DOCUMENT_ROOT . '/core/tpl/ajaxrow.tpl.php'; |
|
| 3384 | + include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; |
|
| 3385 | 3385 | } |
| 3386 | 3386 | } |
| 3387 | 3387 | |
@@ -3436,22 +3436,22 @@ discard block |
||
| 3436 | 3436 | |
| 3437 | 3437 | // Reopen a closed order |
| 3438 | 3438 | if (($object->status == Commande::STATUS_CLOSED || $object->status == Commande::STATUS_CANCELED) && $usercancreate && (!$object->billed || !getDolGlobalInt('ORDER_DONT_REOPEN_BILLED'))) { |
| 3439 | - print dolGetButtonAction('', $langs->trans('ReOpen'), 'default', $_SERVER["PHP_SELF"] . '?action=reopen&token=' . newToken() . '&id=' . $object->id, ''); |
|
| 3439 | + print dolGetButtonAction('', $langs->trans('ReOpen'), 'default', $_SERVER["PHP_SELF"].'?action=reopen&token='.newToken().'&id='.$object->id, ''); |
|
| 3440 | 3440 | } |
| 3441 | 3441 | |
| 3442 | 3442 | // Send |
| 3443 | 3443 | if (empty($user->socid)) { |
| 3444 | 3444 | if ($object->status > Commande::STATUS_DRAFT || getDolGlobalString('COMMANDE_SENDBYEMAIL_FOR_ALL_STATUS')) { |
| 3445 | 3445 | if ($usercansend) { |
| 3446 | - print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER["PHP_SELF"] . '?action=presend&token=' . newToken() . '&id=' . $object->id . '&mode=init#formmailbeforetitle', ''); |
|
| 3446 | + print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER["PHP_SELF"].'?action=presend&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', ''); |
|
| 3447 | 3447 | } else { |
| 3448 | - print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER['PHP_SELF'] . '#', '', false); |
|
| 3448 | + print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER['PHP_SELF'].'#', '', false); |
|
| 3449 | 3449 | } |
| 3450 | 3450 | } |
| 3451 | 3451 | } |
| 3452 | 3452 | |
| 3453 | 3453 | // Subtotal |
| 3454 | - if ($object->status == Commande::STATUS_DRAFT && isModEnabled('subtotals') && getDolGlobalString('SUBTOTAL_TITLE_' . strtoupper($object->element))) { |
|
| 3454 | + if ($object->status == Commande::STATUS_DRAFT && isModEnabled('subtotals') && getDolGlobalString('SUBTOTAL_TITLE_'.strtoupper($object->element))) { |
|
| 3455 | 3455 | $langs->load('subtotals'); |
| 3456 | 3456 | |
| 3457 | 3457 | $url_button = array(); |
@@ -3461,7 +3461,7 @@ discard block |
||
| 3461 | 3461 | 'enabled' => (isModEnabled('order') && $object->status == Commande::STATUS_DRAFT), |
| 3462 | 3462 | 'perm' => (bool) $usercancreate, |
| 3463 | 3463 | 'label' => $langs->trans('AddTitleLine'), |
| 3464 | - 'url' => '/commande/card.php?id=' . $object->id . '&action=add_title_line&token=' . newToken() |
|
| 3464 | + 'url' => '/commande/card.php?id='.$object->id.'&action=add_title_line&token='.newToken() |
|
| 3465 | 3465 | ); |
| 3466 | 3466 | |
| 3467 | 3467 | $url_button[] = array( |
@@ -3469,7 +3469,7 @@ discard block |
||
| 3469 | 3469 | 'enabled' => (isModEnabled('order') && $object->status == Commande::STATUS_DRAFT), |
| 3470 | 3470 | 'perm' => (bool) $usercancreate, |
| 3471 | 3471 | 'label' => $langs->trans('AddSubtotalLine'), |
| 3472 | - 'url' => '/commande/card.php?id=' . $object->id . '&action=add_subtotal_line&token=' . newToken() |
|
| 3472 | + 'url' => '/commande/card.php?id='.$object->id.'&action=add_subtotal_line&token='.newToken() |
|
| 3473 | 3473 | ); |
| 3474 | 3474 | print dolGetButtonAction('', $langs->trans('Subtotal'), 'default', $url_button, '', true); |
| 3475 | 3475 | } |
@@ -3477,15 +3477,15 @@ discard block |
||
| 3477 | 3477 | // Valid |
| 3478 | 3478 | if ($object->status == Commande::STATUS_DRAFT && ($object->total_ttc >= 0 || getDolGlobalString('ORDER_ENABLE_NEGATIVE')) && $usercanvalidate) { |
| 3479 | 3479 | if ($numlines > 0) { |
| 3480 | - print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"] . '?action=validate&token=' . newToken() . '&id=' . $object->id, (string) $object->id, 1); |
|
| 3480 | + print dolGetButtonAction('', $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"].'?action=validate&token='.newToken().'&id='.$object->id, (string) $object->id, 1); |
|
| 3481 | 3481 | } else { |
| 3482 | 3482 | $langs->load("errors"); |
| 3483 | - print dolGetButtonAction($langs->trans("ErrorObjectMustHaveLinesToBeValidated", $object->ref), $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"] . '?action=validate&token=' . newToken() . '&id=' . $object->id, (string) $object->id, -1); |
|
| 3483 | + print dolGetButtonAction($langs->trans("ErrorObjectMustHaveLinesToBeValidated", $object->ref), $langs->trans('Validate'), 'default', $_SERVER["PHP_SELF"].'?action=validate&token='.newToken().'&id='.$object->id, (string) $object->id, -1); |
|
| 3484 | 3484 | } |
| 3485 | 3485 | } |
| 3486 | 3486 | // Edit |
| 3487 | 3487 | if (($object->status == Commande::STATUS_VALIDATED || ($object->status == Commande::STATUS_SHIPMENTONPROCESS && getDolGlobalString('EDIT_ORDER_SHIPMENT_ON_PROCESS'))) && $usercancreate) { |
| 3488 | - print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"] . '?action=modif&token=' . newToken() . '&id=' . $object->id, ''); |
|
| 3488 | + print dolGetButtonAction('', $langs->trans('Modify'), 'default', $_SERVER["PHP_SELF"].'?action=modif&token='.newToken().'&id='.$object->id, ''); |
|
| 3489 | 3489 | } |
| 3490 | 3490 | |
| 3491 | 3491 | $arrayforbutaction = array(); |
@@ -3497,7 +3497,7 @@ discard block |
||
| 3497 | 3497 | 'enabled' => (isModEnabled("supplier_order") && $object->status > Commande::STATUS_DRAFT), |
| 3498 | 3498 | 'perm' => $usercancreatepurchaseorder, |
| 3499 | 3499 | 'label' => 'AddPurchaseOrder', |
| 3500 | - 'url' => '/fourn/commande/card.php?action=create&origin=' . urlencode($object->element) . '&originid=' . ((int) $object->id) |
|
| 3500 | + 'url' => '/fourn/commande/card.php?action=create&origin='.urlencode($object->element).'&originid='.((int) $object->id) |
|
| 3501 | 3501 | ); |
| 3502 | 3502 | } |
| 3503 | 3503 | |
@@ -3514,7 +3514,7 @@ discard block |
||
| 3514 | 3514 | 'enabled' => (isModEnabled("intervention") && $object->status > Commande::STATUS_DRAFT && $object->status < Commande::STATUS_CLOSED && $object->getNbOfServicesLines() > 0), |
| 3515 | 3515 | 'perm' => ($user->hasRight('ficheinter', 'creer') == 1), |
| 3516 | 3516 | 'label' => 'AddIntervention', |
| 3517 | - 'url' => '/fichinter/card.php?action=create&origin=' . urlencode($object->element) . '&originid=' . ((int) $object->id) . '&socid=' . ((int) $object->socid), |
|
| 3517 | + 'url' => '/fichinter/card.php?action=create&origin='.urlencode($object->element).'&originid='.((int) $object->id).'&socid='.((int) $object->socid), |
|
| 3518 | 3518 | ); |
| 3519 | 3519 | } |
| 3520 | 3520 | |
@@ -3524,7 +3524,7 @@ discard block |
||
| 3524 | 3524 | 'enabled' => (isModEnabled("contract") && ($object->status == Commande::STATUS_VALIDATED || $object->status == Commande::STATUS_SHIPMENTONPROCESS || $object->status == Commande::STATUS_CLOSED)), |
| 3525 | 3525 | 'perm' => ($user->hasRight('contrat', 'creer') == 1), |
| 3526 | 3526 | 'label' => 'AddContract', |
| 3527 | - 'url' => '/contrat/card.php?action=create&origin=' . $object->element . '&originid=' . $object->id . '&socid=' . $object->socid, |
|
| 3527 | + 'url' => '/contrat/card.php?action=create&origin='.$object->element.'&originid='.$object->id.'&socid='.$object->socid, |
|
| 3528 | 3528 | ); |
| 3529 | 3529 | /*if (isModEnabled('contrat') && ($object->status == Commande::STATUS_VALIDATED || $object->status == Commande::STATUS_SHIPMENTONPROCESS || $object->status == Commande::STATUS_CLOSED)) { |
| 3530 | 3530 | $langs->load("contracts"); |
@@ -3548,7 +3548,7 @@ discard block |
||
| 3548 | 3548 | 'enabled' => (isModEnabled("shipping") && ($object->status > Commande::STATUS_DRAFT && $object->status < Commande::STATUS_CLOSED && ($object->getNbOfProductsLines() > 0 || getDolGlobalString('STOCK_SUPPORTS_SERVICES')))), |
| 3549 | 3549 | 'perm' => $user->hasRight('expedition', 'creer'), |
| 3550 | 3550 | 'label' => 'CreateShipment', |
| 3551 | - 'url' => '/expedition/shipment.php?id=' . $object->id |
|
| 3551 | + 'url' => '/expedition/shipment.php?id='.$object->id |
|
| 3552 | 3552 | ); |
| 3553 | 3553 | } else { |
| 3554 | 3554 | //c$langs->load("errors"); |
@@ -3558,7 +3558,7 @@ discard block |
||
| 3558 | 3558 | 'enabled' => (isModEnabled("shipping") && ($object->status > Commande::STATUS_DRAFT && $object->status < Commande::STATUS_CLOSED && ($object->getNbOfProductsLines() > 0 || getDolGlobalString('STOCK_SUPPORTS_SERVICES')))), |
| 3559 | 3559 | 'perm' => 0, |
| 3560 | 3560 | 'label' => 'CreateShipment', |
| 3561 | - 'url' => '/expedition/shipment.php?id=' . $object->id |
|
| 3561 | + 'url' => '/expedition/shipment.php?id='.$object->id |
|
| 3562 | 3562 | ); |
| 3563 | 3563 | } |
| 3564 | 3564 | } |
@@ -3570,7 +3570,7 @@ discard block |
||
| 3570 | 3570 | 'enabled' => (isModEnabled('invoice') && $object->status > Commande::STATUS_DRAFT && !$object->billed && $object->total_ttc >= 0), |
| 3571 | 3571 | 'perm' => ($user->hasRight('facture', 'creer') && !getDolGlobalInt('WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER')), |
| 3572 | 3572 | 'label' => 'CreateBill', |
| 3573 | - 'url' => '/compta/facture/card.php?action=create&token=' . newToken() . '&origin=' . urlencode($object->element) . '&originid=' . $object->id . '&socid=' . $object->socid |
|
| 3573 | + 'url' => '/compta/facture/card.php?action=create&token='.newToken().'&origin='.urlencode($object->element).'&originid='.$object->id.'&socid='.$object->socid |
|
| 3574 | 3574 | ); |
| 3575 | 3575 | /* |
| 3576 | 3576 | if (isModEnabled('facture') && $object->status > Commande::STATUS_DRAFT && !$object->billed && $object->total_ttc >= 0) { |
@@ -3591,38 +3591,38 @@ discard block |
||
| 3591 | 3591 | |
| 3592 | 3592 | // Set to shipped |
| 3593 | 3593 | if (($object->status == Commande::STATUS_VALIDATED || $object->status == Commande::STATUS_SHIPMENTONPROCESS) && $usercanclose) { |
| 3594 | - print dolGetButtonAction('', $langs->trans('ClassifyShipped'), 'default', $_SERVER["PHP_SELF"] . '?action=shipped&token=' . newToken() . '&id=' . $object->id, ''); |
|
| 3594 | + print dolGetButtonAction('', $langs->trans('ClassifyShipped'), 'default', $_SERVER["PHP_SELF"].'?action=shipped&token='.newToken().'&id='.$object->id, ''); |
|
| 3595 | 3595 | } |
| 3596 | 3596 | |
| 3597 | 3597 | // Set billed or unbilled |
| 3598 | 3598 | // Note: Even if module invoice is not enabled, we should be able to use button "Classified billed" |
| 3599 | 3599 | if ($object->status > Commande::STATUS_DRAFT && !$object->billed && $object->total_ttc >= 0) { |
| 3600 | 3600 | if ($usercancreate && $object->status >= Commande::STATUS_VALIDATED && !getDolGlobalString('ORDER_DISABLE_CLASSIFY_BILLED_FROM_ORDER') && !getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT')) { |
| 3601 | - print dolGetButtonAction('', $langs->trans('ClassifyBilled'), 'default', $_SERVER["PHP_SELF"] . '?action=classifybilled&token=' . newToken() . '&id=' . $object->id, ''); |
|
| 3601 | + print dolGetButtonAction('', $langs->trans('ClassifyBilled'), 'default', $_SERVER["PHP_SELF"].'?action=classifybilled&token='.newToken().'&id='.$object->id, ''); |
|
| 3602 | 3602 | } |
| 3603 | 3603 | } |
| 3604 | 3604 | if ($object->status > Commande::STATUS_DRAFT && $object->billed) { |
| 3605 | 3605 | if ($usercancreate && $object->status >= Commande::STATUS_VALIDATED && !getDolGlobalString('ORDER_DISABLE_CLASSIFY_BILLED_FROM_ORDER') && !getDolGlobalString('WORKFLOW_BILL_ON_SHIPMENT')) { |
| 3606 | - print dolGetButtonAction('', $langs->trans('ClassifyUnBilled'), 'delete', $_SERVER["PHP_SELF"] . '?action=classifyunbilled&token=' . newToken() . '&id=' . $object->id, ''); |
|
| 3606 | + print dolGetButtonAction('', $langs->trans('ClassifyUnBilled'), 'delete', $_SERVER["PHP_SELF"].'?action=classifyunbilled&token='.newToken().'&id='.$object->id, ''); |
|
| 3607 | 3607 | } |
| 3608 | 3608 | } |
| 3609 | 3609 | |
| 3610 | 3610 | // Clone |
| 3611 | 3611 | if ($usercancreate) { |
| 3612 | - print dolGetButtonAction('', $langs->trans('ToClone'), 'default', $_SERVER["PHP_SELF"] . '?action=clone&token=' . newToken() . '&id=' . $object->id . '&socid=' . $object->socid, ''); |
|
| 3612 | + print dolGetButtonAction('', $langs->trans('ToClone'), 'default', $_SERVER["PHP_SELF"].'?action=clone&token='.newToken().'&id='.$object->id.'&socid='.$object->socid, ''); |
|
| 3613 | 3613 | } |
| 3614 | 3614 | |
| 3615 | 3615 | // Cancel order |
| 3616 | 3616 | if ($object->status == Commande::STATUS_VALIDATED && !empty($usercancancel)) { |
| 3617 | - print '<a class="butActionDelete" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=cancel&token=' . newToken() . '">' . $langs->trans("CancelOrder") . '</a>'; |
|
| 3617 | + print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=cancel&token='.newToken().'">'.$langs->trans("CancelOrder").'</a>'; |
|
| 3618 | 3618 | } |
| 3619 | 3619 | |
| 3620 | 3620 | // Delete order |
| 3621 | 3621 | if ($usercandelete) { |
| 3622 | 3622 | if ($numshipping == 0) { |
| 3623 | - print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER["PHP_SELF"] . '?action=delete&token=' . newToken() . '&id=' . $object->id, ''); |
|
| 3623 | + print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$object->id, ''); |
|
| 3624 | 3624 | } else { |
| 3625 | - print dolGetButtonAction($langs->trans('ShippingExist'), $langs->trans('Delete'), 'default', $_SERVER['PHP_SELF'] . '#', '', false); |
|
| 3625 | + print dolGetButtonAction($langs->trans('ShippingExist'), $langs->trans('Delete'), 'default', $_SERVER['PHP_SELF'].'#', '', false); |
|
| 3626 | 3626 | } |
| 3627 | 3627 | } |
| 3628 | 3628 | } |
@@ -3639,9 +3639,9 @@ discard block |
||
| 3639 | 3639 | print '<a name="builddoc"></a>'; // ancre |
| 3640 | 3640 | // Documents |
| 3641 | 3641 | $objref = dol_sanitizeFileName($object->ref); |
| 3642 | - $relativepath = $objref . '/' . $objref . '.pdf'; |
|
| 3643 | - $filedir = $conf->commande->multidir_output[$object->entity ?? $conf->entity] . '/' . $objref; |
|
| 3644 | - $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id; |
|
| 3642 | + $relativepath = $objref.'/'.$objref.'.pdf'; |
|
| 3643 | + $filedir = $conf->commande->multidir_output[$object->entity ?? $conf->entity].'/'.$objref; |
|
| 3644 | + $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; |
|
| 3645 | 3645 | $genallowed = $usercanread; |
| 3646 | 3646 | $delallowed = $usercancreate; |
| 3647 | 3647 | print $formfile->showdocuments('commande', $objref, $filedir, $urlsource, $genallowed, (int) $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang, '', $object); |
@@ -3664,7 +3664,7 @@ discard block |
||
| 3664 | 3664 | |
| 3665 | 3665 | // Show online payment link |
| 3666 | 3666 | // The list can be complete by the hook 'doValidatePayment' executed inside getValidOnlinePaymentMethods() |
| 3667 | - include_once DOL_DOCUMENT_ROOT . '/core/lib/payments.lib.php'; |
|
| 3667 | + include_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; |
|
| 3668 | 3668 | $validpaymentmethod = getValidOnlinePaymentMethods(''); |
| 3669 | 3669 | $useonlinepayment = count($validpaymentmethod); |
| 3670 | 3670 | |
@@ -3673,8 +3673,8 @@ discard block |
||
| 3673 | 3673 | } |
| 3674 | 3674 | if ($object->status != Commande::STATUS_DRAFT && $useonlinepayment) { |
| 3675 | 3675 | print '<br><!-- Link to pay -->'; |
| 3676 | - require_once DOL_DOCUMENT_ROOT . '/core/lib/payments.lib.php'; |
|
| 3677 | - print showOnlinePaymentUrl('order', $object->ref) . '<br>'; |
|
| 3676 | + require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; |
|
| 3677 | + print showOnlinePaymentUrl('order', $object->ref).'<br>'; |
|
| 3678 | 3678 | } |
| 3679 | 3679 | |
| 3680 | 3680 | print '</div><div class="fichehalfright">'; |
@@ -3682,11 +3682,11 @@ discard block |
||
| 3682 | 3682 | $MAXEVENT = 10; |
| 3683 | 3683 | |
| 3684 | 3684 | //button to go to messaging from the events box |
| 3685 | - $morehtmlcenter = dolGetButtonTitle($langs->trans('FullConversation'), '', 'fa fa-comments imgforviewmode', DOL_URL_ROOT . '/commande/messaging.php?id=' . $object->id); |
|
| 3686 | - $morehtmlcenter .= dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT . '/commande/agenda.php?id=' . $object->id); |
|
| 3685 | + $morehtmlcenter = dolGetButtonTitle($langs->trans('FullConversation'), '', 'fa fa-comments imgforviewmode', DOL_URL_ROOT.'/commande/messaging.php?id='.$object->id); |
|
| 3686 | + $morehtmlcenter .= dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/commande/agenda.php?id='.$object->id); |
|
| 3687 | 3687 | |
| 3688 | 3688 | // List of actions on element |
| 3689 | - include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php'; |
|
| 3689 | + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; |
|
| 3690 | 3690 | $formactions = new FormActions($db); |
| 3691 | 3691 | $somethingshown = $formactions->showactions($object, 'order', $socid, 1, '', $MAXEVENT, '', $morehtmlcenter); // Show all action for thirdparty |
| 3692 | 3692 | |
@@ -3697,9 +3697,9 @@ discard block |
||
| 3697 | 3697 | $modelmail = 'order_send'; |
| 3698 | 3698 | $defaulttopic = 'SendOrderRef'; |
| 3699 | 3699 | $diroutput = getMultidirOutput($object); |
| 3700 | - $trackid = 'ord' . $object->id; |
|
| 3700 | + $trackid = 'ord'.$object->id; |
|
| 3701 | 3701 | |
| 3702 | - include DOL_DOCUMENT_ROOT . '/core/tpl/card_presend.tpl.php'; |
|
| 3702 | + include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; |
|
| 3703 | 3703 | } |
| 3704 | 3704 | } |
| 3705 | 3705 | |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | 'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => 1, 'visible' => -2, 'position' => 1000, 'notnull' => -1,), |
| 109 | 109 | 'model_pdf' => array('type' => 'varchar(255)', 'label' => 'Model pdf', 'enabled' => 1, 'visible' => 0, 'position' => 1010), |
| 110 | 110 | 'status' => array('type' => 'integer', 'label' => 'Status', 'enabled' => 1, 'visible' => 2, 'position' => 1000, 'default' => '0', 'notnull' => 1, 'index' => 1, 'arrayofkeyval' => array('0' => 'Draft', '1' => 'Validated', '2' => 'InProgress', '3' => 'StatusMOProduced', '9' => 'Canceled')), |
| 111 | - 'fk_parent_line' => array('type' => 'integer:MoLine:mrp/class/mo.class.php', 'label' => 'ParentMo', 'enabled' => 1, 'visible' => 0, 'position' => 1020, 'default' => '0', 'notnull' => 0, 'index' => 1,'showoncombobox' => 0), |
|
| 111 | + 'fk_parent_line' => array('type' => 'integer:MoLine:mrp/class/mo.class.php', 'label' => 'ParentMo', 'enabled' => 1, 'visible' => 0, 'position' => 1020, 'default' => '0', 'notnull' => 0, 'index' => 1, 'showoncombobox' => 0), |
|
| 112 | 112 | ); |
| 113 | 113 | |
| 114 | 114 | /** |
@@ -350,7 +350,7 @@ discard block |
||
| 350 | 350 | } |
| 351 | 351 | |
| 352 | 352 | if (!$error) { |
| 353 | - $result = $this->createProduction($user, $notrigger); // Insert lines from BOM |
|
| 353 | + $result = $this->createProduction($user, $notrigger); // Insert lines from BOM |
|
| 354 | 354 | if ($result <= 0) { |
| 355 | 355 | $error++; |
| 356 | 356 | } |
@@ -853,7 +853,7 @@ discard block |
||
| 853 | 853 | $oldQty = $this->oldQty; |
| 854 | 854 | $newQty = $this->qty; |
| 855 | 855 | if ($newQty != $oldQty && !empty($this->oldQty)) { |
| 856 | - $sql = "SELECT rowid FROM " . MAIN_DB_PREFIX . "mrp_production WHERE fk_mo = " . (int) $this->id; |
|
| 856 | + $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."mrp_production WHERE fk_mo = ".(int) $this->id; |
|
| 857 | 857 | $resql = $this->db->query($sql); |
| 858 | 858 | if ($resql) { |
| 859 | 859 | while ($obj = $this->db->fetch_object($resql)) { |
@@ -942,7 +942,7 @@ discard block |
||
| 942 | 942 | } |
| 943 | 943 | $productstatic = new Product($this->db); |
| 944 | 944 | |
| 945 | - $arrayoflines = $this->fetchLinesLinked('consumed', $idline); // Get lines consumed under the one to delete |
|
| 945 | + $arrayoflines = $this->fetchLinesLinked('consumed', $idline); // Get lines consumed under the one to delete |
|
| 946 | 946 | |
| 947 | 947 | $result = 0; |
| 948 | 948 | |
@@ -1045,7 +1045,7 @@ discard block |
||
| 1045 | 1045 | if (getDolGlobalString('MRP_MO_ADDON')) { |
| 1046 | 1046 | $mybool = false; |
| 1047 | 1047 | |
| 1048 | - $file = getDolGlobalString('MRP_MO_ADDON') . ".php"; |
|
| 1048 | + $file = getDolGlobalString('MRP_MO_ADDON').".php"; |
|
| 1049 | 1049 | $classname = getDolGlobalString('MRP_MO_ADDON'); |
| 1050 | 1050 | |
| 1051 | 1051 | // Include file with class |
@@ -1319,8 +1319,8 @@ discard block |
||
| 1319 | 1319 | return 1; |
| 1320 | 1320 | } |
| 1321 | 1321 | |
| 1322 | - require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; |
|
| 1323 | - require_once DOL_DOCUMENT_ROOT . '/product/stock/class/mouvementstock.class.php'; |
|
| 1322 | + require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; |
|
| 1323 | + require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; |
|
| 1324 | 1324 | $error = 0; |
| 1325 | 1325 | $langs->load('stocks'); |
| 1326 | 1326 | |
@@ -1441,13 +1441,13 @@ discard block |
||
| 1441 | 1441 | $datas['qty'] = '<br><b>'.$langs->trans('QtyToProduce').':</b> '.$this->qty; |
| 1442 | 1442 | } |
| 1443 | 1443 | if (!$nofetch && isset($this->fk_product)) { |
| 1444 | - require_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; |
|
| 1444 | + require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; |
|
| 1445 | 1445 | $product = new Product($this->db); |
| 1446 | 1446 | $product->fetch($this->fk_product); |
| 1447 | 1447 | $datas['product'] = '<br><b>'.$langs->trans('Product').':</b> '.$product->getNomUrl(1, '', 0, -1, 1); |
| 1448 | 1448 | } |
| 1449 | 1449 | if (!$nofetch && isset($this->fk_warehouse)) { |
| 1450 | - require_once DOL_DOCUMENT_ROOT . '/product/stock/class/entrepot.class.php'; |
|
| 1450 | + require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; |
|
| 1451 | 1451 | $warehouse = new Entrepot($this->db); |
| 1452 | 1452 | $warehouse->fetch($this->fk_warehouse); |
| 1453 | 1453 | $datas['warehouse'] = '<br><b>'.$langs->trans('WarehouseForProduction').':</b> '.$warehouse->getNomUrl(1, '', 0, 1); |
@@ -1835,7 +1835,7 @@ discard block |
||
| 1835 | 1835 | $this->tpl['efficiency'] = $line->efficiency; |
| 1836 | 1836 | |
| 1837 | 1837 | |
| 1838 | - global $conf; // used into template |
|
| 1838 | + global $conf; // used into template |
|
| 1839 | 1839 | $res = include DOL_DOCUMENT_ROOT.'/mrp/tpl/originproductline.tpl.php'; |
| 1840 | 1840 | } |
| 1841 | 1841 | |
@@ -1996,14 +1996,14 @@ discard block |
||
| 1996 | 1996 | $now = dol_now(); |
| 1997 | 1997 | |
| 1998 | 1998 | $sql = "SELECT rowid, date_end_planned FROM ".$this->db->prefix()."mrp_mo"; |
| 1999 | - $sql .= " WHERE status IN (" . self::STATUS_VALIDATED . ", " . self::STATUS_INPROGRESS .")"; // 1 = Ouvert, 2 = En cours |
|
| 1999 | + $sql .= " WHERE status IN (".self::STATUS_VALIDATED.", ".self::STATUS_INPROGRESS.")"; // 1 = Ouvert, 2 = En cours |
|
| 2000 | 2000 | $sql .= " AND entity IN (".getEntity('mrp_mo').")"; |
| 2001 | 2001 | |
| 2002 | 2002 | $resql = $this->db->query($sql); |
| 2003 | 2003 | if ($resql) { |
| 2004 | 2004 | $langs->load("mrp"); |
| 2005 | 2005 | $response = new WorkboardResponse(); |
| 2006 | - $warning_delay = $conf->mrp->progress->warning_delay ; |
|
| 2006 | + $warning_delay = $conf->mrp->progress->warning_delay; |
|
| 2007 | 2007 | $response->warning_delay = $warning_delay / 86400; |
| 2008 | 2008 | $response->label = $langs->trans("MOProgress"); |
| 2009 | 2009 | $response->labelShort = $langs->trans("MOProgress"); |