@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | if (getDolGlobalString('EXPEDITION_ADDON_NUMBER')) { |
| 297 | 297 | $mybool = false; |
| 298 | 298 | |
| 299 | - $file = getDolGlobalString('EXPEDITION_ADDON_NUMBER') . ".php"; |
|
| 299 | + $file = getDolGlobalString('EXPEDITION_ADDON_NUMBER').".php"; |
|
| 300 | 300 | $classname = getDolGlobalString('EXPEDITION_ADDON_NUMBER'); |
| 301 | 301 | |
| 302 | 302 | // Include file with class |
@@ -960,7 +960,7 @@ discard block |
||
| 960 | 960 | // If product need a batch number, we should not have called this function but addline_batch instead. |
| 961 | 961 | // If this happen, we may have a bug in card.php page |
| 962 | 962 | if (isModEnabled('productbatch') && !empty($orderline->fk_product) && !empty($orderline->product_tobatch)) { |
| 963 | - $this->error = 'ADDLINE_WAS_CALLED_INSTEAD_OF_ADDLINEBATCH '.$orderline->id.' '.$orderline->fk_product; // |
|
| 963 | + $this->error = 'ADDLINE_WAS_CALLED_INSTEAD_OF_ADDLINEBATCH '.$orderline->id.' '.$orderline->fk_product; // |
|
| 964 | 964 | return -4; |
| 965 | 965 | } |
| 966 | 966 | |
@@ -1532,8 +1532,8 @@ discard block |
||
| 1532 | 1532 | $this->db->commit(); |
| 1533 | 1533 | |
| 1534 | 1534 | // Delete record into ECM index (Note that delete is also done when deleting files with the dol_delete_dir_recursive |
| 1535 | - $this->deleteEcmFiles(0); // Deleting files physically is done later with the dol_delete_dir_recursive |
|
| 1536 | - $this->deleteEcmFiles(1); // Deleting files physically is done later with the dol_delete_dir_recursive |
|
| 1535 | + $this->deleteEcmFiles(0); // Deleting files physically is done later with the dol_delete_dir_recursive |
|
| 1536 | + $this->deleteEcmFiles(1); // Deleting files physically is done later with the dol_delete_dir_recursive |
|
| 1537 | 1537 | |
| 1538 | 1538 | // We delete PDFs |
| 1539 | 1539 | $ref = dol_sanitizeFileName($this->ref); |
@@ -1606,7 +1606,7 @@ discard block |
||
| 1606 | 1606 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = cd.fk_product"; |
| 1607 | 1607 | $sql .= " WHERE ed.fk_expedition = ".((int) $this->id); |
| 1608 | 1608 | $sql .= " AND ed.fk_origin_line = cd.rowid"; |
| 1609 | - $sql .= " ORDER BY cd.rang, ed.fk_origin_line"; // We need after a break on fk_origin_line but when there is no break on fk_origin_line, cd.rang is same so we can add it as first order criteria. |
|
| 1609 | + $sql .= " ORDER BY cd.rang, ed.fk_origin_line"; // We need after a break on fk_origin_line but when there is no break on fk_origin_line, cd.rang is same so we can add it as first order criteria. |
|
| 1610 | 1610 | |
| 1611 | 1611 | dol_syslog(get_class($this)."::fetch_lines", LOG_DEBUG); |
| 1612 | 1612 | $resql = $this->db->query($sql); |
@@ -1635,13 +1635,13 @@ discard block |
||
| 1635 | 1635 | |
| 1636 | 1636 | |
| 1637 | 1637 | if ($originline > 0 && $originline == $obj->fk_origin_line) { |
| 1638 | - '@phan-var-force ExpeditionLigne $line'; // $line from previous loop |
|
| 1638 | + '@phan-var-force ExpeditionLigne $line'; // $line from previous loop |
|
| 1639 | 1639 | $line->entrepot_id = 0; // entrepod_id in details_entrepot |
| 1640 | 1640 | $line->qty_shipped += $obj->qty_shipped; |
| 1641 | 1641 | } else { |
| 1642 | - $line = new ExpeditionLigne($this->db); // new group to start |
|
| 1643 | - $line->entrepot_id = $obj->fk_entrepot; // this is a property of a shipment line |
|
| 1644 | - $line->qty_shipped = $obj->qty_shipped; // this is a property of a shipment line |
|
| 1642 | + $line = new ExpeditionLigne($this->db); // new group to start |
|
| 1643 | + $line->entrepot_id = $obj->fk_entrepot; // this is a property of a shipment line |
|
| 1644 | + $line->qty_shipped = $obj->qty_shipped; // this is a property of a shipment line |
|
| 1645 | 1645 | } |
| 1646 | 1646 | |
| 1647 | 1647 | $detail_entrepot = new stdClass(); |
@@ -1666,8 +1666,8 @@ discard block |
||
| 1666 | 1666 | $line->ref = $obj->product_ref; // TODO deprecated |
| 1667 | 1667 | $line->product_ref = $obj->product_ref; |
| 1668 | 1668 | $line->product_label = $obj->product_label; |
| 1669 | - $line->libelle = $obj->product_label; // TODO deprecated |
|
| 1670 | - $line->product_barcode = $obj->product_barcode; // Barcode number product |
|
| 1669 | + $line->libelle = $obj->product_label; // TODO deprecated |
|
| 1670 | + $line->product_barcode = $obj->product_barcode; // Barcode number product |
|
| 1671 | 1671 | $line->product_tosell = $obj->product_tosell; |
| 1672 | 1672 | $line->product_tobuy = $obj->product_tobuy; |
| 1673 | 1673 | $line->product_tobatch = $obj->product_tobatch; |
@@ -1913,7 +1913,7 @@ discard block |
||
| 1913 | 1913 | } |
| 1914 | 1914 | $result .= $linkend; |
| 1915 | 1915 | global $action; |
| 1916 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
| 1916 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
| 1917 | 1917 | $parameters = array('id' => $this->id, 'getnomurl' => &$result); |
| 1918 | 1918 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
| 1919 | 1919 | if ($reshook > 0) { |
@@ -2243,12 +2243,12 @@ discard block |
||
| 2243 | 2243 | if ($shipments_match_order) { |
| 2244 | 2244 | dol_syslog("Qty for the ".count($order->lines)." lines of the origin order is same than qty for lines in the shipment we close (shipments_match_order is true), with new status Expedition::STATUS_CLOSED=".self::STATUS_CLOSED.', so we close order'); |
| 2245 | 2245 | // We close the order |
| 2246 | - $order->cloture($user); // Note this may also create an invoice if module workflow ask it |
|
| 2246 | + $order->cloture($user); // Note this may also create an invoice if module workflow ask it |
|
| 2247 | 2247 | } |
| 2248 | 2248 | } |
| 2249 | 2249 | |
| 2250 | - $this->statut = self::STATUS_CLOSED; // Will be revert to STATUS_VALIDATED at end if there is a rollback |
|
| 2251 | - $this->status = self::STATUS_CLOSED; // Will be revert to STATUS_VALIDATED at end if there is a rollback |
|
| 2250 | + $this->statut = self::STATUS_CLOSED; // Will be revert to STATUS_VALIDATED at end if there is a rollback |
|
| 2251 | + $this->status = self::STATUS_CLOSED; // Will be revert to STATUS_VALIDATED at end if there is a rollback |
|
| 2252 | 2252 | |
| 2253 | 2253 | // If stock increment is done on closing |
| 2254 | 2254 | if (!$error && isModEnabled('stock') && getDolGlobalString('STOCK_CALCULATE_ON_SHIPMENT_CLOSE')) { |
@@ -2297,7 +2297,7 @@ discard block |
||
| 2297 | 2297 | |
| 2298 | 2298 | $error = 0; |
| 2299 | 2299 | |
| 2300 | - require_once DOL_DOCUMENT_ROOT . '/product/stock/class/mouvementstock.class.php'; |
|
| 2300 | + require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; |
|
| 2301 | 2301 | |
| 2302 | 2302 | $langs->load("agenda"); |
| 2303 | 2303 | |
@@ -2307,14 +2307,14 @@ discard block |
||
| 2307 | 2307 | $sql .= " e.ref,"; |
| 2308 | 2308 | $sql .= " edb.rowid as edbrowid, edb.eatby, edb.sellby, edb.batch, edb.qty as edbqty, edb.fk_origin_stock,"; |
| 2309 | 2309 | $sql .= " cd.rowid as cdid, ed.rowid as edid"; |
| 2310 | - $sql .= " FROM " . MAIN_DB_PREFIX . "commandedet as cd,"; |
|
| 2311 | - $sql .= " " . MAIN_DB_PREFIX . "expeditiondet as ed"; |
|
| 2312 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "expeditiondet_batch as edb on edb.fk_expeditiondet = ed.rowid"; |
|
| 2313 | - $sql .= " INNER JOIN " . MAIN_DB_PREFIX . "expedition as e ON ed.fk_expedition = e.rowid"; |
|
| 2314 | - $sql .= " WHERE ed.fk_expedition = " . ((int) $this->id); |
|
| 2310 | + $sql .= " FROM ".MAIN_DB_PREFIX."commandedet as cd,"; |
|
| 2311 | + $sql .= " ".MAIN_DB_PREFIX."expeditiondet as ed"; |
|
| 2312 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."expeditiondet_batch as edb on edb.fk_expeditiondet = ed.rowid"; |
|
| 2313 | + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."expedition as e ON ed.fk_expedition = e.rowid"; |
|
| 2314 | + $sql .= " WHERE ed.fk_expedition = ".((int) $this->id); |
|
| 2315 | 2315 | $sql .= " AND cd.rowid = ed.fk_origin_line"; |
| 2316 | 2316 | |
| 2317 | - dol_syslog(get_class($this) . "::valid select details", LOG_DEBUG); |
|
| 2317 | + dol_syslog(get_class($this)."::valid select details", LOG_DEBUG); |
|
| 2318 | 2318 | $resql = $this->db->query($sql); |
| 2319 | 2319 | if ($resql) { |
| 2320 | 2320 | $cpt = $this->db->num_rows($resql); |
@@ -2328,7 +2328,7 @@ discard block |
||
| 2328 | 2328 | if ($qty <= 0 || ($qty < 0 && !getDolGlobalInt('SHIPMENT_ALLOW_NEGATIVE_QTY'))) { |
| 2329 | 2329 | continue; |
| 2330 | 2330 | } |
| 2331 | - dol_syslog(get_class($this) . "::valid movement index " . $i . " ed.rowid=" . $obj->rowid . " edb.rowid=" . $obj->edbrowid); |
|
| 2331 | + dol_syslog(get_class($this)."::valid movement index ".$i." ed.rowid=".$obj->rowid." edb.rowid=".$obj->edbrowid); |
|
| 2332 | 2332 | |
| 2333 | 2333 | $mouvS = new MouvementStock($this->db); |
| 2334 | 2334 | $mouvS->origin = &$this; |
@@ -2623,7 +2623,7 @@ discard block |
||
| 2623 | 2623 | * @var int |
| 2624 | 2624 | * @deprecated |
| 2625 | 2625 | */ |
| 2626 | - public $line_id; // deprecated |
|
| 2626 | + public $line_id; // deprecated |
|
| 2627 | 2627 | |
| 2628 | 2628 | /** |
| 2629 | 2629 | * @deprecated |
@@ -2636,7 +2636,7 @@ discard block |
||
| 2636 | 2636 | * |
| 2637 | 2637 | * @var string |
| 2638 | 2638 | */ |
| 2639 | - public $fk_origin; // Example: 'orderline' |
|
| 2639 | + public $fk_origin; // Example: 'orderline' |
|
| 2640 | 2640 | |
| 2641 | 2641 | /** |
| 2642 | 2642 | * @var int ID |
@@ -87,23 +87,23 @@ discard block |
||
| 87 | 87 | $search_date_start_startmonth = GETPOSTINT('search_date_start_startmonth'); |
| 88 | 88 | $search_date_start_startyear = GETPOSTINT('search_date_start_startyear'); |
| 89 | 89 | $search_date_start_startday = GETPOSTINT('search_date_start_startday'); |
| 90 | -$search_date_start_start = dol_mktime(0, 0, 0, $search_date_start_startmonth, $search_date_start_startday, $search_date_start_startyear); // Use tzserver |
|
| 90 | +$search_date_start_start = dol_mktime(0, 0, 0, $search_date_start_startmonth, $search_date_start_startday, $search_date_start_startyear); // Use tzserver |
|
| 91 | 91 | $search_date_start_endmonth = GETPOSTINT('search_date_start_endmonth'); |
| 92 | 92 | $search_date_start_endyear = GETPOSTINT('search_date_start_endyear'); |
| 93 | 93 | $search_date_start_endday = GETPOSTINT('search_date_start_endday'); |
| 94 | -$search_date_start_end = dol_mktime(23, 59, 59, $search_date_start_endmonth, $search_date_start_endday, $search_date_start_endyear); // Use tzserver |
|
| 94 | +$search_date_start_end = dol_mktime(23, 59, 59, $search_date_start_endmonth, $search_date_start_endday, $search_date_start_endyear); // Use tzserver |
|
| 95 | 95 | |
| 96 | 96 | $search_date_end_startmonth = GETPOSTINT('search_date_end_startmonth'); |
| 97 | 97 | $search_date_end_startyear = GETPOSTINT('search_date_end_startyear'); |
| 98 | 98 | $search_date_end_startday = GETPOSTINT('search_date_end_startday'); |
| 99 | -$search_date_end_start = dol_mktime(0, 0, 0, $search_date_end_startmonth, $search_date_end_startday, $search_date_end_startyear); // Use tzserver |
|
| 99 | +$search_date_end_start = dol_mktime(0, 0, 0, $search_date_end_startmonth, $search_date_end_startday, $search_date_end_startyear); // Use tzserver |
|
| 100 | 100 | $search_date_end_endmonth = GETPOSTINT('search_date_end_endmonth'); |
| 101 | 101 | $search_date_end_endyear = GETPOSTINT('search_date_end_endyear'); |
| 102 | 102 | $search_date_end_endday = GETPOSTINT('search_date_end_endday'); |
| 103 | -$search_date_end_end = dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear); // Use tzserver |
|
| 103 | +$search_date_end_end = dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear); // Use tzserver |
|
| 104 | 104 | |
| 105 | 105 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'projecttasklist'; |
| 106 | -$optioncss = GETPOST('optioncss', 'aZ'); |
|
| 106 | +$optioncss = GETPOST('optioncss', 'aZ'); |
|
| 107 | 107 | //if (! $user->rights->projet->all->lire) $mine=1; // Special for projects |
| 108 | 108 | |
| 109 | 109 | $object = new Project($db); |
@@ -524,7 +524,7 @@ discard block |
||
| 524 | 524 | $param .= '&search_date_end_endday='.urlencode((string) ($search_date_end_endday)); |
| 525 | 525 | } |
| 526 | 526 | if ($search_date_end_end) { |
| 527 | - $param .= '&search_date_end_end=' . urlencode($search_date_end_end); |
|
| 527 | + $param .= '&search_date_end_end='.urlencode($search_date_end_end); |
|
| 528 | 528 | } |
| 529 | 529 | if ($search_planedworkload) { |
| 530 | 530 | $param .= '&search_planedworkload='.urlencode($search_planedworkload); |
@@ -564,7 +564,7 @@ discard block |
||
| 564 | 564 | if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) { |
| 565 | 565 | $tmpurl = $_SESSION['pageforbacktolist']['project']; |
| 566 | 566 | $tmpurl = preg_replace('/__SOCID__/', $object->socid, $tmpurl); |
| 567 | - $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?'). 'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
| 567 | + $linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?').'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
|
| 568 | 568 | } else { |
| 569 | 569 | $linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>'; |
| 570 | 570 | } |
@@ -729,8 +729,8 @@ discard block |
||
| 729 | 729 | |
| 730 | 730 | $defaultref = ''; |
| 731 | 731 | $obj = !getDolGlobalString('PROJECT_TASK_ADDON') ? 'mod_task_simple' : $conf->global->PROJECT_TASK_ADDON; |
| 732 | - if (getDolGlobalString('PROJECT_TASK_ADDON') && is_readable(DOL_DOCUMENT_ROOT."/core/modules/project/task/" . getDolGlobalString('PROJECT_TASK_ADDON').".php")) { |
|
| 733 | - require_once DOL_DOCUMENT_ROOT."/core/modules/project/task/" . getDolGlobalString('PROJECT_TASK_ADDON').'.php'; |
|
| 732 | + if (getDolGlobalString('PROJECT_TASK_ADDON') && is_readable(DOL_DOCUMENT_ROOT."/core/modules/project/task/".getDolGlobalString('PROJECT_TASK_ADDON').".php")) { |
|
| 733 | + require_once DOL_DOCUMENT_ROOT."/core/modules/project/task/".getDolGlobalString('PROJECT_TASK_ADDON').'.php'; |
|
| 734 | 734 | $modTask = new $obj(); |
| 735 | 735 | $defaultref = $modTask->getNextValue($object->thirdparty, null); |
| 736 | 736 | } |
@@ -144,38 +144,38 @@ discard block |
||
| 144 | 144 | $search_date_start_startmonth = GETPOSTINT('search_date_start_startmonth'); |
| 145 | 145 | $search_date_start_startyear = GETPOSTINT('search_date_start_startyear'); |
| 146 | 146 | $search_date_start_startday = GETPOSTINT('search_date_start_startday'); |
| 147 | -$search_date_start_start = dol_mktime(0, 0, 0, $search_date_start_startmonth, $search_date_start_startday, $search_date_start_startyear); // Use tzserver |
|
| 147 | +$search_date_start_start = dol_mktime(0, 0, 0, $search_date_start_startmonth, $search_date_start_startday, $search_date_start_startyear); // Use tzserver |
|
| 148 | 148 | $search_date_start_endmonth = GETPOSTINT('search_date_start_endmonth'); |
| 149 | 149 | $search_date_start_endyear = GETPOSTINT('search_date_start_endyear'); |
| 150 | 150 | $search_date_start_endday = GETPOSTINT('search_date_start_endday'); |
| 151 | -$search_date_start_end = dol_mktime(23, 59, 59, $search_date_start_endmonth, $search_date_start_endday, $search_date_start_endyear); // Use tzserver |
|
| 151 | +$search_date_start_end = dol_mktime(23, 59, 59, $search_date_start_endmonth, $search_date_start_endday, $search_date_start_endyear); // Use tzserver |
|
| 152 | 152 | |
| 153 | 153 | $search_date_end_startmonth = GETPOSTINT('search_date_end_startmonth'); |
| 154 | 154 | $search_date_end_startyear = GETPOSTINT('search_date_end_startyear'); |
| 155 | 155 | $search_date_end_startday = GETPOSTINT('search_date_end_startday'); |
| 156 | -$search_date_end_start = dol_mktime(0, 0, 0, $search_date_end_startmonth, $search_date_end_startday, $search_date_end_startyear); // Use tzserver |
|
| 156 | +$search_date_end_start = dol_mktime(0, 0, 0, $search_date_end_startmonth, $search_date_end_startday, $search_date_end_startyear); // Use tzserver |
|
| 157 | 157 | $search_date_end_endmonth = GETPOSTINT('search_date_end_endmonth'); |
| 158 | 158 | $search_date_end_endyear = GETPOSTINT('search_date_end_endyear'); |
| 159 | 159 | $search_date_end_endday = GETPOSTINT('search_date_end_endday'); |
| 160 | -$search_date_end_end = dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear); // Use tzserver |
|
| 160 | +$search_date_end_end = dol_mktime(23, 59, 59, $search_date_end_endmonth, $search_date_end_endday, $search_date_end_endyear); // Use tzserver |
|
| 161 | 161 | |
| 162 | 162 | $search_date_creation_startmonth = GETPOSTINT('search_date_creation_startmonth'); |
| 163 | 163 | $search_date_creation_startyear = GETPOSTINT('search_date_creation_startyear'); |
| 164 | 164 | $search_date_creation_startday = GETPOSTINT('search_date_creation_startday'); |
| 165 | -$search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear); // Use tzserver |
|
| 165 | +$search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear); // Use tzserver |
|
| 166 | 166 | $search_date_creation_endmonth = GETPOSTINT('search_date_creation_endmonth'); |
| 167 | 167 | $search_date_creation_endyear = GETPOSTINT('search_date_creation_endyear'); |
| 168 | 168 | $search_date_creation_endday = GETPOSTINT('search_date_creation_endday'); |
| 169 | -$search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear); // Use tzserver |
|
| 169 | +$search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear); // Use tzserver |
|
| 170 | 170 | |
| 171 | 171 | $search_date_modif_startmonth = GETPOSTINT('search_date_modif_startmonth'); |
| 172 | 172 | $search_date_modif_startyear = GETPOSTINT('search_date_modif_startyear'); |
| 173 | 173 | $search_date_modif_startday = GETPOSTINT('search_date_modif_startday'); |
| 174 | -$search_date_modif_start = dol_mktime(0, 0, 0, $search_date_modif_startmonth, $search_date_modif_startday, $search_date_modif_startyear); // Use tzserver |
|
| 174 | +$search_date_modif_start = dol_mktime(0, 0, 0, $search_date_modif_startmonth, $search_date_modif_startday, $search_date_modif_startyear); // Use tzserver |
|
| 175 | 175 | $search_date_modif_endmonth = GETPOSTINT('search_date_modif_endmonth'); |
| 176 | 176 | $search_date_modif_endyear = GETPOSTINT('search_date_modif_endyear'); |
| 177 | 177 | $search_date_modif_endday = GETPOSTINT('search_date_modif_endday'); |
| 178 | -$search_date_modif_end = dol_mktime(23, 59, 59, $search_date_modif_endmonth, $search_date_modif_endday, $search_date_modif_endyear); // Use tzserver |
|
| 178 | +$search_date_modif_end = dol_mktime(23, 59, 59, $search_date_modif_endmonth, $search_date_modif_endday, $search_date_modif_endyear); // Use tzserver |
|
| 179 | 179 | |
| 180 | 180 | $search_category_array = array(); |
| 181 | 181 | |
@@ -676,7 +676,7 @@ discard block |
||
| 676 | 676 | if ($searchCategoryProjectOperator == 0) { |
| 677 | 677 | $searchCategoryProjectSqlList[] = " EXISTS (SELECT ck.fk_project FROM ".MAIN_DB_PREFIX."categorie_project as ck WHERE p.rowid = ck.fk_project AND ck.fk_categorie = ".((int) $searchCategoryProject).")"; |
| 678 | 678 | } else { |
| 679 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProject); |
|
| 679 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProject); |
|
| 680 | 680 | } |
| 681 | 681 | } |
| 682 | 682 | } |
@@ -872,7 +872,7 @@ discard block |
||
| 872 | 872 | $param .= '&search_date_end_endday='.urlencode((string) ($search_date_end_endday)); |
| 873 | 873 | } |
| 874 | 874 | if ($search_date_end_end) { |
| 875 | - $param .= '&search_date_end_end=' . urlencode($search_date_end_end); |
|
| 875 | + $param .= '&search_date_end_end='.urlencode($search_date_end_end); |
|
| 876 | 876 | } |
| 877 | 877 | if ($search_date_creation_startmonth) { |
| 878 | 878 | $param .= '&search_date_creation_startmonth='.urlencode((string) ($search_date_creation_startmonth)); |
@@ -920,7 +920,7 @@ discard block |
||
| 920 | 920 | $param .= '&search_date_modif_endday='.urlencode((string) ($search_date_modif_endday)); |
| 921 | 921 | } |
| 922 | 922 | if ($search_date_modif_end) { |
| 923 | - $param .= '&search_date_modif_end=' . urlencode($search_date_modif_end); |
|
| 923 | + $param .= '&search_date_modif_end='.urlencode($search_date_modif_end); |
|
| 924 | 924 | } |
| 925 | 925 | if ($socid) { |
| 926 | 926 | $param .= '&socid='.urlencode((string) ($socid)); |
@@ -31,14 +31,14 @@ discard block |
||
| 31 | 31 | |
| 32 | 32 | // Load Dolibarr environment |
| 33 | 33 | require '../../main.inc.php'; |
| 34 | -require_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
| 35 | -require_once DOL_DOCUMENT_ROOT . '/projet/class/task.class.php'; |
|
| 36 | -require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
| 37 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/project.lib.php'; |
|
| 38 | -require_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php'; |
|
| 39 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formother.class.php'; |
|
| 40 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; |
|
| 41 | -require_once DOL_DOCUMENT_ROOT . '/core/class/html.formintervention.class.php'; |
|
| 34 | +require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
| 35 | +require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; |
|
| 36 | +require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
| 37 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/project.lib.php'; |
|
| 38 | +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; |
|
| 39 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; |
|
| 40 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; |
|
| 41 | +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formintervention.class.php'; |
|
| 42 | 42 | |
| 43 | 43 | // Load translation files required by the page |
| 44 | 44 | $langsLoad = array('projects', 'bills', 'orders', 'companies'); |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
| 166 | 166 | } |
| 167 | 167 | |
| 168 | -include DOL_DOCUMENT_ROOT . '/core/actions_changeselectedfields.inc.php'; |
|
| 168 | +include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; |
|
| 169 | 169 | |
| 170 | 170 | // Purge search criteria |
| 171 | 171 | if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers |
@@ -351,10 +351,10 @@ discard block |
||
| 351 | 351 | } |
| 352 | 352 | |
| 353 | 353 | if ($action == 'confirm_deleteline' && $confirm == "yes" && ($user->hasRight('projet', 'time') || $user->hasRight('projet', 'all', 'creer'))) { |
| 354 | - $object->fetchTimeSpent(GETPOSTINT('lineid')); // load properties like $object->timespent_xxx |
|
| 354 | + $object->fetchTimeSpent(GETPOSTINT('lineid')); // load properties like $object->timespent_xxx |
|
| 355 | 355 | |
| 356 | 356 | if (in_array($object->timespent_fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) { |
| 357 | - $result = $object->delTimeSpent($user); // delete line with $object->timespent_id |
|
| 357 | + $result = $object->delTimeSpent($user); // delete line with $object->timespent_id |
|
| 358 | 358 | |
| 359 | 359 | if ($result < 0) { |
| 360 | 360 | $langs->load("errors"); |
@@ -374,7 +374,7 @@ discard block |
||
| 374 | 374 | if (count($tasksarray) > 0) { |
| 375 | 375 | $id = $tasksarray[0]->id; |
| 376 | 376 | } else { |
| 377 | - header("Location: " . DOL_URL_ROOT . '/projet/tasks.php?id=' . $projectstatic->id . ($withproject ? '&withproject=1' : '') . (empty($mode) ? '' : '&mode=' . $mode)); |
|
| 377 | + header("Location: ".DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.($withproject ? '&withproject=1' : '').(empty($mode) ? '' : '&mode='.$mode)); |
|
| 378 | 378 | exit; |
| 379 | 379 | } |
| 380 | 380 | } |
@@ -411,9 +411,9 @@ discard block |
||
| 411 | 411 | if (!($projectstatic->thirdparty->id > 0)) { |
| 412 | 412 | setEventMessages($langs->trans("ThirdPartyRequiredToGenerateInvoice"), null, 'errors'); |
| 413 | 413 | } else { |
| 414 | - include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
| 415 | - include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
| 416 | - include_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; |
|
| 414 | + include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
| 415 | + include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
| 416 | + include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; |
|
| 417 | 417 | |
| 418 | 418 | $tmpinvoice = new Facture($db); |
| 419 | 419 | $tmptimespent = new Task($db); |
@@ -478,7 +478,7 @@ discard block |
||
| 478 | 478 | $arrayoftasks = array(); |
| 479 | 479 | foreach ($toselect as $key => $value) { |
| 480 | 480 | // Get userid, timepent |
| 481 | - $object->fetchTimeSpent($value); // $value is ID of 1 line in timespent table |
|
| 481 | + $object->fetchTimeSpent($value); // $value is ID of 1 line in timespent table |
|
| 482 | 482 | $arrayoftasks[$object->timespent_fk_user][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration; |
| 483 | 483 | $arrayoftasks[$object->timespent_fk_user][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm); |
| 484 | 484 | } |
@@ -550,7 +550,7 @@ discard block |
||
| 550 | 550 | } |
| 551 | 551 | |
| 552 | 552 | // Add lines |
| 553 | - $lineid = $tmpinvoice->addline($langs->trans("TimeSpentForInvoice", $username) . ' : ' . $qtyhourtext, $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0)); |
|
| 553 | + $lineid = $tmpinvoice->addline($langs->trans("TimeSpentForInvoice", $username).' : '.$qtyhourtext, $pu_htline, round($qtyhour / $prodDurationHours, 2), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0)); |
|
| 554 | 554 | if ($lineid < 0) { |
| 555 | 555 | $error++; |
| 556 | 556 | setEventMessages(null, $tmpinvoice->errors, 'errors'); |
@@ -583,16 +583,16 @@ discard block |
||
| 583 | 583 | |
| 584 | 584 | $arrayoftasks[$object->timespent_id]['timespent'] = $object->timespent_duration; |
| 585 | 585 | $arrayoftasks[$object->timespent_id]['totalvaluetodivideby3600'] = $object->timespent_duration * $object->timespent_thm; |
| 586 | - $arrayoftasks[$object->timespent_id]['note'] = $ftask->ref . ' - ' . $ftask->label . ' - ' . $username; |
|
| 586 | + $arrayoftasks[$object->timespent_id]['note'] = $ftask->ref.' - '.$ftask->label.' - '.$username; |
|
| 587 | 587 | $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $object->timespent_note); |
| 588 | 588 | |
| 589 | 589 | if (!empty($withdetail)) { |
| 590 | 590 | if (!empty($object->timespent_withhour)) { |
| 591 | - $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date") . ': ' . dol_print_date($object->timespent_datehour)); |
|
| 591 | + $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date").': '.dol_print_date($object->timespent_datehour)); |
|
| 592 | 592 | } else { |
| 593 | - $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date") . ': ' . dol_print_date($object->timespent_date)); |
|
| 593 | + $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Date").': '.dol_print_date($object->timespent_date)); |
|
| 594 | 594 | } |
| 595 | - $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Duration") . ': ' . convertSecondToTime($object->timespent_duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY)); |
|
| 595 | + $arrayoftasks[$object->timespent_id]['note'] = dol_concatdesc($arrayoftasks[$object->timespent_id]['note'], $langs->trans("Duration").': '.convertSecondToTime($object->timespent_duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY)); |
|
| 596 | 596 | } |
| 597 | 597 | $arrayoftasks[$object->timespent_id]['user'] = $object->timespent_fk_user; |
| 598 | 598 | $arrayoftasks[$object->timespent_id]['fk_product'] = $object->timespent_fk_product; |
@@ -670,7 +670,7 @@ discard block |
||
| 670 | 670 | $arrayoftasks = array(); |
| 671 | 671 | foreach ($toselect as $key => $value) { |
| 672 | 672 | // Get userid, timepent |
| 673 | - $object->fetchTimeSpent($value); // Call method to get list of timespent for a timespent line id (We use the utiliy method found into Task object) |
|
| 673 | + $object->fetchTimeSpent($value); // Call method to get list of timespent for a timespent line id (We use the utiliy method found into Task object) |
|
| 674 | 674 | // $object->id is now the task id |
| 675 | 675 | $arrayoftasks[$object->id][(int) $object->timespent_fk_product]['timespent'] += $object->timespent_duration; |
| 676 | 676 | $arrayoftasks[$object->id][(int) $object->timespent_fk_product]['totalvaluetodivideby3600'] += ($object->timespent_duration * $object->timespent_thm); |
@@ -746,7 +746,7 @@ discard block |
||
| 746 | 746 | // Add lines |
| 747 | 747 | $date_start = ''; |
| 748 | 748 | $date_end = ''; |
| 749 | - $lineName = $ftask->ref . ' - ' . $ftask->label; |
|
| 749 | + $lineName = $ftask->ref.' - '.$ftask->label; |
|
| 750 | 750 | $lineid = $tmpinvoice->addline($lineName, $pu_ht_for_task, price2num($qtyhour / $prodDurationHours, 'MS'), $txtvaline, $localtax1line, $localtax2line, ($idprodline > 0 ? $idprodline : 0), 0, $date_start, $date_end, 0, 0, '', 'HT', 0, 1, -1, 0, '', 0, 0, null, $pa_ht); |
| 751 | 751 | if ($lineid < 0) { |
| 752 | 752 | $error++; |
@@ -756,8 +756,8 @@ discard block |
||
| 756 | 756 | |
| 757 | 757 | if (!$error) { |
| 758 | 758 | // Update lineid into line of timespent |
| 759 | - $sql = 'UPDATE ' . MAIN_DB_PREFIX . 'element_time SET invoice_line_id = ' . ((int) $lineid) . ', invoice_id = ' . ((int) $tmpinvoice->id); |
|
| 760 | - $sql .= ' WHERE rowid IN (' . $db->sanitize(implode(',', $toselect)) . ')'; |
|
| 759 | + $sql = 'UPDATE '.MAIN_DB_PREFIX.'element_time SET invoice_line_id = '.((int) $lineid).', invoice_id = '.((int) $tmpinvoice->id); |
|
| 760 | + $sql .= ' WHERE rowid IN ('.$db->sanitize(implode(',', $toselect)).')'; |
|
| 761 | 761 | $result = $db->query($sql); |
| 762 | 762 | if (!$result) { |
| 763 | 763 | $error++; |
@@ -795,12 +795,12 @@ discard block |
||
| 795 | 795 | if (!($projectstatic->thirdparty->id > 0)) { |
| 796 | 796 | setEventMessages($langs->trans("ThirdPartyRequiredToGenerateIntervention"), null, 'errors'); |
| 797 | 797 | } else { |
| 798 | - include_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php'; |
|
| 799 | - include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
|
| 800 | - include_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; |
|
| 798 | + include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; |
|
| 799 | + include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; |
|
| 800 | + include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; |
|
| 801 | 801 | |
| 802 | 802 | |
| 803 | - require_once DOL_DOCUMENT_ROOT . '/fichinter/class/fichinter.class.php'; |
|
| 803 | + require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; |
|
| 804 | 804 | $tmpinter = new Fichinter($db); |
| 805 | 805 | $tmptimespent = new Task($db); |
| 806 | 806 | $fuser = new User($db); |
@@ -812,7 +812,7 @@ discard block |
||
| 812 | 812 | $tmpinter->socid = $projectstatic->thirdparty->id; |
| 813 | 813 | $tmpinter->date = dol_mktime(GETPOSTINT('rehour'), GETPOSTINT('remin'), GETPOSTINT('resec'), GETPOSTINT('remonth'), GETPOSTINT('reday'), GETPOSTINT('reyear')); |
| 814 | 814 | $tmpinter->fk_project = $projectstatic->id; |
| 815 | - $tmpinter->description = $projectstatic->title . (!empty($projectstatic->description) ? '-' . $projectstatic->label : ''); |
|
| 815 | + $tmpinter->description = $projectstatic->title.(!empty($projectstatic->description) ? '-'.$projectstatic->label : ''); |
|
| 816 | 816 | |
| 817 | 817 | if ($interToUse) { |
| 818 | 818 | $tmpinter->fetch($interToUse); |
@@ -845,7 +845,7 @@ discard block |
||
| 845 | 845 | $qtyhourtext = convertSecondToTime($value['timespent'], 'all', $conf->global->MAIN_DURATION_OF_WORKDAY); |
| 846 | 846 | |
| 847 | 847 | // Add lines |
| 848 | - $lineid = $tmpinter->addline($user, $tmpinter->id, $ftask->label . (!empty($value['note']) ? ' - ' . $value['note'] : ''), $value['date'], $value['timespent']); |
|
| 848 | + $lineid = $tmpinter->addline($user, $tmpinter->id, $ftask->label.(!empty($value['note']) ? ' - '.$value['note'] : ''), $value['date'], $value['timespent']); |
|
| 849 | 849 | } |
| 850 | 850 | } |
| 851 | 851 | |
@@ -876,9 +876,9 @@ discard block |
||
| 876 | 876 | //$result = $projectstatic->fetch($object->fk_project); |
| 877 | 877 | $arrayofselected = is_array($toselect) ? $toselect : array(); |
| 878 | 878 | |
| 879 | -$title = $object->ref . ' - ' . $langs->trans("TimeSpent"); |
|
| 879 | +$title = $object->ref.' - '.$langs->trans("TimeSpent"); |
|
| 880 | 880 | if (!empty($withproject)) { |
| 881 | - $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : ''); |
|
| 881 | + $title .= ' | '.$langs->trans("Project").(!empty($projectstatic->ref) ? ': '.$projectstatic->ref : ''); |
|
| 882 | 882 | } |
| 883 | 883 | $help_url = ''; |
| 884 | 884 | |
@@ -927,13 +927,13 @@ discard block |
||
| 927 | 927 | |
| 928 | 928 | $param = ((!empty($mode) && $mode == 'mine') ? '&mode=mine' : ''); |
| 929 | 929 | if ($search_user) { |
| 930 | - $param .= '&search_user=' . ((int) $search_user); |
|
| 930 | + $param .= '&search_user='.((int) $search_user); |
|
| 931 | 931 | } |
| 932 | 932 | if ($search_month) { |
| 933 | - $param .= '&search_month=' . ((int) $search_month); |
|
| 933 | + $param .= '&search_month='.((int) $search_month); |
|
| 934 | 934 | } |
| 935 | 935 | if ($search_year) { |
| 936 | - $param .= '&search_year=' . ((int) $search_year); |
|
| 936 | + $param .= '&search_year='.((int) $search_year); |
|
| 937 | 937 | } |
| 938 | 938 | |
| 939 | 939 | // Project card |
@@ -945,14 +945,14 @@ discard block |
||
| 945 | 945 | $morehtmlref .= $projectstatic->title; |
| 946 | 946 | // Thirdparty |
| 947 | 947 | if (!empty($projectstatic->thirdparty->id) && $projectstatic->thirdparty->id > 0) { |
| 948 | - $morehtmlref .= '<br>' . $projectstatic->thirdparty->getNomUrl(1, 'project'); |
|
| 948 | + $morehtmlref .= '<br>'.$projectstatic->thirdparty->getNomUrl(1, 'project'); |
|
| 949 | 949 | } |
| 950 | 950 | $morehtmlref .= '</div>'; |
| 951 | 951 | |
| 952 | 952 | // Define a complementary filter for search of next/prev ref. |
| 953 | 953 | if (!$user->hasRight('projet', 'all', 'lire')) { |
| 954 | 954 | $objectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 0); |
| 955 | - $projectstatic->next_prev_filter = "rowid IN (" . $db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0') . ")"; |
|
| 955 | + $projectstatic->next_prev_filter = "rowid IN (".$db->sanitize(count($objectsListId) ? implode(',', array_keys($objectsListId)) : '0').")"; |
|
| 956 | 956 | } |
| 957 | 957 | |
| 958 | 958 | dol_banner_tab($projectstatic, 'project_ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $param); |
@@ -970,25 +970,25 @@ discard block |
||
| 970 | 970 | print '</td>'; |
| 971 | 971 | print '<td>'; |
| 972 | 972 | if (getDolGlobalString('PROJECT_USE_OPPORTUNITIES')) { |
| 973 | - print '<input type="checkbox" disabled name="usage_opportunity"' . (GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')) . '"> '; |
|
| 973 | + print '<input type="checkbox" disabled name="usage_opportunity"'.(GETPOSTISSET('usage_opportunity') ? (GETPOST('usage_opportunity', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_opportunity ? ' checked="checked"' : '')).'"> '; |
|
| 974 | 974 | $htmltext = $langs->trans("ProjectFollowOpportunity"); |
| 975 | 975 | print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext); |
| 976 | 976 | print '<br>'; |
| 977 | 977 | } |
| 978 | 978 | if (!getDolGlobalString('PROJECT_HIDE_TASKS')) { |
| 979 | - print '<input type="checkbox" disabled name="usage_task"' . (GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')) . '"> '; |
|
| 979 | + print '<input type="checkbox" disabled name="usage_task"'.(GETPOSTISSET('usage_task') ? (GETPOST('usage_task', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_task ? ' checked="checked"' : '')).'"> '; |
|
| 980 | 980 | $htmltext = $langs->trans("ProjectFollowTasks"); |
| 981 | 981 | print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext); |
| 982 | 982 | print '<br>'; |
| 983 | 983 | } |
| 984 | 984 | if (!getDolGlobalString('PROJECT_HIDE_TASKS') && getDolGlobalString('PROJECT_BILL_TIME_SPENT')) { |
| 985 | - print '<input type="checkbox" disabled name="usage_bill_time"' . (GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')) . '"> '; |
|
| 985 | + print '<input type="checkbox" disabled name="usage_bill_time"'.(GETPOSTISSET('usage_bill_time') ? (GETPOST('usage_bill_time', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_bill_time ? ' checked="checked"' : '')).'"> '; |
|
| 986 | 986 | $htmltext = $langs->trans("ProjectBillTimeDescription"); |
| 987 | 987 | print $form->textwithpicto($langs->trans("BillTime"), $htmltext); |
| 988 | 988 | print '<br>'; |
| 989 | 989 | } |
| 990 | 990 | if (isModEnabled('eventorganization')) { |
| 991 | - print '<input type="checkbox" disabled name="usage_organize_event"' . (GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_organize_event ? ' checked="checked"' : '')) . '"> '; |
|
| 991 | + print '<input type="checkbox" disabled name="usage_organize_event"'.(GETPOSTISSET('usage_organize_event') ? (GETPOST('usage_organize_event', 'alpha') != '' ? ' checked="checked"' : '') : ($projectstatic->usage_organize_event ? ' checked="checked"' : '')).'"> '; |
|
| 992 | 992 | $htmltext = $langs->trans("EventOrganizationDescriptionLong"); |
| 993 | 993 | print $form->textwithpicto($langs->trans("ManageOrganizeEvent"), $htmltext); |
| 994 | 994 | } |
@@ -996,7 +996,7 @@ discard block |
||
| 996 | 996 | } |
| 997 | 997 | |
| 998 | 998 | // Visibility |
| 999 | - print '<tr><td class="titlefield">' . $langs->trans("Visibility") . '</td><td>'; |
|
| 999 | + print '<tr><td class="titlefield">'.$langs->trans("Visibility").'</td><td>'; |
|
| 1000 | 1000 | if ($projectstatic->public) { |
| 1001 | 1001 | print img_picto($langs->trans('SharedProject'), 'world', 'class="paddingrightonly"'); |
| 1002 | 1002 | print $langs->trans('SharedProject'); |
@@ -1007,14 +1007,14 @@ discard block |
||
| 1007 | 1007 | print '</td></tr>'; |
| 1008 | 1008 | |
| 1009 | 1009 | // Budget |
| 1010 | - print '<tr><td>' . $langs->trans("Budget") . '</td><td>'; |
|
| 1010 | + print '<tr><td>'.$langs->trans("Budget").'</td><td>'; |
|
| 1011 | 1011 | if (!is_null($projectstatic->budget_amount) && strcmp($projectstatic->budget_amount, '')) { |
| 1012 | - print '<span class="amount">' . price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency) . '</span>'; |
|
| 1012 | + print '<span class="amount">'.price($projectstatic->budget_amount, 0, $langs, 1, 0, 0, $conf->currency).'</span>'; |
|
| 1013 | 1013 | } |
| 1014 | 1014 | print '</td></tr>'; |
| 1015 | 1015 | |
| 1016 | 1016 | // Date start - end project |
| 1017 | - print '<tr><td>' . $langs->trans("Dates") . '</td><td>'; |
|
| 1017 | + print '<tr><td>'.$langs->trans("Dates").'</td><td>'; |
|
| 1018 | 1018 | $start = dol_print_date($projectstatic->date_start, 'day'); |
| 1019 | 1019 | print($start ? $start : '?'); |
| 1020 | 1020 | $end = dol_print_date($projectstatic->date_end, 'day'); |
@@ -1029,7 +1029,7 @@ discard block |
||
| 1029 | 1029 | $cols = 2; |
| 1030 | 1030 | $savobject = $object; |
| 1031 | 1031 | $object = $projectstatic; |
| 1032 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; |
|
| 1032 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; |
|
| 1033 | 1033 | $object = $savobject; |
| 1034 | 1034 | |
| 1035 | 1035 | print '</table>'; |
@@ -1047,7 +1047,7 @@ discard block |
||
| 1047 | 1047 | |
| 1048 | 1048 | // Categories |
| 1049 | 1049 | if (isModEnabled('category')) { |
| 1050 | - print '<tr><td class="valignmiddle">' . $langs->trans("Categories") . '</td><td>'; |
|
| 1050 | + print '<tr><td class="valignmiddle">'.$langs->trans("Categories").'</td><td>'; |
|
| 1051 | 1051 | print $form->showCategories($projectstatic->id, 'project', 1); |
| 1052 | 1052 | print "</td></tr>"; |
| 1053 | 1053 | } |
@@ -1076,12 +1076,12 @@ discard block |
||
| 1076 | 1076 | |
| 1077 | 1077 | if (!empty($projectidforalltimes)) { |
| 1078 | 1078 | // We are on tab 'Time Spent' of project |
| 1079 | - $backtourl = $_SERVER['PHP_SELF'] . '?projectid=' . $projectstatic->id . ($withproject ? '&withproject=1' : ''); |
|
| 1080 | - $linktocreatetimeUrl = $_SERVER['PHP_SELF'] . '?' . ($withproject ? 'withproject=1' : '') . '&projectid=' . $projectstatic->id . '&action=createtime&token=' . newToken() . $param . '&backtopage=' . urlencode($backtourl); |
|
| 1079 | + $backtourl = $_SERVER['PHP_SELF'].'?projectid='.$projectstatic->id.($withproject ? '&withproject=1' : ''); |
|
| 1080 | + $linktocreatetimeUrl = $_SERVER['PHP_SELF'].'?'.($withproject ? 'withproject=1' : '').'&projectid='.$projectstatic->id.'&action=createtime&token='.newToken().$param.'&backtopage='.urlencode($backtourl); |
|
| 1081 | 1081 | } else { |
| 1082 | 1082 | // We are on tab 'Time Spent' of task |
| 1083 | - $backtourl = $_SERVER['PHP_SELF'] . '?id=' . $object->id . ($withproject ? '&withproject=1' : ''); |
|
| 1084 | - $linktocreatetimeUrl = $_SERVER['PHP_SELF'] . '?' . ($withproject ? 'withproject=1' : '') . ($object->id > 0 ? '&id=' . $object->id : '&projectid=' . $projectstatic->id) . '&action=createtime&token=' . newToken() . $param . '&backtopage=' . urlencode($backtourl); |
|
| 1083 | + $backtourl = $_SERVER['PHP_SELF'].'?id='.$object->id.($withproject ? '&withproject=1' : ''); |
|
| 1084 | + $linktocreatetimeUrl = $_SERVER['PHP_SELF'].'?'.($withproject ? 'withproject=1' : '').($object->id > 0 ? '&id='.$object->id : '&projectid='.$projectstatic->id).'&action=createtime&token='.newToken().$param.'&backtopage='.urlencode($backtourl); |
|
| 1085 | 1085 | } |
| 1086 | 1086 | } else { |
| 1087 | 1087 | $linktocreatetimeBtnStatus = -2; |
@@ -1126,19 +1126,19 @@ discard block |
||
| 1126 | 1126 | print dol_get_fiche_head($head, 'task_time', $langs->trans("Task"), -1, 'projecttask', 0, '', 'reposition'); |
| 1127 | 1127 | |
| 1128 | 1128 | if ($action == 'deleteline') { |
| 1129 | - $urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($object->id > 0 ? "id=" . $object->id : 'projectid=' . $projectstatic->id) . '&lineid=' . GETPOSTINT("lineid") . ($withproject ? '&withproject=1' : ''); |
|
| 1129 | + $urlafterconfirm = $_SERVER["PHP_SELF"]."?".($object->id > 0 ? "id=".$object->id : 'projectid='.$projectstatic->id).'&lineid='.GETPOSTINT("lineid").($withproject ? '&withproject=1' : ''); |
|
| 1130 | 1130 | print $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1); |
| 1131 | 1131 | } |
| 1132 | 1132 | |
| 1133 | 1133 | $param = ($withproject ? '&withproject=1' : ''); |
| 1134 | - $param .= ($param ? '&' : '') . 'id=' . $object->id; // ID of task |
|
| 1135 | - $linkback = $withproject ? '<a href="' . DOL_URL_ROOT . '/projet/tasks.php?id=' . $projectstatic->id . '">' . $langs->trans("BackToList") . '</a>' : ''; |
|
| 1134 | + $param .= ($param ? '&' : '').'id='.$object->id; // ID of task |
|
| 1135 | + $linkback = $withproject ? '<a href="'.DOL_URL_ROOT.'/projet/tasks.php?id='.$projectstatic->id.'">'.$langs->trans("BackToList").'</a>' : ''; |
|
| 1136 | 1136 | |
| 1137 | 1137 | if (!GETPOST('withproject') || empty($projectstatic->id)) { |
| 1138 | 1138 | $projectsListId = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1); |
| 1139 | - $object->next_prev_filter = "fk_projet IN (" . $db->sanitize($projectsListId) . ")"; |
|
| 1139 | + $object->next_prev_filter = "fk_projet IN (".$db->sanitize($projectsListId).")"; |
|
| 1140 | 1140 | } else { |
| 1141 | - $object->next_prev_filter = "fk_projet = " . ((int) $projectstatic->id); |
|
| 1141 | + $object->next_prev_filter = "fk_projet = ".((int) $projectstatic->id); |
|
| 1142 | 1142 | } |
| 1143 | 1143 | |
| 1144 | 1144 | $morehtmlref = ''; |
@@ -1146,12 +1146,12 @@ discard block |
||
| 1146 | 1146 | // Project |
| 1147 | 1147 | if (empty($withproject)) { |
| 1148 | 1148 | $morehtmlref .= '<div class="refidno">'; |
| 1149 | - $morehtmlref .= $langs->trans("Project") . ': '; |
|
| 1149 | + $morehtmlref .= $langs->trans("Project").': '; |
|
| 1150 | 1150 | $morehtmlref .= $projectstatic->getNomUrl(1); |
| 1151 | 1151 | $morehtmlref .= '<br>'; |
| 1152 | 1152 | |
| 1153 | 1153 | // Third party |
| 1154 | - $morehtmlref .= $langs->trans("ThirdParty") . ': '; |
|
| 1154 | + $morehtmlref .= $langs->trans("ThirdParty").': '; |
|
| 1155 | 1155 | if (!empty($projectstatic->thirdparty) && is_object($projectstatic->thirdparty)) { |
| 1156 | 1156 | $morehtmlref .= $projectstatic->thirdparty->getNomUrl(1); |
| 1157 | 1157 | } |
@@ -1167,7 +1167,7 @@ discard block |
||
| 1167 | 1167 | print '<table class="border centpercent tableforfield">'; |
| 1168 | 1168 | |
| 1169 | 1169 | // Task parent |
| 1170 | - print '<tr><td>' . $langs->trans("ChildOfTask") . '</td><td>'; |
|
| 1170 | + print '<tr><td>'.$langs->trans("ChildOfTask").'</td><td>'; |
|
| 1171 | 1171 | if ($object->fk_task_parent > 0) { |
| 1172 | 1172 | $tasktmp = new Task($db); |
| 1173 | 1173 | $tasktmp->fetch($object->fk_task_parent); |
@@ -1176,7 +1176,7 @@ discard block |
||
| 1176 | 1176 | print '</td></tr>'; |
| 1177 | 1177 | |
| 1178 | 1178 | // Date start - Date end task |
| 1179 | - print '<tr><td class="titlefield">' . $langs->trans("DateStart") . ' - ' . $langs->trans("Deadline") . '</td><td>'; |
|
| 1179 | + print '<tr><td class="titlefield">'.$langs->trans("DateStart").' - '.$langs->trans("Deadline").'</td><td>'; |
|
| 1180 | 1180 | $start = dol_print_date($object->date_start, 'dayhour'); |
| 1181 | 1181 | print($start ? $start : '?'); |
| 1182 | 1182 | $end = dol_print_date($object->date_end, 'dayhour'); |
@@ -1188,7 +1188,7 @@ discard block |
||
| 1188 | 1188 | print '</td></tr>'; |
| 1189 | 1189 | |
| 1190 | 1190 | // Planned workload |
| 1191 | - print '<tr><td>' . $langs->trans("PlannedWorkload") . '</td><td>'; |
|
| 1191 | + print '<tr><td>'.$langs->trans("PlannedWorkload").'</td><td>'; |
|
| 1192 | 1192 | if ($object->planned_workload) { |
| 1193 | 1193 | print convertSecondToTime($object->planned_workload, 'allhourmin'); |
| 1194 | 1194 | } |
@@ -1203,21 +1203,21 @@ discard block |
||
| 1203 | 1203 | print '<table class="border tableforfield centpercent">'; |
| 1204 | 1204 | |
| 1205 | 1205 | // Progress declared |
| 1206 | - print '<tr><td class="titlefield">' . $langs->trans("ProgressDeclared") . '</td><td>'; |
|
| 1207 | - print $object->progress != '' ? $object->progress . ' %' : ''; |
|
| 1206 | + print '<tr><td class="titlefield">'.$langs->trans("ProgressDeclared").'</td><td>'; |
|
| 1207 | + print $object->progress != '' ? $object->progress.' %' : ''; |
|
| 1208 | 1208 | print '</td></tr>'; |
| 1209 | 1209 | |
| 1210 | 1210 | // Progress calculated |
| 1211 | - print '<tr><td>' . $langs->trans("ProgressCalculated") . '</td><td>'; |
|
| 1211 | + print '<tr><td>'.$langs->trans("ProgressCalculated").'</td><td>'; |
|
| 1212 | 1212 | if ($object->planned_workload) { |
| 1213 | 1213 | $tmparray = $object->getSummaryOfTimeSpent(); |
| 1214 | 1214 | if ($tmparray['total_duration'] > 0) { |
| 1215 | - print round($tmparray['total_duration'] / $object->planned_workload * 100, 2) . ' %'; |
|
| 1215 | + print round($tmparray['total_duration'] / $object->planned_workload * 100, 2).' %'; |
|
| 1216 | 1216 | } else { |
| 1217 | 1217 | print '0 %'; |
| 1218 | 1218 | } |
| 1219 | 1219 | } else { |
| 1220 | - print '<span class="opacitymedium">' . $langs->trans("WorkloadNotDefined") . '</span>'; |
|
| 1220 | + print '<span class="opacitymedium">'.$langs->trans("WorkloadNotDefined").'</span>'; |
|
| 1221 | 1221 | } |
| 1222 | 1222 | print '</td>'; |
| 1223 | 1223 | |
@@ -1233,7 +1233,7 @@ discard block |
||
| 1233 | 1233 | print dol_get_fiche_end(); |
| 1234 | 1234 | } else { |
| 1235 | 1235 | if ($action == 'deleteline') { |
| 1236 | - $urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($object->id > 0 ? "id=" . $object->id : 'projectid=' . $projectstatic->id) . '&lineid=' . GETPOSTINT("lineid") . ($withproject ? '&withproject=1' : ''); |
|
| 1236 | + $urlafterconfirm = $_SERVER["PHP_SELF"]."?".($object->id > 0 ? "id=".$object->id : 'projectid='.$projectstatic->id).'&lineid='.GETPOSTINT("lineid").($withproject ? '&withproject=1' : ''); |
|
| 1237 | 1237 | print $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1); |
| 1238 | 1238 | } |
| 1239 | 1239 | } |
@@ -1247,7 +1247,7 @@ discard block |
||
| 1247 | 1247 | |
| 1248 | 1248 | if ($action == 'deleteline' && !empty($projectidforalltimes)) { |
| 1249 | 1249 | // We must use projectidprojectid if on list of timespent of project and id=taskid if on list of timespent of a task |
| 1250 | - $urlafterconfirm = $_SERVER["PHP_SELF"] . "?" . ($projectstatic->id > 0 ? 'projectid=' . $projectstatic->id : ($object->id > 0 ? "id=" . $object->id : '')) . '&lineid=' . GETPOSTINT('lineid') . ($withproject ? '&withproject=1' : '') . "&contextpage=" . urlencode($contextpage); |
|
| 1250 | + $urlafterconfirm = $_SERVER["PHP_SELF"]."?".($projectstatic->id > 0 ? 'projectid='.$projectstatic->id : ($object->id > 0 ? "id=".$object->id : '')).'&lineid='.GETPOSTINT('lineid').($withproject ? '&withproject=1' : '')."&contextpage=".urlencode($contextpage); |
|
| 1251 | 1251 | $formconfirm = $form->formconfirm($urlafterconfirm, $langs->trans("DeleteATimeSpent"), $langs->trans("ConfirmDeleteATimeSpent"), "confirm_deleteline", '', '', 1); |
| 1252 | 1252 | } |
| 1253 | 1253 | |
@@ -1266,10 +1266,10 @@ discard block |
||
| 1266 | 1266 | // Definition of fields for list |
| 1267 | 1267 | $arrayfields = array(); |
| 1268 | 1268 | $arrayfields['t.element_date'] = array('label' => $langs->trans("Date"), 'checked' => 1); |
| 1269 | - $arrayfields['p.fk_soc'] = array('label' => $langs->trans("ThirdParty"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1','checked' => 1); |
|
| 1269 | + $arrayfields['p.fk_soc'] = array('label' => $langs->trans("ThirdParty"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1', 'checked' => 1); |
|
| 1270 | 1270 | $arrayfields['s.name_alias'] = array('label' => $langs->trans("AliasNameShort"), 'type' => 'integer:Societe:/societe/class/societe.class.php:1'); |
| 1271 | 1271 | if ((empty($id) && empty($ref)) || !empty($projectidforalltimes)) { // Not a dedicated task |
| 1272 | - if (! empty($allprojectforuser)) { |
|
| 1272 | + if (!empty($allprojectforuser)) { |
|
| 1273 | 1273 | $arrayfields['p.project_ref'] = ['label' => $langs->trans('RefProject'), 'checked' => 1]; |
| 1274 | 1274 | $arrayfields['p.project_label'] = ['label' => $langs->trans('ProjectLabel'), 'checked' => 1]; |
| 1275 | 1275 | } |
@@ -1285,82 +1285,82 @@ discard block |
||
| 1285 | 1285 | $arrayfields['value'] = array('label' => $langs->trans("Value"), 'checked' => 1, 'enabled' => isModEnabled("salaries")); |
| 1286 | 1286 | $arrayfields['valuebilled'] = array('label' => $langs->trans("Billed"), 'checked' => 1, 'enabled' => (((getDolGlobalInt('PROJECT_HIDE_TASKS') || !getDolGlobalInt('PROJECT_BILL_TIME_SPENT')) ? 0 : 1) && $projectstatic->usage_bill_time)); |
| 1287 | 1287 | // Extra fields |
| 1288 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_array_fields.tpl.php'; |
|
| 1288 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_array_fields.tpl.php'; |
|
| 1289 | 1289 | |
| 1290 | 1290 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
| 1291 | 1291 | |
| 1292 | 1292 | $param = ''; |
| 1293 | 1293 | if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { |
| 1294 | - $param .= '&contextpage=' . urlencode($contextpage); |
|
| 1294 | + $param .= '&contextpage='.urlencode($contextpage); |
|
| 1295 | 1295 | } |
| 1296 | 1296 | if ($limit > 0 && $limit != $conf->liste_limit) { |
| 1297 | 1297 | $param .= '&limit='.((int) $limit); |
| 1298 | 1298 | } |
| 1299 | 1299 | if ($search_month > 0) { |
| 1300 | - $param .= '&search_month=' . urlencode((string) ($search_month)); |
|
| 1300 | + $param .= '&search_month='.urlencode((string) ($search_month)); |
|
| 1301 | 1301 | } |
| 1302 | 1302 | if ($search_year > 0) { |
| 1303 | - $param .= '&search_year=' . urlencode((string) ($search_year)); |
|
| 1303 | + $param .= '&search_year='.urlencode((string) ($search_year)); |
|
| 1304 | 1304 | } |
| 1305 | 1305 | if (!empty($search_user)) { // We keep param if -1 because default value is forced to user id if not set |
| 1306 | 1306 | $param .= '&search_user='.urlencode($search_user); |
| 1307 | 1307 | } |
| 1308 | 1308 | if ($search_task_ref != '') { |
| 1309 | - $param .= '&search_task_ref=' . urlencode($search_task_ref); |
|
| 1309 | + $param .= '&search_task_ref='.urlencode($search_task_ref); |
|
| 1310 | 1310 | } |
| 1311 | 1311 | if ($search_company != '') { |
| 1312 | - $param .= '&$search_company=' . urlencode($search_company); |
|
| 1312 | + $param .= '&$search_company='.urlencode($search_company); |
|
| 1313 | 1313 | } |
| 1314 | 1314 | if ($search_company_alias != '') { |
| 1315 | - $param .= '&$search_company_alias=' . urlencode($search_company_alias); |
|
| 1315 | + $param .= '&$search_company_alias='.urlencode($search_company_alias); |
|
| 1316 | 1316 | } |
| 1317 | 1317 | if ($search_project_ref != '') { |
| 1318 | - $param .= '&$search_project_ref=' . urlencode($search_project_ref); |
|
| 1318 | + $param .= '&$search_project_ref='.urlencode($search_project_ref); |
|
| 1319 | 1319 | } |
| 1320 | 1320 | if ($search_project_label != '') { |
| 1321 | - $param .= '&$search_project_label=' . urlencode($search_project_label); |
|
| 1321 | + $param .= '&$search_project_label='.urlencode($search_project_label); |
|
| 1322 | 1322 | } |
| 1323 | 1323 | if ($search_task_label != '') { |
| 1324 | - $param .= '&search_task_label=' . urlencode($search_task_label); |
|
| 1324 | + $param .= '&search_task_label='.urlencode($search_task_label); |
|
| 1325 | 1325 | } |
| 1326 | 1326 | if ($search_note != '') { |
| 1327 | - $param .= '&search_note=' . urlencode($search_note); |
|
| 1327 | + $param .= '&search_note='.urlencode($search_note); |
|
| 1328 | 1328 | } |
| 1329 | 1329 | if ($search_duration != '') { |
| 1330 | - $param .= '&search_field2=' . urlencode((string) ($search_duration)); |
|
| 1330 | + $param .= '&search_field2='.urlencode((string) ($search_duration)); |
|
| 1331 | 1331 | } |
| 1332 | 1332 | if ($optioncss != '') { |
| 1333 | - $param .= '&optioncss=' . urlencode($optioncss); |
|
| 1333 | + $param .= '&optioncss='.urlencode($optioncss); |
|
| 1334 | 1334 | } |
| 1335 | 1335 | if ($search_date_startday) { |
| 1336 | - $param .= '&search_date_startday=' . urlencode((string) ($search_date_startday)); |
|
| 1336 | + $param .= '&search_date_startday='.urlencode((string) ($search_date_startday)); |
|
| 1337 | 1337 | } |
| 1338 | 1338 | if ($search_date_startmonth) { |
| 1339 | - $param .= '&search_date_startmonth=' . urlencode((string) ($search_date_startmonth)); |
|
| 1339 | + $param .= '&search_date_startmonth='.urlencode((string) ($search_date_startmonth)); |
|
| 1340 | 1340 | } |
| 1341 | 1341 | if ($search_date_startyear) { |
| 1342 | - $param .= '&search_date_startyear=' . urlencode((string) ($search_date_startyear)); |
|
| 1342 | + $param .= '&search_date_startyear='.urlencode((string) ($search_date_startyear)); |
|
| 1343 | 1343 | } |
| 1344 | 1344 | if ($search_date_endday) { |
| 1345 | - $param .= '&search_date_endday=' . urlencode((string) ($search_date_endday)); |
|
| 1345 | + $param .= '&search_date_endday='.urlencode((string) ($search_date_endday)); |
|
| 1346 | 1346 | } |
| 1347 | 1347 | if ($search_date_endmonth) { |
| 1348 | - $param .= '&search_date_endmonth=' . urlencode((string) ($search_date_endmonth)); |
|
| 1348 | + $param .= '&search_date_endmonth='.urlencode((string) ($search_date_endmonth)); |
|
| 1349 | 1349 | } |
| 1350 | 1350 | if ($search_date_endyear) { |
| 1351 | - $param .= '&search_date_endyear=' . urlencode((string) ($search_date_endyear)); |
|
| 1351 | + $param .= '&search_date_endyear='.urlencode((string) ($search_date_endyear)); |
|
| 1352 | 1352 | } |
| 1353 | 1353 | if ($search_timespent_starthour) { |
| 1354 | - $param .= '&search_timespent_duration_starthour=' . urlencode((string) ($search_timespent_starthour)); |
|
| 1354 | + $param .= '&search_timespent_duration_starthour='.urlencode((string) ($search_timespent_starthour)); |
|
| 1355 | 1355 | } |
| 1356 | 1356 | if ($search_timespent_startmin) { |
| 1357 | - $param .= '&search_timespent_duration_startmin=' . urlencode((string) ($search_timespent_startmin)); |
|
| 1357 | + $param .= '&search_timespent_duration_startmin='.urlencode((string) ($search_timespent_startmin)); |
|
| 1358 | 1358 | } |
| 1359 | 1359 | if ($search_timespent_endhour) { |
| 1360 | - $param .= '&search_timespent_duration_endhour=' . urlencode((string) ($search_timespent_endhour)); |
|
| 1360 | + $param .= '&search_timespent_duration_endhour='.urlencode((string) ($search_timespent_endhour)); |
|
| 1361 | 1361 | } |
| 1362 | 1362 | if ($search_timespent_endmin) { |
| 1363 | - $param .= '&search_timespent_duration_endmin=' . urlencode((string) ($search_timespent_endmin)); |
|
| 1363 | + $param .= '&search_timespent_duration_endmin='.urlencode((string) ($search_timespent_endmin)); |
|
| 1364 | 1364 | } |
| 1365 | 1365 | |
| 1366 | 1366 | /* |
@@ -1368,24 +1368,24 @@ discard block |
||
| 1368 | 1368 | include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; |
| 1369 | 1369 | */ |
| 1370 | 1370 | if ($id) { |
| 1371 | - $param .= '&id=' . urlencode((string) ($id)); |
|
| 1371 | + $param .= '&id='.urlencode((string) ($id)); |
|
| 1372 | 1372 | } |
| 1373 | 1373 | if ($projectid) { |
| 1374 | - $param .= '&projectid=' . urlencode((string) ($projectid)); |
|
| 1374 | + $param .= '&projectid='.urlencode((string) ($projectid)); |
|
| 1375 | 1375 | } |
| 1376 | 1376 | if ($withproject) { |
| 1377 | - $param .= '&withproject=' . urlencode((string) ($withproject)); |
|
| 1377 | + $param .= '&withproject='.urlencode((string) ($withproject)); |
|
| 1378 | 1378 | } |
| 1379 | 1379 | // Add $param from hooks |
| 1380 | 1380 | $parameters = array(); |
| 1381 | 1381 | $reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object); // Note that $action and $object may have been modified by hook |
| 1382 | 1382 | $param .= $hookmanager->resPrint; |
| 1383 | 1383 | |
| 1384 | - print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">'; |
|
| 1384 | + print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; |
|
| 1385 | 1385 | if ($optioncss != '') { |
| 1386 | - print '<input type="hidden" name="optioncss" value="' . $optioncss . '">'; |
|
| 1386 | + print '<input type="hidden" name="optioncss" value="'.$optioncss.'">'; |
|
| 1387 | 1387 | } |
| 1388 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 1388 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 1389 | 1389 | print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">'; |
| 1390 | 1390 | if ($action == 'editline') { |
| 1391 | 1391 | print '<input type="hidden" name="action" value="updateline">'; |
@@ -1400,13 +1400,13 @@ discard block |
||
| 1400 | 1400 | } else { |
| 1401 | 1401 | print '<input type="hidden" name="action" value="list">'; |
| 1402 | 1402 | } |
| 1403 | - print '<input type="hidden" name="sortfield" value="' . $sortfield . '">'; |
|
| 1404 | - print '<input type="hidden" name="sortorder" value="' . $sortorder . '">'; |
|
| 1403 | + print '<input type="hidden" name="sortfield" value="'.$sortfield.'">'; |
|
| 1404 | + print '<input type="hidden" name="sortorder" value="'.$sortorder.'">'; |
|
| 1405 | 1405 | |
| 1406 | - print '<input type="hidden" name="id" value="' . $id . '">'; |
|
| 1407 | - print '<input type="hidden" name="projectid" value="' . $projectidforalltimes . '">'; |
|
| 1408 | - print '<input type="hidden" name="withproject" value="' . $withproject . '">'; |
|
| 1409 | - print '<input type="hidden" name="tab" value="' . $tab . '">'; |
|
| 1406 | + print '<input type="hidden" name="id" value="'.$id.'">'; |
|
| 1407 | + print '<input type="hidden" name="projectid" value="'.$projectidforalltimes.'">'; |
|
| 1408 | + print '<input type="hidden" name="withproject" value="'.$withproject.'">'; |
|
| 1409 | + print '<input type="hidden" name="tab" value="'.$tab.'">'; |
|
| 1410 | 1410 | print '<input type="hidden" name="page_y" value="">'; |
| 1411 | 1411 | |
| 1412 | 1412 | // Form to convert time spent into invoice |
@@ -1433,7 +1433,7 @@ discard block |
||
| 1433 | 1433 | 'onelineperperiod' => 'OneLinePerTimeSpentLine', |
| 1434 | 1434 | ); |
| 1435 | 1435 | print $form->selectarray('generateinvoicemode', $tmparray, 'onelineperuser', 0, 0, 0, '', 1); |
| 1436 | - print "\n" . '<script type="text/javascript">'; |
|
| 1436 | + print "\n".'<script type="text/javascript">'; |
|
| 1437 | 1437 | print ' |
| 1438 | 1438 | $(document).ready(function () { |
| 1439 | 1439 | setDetailVisibility(); |
@@ -1450,8 +1450,8 @@ discard block |
||
| 1450 | 1450 | } |
| 1451 | 1451 | }); |
| 1452 | 1452 | '; |
| 1453 | - print '</script>' . "\n"; |
|
| 1454 | - print '<span style="display:none" id="detail_time_duration"><input type="checkbox" value="detail" name="detail_time_duration"/>' . $langs->trans('AddDetailDateAndDuration') . '</span>'; |
|
| 1453 | + print '</script>'."\n"; |
|
| 1454 | + print '<span style="display:none" id="detail_time_duration"><input type="checkbox" value="detail" name="detail_time_duration"/>'.$langs->trans('AddDetailDateAndDuration').'</span>'; |
|
| 1455 | 1455 | print '</td>'; |
| 1456 | 1456 | print '</tr>'; |
| 1457 | 1457 | |
@@ -1486,14 +1486,14 @@ discard block |
||
| 1486 | 1486 | |
| 1487 | 1487 | print '<br>'; |
| 1488 | 1488 | print '<div class="center">'; |
| 1489 | - print '<input type="submit" class="button" id="createbills" name="createbills" value="' . $langs->trans('GenerateBill') . '"> '; |
|
| 1490 | - print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="' . $langs->trans("Cancel") . '">'; |
|
| 1489 | + print '<input type="submit" class="button" id="createbills" name="createbills" value="'.$langs->trans('GenerateBill').'"> '; |
|
| 1490 | + print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; |
|
| 1491 | 1491 | print '</div>'; |
| 1492 | 1492 | print '<br>'; |
| 1493 | 1493 | } else { |
| 1494 | - print '<div class="warning">' . $langs->trans("ThirdPartyRequiredToGenerateInvoice") . '</div>'; |
|
| 1494 | + print '<div class="warning">'.$langs->trans("ThirdPartyRequiredToGenerateInvoice").'</div>'; |
|
| 1495 | 1495 | print '<div class="center">'; |
| 1496 | - print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="' . $langs->trans("Cancel") . '">'; |
|
| 1496 | + print '<input type="submit" class="button button-cancel" id="cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; |
|
| 1497 | 1497 | print '</div>'; |
| 1498 | 1498 | $massaction = ''; |
| 1499 | 1499 | } |
@@ -1506,7 +1506,7 @@ discard block |
||
| 1506 | 1506 | print '<table class="noborder centpercent">'; |
| 1507 | 1507 | print '<tr>'; |
| 1508 | 1508 | print '<td class="titlefield">'; |
| 1509 | - print img_picto('', 'intervention', 'class="pictofixedwidth"') . $langs->trans('InterToUse'); |
|
| 1509 | + print img_picto('', 'intervention', 'class="pictofixedwidth"').$langs->trans('InterToUse'); |
|
| 1510 | 1510 | print '</td>'; |
| 1511 | 1511 | print '<td>'; |
| 1512 | 1512 | $forminter = new FormIntervention($db); |
@@ -1516,14 +1516,14 @@ discard block |
||
| 1516 | 1516 | print '</table>'; |
| 1517 | 1517 | |
| 1518 | 1518 | print '<div class="center">'; |
| 1519 | - print '<input type="submit" class="button" id="createinter" name="createinter" value="' . $langs->trans('GenerateInter') . '"> '; |
|
| 1520 | - print '<input type="submit" class="button" id="cancel" name="cancel" value="' . $langs->trans('Cancel') . '">'; |
|
| 1519 | + print '<input type="submit" class="button" id="createinter" name="createinter" value="'.$langs->trans('GenerateInter').'"> '; |
|
| 1520 | + print '<input type="submit" class="button" id="cancel" name="cancel" value="'.$langs->trans('Cancel').'">'; |
|
| 1521 | 1521 | print '</div>'; |
| 1522 | 1522 | print '<br>'; |
| 1523 | 1523 | } else { |
| 1524 | - print '<div class="warning">' . $langs->trans("ThirdPartyRequiredToGenerateIntervention") . '</div>'; |
|
| 1524 | + print '<div class="warning">'.$langs->trans("ThirdPartyRequiredToGenerateIntervention").'</div>'; |
|
| 1525 | 1525 | print '<div class="center">'; |
| 1526 | - print '<input type="submit" class="button" id="cancel" name="cancel" value="' . $langs->trans('Cancel') . '">'; |
|
| 1526 | + print '<input type="submit" class="button" id="cancel" name="cancel" value="'.$langs->trans('Cancel').'">'; |
|
| 1527 | 1527 | print '</div>'; |
| 1528 | 1528 | $massaction = ''; |
| 1529 | 1529 | } |
@@ -1585,14 +1585,14 @@ discard block |
||
| 1585 | 1585 | $sql .= " AND t.fk_element =".((int) $object->id); |
| 1586 | 1586 | } elseif (!empty($projectidforalltimes)) { |
| 1587 | 1587 | // Limit on one project |
| 1588 | - $sql .= " AND pt.fk_projet IN (" . $db->sanitize($projectidforalltimes) . ")"; |
|
| 1588 | + $sql .= " AND pt.fk_projet IN (".$db->sanitize($projectidforalltimes).")"; |
|
| 1589 | 1589 | } elseif (!empty($allprojectforuser)) { |
| 1590 | 1590 | // Limit on on user |
| 1591 | 1591 | if (empty($search_user)) { |
| 1592 | 1592 | $search_user = $user->id; |
| 1593 | 1593 | } |
| 1594 | 1594 | if ($search_user > 0) { |
| 1595 | - $sql .= " AND t.fk_user = " . ((int) $search_user); |
|
| 1595 | + $sql .= " AND t.fk_user = ".((int) $search_user); |
|
| 1596 | 1596 | } |
| 1597 | 1597 | } |
| 1598 | 1598 | |
@@ -1645,13 +1645,13 @@ discard block |
||
| 1645 | 1645 | if ($search_timespent_starthour || $search_timespent_startmin) { |
| 1646 | 1646 | $timespent_duration_start = $search_timespent_starthour * 60 * 60; // We store duration in seconds |
| 1647 | 1647 | $timespent_duration_start += ($search_timespent_startmin ? $search_timespent_startmin : 0) * 60; // We store duration in seconds |
| 1648 | - $sql .= " AND t.element_duration >= " . $timespent_duration_start; |
|
| 1648 | + $sql .= " AND t.element_duration >= ".$timespent_duration_start; |
|
| 1649 | 1649 | } |
| 1650 | 1650 | |
| 1651 | 1651 | if ($search_timespent_endhour || $search_timespent_endmin) { |
| 1652 | 1652 | $timespent_duration_end = $search_timespent_endhour * 60 * 60; // We store duration in seconds |
| 1653 | 1653 | $timespent_duration_end += ($search_timespent_endmin ? $search_timespent_endmin : 0) * 60; // We store duration in seconds |
| 1654 | - $sql .= " AND t.element_duration <= " . $timespent_duration_end; |
|
| 1654 | + $sql .= " AND t.element_duration <= ".$timespent_duration_end; |
|
| 1655 | 1655 | } |
| 1656 | 1656 | } |
| 1657 | 1657 | |
@@ -1699,13 +1699,13 @@ discard block |
||
| 1699 | 1699 | |
| 1700 | 1700 | if ($num >= 0) { |
| 1701 | 1701 | if (!empty($projectidforalltimes)) { |
| 1702 | - print '<!-- List of time spent for project -->' . "\n"; |
|
| 1702 | + print '<!-- List of time spent for project -->'."\n"; |
|
| 1703 | 1703 | |
| 1704 | 1704 | $title = $langs->trans("ListTaskTimeUserProject"); |
| 1705 | 1705 | |
| 1706 | 1706 | print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'clock', 0, $linktocreatetime, '', $limit, 0, 0, 1); |
| 1707 | 1707 | } else { |
| 1708 | - print '<!-- List of time spent -->' . "\n"; |
|
| 1708 | + print '<!-- List of time spent -->'."\n"; |
|
| 1709 | 1709 | |
| 1710 | 1710 | $title = $langs->trans("ListTaskTimeForTask"); |
| 1711 | 1711 | |
@@ -1727,26 +1727,26 @@ discard block |
||
| 1727 | 1727 | * Form to add a new line of time spent |
| 1728 | 1728 | */ |
| 1729 | 1729 | if ($action == 'createtime' && $user->hasRight('projet', 'time')) { |
| 1730 | - print '<!-- table to add time spent -->' . "\n"; |
|
| 1730 | + print '<!-- table to add time spent -->'."\n"; |
|
| 1731 | 1731 | if (!empty($id)) { |
| 1732 | - print '<input type="hidden" name="taskid" value="' . $id . '">'; |
|
| 1732 | + print '<input type="hidden" name="taskid" value="'.$id.'">'; |
|
| 1733 | 1733 | } |
| 1734 | 1734 | |
| 1735 | 1735 | print '<div class="div-table-responsive-no-min">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table |
| 1736 | 1736 | print '<table class="noborder nohover centpercent">'; |
| 1737 | 1737 | |
| 1738 | 1738 | print '<tr class="liste_titre">'; |
| 1739 | - print '<td>' . $langs->trans("Date") . '</td>'; |
|
| 1739 | + print '<td>'.$langs->trans("Date").'</td>'; |
|
| 1740 | 1740 | if (!empty($allprojectforuser)) { |
| 1741 | - print '<td>' . $langs->trans("Project") . '</td>'; |
|
| 1741 | + print '<td>'.$langs->trans("Project").'</td>'; |
|
| 1742 | 1742 | } |
| 1743 | 1743 | if (empty($id)) { |
| 1744 | - print '<td>' . $langs->trans("Task") . '</td>'; |
|
| 1744 | + print '<td>'.$langs->trans("Task").'</td>'; |
|
| 1745 | 1745 | } |
| 1746 | - print '<td>' . $langs->trans("By") . '</td>'; |
|
| 1747 | - print '<td>' . $langs->trans("Note") . '</td>'; |
|
| 1748 | - print '<td>' . $langs->trans("NewTimeSpent") . '</td>'; |
|
| 1749 | - print '<td>' . $langs->trans("ProgressDeclared") . '</td>'; |
|
| 1746 | + print '<td>'.$langs->trans("By").'</td>'; |
|
| 1747 | + print '<td>'.$langs->trans("Note").'</td>'; |
|
| 1748 | + print '<td>'.$langs->trans("NewTimeSpent").'</td>'; |
|
| 1749 | + print '<td>'.$langs->trans("ProgressDeclared").'</td>'; |
|
| 1750 | 1750 | if (!getDolGlobalString('PROJECT_HIDE_TASKS') && getDolGlobalString('PROJECT_BILL_TIME_SPENT')) { |
| 1751 | 1751 | print '<td></td>'; |
| 1752 | 1752 | |
@@ -1800,14 +1800,14 @@ discard block |
||
| 1800 | 1800 | print $form->select_dolusers((GETPOSTINT('userid') ? GETPOSTINT('userid') : $userid), 'userid', 0, '', 0, '', $contactsofproject, 0, 0, 0, '', 0, $langs->trans("ResourceNotAssignedToProject"), 'minwidth150imp maxwidth200'); |
| 1801 | 1801 | } else { |
| 1802 | 1802 | if ($nboftasks) { |
| 1803 | - print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . ' ' . $langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 1803 | + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).' '.$langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 1804 | 1804 | } |
| 1805 | 1805 | } |
| 1806 | 1806 | print '</td>'; |
| 1807 | 1807 | |
| 1808 | 1808 | // Note |
| 1809 | 1809 | print '<td>'; |
| 1810 | - print '<textarea name="timespent_note" class="maxwidth100onsmartphone" rows="' . ROWS_2 . '">' . (GETPOST('timespent_note') ? GETPOST('timespent_note') : '') . '</textarea>'; |
|
| 1810 | + print '<textarea name="timespent_note" class="maxwidth100onsmartphone" rows="'.ROWS_2.'">'.(GETPOST('timespent_note') ? GETPOST('timespent_note') : '').'</textarea>'; |
|
| 1811 | 1811 | print '</td>'; |
| 1812 | 1812 | |
| 1813 | 1813 | // Duration - Time spent |
@@ -1875,7 +1875,7 @@ discard block |
||
| 1875 | 1875 | $selectedfields .= (is_array($arrayofmassactions) && count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
| 1876 | 1876 | |
| 1877 | 1877 | print '<div class="div-table-responsive">'; |
| 1878 | - print '<table class="tagtable nobottomiftotal liste' . ($moreforfilter ? " listwithfilterbefore" : "") . '">' . "\n"; |
|
| 1878 | + print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; |
|
| 1879 | 1879 | |
| 1880 | 1880 | // Fields title search |
| 1881 | 1881 | // -------------------------------------------------------------------- |
@@ -1900,20 +1900,20 @@ discard block |
||
| 1900 | 1900 | } |
| 1901 | 1901 | // Thirdparty |
| 1902 | 1902 | if (!empty($arrayfields['p.fk_soc']['checked'])) { |
| 1903 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company" value="' . dol_escape_htmltag($search_company) . '"></td>'; |
|
| 1903 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company" value="'.dol_escape_htmltag($search_company).'"></td>'; |
|
| 1904 | 1904 | } |
| 1905 | 1905 | |
| 1906 | 1906 | // Thirdparty alias |
| 1907 | 1907 | if (!empty($arrayfields['s.name_alias']['checked'])) { |
| 1908 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company_alias" value="' . dol_escape_htmltag($search_company_alias) . '"></td>'; |
|
| 1908 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_company_alias" value="'.dol_escape_htmltag($search_company_alias).'"></td>'; |
|
| 1909 | 1909 | } |
| 1910 | 1910 | |
| 1911 | 1911 | if (!empty($allprojectforuser)) { |
| 1912 | 1912 | if (!empty($arrayfields['p.project_ref']['checked'])) { |
| 1913 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_ref" value="' . dol_escape_htmltag($search_project_ref) . '"></td>'; |
|
| 1913 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_ref" value="'.dol_escape_htmltag($search_project_ref).'"></td>'; |
|
| 1914 | 1914 | } |
| 1915 | 1915 | if (!empty($arrayfields['p.project_label']['checked'])) { |
| 1916 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_label" value="' . dol_escape_htmltag($search_project_label) . '"></td>'; |
|
| 1916 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="$search_project_label" value="'.dol_escape_htmltag($search_project_label).'"></td>'; |
|
| 1917 | 1917 | } |
| 1918 | 1918 | } |
| 1919 | 1919 | // Task |
@@ -1931,7 +1931,7 @@ discard block |
||
| 1931 | 1931 | } |
| 1932 | 1932 | // Note |
| 1933 | 1933 | if (!empty($arrayfields['t.note']['checked'])) { |
| 1934 | - print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="search_note" value="' . dol_escape_htmltag($search_note) . '"></td>'; |
|
| 1934 | + print '<td class="liste_titre"><input type="text" class="flat maxwidth100" name="search_note" value="'.dol_escape_htmltag($search_note).'"></td>'; |
|
| 1935 | 1935 | } |
| 1936 | 1936 | // Duration |
| 1937 | 1937 | if (!empty($arrayfields['t.element_duration']['checked'])) { |
@@ -1942,7 +1942,7 @@ discard block |
||
| 1942 | 1942 | if ($search_timespent_starthour || $search_timespent_startmin) { |
| 1943 | 1943 | $durationtouse_start = ($search_timespent_starthour * 3600 + $search_timespent_startmin * 60); |
| 1944 | 1944 | } |
| 1945 | - print '<div class="nowraponall">' . $langs->trans('from') . ' '; |
|
| 1945 | + print '<div class="nowraponall">'.$langs->trans('from').' '; |
|
| 1946 | 1946 | print $form->select_duration('search_timespent_duration_start', $durationtouse_start, 0, 'text', 0, 1); |
| 1947 | 1947 | print '</div>'; |
| 1948 | 1948 | |
@@ -1950,7 +1950,7 @@ discard block |
||
| 1950 | 1950 | if ($search_timespent_endhour || $search_timespent_endmin) { |
| 1951 | 1951 | $durationtouse_end = ($search_timespent_endhour * 3600 + $search_timespent_endmin * 60); |
| 1952 | 1952 | } |
| 1953 | - print '<div class="nowraponall">' . $langs->trans('at') . ' '; |
|
| 1953 | + print '<div class="nowraponall">'.$langs->trans('at').' '; |
|
| 1954 | 1954 | print $form->select_duration('search_timespent_duration_end', $durationtouse_end, 0, 'text', 0, 1); |
| 1955 | 1955 | print '</div>'; |
| 1956 | 1956 | |
@@ -1966,7 +1966,7 @@ discard block |
||
| 1966 | 1966 | } |
| 1967 | 1967 | // Value billed |
| 1968 | 1968 | if (!empty($arrayfields['valuebilled']['checked'])) { |
| 1969 | - print '<td class="liste_titre center">' . $form->selectyesno('search_valuebilled', $search_valuebilled, 1, false, 1) . '</td>'; |
|
| 1969 | + print '<td class="liste_titre center">'.$form->selectyesno('search_valuebilled', $search_valuebilled, 1, false, 1).'</td>'; |
|
| 1970 | 1970 | } |
| 1971 | 1971 | |
| 1972 | 1972 | /* |
@@ -1984,7 +1984,7 @@ discard block |
||
| 1984 | 1984 | print $searchpicto; |
| 1985 | 1985 | print '</td>'; |
| 1986 | 1986 | } |
| 1987 | - print '</tr>' . "\n"; |
|
| 1987 | + print '</tr>'."\n"; |
|
| 1988 | 1988 | |
| 1989 | 1989 | $totalarray = array(); |
| 1990 | 1990 | $totalarray['nbfield'] = 0; |
@@ -2094,7 +2094,7 @@ discard block |
||
| 2094 | 2094 | if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { |
| 2095 | 2095 | print '<td class="center nowraponall">'; |
| 2096 | 2096 | if (($action == 'editline' || $action == 'splitline') && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2097 | - print '<input type="hidden" name="lineid" value="' . GETPOSTINT('lineid') . '">'; |
|
| 2097 | + print '<input type="hidden" name="lineid" value="'.GETPOSTINT('lineid').'">'; |
|
| 2098 | 2098 | print '<input type="submit" class="button buttongen smallpaddingimp margintoponlyshort marginbottomonlyshort button-save" name="save" value="'.$langs->trans("Save").'">'; |
| 2099 | 2099 | print '<br>'; |
| 2100 | 2100 | print '<input type="submit" class="button buttongen smallpaddingimp margintoponlyshort marginbottomonlyshort button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">'; |
@@ -2102,7 +2102,7 @@ discard block |
||
| 2102 | 2102 | if (in_array($task_time->fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) { |
| 2103 | 2103 | if (getDolGlobalString('MAIN_FEATURES_LEVEL') >= 2) { |
| 2104 | 2104 | print ' '; |
| 2105 | - print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?action=splitline&token=' . newToken() . '&lineid=' . $task_time->rowid . $param . ((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '') . '">'; |
|
| 2105 | + print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=splitline&token='.newToken().'&lineid='.$task_time->rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">'; |
|
| 2106 | 2106 | print img_split('', 'class="pictofixedwidth"'); |
| 2107 | 2107 | print '</a>'; |
| 2108 | 2108 | } |
@@ -2121,7 +2121,7 @@ discard block |
||
| 2121 | 2121 | $selected = 1; |
| 2122 | 2122 | } |
| 2123 | 2123 | print ' '; |
| 2124 | - print '<input id="cb' . $task_time->rowid . '" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="' . $task_time->rowid . '"' . ($selected ? ' checked="checked"' : '') . '>'; |
|
| 2124 | + print '<input id="cb'.$task_time->rowid.'" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="'.$task_time->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; |
|
| 2125 | 2125 | } |
| 2126 | 2126 | } |
| 2127 | 2127 | } |
@@ -2239,7 +2239,7 @@ discard block |
||
| 2239 | 2239 | } |
| 2240 | 2240 | } |
| 2241 | 2241 | } elseif ($action !== 'createtime') { |
| 2242 | - print '<input type="hidden" name="taskid" value="' . $id . '">'; |
|
| 2242 | + print '<input type="hidden" name="taskid" value="'.$id.'">'; |
|
| 2243 | 2243 | } |
| 2244 | 2244 | |
| 2245 | 2245 | // Task label |
@@ -2269,7 +2269,7 @@ discard block |
||
| 2269 | 2269 | print img_object('', 'user', 'class="hideonsmartphone"'); |
| 2270 | 2270 | print $form->select_dolusers($task_time->fk_user, 'userid_line', 0, '', 0, '', $contactsoftask, '0', 0, 0, '', 0, '', 'maxwidth200'); |
| 2271 | 2271 | } else { |
| 2272 | - print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2272 | + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2273 | 2273 | } |
| 2274 | 2274 | } else { |
| 2275 | 2275 | $userstatic->id = $task_time->fk_user; |
@@ -2289,7 +2289,7 @@ discard block |
||
| 2289 | 2289 | if (!empty($arrayfields['t.note']['checked'])) { |
| 2290 | 2290 | if ($action == 'editline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2291 | 2291 | print '<td class="small">'; |
| 2292 | - print '<textarea name="timespent_note_line" width="95%" rows="' . ROWS_1 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>'; |
|
| 2292 | + print '<textarea name="timespent_note_line" width="95%" rows="'.ROWS_1.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>'; |
|
| 2293 | 2293 | print '</td>'; |
| 2294 | 2294 | } else { |
| 2295 | 2295 | print '<td class="small tdoverflowmax150 classfortooltip" title="'.dol_string_onlythesehtmltags(dol_htmlentitiesbr($task_time->note)).'">'; |
@@ -2300,7 +2300,7 @@ discard block |
||
| 2300 | 2300 | $totalarray['nbfield']++; |
| 2301 | 2301 | } |
| 2302 | 2302 | } elseif ($action == 'editline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2303 | - print '<input type="hidden" name="timespent_note_line" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">'; |
|
| 2303 | + print '<input type="hidden" name="timespent_note_line" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">'; |
|
| 2304 | 2304 | } |
| 2305 | 2305 | |
| 2306 | 2306 | // Time spent |
@@ -2361,7 +2361,7 @@ discard block |
||
| 2361 | 2361 | $value = price2num($task_time->thm * $task_time->element_duration / 3600, 'MT', 1); |
| 2362 | 2362 | |
| 2363 | 2363 | print '<td class="nowraponall right">'; |
| 2364 | - print '<span class="amount" title="' . $langs->trans("THM") . ': ' . price($task_time->thm) . '">'; |
|
| 2364 | + print '<span class="amount" title="'.$langs->trans("THM").': '.price($task_time->thm).'">'; |
|
| 2365 | 2365 | print price($value, 1, $langs, 1, -1, -1, $conf->currency); |
| 2366 | 2366 | print '</span>'; |
| 2367 | 2367 | print '</td>'; |
@@ -2412,7 +2412,7 @@ discard block |
||
| 2412 | 2412 | print $langs->trans("No"); |
| 2413 | 2413 | } |
| 2414 | 2414 | } else { |
| 2415 | - print '<span class="opacitymedium">' . $langs->trans("NA") . '</span>'; |
|
| 2415 | + print '<span class="opacitymedium">'.$langs->trans("NA").'</span>'; |
|
| 2416 | 2416 | } |
| 2417 | 2417 | } |
| 2418 | 2418 | print '</td>'; |
@@ -2443,7 +2443,7 @@ discard block |
||
| 2443 | 2443 | if (in_array($task_time->fk_user, $childids) || $user->hasRight('projet', 'all', 'creer')) { |
| 2444 | 2444 | if (getDolGlobalString('MAIN_FEATURES_LEVEL') >= 2) { |
| 2445 | 2445 | print ' '; |
| 2446 | - print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?action=splitline&token=' . newToken() . '&lineid=' . $task_time->rowid . $param . ((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '') . '">'; |
|
| 2446 | + print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=splitline&token='.newToken().'&lineid='.$task_time->rowid.$param.((empty($id) || $tab == 'timespent') ? '&tab=timespent' : '').'">'; |
|
| 2447 | 2447 | print img_split('', 'class="pictofixedwidth"'); |
| 2448 | 2448 | print '</a>'; |
| 2449 | 2449 | } |
@@ -2462,7 +2462,7 @@ discard block |
||
| 2462 | 2462 | $selected = 1; |
| 2463 | 2463 | } |
| 2464 | 2464 | print ' '; |
| 2465 | - print '<input id="cb' . $task_time->rowid . '" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="' . $task_time->rowid . '"' . ($selected ? ' checked="checked"' : '') . '>'; |
|
| 2465 | + print '<input id="cb'.$task_time->rowid.'" class="flat checkforselect marginleftonly" type="checkbox" name="toselect[]" value="'.$task_time->rowid.'"'.($selected ? ' checked="checked"' : '').'>'; |
|
| 2466 | 2466 | } |
| 2467 | 2467 | } |
| 2468 | 2468 | } |
@@ -2552,7 +2552,7 @@ discard block |
||
| 2552 | 2552 | print img_object('', 'user', 'class="hideonsmartphone"'); |
| 2553 | 2553 | print $form->select_dolusers($task_time->fk_user, 'userid_line', 0, '', 0, '', $contactsoftask); |
| 2554 | 2554 | } else { |
| 2555 | - print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2555 | + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2556 | 2556 | } |
| 2557 | 2557 | } else { |
| 2558 | 2558 | $userstatic->id = $task_time->fk_user; |
@@ -2569,13 +2569,13 @@ discard block |
||
| 2569 | 2569 | if (!empty($arrayfields['t.note']['checked'])) { |
| 2570 | 2570 | print '<td class="tdoverflowmax300">'; |
| 2571 | 2571 | if ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2572 | - print '<textarea name="timespent_note_line" width="95%" rows="' . ROWS_1 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>'; |
|
| 2572 | + print '<textarea name="timespent_note_line" width="95%" rows="'.ROWS_1.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>'; |
|
| 2573 | 2573 | } else { |
| 2574 | 2574 | print dol_nl2br($task_time->note); |
| 2575 | 2575 | } |
| 2576 | 2576 | print '</td>'; |
| 2577 | 2577 | } elseif ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2578 | - print '<input type="hidden" name="timespent_note_line" rows="' . ROWS_1 . '" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">'; |
|
| 2578 | + print '<input type="hidden" name="timespent_note_line" rows="'.ROWS_1.'" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">'; |
|
| 2579 | 2579 | } |
| 2580 | 2580 | |
| 2581 | 2581 | // Time spent |
@@ -2708,7 +2708,7 @@ discard block |
||
| 2708 | 2708 | print img_object('', 'user', 'class="hideonsmartphone"'); |
| 2709 | 2709 | print $form->select_dolusers($task_time->fk_user, 'userid_line_2', 0, '', 0, '', $contactsoftask); |
| 2710 | 2710 | } else { |
| 2711 | - print img_error($langs->trans('FirstAddRessourceToAllocateTime')) . $langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2711 | + print img_error($langs->trans('FirstAddRessourceToAllocateTime')).$langs->trans('FirstAddRessourceToAllocateTime'); |
|
| 2712 | 2712 | } |
| 2713 | 2713 | } else { |
| 2714 | 2714 | $userstatic->id = $task_time->fk_user; |
@@ -2725,13 +2725,13 @@ discard block |
||
| 2725 | 2725 | if (!empty($arrayfields['t.note']['checked'])) { |
| 2726 | 2726 | print '<td class="small tdoverflowmax300"">'; |
| 2727 | 2727 | if ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2728 | - print '<textarea name="timespent_note_line_2" width="95%" rows="' . ROWS_1 . '">' . dol_escape_htmltag($task_time->note, 0, 1) . '</textarea>'; |
|
| 2728 | + print '<textarea name="timespent_note_line_2" width="95%" rows="'.ROWS_1.'">'.dol_escape_htmltag($task_time->note, 0, 1).'</textarea>'; |
|
| 2729 | 2729 | } else { |
| 2730 | 2730 | print dol_nl2br($task_time->note); |
| 2731 | 2731 | } |
| 2732 | 2732 | print '</td>'; |
| 2733 | 2733 | } elseif ($action == 'splitline' && GETPOSTINT('lineid') == $task_time->rowid) { |
| 2734 | - print '<input type="hidden" name="timespent_note_line_2" value="' . dol_escape_htmltag($task_time->note, 0, 1) . '">'; |
|
| 2734 | + print '<input type="hidden" name="timespent_note_line_2" value="'.dol_escape_htmltag($task_time->note, 0, 1).'">'; |
|
| 2735 | 2735 | } |
| 2736 | 2736 | |
| 2737 | 2737 | // Time spent |
@@ -2803,14 +2803,14 @@ discard block |
||
| 2803 | 2803 | $i++; |
| 2804 | 2804 | if ($i == 1) { |
| 2805 | 2805 | if ($num < $limit && empty($offset)) { |
| 2806 | - print '<td class="left">' . $langs->trans("Total") . '</td>'; |
|
| 2806 | + print '<td class="left">'.$langs->trans("Total").'</td>'; |
|
| 2807 | 2807 | } else { |
| 2808 | 2808 | print '<td class="left">'.$form->textwithpicto($langs->trans("Total"), $langs->trans("Totalforthispage")).'</td>'; |
| 2809 | 2809 | } |
| 2810 | 2810 | } elseif (isset($totalarray['totaldurationfield']) && $totalarray['totaldurationfield'] == $i) { |
| 2811 | - print '<td class="right">' . convertSecondToTime($totalarray['totalduration'], 'allhourmin') . '</td>'; |
|
| 2811 | + print '<td class="right">'.convertSecondToTime($totalarray['totalduration'], 'allhourmin').'</td>'; |
|
| 2812 | 2812 | } elseif (isset($totalarray['totalvaluefield']) && $totalarray['totalvaluefield'] == $i) { |
| 2813 | - print '<td class="right">' . price($totalarray['totalvalue']) . '</td>'; |
|
| 2813 | + print '<td class="right">'.price($totalarray['totalvalue']).'</td>'; |
|
| 2814 | 2814 | //} elseif ($totalarray['totalvaluebilledfield'] == $i) { print '<td class="center">'.price($totalarray['totalvaluebilled']).'</td>'; |
| 2815 | 2815 | } else { |
| 2816 | 2816 | print '<td></td>'; |
@@ -2826,8 +2826,8 @@ discard block |
||
| 2826 | 2826 | $totalnboffields++; |
| 2827 | 2827 | } |
| 2828 | 2828 | } |
| 2829 | - print '<tr class="oddeven"><td colspan="' . $totalnboffields . '">'; |
|
| 2830 | - print '<span class="opacitymedium">' . $langs->trans("None") . '</span>'; |
|
| 2829 | + print '<tr class="oddeven"><td colspan="'.$totalnboffields.'">'; |
|
| 2830 | + print '<span class="opacitymedium">'.$langs->trans("None").'</span>'; |
|
| 2831 | 2831 | print '</td></tr>'; |
| 2832 | 2832 | } |
| 2833 | 2833 | |
@@ -526,7 +526,7 @@ discard block |
||
| 526 | 526 | if (isModEnabled('multicurrency') && $_SESSION["takeposcustomercurrency"] != "" && $conf->currency != $_SESSION["takeposcustomercurrency"]) { |
| 527 | 527 | //Only show customer currency if multicurrency module is enabled, if currency selected and if this currency selected is not the same as main currency |
| 528 | 528 | $showothercurrency = 1; |
| 529 | - include_once DOL_DOCUMENT_ROOT . '/multicurrency/class/multicurrency.class.php'; |
|
| 529 | + include_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; |
|
| 530 | 530 | $multicurrency = new MultiCurrency($db); |
| 531 | 531 | $multicurrency->fetch(0, $_SESSION["takeposcustomercurrency"]); |
| 532 | 532 | } |
@@ -537,7 +537,7 @@ discard block |
||
| 537 | 537 | <span class="takepospay colorwhite"><?php echo $langs->trans('TotalTTC'); ?>: <span id="totaldisplay" class="colorwhite"><?php |
| 538 | 538 | echo price($invoice->total_ttc, 1, '', 1, -1, -1, $conf->currency); |
| 539 | 539 | if ($showothercurrency) { |
| 540 | - print ' <span id="linecolht-span-total opacitymedium" style="font-size:0.9em; font-style:italic;">(' . price($invoice->total_ht * $multicurrency->rate->rate) . ' ' . $_SESSION["takeposcustomercurrency"] . ')</span>'; |
|
| 540 | + print ' <span id="linecolht-span-total opacitymedium" style="font-size:0.9em; font-style:italic;">('.price($invoice->total_ht * $multicurrency->rate->rate).' '.$_SESSION["takeposcustomercurrency"].')</span>'; |
|
| 541 | 541 | } |
| 542 | 542 | ?></span></span> |
| 543 | 543 | </div> |
@@ -546,7 +546,7 @@ discard block |
||
| 546 | 546 | <span class="takepospay colorwhite"><?php echo $langs->trans('RemainToPay'); ?>: <span id="remaintopaydisplay" class="colorwhite"><?php |
| 547 | 547 | echo price($remaintopay, 1, '', 1, -1, -1, $invoice->multicurrency_code); |
| 548 | 548 | if ($showothercurrency) { |
| 549 | - print ' <span id="linecolht-span-total opacitymedium" style="font-size:0.9em; font-style:italic;">(' . price($remaintopay * $multicurrency->rate->rate) . ' ' . $_SESSION["takeposcustomercurrency"] . ')</span>'; |
|
| 549 | + print ' <span id="linecolht-span-total opacitymedium" style="font-size:0.9em; font-style:italic;">('.price($remaintopay * $multicurrency->rate->rate).' '.$_SESSION["takeposcustomercurrency"].')</span>'; |
|
| 550 | 550 | } |
| 551 | 551 | ?></span></span> |
| 552 | 552 | </div> |
@@ -555,7 +555,7 @@ discard block |
||
| 555 | 555 | <span class="takepospay colorwhite"><?php echo $langs->trans("Received"); ?>: <span class="change1 colorred"><?php |
| 556 | 556 | echo price(0, 1, '', 1, -1, -1, $invoice->multicurrency_code); |
| 557 | 557 | if ($showothercurrency) { |
| 558 | - print ' <span id="linecolht-span-total opacitymedium" style="font-size:0.9em; font-style:italic;">(' . price(0 * $multicurrency->rate->rate) . ' ' . $_SESSION["takeposcustomercurrency"] . ')</span>'; |
|
| 558 | + print ' <span id="linecolht-span-total opacitymedium" style="font-size:0.9em; font-style:italic;">('.price(0 * $multicurrency->rate->rate).' '.$_SESSION["takeposcustomercurrency"].')</span>'; |
|
| 559 | 559 | } |
| 560 | 560 | ?></span><input type="hidden" id="change1" class="change1" value="0"></span> |
| 561 | 561 | </div> |
@@ -563,7 +563,7 @@ discard block |
||
| 563 | 563 | <span class="takepospay colorwhite"><?php echo $langs->trans("Change"); ?>: <span class="change2 colorwhite"><?php |
| 564 | 564 | echo price(0, 1, '', 1, -1, -1, $invoice->multicurrency_code); |
| 565 | 565 | if ($showothercurrency) { |
| 566 | - print ' <span id="linecolht-span-total opacitymedium" style="font-size:0.9em; font-style:italic;">(' . price(0 * $multicurrency->rate->rate) . ' ' . $_SESSION["takeposcustomercurrency"] . ')</span>'; |
|
| 566 | + print ' <span id="linecolht-span-total opacitymedium" style="font-size:0.9em; font-style:italic;">('.price(0 * $multicurrency->rate->rate).' '.$_SESSION["takeposcustomercurrency"].')</span>'; |
|
| 567 | 567 | } |
| 568 | 568 | ?></span><input type="hidden" id="change2" class="change2" value="0"></span> |
| 569 | 569 | </div> |
@@ -383,9 +383,9 @@ discard block |
||
| 383 | 383 | $sql .= " AND ((tc.source = 'external'"; |
| 384 | 384 | $sql .= " AND tc.element='".$db->escape($object->element)."'"; |
| 385 | 385 | $sql .= " AND tc.active=1"; |
| 386 | - $sql .= " AND sp.email='".$db->escape($_SESSION['email_customer'])."')"; // email found into an external contact |
|
| 387 | - $sql .= " OR s.email='".$db->escape($_SESSION['email_customer'])."'"; // or email of the linked company |
|
| 388 | - $sql .= " OR t.origin_email='".$db->escape($_SESSION['email_customer'])."')"; // or email of the requester |
|
| 386 | + $sql .= " AND sp.email='".$db->escape($_SESSION['email_customer'])."')"; // email found into an external contact |
|
| 387 | + $sql .= " OR s.email='".$db->escape($_SESSION['email_customer'])."'"; // or email of the linked company |
|
| 388 | + $sql .= " OR t.origin_email='".$db->escape($_SESSION['email_customer'])."')"; // or email of the requester |
|
| 389 | 389 | // Manage filter |
| 390 | 390 | if (!empty($filter)) { |
| 391 | 391 | foreach ($filter as $key => $value) { |
@@ -433,7 +433,7 @@ discard block |
||
| 433 | 433 | |
| 434 | 434 | // allow to display information before list |
| 435 | 435 | $parameters = array('arrayfields' => $arrayfields); |
| 436 | - $reshook = $hookmanager->executeHooks('printFieldListHeader', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
|
| 436 | + $reshook = $hookmanager->executeHooks('printFieldListHeader', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
|
| 437 | 437 | print $hookmanager->resPrint; |
| 438 | 438 | |
| 439 | 439 | print '<div class="div-table-responsive">'; |
@@ -197,7 +197,7 @@ discard block |
||
| 197 | 197 | |
| 198 | 198 | if (getDolGlobalString('EVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE')) { |
| 199 | 199 | print '<div class="backimagepubliceventorganizationsubscription">'; |
| 200 | - print '<img id="idEVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE" src="' . getDolGlobalString('EVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE').'">'; |
|
| 200 | + print '<img id="idEVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE" src="'.getDolGlobalString('EVENTORGANIZATION_IMAGE_PUBLIC_INTERFACE').'">'; |
|
| 201 | 201 | print '</div>'; |
| 202 | 202 | } |
| 203 | 203 | |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | } |
| 236 | 236 | |
| 237 | 237 | // Action called when page is submitted |
| 238 | -if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conference->status == 2 || !empty($project->id) && $project->status == Project::STATUS_VALIDATED)) { |
|
| 238 | +if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conference->status == 2 || !empty($project->id) && $project->status == Project::STATUS_VALIDATED)) { |
|
| 239 | 239 | $error = 0; |
| 240 | 240 | |
| 241 | 241 | $urlback = ''; |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | |
| 337 | 337 | // If the registration has already been paid for this attendee |
| 338 | 338 | if (!empty($confattendee->date_subscription) && !empty($confattendee->amount)) { |
| 339 | - $securekeyurl = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY') . 'conferenceorbooth'.$id, 'master'); |
|
| 339 | + $securekeyurl = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY').'conferenceorbooth'.$id, 'master'); |
|
| 340 | 340 | $redirection = $dolibarr_main_url_root.'/public/eventorganization/subscriptionok.php?id='.((int) $id).'&securekey='.urlencode($securekeyurl); |
| 341 | 341 | |
| 342 | 342 | $mesg = $langs->trans("RegistrationAndPaymentWereAlreadyRecorded", $email); |
@@ -350,7 +350,7 @@ discard block |
||
| 350 | 350 | |
| 351 | 351 | $resultfetchthirdparty = 0; |
| 352 | 352 | |
| 353 | - $genericcompanyname = $langs->trans('EventParticipant').' '.($emailcompany ? $emailcompany : $email); // Keep this label simple so we can retrieve same thirdparty for another event |
|
| 353 | + $genericcompanyname = $langs->trans('EventParticipant').' '.($emailcompany ? $emailcompany : $email); // Keep this label simple so we can retrieve same thirdparty for another event |
|
| 354 | 354 | |
| 355 | 355 | // Getting the thirdparty or creating it |
| 356 | 356 | $thirdparty = new Societe($db); |
@@ -603,7 +603,7 @@ discard block |
||
| 603 | 603 | $redirection = $dolibarr_main_url_root.'/public/payment/newpayment.php?source='.urlencode((string) ($sourcetouse)).'&ref='.urlencode((string) ($reftouse)); |
| 604 | 604 | if (getDolGlobalString('PAYMENT_SECURITY_TOKEN')) { |
| 605 | 605 | if (getDolGlobalString('PAYMENT_SECURITY_TOKEN_UNIQUE')) { |
| 606 | - $redirection .= '&securekey='.dol_hash(getDolGlobalString('PAYMENT_SECURITY_TOKEN') . $sourcetouse . $reftouse, 2); // Use the source in the hash to avoid duplicates if the references are identical |
|
| 606 | + $redirection .= '&securekey='.dol_hash(getDolGlobalString('PAYMENT_SECURITY_TOKEN').$sourcetouse.$reftouse, 2); // Use the source in the hash to avoid duplicates if the references are identical |
|
| 607 | 607 | } else { |
| 608 | 608 | $redirection .= '&securekey='.urlencode(getDolGlobalString('PAYMENT_SECURITY_TOKEN')); |
| 609 | 609 | } |
@@ -664,7 +664,7 @@ discard block |
||
| 664 | 664 | dol_syslog("Failed to send EMail to ".$sendto, LOG_ERR, 0, '_payment'); |
| 665 | 665 | } |
| 666 | 666 | |
| 667 | - $securekeyurl = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY') . 'conferenceorbooth'.$id, 2); |
|
| 667 | + $securekeyurl = dol_hash(getDolGlobalString('EVENTORGANIZATION_SECUREKEY').'conferenceorbooth'.$id, 2); |
|
| 668 | 668 | $redirection = $dolibarr_main_url_root.'/public/eventorganization/subscriptionok.php?id='.((int) $id).'&securekey='.urlencode($securekeyurl); |
| 669 | 669 | |
| 670 | 670 | header("Location: ".$redirection); |
@@ -698,7 +698,7 @@ discard block |
||
| 698 | 698 | print '<span class="opacitymedium">'.$langs->trans("EvntOrgWelcomeMessage").'</span>'; |
| 699 | 699 | print '<br>'; |
| 700 | 700 | // Title |
| 701 | -print '<span class="eventlabel large">'.dol_escape_htmltag($project->title . ' '. $conference->label).'</span><br>'; |
|
| 701 | +print '<span class="eventlabel large">'.dol_escape_htmltag($project->title.' '.$conference->label).'</span><br>'; |
|
| 702 | 702 | print '</div>'; |
| 703 | 703 | |
| 704 | 704 | // Help text |
@@ -756,7 +756,7 @@ discard block |
||
| 756 | 756 | print ' - '; |
| 757 | 757 | print dol_print_date($project->date_end); |
| 758 | 758 | }*/ |
| 759 | - $maxattendees = $project->max_attendees; // Max attendeed for the project/event |
|
| 759 | + $maxattendees = $project->max_attendees; // Max attendeed for the project/event |
|
| 760 | 760 | } |
| 761 | 761 | |
| 762 | 762 | if ($maxattendees && $currentnbofattendees >= $maxattendees) { |
@@ -772,14 +772,14 @@ discard block |
||
| 772 | 772 | if ((!empty($conference->id) && $conference->status == ConferenceOrBooth::STATUS_CONFIRMED) || (!empty($project->id) && $project->status == Project::STATUS_VALIDATED)) { |
| 773 | 773 | if (empty($maxattendees) || $currentnbofattendees < $maxattendees) { |
| 774 | 774 | // Print form |
| 775 | - print '<form action="' . $_SERVER["PHP_SELF"] . '" method="POST" name="newmember">' . "\n"; |
|
| 776 | - print '<input type="hidden" name="token" value="' . newToken() . '" / >'; |
|
| 777 | - print '<input type="hidden" name="entity" value="' . $entity . '" />'; |
|
| 775 | + print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST" name="newmember">'."\n"; |
|
| 776 | + print '<input type="hidden" name="token" value="'.newToken().'" / >'; |
|
| 777 | + print '<input type="hidden" name="entity" value="'.$entity.'" />'; |
|
| 778 | 778 | print '<input type="hidden" name="action" value="add" />'; |
| 779 | - print '<input type="hidden" name="type" value="' . $type . '" />'; |
|
| 780 | - print '<input type="hidden" name="id" value="' . $conference->id . '" />'; |
|
| 781 | - print '<input type="hidden" name="fk_project" value="' . $project->id . '" />'; |
|
| 782 | - print '<input type="hidden" name="securekey" value="' . $securekeyreceived . '" />'; |
|
| 779 | + print '<input type="hidden" name="type" value="'.$type.'" />'; |
|
| 780 | + print '<input type="hidden" name="id" value="'.$conference->id.'" />'; |
|
| 781 | + print '<input type="hidden" name="fk_project" value="'.$project->id.'" />'; |
|
| 782 | + print '<input type="hidden" name="securekey" value="'.$securekeyreceived.'" />'; |
|
| 783 | 783 | |
| 784 | 784 | print '<br>'; |
| 785 | 785 | print '<br>'; |
@@ -799,20 +799,20 @@ discard block |
||
| 799 | 799 | }); |
| 800 | 800 | </script>'; |
| 801 | 801 | |
| 802 | - print '<table class="border" summary="form to subscribe" id="tablesubscribe">' . "\n"; |
|
| 802 | + print '<table class="border" summary="form to subscribe" id="tablesubscribe">'."\n"; |
|
| 803 | 803 | |
| 804 | 804 | // Firstname |
| 805 | - print '<tr><td><span class="fieldrequired">' . $langs->trans("Firstname") . '</span></td><td>'; |
|
| 806 | - print '<input type="text" name="firstname" maxlength="255" class="minwidth200 maxwidth300" value="' . dol_escape_htmltag($firstname) . '" required></td></tr>' . "\n"; |
|
| 805 | + print '<tr><td><span class="fieldrequired">'.$langs->trans("Firstname").'</span></td><td>'; |
|
| 806 | + print '<input type="text" name="firstname" maxlength="255" class="minwidth200 maxwidth300" value="'.dol_escape_htmltag($firstname).'" required></td></tr>'."\n"; |
|
| 807 | 807 | |
| 808 | 808 | // Lastname |
| 809 | - print '<tr><td><span class="fieldrequired">' . $langs->trans("Lastname") . '</span></td><td>'; |
|
| 810 | - print '<input type="text" name="lastname" maxlength="255" class="minwidth200 maxwidth300" value="' . dol_escape_htmltag($lastname) . '" required></td></tr>' . "\n"; |
|
| 809 | + print '<tr><td><span class="fieldrequired">'.$langs->trans("Lastname").'</span></td><td>'; |
|
| 810 | + print '<input type="text" name="lastname" maxlength="255" class="minwidth200 maxwidth300" value="'.dol_escape_htmltag($lastname).'" required></td></tr>'."\n"; |
|
| 811 | 811 | |
| 812 | 812 | |
| 813 | - print '<tr><td><span class="fieldrequired">' . $langs->trans("EmailAttendee") . '</span></td><td>'; |
|
| 813 | + print '<tr><td><span class="fieldrequired">'.$langs->trans("EmailAttendee").'</span></td><td>'; |
|
| 814 | 814 | print img_picto('', 'email', 'class="pictofixedwidth"'); |
| 815 | - print '<input type="text" name="email" maxlength="255" class="minwidth200 widthcentpercentminusx maxwidth300" value="' . dol_escape_htmltag(GETPOST('email')) . '" required></td></tr>' . "\n"; |
|
| 815 | + print '<input type="text" name="email" maxlength="255" class="minwidth200 widthcentpercentminusx maxwidth300" value="'.dol_escape_htmltag(GETPOST('email')).'" required></td></tr>'."\n"; |
|
| 816 | 816 | |
| 817 | 817 | // Company |
| 818 | 818 | print '<tr id="trcompany" class="trcompany"><td>'; |
@@ -825,21 +825,21 @@ discard block |
||
| 825 | 825 | } |
| 826 | 826 | print '</td><td>'; |
| 827 | 827 | print img_picto('', 'company', 'class="pictofixedwidth"'); |
| 828 | - print '<input type="text" name="societe" class="minwidth200 widthcentpercentminusx maxwidth300" value="' . dol_escape_htmltag(GETPOST('societe')) . '"'.(empty((float) $project->price_registration) ? '' : ' required').'></td></tr>' . "\n"; |
|
| 828 | + print '<input type="text" name="societe" class="minwidth200 widthcentpercentminusx maxwidth300" value="'.dol_escape_htmltag(GETPOST('societe')).'"'.(empty((float) $project->price_registration) ? '' : ' required').'></td></tr>'."\n"; |
|
| 829 | 829 | |
| 830 | 830 | // Email company for invoice |
| 831 | 831 | if ($project->price_registration) { |
| 832 | - print '<tr><td>' . $form->textwithpicto($langs->trans("EmailCompany"), $langs->trans("EmailCompanyForInvoice")) . '</td><td>'; |
|
| 832 | + print '<tr><td>'.$form->textwithpicto($langs->trans("EmailCompany"), $langs->trans("EmailCompanyForInvoice")).'</td><td>'; |
|
| 833 | 833 | print img_picto('', 'email', 'class="pictofixedwidth"'); |
| 834 | - print '<input type="text" name="emailcompany" maxlength="255" class="minwidth200 widthcentpercentminusx maxwidth300" value="' . dol_escape_htmltag(GETPOST('emailcompany')) . '"></td></tr>' . "\n"; |
|
| 834 | + print '<input type="text" name="emailcompany" maxlength="255" class="minwidth200 widthcentpercentminusx maxwidth300" value="'.dol_escape_htmltag(GETPOST('emailcompany')).'"></td></tr>'."\n"; |
|
| 835 | 835 | } |
| 836 | 836 | |
| 837 | 837 | // Address |
| 838 | - print '<tr><td>' . $langs->trans("Address") . '</td><td>' . "\n"; |
|
| 839 | - print '<textarea name="address" id="address" wrap="soft" class="centpercent" rows="' . ROWS_2 . '">' . dol_escape_htmltag(GETPOST('address', 'restricthtml'), 0, 1) . '</textarea></td></tr>' . "\n"; |
|
| 838 | + print '<tr><td>'.$langs->trans("Address").'</td><td>'."\n"; |
|
| 839 | + print '<textarea name="address" id="address" wrap="soft" class="centpercent" rows="'.ROWS_2.'">'.dol_escape_htmltag(GETPOST('address', 'restricthtml'), 0, 1).'</textarea></td></tr>'."\n"; |
|
| 840 | 840 | |
| 841 | 841 | // Zip / Town |
| 842 | - print '<tr><td>' . $langs->trans('Zip') . ' / ' . $langs->trans('Town') . '</td><td>'; |
|
| 842 | + print '<tr><td>'.$langs->trans('Zip').' / '.$langs->trans('Town').'</td><td>'; |
|
| 843 | 843 | print $formcompany->select_ziptown(GETPOST('zipcode'), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6, 1); |
| 844 | 844 | print ' / '; |
| 845 | 845 | print $formcompany->select_ziptown(GETPOST('town'), 'town', array('zipcode', 'selectcountry_id', 'state_id'), 0, 1); |
@@ -868,7 +868,7 @@ discard block |
||
| 868 | 868 | print '</td></tr>'; |
| 869 | 869 | // State |
| 870 | 870 | if (!getDolGlobalString('SOCIETE_DISABLE_STATE')) { |
| 871 | - print '<tr><td>' . $langs->trans('State') . '</td><td>'; |
|
| 871 | + print '<tr><td>'.$langs->trans('State').'</td><td>'; |
|
| 872 | 872 | if ($country_code) { |
| 873 | 873 | print img_picto('', 'state', 'class="pictofixedwidth"'); |
| 874 | 874 | print $formcompany->select_state(GETPOST("state_id"), $country_code); |
@@ -879,13 +879,13 @@ discard block |
||
| 879 | 879 | } |
| 880 | 880 | |
| 881 | 881 | if ($project->price_registration) { |
| 882 | - print '<tr><td>' . $langs->trans('Price') . '</td><td>'; |
|
| 882 | + print '<tr><td>'.$langs->trans('Price').'</td><td>'; |
|
| 883 | 883 | print '<span class="amount price-registration">'.price($project->price_registration, 1, $langs, 1, -1, -1, $conf->currency).'</span>'; |
| 884 | 884 | print '</td></tr>'; |
| 885 | 885 | } |
| 886 | 886 | |
| 887 | 887 | $notetoshow = $note_public; |
| 888 | - print '<tr><td>' . $langs->trans('Note') . '</td><td>'; |
|
| 888 | + print '<tr><td>'.$langs->trans('Note').'</td><td>'; |
|
| 889 | 889 | if (getDolGlobalString('EVENTORGANIZATION_DEFAULT_NOTE_ON_REGISTRATION')) { |
| 890 | 890 | $notetoshow = str_replace('\n', "\n", $conf->global->EVENTORGANIZATION_DEFAULT_NOTE_ON_REGISTRATION); |
| 891 | 891 | } |
@@ -898,9 +898,9 @@ discard block |
||
| 898 | 898 | |
| 899 | 899 | // Save |
| 900 | 900 | print '<div class="center">'; |
| 901 | - print '<input type="submit" value="' . $langs->trans("Submit") . '" id="submitsave" class="button">'; |
|
| 901 | + print '<input type="submit" value="'.$langs->trans("Submit").'" id="submitsave" class="button">'; |
|
| 902 | 902 | if (!empty($backtopage)) { |
| 903 | - print ' <input type="submit" value="' . $langs->trans("Cancel") . '" id="submitcancel" class="button button-cancel">'; |
|
| 903 | + print ' <input type="submit" value="'.$langs->trans("Cancel").'" id="submitcancel" class="button button-cancel">'; |
|
| 904 | 904 | } |
| 905 | 905 | print '</div>'; |
| 906 | 906 | |
@@ -299,10 +299,10 @@ discard block |
||
| 299 | 299 | if (getDolGlobalString('PAYMENT_SECURITY_TOKEN_UNIQUE')) { |
| 300 | 300 | if ($tmpsource && $REF) { |
| 301 | 301 | // Use the source in the hash to avoid duplicates if the references are identical |
| 302 | - $tokenisok = dol_verifyHash(getDolGlobalString('PAYMENT_SECURITY_TOKEN') . $tmpsource.$REF, $SECUREKEY, '2'); |
|
| 302 | + $tokenisok = dol_verifyHash(getDolGlobalString('PAYMENT_SECURITY_TOKEN').$tmpsource.$REF, $SECUREKEY, '2'); |
|
| 303 | 303 | // Do a second test for retro-compatibility (token may have been hashed with membersubscription in external module) |
| 304 | 304 | if ($tmpsource != $source) { |
| 305 | - $tokenisok = dol_verifyHash(getDolGlobalString('PAYMENT_SECURITY_TOKEN') . $source.$REF, $SECUREKEY, '2'); |
|
| 305 | + $tokenisok = dol_verifyHash(getDolGlobalString('PAYMENT_SECURITY_TOKEN').$source.$REF, $SECUREKEY, '2'); |
|
| 306 | 306 | } |
| 307 | 307 | } else { |
| 308 | 308 | $tokenisok = dol_verifyHash($conf->global->PAYMENT_SECURITY_TOKEN, $SECUREKEY, '2'); |
@@ -311,7 +311,7 @@ discard block |
||
| 311 | 311 | $tokenisok = ($conf->global->PAYMENT_SECURITY_TOKEN == $SECUREKEY); |
| 312 | 312 | } |
| 313 | 313 | |
| 314 | - if (! $tokenisok) { |
|
| 314 | + if (!$tokenisok) { |
|
| 315 | 315 | if (!getDolGlobalString('PAYMENT_SECURITY_ACCEPT_ANY_TOKEN')) { |
| 316 | 316 | $valid = false; // PAYMENT_SECURITY_ACCEPT_ANY_TOKEN is for backward compatibility |
| 317 | 317 | } else { |
@@ -340,9 +340,9 @@ discard block |
||
| 340 | 340 | $paramcreditor = 'ONLINE_PAYMENT_CREDITOR'; |
| 341 | 341 | $paramcreditorlong = 'ONLINE_PAYMENT_CREDITOR_'.$suffix; |
| 342 | 342 | if (!empty($conf->global->$paramcreditorlong)) { |
| 343 | - $creditor = getDolGlobalString($paramcreditorlong); // use label long of the seller to show |
|
| 343 | + $creditor = getDolGlobalString($paramcreditorlong); // use label long of the seller to show |
|
| 344 | 344 | } elseif (!empty($conf->global->$paramcreditor)) { |
| 345 | - $creditor = getDolGlobalString($paramcreditor); // use label short of the seller to show |
|
| 345 | + $creditor = getDolGlobalString($paramcreditor); // use label short of the seller to show |
|
| 346 | 346 | } |
| 347 | 347 | |
| 348 | 348 | $mesg = ''; |
@@ -791,8 +791,8 @@ discard block |
||
| 791 | 791 | $remoteip = getUserRemoteIP(); |
| 792 | 792 | |
| 793 | 793 | $_SESSION["onlinetoken"] = $stripeToken; |
| 794 | - $_SESSION["FinalPaymentAmt"] = $amount; // amount really paid (coming from Stripe). Will be used for check in paymentok.php. |
|
| 795 | - $_SESSION["currencyCodeType"] = $currency; // currency really used for payment (coming from Stripe). Will be used for check in paymentok.php. |
|
| 794 | + $_SESSION["FinalPaymentAmt"] = $amount; // amount really paid (coming from Stripe). Will be used for check in paymentok.php. |
|
| 795 | + $_SESSION["currencyCodeType"] = $currency; // currency really used for payment (coming from Stripe). Will be used for check in paymentok.php. |
|
| 796 | 796 | $_SESSION["paymentType"] = ''; |
| 797 | 797 | $_SESSION['ipaddress'] = ($remoteip ? $remoteip : 'unknown'); // Payer ip |
| 798 | 798 | $_SESSION['payerID'] = is_object($customer) ? $customer->id : ''; |
@@ -838,7 +838,7 @@ discard block |
||
| 838 | 838 | |
| 839 | 839 | $head = ''; |
| 840 | 840 | if (getDolGlobalString('ONLINE_PAYMENT_CSS_URL')) { |
| 841 | - $head = '<link rel="stylesheet" type="text/css" href="' . getDolGlobalString('ONLINE_PAYMENT_CSS_URL').'?lang='.(!empty($getpostlang) ? $getpostlang : $langs->defaultlang).'">'."\n"; |
|
| 841 | + $head = '<link rel="stylesheet" type="text/css" href="'.getDolGlobalString('ONLINE_PAYMENT_CSS_URL').'?lang='.(!empty($getpostlang) ? $getpostlang : $langs->defaultlang).'">'."\n"; |
|
| 842 | 842 | } |
| 843 | 843 | |
| 844 | 844 | $conf->dol_hide_topmenu = 1; |
@@ -962,7 +962,7 @@ discard block |
||
| 962 | 962 | if (preg_match('/^\((.*)\)$/', $conf->global->PAYMENT_NEWFORM_TEXT, $reg)) { |
| 963 | 963 | $text .= $langs->trans($reg[1])."<br>\n"; |
| 964 | 964 | } else { |
| 965 | - $text .= getDolGlobalString('PAYMENT_NEWFORM_TEXT') . "<br>\n"; |
|
| 965 | + $text .= getDolGlobalString('PAYMENT_NEWFORM_TEXT')."<br>\n"; |
|
| 966 | 966 | } |
| 967 | 967 | $text = '<tr><td align="center"><br>'.$text.'<br></td></tr>'."\n"; |
| 968 | 968 | } |
@@ -1013,7 +1013,7 @@ discard block |
||
| 1013 | 1013 | // Currency |
| 1014 | 1014 | print ' <b>'.$langs->trans("Currency".$currency).'</b>'; |
| 1015 | 1015 | } else { |
| 1016 | - print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 1016 | + print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 1017 | 1017 | print '<input type="hidden" name="amount" value="'.$amount.'">'; |
| 1018 | 1018 | print '<input type="hidden" name="newamount" value="'.$amount.'">'; |
| 1019 | 1019 | } |
@@ -1114,7 +1114,7 @@ discard block |
||
| 1114 | 1114 | // Currency |
| 1115 | 1115 | print ' <b>'.$langs->trans("Currency".$currency).'</b>'; |
| 1116 | 1116 | } else { |
| 1117 | - print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 1117 | + print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 1118 | 1118 | print '<input type="hidden" name="amount" value="'.$amount.'">'; |
| 1119 | 1119 | print '<input type="hidden" name="newamount" value="'.$amount.'">'; |
| 1120 | 1120 | } |
@@ -1245,12 +1245,12 @@ discard block |
||
| 1245 | 1245 | print '<input class="flat maxwidth75" type="text" name="newamount" value="'.price2num(GETPOST("newamount", "alpha"), 'MT').'">'; |
| 1246 | 1246 | print ' <b>'.$langs->trans("Currency".$currency).'</b>'; |
| 1247 | 1247 | } else { |
| 1248 | - print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 1248 | + print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 1249 | 1249 | print '<input type="hidden" name="amount" value="'.$amount.'">'; |
| 1250 | 1250 | print '<input type="hidden" name="newamount" value="'.$amount.'">'; |
| 1251 | 1251 | } |
| 1252 | 1252 | } else { |
| 1253 | - print '<b class="amount">'.price($object->total_ttc, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 1253 | + print '<b class="amount">'.price($object->total_ttc, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 1254 | 1254 | } |
| 1255 | 1255 | print '<input type="hidden" name="currency" value="'.$currency.'">'; |
| 1256 | 1256 | print '</td></tr>'."\n"; |
@@ -1445,7 +1445,7 @@ discard block |
||
| 1445 | 1445 | // Currency |
| 1446 | 1446 | print ' <b>'.$langs->trans("Currency".$currency).'</b>'; |
| 1447 | 1447 | } else { |
| 1448 | - print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 1448 | + print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 1449 | 1449 | print '<input type="hidden" name="amount" value="'.$amount.'">'; |
| 1450 | 1450 | print '<input type="hidden" name="newamount" value="'.$amount.'">'; |
| 1451 | 1451 | } |
@@ -1647,7 +1647,7 @@ discard block |
||
| 1647 | 1647 | print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Amount"); |
| 1648 | 1648 | // This place no longer allows amount edition |
| 1649 | 1649 | if (getDolGlobalString('MEMBER_EXT_URL_SUBSCRIPTION_INFO')) { |
| 1650 | - print ' - <a href="' . getDolGlobalString('MEMBER_EXT_URL_SUBSCRIPTION_INFO').'" rel="external" target="_blank" rel="noopener noreferrer">'.$langs->trans("SeeHere").'</a>'; |
|
| 1650 | + print ' - <a href="'.getDolGlobalString('MEMBER_EXT_URL_SUBSCRIPTION_INFO').'" rel="external" target="_blank" rel="noopener noreferrer">'.$langs->trans("SeeHere").'</a>'; |
|
| 1651 | 1651 | } |
| 1652 | 1652 | print '</td><td class="CTableRow2">'; |
| 1653 | 1653 | if (getDolGlobalString('MEMBER_MIN_AMOUNT') && $amount) { |
@@ -1663,9 +1663,9 @@ discard block |
||
| 1663 | 1663 | print '<input type="text" class="width75" name="newamount" value="'.price($amount, 1, $langs, 1, -1, -1).'">'; |
| 1664 | 1664 | } |
| 1665 | 1665 | } else { |
| 1666 | - print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 1666 | + print '<b class="amount">'.price($amount, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 1667 | 1667 | if ($minimumamount > $amount) { |
| 1668 | - print ' <span class="opacitymedium small">'. $langs->trans("AmountIsLowerToMinimumNotice", price($minimumamount, 1, $langs, 1, -1, -1, $currency)).'</span>'; |
|
| 1668 | + print ' <span class="opacitymedium small">'.$langs->trans("AmountIsLowerToMinimumNotice", price($minimumamount, 1, $langs, 1, -1, -1, $currency)).'</span>'; |
|
| 1669 | 1669 | } |
| 1670 | 1670 | print '<input type="hidden" name="newamount" value="'.$amount.'">'; |
| 1671 | 1671 | } |
@@ -1786,7 +1786,7 @@ discard block |
||
| 1786 | 1786 | print ' ('.$langs->trans("ToComplete"); |
| 1787 | 1787 | } |
| 1788 | 1788 | if (getDolGlobalString('DONATION_EXT_URL_SUBSCRIPTION_INFO')) { |
| 1789 | - print ' - <a href="' . getDolGlobalString('DONATION_EXT_URL_SUBSCRIPTION_INFO').'" rel="external" target="_blank" rel="noopener noreferrer">'.$langs->trans("SeeHere").'</a>'; |
|
| 1789 | + print ' - <a href="'.getDolGlobalString('DONATION_EXT_URL_SUBSCRIPTION_INFO').'" rel="external" target="_blank" rel="noopener noreferrer">'.$langs->trans("SeeHere").'</a>'; |
|
| 1790 | 1790 | } |
| 1791 | 1791 | if (!getDolGlobalString('DONATION_NEWFORM_AMOUNT')) { |
| 1792 | 1792 | print ')'; |
@@ -1824,7 +1824,7 @@ discard block |
||
| 1824 | 1824 | $valtoshow = max(getDolGlobalString('DONATION_MIN_AMOUNT'), $valtoshow); |
| 1825 | 1825 | $amount = $valtoshow; |
| 1826 | 1826 | } |
| 1827 | - print '<b class="amount">'.price($valtoshow, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 1827 | + print '<b class="amount">'.price($valtoshow, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 1828 | 1828 | print '<input type="hidden" name="amount" value="'.$valtoshow.'">'; |
| 1829 | 1829 | print '<input type="hidden" name="newamount" value="'.$valtoshow.'">'; |
| 1830 | 1830 | } |
@@ -1900,7 +1900,7 @@ discard block |
||
| 1900 | 1900 | print '</b>'; |
| 1901 | 1901 | print '</td></tr>'."\n"; |
| 1902 | 1902 | |
| 1903 | - if (! is_object($attendee->project)) { |
|
| 1903 | + if (!is_object($attendee->project)) { |
|
| 1904 | 1904 | $text = 'ErrorProjectNotFound'; |
| 1905 | 1905 | } else { |
| 1906 | 1906 | $text = $langs->trans("PaymentEvent").' - '.$attendee->project->title; |
@@ -1917,7 +1917,7 @@ discard block |
||
| 1917 | 1917 | print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Amount"); |
| 1918 | 1918 | print '</td><td class="CTableRow2">'; |
| 1919 | 1919 | $valtoshow = $amount; |
| 1920 | - print '<b class="amount">'.price($valtoshow, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 1920 | + print '<b class="amount">'.price($valtoshow, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 1921 | 1921 | print '<input type="hidden" name="amount" value="'.$valtoshow.'">'; |
| 1922 | 1922 | print '<input type="hidden" name="newamount" value="'.$valtoshow.'">'; |
| 1923 | 1923 | print '<input type="hidden" name="currency" value="'.$currency.'">'; |
@@ -2001,7 +2001,7 @@ discard block |
||
| 2001 | 2001 | print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Amount"); |
| 2002 | 2002 | print '</td><td class="CTableRow2">'; |
| 2003 | 2003 | $valtoshow = $amount; |
| 2004 | - print '<b class="amount">'.price($valtoshow, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 2004 | + print '<b class="amount">'.price($valtoshow, 1, $langs, 1, -1, -1, $currency).'</b>'; // Price with currency |
|
| 2005 | 2005 | print '<input type="hidden" name="amount" value="'.$valtoshow.'">'; |
| 2006 | 2006 | print '<input type="hidden" name="newamount" value="'.$valtoshow.'">'; |
| 2007 | 2007 | print '<input type="hidden" name="currency" value="'.$currency.'">'; |
@@ -2238,7 +2238,7 @@ discard block |
||
| 2238 | 2238 | |
| 2239 | 2239 | //print '<br>'; |
| 2240 | 2240 | |
| 2241 | - print '<!-- Show Stripe form payment-form STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION = ' . getDolGlobalString('STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION').' STRIPE_USE_NEW_CHECKOUT = ' . getDolGlobalString('STRIPE_USE_NEW_CHECKOUT').' -->'."\n"; |
|
| 2241 | + print '<!-- Show Stripe form payment-form STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION = '.getDolGlobalString('STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION').' STRIPE_USE_NEW_CHECKOUT = '.getDolGlobalString('STRIPE_USE_NEW_CHECKOUT').' -->'."\n"; |
|
| 2242 | 2242 | print '<form action="'.$_SERVER['REQUEST_URI'].'" method="POST" id="payment-form">'."\n"; |
| 2243 | 2243 | |
| 2244 | 2244 | print '<input type="hidden" name="token" value="'.newToken().'">'."\n"; |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | $form = new Form($db); |
| 217 | 217 | $head = ''; |
| 218 | 218 | if (getDolGlobalString('MAIN_SIGN_CSS_URL')) { |
| 219 | - $head = '<link rel="stylesheet" type="text/css" href="' . getDolGlobalString('MAIN_SIGN_CSS_URL').'?lang='.$langs->defaultlang.'">'."\n"; |
|
| 219 | + $head = '<link rel="stylesheet" type="text/css" href="'.getDolGlobalString('MAIN_SIGN_CSS_URL').'?lang='.$langs->defaultlang.'">'."\n"; |
|
| 220 | 220 | } |
| 221 | 221 | |
| 222 | 222 | $conf->dol_hide_topmenu = 1; |
@@ -291,7 +291,7 @@ discard block |
||
| 291 | 291 | } |
| 292 | 292 | if ($source == 'proposal' && getDolGlobalString('PROPOSAL_IMAGE_PUBLIC_SIGN')) { |
| 293 | 293 | print '<div class="backimagepublicproposalsign">'; |
| 294 | - print '<img id="idPROPOSAL_IMAGE_PUBLIC_INTERFACE" src="' . getDolGlobalString('PROPOSAL_IMAGE_PUBLIC_SIGN').'">'; |
|
| 294 | + print '<img id="idPROPOSAL_IMAGE_PUBLIC_INTERFACE" src="'.getDolGlobalString('PROPOSAL_IMAGE_PUBLIC_SIGN').'">'; |
|
| 295 | 295 | print '</div>'; |
| 296 | 296 | } |
| 297 | 297 | |
@@ -302,7 +302,7 @@ discard block |
||
| 302 | 302 | if (preg_match('/^\((.*)\)$/', $conf->global->ONLINE_SIGN_NEWFORM_TEXT, $reg)) { |
| 303 | 303 | $text .= $langs->trans($reg[1])."<br>\n"; |
| 304 | 304 | } else { |
| 305 | - $text .= getDolGlobalString('ONLINE_SIGN_NEWFORM_TEXT') . "<br>\n"; |
|
| 305 | + $text .= getDolGlobalString('ONLINE_SIGN_NEWFORM_TEXT')."<br>\n"; |
|
| 306 | 306 | } |
| 307 | 307 | $text = '<tr><td align="center"><br>'.$text.'<br></td></tr>'."\n"; |
| 308 | 308 | } |
@@ -392,7 +392,7 @@ discard block |
||
| 392 | 392 | if (empty($last_main_doc_file) || !dol_is_file(DOL_DATA_ROOT.'/'.$object->last_main_doc)) { |
| 393 | 393 | // It seems document has never been generated, or was generated and then deleted. |
| 394 | 394 | // So we try to regenerate it with its default template. |
| 395 | - $defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used. |
|
| 395 | + $defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used. |
|
| 396 | 396 | $object->generateDocument($defaulttemplate, $langs); |
| 397 | 397 | } |
| 398 | 398 | |
@@ -463,7 +463,7 @@ discard block |
||
| 463 | 463 | if (empty($last_main_doc_file) || !dol_is_file(DOL_DATA_ROOT.'/'.$object->last_main_doc)) { |
| 464 | 464 | // It seems document has never been generated, or was generated and then deleted. |
| 465 | 465 | // So we try to regenerate it with its default template. |
| 466 | - $defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used. |
|
| 466 | + $defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used. |
|
| 467 | 467 | $object->generateDocument($defaulttemplate, $langs); |
| 468 | 468 | } |
| 469 | 469 | |
@@ -514,7 +514,7 @@ discard block |
||
| 514 | 514 | if (empty($last_main_doc_file) || !dol_is_file(DOL_DATA_ROOT.'/'.$object->last_main_doc)) { |
| 515 | 515 | // It seems document has never been generated, or was generated and then deleted. |
| 516 | 516 | // So we try to regenerate it with its default template. |
| 517 | - $defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used. |
|
| 517 | + $defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used. |
|
| 518 | 518 | $object->generateDocument($defaulttemplate, $langs); |
| 519 | 519 | } |
| 520 | 520 | |
@@ -538,24 +538,24 @@ discard block |
||
| 538 | 538 | $result = $object->fetch_thirdparty(); |
| 539 | 539 | |
| 540 | 540 | // Proposer |
| 541 | - print '<tr class="CTableRow2"><td class="CTableRow2">' . $langs->trans("Proposer"); |
|
| 541 | + print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Proposer"); |
|
| 542 | 542 | print '</td><td class="CTableRow2">'; |
| 543 | 543 | print img_picto('', 'company', 'class="pictofixedwidth"'); |
| 544 | - print '<b>' . $creditor . '</b>'; |
|
| 545 | - print '<input type="hidden" name="creditor" value="' . $creditor . '">'; |
|
| 546 | - print '</td></tr>' . "\n"; |
|
| 544 | + print '<b>'.$creditor.'</b>'; |
|
| 545 | + print '<input type="hidden" name="creditor" value="'.$creditor.'">'; |
|
| 546 | + print '</td></tr>'."\n"; |
|
| 547 | 547 | |
| 548 | 548 | // Target |
| 549 | - print '<tr class="CTableRow2"><td class="CTableRow2">' . $langs->trans("ThirdParty"); |
|
| 549 | + print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("ThirdParty"); |
|
| 550 | 550 | print '</td><td class="CTableRow2">'; |
| 551 | 551 | print img_picto('', 'company', 'class="pictofixedwidth"'); |
| 552 | - print '<b>' . $object->thirdparty->name . '</b>'; |
|
| 553 | - print '</td></tr>' . "\n"; |
|
| 552 | + print '<b>'.$object->thirdparty->name.'</b>'; |
|
| 553 | + print '</td></tr>'."\n"; |
|
| 554 | 554 | |
| 555 | 555 | // Object |
| 556 | - $text = '<b>' . $langs->trans("Signature" . dol_ucfirst($source) . "Ref", $object->ref) . '</b>'; |
|
| 557 | - print '<tr class="CTableRow2"><td class="CTableRow2">' . $langs->trans("Designation"); |
|
| 558 | - print '</td><td class="CTableRow2">' . $text; |
|
| 556 | + $text = '<b>'.$langs->trans("Signature".dol_ucfirst($source)."Ref", $object->ref).'</b>'; |
|
| 557 | + print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Designation"); |
|
| 558 | + print '</td><td class="CTableRow2">'.$text; |
|
| 559 | 559 | |
| 560 | 560 | $last_main_doc_file = $object->last_main_doc; |
| 561 | 561 | $diroutput = $conf->societe->multidir_output[$object->thirdparty->entity].'/' |
@@ -620,7 +620,7 @@ discard block |
||
| 620 | 620 | if (empty($last_main_doc_file) || !dol_is_file(DOL_DATA_ROOT.'/'.$object->last_main_doc)) { |
| 621 | 621 | // It seems document has never been generated, or was generated and then deleted. |
| 622 | 622 | // So we try to regenerate it with its default template. |
| 623 | - $defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used. |
|
| 623 | + $defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used. |
|
| 624 | 624 | $object->generateDocument($defaulttemplate, $langs); |
| 625 | 625 | } |
| 626 | 626 | |