diff --git a/ChangeLog b/ChangeLog index 1f4afc83e82..46779a760c5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ English Dolibarr ChangeLog -------------------------------------------------------------- + ***** ChangeLog for 13.0.0 compared to 12.0.0 ***** For users: NEW: Add module Credit transfer SEPA to manage payment of supplier using bank credit transfer SEPA files @@ -22,6 +23,52 @@ Following changes may create regressions for some external modules, but were nec you must now also include declaration of the Trait CommonIncoterm in your class. All incoterm functions were moved into this Trait. * The GETPOST(..., 'alpha') has now the same behaviour than GETPOST(..., 'alpahnohtml'); + +***** ChangeLog for 12.0.3 compared to 12.0.2 ***** +FIX: 10.0 - when the mime file name is different from the filesystem name, the attachment name should be the mime filename +FIX: 11.0 - expenses lines overlapping the total amounts frame +FIX: 12.0 - round value of virtual stock on product stock reassort list +FIX: #14469 +FIX: #14474 Error when deleting +FIX: #14530 +FIX: #14703 +FIX: - Accountancy balance Error SQL on entity +FIX: Bad number of subscription (forgotten when member was resiliated) +FIX: bad route url to delete subproduct with API +FIX: Category for suplements not saved +FIX: Compatibility with modules without document generation +FIX: Cron load lang +FIX: CSS +FIX: Error management. Do no try to approve PO if validation fails. +FIX: expenses lines overlapping the frame for total amounts. +FIX: Filter in "billed" of orders was not saved +FIX: infinite fetch object linked loop +FIX: Intervention lose html tags when updating +FIX: JS CRASH - bad usage of moreparam +FIX: lang fr retained warranty +FIX: Look and feel v12: First tab must be name of object +FIX: missing entity check +FIX: missing param for hook +FIX: Missing transaction on PO actions +FIX: MySql Strict mode +FIX: param entity in html form file +FIX: Problems on FEC format +FIX: round stock value on product list +FIX: - Send mail from contact : select mail model +FIX: set sales representatives on create company card +FIX: Setup of stock increase/decrease +FIX: sign of amount with credit note and multicurrencies +FIX: Static property called as non static +FIX: task leftmenu +FIX: title button attribute id empty +FIX: unit price divided by quantity when accepting supplier price proposal +FIX: Update extrafields on line only if it is supported +FIX: Update line of BOM +FIX: using decimal on stock correction +FIX: Visualization rights correction on last modified contacts box +FIX: Wrong redirection +FIX: Yogosha report 4425 (backport) + ***** ChangeLog for 12.0.2 compared to 12.0.1 ***** FIX: computation of the bottom margin of returns NaN because body is not loaded yet FIX: DebugBar hides content at page bottom diff --git a/htdocs/admin/website.php b/htdocs/admin/website.php index 595848fe232..83aeed6bd13 100644 --- a/htdocs/admin/website.php +++ b/htdocs/admin/website.php @@ -411,7 +411,7 @@ print "
\n"; // Confirmation de la suppression de la ligne if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid, $langs->trans('DeleteWebsite'), $langs->trans('ConfirmDeleteWebsite'), 'confirm_delete', '', 0, 1); + print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid, $langs->trans('DeleteWebsite'), $langs->trans('ConfirmDeleteWebsite'), 'confirm_delete', '', 0, 1, 220); } //var_dump($elementList); diff --git a/htdocs/categories/card.php b/htdocs/categories/card.php index 8eb6c3d8eda..096a5497efd 100644 --- a/htdocs/categories/card.php +++ b/htdocs/categories/card.php @@ -88,6 +88,10 @@ if ($action == 'add' && $user->rights->categorie->creer) { header("Location: ".$urlfrom); exit; + } elseif ($backtopage) + { + header("Location: ".$backtopage); + exit; } elseif ($idProdOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idProdOrigin.'&type='.$type); @@ -235,13 +239,13 @@ if ($user->rights->categorie->creer) // Ref print ''; - print ''.$langs->trans("Ref").''; + print ''.$langs->trans("Ref").''; print''; // Description print ''.$langs->trans("Description").''; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $doleditor = new DolEditor('description', $description, '', 200, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_6, '90%'); + $doleditor = new DolEditor('description', $description, '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_5, '90%'); $doleditor->Create(); print ''; diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index f9cf55e9a8c..1bc9f47ded4 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -1616,9 +1616,10 @@ class Categorie extends CommonObject * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto * @param string $option Sur quoi pointe le lien ('', 'xyz') * @param int $maxlength Max length of text + * @param string $moreparam More param on URL link * @return string Chaine avec URL */ - public function getNomUrl($withpicto = 0, $option = '', $maxlength = 0) + public function getNomUrl($withpicto = 0, $option = '', $maxlength = 0, $moreparam = '') { global $langs; @@ -1632,7 +1633,7 @@ class Categorie extends CommonObject if (colorIsLight($this->color)) $forced_color = 'categtextblack'; } - $link = ''; + $link = ''; $linkend = ''; $picto = 'category'; diff --git a/htdocs/categories/index.php b/htdocs/categories/index.php index b3a69583c7f..35420759ded 100644 --- a/htdocs/categories/index.php +++ b/htdocs/categories/index.php @@ -39,6 +39,7 @@ if (!$user->rights->categorie->lire) accessforbidden(); $id = GETPOST('id', 'int'); $type = (GETPOST('type', 'aZ09') ? GETPOST('type', 'aZ09') : Categorie::TYPE_PRODUCT); $catname = GETPOST('catname', 'alpha'); +$nosearch = GETPOST('nosearch', 'int'); $categstatic = new Categorie($db); if (is_numeric($type)) $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility @@ -50,6 +51,8 @@ if (is_numeric($type)) $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backwar $form = new Form($db); +$moreparam = ($nosearch ? '&nosearch=1' : ''); + $typetext = $type; if ($type == Categorie::TYPE_ACCOUNT) $title = $langs->trans('AccountsCategoriesArea'); elseif ($type == Categorie::TYPE_WAREHOUSE) $title = $langs->trans('StocksCategoriesArea'); @@ -64,66 +67,69 @@ $arrayofcss = array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css llxHeader('', $title, '', '', 0, 0, $arrayofjs, $arrayofcss); -$newcardbutton = dolGetButtonTitle($langs->trans('NewCategory'), '', 'fa fa-plus-circle', $url, '', $user->rights->categorie->creer); +$newcardbutton = ''; +if (!empty($user->rights->categorie->creer)) { + $newcardbutton .= dolGetButtonTitle($langs->trans('NewCategory'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/categories/card.php?action=create&type='.$type.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?type='.$type.$moreparam).$moreparam); +} print load_fiche_titre($title, $newcardbutton, 'object_category'); -print '
'; +// Search categories +if (empty($nosearch)) { + print '
'; -/* - * Zone recherche produit/service - */ -print '
'; -print ''; -print ''; + print ''; + print ''; + print ''; + print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print '
'.$langs->trans("Search").'
'; -print $langs->trans("Name").':
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
'.$langs->trans("Search").'
'; + print $langs->trans("Name").':
'; -print '
'; + print '
'; -/* - * Categories found - */ -if ($catname || $id > 0) -{ - $cats = $categstatic->rechercher($id, $catname, $typetext); - - print ''; - print ''; - - foreach ($cats as $cat) + /* + * Categories found + */ + if ($catname || $id > 0) { - print "\t".''."\n"; - print "\t\t\n"; - print "\t\t\n"; - print "\t\n"; - } - print "
'.$langs->trans("FoundCats").'
"; - $categstatic->id = $cat->id; - $categstatic->ref = $cat->label; - $categstatic->label = $cat->label; - $categstatic->type = $cat->type; - $categstatic->color = $cat->color; - print 'color ? ' style="background: #'.$categstatic->color.';"' : ' style="background: #aaa"').'>'; - print $categstatic->getNomUrl(1, ''); - print ''; - print ""; - print dolGetFirstLineOfText($cat->description); - print "
"; -} else print ' '; + $cats = $categstatic->rechercher($id, $catname, $typetext); + print ''; + print ''; -print ''; + foreach ($cats as $cat) + { + print "\t".''."\n"; + print "\t\t\n"; + print "\t\t\n"; + print "\t\n"; + } + print "
'.$langs->trans("FoundCats").'
"; + $categstatic->id = $cat->id; + $categstatic->ref = $cat->label; + $categstatic->label = $cat->label; + $categstatic->type = $cat->type; + $categstatic->color = $cat->color; + print 'color ? ' style="background: #'.$categstatic->color.';"' : ' style="background: #aaa"').'>'; + print $categstatic->getNomUrl(1, ''); + print ''; + print ""; + print dolGetFirstLineOfText($cat->description); + print "
"; + } else print ' '; + + print '
'; +} print '

