@@ -579,7 +579,7 @@ |
||
| 579 | 579 | $maxfilesizearray = getMaxFileSizeArray(); |
| 580 | 580 | $maxmin = $maxfilesizearray['maxmin']; |
| 581 | 581 | if ($maxmin > 0) { |
| 582 | - print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 582 | + print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 583 | 583 | } |
| 584 | 584 | print '<input type="file" name="userfile" size="20" maxlength="80"> '; |
| 585 | 585 | $out = (!getDolGlobalString('MAIN_UPLOAD_DOC') ? ' disabled' : ''); |
@@ -576,7 +576,7 @@ discard block |
||
| 576 | 576 | print(empty($module->name) ? $name : $module->name); |
| 577 | 577 | print "</td><td>\n"; |
| 578 | 578 | if (method_exists($module, 'info')) { |
| 579 | - print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 579 | + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 580 | 580 | } else { |
| 581 | 581 | print $module->description; |
| 582 | 582 | } |
@@ -722,7 +722,7 @@ discard block |
||
| 722 | 722 | print(empty($module->name) ? $name : $module->name); |
| 723 | 723 | print "</td><td>\n"; |
| 724 | 724 | if (method_exists($module, 'info')) { |
| 725 | - print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 725 | + print $module->info($langs); // @phan-suppress-current-line PhanUndeclaredMethod |
|
| 726 | 726 | } else { |
| 727 | 727 | print $module->description; |
| 728 | 728 | } |
@@ -828,7 +828,7 @@ discard block |
||
| 828 | 828 | print '<td>'.$langs->trans("AllowToSelectProjectFromOtherCompany").'</td>'; |
| 829 | 829 | |
| 830 | 830 | print '<td class="right" width="60" colspan="2">'; |
| 831 | -print '<input type="text" id="projectToSelect" name="projectToSelect" value="' . getDolGlobalString('PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY').'"/> '; |
|
| 831 | +print '<input type="text" id="projectToSelect" name="projectToSelect" value="'.getDolGlobalString('PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY').'"/> '; |
|
| 832 | 832 | print $form->textwithpicto('', $langs->trans('AllowToLinkFromOtherCompany')); |
| 833 | 833 | print '<input type="submit" class="button small reposition" name="PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY" value="'.$langs->trans("Modify").'">'; |
| 834 | 834 | print '</td>'; |
@@ -837,7 +837,7 @@ discard block |
||
| 837 | 837 | $key = 'PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE'; |
| 838 | 838 | echo '<tr class="oddeven">', |
| 839 | 839 | '<td class="left">', |
| 840 | -$form->textwithpicto($langs->transnoentities($key), $langs->transnoentities($key . '_help')), |
|
| 840 | +$form->textwithpicto($langs->transnoentities($key), $langs->transnoentities($key.'_help')), |
|
| 841 | 841 | '</td>', |
| 842 | 842 | '<td class="right" colspan="2">', |
| 843 | 843 | ajax_constantonoff($key), |
@@ -848,7 +848,7 @@ discard block |
||
| 848 | 848 | print '<td>'.$langs->trans("TimesheetPreventAfterFollowingMonths").'</td>'; |
| 849 | 849 | |
| 850 | 850 | print '<td class="right" width="60" colspan="2">'; |
| 851 | -print '<input type="number" class="width50" id="timesheetFreezeDuration" name="timesheetFreezeDuration" min="0" step="1" value="' . getDolGlobalString('PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS').'"/> '; |
|
| 851 | +print '<input type="number" class="width50" id="timesheetFreezeDuration" name="timesheetFreezeDuration" min="0" step="1" value="'.getDolGlobalString('PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS').'"/> '; |
|
| 852 | 852 | print '<input type="submit" class="button small reposition" name="PROJECT_TIMESHEET_PREVENT_AFTER_MONTHS" value="'.$langs->trans("Modify").'">'; |
| 853 | 853 | print '</td>'; |
| 854 | 854 | print '</tr>'; |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | |
| 220 | 220 | $sql = "SELECT t.rowid"; |
| 221 | 221 | $sql .= " FROM ".MAIN_DB_PREFIX."projet as t"; |
| 222 | - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet_extrafields AS ef ON ef.fk_object = t.rowid"; // So we will be able to filter on extrafields |
|
| 222 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet_extrafields AS ef ON ef.fk_object = t.rowid"; // So we will be able to filter on extrafields |
|
| 223 | 223 | if ($category > 0) { |
| 224 | 224 | $sql .= ", ".MAIN_DB_PREFIX."categorie_project as c"; |
| 225 | 225 | } |
@@ -353,16 +353,16 @@ discard block |
||
| 353 | 353 | } |
| 354 | 354 | } |
| 355 | 355 | if ($filefound && !empty($classname)) { |
| 356 | - $result = dol_include_once($reldir . "core/modules/project/" . $modele . '.php'); |
|
| 356 | + $result = dol_include_once($reldir."core/modules/project/".$modele.'.php'); |
|
| 357 | 357 | if ($result !== false && class_exists($classname)) { |
| 358 | 358 | $modProject = new $classname(); |
| 359 | 359 | '@phan-var-force ModeleNumRefProjects $modProject'; |
| 360 | 360 | $defaultref = $modProject->getNextValue(null, $this->project); |
| 361 | 361 | } else { |
| 362 | - dol_syslog("Failed to include module file or invalid classname: " . $reldir . "core/modules/project/" . $modele . '.php', LOG_ERR); |
|
| 362 | + dol_syslog("Failed to include module file or invalid classname: ".$reldir."core/modules/project/".$modele.'.php', LOG_ERR); |
|
| 363 | 363 | } |
| 364 | 364 | } else { |
| 365 | - dol_syslog("Module file not found or classname is empty: " . $modele, LOG_ERR); |
|
| 365 | + dol_syslog("Module file not found or classname is empty: ".$modele, LOG_ERR); |
|
| 366 | 366 | } |
| 367 | 367 | |
| 368 | 368 | if (is_numeric($defaultref) && $defaultref <= 0) { |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | } |
| 371 | 371 | |
| 372 | 372 | if (empty($defaultref)) { |
| 373 | - $defaultref = 'PJ' . dol_print_date(dol_now(), 'dayrfc'); |
|
| 373 | + $defaultref = 'PJ'.dol_print_date(dol_now(), 'dayrfc'); |
|
| 374 | 374 | } |
| 375 | 375 | |
| 376 | 376 | $this->project->ref = $defaultref; |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | $formbarcode = null; |
| 101 | 101 | |
| 102 | 102 | // Get parameters |
| 103 | -$id = GETPOSTINT('id'); |
|
| 103 | +$id = GETPOSTINT('id'); |
|
| 104 | 104 | if (getDolGlobalString('MAIN_SECURITY_ALLOW_UNSECURED_REF_LABELS')) { |
| 105 | 105 | $ref = (GETPOSTISSET('ref') ? GETPOST('ref', 'nohtml') : null); |
| 106 | 106 | } else { |
@@ -512,11 +512,11 @@ discard block |
||
| 512 | 512 | if (!$error) { |
| 513 | 513 | $units = GETPOSTINT('units'); |
| 514 | 514 | |
| 515 | - $object->entity = $conf->entity; |
|
| 516 | - $object->ref = $ref; |
|
| 517 | - $object->label = GETPOST('label', $label_security_check); |
|
| 518 | - $object->price_base_type = GETPOST('price_base_type', 'aZ09'); |
|
| 519 | - $object->mandatory_period = !empty(GETPOST("mandatoryperiod", 'alpha')) ? 1 : 0; |
|
| 515 | + $object->entity = $conf->entity; |
|
| 516 | + $object->ref = $ref; |
|
| 517 | + $object->label = GETPOST('label', $label_security_check); |
|
| 518 | + $object->price_base_type = GETPOST('price_base_type', 'aZ09'); |
|
| 519 | + $object->mandatory_period = !empty(GETPOST("mandatoryperiod", 'alpha')) ? 1 : 0; |
|
| 520 | 520 | if ($object->price_base_type == 'TTC') { |
| 521 | 521 | $object->price_ttc = GETPOSTFLOAT('price'); |
| 522 | 522 | } else { |
@@ -604,7 +604,7 @@ discard block |
||
| 604 | 604 | $object->duration_value = $duration_value; |
| 605 | 605 | $object->duration_unit = $duration_unit; |
| 606 | 606 | $object->fk_default_warehouse = GETPOSTINT('fk_default_warehouse'); |
| 607 | - $object->fk_default_workstation = GETPOSTINT('fk_default_workstation'); |
|
| 607 | + $object->fk_default_workstation = GETPOSTINT('fk_default_workstation'); |
|
| 608 | 608 | $object->seuil_stock_alerte = GETPOST('seuil_stock_alerte') ? GETPOST('seuil_stock_alerte') : 0; |
| 609 | 609 | $object->desiredstock = GETPOST('desiredstock') ? GETPOST('desiredstock') : 0; |
| 610 | 610 | $object->canvas = GETPOST('canvas'); |
@@ -753,7 +753,7 @@ discard block |
||
| 753 | 753 | $object->oldcopy = dol_clone($object, 1); |
| 754 | 754 | |
| 755 | 755 | if (!getDolGlobalString('PRODUCT_GENERATE_REF_AFTER_FORM')) { |
| 756 | - $object->ref = $ref; |
|
| 756 | + $object->ref = $ref; |
|
| 757 | 757 | } |
| 758 | 758 | $object->label = GETPOST('label', $label_security_check); |
| 759 | 759 | |
@@ -775,7 +775,7 @@ discard block |
||
| 775 | 775 | $object->status_batch = GETPOST('status_batch', 'aZ09'); |
| 776 | 776 | $object->sell_or_eat_by_mandatory = GETPOSTINT('sell_or_eat_by_mandatory'); |
| 777 | 777 | $object->batch_mask = GETPOST('batch_mask', 'alpha'); |
| 778 | - $object->fk_default_warehouse = GETPOSTINT('fk_default_warehouse'); |
|
| 778 | + $object->fk_default_warehouse = GETPOSTINT('fk_default_warehouse'); |
|
| 779 | 779 | $object->fk_default_workstation = GETPOSTINT('fk_default_workstation'); |
| 780 | 780 | // removed from update view so GETPOST always empty |
| 781 | 781 | /* |
@@ -875,7 +875,7 @@ discard block |
||
| 875 | 875 | $object->accountancy_code_buy_export = $accountancy_code_buy_export; |
| 876 | 876 | } |
| 877 | 877 | if ($object->isService()) { |
| 878 | - $object->mandatory_period = (!empty($checkmandatory)) ? 1 : 0 ; |
|
| 878 | + $object->mandatory_period = (!empty($checkmandatory)) ? 1 : 0; |
|
| 879 | 879 | } |
| 880 | 880 | |
| 881 | 881 | |
@@ -1010,7 +1010,7 @@ discard block |
||
| 1010 | 1010 | $action = ""; |
| 1011 | 1011 | |
| 1012 | 1012 | $mesg = $langs->trans("ErrorProductAlreadyExists", $clone->ref); |
| 1013 | - $mesg .= ' <a href="' . $_SERVER["PHP_SELF"] . '?ref=' . $clone->ref . '">' . $langs->trans("ShowCardHere") . '</a>.'; |
|
| 1013 | + $mesg .= ' <a href="'.$_SERVER["PHP_SELF"].'?ref='.$clone->ref.'">'.$langs->trans("ShowCardHere").'</a>.'; |
|
| 1014 | 1014 | setEventMessages($mesg, null, 'errors'); |
| 1015 | 1015 | } else { |
| 1016 | 1016 | setEventMessages(empty($clone->error) ? '' : $langs->trans($clone->error), $clone->errors, 'errors'); |
@@ -1025,7 +1025,7 @@ discard block |
||
| 1025 | 1025 | } else { |
| 1026 | 1026 | $db->commit(); |
| 1027 | 1027 | $db->close(); |
| 1028 | - header("Location: " . $_SERVER["PHP_SELF"] . "?id=" . $id); |
|
| 1028 | + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); |
|
| 1029 | 1029 | exit; |
| 1030 | 1030 | } |
| 1031 | 1031 | } else { |
@@ -50,8 +50,8 @@ discard block |
||
| 50 | 50 | $confirm = GETPOST('confirm', 'alpha'); |
| 51 | 51 | $cancel = GETPOST('cancel', 'aZ09'); |
| 52 | 52 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search |
| 53 | -$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
| 54 | -$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used |
|
| 53 | +$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
| 54 | +$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used |
|
| 55 | 55 | $qty = GETPOSTINT('qty'); |
| 56 | 56 | $fk_product = GETPOSTINT('fk_product'); |
| 57 | 57 | $fk_warehouse_source = GETPOSTINT('fk_warehouse_source'); |
@@ -422,7 +422,7 @@ discard block |
||
| 422 | 422 | $date_prevue_depart = $object->date_prevue_depart; |
| 423 | 423 | $date_prevue_depart_plus_delai = $date_prevue_depart; |
| 424 | 424 | if ($object->lead_time_for_warning > 0) { |
| 425 | - $date_prevue_depart_plus_delai = strtotime(date('Y-m-d', $date_prevue_depart) . ' + '.$object->lead_time_for_warning.' day'); |
|
| 425 | + $date_prevue_depart_plus_delai = strtotime(date('Y-m-d', $date_prevue_depart).' + '.$object->lead_time_for_warning.' day'); |
|
| 426 | 426 | } |
| 427 | 427 | if (!empty($date_prevue_depart) && $date_prevue_depart_plus_delai < strtotime(date('Y-m-d'))) { |
| 428 | 428 | print "$('.valuefield.fieldname_date_prevue_depart').append('"; |
@@ -497,28 +497,28 @@ discard block |
||
| 497 | 497 | |
| 498 | 498 | // Part to edit record |
| 499 | 499 | if (($id || $ref) && $action == 'edit') { |
| 500 | - print load_fiche_titre($langs->trans("StockTransfer"), '', 'object_' . $object->picto); |
|
| 500 | + print load_fiche_titre($langs->trans("StockTransfer"), '', 'object_'.$object->picto); |
|
| 501 | 501 | |
| 502 | - print '<form method="POST" action="' . $_SERVER["PHP_SELF"] . '">'; |
|
| 503 | - print '<input type="hidden" name="token" value="' . newToken() . '">'; |
|
| 502 | + print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">'; |
|
| 503 | + print '<input type="hidden" name="token" value="'.newToken().'">'; |
|
| 504 | 504 | print '<input type="hidden" name="action" value="update">'; |
| 505 | - print '<input type="hidden" name="id" value="' . $object->id . '">'; |
|
| 505 | + print '<input type="hidden" name="id" value="'.$object->id.'">'; |
|
| 506 | 506 | if ($backtopage) { |
| 507 | - print '<input type="hidden" name="backtopage" value="' . $backtopage . '">'; |
|
| 507 | + print '<input type="hidden" name="backtopage" value="'.$backtopage.'">'; |
|
| 508 | 508 | } |
| 509 | 509 | if ($backtopageforcancel) { |
| 510 | - print '<input type="hidden" name="backtopageforcancel" value="' . $backtopageforcancel . '">'; |
|
| 510 | + print '<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.'">'; |
|
| 511 | 511 | } |
| 512 | 512 | |
| 513 | 513 | print dol_get_fiche_head(); |
| 514 | 514 | |
| 515 | - print '<table class="border centpercent tableforfieldedit">' . "\n"; |
|
| 515 | + print '<table class="border centpercent tableforfieldedit">'."\n"; |
|
| 516 | 516 | |
| 517 | 517 | // Common attributes |
| 518 | - include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_edit.tpl.php'; |
|
| 518 | + include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_edit.tpl.php'; |
|
| 519 | 519 | |
| 520 | 520 | // Other attributes |
| 521 | - include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_edit.tpl.php'; |
|
| 521 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_edit.tpl.php'; |
|
| 522 | 522 | |
| 523 | 523 | print '</table>'; |
| 524 | 524 | |
@@ -554,28 +554,28 @@ discard block |
||
| 554 | 554 | $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); |
| 555 | 555 | } elseif ($action == 'destock') { // Destock confirmation |
| 556 | 556 | // Create an array for form |
| 557 | - $formquestion = array( 'text' => '', |
|
| 557 | + $formquestion = array('text' => '', |
|
| 558 | 558 | 0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label"), 'value' => $langs->trans('ConfirmDestock', $object->ref), 'size' => 40), |
| 559 | 559 | 1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25) |
| 560 | 560 | ); |
| 561 | 561 | $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DestockAllProduct'), '', 'confirm_destock', $formquestion, 'yes', 1); |
| 562 | 562 | } elseif ($action == 'destockcancel') { // Destock confirmation cancel |
| 563 | 563 | // Create an array for form |
| 564 | - $formquestion = array( 'text' => '', |
|
| 564 | + $formquestion = array('text' => '', |
|
| 565 | 565 | 0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label"), 'value' => $langs->trans('ConfirmDestockCancel', $object->ref), 'size' => 40), |
| 566 | 566 | 1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25) |
| 567 | 567 | ); |
| 568 | 568 | $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DestockAllProductCancel'), '', 'confirm_destockcancel', $formquestion, 'yes', 1); |
| 569 | 569 | } elseif ($action == 'addstock') { // Addstock confirmation |
| 570 | 570 | // Create an array for form |
| 571 | - $formquestion = array( 'text' => '', |
|
| 571 | + $formquestion = array('text' => '', |
|
| 572 | 572 | 0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label").' :', 'value' => $langs->trans('ConfirmAddStock', $object->ref), 'size' => 40), |
| 573 | 573 | 1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25) |
| 574 | 574 | ); |
| 575 | 575 | $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('AddStockAllProduct'), '', 'confirm_addstock', $formquestion, 'yes', 1); |
| 576 | 576 | } elseif ($action == 'addstockcancel') { // Addstock confirmation cancel |
| 577 | 577 | // Create an array for form |
| 578 | - $formquestion = array( 'text' => '', |
|
| 578 | + $formquestion = array('text' => '', |
|
| 579 | 579 | 0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label").' :', 'value' => $langs->trans('ConfirmAddStockCancel', $object->ref), 'size' => 40), |
| 580 | 580 | 1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25) |
| 581 | 581 | ); |
@@ -890,11 +890,11 @@ discard block |
||
| 890 | 890 | print '<input type="submit" class="button buttongen marginbottomonly" id="cancellinebutton" name="cancel" value="'.$langs->trans("Cancel").'"></td>'; |
| 891 | 891 | } else { |
| 892 | 892 | print '<td class="right">'; |
| 893 | - print '<a class="editfielda reposition" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=editline&lineid=' . $line->id . '#line_' . $line->id . '">'; |
|
| 894 | - print img_edit() . '</a>'; |
|
| 893 | + print '<a class="editfielda reposition" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=editline&lineid='.$line->id.'#line_'.$line->id.'">'; |
|
| 894 | + print img_edit().'</a>'; |
|
| 895 | 895 | print '</td>'; |
| 896 | 896 | print '<td class="right">'; |
| 897 | - print '<a href="' . $_SERVER["PHP_SELF"] . '?id=' . $id . '&action=deleteline&lineid=' . $line->id . '">' . img_delete($langs->trans("Remove")) . '</a>'; |
|
| 897 | + print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&action=deleteline&lineid='.$line->id.'">'.img_delete($langs->trans("Remove")).'</a>'; |
|
| 898 | 898 | print '</td>'; |
| 899 | 899 | } |
| 900 | 900 | |
@@ -998,7 +998,7 @@ discard block |
||
| 998 | 998 | print '<td></td>'; |
| 999 | 999 | |
| 1000 | 1000 | // Button to add line |
| 1001 | - print '<td class="right" colspan="2"><input type="submit" class="button" name="addline" value="' . dol_escape_htmltag($langs->trans('Add')) . '"></td>'; |
|
| 1001 | + print '<td class="right" colspan="2"><input type="submit" class="button" name="addline" value="'.dol_escape_htmltag($langs->trans('Add')).'"></td>'; |
|
| 1002 | 1002 | |
| 1003 | 1003 | // Grad and drop lines |
| 1004 | 1004 | print '<td></td>'; |
@@ -1102,9 +1102,9 @@ discard block |
||
| 1102 | 1102 | // Documents |
| 1103 | 1103 | if ($includedocgeneration) { |
| 1104 | 1104 | $objref = dol_sanitizeFileName($object->ref); |
| 1105 | - $relativepath = $objref . '/' . $objref . '.pdf'; |
|
| 1105 | + $relativepath = $objref.'/'.$objref.'.pdf'; |
|
| 1106 | 1106 | $filedir = $conf->stocktransfer->dir_output.'/'.$object->element.'/'.$objref; |
| 1107 | - $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id; |
|
| 1107 | + $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; |
|
| 1108 | 1108 | $genallowed = $permissiontoread; // If you can read, you can build the PDF to read content |
| 1109 | 1109 | $delallowed = $permissiontoadd; // If you can create/edit, you can remove a file on card |
| 1110 | 1110 | print $formfile->showdocuments('stocktransfer:StockTransfer', $object->element.'/'.$objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $langs->defaultlang); |
@@ -273,19 +273,19 @@ discard block |
||
| 273 | 273 | // Show message if accountancy hidden options are activated to help to resolve some problems |
| 274 | 274 | if (!$user->admin) { |
| 275 | 275 | if (getDolGlobalString('FACTURE_DEPOSITS_ARE_JUST_PAYMENTS')) { |
| 276 | - print '<div class="info">' . $langs->trans("ConstantIsOn", "FACTURE_DEPOSITS_ARE_JUST_PAYMENTS") . '</div>'; |
|
| 276 | + print '<div class="info">'.$langs->trans("ConstantIsOn", "FACTURE_DEPOSITS_ARE_JUST_PAYMENTS").'</div>'; |
|
| 277 | 277 | } |
| 278 | 278 | if (getDolGlobalString('FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS')) { |
| 279 | - print '<div class="info">' . $langs->trans("ConstantIsOn", "FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS") . '</div>'; |
|
| 279 | + print '<div class="info">'.$langs->trans("ConstantIsOn", "FACTURE_SUPPLIER_DEPOSITS_ARE_JUST_PAYMENTS").'</div>'; |
|
| 280 | 280 | } |
| 281 | 281 | if (getDolGlobalString('ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY')) { |
| 282 | - print '<div class="info">' . $langs->trans("ConstantIsOn", "ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY") . '</div>'; |
|
| 282 | + print '<div class="info">'.$langs->trans("ConstantIsOn", "ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY").'</div>'; |
|
| 283 | 283 | } |
| 284 | 284 | if (getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) { |
| 285 | - print '<div class="info">' . $langs->trans("ConstantIsOn", "MAIN_COMPANY_PERENTITY_SHARED") . '</div>'; |
|
| 285 | + print '<div class="info">'.$langs->trans("ConstantIsOn", "MAIN_COMPANY_PERENTITY_SHARED").'</div>'; |
|
| 286 | 286 | } |
| 287 | 287 | if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) { |
| 288 | - print '<div class="info">' . $langs->trans("ConstantIsOn", "MAIN_PRODUCT_PERENTITY_SHARED") . '</div>'; |
|
| 288 | + print '<div class="info">'.$langs->trans("ConstantIsOn", "MAIN_PRODUCT_PERENTITY_SHARED").'</div>'; |
|
| 289 | 289 | } |
| 290 | 290 | } |
| 291 | 291 | |
@@ -406,8 +406,8 @@ discard block |
||
| 406 | 406 | print $form->selectarray($key, $array, getDolGlobalInt('ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER', 0), 0, 0, 0, '', 0, 0, 0, '', 'onrightofpage width200'); |
| 407 | 407 | } elseif ($key == 'ACCOUNTING_LABEL_OPERATION_ON_TRANSFER') { |
| 408 | 408 | $array = array( |
| 409 | - 0=>$langs->trans("ThirdPartyName") . ' - ' . $langs->trans("NumPiece") . ' - ' . $langs->trans("LabelAccount"), |
|
| 410 | - 1=>$langs->trans("ThirdPartyName") . ' - ' . $langs->trans("NumPiece"), |
|
| 409 | + 0=>$langs->trans("ThirdPartyName").' - '.$langs->trans("NumPiece").' - '.$langs->trans("LabelAccount"), |
|
| 410 | + 1=>$langs->trans("ThirdPartyName").' - '.$langs->trans("NumPiece"), |
|
| 411 | 411 | 2=>$langs->trans("ThirdPartyName") |
| 412 | 412 | ); |
| 413 | 413 | print $form->selectarray($key, $array, getDolGlobalInt('ACCOUNTING_LABEL_OPERATION_ON_TRANSFER', 0), 0, 0, 0, '', 0, 0, 0, '', 'onrightofpage width200'); |
@@ -499,7 +499,7 @@ discard block |
||
| 499 | 499 | print '<div class="div-table-responsive-no-min">'; |
| 500 | 500 | print '<table class="noborder centpercent">'; |
| 501 | 501 | print '<tr class="liste_titre">'; |
| 502 | -print '<td colspan="2">' . $langs->trans('OptionsAdvanced') . '</td>'; |
|
| 502 | +print '<td colspan="2">'.$langs->trans('OptionsAdvanced').'</td>'; |
|
| 503 | 503 | print "</tr>\n"; |
| 504 | 504 | |
| 505 | 505 | print '<tr class="oddeven">'; |
@@ -520,7 +520,7 @@ discard block |
||
| 520 | 520 | // Number of letters for lettering (3 by default (AAA), min 2 (AA)) |
| 521 | 521 | print '<tr class="oddeven">'; |
| 522 | 522 | print '<td>'; |
| 523 | - print $form->textwithpicto($langs->trans("ACCOUNTING_LETTERING_NBLETTERS"), $langs->trans("ACCOUNTING_LETTERING_NBLETTERS_DESC")) . '</td>'; |
|
| 523 | + print $form->textwithpicto($langs->trans("ACCOUNTING_LETTERING_NBLETTERS"), $langs->trans("ACCOUNTING_LETTERING_NBLETTERS_DESC")).'</td>'; |
|
| 524 | 524 | print '<td class="right">'; |
| 525 | 525 | |
| 526 | 526 | if (empty($letter)) { |
@@ -531,19 +531,19 @@ discard block |
||
| 531 | 531 | } |
| 532 | 532 | } |
| 533 | 533 | |
| 534 | - print '<input class="flat right" name="ACCOUNTING_LETTERING_NBLETTERS" id="ACCOUNTING_LETTERING_NBLETTERS" value="' . $nbletter . '" type="number" step="1" min="2" max="3" >' . "\n"; |
|
| 534 | + print '<input class="flat right" name="ACCOUNTING_LETTERING_NBLETTERS" id="ACCOUNTING_LETTERING_NBLETTERS" value="'.$nbletter.'" type="number" step="1" min="2" max="3" >'."\n"; |
|
| 535 | 535 | print '</tr>'; |
| 536 | 536 | |
| 537 | 537 | // Auto Lettering when transfer in accountancy is realized |
| 538 | 538 | print '<tr class="oddeven">'; |
| 539 | 539 | print '<td>'; |
| 540 | - print $form->textwithpicto($langs->trans("ACCOUNTING_ENABLE_AUTOLETTERING"), $langs->trans("ACCOUNTING_ENABLE_AUTOLETTERING_DESC")) . '</td>'; |
|
| 540 | + print $form->textwithpicto($langs->trans("ACCOUNTING_ENABLE_AUTOLETTERING"), $langs->trans("ACCOUNTING_ENABLE_AUTOLETTERING_DESC")).'</td>'; |
|
| 541 | 541 | if (getDolGlobalInt('ACCOUNTING_ENABLE_AUTOLETTERING')) { |
| 542 | - print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?token=' . newToken() . '&action=setenableautolettering&value=0">'; |
|
| 542 | + print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setenableautolettering&value=0">'; |
|
| 543 | 543 | print img_picto($langs->trans("Activated"), 'switch_on'); |
| 544 | 544 | print '</a></td>'; |
| 545 | 545 | } else { |
| 546 | - print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?token=' . newToken() . '&action=setenableautolettering&value=1">'; |
|
| 546 | + print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setenableautolettering&value=1">'; |
|
| 547 | 547 | print img_picto($langs->trans("Disabled"), 'switch_off'); |
| 548 | 548 | print '</a></td>'; |
| 549 | 549 | } |
@@ -554,11 +554,11 @@ discard block |
||
| 554 | 554 | print '<td>'; |
| 555 | 555 | print $form->textwithpicto($langs->trans("ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE"), $langs->trans("ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE_DESC", $langs->transnoentities("MenuDefaultAccounts"))).'</td>'; |
| 556 | 556 | if (getDolGlobalString('ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE')) { |
| 557 | - print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?token=' . newToken() . '&action=setenablevatreversecharge&value=0">'; |
|
| 557 | + print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setenablevatreversecharge&value=0">'; |
|
| 558 | 558 | print img_picto($langs->trans("Activated"), 'switch_on'); |
| 559 | 559 | print '</a></td>'; |
| 560 | 560 | } else { |
| 561 | - print '<td class="right"><a class="reposition" href="' . $_SERVER['PHP_SELF'] . '?token=' . newToken() . '&action=setenablevatreversecharge&value=1">'; |
|
| 561 | + print '<td class="right"><a class="reposition" href="'.$_SERVER['PHP_SELF'].'?token='.newToken().'&action=setenablevatreversecharge&value=1">'; |
|
| 562 | 562 | print img_picto($langs->trans("Disabled"), 'switch_off'); |
| 563 | 563 | print '</a></td>'; |
| 564 | 564 | } |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $hookmanager->initHooks(array('expensereportsjournal')); |
| 62 | 62 | $parameters = array(); |
| 63 | 63 | |
| 64 | -$taber = array(); // Initialise for static analysis |
|
| 64 | +$taber = array(); // Initialise for static analysis |
|
| 65 | 65 | $tabht = array(); |
| 66 | 66 | $tabtva = array(); |
| 67 | 67 | $tabttc = array(); |
@@ -98,8 +98,8 @@ discard block |
||
| 98 | 98 | $date_start = dol_mktime(0, 0, 0, $date_startmonth, $date_startday, $date_startyear); |
| 99 | 99 | $date_end = dol_mktime(23, 59, 59, $date_endmonth, $date_endday, $date_endyear); |
| 100 | 100 | |
| 101 | -$pastmonth = null; // Initialise (could be unset) |
|
| 102 | -$pastmonthyear = null; // Initialise (could be unset) |
|
| 101 | +$pastmonth = null; // Initialise (could be unset) |
|
| 102 | +$pastmonthyear = null; // Initialise (could be unset) |
|
| 103 | 103 | |
| 104 | 104 | if (empty($date_startmonth)) { |
| 105 | 105 | // Period by default on transfer |
@@ -748,7 +748,7 @@ discard block |
||
| 748 | 748 | print '</td>'; |
| 749 | 749 | $userstatic->id = $tabuser[$key]['id']; |
| 750 | 750 | $userstatic->name = $tabuser[$key]['name']; |
| 751 | - print "<td>" . $bookkeepingstatic->accountingLabelForOperation($userstatic->getNomUrl(0, 'user'), '', $accountingaccount->label) . "</td>"; |
|
| 751 | + print "<td>".$bookkeepingstatic->accountingLabelForOperation($userstatic->getNomUrl(0, 'user'), '', $accountingaccount->label)."</td>"; |
|
| 752 | 752 | print '<td class="right nowraponall amount">'.($mt >= 0 ? price($mt) : '')."</td>"; |
| 753 | 753 | print '<td class="right nowraponall amount">'.($mt < 0 ? price(-$mt) : '')."</td>"; |
| 754 | 754 | print "</tr>"; |
@@ -784,7 +784,7 @@ discard block |
||
| 784 | 784 | print $accountoshow; |
| 785 | 785 | } |
| 786 | 786 | print '</td>'; |
| 787 | - print "<td>" . $bookkeepingstatic->accountingLabelForOperation($userstatic->getNomUrl(0, 'user'), '', $langs->trans("SubledgerAccount")) . "</td>"; |
|
| 787 | + print "<td>".$bookkeepingstatic->accountingLabelForOperation($userstatic->getNomUrl(0, 'user'), '', $langs->trans("SubledgerAccount"))."</td>"; |
|
| 788 | 788 | print '<td class="right nowraponall amount">'.($mt < 0 ? price(-$mt) : '')."</td>"; |
| 789 | 789 | print '<td class="right nowraponall amount">'.($mt >= 0 ? price($mt) : '')."</td>"; |
| 790 | 790 | print "</tr>"; |
@@ -824,7 +824,7 @@ discard block |
||
| 824 | 824 | $tmpvatrate = (empty($def_tva[$key][$k]) ? (empty($arrayofvat[$key][$k]) ? '' : $arrayofvat[$key][$k]) : implode(', ', $def_tva[$key][$k])); |
| 825 | 825 | $labelvatrate = $langs->trans("Taxes").' '.$tmpvatrate.' %'; |
| 826 | 826 | $labelvatrate .= ($numtax ? ' - Localtax '.$numtax : ''); |
| 827 | - print "<td>" . $bookkeepingstatic->accountingLabelForOperation($userstatic->getNomUrl(0, 'user'), '', $labelvatrate) . "</td>"; |
|
| 827 | + print "<td>".$bookkeepingstatic->accountingLabelForOperation($userstatic->getNomUrl(0, 'user'), '', $labelvatrate)."</td>"; |
|
| 828 | 828 | print '<td class="right nowraponall amount">'.($mt >= 0 ? price($mt) : '')."</td>"; |
| 829 | 829 | print '<td class="right nowraponall amount">'.($mt < 0 ? price(-$mt) : '')."</td>"; |
| 830 | 830 | print "</tr>"; |
@@ -103,8 +103,8 @@ discard block |
||
| 103 | 103 | $date_start = dol_mktime(0, 0, 0, $date_startmonth, $date_startday, $date_startyear); |
| 104 | 104 | $date_end = dol_mktime(23, 59, 59, $date_endmonth, $date_endday, $date_endyear); |
| 105 | 105 | |
| 106 | -$pastmonth = null; // Initialise, could be unset |
|
| 107 | -$pastmonthyear = null; // Initialise, could be unset |
|
| 106 | +$pastmonth = null; // Initialise, could be unset |
|
| 107 | +$pastmonthyear = null; // Initialise, could be unset |
|
| 108 | 108 | |
| 109 | 109 | if (empty($date_startmonth)) { |
| 110 | 110 | // Period by default on transfer |
@@ -151,13 +151,13 @@ discard block |
||
| 151 | 151 | $sql .= " FROM ".MAIN_DB_PREFIX."facturedet as fd"; |
| 152 | 152 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = fd.fk_product"; |
| 153 | 153 | if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) { |
| 154 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity); |
|
| 154 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = ".((int) $conf->entity); |
|
| 155 | 155 | } |
| 156 | 156 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON aa.rowid = fd.fk_code_ventilation"; |
| 157 | 157 | $sql .= " JOIN ".MAIN_DB_PREFIX."facture as f ON f.rowid = fd.fk_facture"; |
| 158 | 158 | $sql .= " JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc"; |
| 159 | 159 | if (getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) { |
| 160 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = " . ((int) $conf->entity); |
|
| 160 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = ".((int) $conf->entity); |
|
| 161 | 161 | } |
| 162 | 162 | $parameters = array(); |
| 163 | 163 | $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters); // Note that $action and $object may have been modified by hook |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | |
| 233 | 233 | //$compta_revenuestamp = getDolGlobalString('ACCOUNTING_REVENUESTAMP_SOLD_ACCOUNT', 'NotDefined'); |
| 234 | 234 | |
| 235 | - $tax_id = $obj->tva_tx . ($obj->vat_src_code ? ' (' . $obj->vat_src_code . ')' : ''); |
|
| 235 | + $tax_id = $obj->tva_tx.($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : ''); |
|
| 236 | 236 | if (array_key_exists($tax_id, $vatdata_cache)) { |
| 237 | 237 | $vatdata = $vatdata_cache[$tax_id]; |
| 238 | 238 | } else { |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | $buyer = new Societe($db); |
| 241 | 241 | $buyer->fetch($obj->socid); |
| 242 | 242 | } else { |
| 243 | - $buyer = null; // We don't need the buyer in this case |
|
| 243 | + $buyer = null; // We don't need the buyer in this case |
|
| 244 | 244 | } |
| 245 | 245 | $seller = $mysoc; |
| 246 | 246 | $vatdata = getTaxesFromId($tax_id, $buyer, $seller, 0); |
@@ -316,7 +316,7 @@ discard block |
||
| 316 | 316 | |
| 317 | 317 | // Move a part of the retained warrenty into the account of warranty |
| 318 | 318 | if (getDolGlobalString('INVOICE_USE_RETAINED_WARRANTY') && $obj->retained_warranty > 0) { |
| 319 | - $retained_warranty = (float) price2num($total_ttc * $obj->retained_warranty / 100, 'MT'); // Calculate the amount of warrenty for this line (using the percent value) |
|
| 319 | + $retained_warranty = (float) price2num($total_ttc * $obj->retained_warranty / 100, 'MT'); // Calculate the amount of warrenty for this line (using the percent value) |
|
| 320 | 320 | $tabwarranty[$obj->rowid][$compta_soc] += $retained_warranty; |
| 321 | 321 | $total_ttc -= $retained_warranty; |
| 322 | 322 | } |
@@ -471,7 +471,7 @@ discard block |
||
| 471 | 471 | $totalcredit = 0; |
| 472 | 472 | $totaldebit = 0; |
| 473 | 473 | |
| 474 | - $db->begin(); // We accept transaction into loop, so if we hang, we can continue transfer from the last error |
|
| 474 | + $db->begin(); // We accept transaction into loop, so if we hang, we can continue transfer from the last error |
|
| 475 | 475 | |
| 476 | 476 | $companystatic->id = $tabcompany[$key]['id']; |
| 477 | 477 | $companystatic->name = $tabcompany[$key]['name']; |
@@ -608,7 +608,7 @@ discard block |
||
| 608 | 608 | } |
| 609 | 609 | } else { |
| 610 | 610 | if (getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING') && getDolGlobalInt('ACCOUNTING_ENABLE_AUTOLETTERING')) { |
| 611 | - require_once DOL_DOCUMENT_ROOT . '/accountancy/class/lettering.class.php'; |
|
| 611 | + require_once DOL_DOCUMENT_ROOT.'/accountancy/class/lettering.class.php'; |
|
| 612 | 612 | $lettering_static = new Lettering($db); |
| 613 | 613 | |
| 614 | 614 | $nb_lettering = $lettering_static->bookkeepingLettering(array($bookkeeping->id)); |
@@ -703,7 +703,7 @@ discard block |
||
| 703 | 703 | |
| 704 | 704 | foreach ($arrayofvat[$key] as $k => $mt) { |
| 705 | 705 | if ($mt) { |
| 706 | - $accountingaccount->fetch(0, $k, true); // TODO Use a cache for label |
|
| 706 | + $accountingaccount->fetch(0, $k, true); // TODO Use a cache for label |
|
| 707 | 707 | $label_account = $accountingaccount->label; |
| 708 | 708 | |
| 709 | 709 | $bookkeeping = new BookKeeping($db); |
@@ -764,7 +764,7 @@ discard block |
||
| 764 | 764 | if (isset($tabrevenuestamp[$key]) && is_array($tabrevenuestamp[$key])) { |
| 765 | 765 | foreach ($tabrevenuestamp[$key] as $k => $mt) { |
| 766 | 766 | if ($mt) { |
| 767 | - $accountingaccount->fetch(0, $k, true); // TODO Use a cache for label |
|
| 767 | + $accountingaccount->fetch(0, $k, true); // TODO Use a cache for label |
|
| 768 | 768 | $label_account = $accountingaccount->label; |
| 769 | 769 | |
| 770 | 770 | $bookkeeping = new BookKeeping($db); |
@@ -886,7 +886,7 @@ discard block |
||
| 886 | 886 | foreach ($tabfac as $key => $val) { |
| 887 | 887 | $companystatic->id = $tabcompany[$key]['id']; |
| 888 | 888 | $companystatic->name = $tabcompany[$key]['name']; |
| 889 | - $companystatic->code_compta = $tabcompany[$key]['code_compta']; // deprecated |
|
| 889 | + $companystatic->code_compta = $tabcompany[$key]['code_compta']; // deprecated |
|
| 890 | 890 | $companystatic->code_compta_client = $tabcompany[$key]['code_compta']; |
| 891 | 891 | $companystatic->code_client = $tabcompany[$key]['code_client']; |
| 892 | 892 | $companystatic->client = 3; |
@@ -1074,7 +1074,7 @@ discard block |
||
| 1074 | 1074 | } |
| 1075 | 1075 | |
| 1076 | 1076 | // Button to write into Ledger |
| 1077 | - $acctCustomerNotConfigured = in_array(getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER'), ['','-1']); |
|
| 1077 | + $acctCustomerNotConfigured = in_array(getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER'), ['', '-1']); |
|
| 1078 | 1078 | if ($acctCustomerNotConfigured) { |
| 1079 | 1079 | print '<br><div class="warning">'.img_warning().' '.$langs->trans("SomeMandatoryStepsOfSetupWereNotDone"); |
| 1080 | 1080 | $desc = ' : '.$langs->trans("AccountancyAreaDescMisc", 4, '{link}'); |
@@ -1209,13 +1209,13 @@ discard block |
||
| 1209 | 1209 | foreach ($tabwarranty[$key] as $k => $mt) { |
| 1210 | 1210 | print '<tr class="oddeven">'; |
| 1211 | 1211 | print "<!-- Thirdparty warranty -->"; |
| 1212 | - print "<td>" . $date . "</td>"; |
|
| 1213 | - print "<td>" . $invoicestatic->getNomUrl(1) . "</td>"; |
|
| 1212 | + print "<td>".$date."</td>"; |
|
| 1213 | + print "<td>".$invoicestatic->getNomUrl(1)."</td>"; |
|
| 1214 | 1214 | // Account |
| 1215 | 1215 | print "<td>"; |
| 1216 | 1216 | $accountoshow = length_accountg(getDolGlobalString('ACCOUNTING_ACCOUNT_CUSTOMER_RETAINED_WARRANTY')); |
| 1217 | 1217 | if (($accountoshow == "") || $accountoshow == 'NotDefined') { |
| 1218 | - print '<span class="error">' . $langs->trans("MainAccountForRetainedWarrantyNotDefined") . '</span>'; |
|
| 1218 | + print '<span class="error">'.$langs->trans("MainAccountForRetainedWarrantyNotDefined").'</span>'; |
|
| 1219 | 1219 | } else { |
| 1220 | 1220 | print $accountoshow; |
| 1221 | 1221 | } |
@@ -1224,14 +1224,14 @@ discard block |
||
| 1224 | 1224 | print "<td>"; |
| 1225 | 1225 | $accountoshow = length_accounta($k); |
| 1226 | 1226 | if (($accountoshow == "") || $accountoshow == 'NotDefined') { |
| 1227 | - print '<span class="error">' . $langs->trans("ThirdpartyAccountNotDefined") . '</span>'; |
|
| 1227 | + print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>'; |
|
| 1228 | 1228 | } else { |
| 1229 | 1229 | print $accountoshow; |
| 1230 | 1230 | } |
| 1231 | 1231 | print '</td>'; |
| 1232 | - print "<td>" . $bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0), $invoicestatic->ref, $langs->trans("RetainedWarranty")) . "</td>"; |
|
| 1233 | - print '<td class="right nowraponall amount">' . ($mt >= 0 ? price($mt) : '') . "</td>"; |
|
| 1234 | - print '<td class="right nowraponall amount">' . ($mt < 0 ? price(-$mt) : '') . "</td>"; |
|
| 1232 | + print "<td>".$bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0), $invoicestatic->ref, $langs->trans("RetainedWarranty"))."</td>"; |
|
| 1233 | + print '<td class="right nowraponall amount">'.($mt >= 0 ? price($mt) : '')."</td>"; |
|
| 1234 | + print '<td class="right nowraponall amount">'.($mt < 0 ? price(-$mt) : '')."</td>"; |
|
| 1235 | 1235 | print "</tr>"; |
| 1236 | 1236 | } |
| 1237 | 1237 | } |
@@ -1260,7 +1260,7 @@ discard block |
||
| 1260 | 1260 | print $accountoshow; |
| 1261 | 1261 | } |
| 1262 | 1262 | print '</td>'; |
| 1263 | - print "<td>" . $bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'customer'), $invoicestatic->ref, $langs->trans("SubledgerAccount")) . "</td>"; |
|
| 1263 | + print "<td>".$bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'customer'), $invoicestatic->ref, $langs->trans("SubledgerAccount"))."</td>"; |
|
| 1264 | 1264 | print '<td class="right nowraponall amount">'.($mt >= 0 ? price($mt) : '')."</td>"; |
| 1265 | 1265 | print '<td class="right nowraponall amount">'.($mt < 0 ? price(-$mt) : '')."</td>"; |
| 1266 | 1266 | print "</tr>"; |
@@ -1298,12 +1298,12 @@ discard block |
||
| 1298 | 1298 | print length_accounta($tabcompany[$key]['code_compta']); |
| 1299 | 1299 | } |
| 1300 | 1300 | } elseif (($accountoshow == "") || $accountoshow == 'NotDefined') { |
| 1301 | - print '<span class="error">' . $langs->trans("ThirdpartyAccountNotDefined") . '</span>'; |
|
| 1301 | + print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>'; |
|
| 1302 | 1302 | } |
| 1303 | 1303 | print '</td>'; |
| 1304 | 1304 | $companystatic->id = $tabcompany[$key]['id']; |
| 1305 | 1305 | $companystatic->name = $tabcompany[$key]['name']; |
| 1306 | - print "<td>" . $bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'customer'), $invoicestatic->ref, $accountingaccount->label) . "</td>"; |
|
| 1306 | + print "<td>".$bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'customer'), $invoicestatic->ref, $accountingaccount->label)."</td>"; |
|
| 1307 | 1307 | print '<td class="right nowraponall amount">'.($mt < 0 ? price(-$mt) : '')."</td>"; |
| 1308 | 1308 | print '<td class="right nowraponall amount">'.($mt >= 0 ? price($mt) : '')."</td>"; |
| 1309 | 1309 | print "</tr>"; |
@@ -1346,7 +1346,7 @@ discard block |
||
| 1346 | 1346 | $tmpvatrate = (empty($def_tva[$key][$k]) ? (empty($arrayofvat[$key][$k]) ? '' : $arrayofvat[$key][$k]) : implode(', ', $def_tva[$key][$k])); |
| 1347 | 1347 | $labelvatrate = $langs->trans("Taxes").' '.$tmpvatrate.' %'; |
| 1348 | 1348 | $labelvatrate .= ($numtax ? ' - Localtax '.$numtax : ''); |
| 1349 | - print "<td>" . $bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'customer'), $invoicestatic->ref, $labelvatrate) . "</td>"; |
|
| 1349 | + print "<td>".$bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'customer'), $invoicestatic->ref, $labelvatrate)."</td>"; |
|
| 1350 | 1350 | print '<td class="right nowraponall amount">'.($mt < 0 ? price(-$mt) : '')."</td>"; |
| 1351 | 1351 | print '<td class="right nowraponall amount">'.($mt >= 0 ? price($mt) : '')."</td>"; |
| 1352 | 1352 | print "</tr>"; |
@@ -1361,13 +1361,13 @@ discard block |
||
| 1361 | 1361 | foreach ($tabrevenuestamp[$key] as $k => $mt) { |
| 1362 | 1362 | print '<tr class="oddeven">'; |
| 1363 | 1363 | print "<!-- Thirdparty revenuestamp -->"; |
| 1364 | - print "<td>" . $date . "</td>"; |
|
| 1365 | - print "<td>" . $invoicestatic->getNomUrl(1) . "</td>"; |
|
| 1364 | + print "<td>".$date."</td>"; |
|
| 1365 | + print "<td>".$invoicestatic->getNomUrl(1)."</td>"; |
|
| 1366 | 1366 | // Account |
| 1367 | 1367 | print "<td>"; |
| 1368 | 1368 | $accountoshow = length_accountg($k); |
| 1369 | 1369 | if (($accountoshow == "") || $accountoshow == 'NotDefined') { |
| 1370 | - print '<span class="error">' . $langs->trans("MainAccountForRevenueStampSaleNotDefined") . '</span>'; |
|
| 1370 | + print '<span class="error">'.$langs->trans("MainAccountForRevenueStampSaleNotDefined").'</span>'; |
|
| 1371 | 1371 | } else { |
| 1372 | 1372 | print $accountoshow; |
| 1373 | 1373 | } |
@@ -1375,9 +1375,9 @@ discard block |
||
| 1375 | 1375 | // Subledger account |
| 1376 | 1376 | print "<td>"; |
| 1377 | 1377 | print '</td>'; |
| 1378 | - print "<td>" . $bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'customer'), $invoicestatic->ref, $langs->trans("RevenueStamp")) . "</td>"; |
|
| 1379 | - print '<td class="right nowraponall amount">' . ($mt < 0 ? price(-$mt) : '') . "</td>"; |
|
| 1380 | - print '<td class="right nowraponall amount">' . ($mt >= 0 ? price($mt) : '') . "</td>"; |
|
| 1378 | + print "<td>".$bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'customer'), $invoicestatic->ref, $langs->trans("RevenueStamp"))."</td>"; |
|
| 1379 | + print '<td class="right nowraponall amount">'.($mt < 0 ? price(-$mt) : '')."</td>"; |
|
| 1380 | + print '<td class="right nowraponall amount">'.($mt >= 0 ? price($mt) : '')."</td>"; |
|
| 1381 | 1381 | print "</tr>"; |
| 1382 | 1382 | } |
| 1383 | 1383 | } |
@@ -104,8 +104,8 @@ discard block |
||
| 104 | 104 | $date_start = dol_mktime(0, 0, 0, $date_startmonth, $date_startday, $date_startyear); |
| 105 | 105 | $date_end = dol_mktime(23, 59, 59, $date_endmonth, $date_endday, $date_endyear); |
| 106 | 106 | |
| 107 | -$pastmonth = null; // Initialise, could be unset |
|
| 108 | -$pastmonthyear = null; // Initialise, could be unset |
|
| 107 | +$pastmonth = null; // Initialise, could be unset |
|
| 108 | +$pastmonthyear = null; // Initialise, could be unset |
|
| 109 | 109 | |
| 110 | 110 | if (empty($date_startmonth)) { |
| 111 | 111 | // Period by default on transfer |
@@ -151,14 +151,14 @@ discard block |
||
| 151 | 151 | $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn_det as fd"; |
| 152 | 152 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = fd.fk_product"; |
| 153 | 153 | if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) { |
| 154 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity); |
|
| 154 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = ".((int) $conf->entity); |
|
| 155 | 155 | } |
| 156 | 156 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON aa.rowid = fd.fk_code_ventilation"; |
| 157 | 157 | $sql .= " JOIN ".MAIN_DB_PREFIX."facture_fourn as f ON f.rowid = fd.fk_facture_fourn"; |
| 158 | 158 | $sql .= " JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc"; |
| 159 | 159 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as co ON co.rowid = s.fk_pays "; |
| 160 | 160 | if (getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) { |
| 161 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = " . ((int) $conf->entity); |
|
| 161 | + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = ".((int) $conf->entity); |
|
| 162 | 162 | } |
| 163 | 163 | $parameters = array(); |
| 164 | 164 | $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters); // Note that $action and $object may have been modified by hook |
@@ -214,7 +214,7 @@ discard block |
||
| 214 | 214 | $cpttva = getDolGlobalString('ACCOUNTING_VAT_BUY_ACCOUNT', 'NotDefined'); |
| 215 | 215 | $rcctva = getDolGlobalString('ACCOUNTING_VAT_BUY_REVERSE_CHARGES_CREDIT', 'NotDefined'); |
| 216 | 216 | $rcdtva = getDolGlobalString('ACCOUNTING_VAT_BUY_REVERSE_CHARGES_DEBIT', 'NotDefined'); |
| 217 | - $country_code_in_EEC = getCountriesInEEC(); // This make a database call but there is a cache done into $conf->cache['country_code_in_EEC'] |
|
| 217 | + $country_code_in_EEC = getCountriesInEEC(); // This make a database call but there is a cache done into $conf->cache['country_code_in_EEC'] |
|
| 218 | 218 | |
| 219 | 219 | $i = 0; |
| 220 | 220 | while ($i < $num) { |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | } |
| 233 | 233 | } |
| 234 | 234 | |
| 235 | - $tax_id = $obj->tva_tx . ($obj->vat_src_code ? ' (' . $obj->vat_src_code . ')' : ''); |
|
| 235 | + $tax_id = $obj->tva_tx.($obj->vat_src_code ? ' ('.$obj->vat_src_code.')' : ''); |
|
| 236 | 236 | if (array_key_exists($tax_id, $vatdata_cache)) { |
| 237 | 237 | $vatdata = $vatdata_cache[$tax_id]; |
| 238 | 238 | } else { |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | |
| 282 | 282 | // VAT Reverse charge |
| 283 | 283 | if (($mysoc->country_code == 'FR' || getDolGlobalString('ACCOUNTING_FORCE_ENABLE_VAT_REVERSE_CHARGE')) && $obj->vat_reverse_charge == 1 && in_array($obj->country_code, $country_code_in_EEC)) { |
| 284 | - $rcvatdata = getTaxesFromId($obj->product_buy_vat . ($obj->product_buy_default_vat_code ? ' (' . $obj->product_buy_default_vat_code . ')' : ''), $mysoc, $mysoc, 0); |
|
| 284 | + $rcvatdata = getTaxesFromId($obj->product_buy_vat.($obj->product_buy_default_vat_code ? ' ('.$obj->product_buy_default_vat_code.')' : ''), $mysoc, $mysoc, 0); |
|
| 285 | 285 | $rcc_compta_tva = (!empty($vatdata['accountancy_code_vat_reverse_charge_credit']) ? $vatdata['accountancy_code_vat_reverse_charge_credit'] : $rcctva); |
| 286 | 286 | $rcd_compta_tva = (!empty($vatdata['accountancy_code_vat_reverse_charge_debit']) ? $vatdata['accountancy_code_vat_reverse_charge_debit'] : $rcdtva); |
| 287 | 287 | $rcc_compta_localtax1 = (!empty($vatdata['accountancy_code_vat_reverse_charge_credit']) ? $vatdata['accountancy_code_vat_reverse_charge_credit'] : $rcctva); |
@@ -289,7 +289,7 @@ discard block |
||
| 289 | 289 | $rcc_compta_localtax2 = (!empty($vatdata['accountancy_code_vat_reverse_charge_credit']) ? $vatdata['accountancy_code_vat_reverse_charge_credit'] : $rcctva); |
| 290 | 290 | $rcd_compta_localtax2 = (!empty($vatdata['accountancy_code_vat_reverse_charge_debit']) ? $vatdata['accountancy_code_vat_reverse_charge_debit'] : $rcdtva); |
| 291 | 291 | if (price2num($obj->product_buy_vat) || !empty($obj->product_buy_default_vat_code)) { |
| 292 | - $vat_key = vatrate($obj->product_buy_vat) . ($obj->product_buy_default_vat_code ? ' (' . $obj->product_buy_default_vat_code . ')' : ''); |
|
| 292 | + $vat_key = vatrate($obj->product_buy_vat).($obj->product_buy_default_vat_code ? ' ('.$obj->product_buy_default_vat_code.')' : ''); |
|
| 293 | 293 | $val_value = $vat_key; |
| 294 | 294 | $def_tva[$obj->rowid][$rcc_compta_tva][$vat_key] = $val_value; |
| 295 | 295 | $def_tva[$obj->rowid][$rcd_compta_tva][$vat_key] = $val_value; |
@@ -382,7 +382,7 @@ discard block |
||
| 382 | 382 | fk_facture_fourn, |
| 383 | 383 | COUNT(fd.rowid) as nb |
| 384 | 384 | FROM |
| 385 | - " . MAIN_DB_PREFIX . "facture_fourn_det as fd |
|
| 385 | + " . MAIN_DB_PREFIX."facture_fourn_det as fd |
|
| 386 | 386 | WHERE |
| 387 | 387 | fd.product_type <= 2 |
| 388 | 388 | AND fd.fk_code_ventilation <= 0 |
@@ -423,7 +423,7 @@ discard block |
||
| 423 | 423 | $totalcredit = 0; |
| 424 | 424 | $totaldebit = 0; |
| 425 | 425 | |
| 426 | - $db->begin(); // We accept transaction into loop, so if we hang, we can continue transfer from the last error |
|
| 426 | + $db->begin(); // We accept transaction into loop, so if we hang, we can continue transfer from the last error |
|
| 427 | 427 | |
| 428 | 428 | $companystatic->id = $tabcompany[$key]['id']; |
| 429 | 429 | $companystatic->name = $tabcompany[$key]['name']; |
@@ -510,7 +510,7 @@ discard block |
||
| 510 | 510 | } |
| 511 | 511 | } else { |
| 512 | 512 | if (getDolGlobalInt('ACCOUNTING_ENABLE_LETTERING') && getDolGlobalInt('ACCOUNTING_ENABLE_AUTOLETTERING')) { |
| 513 | - require_once DOL_DOCUMENT_ROOT . '/accountancy/class/lettering.class.php'; |
|
| 513 | + require_once DOL_DOCUMENT_ROOT.'/accountancy/class/lettering.class.php'; |
|
| 514 | 514 | $lettering_static = new Lettering($db); |
| 515 | 515 | |
| 516 | 516 | $nb_lettering = $lettering_static->bookkeepingLettering(array($bookkeeping->id)); |
@@ -629,7 +629,7 @@ discard block |
||
| 629 | 629 | |
| 630 | 630 | foreach ($arrayofvat[$key] as $k => $mt) { |
| 631 | 631 | if ($mt) { |
| 632 | - $accountingaccount->fetch(0, $k, true); // TODO Use a cache for label |
|
| 632 | + $accountingaccount->fetch(0, $k, true); // TODO Use a cache for label |
|
| 633 | 633 | $label_account = $accountingaccount->label; |
| 634 | 634 | |
| 635 | 635 | $bookkeeping = new BookKeeping($db); |
@@ -992,7 +992,7 @@ discard block |
||
| 992 | 992 | } |
| 993 | 993 | |
| 994 | 994 | // Button to write into Ledger |
| 995 | - $acctSupplierNotConfigured = in_array(getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER'), ['','-1']); |
|
| 995 | + $acctSupplierNotConfigured = in_array(getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER'), ['', '-1']); |
|
| 996 | 996 | if ($acctSupplierNotConfigured) { |
| 997 | 997 | print '<br><div class="warning">'.img_warning().' '.$langs->trans("SomeMandatoryStepsOfSetupWereNotDone"); |
| 998 | 998 | $desc = ' : '.$langs->trans("AccountancyAreaDescMisc", 4, '{link}'); |
@@ -1147,7 +1147,7 @@ discard block |
||
| 1147 | 1147 | print $accountoshow; |
| 1148 | 1148 | } |
| 1149 | 1149 | print '</td>'; |
| 1150 | - print "<td>" . $bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'supplier'), $invoicestatic->ref_supplier, $langs->trans("SubledgerAccount")) . "</td>"; |
|
| 1150 | + print "<td>".$bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'supplier'), $invoicestatic->ref_supplier, $langs->trans("SubledgerAccount"))."</td>"; |
|
| 1151 | 1151 | print '<td class="right nowraponall amount">'.($mt < 0 ? price(-$mt) : '')."</td>"; |
| 1152 | 1152 | print '<td class="right nowraponall amount">'.($mt >= 0 ? price($mt) : '')."</td>"; |
| 1153 | 1153 | print "</tr>"; |
@@ -1185,12 +1185,12 @@ discard block |
||
| 1185 | 1185 | print length_accounta($tabcompany[$key]['code_compta']); |
| 1186 | 1186 | } |
| 1187 | 1187 | } elseif (($accountoshow == "") || $accountoshow == 'NotDefined') { |
| 1188 | - print '<span class="error">' . $langs->trans("ThirdpartyAccountNotDefined") . '</span>'; |
|
| 1188 | + print '<span class="error">'.$langs->trans("ThirdpartyAccountNotDefined").'</span>'; |
|
| 1189 | 1189 | } |
| 1190 | 1190 | print '</td>'; |
| 1191 | 1191 | $companystatic->id = $tabcompany[$key]['id']; |
| 1192 | 1192 | $companystatic->name = $tabcompany[$key]['name']; |
| 1193 | - print "<td>" . $bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'supplier'), $invoicestatic->ref_supplier, $accountingaccount->label) . "</td>"; |
|
| 1193 | + print "<td>".$bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'supplier'), $invoicestatic->ref_supplier, $accountingaccount->label)."</td>"; |
|
| 1194 | 1194 | print '<td class="right nowraponall amount">'.($mt >= 0 ? price($mt) : '')."</td>"; |
| 1195 | 1195 | print '<td class="right nowraponall amount">'.($mt < 0 ? price(-$mt) : '')."</td>"; |
| 1196 | 1196 | print "</tr>"; |
@@ -1254,7 +1254,7 @@ discard block |
||
| 1254 | 1254 | $tmpvatrate = (empty($def_tva[$key][$k]) ? (empty($arrayofvat[$key][$k]) ? '' : $arrayofvat[$key][$k]) : implode(', ', $def_tva[$key][$k])); |
| 1255 | 1255 | $labelvatrate = $langs->trans("Taxes").' '.$tmpvatrate.' %'; |
| 1256 | 1256 | $labelvatrate .= ($numtax ? ' - Localtax '.$numtax : ''); |
| 1257 | - print "<td>" . $bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'supplier'), $invoicestatic->ref_supplier, $labelvatrate) . "</td>"; |
|
| 1257 | + print "<td>".$bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'supplier'), $invoicestatic->ref_supplier, $labelvatrate)."</td>"; |
|
| 1258 | 1258 | print "</td>"; |
| 1259 | 1259 | print '<td class="right nowraponall amount">'.($mt >= 0 ? price($mt) : '')."</td>"; |
| 1260 | 1260 | print '<td class="right nowraponall amount">'.($mt < 0 ? price(-$mt) : '')."</td>"; |
@@ -1285,7 +1285,7 @@ discard block |
||
| 1285 | 1285 | // Subledger account |
| 1286 | 1286 | print "<td>"; |
| 1287 | 1287 | print '</td>'; |
| 1288 | - print "<td>" . $bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'supplier'), $invoicestatic->ref_supplier, $langs->trans("VAT")." NPR (counterpart)") . "</td>"; |
|
| 1288 | + print "<td>".$bookkeepingstatic->accountingLabelForOperation($companystatic->getNomUrl(0, 'supplier'), $invoicestatic->ref_supplier, $langs->trans("VAT")." NPR (counterpart)")."</td>"; |
|
| 1289 | 1289 | print '<td class="right nowraponall amount">'.($mt < 0 ? price(-$mt) : '')."</td>"; |
| 1290 | 1290 | print '<td class="right nowraponall amount">'.($mt >= 0 ? price($mt) : '')."</td>"; |
| 1291 | 1291 | print "</tr>"; |