diff --git a/htdocs/adherents/card_subscriptions.php b/htdocs/adherents/card_subscriptions.php index e01eee09663..91c786b2a10 100644 --- a/htdocs/adherents/card_subscriptions.php +++ b/htdocs/adherents/card_subscriptions.php @@ -473,8 +473,8 @@ if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $ // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST ['lang_id'])) - $newlang = $_REQUEST ['lang_id']; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) + $newlang = $_REQUEST['lang_id']; if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $customer->default_lang; if (! empty($newlang)) { diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 01c9956408b..4a6b04f54fb 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -116,7 +116,7 @@ if ($action == 'confirm_clone' && $confirm == 'yes') { if ($object->id > 0) { $result = $object->createFromClone($socid); if ($result > 0) { - header("Location: " . $_SERVER ['PHP_SELF'] . '?id=' . $result); + header("Location: " . $_SERVER['PHP_SELF'] . '?id=' . $result); exit(); } else { setEventMessage($object->error, 'errors'); @@ -157,7 +157,7 @@ else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights-> propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } - header('Location: ' . $_SERVER ["PHP_SELF"] . '?id=' . $object->id); + header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); exit(); } @@ -331,7 +331,7 @@ else if ($action == 'add' && $user->rights->propal->creer) { propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } - header('Location: ' . $_SERVER ["PHP_SELF"] . '?id=' . $id); + header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id); exit(); } else { $db->rollback(); @@ -482,7 +482,7 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G // This avoid sending mail twice if going out and then back to page $mesg = $langs->trans('MailSuccessfulySent', $mailfile->getValidAddress($from, 2), $mailfile->getValidAddress($sendto, 2)); setEventMessage($mesg); - header('Location: ' . $_SERVER ["PHP_SELF"] . '?id=' . $object->id); + header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); exit(); } else { dol_print_error($db); @@ -886,7 +886,7 @@ else if ($action == 'updateligne' && $user->rights->propal->creer && GETPOST('sa } else if ($action == 'updateligne' && $user->rights->propal->creer && GETPOST('cancel') == $langs->trans('Cancel')) { - header('Location: ' . $_SERVER ['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition + header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition exit(); } @@ -910,7 +910,7 @@ else if ($action == 'builddoc' && $user->rights->propal->creer) { dol_print_error($db, $result); exit(); } else { - header('Location: ' . $_SERVER ["PHP_SELF"] . '?id=' . $object->id . (empty($conf->global->MAIN_JUMP_TAG) ? '' : '#builddoc')); + header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . (empty($conf->global->MAIN_JUMP_TAG) ? '' : '#builddoc')); exit(); } } @@ -983,7 +983,7 @@ else if ($action == 'up' && $user->rights->propal->creer) { propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } - header('Location: ' . $_SERVER ["PHP_SELF"] . '?id=' . $id . '#' . GETPOST('rowid')); + header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id . '#' . GETPOST('rowid')); exit(); } @@ -1002,7 +1002,7 @@ else if ($action == 'down' && $user->rights->propal->creer) { propale_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } - header('Location: ' . $_SERVER ["PHP_SELF"] . '?id=' . $id . '#' . GETPOST('rowid')); + header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id . '#' . GETPOST('rowid')); exit(); } else if ($action == 'update_extras') { // Fill array 'array_options' with data from update form @@ -1040,7 +1040,7 @@ if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->propal-> } if ($result >= 0) { - header("Location: " . $_SERVER ['PHP_SELF'] . "?id=" . $object->id); + header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id); exit(); } else { if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { @@ -1067,7 +1067,7 @@ if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->propal-> $result = $object->delete_contact($lineid); if ($result >= 0) { - header("Location: " . $_SERVER ['PHP_SELF'] . "?id=" . $object->id); + header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id); exit(); } else { dol_print_error($db); @@ -1099,7 +1099,7 @@ if ($action == 'create') { $object = new Propal($db); - print '
'; + print ''; print ''; print ''; @@ -1349,22 +1349,22 @@ if ($action == 'create') { // 1), array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', '(s.client=1 OR s.client=2 OR s.client=3)'))); // Paiement incomplet. On demande si motif = escompte ou autre - $formconfirm = $form->formconfirm($_SERVER ["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ClonePropal'), $langs->trans('ConfirmClonePropal', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ClonePropal'), $langs->trans('ConfirmClonePropal', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } // Confirm delete else if ($action == 'delete') { - $formconfirm = $form->formconfirm($_SERVER ["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteProp'), $langs->trans('ConfirmDeleteProp', $object->ref), 'confirm_delete', '', 0, 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteProp'), $langs->trans('ConfirmDeleteProp', $object->ref), 'confirm_delete', '', 0, 1); } // Confirm reopen else if ($action == 'reopen') { - $formconfirm = $form->formconfirm($_SERVER ["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenProp', $object->ref), 'confirm_reopen', '', 0, 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ReOpen'), $langs->trans('ConfirmReOpenProp', $object->ref), 'confirm_reopen', '', 0, 1); } // Confirmation delete product/service line else if ($action == 'ask_deleteline') { - $formconfirm = $form->formconfirm($_SERVER ["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); } // Confirm validate proposal @@ -1392,7 +1392,7 @@ if ($action == 'create') { } if (! $error) - $formconfirm = $form->formconfirm($_SERVER ["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateProp'), $text, 'confirm_validate', '', 0, 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateProp'), $text, 'confirm_validate', '', 0, 1); } if (! $formconfirm) { @@ -1419,7 +1419,7 @@ if ($action == 'create') { print ''; if ($action != 'refclient' && ! empty($object->brouillon)) - print ''; + print ''; print ''; print '
'; print $langs->trans('RefCustomer') . '' . img_edit($langs->trans('Modify')) . '' . img_edit($langs->trans('Modify')) . '
'; print ''; @@ -1458,7 +1458,7 @@ if ($action == 'create') { // Remise dispo de type non avoir $filter = 'fk_facture_source IS NULL'; print '
'; - $form->form_remise_dispo($_SERVER ["PHP_SELF"] . '?id=' . $object->id, 0, 'remise_id', $soc->id, $absolute_discount, $filter); + $form->form_remise_dispo($_SERVER["PHP_SELF"] . '?id=' . $object->id, 0, 'remise_id', $soc->id, $absolute_discount, $filter); } } if ($absolute_creditnote) { @@ -1475,11 +1475,11 @@ if ($action == 'create') { print $langs->trans('Date'); print ''; if ($action != 'editdate' && ! empty($object->brouillon)) - print 'id . '">' . img_edit($langs->trans('SetDate'), 1) . ''; + print 'id . '">' . img_edit($langs->trans('SetDate'), 1) . ''; print ''; print ''; if (! empty($object->brouillon) && $action == 'editdate') { - print ''; + print ''; print ''; print ''; $form->select_date($object->date, 're', '', '', 0, "editdate"); @@ -1501,11 +1501,11 @@ if ($action == 'create') { print $langs->trans('DateEndPropal'); print ''; if ($action != 'editecheance' && ! empty($object->brouillon)) - print 'id . '">' . img_edit($langs->trans('SetConditions'), 1) . ''; + print 'id . '">' . img_edit($langs->trans('SetConditions'), 1) . ''; print ''; print ''; if (! empty($object->brouillon) && $action == 'editecheance') { - print ''; + print ''; print ''; print ''; $form->select_date($object->fin_validite, 'ech', '', '', '', "editecheance"); @@ -1529,13 +1529,13 @@ if ($action == 'create') { print $langs->trans('PaymentConditionsShort'); print ''; if ($action != 'editconditions' && ! empty($object->brouillon)) - print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetConditions'), 1) . ''; + print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetConditions'), 1) . ''; print ''; print ''; if ($action == 'editconditions') { - $form->form_conditions_reglement($_SERVER ['PHP_SELF'] . '?id=' . $object->id, $object->cond_reglement_id, 'cond_reglement_id'); + $form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->cond_reglement_id, 'cond_reglement_id'); } else { - $form->form_conditions_reglement($_SERVER ['PHP_SELF'] . '?id=' . $object->id, $object->cond_reglement_id, 'none'); + $form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->cond_reglement_id, 'none'); } print ''; print ''; @@ -1547,11 +1547,11 @@ if ($action == 'create') { print $langs->trans('DeliveryDate'); print ''; if ($action != 'editdate_livraison' && ! empty($object->brouillon)) - print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetDeliveryDate'), 1) . ''; + print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetDeliveryDate'), 1) . ''; print ''; print ''; if ($action == 'editdate_livraison') { - print ''; + print ''; print ''; print ''; $form->select_date($object->date_livraison, 'liv_', '', '', '', "editdate_livraison"); @@ -1571,13 +1571,13 @@ if ($action == 'create') { print ' (' . $langs->trans('AfterOrder') . ')'; print ''; if ($action != 'editavailability' && ! empty($object->brouillon)) - print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetAvailability'), 1) . ''; + print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetAvailability'), 1) . ''; print ''; print ''; if ($action == 'editavailability') { - $form->form_availability($_SERVER ['PHP_SELF'] . '?id=' . $object->id, $object->availability_id, 'availability_id', 1); + $form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->availability_id, 'availability_id', 1); } else { - $form->form_availability($_SERVER ['PHP_SELF'] . '?id=' . $object->id, $object->availability_id, 'none', 1); + $form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->availability_id, 'none', 1); } print ''; @@ -1589,13 +1589,13 @@ if ($action == 'create') { print $langs->trans('Source'); print ''; if ($action != 'editdemandreason' && ! empty($object->brouillon)) - print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetDemandReason'), 1) . ''; + print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetDemandReason'), 1) . ''; print ''; print ''; if ($action == 'editdemandreason') { - $form->formInputReason($_SERVER ['PHP_SELF'] . '?id=' . $object->id, $object->demand_reason_id, 'demand_reason_id', 1); + $form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->demand_reason_id, 'demand_reason_id', 1); } else { - $form->formInputReason($_SERVER ['PHP_SELF'] . '?id=' . $object->id, $object->demand_reason_id, 'none'); + $form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->demand_reason_id, 'none'); } print ''; print ''; @@ -1607,13 +1607,13 @@ if ($action == 'create') { print $langs->trans('PaymentMode'); print ''; if ($action != 'editmode' && ! empty($object->brouillon)) - print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMode'), 1) . ''; + print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMode'), 1) . ''; print ''; print ''; if ($action == 'editmode') { - $form->form_modes_reglement($_SERVER ['PHP_SELF'] . '?id=' . $object->id, $object->mode_reglement_id, 'mode_reglement_id'); + $form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->mode_reglement_id, 'mode_reglement_id'); } else { - $form->form_modes_reglement($_SERVER ['PHP_SELF'] . '?id=' . $object->id, $object->mode_reglement_id, 'none'); + $form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->mode_reglement_id, 'none'); } print ''; @@ -1625,13 +1625,13 @@ if ($action == 'create') { print $langs->trans('Project') . ''; if ($user->rights->propal->creer) { if ($action != 'classify') - print '' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ''; + print '' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ''; print ''; print ''; if ($action == 'classify') { - $form->form_project($_SERVER ['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid'); + $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid'); } else { - $form->form_project($_SERVER ['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none'); + $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none'); } print ''; } else { @@ -1688,7 +1688,7 @@ if ($action == 'create') { } if ($action == 'edit_extras' && $user->rights->propal->creer && GETPOST('attribute') == $key) { - print ''; + print ''; print ''; print ''; print ''; @@ -1702,7 +1702,7 @@ if ($action == 'create') { } else { print $extrafields->showOutputField($key, $value); if ($object->statut == 0 && $user->rights->propal->creer) - print '' . img_picto('', 'edit') . ' ' . $langs->trans('Modify') . ''; + print '' . img_picto('', 'edit') . ' ' . $langs->trans('Modify') . ''; } print '' . "\n"; } @@ -1770,7 +1770,7 @@ if ($action == 'create') { // Show object lines $result = $object->getLinesArray(); - print ' + print ' @@ -1812,7 +1812,7 @@ if ($action == 'create') { /* * Form to close proposal (signed or not) */ - $form_close = ''; + $form_close = ''; $form_close .= ''; $form_close .= ''; $form_close .= ''; if ($action != 'refcustomer' && $object->brouillon) - print ''; + print ''; print '
' . $langs->trans("CloseAs") . ''; @@ -1850,7 +1850,7 @@ if ($action == 'create') { // Validate if ($object->statut == 0 && $object->total_ttc >= 0 && count($object->lines) > 0 && $user->rights->propal->valider) { if (count($object->lines) > 0) - print ''; + print ''; // else print ''.$langs->trans('Validate').''; } // Create event @@ -1863,19 +1863,19 @@ if ($action == 'create') { } // Edit if ($object->statut == 1 && $user->rights->propal->creer) { - print ''; + print ''; } // ReOpen if (($object->statut == 2 || $object->statut == 3) && $user->rights->propal->cloturer) { - print '
global->MAIN_JUMP_TAG) ? '' : '#reopen') . '"'; + print ''; } // Send if ($object->statut == 1 || $object->statut == 2) { if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->propal->propal_advance->send) { - print ''; + print ''; } else print ''; } @@ -1904,24 +1904,24 @@ if ($action == 'create') { $arraypropal = $object->getInvoiceArrayList(); if (is_array($arraypropal) && count($arraypropal) > 0) { - print ''; + print ''; } } // Close if ($object->statut == 1 && $user->rights->propal->cloturer) { - print '
global->MAIN_JUMP_TAG) ? '' : '#close') . '"'; + print ''; } // Clone if ($user->rights->propal->creer) { - print ''; + print ''; } // Delete if ($user->rights->propal->supprimer) { - print ''; } } @@ -1942,7 +1942,7 @@ if ($action == 'create') { */ $filename = dol_sanitizeFileName($object->ref); $filedir = $conf->propal->dir_output . "/" . dol_sanitizeFileName($object->ref); - $urlsource = $_SERVER ["PHP_SELF"] . "?id=" . $object->id; + $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id; $genallowed = $user->rights->propal->creer; $delallowed = $user->rights->propal->supprimer; @@ -1982,8 +1982,8 @@ if ($action == 'create') { // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST ['lang_id'])) - $newlang = $_REQUEST ['lang_id']; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) + $newlang = $_REQUEST['lang_id']; if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->client->default_lang; if (! empty($newlang)) { @@ -2057,7 +2057,7 @@ if ($action == 'create') { $formmail->param ['action'] = 'send'; $formmail->param ['models'] = 'propal_send'; $formmail->param ['id'] = $object->id; - $formmail->param ['returnurl'] = $_SERVER ["PHP_SELF"] . '?id=' . $object->id; + $formmail->param ['returnurl'] = $_SERVER["PHP_SELF"] . '?id=' . $object->id; // Init list of files if (GETPOST("mode") == 'init') { $formmail->clear_attached_files(); diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 5cd0367bea8..f1c179719a0 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -111,7 +111,7 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && $user->rights->commande-> if ($object->id > 0) { $result = $object->createFromClone($socid); if ($result > 0) { - header("Location: " . $_SERVER ['PHP_SELF'] . '?id=' . $result); + header("Location: " . $_SERVER['PHP_SELF'] . '?id=' . $result); exit(); } else { $mesg = '
' . $object->error . '
'; @@ -126,7 +126,7 @@ else if ($action == 'reopen' && $user->rights->commande->creer) { if ($object->statut == 3) { $result = $object->set_reopen($user); if ($result > 0) { - header('Location: ' . $_SERVER ["PHP_SELF"] . '?id=' . $object->id); + header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); exit(); } else { $mesg = '
' . $object->error . '
'; @@ -165,7 +165,7 @@ else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights-> commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } - header('Location: ' . $_SERVER ["PHP_SELF"] . '?id=' . $object->id); + header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); exit(); } else { $mesg = '
' . $object->error . '
'; @@ -371,7 +371,7 @@ else if ($action == 'add' && $user->rights->commande->creer) { // End of object creation, we show it if ($object_id > 0 && ! $error) { $db->commit(); - header('Location: ' . $_SERVER ["PHP_SELF"] . '?id=' . $object_id); + header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object_id); exit(); } else { $db->rollback(); @@ -825,7 +825,7 @@ else if ($action == 'updateligne' && $user->rights->commande->creer && GETPOST(' } else if ($action == 'updateligne' && $user->rights->commande->creer && GETPOST('cancel') == $langs->trans('Cancel')) { - header('Location: ' . $_SERVER ['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition + header('Location: ' . $_SERVER['PHP_SELF'] . '?id=' . $object->id); // Pour reaffichage de la fiche en cours d'edition exit(); } @@ -847,8 +847,8 @@ else if ($action == 'confirm_validate' && $confirm == 'yes' && $user->rights->co // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST ['lang_id'])) - $newlang = $_REQUEST ['lang_id']; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) + $newlang = $_REQUEST['lang_id']; if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->client->default_lang; if (! empty($newlang)) { @@ -880,8 +880,8 @@ else if ($action == 'confirm_modif' && $user->rights->commande->creer) { // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST ['lang_id'])) - $newlang = $_REQUEST ['lang_id']; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) + $newlang = $_REQUEST['lang_id']; if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->client->default_lang; if (! empty($newlang)) { @@ -929,8 +929,8 @@ else if ($action == 'up' && $user->rights->commande->creer) { // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST ['lang_id'])) - $newlang = $_REQUEST ['lang_id']; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) + $newlang = $_REQUEST['lang_id']; if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->client->default_lang; if (! empty($newlang)) { @@ -941,7 +941,7 @@ else if ($action == 'up' && $user->rights->commande->creer) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); - header('Location: ' . $_SERVER ["PHP_SELF"] . '?id=' . $object->id . '#' . GETPOST('rowid')); + header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '#' . GETPOST('rowid')); exit(); } @@ -951,8 +951,8 @@ else if ($action == 'down' && $user->rights->commande->creer) { // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST ['lang_id'])) - $newlang = $_REQUEST ['lang_id']; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) + $newlang = $_REQUEST['lang_id']; if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->client->default_lang; if (! empty($newlang)) { @@ -962,7 +962,7 @@ else if ($action == 'down' && $user->rights->commande->creer) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) commande_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); - header('Location: ' . $_SERVER ["PHP_SELF"] . '?id=' . $object->id . '#' . GETPOST('rowid')); + header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '#' . GETPOST('rowid')); exit(); } @@ -980,8 +980,8 @@ else if ($action == 'builddoc') // In get or post // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST ['lang_id'])) - $newlang = $_REQUEST ['lang_id']; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) + $newlang = $_REQUEST['lang_id']; if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->client->default_lang; if (! empty($newlang)) { @@ -1176,7 +1176,7 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G } else { // Redirect here // This avoid sending mail twice if going out and then back to page - header('Location: ' . $_SERVER ["PHP_SELF"] . '?id=' . $object->id . '&mesg=' . urlencode($mesg)); + header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&mesg=' . urlencode($mesg)); exit(); } } else { @@ -1219,7 +1219,7 @@ if (! $error && ! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->righ } if ($result >= 0) { - header("Location: " . $_SERVER ['PHP_SELF'] . "?id=" . $object->id); + header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id); exit(); } else { if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { @@ -1245,7 +1245,7 @@ if (! $error && ! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->righ $result = $object->delete_contact($lineid); if ($result >= 0) { - header("Location: " . $_SERVER ['PHP_SELF'] . "?id=" . $object->id); + header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id); exit(); } else { dol_print_error($db); @@ -1349,7 +1349,7 @@ if ($action == 'create' && $user->rights->commande->creer) { $nbrow = 10; - print ''; + print ''; print ''; print ''; print '' . "\n"; @@ -1603,7 +1603,7 @@ if ($action == 'create' && $user->rights->commande->creer) { * Confirmation de la suppression de la commande */ if ($action == 'delete') { - $formconfirm = $form->formconfirm($_SERVER ["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteOrder'), $langs->trans('ConfirmDeleteOrder'), 'confirm_delete', '', 0, 1); } /* @@ -1639,7 +1639,7 @@ if ($action == 'create' && $user->rights->commande->creer) { array('type' => 'other','name' => 'idwarehouse','label' => $langs->trans("SelectWarehouseForStockDecrease"),'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1))); } - $formconfirm = $form->formconfirm($_SERVER ["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateOrder'), $text, 'confirm_validate', $formquestion, 0, 1, 220); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ValidateOrder'), $text, 'confirm_validate', $formquestion, 0, 1, 220); } // Confirm back to draft status @@ -1659,14 +1659,14 @@ if ($action == 'create' && $user->rights->commande->creer) { array('type' => 'other','name' => 'idwarehouse','label' => $langs->trans("SelectWarehouseForStockIncrease"),'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1))); } - $formconfirm = $form->formconfirm($_SERVER ["PHP_SELF"] . '?id=' . $object->id, $langs->trans('UnvalidateOrder'), $text, 'confirm_modif', $formquestion, "yes", 1, 220); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('UnvalidateOrder'), $text, 'confirm_modif', $formquestion, "yes", 1, 220); } /* * Confirmation de la cloture */ if ($action == 'shipped') { - $formconfirm = $form->formconfirm($_SERVER ["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloseOrder'), $langs->trans('ConfirmCloseOrder'), 'confirm_shipped', '', 0, 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloseOrder'), $langs->trans('ConfirmCloseOrder'), 'confirm_shipped', '', 0, 1); } /* @@ -1688,14 +1688,14 @@ if ($action == 'create' && $user->rights->commande->creer) { array('type' => 'other','name' => 'idwarehouse','label' => $langs->trans("SelectWarehouseForStockIncrease"),'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1))); } - $formconfirm = $form->formconfirm($_SERVER ["PHP_SELF"] . '?id=' . $object->id, $langs->trans('Cancel'), $text, 'confirm_cancel', $formquestion, 0, 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('Cancel'), $text, 'confirm_cancel', $formquestion, 0, 1); } /* * Confirmation de la suppression d'une ligne produit */ if ($action == 'ask_deleteline') { - $formconfirm = $form->formconfirm($_SERVER ["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 0, 1); } // Clone confirmation @@ -1709,7 +1709,7 @@ if ($action == 'create' && $user->rights->commande->creer) { // => 1), array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company(GETPOST('socid', 'int'), 'socid', '(s.client=1 OR s.client=3)'))); // Paiement incomplet. On demande si motif = escompte ou autre - $formconfirm = $form->formconfirm($_SERVER ["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloneOrder'), $langs->trans('ConfirmCloneOrder', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CloneOrder'), $langs->trans('ConfirmCloneOrder', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } if (! $formconfirm) { @@ -1751,11 +1751,11 @@ if ($action == 'create' && $user->rights->commande->creer) { print $langs->trans('RefCustomer') . '
'; print '' . img_edit($langs->trans('Modify')) . '' . img_edit($langs->trans('Modify')) . '
'; print ''; if ($user->rights->commande->creer && $action == 'refcustomer') { - print ''; + print ''; print ''; print ''; print ''; @@ -1782,9 +1782,9 @@ if ($action == 'create' && $user->rights->commande->creer) { } // Relative and absolute discounts - $addrelativediscount = '' . $langs->trans("EditRelativeDiscounts") . ''; - $addabsolutediscount = '' . $langs->trans("EditGlobalDiscounts") . ''; - $addcreditnote = '' . $langs->trans("AddCreditNote") . ''; + $addrelativediscount = '' . $langs->trans("EditRelativeDiscounts") . ''; + $addabsolutediscount = '' . $langs->trans("EditGlobalDiscounts") . ''; + $addcreditnote = '' . $langs->trans("AddCreditNote") . ''; print '' . $langs->trans('Discounts') . ''; if ($soc->remise_percent) @@ -1802,7 +1802,7 @@ if ($action == 'create' && $user->rights->commande->creer) { } else { // Remise dispo de type remise fixe (not credit note) print '
'; - $form->form_remise_dispo($_SERVER ["PHP_SELF"] . '?id=' . $object->id, 0, 'remise_id', $soc->id, $absolute_discount, $filterabsolutediscount); + $form->form_remise_dispo($_SERVER["PHP_SELF"] . '?id=' . $object->id, 0, 'remise_id', $soc->id, $absolute_discount, $filterabsolutediscount); } } if ($absolute_creditnote) { @@ -1819,11 +1819,11 @@ if ($action == 'create' && $user->rights->commande->creer) { print ''; if ($action != 'editdate' && $object->brouillon) - print 'id . '">' . img_edit($langs->trans('SetDate'), 1) . ''; + print 'id . '">' . img_edit($langs->trans('SetDate'), 1) . ''; print ''; print ''; if ($action == 'editdate') { - print ''; + print ''; print ''; print ''; $form->select_date($object->date, 'order_', '', '', '', "setdate"); @@ -1841,11 +1841,11 @@ if ($action == 'create' && $user->rights->commande->creer) { print $langs->trans('DateDeliveryPlanned'); print ''; if ($action != 'editdate_livraison') - print 'id . '">' . img_edit($langs->trans('SetDeliveryDate'), 1) . ''; + print 'id . '">' . img_edit($langs->trans('SetDeliveryDate'), 1) . ''; print ''; print ''; if ($action == 'editdate_livraison') { - print ''; + print ''; print ''; print ''; $form->select_date($object->date_livraison ? $object->date_livraison : - 1, 'liv_', '', '', '', "setdate_livraison"); @@ -1863,13 +1863,13 @@ if ($action == 'create' && $user->rights->commande->creer) { print $langs->trans('PaymentConditionsShort'); print ''; if ($action != 'editconditions' && $object->brouillon) - print 'id . '">' . img_edit($langs->trans('SetConditions'), 1) . ''; + print 'id . '">' . img_edit($langs->trans('SetConditions'), 1) . ''; print ''; print ''; if ($action == 'editconditions') { - $form->form_conditions_reglement($_SERVER ['PHP_SELF'] . '?id=' . $object->id, $object->cond_reglement_id, 'cond_reglement_id', 1); + $form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->cond_reglement_id, 'cond_reglement_id', 1); } else { - $form->form_conditions_reglement($_SERVER ['PHP_SELF'] . '?id=' . $object->id, $object->cond_reglement_id, 'none', 1); + $form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->cond_reglement_id, 'none', 1); } print ''; @@ -1881,13 +1881,13 @@ if ($action == 'create' && $user->rights->commande->creer) { print $langs->trans('PaymentMode'); print ''; if ($action != 'editmode' && $object->brouillon) - print 'id . '">' . img_edit($langs->trans('SetMode'), 1) . ''; + print 'id . '">' . img_edit($langs->trans('SetMode'), 1) . ''; print ''; print ''; if ($action == 'editmode') { - $form->form_modes_reglement($_SERVER ['PHP_SELF'] . '?id=' . $object->id, $object->mode_reglement_id, 'mode_reglement_id'); + $form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->mode_reglement_id, 'mode_reglement_id'); } else { - $form->form_modes_reglement($_SERVER ['PHP_SELF'] . '?id=' . $object->id, $object->mode_reglement_id, 'none'); + $form->form_modes_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->mode_reglement_id, 'none'); } print ''; @@ -1897,13 +1897,13 @@ if ($action == 'create' && $user->rights->commande->creer) { print $langs->trans('AvailabilityPeriod'); print ''; if ($action != 'editavailability' && $object->brouillon) - print 'id . '">' . img_edit($langs->trans('SetAvailability'), 1) . ''; + print 'id . '">' . img_edit($langs->trans('SetAvailability'), 1) . ''; print ''; print ''; if ($action == 'editavailability') { - $form->form_availability($_SERVER ['PHP_SELF'] . '?id=' . $object->id, $object->availability_id, 'availability_id', 1); + $form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->availability_id, 'availability_id', 1); } else { - $form->form_availability($_SERVER ['PHP_SELF'] . '?id=' . $object->id, $object->availability_id, 'none', 1); + $form->form_availability($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->availability_id, 'none', 1); } print ''; @@ -1913,13 +1913,13 @@ if ($action == 'create' && $user->rights->commande->creer) { print $langs->trans('Source'); print ''; if ($action != 'editdemandreason' && ! empty($object->brouillon)) - print 'id . '">' . img_edit($langs->trans('SetDemandReason'), 1) . ''; + print 'id . '">' . img_edit($langs->trans('SetDemandReason'), 1) . ''; print ''; print ''; if ($action == 'editdemandreason') { - $form->formInputReason($_SERVER ['PHP_SELF'] . '?id=' . $object->id, $object->demand_reason_id, 'demand_reason_id', 1); + $form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->demand_reason_id, 'demand_reason_id', 1); } else { - $form->formInputReason($_SERVER ['PHP_SELF'] . '?id=' . $object->id, $object->demand_reason_id, 'none'); + $form->formInputReason($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->demand_reason_id, 'none'); } // Removed because using dictionary is an admin feature, not a user feature. Ther is already the "star" to show info to admin users. // This is to avoid too heavy screens and have an uniform look and feel for all screens. @@ -1935,14 +1935,14 @@ if ($action == 'create' && $user->rights->commande->creer) { print $langs->trans('Project'); print ''; if ($action != 'classify') - print '' . img_edit($langs->trans('SetProject')) . ''; + print '' . img_edit($langs->trans('SetProject')) . ''; print ''; print ''; // print "$object->id, $object->socid, $object->fk_project"; if ($action == 'classify') { - $form->form_project($_SERVER ['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid'); + $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid'); } else { - $form->form_project($_SERVER ['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none'); + $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none'); } print ''; } @@ -1983,7 +1983,7 @@ if ($action == 'create' && $user->rights->commande->creer) { } if ($action == 'edit_extras' && $user->rights->commande->creer && GETPOST('attribute') == $key) { - print ''; + print ''; print ''; print ''; print ''; @@ -1996,7 +1996,7 @@ if ($action == 'create' && $user->rights->commande->creer) { } else { print $extrafields->showOutputField($key, $value); if ($object->statut == 0 && $user->rights->commande->creer) - print '' . img_picto('', 'edit') . ' ' . $langs->trans('Modify') . ''; + print '' . img_picto('', 'edit') . ' ' . $langs->trans('Modify') . ''; } print '' . "\n"; } @@ -2064,7 +2064,7 @@ if ($action == 'create' && $user->rights->commande->creer) { */ $result = $object->getLinesArray(); - print ' + print ' @@ -2117,7 +2117,7 @@ if ($action == 'create' && $user->rights->commande->creer) { if (empty($reshook)) { // Valid if ($object->statut == 0 && $object->total_ttc >= 0 && $numlines > 0 && $user->rights->commande->valider) { - print '
' . $langs->trans('Validate') . '
'; + print '
' . $langs->trans('Validate') . '
'; } // Edit if ($object->statut == 1 && $user->rights->commande->creer) { @@ -2133,7 +2133,7 @@ if ($action == 'create' && $user->rights->commande->creer) { // Send if ($object->statut > 0) { if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->commande->order_advance->send)) { - print '
' . $langs->trans('SendByMail') . '
'; + print '
' . $langs->trans('SendByMail') . '
'; } else print '
' . $langs->trans('SendByMail') . '
'; } @@ -2172,7 +2172,7 @@ if ($action == 'create' && $user->rights->commande->creer) { // Reopen a closed order if ($object->statut == 3 && $user->rights->commande->creer) { - print '
' . $langs->trans('ReOpen') . '
'; + print '
' . $langs->trans('ReOpen') . '
'; } // Create contract @@ -2191,29 +2191,29 @@ if ($action == 'create' && $user->rights->commande->creer) { print '
' . $langs->trans("CreateBill") . '
'; } if ($user->rights->commande->creer && $object->statut > 2 && empty($conf->global->WORKFLOW_DISABLE_CLASSIFY_BILLED_FROM_ORDER) && empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT)) { - print '
' . $langs->trans("ClassifyBilled") . '
'; + print '
' . $langs->trans("ClassifyBilled") . '
'; } } // Set to shipped if (($object->statut == 1 || $object->statut == 2) && $user->rights->commande->cloturer) { - print '
' . $langs->trans('ClassifyShipped') . '
'; + print '
' . $langs->trans('ClassifyShipped') . '
'; } // Clone if ($user->rights->commande->creer) { - print '
' . $langs->trans("ToClone") . '
'; + print '
' . $langs->trans("ToClone") . '
'; } // Cancel order if ($object->statut == 1 && $user->rights->commande->annuler) { - print '
' . $langs->trans('Cancel') . '
'; + print '
' . $langs->trans('Cancel') . '
'; } // Delete order if ($user->rights->commande->supprimer) { if ($numshipping == 0) { - print '
' . $langs->trans('Delete') . '
'; + print '
' . $langs->trans('Delete') . '
'; } else { print '
' . $langs->trans("Delete") . '
'; } @@ -2236,7 +2236,7 @@ if ($action == 'create' && $user->rights->commande->creer) { $file = $conf->commande->dir_output . '/' . $comref . '/' . $comref . '.pdf'; $relativepath = $comref . '/' . $comref . '.pdf'; $filedir = $conf->commande->dir_output . '/' . $comref; - $urlsource = $_SERVER ["PHP_SELF"] . "?id=" . $object->id; + $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id; $genallowed = $user->rights->commande->creer; $delallowed = $user->rights->commande->supprimer; $somethingshown = $formfile->show_documents('commande', $comref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang); @@ -2273,8 +2273,8 @@ if ($action == 'create' && $user->rights->commande->creer) { // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST ['lang_id'])) - $newlang = $_REQUEST ['lang_id']; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) + $newlang = $_REQUEST['lang_id']; if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->client->default_lang; if (! empty($newlang)) { @@ -2346,7 +2346,7 @@ if ($action == 'create' && $user->rights->commande->creer) { $formmail->param ['action'] = 'send'; $formmail->param ['models'] = 'order_send'; $formmail->param ['orderid'] = $object->id; - $formmail->param ['returnurl'] = $_SERVER ["PHP_SELF"] . '?id=' . $object->id; + $formmail->param ['returnurl'] = $_SERVER["PHP_SELF"] . '?id=' . $object->id; // Init list of files if (GETPOST("mode") == 'init') { diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 37fc2d11ffa..7187c5771d9 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -115,13 +115,13 @@ include DOL_DOCUMENT_ROOT . '/core/actions_setnotes.inc.php'; // Must be include // Action clone object if ($action == 'confirm_clone' && $confirm == 'yes' && $user->rights->facture->creer) { - if (1 == 0 && empty($_REQUEST ["clone_content"]) && empty($_REQUEST ["clone_receivers"])) { + if (1 == 0 && empty($_REQUEST["clone_content"]) && empty($_REQUEST["clone_receivers"])) { $mesgs [] = '
' . $langs->trans("NoCloneOptionsSpecified") . '
'; } else { if ($object->fetch($id) > 0) { $result = $object->createFromClone($socid); if ($result > 0) { - header("Location: " . $_SERVER ['PHP_SELF'] . '?facid=' . $result); + header("Location: " . $_SERVER['PHP_SELF'] . '?facid=' . $result); exit(); } else { $mesgs [] = $object->error; @@ -137,7 +137,7 @@ else if ($action == 'reopen' && $user->rights->facture->creer) { if ($object->statut == 2 || ($object->statut == 3 && $object->close_code != 'replaced')) { $result = $object->set_unpaid($user); if ($result > 0) { - header('Location: ' . $_SERVER ["PHP_SELF"] . '?facid=' . $id); + header('Location: ' . $_SERVER["PHP_SELF"] . '?facid=' . $id); exit(); } else { $mesgs [] = '
' . $object->error . '
'; @@ -178,8 +178,8 @@ else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights-> // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST ['lang_id'])) - $newlang = $_REQUEST ['lang_id']; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) + $newlang = $_REQUEST['lang_id']; if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->client->default_lang; if (! empty($newlang)) { @@ -191,7 +191,7 @@ else if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights-> $result = facture_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } if ($result >= 0) { - header('Location: ' . $_SERVER ["PHP_SELF"] . '?facid=' . $id); + header('Location: ' . $_SERVER["PHP_SELF"] . '?facid=' . $id); exit(); } } else { @@ -231,7 +231,7 @@ else if ($action == 'set_thirdparty' && $user->rights->facture->creer) { $object->fetch($id); $object->setValueFrom('fk_soc', $socid); - header('Location: ' . $_SERVER ["PHP_SELF"] . '?facid=' . $id); + header('Location: ' . $_SERVER["PHP_SELF"] . '?facid=' . $id); exit(); } @@ -384,8 +384,8 @@ else if ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->factu // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST ['lang_id'])) - $newlang = $_REQUEST ['lang_id']; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) + $newlang = $_REQUEST['lang_id']; if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->client->default_lang; if (! empty($newlang)) { @@ -458,8 +458,8 @@ else if ($action == 'confirm_modif' && ((empty($conf->global->MAIN_USE_ADVANCED_ // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST ['lang_id'])) - $newlang = $_REQUEST ['lang_id']; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) + $newlang = $_REQUEST['lang_id']; if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->client->default_lang; if (! empty($newlang)) { @@ -1023,7 +1023,7 @@ else if ($action == 'add' && $user->rights->facture->creer) if ($id > 0 && ! $error) { $db->commit(); - header('Location: ' . $_SERVER ["PHP_SELF"] . '?facid=' . $id); + header('Location: ' . $_SERVER["PHP_SELF"] . '?facid=' . $id); exit(); } else @@ -1403,7 +1403,7 @@ elseif ($action == 'updateligne' && $user->rights->facture->creer && ! GETPOST(' } else if ($action == 'updateligne' && $user->rights->facture->creer && $_POST['cancel'] == $langs->trans('Cancel')) { - header('Location: ' . $_SERVER ["PHP_SELF"] . '?facid=' . $id); // Pour reaffichage de la fiche en cours d'edition + header('Location: ' . $_SERVER["PHP_SELF"] . '?facid=' . $id); // Pour reaffichage de la fiche en cours d'edition exit(); } @@ -1416,8 +1416,8 @@ else if ($action == 'up' && $user->rights->facture->creer) { // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST ['lang_id'])) - $newlang = $_REQUEST ['lang_id']; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) + $newlang = $_REQUEST['lang_id']; if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->client->default_lang; if (! empty($newlang)) { @@ -1427,7 +1427,7 @@ else if ($action == 'up' && $user->rights->facture->creer) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) facture_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); - header('Location: ' . $_SERVER ["PHP_SELF"] . '?facid=' . $object->id . '#' . $_GET ['rowid']); + header('Location: ' . $_SERVER["PHP_SELF"] . '?facid=' . $object->id . '#' . $_GET ['rowid']); exit(); } // Modify line position (down) else if ($action == 'down' && $user->rights->facture->creer) { @@ -1438,8 +1438,8 @@ else if ($action == 'down' && $user->rights->facture->creer) { // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST ['lang_id'])) - $newlang = $_REQUEST ['lang_id']; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) + $newlang = $_REQUEST['lang_id']; if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->client->default_lang; if (! empty($newlang)) { @@ -1449,7 +1449,7 @@ else if ($action == 'down' && $user->rights->facture->creer) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) facture_pdf_create($db, $object, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); - header('Location: ' . $_SERVER ["PHP_SELF"] . '?facid=' . $object->id . '#' . $_GET ['rowid']); + header('Location: ' . $_SERVER["PHP_SELF"] . '?facid=' . $object->id . '#' . $_GET ['rowid']); exit(); } @@ -1608,7 +1608,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO // This avoid sending mail twice if going out and then back to page $mesg = $langs->trans('MailSuccessfulySent', $mailfile->getValidAddress($from, 2), $mailfile->getValidAddress($sendto, 2)); setEventMessage($mesg); - header('Location: ' . $_SERVER ["PHP_SELF"] . '?facid=' . $object->id); + header('Location: ' . $_SERVER["PHP_SELF"] . '?facid=' . $object->id); exit(); } } else { @@ -1715,7 +1715,7 @@ if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->facture- } if ($result >= 0) { - header("Location: " . $_SERVER ['PHP_SELF'] . "?id=" . $object->id); + header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id); exit(); } else { if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { @@ -1742,7 +1742,7 @@ if (! empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->facture- $result = $object->delete_contact($lineid); if ($result >= 0) { - header("Location: " . $_SERVER ['PHP_SELF'] . "?id=" . $object->id); + header("Location: " . $_SERVER['PHP_SELF'] . "?id=" . $object->id); exit(); } else { dol_print_error($db); @@ -1889,7 +1889,7 @@ if ($action == 'create') print ajax_combobox('fac_avoir'); } - print ''; + print ''; print ''; print ''; if ($soc->id > 0) print '' . "\n"; @@ -2160,17 +2160,17 @@ if ($action == 'create') // Discounts for third party print '' . $langs->trans('Discounts') . ''; if ($soc->remise_percent) - print $langs->trans("CompanyHasRelativeDiscount", '' . $soc->remise_percent . ''); + print $langs->trans("CompanyHasRelativeDiscount", '' . $soc->remise_percent . ''); else print $langs->trans("CompanyHasNoRelativeDiscount"); - print ' (' . $langs->trans("EditRelativeDiscount") . ')'; + print ' (' . $langs->trans("EditRelativeDiscount") . ')'; print '. '; print '
'; if ($absolute_discount) - print $langs->trans("CompanyHasAbsoluteDiscount", '' . price($absolute_discount) . '', $langs->trans("Currency" . $conf->currency)); + print $langs->trans("CompanyHasAbsoluteDiscount", '' . price($absolute_discount) . '', $langs->trans("Currency" . $conf->currency)); else print $langs->trans("CompanyHasNoAbsoluteDiscount"); - print ' (' . $langs->trans("EditGlobalDiscounts") . ')'; + print ' (' . $langs->trans("EditGlobalDiscounts") . ')'; print '.'; print ''; } @@ -2426,7 +2426,7 @@ if ($action == 'create') // Confirmation de la conversion de l'avoir en reduc if ($action == 'converttoreduc') { $text = $langs->trans('ConfirmConvertToReduc'); - $formconfirm = $form->formconfirm($_SERVER ['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('ConvertToReduc'), $text, 'confirm_converttoreduc', '', "yes", 2); + $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('ConvertToReduc'), $text, 'confirm_converttoreduc', '', "yes", 2); } // Confirmation to delete invoice @@ -2453,9 +2453,9 @@ if ($action == 'create') // array('type' => 'checkbox', 'name' => 'update_prices', 'label' => $langs->trans("PuttingPricesUpToDate"), 'value' // => 1), array('type' => 'other','name' => 'idwarehouse','label' => $label,'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse')?GETPOST('idwarehouse'):'ifone', 'idwarehouse', '', 1, 0, 0, $langs->trans("NoStockAction")))); - $formconfirm = $form->formconfirm($_SERVER ['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('DeleteBill'), $text, 'confirm_delete', $formquestion, "yes", 1); + $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('DeleteBill'), $text, 'confirm_delete', $formquestion, "yes", 1); } else { - $formconfirm = $form->formconfirm($_SERVER ['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('DeleteBill'), $text, 'confirm_delete', '', '', 1); + $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('DeleteBill'), $text, 'confirm_delete', '', '', 1); } } @@ -2517,7 +2517,7 @@ if ($action == 'create') { $text .= '
' . img_warning() . ' ' . $langs->trans("ErrorInvoiceOfThisTypeMustBePositive"); } - $formconfirm = $form->formconfirm($_SERVER ["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, (($object->type != Facture::TYPE_CREDIT_NOTE && $object->total_ttc < 0) ? "no" : "yes"), ($conf->notification->enabled ? 0 : 2)); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, (($object->type != Facture::TYPE_CREDIT_NOTE && $object->total_ttc < 0) ? "no" : "yes"), ($conf->notification->enabled ? 0 : 2)); } // Confirm back to draft status @@ -2554,12 +2554,12 @@ if ($action == 'create') array('type' => 'other','name' => 'idwarehouse','label' => $label,'value' => $value)); } - $formconfirm = $form->formconfirm($_SERVER ["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('UnvalidateBill'), $text, 'confirm_modif', $formquestion, "yes", 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('UnvalidateBill'), $text, 'confirm_modif', $formquestion, "yes", 1); } // Confirmation du classement paye if ($action == 'paid' && $resteapayer <= 0) { - $formconfirm = $form->formconfirm($_SERVER ["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', "yes", 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', "yes", 1); } if ($action == 'paid' && $resteapayer > 0) { // Code @@ -2588,7 +2588,7 @@ if ($action == 'create') // Cree un tableau formulaire $formquestion = array('text' => $langs->trans("ConfirmClassifyPaidPartiallyQuestion"),array('type' => 'radio','name' => 'close_code','label' => $langs->trans("Reason"),'values' => $arrayreasons),array('type' => 'text','name' => 'close_note','label' => $langs->trans("Comment"),'value' => '','size' => '100')); // Paiement incomplet. On demande si motif = escompte ou autre - $formconfirm = $form->formconfirm($_SERVER ["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidPartially', $object->ref), 'confirm_paid_partially', $formquestion, "yes"); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidPartially', $object->ref), 'confirm_paid_partially', $formquestion, "yes"); } // Confirmation du classement abandonne @@ -2619,13 +2619,13 @@ if ($action == 'create') // Cree un tableau formulaire $formquestion = array('text' => $langs->trans("ConfirmCancelBillQuestion"),array('type' => 'radio','name' => 'close_code','label' => $langs->trans("Reason"),'values' => $arrayreasons),array('type' => 'text','name' => 'close_note','label' => $langs->trans("Comment"),'value' => '','size' => '100')); - $formconfirm = $form->formconfirm($_SERVER ['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('CancelBill'), $langs->trans('ConfirmCancelBill', $object->ref), 'confirm_canceled', $formquestion, "yes"); + $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $langs->trans('CancelBill'), $langs->trans('ConfirmCancelBill', $object->ref), 'confirm_canceled', $formquestion, "yes"); } } // Confirmation de la suppression d'une ligne produit if ($action == 'ask_deleteline') { - $formconfirm = $form->formconfirm($_SERVER ["PHP_SELF"] . '?facid=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 'no', 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id . '&lineid=' . $lineid, $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_deleteline', '', 'no', 1); } // Clone confirmation @@ -2636,7 +2636,7 @@ if ($action == 'create') // array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1) array('type' => 'other','name' => 'socid','label' => $langs->trans("SelectThirdParty"),'value' => $form->select_company('', 'socid', '(s.client=1 OR s.client=2 OR s.client=3)', 1))); // Paiement incomplet. On demande si motif = escompte ou autre - $formconfirm = $form->formconfirm($_SERVER ["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('CloneInvoice'), $langs->trans('ConfirmCloneInvoice', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?facid=' . $object->id, $langs->trans('CloneInvoice'), $langs->trans('ConfirmCloneInvoice', $object->ref), 'confirm_clone', $formquestion, 'yes', 1); } if (! $formconfirm) { @@ -2675,12 +2675,12 @@ if ($action == 'create') print $langs->trans('RefCustomer'); print ''; if ($action != 'refclient' && ! empty($object->brouillon)) - print '' . img_edit($langs->trans('Modify')) . ''; + print '' . img_edit($langs->trans('Modify')) . ''; print ''; print ''; print ''; if ($user->rights->facture->creer && $action == 'refclient') { - print ''; + print ''; print ''; print ''; print ''; @@ -2697,11 +2697,11 @@ if ($action == 'create') print '' . $langs->trans('Company') . ''; print ''; if (! empty($conf->global->FACTURE_CHANGE_THIRDPARTY) && $action != 'editthirdparty' && $object->brouillon && $user->rights->facture->creer) - print 'id . '">' . img_edit($langs->trans('SetLinkToThirdParty'), 1) . ''; + print 'id . '">' . img_edit($langs->trans('SetLinkToThirdParty'), 1) . ''; print ''; print ''; if ($action == 'editthirdparty') { - $form->form_thirdparty($_SERVER ['PHP_SELF'] . '?facid=' . $object->id, $object->socid, 'socid'); + $form->form_thirdparty($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->socid, 'socid'); } else { print '  ' . $soc->getNomUrl(1, 'compta'); print '   '; @@ -2756,9 +2756,9 @@ if ($action == 'create') print ''; // Relative and absolute discounts - $addrelativediscount = '' . $langs->trans("EditRelativeDiscounts") . ''; - $addabsolutediscount = '' . $langs->trans("EditGlobalDiscounts") . ''; - $addcreditnote = '' . $langs->trans("AddCreditNote") . ''; + $addrelativediscount = '' . $langs->trans("EditRelativeDiscounts") . ''; + $addabsolutediscount = '' . $langs->trans("EditGlobalDiscounts") . ''; + $addcreditnote = '' . $langs->trans("AddCreditNote") . ''; print '' . $langs->trans('Discounts'); print ''; @@ -2787,7 +2787,7 @@ if ($action == 'create') } else { // Remise dispo de type remise fixe (not credit note) print '
'; - $form->form_remise_dispo($_SERVER ["PHP_SELF"] . '?facid=' . $object->id, GETPOST('discountid'), 'remise_id', $soc->id, $absolute_discount, $filterabsolutediscount, $resteapayer, ' (' . $addabsolutediscount . ')'); + $form->form_remise_dispo($_SERVER["PHP_SELF"] . '?facid=' . $object->id, GETPOST('discountid'), 'remise_id', $soc->id, $absolute_discount, $filterabsolutediscount, $resteapayer, ' (' . $addabsolutediscount . ')'); } } else { if ($absolute_creditnote > 0) // If not, link will be added later @@ -2814,7 +2814,7 @@ if ($action == 'create') print '
'; // $form->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, 0, 'remise_id_for_payment', $soc->id, $absolute_creditnote, // $filtercreditnote, $resteapayer); - $form->form_remise_dispo($_SERVER ["PHP_SELF"] . '?facid=' . $object->id, 0, 'remise_id_for_payment', $soc->id, $absolute_creditnote, $filtercreditnote, 0); // We + $form->form_remise_dispo($_SERVER["PHP_SELF"] . '?facid=' . $object->id, 0, 'remise_id_for_payment', $soc->id, $absolute_creditnote, $filtercreditnote, 0); // We // must // allow // credit @@ -2848,13 +2848,13 @@ if ($action == 'create') print $langs->trans('Date'); print ''; if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editinvoicedate' && ! empty($object->brouillon) && $user->rights->facture->creer) - print 'id . '">' . img_edit($langs->trans('SetDate'), 1) . ''; + print 'id . '">' . img_edit($langs->trans('SetDate'), 1) . ''; print ''; print ''; if ($object->type != Facture::TYPE_CREDIT_NOTE) { if ($action == 'editinvoicedate') { - $form->form_date($_SERVER ['PHP_SELF'] . '?facid=' . $object->id, $object->date, 'invoicedate'); + $form->form_date($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->date, 'invoicedate'); } else { print dol_print_date($object->date, 'daytext'); } @@ -2984,7 +2984,7 @@ if ($action == 'create') print ' :'; print '' . price($obj->amount_ttc) . ''; print ''; - print 'rowid . '">' . img_delete() . ''; + print 'rowid . '">' . img_delete() . ''; print ''; $i ++; if ($invoice->type == Facture::TYPE_CREDIT_NOTE) @@ -3082,14 +3082,14 @@ if ($action == 'create') print $langs->trans('PaymentConditionsShort'); print ''; if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editconditions' && ! empty($object->brouillon) && $user->rights->facture->creer) - print 'id . '">' . img_edit($langs->trans('SetConditions'), 1) . ''; + print 'id . '">' . img_edit($langs->trans('SetConditions'), 1) . ''; print ''; print ''; if ($object->type != Facture::TYPE_CREDIT_NOTE) { if ($action == 'editconditions') { - $form->form_conditions_reglement($_SERVER ['PHP_SELF'] . '?facid=' . $object->id, $object->cond_reglement_id, 'cond_reglement_id'); + $form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->cond_reglement_id, 'cond_reglement_id'); } else { - $form->form_conditions_reglement($_SERVER ['PHP_SELF'] . '?facid=' . $object->id, $object->cond_reglement_id, 'none'); + $form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->cond_reglement_id, 'none'); } } else { print ' '; @@ -3102,12 +3102,12 @@ if ($action == 'create') print $langs->trans('DateMaxPayment'); print ''; if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editpaymentterm' && ! empty($object->brouillon) && $user->rights->facture->creer) - print 'id . '">' . img_edit($langs->trans('SetDate'), 1) . ''; + print 'id . '">' . img_edit($langs->trans('SetDate'), 1) . ''; print ''; print ''; if ($object->type != Facture::TYPE_CREDIT_NOTE) { if ($action == 'editpaymentterm') { - $form->form_date($_SERVER ['PHP_SELF'] . '?facid=' . $object->id, $object->date_lim_reglement, 'paymentterm'); + $form->form_date($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->date_lim_reglement, 'paymentterm'); } else { print dol_print_date($object->date_lim_reglement, 'daytext'); if ($object->date_lim_reglement < ($now - $conf->facture->client->warning_delay) && ! $object->paye && $object->statut == 1 && ! isset($object->am)) @@ -3124,13 +3124,13 @@ if ($action == 'create') print $langs->trans('PaymentMode'); print ''; if ($action != 'editmode' && ! empty($object->brouillon) && $user->rights->facture->creer) - print 'id . '">' . img_edit($langs->trans('SetMode'), 1) . ''; + print 'id . '">' . img_edit($langs->trans('SetMode'), 1) . ''; print ''; print ''; if ($action == 'editmode') { - $form->form_modes_reglement($_SERVER ['PHP_SELF'] . '?facid=' . $object->id, $object->mode_reglement_id, 'mode_reglement_id'); + $form->form_modes_reglement($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->mode_reglement_id, 'mode_reglement_id'); } else { - $form->form_modes_reglement($_SERVER ['PHP_SELF'] . '?facid=' . $object->id, $object->mode_reglement_id, 'none'); + $form->form_modes_reglement($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->mode_reglement_id, 'none'); } print ''; @@ -3160,11 +3160,11 @@ if ($action == 'create') print $langs->trans('RevenueStamp'); print ''; if ($action != 'editrevenuestamp' && ! empty($object->brouillon) && $user->rights->facture->creer) - print 'id . '">' . img_edit($langs->trans('SetRevenuStamp'), 1) . ''; + print 'id . '">' . img_edit($langs->trans('SetRevenuStamp'), 1) . ''; print ''; print ''; if ($action == 'editrevenuestamp') { - print ''; + print ''; print ''; print ''; print $formother->select_revenue_stamp(GETPOST('revenuestamp'), 'revenuestamp', $mysoc->country_code); @@ -3194,7 +3194,7 @@ if ($action == 'create') print $langs->trans('Project'); print ''; if ($action != 'classify') { - print 'id . '">'; + print 'id . '">'; print img_edit($langs->trans('SetProject'), 1); print ''; } @@ -3202,9 +3202,9 @@ if ($action == 'create') print ''; if ($action == 'classify') { - $form->form_project($_SERVER ['PHP_SELF'] . '?facid=' . $object->id, $object->socid, $object->fk_project, 'projectid'); + $form->form_project($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->socid, $object->fk_project, 'projectid'); } else { - $form->form_project($_SERVER ['PHP_SELF'] . '?facid=' . $object->id, $object->socid, $object->fk_project, 'none'); + $form->form_project($_SERVER['PHP_SELF'] . '?facid=' . $object->id, $object->socid, $object->fk_project, 'none'); } print ''; print ''; @@ -3236,7 +3236,7 @@ if ($action == 'create') } if ($action == 'edit_extras' && $user->rights->facture->creer && GETPOST('attribute') == $key) { - print ''; + print ''; print ''; print ''; print ''; @@ -3249,7 +3249,7 @@ if ($action == 'create') } else { print $extrafields->showOutputField($key, $value); if ($object->statut == 0 && $user->rights->facture->creer) - print '' . img_picto('', 'edit') . ' ' . $langs->trans('Modify') . ''; + print '' . img_picto('', 'edit') . ' ' . $langs->trans('Modify') . ''; } print '' . "\n"; } @@ -3273,7 +3273,7 @@ if ($action == 'create') // Lines $result = $object->getLinesArray(); - print ' + print ' @@ -3330,7 +3330,7 @@ if ($action == 'create') if ($resteapayer == $object->total_ttc && $object->paye == 0 && $ventilExportCompta == 0) { if (! $objectidnext) { if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->facture->valider) || $user->rights->facture->invoice_advance->unvalidate) { - print '
' . $langs->trans('Modify') . '
'; + print '
' . $langs->trans('Modify') . '
'; } else { print '
' . $langs->trans('Modify') . '
'; } @@ -3349,7 +3349,7 @@ if ($action == 'create') { if (! $objectidnext && $object->close_code != 'replaced') // Not replaced by another invoice { - print '
' . $langs->trans('ReOpen') . '
'; + print '
' . $langs->trans('ReOpen') . '
'; } else { print '
' . $langs->trans('ReOpen') . '
'; } @@ -3358,7 +3358,7 @@ if ($action == 'create') // Validate if ($object->statut == 0 && count($object->lines) > 0 && ((($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_REPLACEMENT || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA) && (! empty($conf->global->FACTURE_ENABLE_NEGATIVE) || $object->total_ttc >= 0)) || ($object->type == Facture::TYPE_CREDIT_NOTE && $object->total_ttc <= 0))) { if ($user->rights->facture->valider) { - print '
' . $langs->trans('Validate') . '
'; + print '
' . $langs->trans('Validate') . '
'; } } @@ -3368,7 +3368,7 @@ if ($action == 'create') print '
' . $langs->trans('SendByMail') . '
'; } else { if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->facture->invoice_advance->send) { - print '
' . $langs->trans('SendByMail') . '
'; + print '
' . $langs->trans('SendByMail') . '
'; } else print '
' . $langs->trans('SendByMail') . '
'; } @@ -3381,7 +3381,7 @@ if ($action == 'create') print '
' . $langs->trans('SendRemindByMail') . '
'; } else { if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->facture->invoice_advance->send) { - print '
' . $langs->trans('SendRemindByMail') . '
'; + print '
' . $langs->trans('SendRemindByMail') . '
'; } else print '
' . $langs->trans('SendRemindByMail') . '
'; } @@ -3418,7 +3418,7 @@ if ($action == 'create') // For credit note if ($object->type == Facture::TYPE_CREDIT_NOTE && $object->statut == 1 && $object->paye == 0 && $user->rights->facture->creer && $object->getSommePaiement() == 0) { - print '
' . $langs->trans('ConvertToReduc') . '
'; + print '
' . $langs->trans('ConvertToReduc') . '
'; } // For deposit invoice if ($object->type == Facture::TYPE_DEPOSIT && $object->paye == 1 && $resteapayer == 0 && $user->rights->facture->creer && empty($discount->id)) @@ -3441,14 +3441,14 @@ if ($action == 'create') if ($totalpaye > 0 || $totalcreditnotes > 0) { // If one payment or one credit note was linked to this invoice - print '
' . $langs->trans('ClassifyPaidPartially') . '
'; + print '
' . $langs->trans('ClassifyPaidPartially') . '
'; } else { if ($objectidnext) { print '
' . $langs->trans('ClassifyCanceled') . '
'; } else { - print '
' . $langs->trans('ClassifyCanceled') . '
'; + print '
' . $langs->trans('ClassifyCanceled') . '
'; } } } @@ -3456,7 +3456,7 @@ if ($action == 'create') // Clone if (($object->type == Facture::TYPE_STANDARD || $object->type == Facture::TYPE_DEPOSIT || $object->type == Facture::TYPE_PROFORMA) && $user->rights->facture->creer) { - print '
' . $langs->trans("ToClone") . '
'; + print '
' . $langs->trans("ToClone") . '
'; } // Clone as predefined @@ -3478,7 +3478,7 @@ if ($action == 'create') } elseif ($object->getSommePaiement()) { print '
' . $langs->trans('Delete') . '
'; } else { - print '
' . $langs->trans('Delete') . '
'; + print '
' . $langs->trans('Delete') . '
'; } } else { print '
' . $langs->trans('Delete') . '
'; @@ -3497,7 +3497,7 @@ if ($action == 'create') // Documents generes $filename = dol_sanitizeFileName($object->ref); $filedir = $conf->facture->dir_output . '/' . dol_sanitizeFileName($object->ref); - $urlsource = $_SERVER ['PHP_SELF'] . '?facid=' . $object->id; + $urlsource = $_SERVER['PHP_SELF'] . '?facid=' . $object->id; $genallowed = $user->rights->facture->creer; $delallowed = $user->rights->facture->supprimer; @@ -3602,8 +3602,8 @@ if ($action == 'create') // Define output language $outputlangs = $langs; $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST ['lang_id'])) - $newlang = $_REQUEST ['lang_id']; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && ! empty($_REQUEST['lang_id'])) + $newlang = $_REQUEST['lang_id']; if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->client->default_lang; if (! empty($newlang)) { @@ -3680,7 +3680,7 @@ if ($action == 'create') $formmail->param ['action'] = $action; $formmail->param ['models'] = $modelmail; $formmail->param ['facid'] = $object->id; - $formmail->param ['returnurl'] = $_SERVER ["PHP_SELF"] . '?id=' . $object->id; + $formmail->param ['returnurl'] = $_SERVER["PHP_SELF"] . '?id=' . $object->id; // Init list of files if (GETPOST("mode") == 'init') { diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index f9da29a7672..d2d380ad45c 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -48,7 +48,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh global $conf, $user, $langs, $db; // Filters - print ''; + print ''; print ''; print ''; print ''; diff --git a/htdocs/product/price.php b/htdocs/product/price.php index b202899f082..9268a3a59a4 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -388,7 +388,7 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES)) { print ''; foreach ($object->prices_by_qty_list [$i] as $ii => $prices) { if ($action == 'edit_price_by_qty' && $rowid == $prices ['rowid'] && ($user->rights->produit->creer || $user->rights->service->creer)) { - print ''; + print ''; print ''; print ''; print ''; @@ -408,9 +408,9 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES)) { print '' . price($prices ['remise_percent']) . ' %'; print ''; if (($user->rights->produit->creer || $user->rights->service->creer)) { - print ''; + print ''; print img_edit() . ''; - print ''; + print ''; print img_delete() . ''; } else { print ' '; @@ -420,7 +420,7 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES)) { } } if ($action != 'edit_price_by_qty' && ($user->rights->produit->creer || $user->rights->service->creer)) { - print ''; + print ''; print ''; print ''; print ''; @@ -437,7 +437,7 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES)) { print ''; } else { print $langs->trans("No"); - print ' (' . $langs->trans("Activate") . ')'; + print ' (' . $langs->trans("Activate") . ')'; } print ''; } @@ -469,7 +469,7 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES)) { if ($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY) { print '' . $langs->trans("PriceByQuantity"); if ($object->prices_by_qty [0] == 0) { - print ' ' . $langs->trans("Activate"); + print ' ' . $langs->trans("Activate"); } print ''; @@ -484,7 +484,7 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES)) { print ''; foreach ($object->prices_by_qty_list [0] as $ii => $prices) { if ($action == 'edit_price_by_qty' && $rowid == $prices ['rowid'] && ($user->rights->produit->creer || $user->rights->service->creer)) { - print ''; + print ''; print ''; print ''; print ''; @@ -504,9 +504,9 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES)) { print '' . price($prices ['remise_percent']) . ' %'; print ''; if (($user->rights->produit->creer || $user->rights->service->creer)) { - print ''; + print ''; print img_edit() . ''; - print ''; + print ''; print img_delete() . ''; } else { print ' '; @@ -516,7 +516,7 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES)) { } } if ($action != 'edit_price_by_qty') { - print ''; + print ''; print ''; print ''; print ''; @@ -561,7 +561,7 @@ if (! $action || $action == 'delete') { print "\n" . '
' . "\n"; if ($user->rights->produit->creer || $user->rights->service->creer) { - print ''; + print ''; } print "\n
\n"; @@ -574,7 +574,7 @@ if ($action == 'edit_price' && ($user->rights->produit->creer || $user->rights-> print_fiche_titre($langs->trans("NewPrice"), '', ''); if (empty($conf->global->PRODUIT_MULTIPRICES)) { - print ''; + print ''; print ''; print ''; print ''; @@ -625,7 +625,7 @@ if ($action == 'edit_price' && ($user->rights->produit->creer || $user->rights-> print '
'; } else { for($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i ++) { - print '
'; + print ''; print ''; print ''; print ''; @@ -761,7 +761,7 @@ if ($result) { if ($user->rights->produit->supprimer) { print ''; if ($i > 0) { - print 'id . '&lineid=' . $objp->rowid . '">'; + print 'id . '&lineid=' . $objp->rowid . '">'; print img_delete(); print ''; } else @@ -812,7 +812,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print_fiche_titre($langs->trans('PriceByCustomer')); - print ''; + print ''; print ''; print ''; print ''; @@ -887,7 +887,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { setEventMessage($prodcustprice->error, 'errors'); } - print ''; + print ''; print ''; print ''; print ''; @@ -972,7 +972,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { if (count($prodcustprice->lines) > 0) { - print ''; + print ''; print ''; print ''; @@ -1022,7 +1022,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { } print "\n" . '
' . "\n"; - print ''; + print ''; print "\n

\n"; } else { @@ -1045,7 +1045,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { if (count($prodcustprice->lines) > 0) { - print ''; + print ''; print ''; print '
'; @@ -1102,13 +1102,13 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { // Action if ($user->rights->produit->supprimer || $user->rights->service->supprimer) { print ''; @@ -1132,7 +1132,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print "\n" . '
' . "\n"; if ($user->rights->produit->creer || $user->rights->service->creer) { - print ''; + print ''; } print "\n

\n"; } diff --git a/htdocs/societe/price.php b/htdocs/societe/price.php index ae71537e648..0765a6adb31 100644 --- a/htdocs/societe/price.php +++ b/htdocs/societe/price.php @@ -232,7 +232,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print_fiche_titre($langs->trans('PriceByCustomer')); - print ''; + print ''; print ''; print ''; print ''; @@ -307,7 +307,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { setEventMessage($prodcustprice->error, 'errors'); } - print ''; + print ''; print ''; print ''; print ''; @@ -394,7 +394,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { if (count($prodcustprice->lines) > 0) { - print ''; + print ''; print ''; print '
'; - print 'id . '&lineid=' . $line->id . '">'; + print 'id . '&lineid=' . $line->id . '">'; print img_delete(); print ''; - print 'id . '&lineid=' . $line->id . '">'; + print 'id . '&lineid=' . $line->id . '">'; print img_edit(); print ''; - print 'id . '&socid=' . $line->fk_soc . '">'; + print 'id . '&socid=' . $line->fk_soc . '">'; print img_info(); print ''; print '
'; @@ -443,7 +443,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { } print "\n" . '
' . "\n"; - print ''; + print ''; print "\n

\n"; } else { @@ -466,7 +466,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { if (count($prodcustprice->lines) > 0) { - print ''; + print ''; print ''; print '
'; @@ -523,13 +523,13 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { // Action if ($user->rights->produit->creer || $user->rights->service->creer) { print ''; @@ -553,7 +553,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { print "\n" . '
' . "\n"; if ($user->rights->produit->creer || $user->rights->service->creer) { - print ''; + print ''; } print "\n

\n"; }
'; - print 'id . '&lineid=' . $line->id . '">'; + print 'id . '&lineid=' . $line->id . '">'; print img_delete(); print ''; - print 'id . '&lineid=' . $line->id . '">'; + print 'id . '&lineid=' . $line->id . '">'; print img_edit(); print ''; - print 'id . '&prodid=' . $line->fk_product . '">'; + print 'id . '&prodid=' . $line->fk_product . '">'; print img_info(); print ''; print '