'; @@ -152,7 +158,7 @@ foreach ($fulltree as $key => $val) $categstatic->ref = $val['label']; $categstatic->color = $val['color']; $categstatic->type = $type; - $li = $categstatic->getNomUrl(1, '', 60); + $li = $categstatic->getNomUrl(1, '', 60, $moreparam.'&backtolist='.urlencode($_SERVER["PHP_SELF"].'?type='.$type.$moreparam)); $desc = dol_htmlcleanlastbr($val['description']); $counter = ''; @@ -168,7 +174,7 @@ foreach ($fulltree as $key => $val) 'rowid'=>$val['rowid'], 'fk_menu'=>$val['fk_parent'], 'entry'=>''.$counter. - '
color ? ' style="background: #'.$categstatic->color.';"' : ' style="background: #aaa"').'>'.$li.''.img_view().'
' + ''.img_view().'' ); } diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index 3a1d13d210e..202a5770f06 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -51,6 +51,7 @@ $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myo $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') + // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST('sortfield', 'aZ09comma'); diff --git a/htdocs/compta/facture/card-rec.php b/htdocs/compta/facture/card-rec.php index 284ec8111d5..a11f0f7c800 100644 --- a/htdocs/compta/facture/card-rec.php +++ b/htdocs/compta/facture/card-rec.php @@ -1617,13 +1617,12 @@ if ($action == 'create') // Show object lines if (!empty($object->lines)) { - //$disableedit=1; - //$disablemove=1; + $canchangeproduct = 1; $ret = $object->printObjectLines($action, $mysoc, $object->thirdparty, $lineid, 0); // No date selector for template invoice } // Form to add new line - if ($object->statut == 0 && $user->rights->facture->creer && $action != 'valid' && $action != 'editline') + if ($object->statut == $object::STATUS_DRAFT && $user->rights->facture->creer && $action != 'valid' && $action != 'editline') { if ($action != 'editline') { diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index fadf0831ada..adb117b7b8f 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -665,6 +665,7 @@ if (empty($reshook)) $fk_unit = GETPOST('unit', 'alpha'); + $objectline->fk_product = GETPOST('idprod', 'int'); $objectline->description = GETPOST('product_desc', 'restricthtml'); $objectline->price_ht = GETPOST('elprice'); $objectline->subprice = GETPOST('elprice'); @@ -1436,8 +1437,6 @@ if ($action == 'create') $usemargins = 0; if (!empty($conf->margin->enabled) && !empty($object->element) && in_array($object->element, array('facture', 'propal', 'commande'))) $usemargins = 1; - $var = false; - // Title line for service $cursorline = 1; print '
'; @@ -1448,7 +1447,6 @@ if ($action == 'create') print ''; print ''; print ''; - print ''; print ''; // Area with common detail of line @@ -1632,17 +1630,29 @@ if ($action == 'create') // Ligne carac print ''; print ''; - if ($objp->fk_product) + if ($objp->fk_product > 0) { - $productstatic->id = $objp->fk_product; - $productstatic->type = $objp->ptype; - $productstatic->ref = $objp->pref; - $productstatic->entity = $objp->pentity; - print $productstatic->getNomUrl(1, '', 32); - print $objp->label ? ' - '.dol_trunc($objp->label, 32) : ''; + $canchangeproduct = 1; + if (empty($canchangeproduct)) { + $productstatic->id = $objp->fk_product; + $productstatic->type = $objp->ptype; + $productstatic->ref = $objp->pref; + $productstatic->entity = $objp->pentity; + print $productstatic->getNomUrl(1, '', 32); + print $objp->label ? ' - '.dol_trunc($objp->label, 32) : ''; + print ''; + } else { + $senderissupplier = 0; + if (empty($senderissupplier)) { + print $form->select_produits((!empty($object->lines[$cursorline - 1]->fk_product) ? $object->lines[$cursorline - 1]->fk_product : 0), 'idprod'); + } else { + print $form->select_produits_fournisseurs((!empty($object->lines[$cursorline - 1]->fk_product) ? $object->lines[$cursorline - 1]->fk_product : 0), 'idprod'); + } + } print '
'; } else { print $objp->label ? $objp->label.'
' : ''; + print ''; } // editeur wysiwyg diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 5acb5d7de85..ce7ed73b6a5 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4038,7 +4038,7 @@ class Form * type can be 'hidden', 'text', 'password', 'checkbox', 'radio', 'date', 'morecss', ... * @param string $selectedchoice '' or 'no', or 'yes' or '1' or '0' * @param int|string $useajax 0=No, 1=Yes, 2=Yes but submit page with &confirm=no if choice is No, 'xxx'=Yes and preoutput confirm box with div id=dialog-confirm-xxx - * @param int $height Force height of box (0 = auto) + * @param int|string $height Force height of box (0 = auto) * @param int $width Force width of box ('999' or '90%'). Ignored and forced to 90% on smartphones. * @param int $disableformtag 1=Disable form tag. Can be used if we are already inside a
section. * @return string HTML ajax code if a confirm ajax popup is required, Pure HTML code if it's an html form diff --git a/htdocs/core/js/lib_head.js.php b/htdocs/core/js/lib_head.js.php index b95d3d18f6c..b71dfc3eeb2 100644 --- a/htdocs/core/js/lib_head.js.php +++ b/htdocs/core/js/lib_head.js.php @@ -1130,4 +1130,15 @@ $(document).ready(function() { }); +// Force to hide menus when page is inside an iFrame +$(document).ready(function() { + if (window.location !== window.parent.location ) { + console.log("Page is detected to be into an iframe, we hide by CSS the menus"); + // The page is in an iframe + jQuery(".side-nav-vert, .side-nav").hide(); + jQuery(".id-container").css('width', '100%'); + + } +}); + // End of lib_head.js.php diff --git a/htdocs/core/lib/treeview.lib.php b/htdocs/core/lib/treeview.lib.php index 14538a15b0c..c0cfa20f529 100644 --- a/htdocs/core/lib/treeview.lib.php +++ b/htdocs/core/lib/treeview.lib.php @@ -103,15 +103,16 @@ function tree_showpad(&$fulltree, $key, $silent = 0) * $arrayofcss=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css'); * TODO Replace with jstree plugin instead of treeview plugin. * - * @param array $tab Array of all elements - * @param array $pere Array with parent ids ('rowid'=>,'mainmenu'=>,'leftmenu'=>,'fk_mainmenu=>,'fk_leftmenu=>) - * @param int $rang Level of element - * @param string $iddivjstree Id to use for parent ul element + * @param array $tab Array of all elements + * @param array $pere Array with parent ids ('rowid'=>,'mainmenu'=>,'leftmenu'=>,'fk_mainmenu=>,'fk_leftmenu=>) + * @param int $rang Level of element + * @param string $iddivjstree Id to use for parent ul element * @param int $donoresetalreadyloaded Do not reset global array $donoresetalreadyloaded used to avoid to go down on an aleady processed record - * @param int $showfk 1=show fk_links to parent into label (used by menu editor only) + * @param int $showfk 1=show fk_links to parent into label (used by menu editor only) + * @param string $moreparam Add more param on url of elements * @return void */ -function tree_recur($tab, $pere, $rang, $iddivjstree = 'iddivjstree', $donoresetalreadyloaded = 0, $showfk = 0) +function tree_recur($tab, $pere, $rang, $iddivjstree = 'iddivjstree', $donoresetalreadyloaded = 0, $showfk = 0, $moreparam = '') { global $tree_recur_alreadyadded, $menu_handler_to_search; @@ -197,7 +198,7 @@ function tree_recur($tab, $pere, $rang, $iddivjstree = 'iddivjstree', $donoreset if ($showfk) { print '
'; - print '   '; + print '   '; print $tab[$x]['title']; print ''; print '  (mainmenu='.$tab[$x]['mainmenu'].' leftmenu='.$tab[$x]['leftmenu'].' - fk_mainmenu='.$tab[$x]['fk_mainmenu'].' fk_leftmenu='.$tab[$x]['fk_leftmenu'].')'; diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index 86cb472da43..6ced56b5e03 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -1,6 +1,6 @@ - * Copyright (C) 2010-2012 Laurent Destailleur + * Copyright (C) 2010-2020 Laurent Destailleur * Copyright (C) 2012 Christophe Battarel * Copyright (C) 2012 Cédric Salvador * Copyright (C) 2012-2014 Raphaël Doursenaud @@ -29,6 +29,7 @@ * $forceall (0 by default, 1 for supplier invoices/orders) * $senderissupplier (0 by default, 1 for supplier invoices/orders) * $inputalsopricewithtax (0 by default, 1 to also show column with unit price including tax) + * $canchangeproduct (0 by default, 1 to allow to change the product if it is a predefined product) */ // Protection to avoid direct call of template @@ -42,12 +43,12 @@ if (empty($object) || !is_object($object)) $usemargins = 0; if (!empty($conf->margin->enabled) && !empty($object->element) && in_array($object->element, array('facture', 'facturerec', 'propal', 'commande'))) $usemargins = 1; -global $forceall, $senderissupplier, $inputalsopricewithtax; +global $forceall, $senderissupplier, $inputalsopricewithtax, $canchangeproduct; if (empty($dateSelector)) $dateSelector = 0; if (empty($forceall)) $forceall = 0; if (empty($senderissupplier)) $senderissupplier = 0; if (empty($inputalsopricewithtax)) $inputalsopricewithtax = 0; - +if (empty($canchangeproduct)) $canchangeproduct = 0; // Define colspan for the button 'Add' $colspan = 3; // Col total ht + col edit + col delete @@ -71,27 +72,33 @@ $coldisplay++; - fk_product > 0) { ?> fk_parent_line > 0) echo img_picto('', 'rightarrow'); + if (empty($canchangeproduct)) { + if ($line->fk_parent_line > 0) echo img_picto('', 'rightarrow'); + ?> + + product_type == 1) echo img_object($langs->trans('ShowService'), 'service'); + else print img_object($langs->trans('ShowProduct'), 'product'); + echo ' '.$line->ref; + ?> + + product_label); + print ''; + } else { + if ($senderissupplier) { + print $form->select_produits_fournisseurs(!empty($line->fk_product) ? $line->fk_product : 0, 'productid'); + } else { + print $form->select_produits(!empty($line->fk_product) ? $line->fk_product : 0, 'productid'); + } + } ?> - - product_type == 1) echo img_object($langs->trans('ShowService'), 'service'); - else print img_object($langs->trans('ShowProduct'), 'product'); - echo ' '.$line->ref; - ?> - - product_label); - ?> -

- '.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("CronSetup"), $linkback, 'title_setup'); @@ -81,17 +82,17 @@ print ''; print ''; print ""; print ""; -print ""; +print ""; print ""; -print ''; +print ''; print ''; $disabled = ''; if (!empty($conf->global->CRON_DISABLE_KEY_CHANGE)) $disabled = ' disabled="disabled"'; print ''; $htmlforlines .= ''; - $htmlforlines .= ''; + $htmlforlines .= ''; $htmlforlines .= ''; } $htmlforlines .= ''."\n"; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 308426ddc98..a50e45d8f51 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -118,7 +118,7 @@ body { th a { font-weight: !important; } a.tab { font-weight: 500 !important; } -a:link, a:visited, a:hover, a:active { color: var(--colortextlink); text-decoration: none; } +a:link, a:visited, a:hover, a:active, .classlink { color: var(--colortextlink); text-decoration: none; } a:hover { text-decoration: underline; color: var(--colortextlink); } a.commonlink { color: var(--colortextlink) !important; text-decoration: none; } th.liste_titre a div div:hover, th.liste_titre_sel a div div:hover { text-decoration: underline; } @@ -1866,7 +1866,7 @@ div.attacharea { } div.attachareaformuserfileecm { padding-top: 0; - padding-bottom: 0; + padding-bottom: 6px; } div.arearef { @@ -4418,7 +4418,7 @@ span[phptag] { border-bottom: 1px solid #ccc; background: #e6e6e6; display: inline-block; - padding: 4px 0 4px 0; + padding: 5px 0 5px 0; z-index: 1000; } .websitebar .buttonDelete, .websitebar .button { diff --git a/htdocs/website/index.php b/htdocs/website/index.php index c0b5ba207f1..a36f33ee682 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -108,7 +108,7 @@ $objectpage = new WebsitePage($db); $object->fetchAll('ASC', 'position'); // Init $object->records with list of websites // If website not defined, we take first found -if (!($websiteid > 0) && empty($websitekey)) +if (!($websiteid > 0) && empty($websitekey) && $action != 'createsite') { foreach ($object->records as $key => $valwebsite) { @@ -2182,7 +2182,7 @@ $formadmin = new FormAdmin($db); $formwebsite = new FormWebsite($db); $formother = new FormOther($db); -$help_url = ''; +$helpurl = 'EN:Module_Website|FR:Module_Website_FR|ES:Módulo_Website'; $arrayofjs = array( '/includes/ace/src/ace.js', @@ -2204,7 +2204,7 @@ $moreheadjs .= ''."\n"; -llxHeader($moreheadcss.$moreheadjs, $langs->trans("WebsiteSetup"), $help_url, '', 0, 0, $arrayofjs, $arrayofcss, '', '', ''."\n".'
'); +llxHeader($moreheadcss.$moreheadjs, $langs->trans("WebsiteSetup"), $helpurl, '', 0, 0, $arrayofjs, $arrayofcss, '', '', ''."\n".'
'); print "\n"; print ''; @@ -2276,45 +2276,6 @@ if (!GETPOST('hide_websitemenu')) $disabled = ''; if (empty($user->rights->website->write)) $disabled = ' disabled="disabled"'; - //var_dump($objectpage);exit; - print '
'; - - - // ***** Part for web sites - print ''; - print ''; - print $langs->trans("Website").' : '; - print ''; - - print ''; - print 'ref.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("AddWebsite")).'">'; - print ''; - - // List of website - print ''; - $out = ''; - $out .= ''; - $out .= ajax_combobox('website'); - print $out; - //print ''; - print ''; - - if ($websitekey) { $virtualurl = ''; @@ -2331,70 +2292,146 @@ if (!GETPOST('hide_websitemenu')) if (!is_array($array) && $array < 0) dol_print_error('', $objectpage->error, $objectpage->errors); $atleastonepage = (is_array($array) && count($array) > 0); - if ($websitekey && $websitekey != '-1' && ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone' || $action == 'deletesite')) - { - print '   '; - print ''; + //var_dump($objectpage);exit; + print '
'; - $importlabel = $langs->trans("ImportSite"); - $exportlabel = $langs->trans("ExportSite"); - if (! empty($conf->dol_optimize_smallscreen)) { - $importlabel = $langs->trans("Import"); - $exportlabel = $langs->trans("Export"); + // + // Toolbar for websites + // + + print ''; + if ($action != 'file_manager') { + print ''; + print $langs->trans("Website").' : '; + print ''; + + $urltocreatenewwebsite = $_SERVER["PHP_SEFL"].'?action=createsite'; + if (empty($conf->use_javascript_ajax)) { + print ''; + print ''; + print ''; } - if ($atleastonepage) + // List of website + print ''; + $out = ''; + $out .= ''; + if (empty($websitekey)) { + if ($action != 'createsite') $websitekey = $valwebsite->ref; + } + + $out .= ''; + $i++; } - else { - print ''; + $out .= ''; + $out .= ajax_combobox('website'); + + if (!empty($conf->use_javascript_ajax)) { + $out .= ''; + } + print $out; + + if (empty($conf->use_javascript_ajax)) { + print ''; } - //print ''; - print ''; - print ''; + if ($websitekey && $websitekey != '-1' && ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone' || $action == 'deletesite')) + { + print '   '; - print ''; + print ''; - print '   '; + $importlabel = $langs->trans("ImportSite"); + $exportlabel = $langs->trans("ExportSite"); + if (! empty($conf->dol_optimize_smallscreen)) { + $importlabel = $langs->trans("Import"); + $exportlabel = $langs->trans("Export"); + } - print 'ref.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("MediaFiles")).'">'; - //print ''; - /*print ''.dol_escape_htmltag($langs->trans("MediaFiles")).''; - print ''; - */ + if ($atleastonepage) + { + print ''; + } + else { + print ''; + } - print 'ref.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("ReplaceWebsiteContent")).'">'; + //print ''; + print ''; + print ''; - if (! empty($conf->categorie->enabled)) { - print ''; - } + print ''; + + print '   '; + + print 'ref.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("ReplaceWebsiteContent")).'">'; - if (! empty($conf->global->WEBSITE_ADD_REGENERATE_BUTTON)) { print 'ref.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("RegenerateWebsiteContent")).'">'; } + + print ''; + + if ($websitekey && $websitekey != '-1' && ($action == 'preview' || $action == 'createfromclone' || $action == 'createpagefromclone' || $action == 'deletesite')) + { + print ''; + print 'ref.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("MediaFiles")).'">'; + + if (! empty($conf->categorie->enabled)) { + //print ''; + + //print ''; + print ''; + print ''; + } + + print ''; + } + } else { + print ''; } - print ''; - - - // Toolbar for websites print ''; @@ -2405,7 +2442,7 @@ if (!GETPOST('hide_websitemenu')) print ''; $linktotestonwebserver = ''; - $linktotestonwebserver .= ''.$langs->trans("TestDeployOnWeb", $virtualurl).' '.img_picto('', 'globe'); + $linktotestonwebserver .= ''.$langs->trans("TestDeployOnWeb", $virtualurl).''.img_picto('', 'globe'); $linktotestonwebserver .= ''; $htmltext = ''; if (empty($object->fk_default_home)) @@ -2469,8 +2506,10 @@ if (!GETPOST('hide_websitemenu')) print ''; - + // // Toolbar for pages + // + if ($websitekey && $websitekey != '-1' && !in_array($action, array('editcss', 'editmenu', 'importsite', 'file_manager', 'replacesite', 'replacesiteconfirm')) && !$file_manager) { print '
'; // Close current websitebar to open a new one @@ -2483,7 +2522,6 @@ if (!GETPOST('hide_websitemenu')) print '
'; print ''; - //print ''; print 'ref.'" class="button bordertransp"'.$disabled.' title="'.dol_escape_htmltag($langs->trans("AddPage")).'">'; print ''; @@ -2491,7 +2529,28 @@ if (!GETPOST('hide_websitemenu')) if ($action != 'addcontainer') { - print ''.$formwebsite->selectContainer($website, 'pageid', $pageid, 0, $action, 'maxwidth200onsmartphone').''; + print ''; + print $formwebsite->selectContainer($website, 'pageid', $pageid, 0, $action, 'maxwidth200onsmartphone'); + print ''; + + $urltocreatenewpage = $_SERVER["PHP_SEFL"].'?action=createcontainer&website='.$website->ref; + + $out = ''; + if (!empty($conf->use_javascript_ajax)) { + $out .= ''; + } + print $out; } else { print $langs->trans("New"); @@ -3142,7 +3201,7 @@ if ($action == 'createsite') if (GETPOST('WEBSITE_OTHERLANG')) $siteotherlang = GETPOST('WEBSITE_OTHERLANG', 'aZ09comma'); print '
';
".$langs->trans("Parameter")."".$langs->trans("Value")." 
'.$langs->trans("KeyForCronAccess").''; if (empty($conf->global->CRON_DISABLE_KEY_CHANGE)) { - print ''; + print ''; if (!empty($conf->use_javascript_ajax)) print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token" class="linkobject"'); } else { diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index 0b97e9dfef9..e9814ce481c 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -95,9 +95,10 @@ $fieldstosearchall = array( 's.nom'=>"ThirdParty", 'f.description'=>'Description', 'f.note_public'=>'NotePublic', + 'fd.description'=>'DescriptionOfLine', ); if (empty($user->socid)) $fieldstosearchall["f.note_private"] = "NotePrivate"; -if (!empty($conf->global->FICHINTER_DISABLE_DETAILS)) unset($fieldstosearchall['f.description']); +if (!empty($conf->global->FICHINTER_DISABLE_DETAILS)) unset($fieldstosearchall['fd.description']); // Definition of fields for list $arrayfields = array( diff --git a/htdocs/install/mysql/tables/llx_bank.sql b/htdocs/install/mysql/tables/llx_bank.sql index 3af2ffab69f..8dfdba27baa 100644 --- a/htdocs/install/mysql/tables/llx_bank.sql +++ b/htdocs/install/mysql/tables/llx_bank.sql @@ -32,13 +32,13 @@ create table llx_bank fk_type varchar(6), -- TIP,VIR,PRE,CB,CHQ,... (Code in llx_c_paiement) num_releve varchar(50), num_chq varchar(50), - numero_compte varchar(32) NULL, -- FEC:CompteNum | account number + numero_compte varchar(32) NULL, -- FEC:CompteNum | account number rappro tinyint default 0, note text, fk_bordereau integer DEFAULT 0, - banque varchar(255), -- banque pour les cheques - emetteur varchar(255), -- emetteur du cheque - author varchar(40) -- a supprimer apres migration + banque varchar(255), -- banque pour les cheques + emetteur varchar(255), -- emetteur du cheque + author varchar(40), -- a supprimer apres migration origin_id integer, origin_type varchar(64) NULL, import_key varchar(14) diff --git a/htdocs/langs/en_US/categories.lang b/htdocs/langs/en_US/categories.lang index 9bb71984ecf..c813f6d694f 100644 --- a/htdocs/langs/en_US/categories.lang +++ b/htdocs/langs/en_US/categories.lang @@ -84,7 +84,7 @@ AddProductServiceIntoCategory=Add the following product/service ShowCategory=Show tag/category ByDefaultInList=By default in list ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories Area -ActionCommCategoriesArea=Events Categories Area -WebsitePagesCategoriesArea=Page-Container Categories Area +StocksCategoriesArea=Warehouses Categories +ActionCommCategoriesArea=Events Categories +WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang index 9f6c12677bb..c32fcd06f09 100644 --- a/htdocs/langs/en_US/website.lang +++ b/htdocs/langs/en_US/website.lang @@ -31,7 +31,7 @@ AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container HomePage=Home Page -PageContainer=Page/container +PageContainer=Page PreviewOfSiteNotYetAvailable=Preview of your website %s not yet available. You must first 'Import a full website template' or just 'Add a page/container'. RequestedPageHasNoContentYet=Requested page with id %s has no content yet, or cache file .tpl.php was removed. Edit content of the page to solve this. SiteDeleted=Web site '%s' deleted @@ -134,4 +134,5 @@ AvailableLanguagesAreDefinedIntoWebsiteProperties=Available languages are define ReplacementDoneInXPages=Replacement done in %s pages or containers RSSFeed=RSS Feed RSSFeedDesc=You can get a RSS feed of latest articles with type 'blogpost' using this URL -PagesRegenerated=%s page(s)/container(s) regenerated \ No newline at end of file +PagesRegenerated=%s page(s)/container(s) regenerated +RegenerateWebsiteContent=Regenerate web site cache files \ No newline at end of file diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 940aabee808..0c51c153220 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -385,11 +385,10 @@ if ((!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && !empty($conf->gl $savid = ((int) $_POST['id']); unset($_POST); //unset($_POST['action']); - unset($_POST['confirm']); + //unset($_POST['confirm']); unset($_GET['confirm']); unset($_GET['action']); $_POST['id'] = ((int) $savid); - $_POST['action'] = ''; } } diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 4267e5c4e9a..a0bfa073afa 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -313,8 +313,6 @@ if (empty($reshook)) * View */ -$htmlother = new FormOther($db); - $title = $langs->trans("ProductsAndServices"); if ($search_type != '' && $search_type != '-1') diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 3ab9f91c9ff..69adde70895 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -1065,7 +1065,30 @@ if ($placeid > 0) $htmlforlines .= ''.vatrate($line->remise_percent, true).''.$line->qty.''; + if (!empty($conf->stock->enabled)) + { + $constantforkey = 'CASHDESK_ID_WAREHOUSE'.$_SESSION["takeposterminal"]; + $sql = "SELECT e.rowid, e.ref, e.lieu, e.fk_parent, e.statut, ps.reel, ps.rowid as product_stock_id, p.pmp"; + $sql .= " FROM ".MAIN_DB_PREFIX."entrepot as e,"; + $sql .= " ".MAIN_DB_PREFIX."product_stock as ps"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = ps.fk_product"; + $sql .= " WHERE ps.reel != 0"; + $sql .= " AND ps.fk_entrepot = ".$conf->global->$constantforkey; + $sql .= " AND e.entity IN (".getEntity('stock').")"; + $sql .= " AND ps.fk_product = ".$line->fk_product; + $resql = $db->query($sql); + if ($resql) { + $obj = $db->fetch_object($resql); + $stock_real = price2num($obj->reel, 'MS'); + $htmlforlines .= $line->qty + if ($line->qty>$stock_real) $htmlforlines .= ''; + $htmlforlines .= ' ('.$langs->trans("Stock").' '.$stock_real.')'; + if ($line->qty>$stock_real) $htmlforlines .= ""; + } + } + else $htmlforlines .= $line->qty; + $htmlforlines .= ''.price($line->total_ttc).'
'; - print $langs->trans('Ref'); + print $form->textwithpicto($langs->trans('WebSite'), $langs->trans("Example").': www.mywebsite.com, myportal, ...'); print ''; print ''; print '