@@ -39,21 +39,21 @@ |
||
| 39 | 39 | |
| 40 | 40 | |
| 41 | 41 | // Get parameters |
| 42 | -$action = GETPOST('action', 'aZ09'); |
|
| 43 | -$confirm = GETPOST('confirm'); |
|
| 44 | -$id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int')); |
|
| 45 | -$ref = GETPOST('ref', 'alpha'); |
|
| 42 | +$action = GETPOST('action', 'aZ09'); |
|
| 43 | +$confirm = GETPOST('confirm'); |
|
| 44 | +$id = (GETPOST('socid', 'int') ? GETPOST('socid', 'int') : GETPOST('id', 'int')); |
|
| 45 | +$ref = GETPOST('ref', 'alpha'); |
|
| 46 | 46 | |
| 47 | -$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; |
|
| 47 | +$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; |
|
| 48 | 48 | $sortfield = GETPOST('sortfield', 'aZ09comma'); |
| 49 | 49 | $sortorder = GETPOST('sortorder', 'aZ09comma'); |
| 50 | -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); |
|
| 50 | +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); |
|
| 51 | 51 | |
| 52 | 52 | if (empty($page) || $page == -1) { |
| 53 | 53 | $page = 0; |
| 54 | 54 | } // If $page is not defined, or '' or -1 |
| 55 | 55 | |
| 56 | -$offset = $limit * $page; |
|
| 56 | +$offset = $limit * $page; |
|
| 57 | 57 | $pageprev = $page - 1; |
| 58 | 58 | $pagenext = $page + 1; |
| 59 | 59 | |
@@ -95,7 +95,7 @@ |
||
| 95 | 95 | */ |
| 96 | 96 | |
| 97 | 97 | $parameters = array('id'=>$id); |
| 98 | -$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks |
|
| 98 | +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks |
|
| 99 | 99 | if ($reshook < 0) { |
| 100 | 100 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
| 101 | 101 | } |
@@ -98,8 +98,8 @@ discard block |
||
| 98 | 98 | $month_current = dol_print_date(dol_now(), '%m'); |
| 99 | 99 | $year_start = $year; |
| 100 | 100 | } |
| 101 | -$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear"), 'tzserver'); // We use timezone of server so report is same from everywhere |
|
| 102 | -$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear"), 'tzserver'); // We use timezone of server so report is same from everywhere |
|
| 101 | +$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear"), 'tzserver'); // We use timezone of server so report is same from everywhere |
|
| 102 | +$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear"), 'tzserver'); // We use timezone of server so report is same from everywhere |
|
| 103 | 103 | // Quarter |
| 104 | 104 | if (empty($date_start) || empty($date_end)) { // We define date_start and date_end |
| 105 | 105 | $q = GETPOST("q", "int"); |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | $headerparams = array_merge($commonparams, $headerparams); |
| 209 | 209 | $tableparams = array_merge($commonparams, $tableparams); |
| 210 | 210 | |
| 211 | -$paramslink=""; |
|
| 211 | +$paramslink = ""; |
|
| 212 | 212 | foreach ($allparams as $key => $value) { |
| 213 | 213 | $paramslink .= '&'.$key.'='.$value; |
| 214 | 214 | } |
@@ -231,8 +231,8 @@ discard block |
||
| 231 | 231 | $modecompta = "RECETTES-DEPENSES"; |
| 232 | 232 | } |
| 233 | 233 | |
| 234 | -$exportlink=""; |
|
| 235 | -$namelink=""; |
|
| 234 | +$exportlink = ""; |
|
| 235 | +$namelink = ""; |
|
| 236 | 236 | |
| 237 | 237 | // Show report header |
| 238 | 238 | if ($modecompta == "CREANCES-DETTES") { |
@@ -53,8 +53,8 @@ discard block |
||
| 53 | 53 | $month_current = dol_print_date(dol_now(), '%m'); |
| 54 | 54 | $year_start = $year; |
| 55 | 55 | } |
| 56 | -$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear"), 'tzserver'); // We use timezone of server so report is same from everywhere |
|
| 57 | -$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear"), 'tzserver'); // We use timezone of server so report is same from everywhere |
|
| 56 | +$date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear"), 'tzserver'); // We use timezone of server so report is same from everywhere |
|
| 57 | +$date_end = dol_mktime(23, 59, 59, GETPOST("date_endmonth"), GETPOST("date_endday"), GETPOST("date_endyear"), 'tzserver'); // We use timezone of server so report is same from everywhere |
|
| 58 | 58 | |
| 59 | 59 | // Quarter |
| 60 | 60 | $q = ''; |
@@ -158,8 +158,8 @@ discard block |
||
| 158 | 158 | |
| 159 | 159 | llxHeader('', $langs->trans("TurnoverReport"), '', '', 0, 0, '', '', $morequerystring); |
| 160 | 160 | |
| 161 | -$exportlink=""; |
|
| 162 | -$namelink=""; |
|
| 161 | +$exportlink = ""; |
|
| 162 | +$namelink = ""; |
|
| 163 | 163 | //print load_fiche_titre($langs->trans("VAT"),""); |
| 164 | 164 | |
| 165 | 165 | //$fsearch.='<br>'; |
@@ -493,7 +493,7 @@ |
||
| 493 | 493 | |
| 494 | 494 | dol_syslog("imap_open connectstring=".$connectstringsource." login=".$object->login." password=".$object->password." timeoutconnect=".$timeoutconnect." timeoutread=".$timeoutread); |
| 495 | 495 | |
| 496 | - $result1 = imap_timeout(IMAP_OPENTIMEOUT, $timeoutconnect); // timeout seems ignored with ssl connect |
|
| 496 | + $result1 = imap_timeout(IMAP_OPENTIMEOUT, $timeoutconnect); // timeout seems ignored with ssl connect |
|
| 497 | 497 | $result2 = imap_timeout(IMAP_READTIMEOUT, $timeoutread); |
| 498 | 498 | $result3 = imap_timeout(IMAP_WRITETIMEOUT, 5); |
| 499 | 499 | $result4 = imap_timeout(IMAP_CLOSETIMEOUT, 5); |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | $this->rights[$r][0] = 130; |
| 203 | 203 | $this->rights[$r][1] = 'Modify thirdparty information payment'; |
| 204 | 204 | $this->rights[$r][3] = 0; |
| 205 | - $this->rights[$r][4] = 'thirdparty_paymentinformation_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on |
|
| 205 | + $this->rights[$r][4] = 'thirdparty_paymentinformation_advance'; // Visible if option MAIN_USE_ADVANCED_PERMS is on |
|
| 206 | 206 | $this->rights[$r][5] = 'write'; |
| 207 | 207 | |
| 208 | 208 | // 262 : Restrict access to sales representative |
@@ -704,7 +704,7 @@ discard block |
||
| 704 | 704 | } |
| 705 | 705 | // Add profids as criteria to search duplicates |
| 706 | 706 | $langs->load("companies"); |
| 707 | - $i=1; |
|
| 707 | + $i = 1; |
|
| 708 | 708 | while ($i <= 6) { |
| 709 | 709 | if ($i == 1) { |
| 710 | 710 | $this->import_updatekeys_array[$r]['s.siren'] = 'ProfId1'.(empty($mysoc->country_code) ? '' : $mysoc->country_code); |
@@ -177,7 +177,7 @@ |
||
| 177 | 177 | $facavoir->fetch($facid); |
| 178 | 178 | $invoicecredits[] = $facavoir->getNomUrl(1); |
| 179 | 179 | } |
| 180 | - print ' ('.$langs->transnoentities("InvoiceHasAvoir") . implode(',', $invoicecredits) . ')'; |
|
| 180 | + print ' ('.$langs->transnoentities("InvoiceHasAvoir").implode(',', $invoicecredits).')'; |
|
| 181 | 181 | } |
| 182 | 182 | /* |
| 183 | 183 | if ($facidnext > 0) { |
@@ -29,9 +29,9 @@ |
||
| 29 | 29 | |
| 30 | 30 | // Load Dolibarr environment |
| 31 | 31 | require '../../main.inc.php'; |
| 32 | -require_once DOL_DOCUMENT_ROOT .'/product/class/product.class.php'; |
|
| 33 | -require_once DOL_DOCUMENT_ROOT .'/societe/class/societe.class.php'; |
|
| 34 | -require_once DOL_DOCUMENT_ROOT .'/fourn/class/fournisseur.class.php'; |
|
| 32 | +require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; |
|
| 33 | +require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; |
|
| 34 | +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php'; |
|
| 35 | 35 | |
| 36 | 36 | |
| 37 | 37 | // Load translation files required by the page |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | $maxfilesizearray = getMaxFileSizeArray(); |
| 188 | 188 | $maxmin = $maxfilesizearray['maxmin']; |
| 189 | 189 | if ($maxmin > 0) { |
| 190 | - $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 190 | + $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 191 | 191 | } |
| 192 | 192 | $texte .= ' <input type="file" name="uploadfile">'; |
| 193 | 193 | $texte .= '<input type="hidden" value="MYMODULE_MYOBJECT_ADDON_PDF_ODT_PATH" name="keyforuploaddir">'; |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); |
| 283 | 283 | $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); |
| 284 | 284 | |
| 285 | - $newfiletmp = $objectref . '_' . $newfiletmp; |
|
| 285 | + $newfiletmp = $objectref.'_'.$newfiletmp; |
|
| 286 | 286 | //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; |
| 287 | 287 | |
| 288 | 288 | // Get extension (ods or odt) |
@@ -292,11 +292,11 @@ discard block |
||
| 292 | 292 | if ($format == '1') { |
| 293 | 293 | $format = '%Y%m%d%H%M%S'; |
| 294 | 294 | } |
| 295 | - $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; |
|
| 295 | + $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; |
|
| 296 | 296 | } else { |
| 297 | - $filename = $newfiletmp . '.' . $newfileformat; |
|
| 297 | + $filename = $newfiletmp.'.'.$newfileformat; |
|
| 298 | 298 | } |
| 299 | - $file = $dir . '/' . $filename; |
|
| 299 | + $file = $dir.'/'.$filename; |
|
| 300 | 300 | //print "newdir=".$dir; |
| 301 | 301 | //print "newfile=".$newfile; |
| 302 | 302 | //print "file=".$file; |
@@ -305,7 +305,7 @@ discard block |
||
| 305 | 305 | dol_mkdir($conf->mymodule->dir_temp); |
| 306 | 306 | if (!is_writable($conf->mymodule->dir_temp)) { |
| 307 | 307 | $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->mymodule->dir_temp); |
| 308 | - dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); |
|
| 308 | + dol_syslog('Error in write_file: '.$this->error, LOG_ERR); |
|
| 309 | 309 | return -1; |
| 310 | 310 | } |
| 311 | 311 | |