diff --git a/ChangeLog b/ChangeLog index 2996e26f862..dd2fc646f7f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -152,6 +152,52 @@ Dolibarr better: - The trigger that activate or close a contract line is run on a contract line, not on contract. +***** ChangeLog for 4.0.3 to 4.0.2 ***** +FIX: #5853 $conf->global->$calc==0 || $conf->global->$calc==1 +FIX: #5958 no discount on supplier command made by replenishment +FIX: #5966 Bug: getNomUrl tooltips show Proposal info even if user has no rights to read them +FIX: #5972 #5734 +FIX: #6007 +FIX: #6010 +FIX: #6029 +FIX: #6043 - Payment mode not visible on supplier invoice list +FIX: #6051 +FIX: #6062 +FIX: #6088 +FIX: A draft can be deleted by a user with create permission. +FIX: bad permission to see contract on home page +FIX: bad permission to see contract statistics +FIX: Bcc must not appears to recipient when using SMTPs lib +FIX: Consistent description for add or edit product +FIX: delete contract extrafields on contract deletion +FIX: Deposits and credit notes weren't added in the received and pending columns +FIX: export extrafields must not include separe type +FIX: Export of opportunity status must be code, not id. +FIX: False positive on services not activated +FIX: Filter was wrong or lost during navigation +FIX: HT and TTC price should always be displayed together +FIX: if a supplier price reference is changed after creating an order, we can't clone order. +FIX: in export. Error when using a separate extrafields. +FIX: Introduce hidden option MAIL_PREFIX_FOR_EMAIL_ID to solve pb of tracking email. +FIX: javascript error when using on mobile/smartphone +FIX: javascript xss injection and a translation +FIX: Label of project is in field title not label. +FIX: List of people able to validate an expense report was not complete. +FIX: Missing field +FIX: Module gravatar was not triggered on thirdparty and contact card +FIX: Must use external link into a forged email content. +FIX: Pb in management of date end of projects +FIX: Regression when deleting product +FIX: rendering of output of estimated amount on project overview page. +FIX: Sanitize title of ajax_dialog +FIX: Security to restrict email sending was not efficient +FIX: Setting supplier as client when accept a supplier proposal +FIX: Some statistics not compatible with multicompany module. +FIX: the time spent on project was not visible in its overwiew +FIX: Update intervention lline crash with PgSQL +FIX: wrong test on dict.php +FIX: wrong var name + ***** ChangeLog for 4.0.2 compared to 4.0.1 ***** FIX: #5340 FIX: #5779 diff --git a/build/generate_filelist_xml.php b/build/generate_filelist_xml.php old mode 100644 new mode 100755 index 1bc0e2b6620..07e87dd86bb --- a/build/generate_filelist_xml.php +++ b/build/generate_filelist_xml.php @@ -65,6 +65,8 @@ fputs($fp, ''."\n"); fputs($fp, ''."\n"); +$checksumconcat=array(); + $dir_iterator1 = new RecursiveDirectoryIterator(dirname(__FILE__).'/../htdocs/'); $iterator1 = new RecursiveIteratorIterator($dir_iterator1); // need to ignore document custom etc @@ -81,12 +83,22 @@ foreach ($files as $file) { $needtoclose=1; } if (filetype($file)=="file") { - fputs($fp, ''.md5_file($file).''."\n"); + $md5=md5_file($file); + $checksumconcat[]=$md5; + fputs($fp, ''.$md5.''."\n"); } } fputs($fp, ''."\n"); fputs($fp, ''."\n"); +asort($checksumconcat); // Sort list of checksum +//var_dump($checksumconcat); +fputs($fp, ''."\n"); +fputs($fp, md5(join(',',$checksumconcat))."\n"); +fputs($fp, ''."\n"); + + +$checksumconcat=array(); fputs($fp, ''."\n"); @@ -106,12 +118,18 @@ foreach ($files as $file) { $needtoclose=1; } if (filetype($file)=="file") { - fputs($fp, ''.md5_file($file).''."\n"); + $md5=md5_file($file); + $checksumconcat[]=$md5; + fputs($fp, ''.$md5.''."\n"); } } fputs($fp, ''."\n"); fputs($fp, ''."\n"); +asort($checksumconcat); // Sort list of checksum +fputs($fp, ''."\n"); +fputs($fp, md5(join(',',$checksumconcat))."\n"); +fputs($fp, ''."\n"); fputs($fp, ''."\n"); fclose($fp); diff --git a/dev/skeletons/skeleton_list.php b/dev/skeletons/skeleton_list.php index d937b34536f..0ca4d6f8589 100644 --- a/dev/skeletons/skeleton_list.php +++ b/dev/skeletons/skeleton_list.php @@ -89,8 +89,11 @@ if ($user->societe_id > 0) //accessforbidden(); } +// Initialize technical object to manage context to save list fields +$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'mymodulelist'; + // Initialize technical object to manage hooks. Note that conf->hooks_modules contains array -$hookmanager->initHooks(array('skeletonlist')); +$hookmanager->initHooks(array('mymodulelist')); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels @@ -305,6 +308,7 @@ print ''; print ''; print ''; +print ''; print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_companies', 0, '', '', $limit); diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index 268b5fa69c2..524326e320c 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -357,7 +357,7 @@ class AccountancyExport $Tab['libelle_ecriture'] = str_pad(self::trunc($data->doc_ref . ' ' . $data->label_compte, 20), 20); $Tab['sens'] = $data->sens; // C or D $Tab['signe_montant'] = '+'; - $Tab['montant'] = str_pad(abs($data->montant) * 100, 12, '0', STR_PAD_LEFT); // TODO manage negative amount + $Tab['montant'] = str_pad(abs($data->montant), 12, '0', STR_PAD_LEFT); // TODO manage negative amount $Tab['contrepartie'] = str_repeat(' ', 8); if (! empty($data->date_echeance)) $Tab['date_echeance'] = dol_print_date($data->date_echeance, $conf->global->ACCOUNTING_EXPORT_DATE); diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 0cd4886f8c9..2ca1337736e 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -1274,6 +1274,7 @@ if ($id) // Title line with search boxes print ''; + $filterfound=0; foreach ($fieldlist as $field => $value) { $showfield=1; // By defaut @@ -1284,21 +1285,25 @@ if ($id) { if ($value == 'country') { - print ''; + print ''; print $form->select_country($search_country_id, 'search_country_id', '', 28, 'maxwidth200 maxwidthonsmartphone'); print ''; + $filterfound++; } else { - print ''; + print ''; } } } if ($id == 4) print ''; - print ''; + print ''; print ''; - $searchpitco=$form->showFilterAndCheckAddButtons(0); - print $searchpitco; + if ($filterfound) + { + $searchpitco=$form->showFilterAndCheckAddButtons(0); + print $searchpitco; + } print ''; print ''; @@ -1314,19 +1319,17 @@ if ($id) print ''; if ($action == 'edit' && ($rowid == (! empty($obj->rowid)?$obj->rowid:$obj->code))) { - print '
'; - print ''; - print ''; - print ''; - $tmpaction='edit'; $parameters=array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); $reshook=$hookmanager->executeHooks('editDictionaryFieldlist',$parameters,$obj, $tmpaction); // Note that $action and $object may have been modified by some hooks $error=$hookmanager->error; $errors=$hookmanager->errors; + // Show fields if (empty($reshook)) fieldList($fieldlist,$obj,$tabname[$id],'edit'); print ''; + print ''; + print ''; print ''; print '
'; print ''; diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index d05518374c1..ed290060370 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -619,6 +619,12 @@ else print ''; + if ($conf->global->MAIN_MAIL_SENDMODE == 'mail') + { + $text = $langs->trans("WarningPHPMail"); + print info_admin($text); + } + // Run the test to connect if ($action == 'testconnect') { diff --git a/htdocs/admin/system/filecheck.php b/htdocs/admin/system/filecheck.php index 5bea1b521ac..1340b5ae3c1 100644 --- a/htdocs/admin/system/filecheck.php +++ b/htdocs/admin/system/filecheck.php @@ -75,9 +75,9 @@ $file_list = array('missing' => array(), 'updated' => array()); // File to analyze //$xmlfile = DOL_DOCUMENT_ROOT.'/install/filelist-'.DOL_VERSION.'.xml'; -$xmlshortfile = '/install/filelist-'.DOL_VERSION.'.xml'; +$xmlshortfile = GETPOST('xmlshortfile')?GETPOST('xmlshortfile'):'/install/filelist-'.DOL_VERSION.'.xml'; $xmlfile = DOL_DOCUMENT_ROOT.$xmlshortfile; -$xmlremote = 'https://www.dolibarr.org/files/stable/signatures/filelist-'.DOL_VERSION.'.xml'; +$xmlremote = GETPOST('xmlremote')?GETPOST('xmlremote'):'https://www.dolibarr.org/files/stable/signatures/filelist-'.DOL_VERSION.'.xml'; // Test if remote test is ok @@ -87,21 +87,27 @@ if (preg_match('/beta|alpha/i', DOL_VERSION)) $enableremotecheck=False; print ''; print $langs->trans("MakeIntegrityAnalysisFrom").':
'; +print ''."\n"; if (dol_is_file($xmlfile)) { print ' '.$langs->trans("LocalSignature").' = '.$xmlshortfile.'
'; } else { - print ' '.$langs->trans("LocalSignature").' = '.$xmlshortfile.' ('.$langs->trans("AvailableOnlyOnPackagedVersions").')
'; + print ' '.$langs->trans("LocalSignature").' = '.$xmlshortfile; + if (! GETPOST('xmlshortfile')) print ' ('.$langs->trans("AvailableOnlyOnPackagedVersions").')'; + print '
'; } +print ''."\n"; if ($enableremotecheck) { print ' '.$langs->trans("RemoteSignature").' = '.$xmlremote.'
'; } else { - print ' '.$langs->trans("RemoteSignature").' = '.$xmlremote.' ('.$langs->trans("FeatureAvailableOnlyOnStable").')
'; + print ' '.$langs->trans("RemoteSignature").' = '.$xmlremote; + if (! GETPOST('xmlremote')) print ' ('.$langs->trans("FeatureAvailableOnlyOnStable").')'; + print '
'; } print '
'; print '
'; @@ -128,7 +134,8 @@ if (GETPOST('target') == 'remote') if (! $xmlarray['curl_error_no'] && $xmlarray['http_code'] != '404') { $xmlfile = $xmlarray['content']; - $xml = simplexml_load_file($xmlfile); + //print "eee".$xmlfile."eee"; + $xml = simplexml_load_string($xmlfile); } else { @@ -141,11 +148,14 @@ if (GETPOST('target') == 'remote') if ($xml) { + $checksumconcat = array(); + + // Scan htdocs if (is_object($xml->dolibarr_htdocs_dir[0])) { - $file_list = array(); - $ret = getFilesUpdated($file_list, $xml->dolibarr_htdocs_dir[0]); // Fill array $file_list - + $file_list = array(); + $ret = getFilesUpdated($file_list, $xml->dolibarr_htdocs_dir[0], '', DOL_DOCUMENT_ROOT, $checksumconcat); // Fill array $file_list + print ''; print ''; print ''; @@ -181,10 +191,10 @@ if ($xml) print ''; print ''."\n"; $var = true; - $tmpfilelist = dol_sort_array($file_list['updated'], 'filename'); - if (is_array($tmpfilelist) && count($tmpfilelist)) + $tmpfilelist2 = dol_sort_array($file_list['updated'], 'filename'); + if (is_array($tmpfilelist2) && count($tmpfilelist2)) { - foreach ($tmpfilelist as $file) + foreach ($tmpfilelist2 as $file) { $var = !$var; print ''; @@ -201,12 +211,44 @@ if ($xml) print ''; } print '
' . $langs->trans("FilesMissing") . '' . $langs->trans("DateModification") . '
'.$langs->trans("None").'
'; + + if (empty($tmpfilelist) && empty($tmpfilelist2)) + { + setEventMessage($langs->trans("FileIntegrityIsStrictlyConformedWithReference")); + } + else + { + setEventMessage($langs->trans("FileIntegritySomeFilesWereRemovedOrModified"), 'warnings'); + } } else { print 'Error: Failed to found dolibarr_htdocs_dir into XML file '.$xmlfile; $error++; } + + + // Scan scripts + /* + if (is_object($xml->dolibarr_script_dir[0])) + { + $file_list = array(); + $ret = getFilesUpdated($file_list, $xml->dolibarr_htdocs_dir[0], '', ???, $checksumconcat); // Fill array $file_list + }*/ + + + asort($checksumconcat); // Sort list of checksum + //var_dump($checksumconcat); + $checksumget = md5(join(',',$checksumconcat)); + $checksumtoget = $xml->dolibarr_htdocs_dir_checksum; + if ($checksumtoget) + { + print '
'; + print ''.$langs->trans("GlobalChecksum").'
'; + print $langs->trans("ExpectedChecksum").' = '.$checksumtoget.'
'; + print $langs->trans("CurrentChecksum").' = '.$checksumget; + } + } @@ -223,12 +265,14 @@ exit($error); * Function to get list of updated or modified files. * $file_list is used as global variable * - * @param array $file_list Array for response - * @param SimpleXMLElement $dir SimpleXMLElement of files to test - * @param string $path Path of file - * @return array Array of filenames + * @param array $file_list Array for response + * @param SimpleXMLElement $dir SimpleXMLElement of files to test + * @param string $path Path of files relative to $pathref. We start with ''. Used by recursive calls. + * @param string $pathref Path ref (DOL_DOCUMENT_ROOT) + * @param array $checksumconcat Array of checksum + * @return array Array of filenames */ -function getFilesUpdated(&$file_list, SimpleXMLElement $dir, $path = '') +function getFilesUpdated(&$file_list, SimpleXMLElement $dir, $path = '', $pathref = '', &$checksumconcat = array()) { $exclude = 'install'; @@ -236,20 +280,21 @@ function getFilesUpdated(&$file_list, SimpleXMLElement $dir, $path = '') { $filename = $path.$file['name']; - if (preg_match('#'.$exclude.'#', $filename)) continue; + //if (preg_match('#'.$exclude.'#', $filename)) continue; - if (!file_exists(DOL_DOCUMENT_ROOT.'/'.$filename)) + if (!file_exists($pathref.'/'.$filename)) { $file_list['missing'][] = array('filename'=>$filename, 'expectedmd5'=>(string) $file); } else { - $md5_local = md5_file(DOL_DOCUMENT_ROOT.'/'.$filename); + $md5_local = md5_file($pathref.'/'.$filename); if ($md5_local != (string) $file) $file_list['updated'][] = array('filename'=>$filename, 'expectedmd5'=>(string) $file, 'md5'=>(string) $md5_local); - } + $checksumconcat[] = $md5_local; + } } - foreach ($dir->dir as $subdir) getFilesUpdated($file_list, $subdir, $path.$subdir['name'].'/'); + foreach ($dir->dir as $subdir) getFilesUpdated($file_list, $subdir, $path.$subdir['name'].'/', $pathref, $checksumconcat); return $file_list; } diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 4b6380b1240..b4a9f8b5395 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -278,7 +278,7 @@ if ($action == 'add') if (GETPOST("doneby") > 0) $object->userdoneid = GETPOST("doneby","int"); } - $object->note = trim($_POST["note"]); + $object->note = trim(GETPOST("note")); if (isset($_POST["contactid"])) $object->contact = $contact; @@ -290,11 +290,6 @@ if ($action == 'add') $object->societe = $object->thirdparty; // For backward compatibility } - // Special for module webcal and phenix - // TODO external modules - if (! empty($conf->webcalendar->enabled) && GETPOST('add_webcal') == 'on') $object->use_webcal=1; - if (! empty($conf->phenix->enabled) && GETPOST('add_phenix') == 'on') $object->use_phenix=1; - // Check parameters if (empty($object->userownerid) && empty($_SESSION['assignedtouser'])) { diff --git a/htdocs/comm/action/class/api_agendaevents.class.php b/htdocs/comm/action/class/api_agendaevents.class.php index b14d48c174e..5eeca63a4aa 100644 --- a/htdocs/comm/action/class/api_agendaevents.class.php +++ b/htdocs/comm/action/class/api_agendaevents.class.php @@ -94,7 +94,7 @@ class AgendaEvents extends DolibarrApi * @param int $limit Limit for list * @param int $page Page number * @param string $user_ids User ids filter field (owners of event). Example: '1' or '1,2,3' {@pattern /^[0-9,]*$/i} - * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')" + * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.label:like:'%dol%') and (t.date_creation:<:'20160101')" * @return array Array of Agenda Events objects */ function index($sortfield = "t.id", $sortorder = 'ASC', $limit = 0, $page = 0, $user_ids = 0, $sqlfilters = '') { diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index 7c34498e6b4..c37c61ca88c 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -756,8 +756,9 @@ else $sendingmode=$conf->global->MAIN_MAIL_SENDMODE; if (empty($sendingmode)) $sendingmode='mail'; // If not defined, we use php mail function - // MAILING_NO_USING_PHPMAIL may be defined or not - // MAILING_LIMIT_SENDBYWEB is always defined to something != 0, MAILING_LIMIT_SENDBYCLI may be defined ot not. + // MAILING_NO_USING_PHPMAIL may be defined or not. + // MAILING_LIMIT_SENDBYWEB is always defined to something != 0 (-1=forbidden). + // MAILING_LIMIT_SENDBYCLI may be defined ot not (-1=forbidden, 0=no limit). if (! empty($conf->global->MAILING_NO_USING_PHPMAIL) && $sendingmode == 'mail') { // EMailing feature may be a spam problem, so when you host several users/instance, having this option may force each user to use their own SMTP agent. @@ -797,7 +798,7 @@ else } $text.=$langs->trans('ConfirmSendingEmailing').'
'; $text.=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB); - print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('SendMailing'),$text,'sendallconfirmed',$formquestion,'',1,270); + print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('SendMailing'),$text,'sendallconfirmed',$formquestion,'',1,300); } } @@ -844,23 +845,28 @@ else print $langs->trans("TotalNbOfDistinctRecipients"); print ''; $nbemail = ($object->nbemail?$object->nbemail:img_warning('').' '.$langs->trans("NoTargetYet").''); - if ($object->statut != 3 && !empty($conf->global->MAILING_LIMIT_SENDBYWEB) && is_numeric($nbemail) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail) + if ($object->statut != 3 && is_numeric($nbemail)) { - if ($conf->global->MAILING_LIMIT_SENDBYWEB > 0) - { - $text=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB); - print $form->textwithpicto($nbemail,$text,1,'warning'); - } - else - { - $text=$langs->trans('NotEnoughPermissions'); - print $form->textwithpicto($nbemail,$text,1,'warning'); - } - - } - else - { - print $nbemail; + $text=''; + if (! empty($conf->global->MAILING_LIMIT_SENDBYWEB) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail) + { + if ($conf->global->MAILING_LIMIT_SENDBYWEB > 0) + { + $text.=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB); + } + else + { + $text.=$langs->trans('NotEnoughPermissions'); + } + } + if ($text) + { + print $form->textwithpicto($nbemail,$text,1,'warning'); + } + else + { + print $nbemail; + } } print ''; diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php index d161fe03870..57181b83f6b 100644 --- a/htdocs/comm/propal/note.php +++ b/htdocs/comm/propal/note.php @@ -132,9 +132,9 @@ if ($id > 0 || ! empty($ref)) print '
'; print '
'; + $cssclass="titlefield"; include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'; - print '
'; print ''; dol_fiche_end(); diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 0262187b342..9ca79421f20 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -99,7 +99,7 @@ if (! $sortfield) $sortfield='c.ref'; if (! $sortorder) $sortorder='DESC'; // Initialize technical object to manage context to save list fields -$contextpage='orderlist'; +$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'orderlist'; // Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array $hookmanager->initHooks(array($contextpage)); @@ -653,6 +653,7 @@ if ($resql) print ''; print ''; print ''; + print ''; print ''; print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_commercial.png', 0, '', '', $limit); diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index cd44122b981..c8959c86029 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -3723,7 +3723,7 @@ else if ($id > 0 || ! empty($ref)) else print $langs->trans('ExcessReceived'); print ' :'; - print '' . price($resteapayeraffiche) . ''; + print '' . price($resteapayeraffiche) . ''; print ' '; } else // Credit note diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 93b2b63070f..d2c20099edc 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -867,18 +867,20 @@ if ($resql) $facturestatic->type=$obj->type; $facturestatic->statut=$obj->fk_statut; $facturestatic->date_lim_reglement=$db->jdate($obj->datelimite); - $facturestatic->type=$obj->type; $facturestatic->note_public=$obj->note_public; $facturestatic->note_private=$obj->note_private; + + $paiement = $facturestatic->getSommePaiement(); + $totalcreditnotes = $facturestatic->getSumCreditNotesUsed(); + $totaldeposits = $facturestatic->getSumDepositsUsed(); + $totalpay = $paiement + $totalcreditnotes + $totaldeposits; + $remaintopay = $obj->total_ttc - $totalpay; print ''; if (! empty($arrayfields['f.facnumber']['checked'])) { print ''; - - $paiement = $facturestatic->getSommePaiement(); - $remaintopay = $obj->total_ttc - $paiement; - + print ''; print ''; // TODO Use a denormalized field + print ''; // TODO Use a denormalized field if (! $i) $totalarray['nbfield']++; if (! $i) $totalarray['totalamfield']=$totalarray['nbfield']; - $totalarray['totalam'] += $paiement; + $totalarray['totalam'] += $totalpay; } if (! empty($arrayfields['rtp']['checked'])) diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index e917e1e1c71..77393b78f4e 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -556,34 +556,42 @@ if ($id > 0) print ''; print ''; print ''; - print ''; print ''; - $var=True; - while ($i < $num) + $var=true; + if ($num > 0) + { + while ($i < $num) + { + $objp = $db->fetch_object($resql); + $var=!$var; + print "'; + print '\n"; + $labeltype=$langs->trans("PaymentType".$objp->type_code)!=("PaymentType".$objp->type_code)?$langs->trans("PaymentType".$objp->type_code):$objp->paiement_type; + print "\n"; + print '\n"; + print ""; + $totalpaye += $objp->amount; + $i++; + } + } + else { - $objp = $db->fetch_object($resql); $var=!$var; - print "'; - print '\n"; - $labeltype=$langs->trans("PaymentType".$objp->type_code)!=("PaymentType".$objp->type_code)?$langs->trans("PaymentType".$objp->type_code):$objp->paiement_type; - print "\n"; - print '\n"; - print ""; - $totalpaye += $objp->amount; - $i++; + print ''; } - + if ($object->paye == 0) { - print "\n"; - print "\n"; + print "\n"; + print "\n"; $resteapayer = $object->amount - $totalpaye; - + $cssforamountpaymentcomplete = 'amountpaymentcomplete'; + print ""; - print "\n"; + print '\n"; } print "
'; @@ -1028,10 +1030,10 @@ if ($resql) if (! empty($arrayfields['dynamount_payed']['checked'])) { - print ''.(! empty($paiement)?price($paiement,0,$langs):' ').''.(! empty($totalpay)?price($totalpay,0,$langs):' ').''.$langs->trans("Date").''.$langs->trans("Type").''.$langs->trans("Amount").' 
"; + print ''.img_object($langs->trans("Payment"),"payment").' '.$objp->rowid.''.dol_print_date($db->jdate($objp->dp),'day')."".$labeltype.' '.$objp->num_paiement."'.price($objp->amount)."
"; - print ''.img_object($langs->trans("Payment"),"payment").' '.$objp->rowid.''.dol_print_date($db->jdate($objp->dp),'day')."".$labeltype.' '.$objp->num_paiement."'.price($objp->amount)." ".$langs->trans("Currency".$conf->currency)."
'.$langs->trans("None").'
".$langs->trans("AlreadyPaid")." :".price($totalpaye)." ".$langs->trans("Currency".$conf->currency)."
".$langs->trans("AmountExpected")." :".price($object->amount)." ".$langs->trans("Currency".$conf->currency)."
".$langs->trans("AlreadyPaid")." :".price($totalpaye)."
".$langs->trans("AmountExpected")." :".price($object->amount)."
".$langs->trans("RemainderToPay")." :".price($resteapayer)." ".$langs->trans("Currency".$conf->currency)."
'.price($resteapayer)."
"; $db->free($resql); diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index 1fdd567745f..61546b39061 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -510,7 +510,7 @@ class ChargeSociales extends CommonObject function info($id) { $sql = "SELECT e.rowid, e.tms as datem, e.date_creation as datec, e.date_valid as datev, e.import_key,"; - $sql.= " fk_user_author, fk_user_modif, fk_user_valid"; + $sql.= " e.fk_user_author, e.fk_user_modif, e.fk_user_valid"; $sql.= " FROM ".MAIN_DB_PREFIX."chargesociales as e"; $sql.= " WHERE e.rowid = ".$id; @@ -543,7 +543,7 @@ class ChargeSociales extends CommonObject } $this->date_creation = $this->db->jdate($obj->datec); - if (! empty($obj->fk_user_modif)) $this->date_modification = $this->db->jdate($obj->datem); + $this->date_modification = $this->db->jdate($obj->datem); $this->date_validation = $this->db->jdate($obj->datev); $this->import_key = $obj->import_key; } diff --git a/htdocs/conf/conf.php.example b/htdocs/conf/conf.php.example index c03e41b386c..89e1458d4fd 100644 --- a/htdocs/conf/conf.php.example +++ b/htdocs/conf/conf.php.example @@ -250,11 +250,16 @@ $dolibarr_main_restrict_os_commands='mysqldump, mysql, pg_dump, pgrestore'; $dolibarr_nocsrfcheck='0'; // dolibarr_mailing_limit_sendbyweb -// Can set a limit for mailing send by web. Can be used for a restricted mode. -// Default value: 0 (use database value if exist) -// Examples: -// $dolibarr_mailing_limit_sendbyweb='0'; +// Can set a limit for mailing send by web. This overwrite database value. Can be used to restrict on OS level. +// Default value: '25' +// Examples: '-1' (sending by web is forbidden) +// $dolibarr_mailing_limit_sendbyweb='25'; +// dolibarr_mailing_limit_sendbycli +// Can set a limit for mailing send by cli. This overwrite database value. Can be used to restrict on OS level. +// Default value: '0' (no hard limit, use soft database value if exists) +// Examples: '-1' (sending by cli is forbidden) +// $dolibarr_mailing_limit_sendbycli='0'; //################## @@ -273,18 +278,6 @@ $dolibarr_nocsrfcheck='0'; // Examples: // $dolibarr_main_limit_users='0'; -// dolibarr_mailing_limit_sendbyweb -// Can set a limit for mailing send by web. This overwrite database value. Can be used to restrict on OS level. -// Default value: '0' (no overwrite, use database value if exists) -// Examples: '-1' (sending by web is forbidden) -// $dolibarr_mailing_limit_sendbyweb='0'; - -// dolibarr_mailing_limit_sendbycli -// Can set a limit for mailing send by cli. This overwrite database value. Can be used to restrict on OS level. -// Default value: '0' (no overwrite, use database value if exists) -// Examples: '-1' (sending by cli is forbidden) -// $dolibarr_mailing_limit_sendbycli='0'; - // dolibarr_strict_mode // Set this to 1 to enable the PHP strict mode. For dev environment only. // Default value: 0 (use database value if exist) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index 027bedebb6e..9e11001745c 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -488,28 +488,35 @@ class CMailFile // Check number of recipient is lower or equal than MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL if (empty($conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL)) $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL=10; - $tmparray = explode(',', $this->addr_to); - if (count($tmparray) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL) + $tmparray1 = explode(',', $this->addr_to); + if (count($tmparray1) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_TO_IN_SAME_EMAIL) { $this->error = 'Too much recipients in to:'; dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_WARNING); return false; } - $tmparray = explode(',', $this->addr_cc); - if (count($tmparray) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL) + $tmparray2 = explode(',', $this->addr_cc); + if (count($tmparray2) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_CC_IN_SAME_EMAIL) { $this->error = 'Too much recipients in cc:'; dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_WARNING); return false; } - $tmparray = explode(',', $this->addr_bcc); - if (count($tmparray) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL) + $tmparray3 = explode(',', $this->addr_bcc); + if (count($tmparray3) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_BCC_IN_SAME_EMAIL) { $this->error = 'Too much recipients in bcc:'; dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_WARNING); return false; } - + if ((count($tmparray1)+count($tmparray2)+count($tmparray3)) > $conf->global->MAIL_MAX_NB_OF_RECIPIENTS_IN_SAME_EMAIL) + { + $this->error = 'Too much recipients in to:, cc:, bcc:'; + dol_syslog("CMailFile::sendfile: mail end error=" . $this->error, LOG_WARNING); + return false; + } + + // Action according to choosed sending method if ($conf->global->MAIN_MAIL_SENDMODE == 'mail') { @@ -538,25 +545,28 @@ class CMailFile } else { - $bounce = ''; // By default + $additionnalparam = ''; // By default if (! empty($conf->global->MAIN_MAIL_ALLOW_SENDMAIL_F)) { // le "Return-Path" (retour des messages bounced) dans les header ne fonctionne pas avec tous les MTA // Le forcage de la valeur grace à l'option -f de sendmail est donc possible si la constante MAIN_MAIL_ALLOW_SENDMAIL_F est definie. - // La variable definie pose des pb avec certains sendmail securisee (option -f refusee car dangereuse) - $bounce .= ($bounce?' ':'').(! empty($conf->global->MAIN_MAIL_ERRORS_TO) ? '-f' . $this->getValidAddress($conf->global->MAIN_MAIL_ERRORS_TO,2) : ($this->addr_from != '' ? '-f' . $this->getValidAddress($this->addr_from,2) : '') ); + // Having this variable defined may create problems with some sendmail (option -f refused) + // Having this variable not defined may create problems with some other sendmail (option -f required) + $additionnalparam .= ($additionnalparam?' ':'').(! empty($conf->global->MAIN_MAIL_ERRORS_TO) ? '-f' . $this->getValidAddress($conf->global->MAIN_MAIL_ERRORS_TO,2) : ($this->addr_from != '' ? '-f' . $this->getValidAddress($this->addr_from,2) : '') ); } if (! empty($conf->global->MAIN_MAIL_SENDMAIL_FORCE_BA)) // To force usage of -ba option. This option tells sendmail to read From: or Sender: to setup sender { - $bounce .= ($bounce?' ':'').'-ba'; + $additionnalparam .= ($additionnalparam?' ':'').'-ba'; } - dol_syslog("CMailFile::sendfile: mail start HOST=".ini_get('SMTP').", PORT=".ini_get('smtp_port').", additionnal_parameters=".$bounce, LOG_DEBUG); + if (! empty($conf->global->MAIN_MAIL_SENDMAIL_FORCE_ADDPARAM)) $additionnalparam .= ($additionnalparam?' ':'').'-U '.$additionnalparam; // Use -U to add additionnal params + + dol_syslog("CMailFile::sendfile: mail start HOST=".ini_get('SMTP').", PORT=".ini_get('smtp_port').", additionnal_parameters=".$additionnalparam, LOG_DEBUG); $this->message=stripslashes($this->message); if (! empty($conf->global->MAIN_MAIL_DEBUG)) $this->dump_mail(); - if (! empty($bounce)) $res = mail($dest,$this->encodetorfc2822($this->subject),$this->message,$this->headers, $bounce); + if (! empty($additionnalparam)) $res = mail($dest, $this->encodetorfc2822($this->subject), $this->message, $this->headers, $additionnalparam); else $res = mail($dest, $this->encodetorfc2822($this->subject), $this->message, $this->headers); if (! $res) diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index c451b2e32fd..81de34e012f 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -282,6 +282,7 @@ class Conf // Define default dir_output and dir_temp for directories of modules foreach($this->modules as $module) { + //var_dump($module); // For multicompany sharings $this->$module->multidir_output = array($this->entity => $rootfordata."/".$module); $this->$module->multidir_temp = array($this->entity => $rootfordata."/".$module."/temp"); diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 8abe3f271f7..ad968de506a 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5633,18 +5633,18 @@ class Form * Return a HTML area with the reference of object and a navigation bar for a business object * To add a particular filter on select, you must set $object->next_prev_filter to SQL criteria. * - * @param object $object Object to show - * @param string $paramid Name of parameter to use to name the id into the URL next/previous link - * @param string $morehtml More html content to output just before the nav bar - * @param int $shownav Show Condition (navigation is shown if value is 1) - * @param string $fieldid Name of field id into database to use for select next and previous (we make the select max and min on this field) + * @param object $object Object to show. + * @param string $paramid Name of parameter to use to name the id into the URL next/previous link. + * @param string $morehtml More html content to output just before the nav bar. + * @param int $shownav Show Condition (navigation is shown if value is 1). + * @param string $fieldid Name of field id into database to use for select next and previous (we make the select max and min on this field). * @param string $fieldref Name of field ref of object (object->ref) to show or 'none' to not show ref. - * @param string $morehtmlref More html to show after ref - * @param string $moreparam More param to add in nav link url. - * @param int $nodbprefix Do not include DB prefix to forge table name - * @param string $morehtmlleft More html code to show before ref - * @param string $morehtmlstatus More html code to show under navigation arrows (status place) - * @param string $morehtmlright More html code to show after ref + * @param string $morehtmlref More html to show after ref. + * @param string $moreparam More param to add in nav link url. Must start with '&...'. + * @param int $nodbprefix Do not include DB prefix to forge table name. + * @param string $morehtmlleft More html code to show before ref. + * @param string $morehtmlstatus More html code to show under navigation arrows (status place). + * @param string $morehtmlright More html code to show after ref. * @return string Portion HTML with ref + navigation buttons */ function showrefnav($object,$paramid,$morehtml='',$shownav=1,$fieldid='rowid',$fieldref='ref',$morehtmlref='',$moreparam='',$nodbprefix=0,$morehtmlleft='',$morehtmlstatus='',$morehtmlright='') @@ -5657,7 +5657,7 @@ class Form //print "paramid=$paramid,morehtml=$morehtml,shownav=$shownav,$fieldid,$fieldref,$morehtmlref,$moreparam"; $object->load_previous_next_ref((isset($object->next_prev_filter)?$object->next_prev_filter:''),$fieldid,$nodbprefix); - + //$previous_ref = $object->ref_previous?''.(empty($conf->dol_use_jmobile)?img_picto($langs->trans("Previous"),'previous.png'):' ').'':''; //$next_ref = $object->ref_next?''.(empty($conf->dol_use_jmobile)?img_picto($langs->trans("Next"),'next.png'):' ').'':''; $previous_ref = $object->ref_previous?''.(($conf->dol_use_jmobile != 4)?'<':' ').'':''.(($conf->dol_use_jmobile != 4)?'<':' ').''; diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index ad592359936..09f89ba0c3f 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -239,7 +239,7 @@ function show_array_actions_to_do($max=5) print ''; print ''; - print ''; $var = true; @@ -336,7 +336,7 @@ function show_array_last_actions_done($max=5) print '
'.$langs->trans("LastActionsToDo",$max).''.$langs->trans("FullList").''; + print ''.$langs->trans("FullList").''; print '
'; print ''; - print ''; $var = true; $i = 0; diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index ff6459413a4..ccec6af47d0 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -993,16 +993,26 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint= $sql.= " u.login, u.rowid as user_id"; if (get_class($filterobj) == 'Societe') $sql.= ", sp.lastname, sp.firstname"; if (get_class($filterobj) == 'Adherent') $sql.= ", m.lastname, m.firstname"; + if (get_class($filterobj) == 'CommandeFournisseur') $sql.= ", o.ref"; $sql.= " FROM ".MAIN_DB_PREFIX."user as u, ".MAIN_DB_PREFIX."actioncomm as a"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_actioncomm as c ON a.fk_action = c.id"; if (get_class($filterobj) == 'Societe') $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid"; if (get_class($filterobj) == 'Adherent') $sql.= ", ".MAIN_DB_PREFIX."adherent as m"; + if (get_class($filterobj) == 'CommandeFournisseur') $sql.= ", ".MAIN_DB_PREFIX."commande_fournisseur as o"; $sql.= " WHERE u.rowid = a.fk_user_author"; $sql.= " AND a.entity IN (".getEntity('agenda', 1).")"; if (get_class($filterobj) == 'Societe' && $filterobj->id) $sql.= " AND a.fk_soc = ".$filterobj->id; if (get_class($filterobj) == 'Project' && $filterobj->id) $sql.= " AND a.fk_project = ".$filterobj->id; - if (get_class($filterobj) == 'Adherent') $sql.= " AND a.fk_element = m.rowid AND a.elementtype = 'member'"; - if (get_class($filterobj) == 'Adherent' && $filterobj->id) $sql.= " AND a.fk_element = ".$filterobj->id; + if (get_class($filterobj) == 'Adherent') + { + $sql.= " AND a.fk_element = m.rowid AND a.elementtype = 'member'"; + if ($filterobj->id) $sql.= " AND a.fk_element = ".$filterobj->id; + } + if (get_class($filterobj) == 'CommandeFournisseur') + { + $sql.= " AND a.fk_element = o.rowid AND a.elementtype = 'order_supplier'"; + if ($filterobj->id) $sql.= " AND a.fk_element = ".$filterobj->id; + } if (is_object($objcon) && $objcon->id) $sql.= " AND a.fk_contact = ".$objcon->id; // Condition on actioncode if (! empty($actioncode)) @@ -1133,6 +1143,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint= require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; + require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; @@ -1142,9 +1153,10 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint= $userstatic=new User($db); $contactstatic = new Contact($db); - // TODO uniformize + // TODO mutualize/uniformize $propalstatic=new Propal($db); $orderstatic=new Commande($db); + $supplierorderstatic=new CommandeFournisseur($db); $facturestatic=new Facture($db); $out.=''; @@ -1286,7 +1298,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint= //$out.=''; // Objet lie - // TODO uniformize + // TODO mutualize/uniformize $out.='';*/ - - // Affichage fiche action en mode visu print '
'.$langs->trans("LastDoneTasks",$max).''.$langs->trans("FullList").''; + print ''.$langs->trans("FullList").''; print '
'.dol_trunc($histo[$key]['note'], 40).''; //var_dump($histo[$key]['elementtype']); if (isset($histo[$key]['elementtype'])) diff --git a/htdocs/core/lib/fourn.lib.php b/htdocs/core/lib/fourn.lib.php index 4c277a69968..3ac3cf49a9c 100644 --- a/htdocs/core/lib/fourn.lib.php +++ b/htdocs/core/lib/fourn.lib.php @@ -101,7 +101,8 @@ function facturefourn_prepare_head($object) */ function ordersupplier_prepare_head($object) { - global $db, $langs, $conf; + global $db, $langs, $conf, $user; + $h = 0; $head = array(); @@ -159,7 +160,12 @@ function ordersupplier_prepare_head($object) $h++; $head[$h][0] = DOL_URL_ROOT.'/fourn/commande/info.php?id='.$object->id; - $head[$h][1] = $langs->trans("Info"); + $head[$h][1].= $langs->trans("Events"); + if (! empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read) )) + { + $head[$h][1].= '/'; + $head[$h][1].= $langs->trans("Agenda"); + } $head[$h][2] = 'info'; $h++; complete_head_from_modules($conf,$langs,$object,$head,$h,'supplier_order', 'remove'); diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 98dc7f14fd4..bb268ffa2d0 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1103,7 +1103,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r $morehtmlref.=''; } - print '
'; + print '
'; print $form->showrefnav($object, $paramid, $morehtml, $shownav, $fieldid, $fieldref, $morehtmlref, $moreparam, $nodbprefix, $morehtmlleft, $morehtmlstatus, $morehtmlright); print '
'; print '
'; diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index a07c506d758..a09b962ee26 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -2007,13 +2007,14 @@ function getElementProperties($element_type) /** * Fetch an object from its id and element_type - * Inclusion classes is automatic + * Inclusion of classes is automatic * * @param int $element_id Element id * @param string $element_type Element type + * @param ref $element_ref Element ref (Use this if element_id but not both) * @return int|object object || 0 || -1 if error */ -function fetchObjectByElement($element_id, $element_type) +function fetchObjectByElement($element_id, $element_type, $element_ref='') { global $conf; global $db,$conf; @@ -2023,11 +2024,11 @@ function fetchObjectByElement($element_id, $element_type) { dol_include_once('/'.$element_prop['classpath'].'/'.$element_prop['classfile'].'.class.php'); - $objectstat = new $element_prop['classname']($db); - $ret = $objectstat->fetch($element_id); + $objecttmp = new $element_prop['classname']($db); + $ret = $objecttmp->fetch($element_id, $element_ref); if ($ret >= 0) { - return $objectstat; + return $objecttmp; } } return 0; diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index b95e0c5bd25..a88e180b16a 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -844,7 +844,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu if (! empty($conf->commande->enabled)) { $langs->load("orders"); - if (! empty($conf->facture->enabled)) $newmenu->add("/commande/list.php?leftmenu=orders&viewstatut=-3&billed=0", $langs->trans("MenuOrdersToBill2"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders'); + if (! empty($conf->facture->enabled)) $newmenu->add("/commande/list.php?leftmenu=orders&viewstatut=-3&billed=0&contextpage=billableorders", $langs->trans("MenuOrdersToBill2"), 0, $user->rights->commande->lire, '', $mainmenu, 'orders'); // if ($usemenuhider || empty($leftmenu) || $leftmenu=="orders") $newmenu->add("/commande/", $langs->trans("StatusOrderToBill"), 1, $user->rights->commande->lire); } diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index 6b14a6c99fa..b1c674ef5ca 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -129,6 +129,7 @@ class pdf_einstein extends ModelePDFCommandes $this->posxtva-=20; $this->posxup-=20; $this->posxqty-=20; + $this->posxunit-=20; $this->posxdiscount-=20; $this->postotalht-=20; } diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 1701f82c47b..cd864e0d766 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -135,12 +135,14 @@ class pdf_crabe extends ModelePDFFactures $this->posxpicture=$this->posxtva - (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH)?20:$conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH); // width of images if ($this->page_largeur < 210) // To work with US executive format { - $this->posxpicture-=20; - $this->posxtva-=20; - $this->posxup-=20; - $this->posxqty-=20; - $this->posxdiscount-=20; - $this->postotalht-=20; + $this->posxpicture-=20; + $this->posxtva-=20; + $this->posxup-=20; + $this->posxqty-=20; + $this->posxunit-=20; + $this->posxdiscount-=20; + $this->posxprogress-=20; + $this->postotalht-=20; } $this->tva=array(); @@ -297,7 +299,7 @@ class pdf_crabe extends ModelePDFFactures $this->atleastonediscount++; } } - if (empty($this->atleastonediscount) && empty($conf->global->PRODUCT_USE_UNITS)) + if (empty($this->atleastonediscount) && empty($conf->global->PRODUCT_USE_UNITS)) // retreive space not used by discount { $this->posxpicture+=($this->postotalht - $this->posxdiscount); $this->posxtva+=($this->postotalht - $this->posxdiscount); @@ -527,9 +529,9 @@ class pdf_crabe extends ModelePDFFactures $pdf->MultiCell($this->posxprogress-$this->posxdiscount+2, 3, $remise_percent, 0, 'R'); } + // Situation progress if ($this->situationinvoice) { - // Situation progress $progress = pdf_getlineprogress($object, $i, $outputlangs, $hidedetails); $pdf->SetXY($this->posxprogress, $curY); $pdf->MultiCell($this->postotalht-$this->posxprogress, 3, $progress, 0, 'R'); diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 9aa1ca994ef..c5b546bd72f 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -127,6 +127,7 @@ class pdf_azur extends ModelePDFPropales $this->posxtva-=20; $this->posxup-=20; $this->posxqty-=20; + $this->posxunit-=20; $this->posxdiscount-=20; $this->postotalht-=20; } diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php index c5f68df95c1..01d5da92d50 100644 --- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -113,6 +113,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices $this->posxtva-=20; $this->posxup-=20; $this->posxqty-=20; + $this->posxunit-=20; $this->posxdiscount-=20; $this->postotalht-=20; } diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php index e76da5abef3..9a5132a8bea 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -127,6 +127,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders $this->posxtva-=20; $this->posxup-=20; $this->posxqty-=20; + $this->posxunit-=20; $this->posxdiscount-=20; $this->postotalht-=20; } diff --git a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php index 953b1a46206..e73e7f0f1c6 100644 --- a/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php @@ -115,6 +115,7 @@ class pdf_aurore extends ModelePDFSupplierProposal $this->posxtva-=20; $this->posxup-=20; $this->posxqty-=20; + $this->posxunit-=20; $this->posxdiscount-=20; $this->postotalht-=20; } diff --git a/htdocs/core/tpl/extrafields_view.tpl.php b/htdocs/core/tpl/extrafields_view.tpl.php index 4cfc4a20afb..fcb92f1b525 100644 --- a/htdocs/core/tpl/extrafields_view.tpl.php +++ b/htdocs/core/tpl/extrafields_view.tpl.php @@ -22,6 +22,9 @@ * * $cols */ +?> + +fetch_optionals($object->id, $extralabels); $parameters = array('colspan' => ' colspan="'.$cols.'"', 'cols' => $cols, 'socid' => $object->fk_soc); @@ -47,7 +50,9 @@ if (empty($reshook) && ! empty($extrafields->attribute_label)) { if (!empty($extrafields->attribute_hidden[$key])) print '
'; else print '
'; - print ''; + print ''; + print 'attribute_required[$key])) print ' class="fieldrequired"'; print '>' . $langs->trans($label) . ''; @@ -100,3 +105,5 @@ if (empty($reshook) && ! empty($extrafields->attribute_label)) } } } +?> + \ No newline at end of file diff --git a/htdocs/core/tpl/resource_view.tpl.php b/htdocs/core/tpl/resource_view.tpl.php index 6f88d8bb5f8..ecc9f32d837 100644 --- a/htdocs/core/tpl/resource_view.tpl.php +++ b/htdocs/core/tpl/resource_view.tpl.php @@ -10,21 +10,21 @@ print '
'; if($mode == 'edit' ) { print ''; - print '
'.$langs->trans('Resource').'
'; - print '
'.$langs->trans('Type').'
'; - print '
'.$langs->trans('Busy').'
'; - print '
'.$langs->trans('Mandatory').'
'; - print '
'; + print '
'.$langs->trans('Resource').'
'; + print '
'.$langs->trans('Type').'
'; + print '
'.$langs->trans('Busy').'
'; + print '
'.$langs->trans('Mandatory').'
'; + print '
'; print ''; } else { print '
'; - print '
'.$langs->trans('Resource').'
'; - print '
'.$langs->trans('Type').'
'; - print '
'.$langs->trans('Busy').'
'; - print '
'.$langs->trans('Mandatory').'
'; - print '
'; + print '
'.$langs->trans('Resource').'
'; + print '
'.$langs->trans('Type').'
'; + print '
'.$langs->trans('Busy').'
'; + print '
'.$langs->trans('Mandatory').'
'; + print '
'; print ''; } @@ -66,7 +66,7 @@ if( (array) $linked_resources && count($linked_resources) > 0) print '
'; print $object_resource->getNomUrl(1); - print '
'; + print '
'; print '
'; print $object_resource->type_label; diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index fb37a235b37..9b0bb737128 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -1395,10 +1395,12 @@ else if ($id > 0 || ! empty($ref)) print '
'; print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; print "\n"; } $var=true; diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index a320c4ff7c7..2942a8903ab 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -383,7 +383,7 @@ class Fichinter extends CommonObject } else { - $this->error=$this->db->error(); + $this->error=$this->db->lasterror(); return -1; } } diff --git a/htdocs/fichinter/contact.php b/htdocs/fichinter/contact.php index ca1813ce3e2..83825b08a90 100644 --- a/htdocs/fichinter/contact.php +++ b/htdocs/fichinter/contact.php @@ -45,7 +45,11 @@ $result = restrictedArea($user, 'ficheinter', $id, 'fichinter'); $object = new Fichinter($db); $result = $object->fetch($id,$ref); - +if (! $result) +{ + print 'Record not found'; + exit; +} /* * Adding a new contact @@ -166,7 +170,7 @@ if ($id > 0 || ! empty($ref)) } $morehtmlref.=''; - dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, 0, 0, '', '', 1); + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, '', 0, '', '', 1); dol_fiche_end(); diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index e350250a638..9d01643825a 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -253,7 +253,7 @@ if ($result) print '
'.$langs->trans('Description').''.$langs->trans('Date').''.(empty($conf->global->FICHINTER_WITHOUT_DURATION)?$langs->trans('Duration'):'').' '.$langs->trans('Description').''.$langs->trans('Date').''.(empty($conf->global->FICHINTER_WITHOUT_DURATION)?$langs->trans('Duration'):'').'   
'; print ''; - if (! empty($arrayfields['f.ref']['checked'])) print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"f.ref","",$param,'width="15%"',$sortfield,$sortorder); + if (! empty($arrayfields['f.ref']['checked'])) print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"f.ref","",$param,'',$sortfield,$sortorder); if (! empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($langs->trans("ThirdParty"),$_SERVER["PHP_SELF"],"s.nom","",$param,'',$sortfield,$sortorder); if (! empty($arrayfields['f.description']['checked'])) print_liste_field_titre($langs->trans("Description"),$_SERVER["PHP_SELF"],"f.description","",$param,'',$sortfield,$sortorder); if (! empty($arrayfields['fd.description']['checked'])) print_liste_field_titre('',$_SERVER["PHP_SELF"],''); @@ -407,10 +407,11 @@ if ($result) print $warnornote; print ''; } + // Other picto tool print '
'; $filename=dol_sanitizeFileName($obj->ref); - $filedir=$conf->fichinter->dir_output . '/' . dol_sanitizeFileName($obj->ref); + $filedir=$conf->ficheinter->dir_output . '/' . dol_sanitizeFileName($obj->ref); $urlsource=$_SERVER['PHP_SELF'].'?id='.$obj->rowid; print $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir); print '
'; diff --git a/htdocs/fourn/commande/contact.php b/htdocs/fourn/commande/contact.php index 04bb5a24506..564057d991a 100644 --- a/htdocs/fourn/commande/contact.php +++ b/htdocs/fourn/commande/contact.php @@ -184,7 +184,7 @@ if ($id > 0 || ! empty($ref)) $morehtmlref.=''; - dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, '', 0, '', '', 1); dol_fiche_end(); diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 7de5d34d248..d8d60e96272 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -625,9 +625,9 @@ if ($id > 0 || ! empty($ref)) { // Message if nothing to dispatch if (! $nbproduct) { if (empty($conf->global->SUPPLIER_ORDER_DISABLE_STOCK_DISPATCH_WHEN_TOTAL_REACHED)) - print $langs->trans("NoPredefinedProductToDispatch"); // No predefined line at all + print '
'.$langs->trans("NoPredefinedProductToDispatch").'
'; // No predefined line at all else - print $langs->trans("NoMorePredefinedProductToDispatch"); // No predefined line that remain to be dispatched. + print '
'.$langs->trans("NoMorePredefinedProductToDispatch").'
'; // No predefined line that remain to be dispatched. } print ''; diff --git a/htdocs/fourn/commande/info.php b/htdocs/fourn/commande/info.php index 5cd8510d854..d858dc7172c 100644 --- a/htdocs/fourn/commande/info.php +++ b/htdocs/fourn/commande/info.php @@ -27,6 +27,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; $langs->load("orders"); $langs->load("suppliers"); @@ -35,11 +36,44 @@ $langs->load('stocks'); $id=GETPOST('id','int'); $ref=GETPOST('ref','alpha'); +$action = GETPOST('action','alpha'); + +if (GETPOST('actioncode','array')) +{ + $actioncode=GETPOST('actioncode','array',3); + if (! count($actioncode)) $actioncode='0'; +} +else +{ + $actioncode=GETPOST("actioncode","alpha",3)?GETPOST("actioncode","alpha",3):(GETPOST("actioncode")=='0'?'0':(empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE)?'':$conf->global->AGENDA_DEFAULT_FILTER_TYPE)); +} +$search_agenda_label=GETPOST('search_agenda_label'); // Security check -$socid=''; -if (! empty($user->societe_id)) $socid=$user->societe_id; -$result = restrictedArea($user, 'fournisseur', $id, '', 'commande'); +$socid=0; +if ($user->societe_id) $socid=$user->societe_id; +$result=restrictedArea($user,'fournisseur',$id,'', 'commande'); + +if (!$user->rights->fournisseur->commande->lire) accessforbidden(); + + + + +/* + * Actions + */ + +$parameters=array('id'=>$id); +$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + +// Purge search criteria +if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETPOST("button_removefilter")) // All test are required to be compatible with all browsers +{ + $actioncode=''; + $search_agenda_label=''; +} + /* @@ -47,89 +81,143 @@ $result = restrictedArea($user, 'fournisseur', $id, '', 'commande'); */ $form = new Form($db); - -$now=dol_now(); +$object = new CommandeFournisseur($db); if ($id > 0 || ! empty($ref)) { - $soc = new Societe($db); - $object = new CommandeFournisseur($db); - - $result=$object->fetch($id,$ref); - if ($result >= 0) - { - $object->info($object->id); - - $soc->fetch($object->socid); - - $help_url='EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores'; - llxHeader('',$langs->trans("Order"),$help_url); - - $head = ordersupplier_prepare_head($object); - - $title=$langs->trans("SupplierOrder"); - dol_fiche_head($head, 'info', $title, 0, 'order'); - - - /* - * Commande - */ - - print ''; - - $linkback = ''.$langs->trans("BackToList").''; - - // Ref - print ''; - print ''; - print ''; - - // Fournisseur - print '"; - print ''; - print ''; - - // Statut - print ''; - print ''; - print '"; - - // Date - if ($object->methode_commande_id > 0) - { - print '"; - - if ($object->methode_commande) - { - print ''; - } - } - - print "
'.$langs->trans("Ref").''; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref'); - print '
'.$langs->trans("Supplier")."'.$soc->getNomUrl(1,'supplier').'
'.$langs->trans("Status").''; - print $object->getLibStatut(4); - print "
'.$langs->trans("Date").''; - if ($object->date_commande) - { - print dol_print_date($object->date_commande,"dayhourtext")."\n"; - } - print "
'.$langs->trans("Method").''.$object->getInputMethod().'
\n"; - print "
"; - - print '
'; - dol_print_object_info($object, 1); - print '
'; - - print ''; - } - else - { - /* Order not found */ - print "OrderNotFound"; - } + $object->fetch($id, $ref); + $object->fetch_thirdparty(); + $object->info($object->id); } +$title=$langs->trans("SupplierOrder").' - '.$object->ref.' '.$object->name; +if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->ref.' '.$object->name.' - '.$langs->trans("Info"); +$help_url='EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores'; +llxHeader('',$title,$help_url); + +$now=dol_now(); + +$head = ordersupplier_prepare_head($object); + + +dol_fiche_head($head, 'info', $langs->trans("SupplierOrder"), 0, 'order'); + + +// Supplier order card + +$linkback = ''.$langs->trans("BackToList").''; + +$morehtmlref='
'; +// Ref supplier +$morehtmlref.=$form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, 0, 'string', '', 0, 1); +$morehtmlref.=$form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, 0, 'string', '', null, null, '', 1); +// Thirdparty +$morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); +// Project +if (! empty($conf->projet->enabled)) +{ + $langs->load("projects"); + $morehtmlref.='
'.$langs->trans('Project') . ' '; + if ($user->rights->fournisseur->commande->creer) + { + if ($action != 'classify') + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $morehtmlref.=' : '; + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.='
'; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.='
'; + } else { + $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + } + } else { + if (! empty($object->fk_project)) { + $proj = new Project($db); + $proj->fetch($object->fk_project); + $morehtmlref.=''; + $morehtmlref.=$proj->ref; + $morehtmlref.=''; + } else { + $morehtmlref.=''; + } + } +} +$morehtmlref.='
'; + +dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + +print '
'; +print '
'; + +dol_print_object_info($object, 1); + +print '
'; + +print '
'; + +dol_fiche_end(); + + + + +// Actions buttons + +$out=''; +$permok=$user->rights->agenda->myactions->create; +if ($permok) +{ + $out.='&originid='.$object->id.'&origin=order_supplier'; +} + + +print '
'; + +if (! empty($conf->agenda->enabled)) +{ + if (! empty($user->rights->agenda->myactions->create) || ! empty($user->rights->agenda->allactions->create)) + { + print ''.$langs->trans("AddAction").''; + } + else + { + print ''.$langs->trans("AddAction").''; + } +} + +print '
'; + + +if (!empty($object->id)) +{ + $param='&id='.$object->id; + if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage; + if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; + + print load_fiche_titre($langs->trans("ActionsOnOrder"),'',''); + + // List of actions on element + /*include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; + $formactions=new FormActions($db); + $somethingshown=$formactions->showactions($object,'project',0);*/ + + // List of todo actions + //show_actions_todo($conf,$langs,$db,$object,null,0,$actioncode); + + // List of done actions + //show_actions_done($conf,$langs,$db,$object,null,0,$actioncode); + + // List of all actions + $filters=array(); + $filters['search_agenda_label']=$search_agenda_label; + show_actions_done($conf,$langs,$db,$object,null,0,$actioncode, '', $filters); +} + + llxFooter(); $db->close(); diff --git a/htdocs/install/mysql/data/llx_c_typent.sql b/htdocs/install/mysql/data/llx_c_typent.sql index 11b512f26c2..4365a2e99a6 100644 --- a/htdocs/install/mysql/data/llx_c_typent.sql +++ b/htdocs/install/mysql/data/llx_c_typent.sql @@ -43,6 +43,6 @@ insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 7, 'TE_RE insert into llx_c_typent (id,code,libelle,fk_country,active) values ( 8, 'TE_PRIVATE', 'Particulier', NULL, 1); insert into llx_c_typent (id,code,libelle,fk_country,active) values (100, 'TE_OTHER', 'Autres', NULL, 1); -- Argentina (country 23) -insert into llx_c_typent (id,code,libelle,fk_country,active) values (231, 'TE_A_RI', 'Responsable Inscripto', 23, 0); -insert into llx_c_typent (id,code,libelle,fk_country,active) values (232, 'TE_B_RNI', 'Responsable No Inscripto', 23, 0); -insert into llx_c_typent (id,code,libelle,fk_country,active) values (233, 'TE_C_FE', 'Consumidor Final/Exento', 23, 0); +insert into llx_c_typent (id,code,libelle,fk_country,active) values (231, 'TE_A_RI', 'Responsable Inscripto (typo A)', 23, 0); +insert into llx_c_typent (id,code,libelle,fk_country,active) values (232, 'TE_B_RNI', 'Responsable No Inscripto (typo B)', 23, 0); +insert into llx_c_typent (id,code,libelle,fk_country,active) values (233, 'TE_C_FE', 'Consumidor Final/Exento (typo C)', 23, 0); diff --git a/htdocs/install/mysql/migration/4.0.0-5.0.0.sql b/htdocs/install/mysql/migration/4.0.0-5.0.0.sql index b94d289de31..974184b5f58 100644 --- a/htdocs/install/mysql/migration/4.0.0-5.0.0.sql +++ b/htdocs/install/mysql/migration/4.0.0-5.0.0.sql @@ -230,6 +230,7 @@ ALTER TABLE llx_expensereport ADD INDEX idx_expensereport_fk_user_valid (fk_user ALTER TABLE llx_expensereport ADD INDEX idx_expensereport_fk_user_approve (fk_user_approve); ALTER TABLE llx_expensereport ADD INDEX idx_expensereport_fk_refuse (fk_user_approve); +DELETE FROM llx_actioncomm_resources WHERE fk_actioncomm not in (select id from llx_actioncomm); -- Sequence to removed duplicated values of llx_links. Use serveral times if you still have duplicate. drop table tmp_links_double; diff --git a/htdocs/install/mysql/migration/repair.sql b/htdocs/install/mysql/migration/repair.sql index 9f192a0d9cc..8d6c12b407f 100755 --- a/htdocs/install/mysql/migration/repair.sql +++ b/htdocs/install/mysql/migration/repair.sql @@ -143,6 +143,10 @@ delete from llx_element_element where sourcetype='facture' and fk_source not in delete from llx_element_element where sourcetype='commande' and fk_source not in (select rowid from llx_commande); +-- Fix: delete orphelin actioncomm_resources +DELETE FROM llx_actioncomm_resources WHERE fk_actioncomm not in (select id from llx_actioncomm); + + UPDATE llx_product SET canvas = NULL where canvas = 'default@product'; UPDATE llx_product SET canvas = NULL where canvas = 'service@product'; diff --git a/htdocs/install/step1.php b/htdocs/install/step1.php index 7f9c1a2fc4b..b323c970a9d 100644 --- a/htdocs/install/step1.php +++ b/htdocs/install/step1.php @@ -541,16 +541,20 @@ if (! $error && $db->connected && $action == "set") { if ($db->connected) { + $resultbis = 1; + // Create user - $tmpdolibarr_main_db_host = $dolibarr_main_db_host; + $result=$db->DDLCreateUser($dolibarr_main_db_host, $dolibarr_main_db_user, $dolibarr_main_db_pass, $dolibarr_main_db_name); + // Create user bis if ($databasefortest == 'mysql') { - if (! in_array($conf->db->host, array('127.0.0.1', 'localhost', 'localhost.local'))) $tmpdolibarr_main_db_host='%'; + if (! in_array($dolibarr_main_db_host, array('127.0.0.1', '::1', 'localhost', 'localhost.local'))) + { + $resultbis=$db->DDLCreateUser('%', $dolibarr_main_db_user, $dolibarr_main_db_pass, $dolibarr_main_db_name); + } } - $result=$db->DDLCreateUser($tmpdolibarr_main_db_host, $dolibarr_main_db_user, $dolibarr_main_db_pass, $dolibarr_main_db_name); - - if ($result > 0) + if ($result > 0 && $resultbis > 0) { print '
'; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 82ff69fe88a..4f029afd8d8 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -10,6 +10,9 @@ VersionUnknown=Unknown VersionRecommanded=Recommended FileCheck=Files integrity checker FileCheckDesc=This tool allows you to check the integrity of files of your application, comparing each files with the official ones. You can use this tool to detect if some files were modified by a hacker for example. +FileIntegrityIsStrictlyConformedWithReference=Files integrity is strictly conformed with the reference. +FileIntegritySomeFilesWereRemovedOrModified=Files integrity check has failed. Some files were modified of removed. +GlobalChecksum=Global checksum MakeIntegrityAnalysisFrom=Make integrity analysis of application files from LocalSignature=Embedded local signature (less reliable) RemoteSignature=Remote distant signature (more reliable) @@ -411,6 +414,7 @@ ModuleCompanyCodePanicum=Return an empty accountancy code. ModuleCompanyCodeDigitaria=Accountancy code depends on third party code. The code is composed of the character "C" in the first position followed by the first 5 characters of the third party code. Use3StepsApproval=By default, Purchase Orders need to be created and approved by 2 different users (one step/user to create and one step/user to approve. Note that if user has both permission to create and approve, one step/user will be enough). You can ask with this option to introduce a third step/user approval, if amount is higher than a dedicated value (so 3 steps will be necessary: 1=validation, 2=first approval and 3=second approval if amount is enough).
Set this to empty if one approval (2 steps) is enough, set it to a very low value (0.1) if a second approval (3 steps) is always required. UseDoubleApproval=Use a 3 steps approval when amount (without tax) is higher than... +WarningPHPMail=WARNING: Some email providers (like Yahoo) does not allow you to send an email from another server than the Yahoo server if the email address used as a sender is your Yahoo email (like myemail@yahoo.com, myemail@yahoo.fr, ...). Your current setup use the server of the application to send email, so some recipients (the one compatible with the restrictive DMARC protocol), will ask Yahoo if they can accept your email and Yahoo will respond "no" because the server is not a server owned by Yahoo, so few of your sent Emails may not be accepted.
If your Email provider (like Yahoo) has this restriction, you must change Email setup to choose the other method "SMTP server" and enter the SMTP server and credentials provided by your Email provider (ask your EMail provider to get SMTP credentials for your account). # Modules Module0Name=Users & groups diff --git a/htdocs/langs/eu_ES/mails.lang b/htdocs/langs/eu_ES/mails.lang index 1d3552bb262..fa189fd4bf3 100644 --- a/htdocs/langs/eu_ES/mails.lang +++ b/htdocs/langs/eu_ES/mails.lang @@ -27,7 +27,7 @@ DeleteAMailing=Delete an emailing PreviewMailing=Preview emailing CreateMailing=Create emailing TestMailing=Test email -ValidMailing=Valid emailing +ValidMailing=Validate emailing MailingStatusDraft=Draft MailingStatusValidated=Validated MailingStatusSent=Sent diff --git a/htdocs/projet/info.php b/htdocs/projet/info.php index 8b6bf3c0288..0c37f999259 100644 --- a/htdocs/projet/info.php +++ b/htdocs/projet/info.php @@ -48,7 +48,6 @@ $search_agenda_label=GETPOST('search_agenda_label'); // Security check $socid=0; -$id = GETPOST("id",'int'); if ($user->societe_id) $socid=$user->societe_id; $result=restrictedArea($user,'projet',$id,''); @@ -80,11 +79,6 @@ if (GETPOST("button_removefilter_x") || GETPOST("button_removefilter.x") || GETP $form = new Form($db); $object = new Project($db); -$title=$langs->trans("Project").' - '.$object->ref.' '.$object->name; -if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->ref.' '.$object->name.' - '.$langs->trans("Info"); -$help_url="EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos"; -llxHeader("",$title,$help_url); - if ($id > 0 || ! empty($ref)) { $object->fetch($id, $ref); @@ -92,6 +86,11 @@ if ($id > 0 || ! empty($ref)) $object->info($object->id); } +$title=$langs->trans("Project").' - '.$object->ref.' '.$object->name; +if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/projectnameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->ref.' '.$object->name.' - '.$langs->trans("Info"); +$help_url="EN:Module_Projects|FR:Module_Projets|ES:Módulo_Proyectos"; +llxHeader("",$title,$help_url); + $head = project_prepare_head($object); dol_fiche_head($head, 'agenda', $langs->trans("Project"), 0, ($object->public?'projectpub':'project')); @@ -162,6 +161,10 @@ print ''; if (!empty($object->id)) { + $param='&id='.$object->id; + if (! empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.='&contextpage='.$contextpage; + if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit; + print load_fiche_titre($langs->trans("ActionsOnProject"),'',''); // List of actions on element diff --git a/htdocs/resource/element_resource.php b/htdocs/resource/element_resource.php index 87354c6fd9d..14475c58203 100644 --- a/htdocs/resource/element_resource.php +++ b/htdocs/resource/element_resource.php @@ -51,13 +51,13 @@ $hookmanager->initHooks(array('element_resource')); $object->available_resources = array('dolresource'); // Get parameters -$id = GETPOST('id','int'); -$ref = GETPOST('ref','alpha'); +$id = GETPOST('id','int'); // resource id +$element_id = GETPOST('element_id','int'); // element_id +$element_ref = GETPOST('ref','alpha'); // element ref +$element = GETPOST('element','alpha'); // element_type $action = GETPOST('action','alpha'); $mode = GETPOST('mode','alpha'); $lineid = GETPOST('lineid','int'); -$element = GETPOST('element','alpha'); // element_type -$element_id = GETPOST('element_id','int'); $resource_id = GETPOST('fk_resource','int'); $resource_type = GETPOST('resource_type','alpha'); $busy = GETPOST('busy','int'); @@ -66,7 +66,7 @@ $cancel = GETPOST('cancel','alpha'); $confirm = GETPOST('confirm','alpha'); $socid = GETPOST('socid','int'); -if ($socid > 0) +if ($socid > 0) // Special for thirdparty { $element_id = $socid; $element = 'societe'; @@ -183,11 +183,11 @@ else // Specific to agenda module - if ($element_id && $element == 'action') + if (($element_id || $element_ref) && $element == 'action') { require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php'; - $act = fetchObjectByElement($element_id,$element); + $act = fetchObjectByElement($element_id,$element, $element_ref); if (is_object($act)) { @@ -212,16 +212,10 @@ else $linkback.=$out; - dol_banner_tab($act, 'element_id', $linkback, ($user->societe_id?0:1), 'id', 'ref', '', "&element=".$element); + dol_banner_tab($act, 'element_id', $linkback, ($user->societe_id?0:1), 'id', 'ref', '', '&element='.$element, 0, '', ''); print '
'; - // Ref - /*print '
'.$langs->trans("Ref").''; - print $form->showrefnav($act, 'id', $linkback, ($user->societe_id?0:1), 'id', 'ref', ''); - print '
'; // Type @@ -248,11 +242,6 @@ else if ($act->percentage > 0 && $act->percentage < 100 && $act->datef && $act->datef < ($now- $delay_warning)) print img_warning($langs->trans("Late")); print ''; - // Status - /*print '';*/ - // Location if (empty($conf->global->AGENDA_DISABLE_LOCATION)) { @@ -301,9 +290,9 @@ else } // Specific to thirdparty module - if ($element_id && $element == 'societe') + if (($element_id || $element_ref) && $element == 'societe') { - $socstatic = fetchObjectByElement($element_id, $element); + $socstatic = fetchObjectByElement($element_id, $element, $element_ref); if (is_object($socstatic)) { $savobject = $object; @@ -314,7 +303,7 @@ else dol_fiche_head($head, 'resources', $langs->trans("ThirdParty"), 0, 'company'); - dol_banner_tab($socstatic, 'socid', '', ($user->societe_id ? 0 : 1), 'rowid', 'nom'); + dol_banner_tab($socstatic, 'socid', '', ($user->societe_id ? 0 : 1), 'rowid', 'nom', '', '&element='.$element); print '
'; @@ -337,12 +326,12 @@ else } // Specific to fichinter module - if ($element_id && $element == 'fichinter') + if (($element_id || $element_ref) && $element == 'fichinter') { require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php'; $fichinter = new Fichinter($db); - $fichinter->fetch($element_id); + $fichinter->fetch($element_id, $element_ref); $fichinter->fetch_thirdparty(); if (is_object($fichinter)) @@ -395,7 +384,7 @@ else } $morehtmlref.='
'; - dol_banner_tab($fichinter, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + dol_banner_tab($fichinter, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, '&element='.$element, 0, '', '', 1); dol_fiche_end(); } @@ -403,7 +392,7 @@ else // hook for other elements linked - $parameters=array('element'=>$element, 'element_id'=>$element_id ); + $parameters=array('element'=>$element, 'element_id'=>$element_id, 'element_ref'=>$element_ref); $reshook=$hookmanager->executeHooks('printElementTab',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index 443e402674f..d91823dfcf4 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -1408,17 +1408,6 @@ if ($action == 'create') print '
'.$langs->trans("Status").' / '.$langs->trans("Percentage").''; - print $act->getLibStatut(4); - print '
'; - // Ref - /* - print ''; - - // Company - print ''; - print ''; - */ - // Payment term print '
' . $langs->trans('Ref') . ''; - print $form->showrefnav($object, 'ref', $linkback, 1, 'ref', 'ref', ''); - print '
' . $langs->trans('Supplier') . '' . $soc->getNomUrl(1) . '
'; print '
'; diff --git a/htdocs/supplier_proposal/document.php b/htdocs/supplier_proposal/document.php index d8c51a45152..2f49951c844 100644 --- a/htdocs/supplier_proposal/document.php +++ b/htdocs/supplier_proposal/document.php @@ -93,26 +93,70 @@ if ($object->id > 0) $totalsize+=$file['size']; } + + // Supplier proposal card + $linkback = '' . $langs->trans("BackToList") . ''; + + + $morehtmlref='
'; + // Ref supplier + //$morehtmlref.=$form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', 0, 1); + //$morehtmlref.=$form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', null, null, '', 1); + // Thirdparty + $morehtmlref.=$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); + // Project + if (! empty($conf->projet->enabled)) + { + $langs->load("projects"); + $morehtmlref.='
'.$langs->trans('Project') . ' '; + if ($user->rights->supplier_proposal->creer) + { + if ($action != 'classify') + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $morehtmlref.=' : '; + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.='
'; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.='
'; + } else { + $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + } + } else { + if (! empty($object->fk_project)) { + $proj = new Project($db); + $proj->fetch($object->fk_project); + $morehtmlref.=''; + $morehtmlref.=$proj->ref; + $morehtmlref.=''; + } else { + $morehtmlref.=''; + } + } + } + $morehtmlref.='
'; + + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + + print '
'; + print '
'; + print ''; - $linkback=''.$langs->trans("BackToList").''; - - // Ref - print ''; - - // Supplier - print ""; - print ''; - - print ''; - print ''; + print ''; + print ''; print '
'.$langs->trans('Ref').''; - print $form->showrefnav($object,'ref',$linkback,1,'ref','ref',''); - print '
".$langs->trans("Supplier")."'.$object->thirdparty->getNomUrl(1).'
'.$langs->trans("NbOfAttachedFiles").''.count($filearray).'
'.$langs->trans("TotalSizeOfAttachedFiles").''.$totalsize.' '.$langs->trans("bytes").'
'.$langs->trans("NbOfAttachedFiles").''.count($filearray).'
'.$langs->trans("TotalSizeOfAttachedFiles").''.$totalsize.' '.$langs->trans("bytes").'
'; print '
'; - + + dol_fiche_end(); + $modulepart = 'supplier_proposal'; $permission = $user->rights->supplier_proposal->creer; $permtoedit = $user->rights->supplier_proposal->creer; diff --git a/htdocs/supplier_proposal/info.php b/htdocs/supplier_proposal/info.php index 9c3f8967bd5..de98ed5be65 100644 --- a/htdocs/supplier_proposal/info.php +++ b/htdocs/supplier_proposal/info.php @@ -49,10 +49,65 @@ $object = new SupplierProposal($db); $object->fetch($id); $object->fetch_thirdparty(); +$object->info($object->id); + + $head = supplier_proposal_prepare_head($object); dol_fiche_head($head, 'info', $langs->trans('CommRequest'), 0, 'supplier_proposal'); -$object->info($object->id); +// Supplier proposal card +$linkback = '' . $langs->trans("BackToList") . ''; + + +$morehtmlref='
'; +// Ref supplier +//$morehtmlref.=$form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', 0, 1); +//$morehtmlref.=$form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', null, null, '', 1); +// Thirdparty +$morehtmlref.=$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); +// Project +if (! empty($conf->projet->enabled)) +{ + $langs->load("projects"); + $morehtmlref.='
'.$langs->trans('Project') . ' '; + if ($user->rights->supplier_proposal->creer) + { + if ($action != 'classify') + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $morehtmlref.=' : '; + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.='
'; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.='
'; + } else { + $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + } + } else { + if (! empty($object->fk_project)) { + $proj = new Project($db); + $proj->fetch($object->fk_project); + $morehtmlref.=''; + $morehtmlref.=$proj->ref; + $morehtmlref.=''; + } else { + $morehtmlref.=''; + } + } +} +$morehtmlref.='
'; + + +dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + +print '
'; +print '
'; + +print '
'; print '
'; dol_print_object_info($object); @@ -60,6 +115,7 @@ print '
'; print '
'; +dol_fiche_end(); llxFooter(); $db->close(); diff --git a/htdocs/supplier_proposal/note.php b/htdocs/supplier_proposal/note.php index 981b654599d..b764372848d 100644 --- a/htdocs/supplier_proposal/note.php +++ b/htdocs/supplier_proposal/note.php @@ -45,19 +45,18 @@ $object = new SupplierProposal($db); -/******************************************************************************/ -/* Actions */ -/******************************************************************************/ +/* + * Actions + */ $permissionnote=$user->rights->supplier_proposal->creer; // Used by the include of actions_setnotes.inc.php include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once - -/******************************************************************************/ -/* Affichage fiche */ -/******************************************************************************/ +/* + * View + */ llxHeader('',$langs->trans('CommRequest'),'EN:Ask_Price_Supplier|FR:Demande_de_prix_fournisseur'); @@ -71,47 +70,71 @@ if ($id > 0 || ! empty($ref)) if ($object->fetch($id, $ref)) { + $object->fetch_thirdparty(); + $societe = new Societe($db); if ( $societe->fetch($object->socid) ) { $head = supplier_proposal_prepare_head($object); dol_fiche_head($head, 'note', $langs->trans('CommRequest'), 0, 'supplier_proposal'); - print ''; - $linkback = ''.$langs->trans('BackToList').''; - - // Ref - print ''; + // Supplier proposal card + $linkback = '' . $langs->trans("BackToList") . ''; - // Customer - if ( is_null($object->thirdparty) ) - $object->fetch_thirdparty(); - print ""; - print ''; - // Payment term - print ''; - print ''; - print ''; - print ''; + $morehtmlref='
'; + // Ref supplier + //$morehtmlref.=$form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', 0, 1); + //$morehtmlref.=$form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', null, null, '', 1); + // Thirdparty + $morehtmlref.=$langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); + // Project + if (! empty($conf->projet->enabled)) + { + $langs->load("projects"); + $morehtmlref.='
'.$langs->trans('Project') . ' '; + if ($user->rights->supplier_proposal->creer) + { + if ($action != 'classify') + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $morehtmlref.=' : '; + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.='
'; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.=''; + } else { + $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + } + } else { + if (! empty($object->fk_project)) { + $proj = new Project($db); + $proj->fetch($object->fk_project); + $morehtmlref.=''; + $morehtmlref.=$proj->ref; + $morehtmlref.=''; + } else { + $morehtmlref.=''; + } + } + } + $morehtmlref.='
'; - print "
'.$langs->trans('Ref').''; - print $form->showrefnav($object,'ref',$linkback,1,'ref','ref',''); - print '
".$langs->trans("Supplier")."'.$object->thirdparty->getNomUrl(1).'
'; - print ''; - print '
'; - print $langs->trans('PaymentConditionsShort'); - print '
'; - print '
'; - $form->form_conditions_reglement($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->cond_reglement_id, 'none', 1); - print '
'.$langs->trans('SupplierProposalDate').''; - print dol_print_date($object->date_livraison,'daytext'); - print '
"; - - print '
'; - + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + + print '
'; + print '
'; + + $cssclass="titlefield"; include DOL_DOCUMENT_ROOT.'/core/tpl/notes.tpl.php'; + + print '
'; dol_fiche_end(); } diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index c5d9dd13189..0e278019df6 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -254,6 +254,7 @@ a.tab { font-weight: bold !important; } a:link, a:visited, a:hover, a:active { font-family: ; font-weight: normal; color: rgb(); text-decoration: none; } a:hover { text-decoration: underline; color: rgb(); } +a.commonlink { color: rgb() !important; text-decoration: none; } input, input.flat, textarea, textarea.flat, form.flat select, select, select.flat, .dataTables_length label select { background-color: #FFF; @@ -967,12 +968,13 @@ div.attacharea { } div.arearef { - /*border-bottom: 1px solid #bbb;*/ padding-top: 2px; - padding-bottom: 5px; - /*padding-right: 3px; - padding-left: 2px;*/ margin-bottom: 10px; + padding-bottom: 7px; +} +div.arearefnobottom { + padding-top: 2px; + padding-bottom: 4px; } div.heightref { min-height: 80px; @@ -1961,15 +1963,8 @@ div.tabBar { color: #; padding-top: 16px; padding-left: 0px; padding-right: 0px; - /*padding-left: 18px; - padding-right: 18px;*/ padding-bottom: 14px; margin: 0px 0px 14px 0px; - /*-moz-border-radius:4px; - -webkit-border-radius: 4px; - border-radius: 4px; - border-right: 1px solid #AAA; - border-left: 1px solid #AAA; */ border-top: 1px solid #BBB; border-bottom: 1px solid #AAA; width: auto; @@ -2456,11 +2451,16 @@ table.liste tr, table.noborder tr, div.noborder form { table.liste th, table.noborder th, table.noborder tr.liste_titre td, table.noborder tr.box_titre td { padding: 8px 2px 8px 3px; /* t r b l */ } -tr.box_titre .nobordernopadding td { padding: 0px ! important; } -table.liste td, table.noborder td, div.noborder form, div.noborder form div { - padding: 5px 2px 5px 3px; /* t r b l */ +table.liste td, table.noborder td, div.noborder form div { + padding: 8px 2px 8px 3px; /* t r b l */ +} +div.liste_titre_bydiv .divsearchfield { + padding: 2px 1px 2px 0px; /* t r b l */ } +tr.box_titre .nobordernopadding td { + padding: 0px ! important; +} table.nobordernopadding { border-collapse: collapse !important; border: 0px; @@ -2725,7 +2725,7 @@ tr.even td, tr.pair td, tr.odd td, tr.impair td, form.odd div.tagtd, form.impair padding: 5px 2px 5px 3px; border-bottom: 1px solid #ddd; } -tr.even:last-of-type td, tr.pair:last-of-type td, tr.odd:last-of-type td, tr.impair:last-of-type td { +form.tagtr:last-of-type div.tagtd, tr.even:last-of-type td, tr.pair:last-of-type td, tr.odd:last-of-type td, tr.impair:last-of-type td { border-bottom: 0px !important; } tr.even td .nobordernopadding tr td, tr.pair td .nobordernopadding tr td, tr.impair td .nobordernopadding tr td, tr.odd td .nobordernopadding tr td { @@ -2737,26 +2737,18 @@ td.nobottom, td.nobottom { div.liste_titre .tagtd { vertical-align: middle; } -div.liste_titre { +/*div.liste_titre { box-shadow: 2px 2px 4px #CCC; -} +}*/ div.liste_titre { min-height: 26px !important; /* We cant use height because it's a div and it should be higher if content is more. but min-height does not work either for div */ padding-top: 2px; padding-bottom: 2px; - /*border-right-width: 1px; - border-right-color: #BBB; - border-right-style: solid; - - border-left-width: 1px; - border-left-color: #BBB; - border-left-style: solid;*/ - - border-top-width: 1px; +/* border-top-width: 1px; border-top-color: #BBB; - border-top-style: solid; + border-top-style: solid;*/ } div.liste_titre_bydiv { border-top-width: px; @@ -2773,7 +2765,7 @@ tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel, tabl { height: 26px !important; } -div.liste_titre, tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel, table.dataTable thead tr +div.liste_titre_bydiv, .liste_titre div.tagtr, tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.liste_titre_sel, table.dataTable thead tr { background-image: -o-linear-gradient(bottom, rgba(0,0,0,0.1) 0%, rgba(,0.4) 100%); @@ -2791,11 +2783,11 @@ div.liste_titre, tr.liste_titre, tr.liste_titre_sel, form.liste_titre, form.list border-bottom: 1px solid #FDFFFF; text-align: ; } -tr.liste_titre th, tr.liste_titre td, th.liste_titre, form.liste_titre div, div.liste_titre +tr.liste_titre th, tr.liste_titre td, th.liste_titre { border-bottom: 1px solid #; } -tr.liste_titre th, th.liste_titre, tr.liste_titre td, td.liste_titre, form.liste_titre div, div.liste_titre +tr.liste_titre th, th.liste_titre, tr.liste_titre td, td.liste_titre, form.liste_titre div { font-family: ; font-weight: ; @@ -2819,7 +2811,7 @@ tr.liste_titre_topborder td { .liste_titre td a.notasortlink:hover { background: transparent; } -tr.liste_titre td.liste_titre { /* For last line of table headers only */ +tr.liste_titre td.liste_titre, form.liste_titre div.tagtd { /* For last line of table headers only */ border-bottom: 1px solid rgb(); } diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index fd22ef5520d..f45b0355880 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -254,6 +254,7 @@ a.tab { font-weight: bold !important; } a:link, a:visited, a:hover, a:active { font-family: ; font-weight: normal; color: rgb(); text-decoration: none; } a:hover { text-decoration: underline; color: rgb(); } +a.commonlink { color: rgb() !important; text-decoration: none; } input, input.flat, textarea, textarea.flat, form.flat select, select, select.flat, .dataTables_length label select { background-color: #FDFDFD; @@ -1016,13 +1017,14 @@ div.attacharea { padding-bottom: 10px; } div.arearef { - /*border-bottom: 1px solid #bbb;*/ padding-top: 2px; padding-bottom: 5px; - /*padding-right: 3px; - padding-left: 2px;*/ margin-bottom: 10px; } +div.arearefnobottom { + padding-top: 2px; + padding-bottom: 4px; +} div.heightref { min-height: 80px; } @@ -2379,6 +2381,13 @@ table.noborder td, div.noborder form, div.noborder form div { padding: 4px 2px 4px 3px; /* t r b l */ } +table.liste td, table.noborder td, div.noborder form div { + padding: 8px 2px 8px 3px; /* t r b l */ +} +div.liste_titre_bydiv .divsearchfield { + padding: 2px 1px 2px 0px; /* t r b l */ +} + table.nobordernopadding { border-collapse: collapse !important; border: 0px; diff --git a/test/phpunit/RestAPIUserTest.php b/test/phpunit/RestAPIUserTest.php index a92bc80ed63..a79739fef43 100644 --- a/test/phpunit/RestAPIUserTest.php +++ b/test/phpunit/RestAPIUserTest.php @@ -207,9 +207,9 @@ class RestAPIUserTest extends PHPUnit_Framework_TestCase print __METHOD__." Result code for creating user ".var_export($result, true)."\n"; print __METHOD__." curl_error_no: ".$result['curl_error_no']."\n"; $this->assertEquals($result['curl_error_no'],''); - $object=json_decode($result['content'], true); - $this->assertNotNull($object, "Parsing of json result must no be null"); - $this->assertGreaterThan(0, $object['id'], $object['error']['code'].' '.$object['error']['message']); + $resid=json_decode($result['content'], true); + $this->assertNotNull($resid, "Parsing of json result must no be null"); + $this->assertGreaterThan(0, $resid, $object['error']['code'].' '.$object['error']['message']); // attempt to create duplicated user print __METHOD__." Request POST url=".$url."\n";