@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | $search_date_endday = GETPOST('search_date_endday', 'int'); |
81 | 81 | $search_date_endmonth = GETPOST('search_date_endmonth', 'int'); |
82 | 82 | $search_date_endyear = GETPOST('search_date_endyear', 'int'); |
83 | -$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
83 | +$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver |
|
84 | 84 | $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear); |
85 | 85 | $search_date_when_startday = GETPOST('search_date_when_startday', 'int'); |
86 | 86 | $search_date_when_startmonth = GETPOST('search_date_when_startmonth', 'int'); |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $search_date_when_endday = GETPOST('search_date_when_endday', 'int'); |
89 | 89 | $search_date_when_endmonth = GETPOST('search_date_when_endmonth', 'int'); |
90 | 90 | $search_date_when_endyear = GETPOST('search_date_when_endyear', 'int'); |
91 | -$search_date_when_start = dol_mktime(0, 0, 0, $search_date_when_startmonth, $search_date_when_startday, $search_date_when_startyear); // Use tzserver |
|
91 | +$search_date_when_start = dol_mktime(0, 0, 0, $search_date_when_startmonth, $search_date_when_startday, $search_date_when_startyear); // Use tzserver |
|
92 | 92 | $search_date_when_end = dol_mktime(23, 59, 59, $search_date_when_endmonth, $search_date_when_endday, $search_date_when_endyear); |
93 | 93 | $search_recurring = GETPOST('search_recurring', 'int'); |
94 | 94 | $search_frequency = GETPOST('search_frequency', 'alpha'); |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | $sql .= ' WHERE f.fk_soc = s.rowid'; |
289 | 289 | $sql .= ' AND f.entity IN ('.getEntity('invoice').')'; |
290 | 290 | if (empty($user->rights->societe->client->voir) && !$socid) { |
291 | - $sql .= ' AND s.rowid = sc.fk_soc AND sc.fk_user = '. (int) $user->id; |
|
291 | + $sql .= ' AND s.rowid = sc.fk_soc AND sc.fk_user = '.(int) $user->id; |
|
292 | 292 | } |
293 | 293 | if ($search_ref) { |
294 | 294 | $sql .= natural_search('f.titre', $search_ref); |
@@ -954,7 +954,7 @@ |
||
954 | 954 | } |
955 | 955 | $result .= $linkend; |
956 | 956 | global $action; |
957 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
957 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
958 | 958 | $parameters = array('id'=>$this->id, 'getnomurl' => &$result); |
959 | 959 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
960 | 960 | if ($reshook > 0) { |
@@ -987,7 +987,7 @@ |
||
987 | 987 | $result .= $linkend; |
988 | 988 | |
989 | 989 | global $action; |
990 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
990 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
991 | 991 | $parameters = array('id'=>$this->id, 'getnomurl' => &$result); |
992 | 992 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
993 | 993 | if ($reshook > 0) { |
@@ -870,7 +870,7 @@ |
||
870 | 870 | $result .= $linkstart.$this->ref.$linkend; |
871 | 871 | |
872 | 872 | global $action; |
873 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
873 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
874 | 874 | $parameters = array('id'=>$this->id, 'getnomurl' => &$result); |
875 | 875 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
876 | 876 | if ($reshook > 0) { |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | $this->note_private = $obj->note; |
131 | 131 | $this->type_code = $obj->payment_code; |
132 | 132 | $this->type_label = $obj->payment_type; |
133 | - $this->fk_paiement = $obj->fk_paiement; |
|
133 | + $this->fk_paiement = $obj->fk_paiement; |
|
134 | 134 | $this->statut = $obj->statut; |
135 | 135 | |
136 | 136 | $error = 1; |
@@ -224,9 +224,9 @@ discard block |
||
224 | 224 | // If we want to closed paid invoices |
225 | 225 | if ($closepaidinvoices) { |
226 | 226 | $paiement = $invoice->getSommePaiement(); |
227 | - $creditnotes=$invoice->getSumCreditNotesUsed(); |
|
227 | + $creditnotes = $invoice->getSumCreditNotesUsed(); |
|
228 | 228 | //$creditnotes = 0; |
229 | - $deposits=$invoice->getSumDepositsUsed(); |
|
229 | + $deposits = $invoice->getSumDepositsUsed(); |
|
230 | 230 | //$deposits = 0; |
231 | 231 | $alreadypayed = price2num($paiement + $creditnotes + $deposits, 'MT'); |
232 | 232 | $remaintopay = price2num($invoice->total_ttc - $paiement - $creditnotes - $deposits, 'MT'); |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | $multicurrency_amount_ht = $multicurrency_amount_tva = $multicurrency_amount_ttc = array(); |
238 | 238 | |
239 | 239 | // Insert one discount by VAT rate category |
240 | - require_once DOL_DOCUMENT_ROOT . '/core/class/discount.class.php'; |
|
240 | + require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; |
|
241 | 241 | $discount = new DiscountAbsolute($this->db); |
242 | 242 | $discount->fetch('', 0, $invoice->id); |
243 | 243 | if (empty($discount->id)) { // If the invoice was not yet converted into a discount (this may have been done manually before we come here) |
@@ -640,7 +640,7 @@ discard block |
||
640 | 640 | $result .= $linkend; |
641 | 641 | |
642 | 642 | global $action; |
643 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
643 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
644 | 644 | $parameters = array('id'=>$this->id, 'getnomurl' => &$result); |
645 | 645 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
646 | 646 | if ($reshook > 0) { |
@@ -1642,7 +1642,7 @@ |
||
1642 | 1642 | $result .= $link.dol_trunc(($this->ref ? $this->ref : $this->label), $maxlength).$linkend; |
1643 | 1643 | } |
1644 | 1644 | global $action; |
1645 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
1645 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
1646 | 1646 | $parameters = array('id'=>$this->id, 'getnomurl' => &$result); |
1647 | 1647 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
1648 | 1648 | if ($reshook > 0) { |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | $action = GETPOST('action', 'aZ09'); |
36 | 36 | $value = GETPOST('value', 'alpha'); |
37 | -$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
37 | +$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php |
|
38 | 38 | |
39 | 39 | if (!$user->admin) { |
40 | 40 | accessforbidden(); |
@@ -778,7 +778,7 @@ discard block |
||
778 | 778 | '2'=>$langs->trans("Yes").' ('.$langs->trans("NumberOfKeyToSearch", 2).')', |
779 | 779 | '3'=>$langs->trans("Yes").' ('.$langs->trans("NumberOfKeyToSearch", 3).')', |
780 | 780 | ); |
781 | - print $form->selectarray("activate_COMPANY_USE_SEARCH_TO_SELECT", $arrval, (property_exists($conf->global, 'COMPANY_USE_SEARCH_TO_SELECT')?$conf->global->COMPANY_USE_SEARCH_TO_SELECT:''), 0, 0, 0, '', 0, 0, 0, '', 'minwidth75imp'); |
|
781 | + print $form->selectarray("activate_COMPANY_USE_SEARCH_TO_SELECT", $arrval, (property_exists($conf->global, 'COMPANY_USE_SEARCH_TO_SELECT') ? $conf->global->COMPANY_USE_SEARCH_TO_SELECT : ''), 0, 0, 0, '', 0, 0, 0, '', 'minwidth75imp'); |
|
782 | 782 | print '</td><td class="right">'; |
783 | 783 | print '<input type="submit" class="button small reposition" name="COMPANY_USE_SEARCH_TO_SELECT" value="'.$langs->trans("Modify").'">'; |
784 | 784 | print "</td>"; |
@@ -799,7 +799,7 @@ discard block |
||
799 | 799 | '2'=>$langs->trans("Yes").' ('.$langs->trans("NumberOfKeyToSearch", 2).')', |
800 | 800 | '3'=>$langs->trans("Yes").' ('.$langs->trans("NumberOfKeyToSearch", 3).')', |
801 | 801 | ); |
802 | - print $form->selectarray("activate_CONTACT_USE_SEARCH_TO_SELECT", $arrval, (property_exists($conf->global, 'CONTACT_USE_SEARCH_TO_SELECT')?$conf->global->CONTACT_USE_SEARCH_TO_SELECT:''), 0, 0, 0, '', 0, 0, 0, '', 'minwidth75imp'); |
|
802 | + print $form->selectarray("activate_CONTACT_USE_SEARCH_TO_SELECT", $arrval, (property_exists($conf->global, 'CONTACT_USE_SEARCH_TO_SELECT') ? $conf->global->CONTACT_USE_SEARCH_TO_SELECT : ''), 0, 0, 0, '', 0, 0, 0, '', 'minwidth75imp'); |
|
803 | 803 | print '</td><td class="right">'; |
804 | 804 | print '<input type="submit" class="button small eposition" name="CONTACT_USE_SEARCH_TO_SELECT" value="'.$langs->trans("Modify").'">'; |
805 | 805 | print "</td>"; |
@@ -902,7 +902,7 @@ discard block |
||
902 | 902 | print '<tr class="oddeven">'; |
903 | 903 | print '<td>'.$langs->trans("DefaultCustomerType").'</td>'; |
904 | 904 | print '<td>'; |
905 | - print $formcompany->selectProspectCustomerType((property_exists($conf->global, 'THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')?$conf->global->THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT:''), 'defaultcustomertype', 'defaultcustomertype', 'admin'); |
|
905 | + print $formcompany->selectProspectCustomerType((property_exists($conf->global, 'THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT') ? $conf->global->THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT : ''), 'defaultcustomertype', 'defaultcustomertype', 'admin'); |
|
906 | 906 | print '</td>'; |
907 | 907 | print '<td class="center">'; |
908 | 908 | print '<input type="submit" class="button small reposition" name="THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT" value="'.$langs->trans("Modify").'">'; |
@@ -758,8 +758,8 @@ discard block |
||
758 | 758 | // Rename directory if dir was a temporary ref |
759 | 759 | if (preg_match('/^[\(]?PROV/i', $this->ref)) { |
760 | 760 | // Now we rename also files into index |
761 | - $sql = 'UPDATE ' . MAIN_DB_PREFIX . "ecm_files set filename = CONCAT('" . $this->db->escape($this->newref) . "', SUBSTR(filename, " . (strlen($this->ref) + 1) . ")), filepath = 'holiday/" . $this->db->escape($this->newref) . "'"; |
|
762 | - $sql .= " WHERE filename LIKE '" . $this->db->escape($this->ref) . "%' AND filepath = 'holiday/" . $this->db->escape($this->ref) . "' and entity = " . ((int) $conf->entity); |
|
761 | + $sql = 'UPDATE '.MAIN_DB_PREFIX."ecm_files set filename = CONCAT('".$this->db->escape($this->newref)."', SUBSTR(filename, ".(strlen($this->ref) + 1).")), filepath = 'holiday/".$this->db->escape($this->newref)."'"; |
|
762 | + $sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'holiday/".$this->db->escape($this->ref)."' and entity = ".((int) $conf->entity); |
|
763 | 763 | $resql = $this->db->query($sql); |
764 | 764 | if (!$resql) { |
765 | 765 | $error++; |
@@ -769,19 +769,19 @@ discard block |
||
769 | 769 | // We rename directory ($this->ref = old ref, $num = new ref) in order not to lose the attachments |
770 | 770 | $oldref = dol_sanitizeFileName($this->ref); |
771 | 771 | $newref = dol_sanitizeFileName($num); |
772 | - $dirsource = $conf->holiday->multidir_output[$this->entity] . '/' . $oldref; |
|
773 | - $dirdest = $conf->holiday->multidir_output[$this->entity] . '/' . $newref; |
|
772 | + $dirsource = $conf->holiday->multidir_output[$this->entity].'/'.$oldref; |
|
773 | + $dirdest = $conf->holiday->multidir_output[$this->entity].'/'.$newref; |
|
774 | 774 | if (!$error && file_exists($dirsource)) { |
775 | - dol_syslog(get_class($this) . "::validate rename dir " . $dirsource . " into " . $dirdest); |
|
775 | + dol_syslog(get_class($this)."::validate rename dir ".$dirsource." into ".$dirdest); |
|
776 | 776 | if (@rename($dirsource, $dirdest)) { |
777 | 777 | dol_syslog("Rename ok"); |
778 | 778 | // Rename docs starting with $oldref with $newref |
779 | - $listoffiles = dol_dir_list($dirdest, 'files', 1, '^' . preg_quote($oldref, '/')); |
|
779 | + $listoffiles = dol_dir_list($dirdest, 'files', 1, '^'.preg_quote($oldref, '/')); |
|
780 | 780 | foreach ($listoffiles as $fileentry) { |
781 | 781 | $dirsource = $fileentry['name']; |
782 | - $dirdest = preg_replace('/^' . preg_quote($oldref, '/') . '/', $newref, $dirsource); |
|
783 | - $dirsource = $fileentry['path'] . '/' . $dirsource; |
|
784 | - $dirdest = $fileentry['path'] . '/' . $dirdest; |
|
782 | + $dirdest = preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource); |
|
783 | + $dirsource = $fileentry['path'].'/'.$dirsource; |
|
784 | + $dirdest = $fileentry['path'].'/'.$dirdest; |
|
785 | 785 | @rename($dirsource, $dirdest); |
786 | 786 | } |
787 | 787 | } |
@@ -1306,7 +1306,7 @@ discard block |
||
1306 | 1306 | } |
1307 | 1307 | $result .= $linkend; |
1308 | 1308 | global $action; |
1309 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
1309 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
1310 | 1310 | $parameters = array('id'=>$this->id, 'getnomurl' => &$result); |
1311 | 1311 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
1312 | 1312 | if ($reshook > 0) { |
@@ -224,7 +224,7 @@ |
||
224 | 224 | $enddatef = dol_print_date($enddate, "dayhourxcard", 'gmt'); |
225 | 225 | |
226 | 226 | if ($fulldayevent) { |
227 | - $prefix = ";VALUE=DATE"; |
|
227 | + $prefix = ";VALUE=DATE"; |
|
228 | 228 | // We add 1 second so we reach the +1 day needed for full day event (DTEND must be next day after event) |
229 | 229 | // This is mention in https://datatracker.ietf.org/doc/html/rfc5545: |
230 | 230 | // "The "DTEND" property for a "VEVENT" calendar component specifies the non-inclusive end of the event." |