diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index c5128942830..1b516e1c94e 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -2063,9 +2063,10 @@ class Adherent extends CommonObject * @param string $mode ''=Show firstname+lastname as label (using default order), 'firstname'=Show only firstname, 'login'=Show login, 'ref'=Show ref * @param string $morecss Add more css on link * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking + * @param int $notooltip 1=Disable tooltip * @return string Chaine avec URL */ - public function getNomUrl($withpictoimg = 0, $maxlen = 0, $option = 'card', $mode = '', $morecss = '', $save_lastsearch_value = -1) + public function getNomUrl($withpictoimg = 0, $maxlen = 0, $option = 'card', $mode = '', $morecss = '', $save_lastsearch_value = -1, $notooltip = 0) { global $conf, $langs; diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php index 455175220a8..40514cd1890 100644 --- a/htdocs/admin/commande.php +++ b/htdocs/admin/commande.php @@ -438,7 +438,6 @@ foreach ($dirmodels as $reldir) if ($modulequalified) { - $var = !$var; print '
| '.$langs->trans("Statistics").' | attributes[$this->table_element]['required'][$key])) $out .= ' fieldrequired'; $out .= '">'; - if (! empty($extrafields->attributes[$object->table_element]['help'][$key])) $out .= $form->textwithpicto($labeltoshow, $extrafields->attributes[$object->table_element]['help'][$key]); + if (! empty($extrafields->attributes[$this->table_element]['help'][$key])) $out .= $form->textwithpicto($labeltoshow, $extrafields->attributes[$this->table_element]['help'][$key]); else $out .= $labeltoshow; $out .= ' | '; $html_id = !empty($this->id) ? $this->element.'_extras_'.$key.'_'.$this->id : ''; + $out .=''; + //$out .=' | '; switch($mode) { case "view": @@ -6669,6 +6682,11 @@ abstract class CommonObject $out .= ' | '; + /*for($ii = 0; $ii < ($colspan - 1); $ii++) + { + $out .=''; + }*/ + if (! empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && (($e % 2) == 1)) $out .= ''; else $out .= ''; $e++; diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 3c03f9ea14c..b85056fe5e8 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -552,9 +552,6 @@ class Conf if (! isset($this->global->MAIN_PDF_DASH_BETWEEN_LINES)) $this->global->MAIN_PDF_DASH_BETWEEN_LINES=1; // use dash between lines if (! isset($this->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) $this->global->PDF_ALLOW_HTML_FOR_FREE_TEXT=1; // allow html content into free footer text - // Set default value to MAIN_SHOW_LOGO - if (! isset($this->global->MAIN_SHOW_LOGO)) $this->global->MAIN_SHOW_LOGO=1; - // Default max file size for upload $this->maxfilesize = (empty($this->global->MAIN_UPLOAD_DOC) ? 0 : (int) $this->global->MAIN_UPLOAD_DOC * 1024); diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index c92ae311141..0a9f98b4afd 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -274,9 +274,10 @@ class ExtraFields * @param string $perms Permission * @param string $list Into list view by default * @param string $computed Computed value + * @param string $help Help on tooltip * @return int <=0 if KO, >0 if OK */ - private function create($attrname, $type = 'varchar', $length = 255, $elementtype = 'member', $unique = 0, $required = 0, $default_value = '', $param = '', $perms = '', $list = '0', $computed = '') + private function create($attrname, $type = 'varchar', $length = 255, $elementtype = 'member', $unique = 0, $required = 0, $default_value = '', $param = '', $perms = '', $list = '0', $computed = '', $help = '') { if ($elementtype == 'thirdparty') $elementtype='societe'; if ($elementtype == 'contact') $elementtype='socpeople'; diff --git a/htdocs/core/class/fiscalyear.class.php b/htdocs/core/class/fiscalyear.class.php index 5593b4a90a4..90d824b7263 100644 --- a/htdocs/core/class/fiscalyear.class.php +++ b/htdocs/core/class/fiscalyear.class.php @@ -63,28 +63,28 @@ class Fiscalyear extends CommonObject * @var string fiscal year label */ public $label; - + /** * Date start (date_start) * * @var integer */ public $date_start; - + /** * Date end (date_end) * * @var integer */ public $date_end; - + /** * Date creation record (datec) * * @var integer */ public $datec; - + public $statut; // 0=open, 1=closed /** diff --git a/htdocs/core/class/lessc.class.php b/htdocs/core/class/lessc.class.php index f6a9208cadf..396991b6612 100644 --- a/htdocs/core/class/lessc.class.php +++ b/htdocs/core/class/lessc.class.php @@ -3058,7 +3058,7 @@ class lessc_parser { $content[] = $m[1]; if ($m[2] == "@{") { $this->count -= strlen($m[2]); - if ($this->interpolation($inter, false)) { + if ($this->interpolation($inter)) { $content[] = $inter; } else { $this->count += strlen($m[2]); @@ -3310,7 +3310,7 @@ class lessc_parser { continue; } - if ($this->interpolation($inter, false)) { + if ($this->interpolation($inter)) { $attrParts[] = $inter; $hasInterpolation = true; continue; diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 0c72fe35fab..3bbedb91076 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -1023,22 +1023,16 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable { case UPLOAD_ERR_INI_SIZE: // 1 return 'ErrorFileSizeTooLarge'; - break; case UPLOAD_ERR_FORM_SIZE: // 2 return 'ErrorFileSizeTooLarge'; - break; case UPLOAD_ERR_PARTIAL: // 3 return 'ErrorPartialFile'; - break; case UPLOAD_ERR_NO_TMP_DIR: // return 'ErrorNoTmpDir'; - break; case UPLOAD_ERR_CANT_WRITE: return 'ErrorFailedToWriteInDir'; - break; case UPLOAD_ERR_EXTENSION: return 'ErrorUploadBlockedByAddon'; - break; default: break; } diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index b321c0da621..438ff8246ea 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -53,8 +53,8 @@ function print_auguria_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout if (empty($noout)) print_start_menu_array_auguria(); - $usemenuhider = 1; global $usemenuhider; + $usemenuhider = 1; // Show/Hide vertical menu if ($mode != 'jmobile' && $mode != 'topnb' && $usemenuhider && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) @@ -265,8 +265,8 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t $mainmenu=($forcemainmenu?$forcemainmenu:$_SESSION["mainmenu"]); $leftmenu=($forceleftmenu?'':(empty($_SESSION["leftmenu"])?'none':$_SESSION["leftmenu"])); - $usemenuhider = 0; global $usemenuhider; + $usemenuhider = 0; // Show logo company if (empty($noout) && ! empty($conf->global->MAIN_SHOW_LOGO) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index e2e977b1321..9efb4dd1e27 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -915,16 +915,16 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers", $langs->trans("List"), 1, $user->rights->fournisseur->commande->lire); if ($usemenuhider || empty($leftmenu) || $leftmenu=="orders_suppliers") { - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=0", $langs->trans("StatusOrderDraftShort"), 2, $user->rights->fournisseur->commande->lire); - if (empty($conf->global->SUPPLIER_ORDER_HIDE_VALIDATED)) $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=1", $langs->trans("StatusOrderValidated"), 2, $user->rights->fournisseur->commande->lire); - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=2", $langs->trans("StatusOrderApprovedShort"), 2, $user->rights->fournisseur->commande->lire); - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=3", $langs->trans("StatusOrderOnProcessShort"), 2, $user->rights->fournisseur->commande->lire); - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=4", $langs->trans("StatusOrderReceivedPartiallyShort"), 2, $user->rights->fournisseur->commande->lire); - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=5", $langs->trans("StatusOrderReceivedAll"), 2, $user->rights->fournisseur->commande->lire); - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=6,7", $langs->trans("StatusOrderCanceled"), 2, $user->rights->fournisseur->commande->lire); - $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=9", $langs->trans("StatusOrderRefused"), 2, $user->rights->fournisseur->commande->lire); + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=0", $langs->trans("StatusSupplierOrderDraftShort"), 2, $user->rights->fournisseur->commande->lire); + if (empty($conf->global->SUPPLIER_ORDER_HIDE_VALIDATED)) $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=1", $langs->trans("StatusSupplierOrderValidated"), 2, $user->rights->fournisseur->commande->lire); + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=2", $langs->trans("StatusSupplierOrderApprovedShort"), 2, $user->rights->fournisseur->commande->lire); + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=3", $langs->trans("StatusSupplierOrderOnProcessShort"), 2, $user->rights->fournisseur->commande->lire); + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=4", $langs->trans("StatusSupplierOrderReceivedPartiallyShort"), 2, $user->rights->fournisseur->commande->lire); + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=5", $langs->trans("StatusSupplierOrderReceivedAll"), 2, $user->rights->fournisseur->commande->lire); + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=6,7", $langs->trans("StatusSupplierOrderCanceled"), 2, $user->rights->fournisseur->commande->lire); + $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&statut=9", $langs->trans("StatusSupplierOrderRefused"), 2, $user->rights->fournisseur->commande->lire); } - // Billed is another field. We should add instead a dedicated filter on list. if ($usemenuhider || empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&billed=1", $langs->trans("StatusOrderBilled"), 2, $user->rights->fournisseur->commande->lire); + // Billed is another field. We should add instead a dedicated filter on list. if ($usemenuhider || empty($leftmenu) || $leftmenu=="orders_suppliers") $newmenu->add("/fourn/commande/list.php?leftmenu=orders_suppliers&billed=1", $langs->trans("Billed"), 2, $user->rights->fournisseur->commande->lire); $newmenu->add("/commande/stats/index.php?leftmenu=orders_suppliers&mode=supplier", $langs->trans("Statistics"), 1, $user->rights->fournisseur->commande->lire); @@ -1580,8 +1580,17 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM $langs->load("mrp"); $newmenu->add("", $langs->trans("MenuBOM"), 0, $user->rights->bom->read, '', $mainmenu, 'bom'); - $newmenu->add("/bom/bom_card.php?leftmenu=bom&action=create", $langs->trans("NewBOM"), 1, $user->rights->bom->write); - $newmenu->add("/bom/bom_list.php?leftmenu=bom", $langs->trans("List"), 1, $user->rights->bom->read); + $newmenu->add("/bom/bom_card.php?leftmenu=bom&action=create", $langs->trans("NewBOM"), 1, $user->rights->bom->write, '', $mainmenu, 'bom'); + $newmenu->add("/bom/bom_list.php?leftmenu=bom", $langs->trans("List"), 1, $user->rights->bom->read, '', $mainmenu, 'bom'); + } + + if (! empty($conf->mrp->enabled)) + { + $langs->load("mrp"); + + $newmenu->add("", $langs->trans("MenuMRP"), 0, $user->rights->mrp->read, '', $mainmenu, 'mo'); + $newmenu->add("/mrp/mo_card.php?leftmenu=mo&action=create", $langs->trans("NewMO"), 1, $user->rights->mrp->write, '', $mainmenu, 'mo'); + $newmenu->add("/mrp/mo_list.php?leftmenu=mo", $langs->trans("List"), 1, $user->rights->mrp->read, '', $mainmenu, 'mo'); } } diff --git a/htdocs/core/menus/standard/empty.php b/htdocs/core/menus/standard/empty.php index 1898d67ad39..964681a962b 100644 --- a/htdocs/core/menus/standard/empty.php +++ b/htdocs/core/menus/standard/empty.php @@ -51,12 +51,15 @@ class MenuManager /** - * Load this->tabMenu - * - * @return void + * Load this->tabMenu + * + * @param string $forcemainmenu To force mainmenu to load + * @param string $forceleftmenu To force leftmenu to load + * @return void */ - public function loadMenu() + public function loadMenu($forcemainmenu = '', $forceleftmenu = '') { + // Do nothing } diff --git a/htdocs/core/modules/import/import_csv.modules.php b/htdocs/core/modules/import/import_csv.modules.php index 606b23e2767..0888e5b84bf 100644 --- a/htdocs/core/modules/import/import_csv.modules.php +++ b/htdocs/core/modules/import/import_csv.modules.php @@ -761,7 +761,7 @@ class ImportCsv extends ModeleImports $lastinsertid = $res->rowid; $last_insert_id_array[$tablename] = $lastinsertid; } elseif($resql->num_rows > 1) { - $this->errors[$error]['lib']=$langs->trans('MultipleRecordFoundWithTheseFilters', implode($filters, ', ')); + $this->errors[$error]['lib']=$langs->trans('MultipleRecordFoundWithTheseFilters', implode(', ', $filters)); $this->errors[$error]['type']='SQL'; $error++; } else { diff --git a/htdocs/core/modules/import/import_xlsx.modules.php b/htdocs/core/modules/import/import_xlsx.modules.php index 66670247a4c..253622d115f 100644 --- a/htdocs/core/modules/import/import_xlsx.modules.php +++ b/htdocs/core/modules/import/import_xlsx.modules.php @@ -782,7 +782,7 @@ class ImportXlsx extends ModeleImports $lastinsertid = $res->rowid; $last_insert_id_array[$tablename] = $lastinsertid; } elseif($resql->num_rows > 1) { - $this->errors[$error]['lib']=$langs->trans('MultipleRecordFoundWithTheseFilters', implode($filters, ', ')); + $this->errors[$error]['lib']=$langs->trans('MultipleRecordFoundWithTheseFilters', implode(', ', $filters)); $this->errors[$error]['type']='SQL'; $error++; } else { diff --git a/htdocs/core/modules/modBlockedLog.class.php b/htdocs/core/modules/modBlockedLog.class.php index d9833e2978e..b582d5e2165 100644 --- a/htdocs/core/modules/modBlockedLog.class.php +++ b/htdocs/core/modules/modBlockedLog.class.php @@ -93,7 +93,7 @@ class modBlockedLog extends DolibarrModules $this->always_enabled = (!empty($conf->blockedlog->enabled) && !empty($conf->global->BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY) && in_array($mysoc->country_code, explode(',', $conf->global->BLOCKEDLOG_DISABLE_NOT_ALLOWED_FOR_COUNTRY)) - && $this->alreadyUsed(1)); + && $this->alreadyUsed()); // Constants //----------- diff --git a/htdocs/core/modules/modDataPolicy.class.php b/htdocs/core/modules/modDataPolicy.class.php index a08ce2f7873..13095010a55 100644 --- a/htdocs/core/modules/modDataPolicy.class.php +++ b/htdocs/core/modules/modDataPolicy.class.php @@ -187,8 +187,7 @@ class modDataPolicy extends DolibarrModules { // Cronjobs (List of cron jobs entries to add when module is enabled) // unit_frequency must be 60 for minute, 3600 for hour, 86400 for day, 604800 for week $this->cronjobs = array( - 0 => array('label' => 'DATAPOLICY Cron', 'jobtype' => 'method', 'class' => '/datapolicy/class/datapolicyCron.class.php', 'objectname' => 'DataPolicyCron', 'method' => 'exec', 'parameters' => '', 'comment' => 'Clean data', 'frequency' => 1, 'unitfrequency' => 86400, 'status' => 1, 'test' => '$conf->datapolicy->enabled'), - //1 => array('label' => 'DATAPOLICY Mailing', 'jobtype' => 'method', 'class' => '/datapolicy/class/datapolicyCron.class.php', 'objectname' => 'RgpdCron', 'method' => 'sendMailing', 'parameters' => '', 'comment' => 'Comment', 'frequency' => 1, 'unitfrequency' => 86400, 'status' => 0, 'test' => true) + 0 => array('label' => 'DATAPOLICYJob', 'jobtype' => 'method', 'class' => 'datapolicy/class/datapolicycron.class.php', 'objectname' => 'DataPolicyCron', 'method' => 'cleanDataForDataPolicy', 'parameters' => '', 'comment' => 'Clean data', 'frequency' => 1, 'unitfrequency' => 86400, 'status' => 1, 'test' => '$conf->datapolicy->enabled'), ); // Example: $this->cronjobs=array(0=>array('label'=>'My label', 'jobtype'=>'method', 'class'=>'/dir/class/file.class.php', 'objectname'=>'MyClass', 'method'=>'myMethod', 'parameters'=>'param1, param2', 'comment'=>'Comment', 'frequency'=>2, 'unitfrequency'=>3600, 'status'=>0, 'test'=>true), // 1=>array('label'=>'My label', 'jobtype'=>'command', 'command'=>'', 'parameters'=>'param1, param2', 'comment'=>'Comment', 'frequency'=>1, 'unitfrequency'=>3600*24, 'status'=>0, 'test'=>true) diff --git a/htdocs/core/modules/modReception.class.php b/htdocs/core/modules/modReception.class.php index 6594d7bb04a..f85f5656afe 100644 --- a/htdocs/core/modules/modReception.class.php +++ b/htdocs/core/modules/modReception.class.php @@ -58,7 +58,7 @@ class modReception extends DolibarrModules // Data directories to create when module is enabled $this->dirs = array("/reception/receipt", "/reception/receipt/temp", - "/doctemplates/reception" + "/doctemplates/receptions" ); // Config pages diff --git a/htdocs/core/modules/reception/doc/pdf_squille.modules.php b/htdocs/core/modules/reception/doc/pdf_squille.modules.php index 23d000308ef..4a16724d614 100644 --- a/htdocs/core/modules/reception/doc/pdf_squille.modules.php +++ b/htdocs/core/modules/reception/doc/pdf_squille.modules.php @@ -121,15 +121,7 @@ class pdf_squille extends ModelePdfReception // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1'; - $outputlangs->load("main"); - $outputlangs->load("dict"); - $outputlangs->load("companies"); - $outputlangs->load("bills"); - $outputlangs->load("products"); - $outputlangs->load("propal"); - $outputlangs->load("deliveries"); - $outputlangs->load("receptions"); - $outputlangs->load("productbatch"); + $outputlangs->loadLangs(array("main","dict","companies","bills","products","propal","deliveries","receptions","productbatch","sendings")); $nblines = count($object->lines); diff --git a/htdocs/core/tpl/contacts.tpl.php b/htdocs/core/tpl/contacts.tpl.php index 1f7d403b575..0f9b733d010 100644 --- a/htdocs/core/tpl/contacts.tpl.php +++ b/htdocs/core/tpl/contacts.tpl.php @@ -208,7 +208,7 @@ if ($permission) { if ($tab[$i]['source']=='external') { $contactstatic->fetch($tab[$i]['id']); - echo $contactstatic->getNomUrl(1, '', 0, '', 0, 0, '', 'valignmiddle'); + echo $contactstatic->getNomUrl(1, '', 0, '', 0, 0); } ?> diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index f427bb34f92..1f0897f7e98 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -375,7 +375,7 @@ if ($nolinesbefore) { { $coldisplay++; ?> - | "> | +"> | global->MAIN_EDIT_PREDEF_PRICEHT)) + { + ?> + // get the HT price for the product and display it + $.post('/product/ajax/products.php?action=fetch', { 'id': $(this).val(), 'socid' : socid; ?> }, function(data) { + jQuery("#price_ht").val(data.price_ht); + }, + 'json'); rights->margins->creer) { $langs->load('stocks'); @@ -839,7 +850,10 @@ function setforpredef() { console.log("Call setforpredef. We hide some fields and show dates"); jQuery("#select_type").val(-1); jQuery("#prod_entry_mode_free").prop('checked',false).change(); - jQuery("#prod_entry_mode_predef").prop('checked',true).change(); + jQuery("#prod_entry_mode_predef").prop('checked',true).change( + global->MAIN_EDIT_PREDEF_PRICEHT)) { ?> + jQuery("#price_ht").val('').hide(); + jQuery("#price_ht").val('') jQuery("#price_ht, #multicurrency_price_ht, #price_ttc, #fourn_ref, #tva_tx, #title_vat, #title_up_ht, #title_up_ht_currency, #title_up_ttc, #title_up_ttc_currency").hide(); jQuery("#np_marginRate, #np_markRate, .np_marginRate, .np_markRate, #units, #title_units").hide(); diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index bac9ff997bc..82eb44c3b9b 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -140,7 +140,7 @@ $coldisplay=0; { $coldisplay++; ?> - | + | showOptionals($extrafieldsline, 'edit', array('style'=>$bc[$var],'colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1); + print $line->showOptionals($extrafieldsline, 'edit', array('class'=>'tredited', 'colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1); } ?> diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php index d048b6f7c9d..988df55b61c 100644 --- a/htdocs/core/tpl/objectline_view.tpl.php +++ b/htdocs/core/tpl/objectline_view.tpl.php @@ -163,6 +163,23 @@ $domData .= ' data-product_type="'.$line->product_type.'"'; print (! empty($line->description) && $line->description!=$line->product_label)?' | '; print ' | ' . $langs->trans("Warehouse") . ' | '; print '' . $langs->trans("Comment") . ' | '; - if (! empty($conf->global->SUPPLIER_ORDER_USE_DISPATCH_STATUS) || !empty($conf->reception->enabled)) + + // Status + if (! empty($conf->global->SUPPLIER_ORDER_USE_DISPATCH_STATUS) && empty($reception->rowid)) { print '' . $langs->trans("Status") . ' | '; + } + elseif(!empty($conf->reception->enabled)) { + print ''; + } + + print ' | '; print "\n"; @@ -1025,17 +1033,15 @@ if ($id > 0 || ! empty($ref)) { } } print ''; - }elseif(!empty($conf->reception->enabled)){ + } elseif(!empty($conf->reception->enabled)) { print ' | '; if(!empty($reception->id)){ print $reception->getLibStatut(5); } + print ' | '; } - print ''; - print ''; - print ' | '; - + print ''; print "\n"; diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 2207148e4ea..204d832a94c 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -55,13 +55,6 @@ $langs->load("holiday"); $childids = $user->getAllChildIds(1); -$cancreate = 0; -if (! empty($user->rights->holiday->write_all)) $cancreate=1; -if (! empty($user->rights->holiday->write) && in_array($fuserid, $childids)) $cancreate=1; - -$candelete = 0; -if (! empty($user->rights->holiday->delete)) $candelete=1; - $morefilter = 'AND employee = 1'; if (! empty($conf->global->HOLIDAY_FOR_NON_SALARIES_TOO)) $morefilter = ''; @@ -82,6 +75,13 @@ if ($id > 0) } } +$cancreate = 0; +if (! empty($user->rights->holiday->write_all)) $cancreate=1; +if (! empty($user->rights->holiday->write) && in_array($fuserid, $childids)) $cancreate=1; + +$candelete = 0; +if (! empty($user->rights->holiday->delete)) $candelete=1; +if ($object->statut == Holiday::STATUS_DRAFT && $user->rights->holiday->write && in_array($object->fk_user, $childids)) $candelete=1; /* * Actions @@ -1435,7 +1435,7 @@ else { print 'id.'&action=backtodraft" class="butAction">'.$langs->trans("SetToDraft").''; } - if ($user->rights->holiday->delete && ($object->statut == Holiday::STATUS_DRAFT || $object->statut == Holiday::STATUS_CANCELED || $object->statut == Holiday::STATUS_REFUSED)) // If draft or canceled or refused + if ($candelete && ($object->statut == Holiday::STATUS_DRAFT || $object->statut == Holiday::STATUS_CANCELED || $object->statut == Holiday::STATUS_REFUSED)) // If draft or canceled or refused { print 'id.'&action=delete" class="butActionDelete">'.$langs->trans("DeleteCP").''; } diff --git a/htdocs/install/mysql/data/llx_c_hrm_public_holiday.sql b/htdocs/install/mysql/data/llx_c_hrm_public_holiday.sql index 5b6f4bf3f0c..312c30210c8 100644 --- a/htdocs/install/mysql/data/llx_c_hrm_public_holiday.sql +++ b/htdocs/install/mysql/data/llx_c_hrm_public_holiday.sql @@ -41,3 +41,4 @@ INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, year, month, day INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, year, month, day, active) VALUES('FRASSOMPTION', 0, 1, 0, 8, 15, 1); INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, year, month, day, active) VALUES('FRTOUSSAINT', 0, 1, 0, 11, 1, 1); INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, year, month, day, active) VALUES('FRARMISTICE', 0, 1, 0, 11, 11, 1); +--INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, month, day, active) VALUES('EASTER', 0, 1, 'easter', 0, 0, 0, 1); diff --git a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql index 7ef80e9b5b6..4bf4cef6bba 100644 --- a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql +++ b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql @@ -106,6 +106,7 @@ ALTER TABLE llx_societe_contacts ADD CONSTRAINT fk_societe_contacts_fk_c_type_co ALTER TABLE llx_societe_contacts ADD CONSTRAINT fk_societe_contacts_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe(rowid); ALTER TABLE llx_societe_contacts ADD CONSTRAINT fk_societe_contacts_fk_socpeople FOREIGN KEY (fk_socpeople) REFERENCES llx_socpeople(rowid); +ALTER TABLE llx_accounting_account MODIFY COLUMN rowid bigint AUTO_INCREMENT; create table llx_c_hrm_public_holiday ( @@ -121,4 +122,6 @@ create table llx_c_hrm_public_holiday import_key varchar(14) )ENGINE=innodb; +ALTER TABLE llx_supplier_proposaldet ADD COLUMN date_start datetime DEFAULT NULL; +ALTER TABLE llx_supplier_proposaldet ADD COLUMN date_end datetime DEFAULT NULL; diff --git a/htdocs/install/mysql/tables/llx_accounting_account.sql b/htdocs/install/mysql/tables/llx_accounting_account.sql index 727965f6a9d..fd1962b6c09 100644 --- a/htdocs/install/mysql/tables/llx_accounting_account.sql +++ b/htdocs/install/mysql/tables/llx_accounting_account.sql @@ -21,7 +21,7 @@ create table llx_accounting_account ( - rowid integer AUTO_INCREMENT PRIMARY KEY, + rowid bigint AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, datec datetime, tms timestamp, diff --git a/htdocs/install/mysql/tables/llx_supplier_proposaldet.sql b/htdocs/install/mysql/tables/llx_supplier_proposaldet.sql index 211502686ee..b735046a340 100644 --- a/htdocs/install/mysql/tables/llx_supplier_proposaldet.sql +++ b/htdocs/install/mysql/tables/llx_supplier_proposaldet.sql @@ -40,6 +40,8 @@ CREATE TABLE llx_supplier_proposaldet ( total_localtax2 double(24,8) DEFAULT 0, total_ttc double(24,8) DEFAULT 0, product_type integer DEFAULT 0, + date_start datetime DEFAULT NULL, -- date debut si service + date_end datetime DEFAULT NULL, -- date fin si service info_bits integer DEFAULT 0, buy_price_ht double(24,8) DEFAULT 0, fk_product_fournisseur_price integer DEFAULT NULL, diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 494e7d4a8a3..a8f7f9643ce 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -218,7 +218,7 @@ DoliStoreDesc=DoliStore, the official market place for Dolibarr ERP/CRM external DoliPartnersDesc=List of companies providing custom-developed modules or features. | '; print $proptype; print ' | '; - print ''; + print ' | ';
if ($proparrayofkeyval) {
print json_encode($proparrayofkeyval);
}
@@ -2344,7 +2344,7 @@ elseif (! empty($module))
{
$pathtofile = $listofmodules[strtolower($module)]['moduledescriptorrelpath'];
- //$menus = $moduleobj->;
+ $menus = $moduleobj->menu;
if ($action != 'editfile' || empty($file))
{
@@ -2361,9 +2361,6 @@ elseif (! empty($module))
print ' '; print load_fiche_titre($langs->trans("ListOfMenusEntries"), '', ''); - // @TODO - print $langs->trans("FeatureNotYetAvailable"); - print ' |
|---|