From 1c45866409a5b3f0cced0464acc74e4260902953 Mon Sep 17 00:00:00 2001 From: atm-quentin Date: Tue, 26 May 2020 10:33:07 +0200 Subject: [PATCH 01/23] FIX missing accountancy report menu for simple accountancy conf --- htdocs/core/menus/standard/eldy.lib.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index be455d5431a..7dd048ee15a 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -1433,7 +1433,10 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM $newmenu->add("/compta/stats/cabyuser.php?leftmenu=report", $langs->trans("ByUsers"), 2, $user->rights->compta->resultat->lire); $newmenu->add("/compta/stats/cabyprodserv.php?leftmenu=report", $langs->trans("ByProductsAndServices"), 2, $user->rights->compta->resultat->lire); $newmenu->add("/compta/stats/byratecountry.php?leftmenu=report", $langs->trans("ByVatRate"), 2, $user->rights->compta->resultat->lire); - + //Achats + $newmenu->add("/compta/stats/supplier_turnover.php?leftmenu=accountancy_report", $langs->trans("ReportPurchaseTurnover"), 1, $user->rights->compta->resultat->lire); + $newmenu->add("/compta/stats/supplier_turnover_by_thirdparty.php?leftmenu=accountancy_report", $langs->trans("ByCompanies"), 2, $user->rights->compta->resultat->lire); + $newmenu->add("/compta/stats/supplier_turnover_by_prodserv.php?leftmenu=accountancy_report", $langs->trans("ByProductsAndServices"), 2, $user->rights->compta->resultat->lire); // Journaux $newmenu->add("/compta/journal/sellsjournal.php?leftmenu=report", $langs->trans("SellsJournal"), 1, $user->rights->compta->resultat->lire, '', '', '', 50); $newmenu->add("/compta/journal/purchasesjournal.php?leftmenu=report", $langs->trans("PurchasesJournal"), 1, $user->rights->compta->resultat->lire, '', '', '', 51); From 56708e8c353a8a09ca00943dec4889016060433f Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Tue, 26 May 2020 22:52:55 +0200 Subject: [PATCH 02/23] Update phone.php for Auto Order --- htdocs/takepos/phone.php | 149 ++++++++++++++++++++++++++++----------- 1 file changed, 106 insertions(+), 43 deletions(-) diff --git a/htdocs/takepos/phone.php b/htdocs/takepos/phone.php index 8714173e45f..88ab8ef5227 100644 --- a/htdocs/takepos/phone.php +++ b/htdocs/takepos/phone.php @@ -39,10 +39,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { // Decode place if it is an order from customer phone - $key = GETPOST('key'); - $place=dol_decode($key); + $place = GETPOSTISSET("key") ? dol_decode(GETPOST('key')) : GETPOST('place', 'aZ09'); +} else { + $place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is id of table for Ba or Restaurant } -else $place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is id of table for Ba or Restaurant $action = GETPOST('action', 'alpha'); $setterminal = GETPOST('setterminal', 'int'); $idproduct = GETPOST('idproduct', 'int'); @@ -62,28 +62,54 @@ if (empty($user->rights->takepos->run) && !defined('INCLUDE_PHONEPAGE_FROM_PUBLI * View */ -// Title -$title = 'TakePOS - Dolibarr '.DOL_VERSION; -if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $title = 'TakePOS - '.$conf->global->MAIN_APPLICATION_TITLE; -$head = ' - - -'; -top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); - -print ''; - -if ($action=="productinfo"){ +if ($action == "productinfo") { $prod = new Product($db); $prod->fetch($idproduct); - print "".$prod->label."
"; - print ''; + print ''; + print "
".$prod->label."
"; + print ''; print "
".$prod->description; print "
".price($prod->price_ttc, 1, $langs, 1, -1, -1, $conf->currency).""; print '
'; - print ''; +} elseif ($action == "publicpreorder") { + print ''; + print "

"; + print '
+ +
'; + print '
'; +} elseif ($action == "publicpayment") { + $langs->loadLangs(array("orders")); + print '

'.$langs->trans('StatusOrderDelivered').'

'; + print ''; + print '
'; } -elseif ($action=="editline"){ +elseif ($action == "checkplease") { + if (GETPOSTISSET("payment")) { + print '

'.$langs->trans('StatusOrderDelivered').'

'; + require_once DOL_DOCUMENT_ROOT.'/core/class/dolreceiptprinter.class.php'; + require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; + $printer = new dolReceiptPrinter($db); + $printer->initPrinter($conf->global->{'TAKEPOS_PRINTER_TO_USE'.$_SESSION["takeposterminal"]}); + $printer->printer->feed(); + $printer->printer->feed(); + $printer->printer->text($langs->trans('IM')); + $printer->printer->feed(); + $printer->printer->text($langs->trans('Place').": ".$place); + $printer->printer->feed(); + $printer->printer->text($langs->trans('Payment').": ".$langs->trans(GETPOST('payment', 'alpha'))); + $printer->printer->feed(); + $printer->printer->feed(); + $printer->printer->feed(); + $printer->printer->feed(); + $printer->printer->feed(); + $printer->close(); + } else { + print ''; + print ''; + print '
'; + } +} elseif ($action == "editline") { $placeid = GETPOST('placeid', 'int'); $selectedline = GETPOST('selectedline', 'int'); $invoice = new Facture($db); @@ -95,17 +121,25 @@ elseif ($action=="editline"){ $prod = new Product($db); $prod->fetch($line->fk_product); print "".$prod->label."
"; - print ''; + print ''; print "
".$prod->description; print "
".price($prod->price_ttc, 1, $langs, 1, -1, -1, $conf->currency).""; print '
'; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; } } -} else { + // Title + $title = 'TakePOS - Dolibarr '.DOL_VERSION; + if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $title = 'TakePOS - '.$conf->global->MAIN_APPLICATION_TITLE; + $head = ' + + +'; + $arrayofcss = array('/takepos/css/phone.css'); + top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); ?> - + global->TAKEPOS_NUM_TERMINALS != "1" && $_SESSION["takeposterminal"] == "") print '
'.$langs->trans('TerminalSelect').'
'; ?> @@ -300,19 +363,19 @@ function CheckPlease(){ print ''; print ''; } - else{ - print ''; - print ''; - print ''; + else { + print ''; + print ''; + print ''; } ?> -
-
-
-
+
+
+
+
Date: Tue, 26 May 2020 23:03:47 +0200 Subject: [PATCH 03/23] Update invoice.php for Auto Order --- htdocs/takepos/invoice.php | 45 ++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 14 deletions(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 3d6cec96319..07006eb5cd1 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -70,10 +70,12 @@ if (($conf->global->TAKEPOS_PHONE_BASIC_LAYOUT == 1 && $conf->browser->layout == '; + $arrayofcss = array( + '/takepos/css/pos.css.php', + '/takepos/js/jquery.colorbox-min.js' + ); + $arrayofjs = array('/takepos/js/jquery.colorbox-min.js'); top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); - print ' - - '; } /** @@ -863,6 +865,9 @@ if ($conf->global->TAKEPOS_BAR_RESTAURANT) print $langs->trans('Place')." ".$label." - "; print $langs->trans('Floor')." ".$floor." - "; } + elseif (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) print $mysoc->name; + elseif ($mobilepage == "cats") print $langs->trans('Category'); + elseif ($mobilepage == "products") print $langs->trans('Label'); } // In phone version only show when is invoice page if ($mobilepage == "invoice" || $mobilepage == "") { @@ -877,6 +882,7 @@ if ($_SESSION["basiclayout"] != 1) print ''.$langs->trans('Qty').''; print ''.$langs->trans('TotalTTCShort').''; } +elseif ($mobilepage == "invoice") print ''.$langs->trans('Qty').''; print "\n"; @@ -889,12 +895,14 @@ if ($_SESSION["basiclayout"] == 1) $categories = $categorie->get_full_arbo('product'); $htmlforlines = ''; foreach ($categories as $row) { - $htmlforlines .= ''; - $htmlforlines .= ''; + if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) $htmlforlines .= '
'; + else $htmlforlines .= ''; $htmlforlines .= $row['label']; - $htmlforlines .= ''; - $htmlforlines .= ''."\n"; + if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) $htmlforlines .= ''."\n"; + else $htmlforlines .= ''."\n"; } $htmlforlines .= ''; $htmlforlines .= ''; @@ -910,12 +918,20 @@ if ($_SESSION["basiclayout"] == 1) $prods = $object->getObjectsInCateg("product"); $htmlforlines = ''; foreach ($prods as $row) { - $htmlforlines .= 'id.')">'; - $htmlforlines .= ''; - $htmlforlines .= $row->label; - $htmlforlines .= '
'.price($row->price_ttc, 1, $langs, 1, -1, -1, $conf->currency).'
'; - $htmlforlines .= ''."\n"; + if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { + $htmlforlines .= '
'; + $htmlforlines .= $row->label.''.price($row->price_ttc, 1, $langs, 1, -1, -1, $conf->currency); + $htmlforlines .= ''."\n"; + } + else { + $htmlforlines .= ''; + $htmlforlines .= $row->label; + $htmlforlines .= '
'.price($row->price_ttc, 1, $langs, 1, -1, -1, $conf->currency).'
'; + $htmlforlines .= ''."\n"; + } } $htmlforlines .= ''; print $htmlforlines; @@ -991,7 +1007,7 @@ if ($placeid > 0) } $htmlforlines .= '" id="'.$line->id.'">'; $htmlforlines .= ''; - if ($_SESSION["basiclayout"] == 1) $htmlforlines .= $line->qty." x "; + if ($_SESSION["basiclayout"] == 1) $htmlforlines .= ''.$line->qty." x "; //if ($line->product_label) $htmlforlines.= ''.$line->product_label.''; if (isset($line->product_type)) { @@ -1026,7 +1042,8 @@ if ($placeid > 0) } } if (!empty($line->array_options['options_order_notes'])) $htmlforlines .= "
(".$line->array_options['options_order_notes'].")"; - if ($_SESSION["basiclayout"] != 1) + if ($_SESSION["basiclayout"] == 1) $htmlforlines .= '  '; + if ($_SESSION["basiclayout"] != 1) { $moreinfo = ''; $moreinfo .= $langs->transcountry("TotalHT", $mysoc->country_code).': '.price($line->total_ht); From abf7fce10873bb24108dbc3cff0c4ed23bf86a8b Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Wed, 27 May 2020 06:44:00 +0200 Subject: [PATCH 04/23] Update auto_order.php --- htdocs/takepos/public/auto_order.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/takepos/public/auto_order.php b/htdocs/takepos/public/auto_order.php index c7612711df0..910c00327b4 100644 --- a/htdocs/takepos/public/auto_order.php +++ b/htdocs/takepos/public/auto_order.php @@ -33,4 +33,5 @@ $_SESSION["takeposterminal"] = 1; define('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE', 1); if (GETPOSTISSET("mobilepage")) require '../invoice.php'; +elseif (GETPOSTISSET("genimg")) require DOL_DOCUMENT_ROOT.'/takepos/genimg/index.php'; else require '../phone.php'; From 7d323f43793016f2dc0f4b107413ff5ecc6f3262 Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Wed, 27 May 2020 06:48:40 +0200 Subject: [PATCH 05/23] Update index.php --- htdocs/takepos/genimg/index.php | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/htdocs/takepos/genimg/index.php b/htdocs/takepos/genimg/index.php index a5686054193..2559d5f5b29 100644 --- a/htdocs/takepos/genimg/index.php +++ b/htdocs/takepos/genimg/index.php @@ -25,7 +25,7 @@ if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); -require '../../main.inc.php'; // Load $user and permissions +if (!defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) require '../../main.inc.php'; // Load $user and permissions $id = GETPOST('id', 'int'); $w = GETPOST('w', 'int'); @@ -60,7 +60,7 @@ if ($query == "cat") { $filename = $obj['photo']; } - $file = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=category&entity='.$object->entity.'&file='.urlencode($pdir.$filename); + $file = DOL_URL_ROOT.'/viewimage.php?cache=1&publictakepos=1&modulepart=category&entity='.$object->entity.'&file='.urlencode($pdir.$filename); header('Location: '.$file); exit; } @@ -72,12 +72,20 @@ elseif ($query == "pro") $objProd = new Product($db); $objProd->fetch($id); - $image = $objProd->show_photos('product', $conf->product->multidir_output[$entity], 'small', 1); + $image = $objProd->show_photos('product', $conf->product->multidir_output[$objProd->entity], 'small', 1); preg_match('@src="([^"]+)"@', $image, $match); $file = array_pop($match); - if ($file == "") header('Location: ../../public/theme/common/nophoto.png'); - else header('Location: '.$file.'&cache=1'); + if ($file == "") { + header('Location: ../../public/theme/common/nophoto.png'); + } else { + if (!defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { + header('Location: '.$file.'&cache=1'); + } else { + header('Location: '.$file.'&cache=1&publictakepos=1&modulepart=product'); + } + } +} else header('Location: '.$file.'&cache=1'); } else { From 896e3166b75a8b7b30178db02ef2903f2a1196be Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Wed, 27 May 2020 06:49:37 +0200 Subject: [PATCH 06/23] Update phone.css --- htdocs/takepos/css/phone.css | 96 ++++++++++++++++++++++++++++++++++-- 1 file changed, 93 insertions(+), 3 deletions(-) diff --git a/htdocs/takepos/css/phone.css b/htdocs/takepos/css/phone.css index 0f3606071f0..bdfdf45e116 100644 --- a/htdocs/takepos/css/phone.css +++ b/htdocs/takepos/css/phone.css @@ -4,6 +4,7 @@ html,body { margin:0; height:100%; width:100%; + background-color: #FFF !important; } .container{ @@ -17,14 +18,14 @@ html,body { .phonerow1{ margin: 0 auto; width: 100%; - height: 40%; + height: auto; min-height: 40%; } .phonerow2{ margin: 0 auto; width: 100%; - height: 40%; + height: auto; } .phonebuttonsrow{ @@ -90,7 +91,71 @@ button.publicphonebutton { text-align: center; overflow: visible; /* removes extra width in IE */ width:33%; - height:90%; + height:50px; + font-weight: bold; + color: #fff; +} + +.phoneblue{ + color: #fff; + background-color: #428bca; + border-color: #357ebd; +} + +.phonegreen{ + color: #fff; + background-color: #5cb85c; + border-color: #4cae4c; + font-size:20px; + text-align:center; + width:20px; +} + +.phonetable{ + width:130px; +} + +.phoneqty{ + font-size:24px; + font-weight: bold; + + +} + +.phonered{ + color: #fff; + background-color: #dc3545; + border-color: #dc3545; + font-size:20px; + text-align:center; + width:20px; +} + +.phoneorange{ + color: #fff; + background-color: #f0ad4e; + border-color: #eea236; +} + +.total{ + width:100% !important; + font-size:24px; +} + +.width24{ + font-size:24px; +} + +.leftcat{ + margin-top:15px; + float:left; + width: 50%; + text-align:center; + height:150px;; + overflow:hidden; + margin-bottom:5px; + font-size:18px; + color:#5B5858; font-weight: bold; } @@ -107,3 +172,28 @@ button.publicphonebutton2 { font-weight: bold; padding: 8px 16px; } + +.div-table-responsive-no-min{ + margin-top:20px; +} + +.comment { + float: left; + width: 100%; + height: auto; +} + +.comment-text-area { + float: left; + width: 80%; + height: auto; +} + +.textinput { + float: left; + width: 100%; + min-height: 75px; + outline: none; + resize: none; + border: 1px solid grey; +} From 8891595993a4ccf1fcb5334db0ada54af776cd2f Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Wed, 27 May 2020 06:57:12 +0200 Subject: [PATCH 07/23] Fix travis --- htdocs/takepos/phone.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/takepos/phone.php b/htdocs/takepos/phone.php index 88ab8ef5227..0e49eff4ed5 100644 --- a/htdocs/takepos/phone.php +++ b/htdocs/takepos/phone.php @@ -130,7 +130,7 @@ elseif ($action == "checkplease") { print ''; } } -else { +} else { // Title $title = 'TakePOS - Dolibarr '.DOL_VERSION; if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $title = 'TakePOS - '.$conf->global->MAIN_APPLICATION_TITLE; From 3b884c40513677a2280b779bd54ede87ace43a16 Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Wed, 27 May 2020 07:03:57 +0200 Subject: [PATCH 08/23] Fix travis --- htdocs/takepos/genimg/index.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/htdocs/takepos/genimg/index.php b/htdocs/takepos/genimg/index.php index 2559d5f5b29..ea863374f3c 100644 --- a/htdocs/takepos/genimg/index.php +++ b/htdocs/takepos/genimg/index.php @@ -85,10 +85,7 @@ elseif ($query == "pro") header('Location: '.$file.'&cache=1&publictakepos=1&modulepart=product'); } } -} else header('Location: '.$file.'&cache=1'); -} -else -{ +} else { // TODO We don't need this. Size of image must be defined on HTML page, image must NOT be resize when downloaded. // The file From 954c29786e7102c7cf3bf771e42d00d5eb81933d Mon Sep 17 00:00:00 2001 From: Florian Mortgat Date: Wed, 27 May 2020 12:15:42 +0200 Subject: [PATCH 09/23] FIX 10.0 - pagination in prelevement/bons.php --- htdocs/compta/prelevement/bons.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/prelevement/bons.php b/htdocs/compta/prelevement/bons.php index 27654de1ad0..b5610b81f68 100644 --- a/htdocs/compta/prelevement/bons.php +++ b/htdocs/compta/prelevement/bons.php @@ -36,7 +36,10 @@ $socid = GETPOST('socid', 'int'); if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'prelevement', '', '', 'bons'); +$urladd = ''; $limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit; +if ($limit != $conf->liste_limit) $urladd .= '&limit=' . $limit; + $sortfield = GETPOST('sortfield', 'alpha'); $sortorder = GETPOST('sortorder', 'alpha'); $page = GETPOST('page', 'int'); @@ -102,7 +105,7 @@ if ($result) $num = $db->num_rows($result); $i = 0; - $urladd= "&statut=".$statut; + $urladd .= "&statut=" . $statut; $selectedfields=''; From d491f2cf541a375ec0077893874d9b4087fb8dfb Mon Sep 17 00:00:00 2001 From: Florian Mortgat Date: Wed, 27 May 2020 18:27:10 +0200 Subject: [PATCH 10/23] [pgsql] type of llx_adherent_type.subscription is VARCHAR(3) so quotes are mandatory --- htdocs/adherents/class/adherent.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 04c5baa642a..eeede7b3810 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -2282,7 +2282,7 @@ class Adherent extends CommonObject $sql.= " WHERE a.fk_adherent_type = t.rowid"; $sql.= " AND a.statut = 1"; $sql.= " AND a.entity IN (".getEntity('adherent').")"; - $sql.= " AND ((a.datefin IS NULL or a.datefin < '".$this->db->idate($now)."') AND t.subscription = 1)"; + $sql.= " AND ((a.datefin IS NULL or a.datefin < '".$this->db->idate($now)."') AND t.subscription = '1')"; $resql=$this->db->query($sql); if ($resql) From 1838cf92efccbf9977a6d697b5a6872911da3dea Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 28 May 2020 11:51:49 +0200 Subject: [PATCH 11/23] Look and feel v12 --- htdocs/core/lib/product.lib.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php index 43acb16ba2a..a8567cd420c 100644 --- a/htdocs/core/lib/product.lib.php +++ b/htdocs/core/lib/product.lib.php @@ -37,11 +37,14 @@ function product_prepare_head($object) global $db, $langs, $conf, $user; $langs->load("products"); + $label = $langs->trans('Product'); + if ($object->isService()) $label = $langs->trans('Service'); + $h = 0; $head = array(); $head[$h][0] = DOL_URL_ROOT."/product/card.php?id=".$object->id; - $head[$h][1] = $langs->trans("ProductOrService"); + $head[$h][1] = $label; $head[$h][2] = 'card'; $h++; From 2afcfa84638f1eaaca355805940ab8f7edde0b99 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 28 May 2020 12:01:19 +0200 Subject: [PATCH 12/23] Fix missing stat on products --- htdocs/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/index.php b/htdocs/index.php index 8d6e02594ee..1ad2d1b4f64 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -158,7 +158,7 @@ if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS)) 'prospects' => !empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS), 'suppliers' => !empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS), 'contacts' => !empty($conf->societe->enabled) && $user->rights->societe->contact->lire, - 'services' => !empty($conf->product->enabled) && $user->rights->produit->lire, + 'products' => !empty($conf->product->enabled) && $user->rights->produit->lire, 'services' => !empty($conf->service->enabled) && $user->rights->service->lire, 'proposals' => !empty($conf->propal->enabled) && $user->rights->propale->lire, 'orders' => !empty($conf->commande->enabled) && $user->rights->commande->lire, From 88475025af59a8df3e8c280decf5c0b20b9425e4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 28 May 2020 12:04:52 +0200 Subject: [PATCH 13/23] Trans --- htdocs/langs/en_US/companies.lang | 2 +- htdocs/langs/en_US/products.lang | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index 1a9208bcf85..92674363ced 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -425,7 +425,7 @@ ListSuppliersShort=List of Vendors ListProspectsShort=List of Prospects ListCustomersShort=List of Customers ThirdPartiesArea=Third Parties/Contacts -LastModifiedThirdParties=Last %s modified Third Parties +LastModifiedThirdParties=Latest %s modified Third Parties UniqueThirdParties=Total of Third Parties InActivity=Open ActivityCeased=Closed diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang index a31243a07b6..fb4379f5e1a 100644 --- a/htdocs/langs/en_US/products.lang +++ b/htdocs/langs/en_US/products.lang @@ -43,7 +43,7 @@ ServicesOnSaleOnly=Services for sale only ServicesOnPurchaseOnly=Services for purchase only ServicesNotOnSell=Services not for sale and not for purchase ServicesOnSellAndOnBuy=Services for sale and for purchase -LastModifiedProductsAndServices=Last %s modified products/services +LastModifiedProductsAndServices=Latest %s modified products/services LastRecordedProducts=Latest %s recorded products LastRecordedServices=Latest %s recorded services CardProduct0=Product From edc6abcea83da1430ae8031f70280bba6d9b004f Mon Sep 17 00:00:00 2001 From: atm-lena Date: Thu, 28 May 2020 15:19:37 +0200 Subject: [PATCH 14/23] FIX Rounding Total TVA in "crabe" model pdf --- htdocs/core/modules/facture/doc/pdf_crabe.modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index bfa15ebd4b1..c302c2174bf 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -1275,7 +1275,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs, '', '', ($conf->global->MAIN_MAX_DECIMALS_TOT ? $conf->global->MAIN_MAX_DECIMALS_TOT : 0)), 0, 'R', 1); } } From 9915d97adf832b230b6950a65b389e1696f43624 Mon Sep 17 00:00:00 2001 From: glu000 Date: Thu, 28 May 2020 16:11:02 +0200 Subject: [PATCH 15/23] Fix #13991 --- htdocs/core/class/extrafields.class.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index ac388b1ef83..50513739ef5 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1686,8 +1686,13 @@ class ExtraFields } elseif ($type == 'select') { - if ($langfile && $param['options'][$value]) $value = $langs->trans($param['options'][$value]); - else $value = $param['options'][$value]; + $valstr = $param['options'][$value]; + if (($pos = strpos($valstr, "|")) !== false) + { + $valstr = substr ($valstr, 0, $pos); + } + if ($langfile && $valstr) $value = $langs->trans($valstr); + else $value = $valstr; } elseif ($type == 'sellist') { From 56259bae9abcac5e74b846202ff284c6a19815f0 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 28 May 2020 14:18:00 +0000 Subject: [PATCH 16/23] Fixing style errors. --- htdocs/core/class/extrafields.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 50513739ef5..f938426d4ba 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1689,7 +1689,7 @@ class ExtraFields $valstr = $param['options'][$value]; if (($pos = strpos($valstr, "|")) !== false) { - $valstr = substr ($valstr, 0, $pos); + $valstr = substr($valstr, 0, $pos); } if ($langfile && $valstr) $value = $langs->trans($valstr); else $value = $valstr; From bdc73b5cae582ff1f3b935e8064021787ba41e0d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 28 May 2020 17:37:53 +0200 Subject: [PATCH 17/23] Update pdf_crabe.modules.php --- htdocs/core/modules/facture/doc/pdf_crabe.modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index c302c2174bf..692e75db82d 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -1275,7 +1275,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price($tvaval, 0, $outputlangs, '', '', ($conf->global->MAIN_MAX_DECIMALS_TOT ? $conf->global->MAIN_MAX_DECIMALS_TOT : 0)), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price(price2num($tvaval, 'MT'), 0', $outputlangs), 0, 'R', 1); } } From 8360ca4b20f43772ba9320b1e86896212028eb63 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 28 May 2020 17:38:20 +0200 Subject: [PATCH 18/23] Update pdf_crabe.modules.php --- htdocs/core/modules/facture/doc/pdf_crabe.modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 692e75db82d..a32ba1308a3 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -1275,7 +1275,7 @@ class pdf_crabe extends ModelePDFFactures $pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); - $pdf->MultiCell($largcol2, $tab2_hl, price(price2num($tvaval, 'MT'), 0', $outputlangs), 0, 'R', 1); + $pdf->MultiCell($largcol2, $tab2_hl, price(price2num($tvaval, 'MT'), 0, $outputlangs), 0, 'R', 1); } } From 9d7a4cae0010961d95ab4f08476c5fe234ac36fb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 28 May 2020 17:49:56 +0200 Subject: [PATCH 19/23] Fix default value --- htdocs/install/mysql/migration/11.0.0-12.0.0.sql | 5 +++++ htdocs/install/mysql/tables/llx_adherent_type.sql | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql index 90b627ea425..ab9bd529edd 100644 --- a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql +++ b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql @@ -298,3 +298,8 @@ ALTER TABLE llx_menu MODIFY COLUMN module varchar(255); UPDATE llx_actioncomm SET fk_action = 50 where fk_action = 40 AND code = 'TICKET_MSG'; ALTER TABLE llx_emailcollector_emailcollector ADD COLUMN hostcharset varchar(16) DEFAULT 'UTF-8'; + +ALTER TABLE llx_adherent_type MODIFY subscription varchar(3) NOT NULL DEFAULT '1'; +ALTER TABLE llx_adherent_type MODIFY vote varchar(3) NOT NULL DEFAULT '1'; + + diff --git a/htdocs/install/mysql/tables/llx_adherent_type.sql b/htdocs/install/mysql/tables/llx_adherent_type.sql index 1b675c5e3fd..7e9270b89dc 100644 --- a/htdocs/install/mysql/tables/llx_adherent_type.sql +++ b/htdocs/install/mysql/tables/llx_adherent_type.sql @@ -31,8 +31,8 @@ create table llx_adherent_type libelle varchar(50) NOT NULL, morphy varchar(3) NOT NULL, duration varchar(6) DEFAULT NULL, - subscription varchar(3) NOT NULL DEFAULT 'yes', - vote varchar(3) NOT NULL DEFAULT 'yes', + subscription varchar(3) NOT NULL DEFAULT '1', + vote varchar(3) NOT NULL DEFAULT '1', note text, mail_valid text )ENGINE=innodb; From fd868b9d67f1100e16e377be0c35a64f94dab628 Mon Sep 17 00:00:00 2001 From: Supermanu Date: Thu, 28 May 2020 14:56:20 +0200 Subject: [PATCH 20/23] Fix compatibility with delete perm in massactions --- htdocs/core/actions_massactions.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index ebae28e9582..c067ee2bc56 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -46,7 +46,7 @@ if (empty($objectclass) || empty($uploaddir)) // For backward compatibility if (!empty($permtoread) && empty($permissiontoread)) $permissiontoread = $permtoread; if (!empty($permtocreate) && empty($permissiontoadd)) $permissiontoadd = $permtocreate; -if (!empty($permtodelete) && empty($permissiontodelete)) $permissiontoread = $permtodelete; +if (!empty($permtodelete) && empty($permissiontodelete)) $permissiontodelete = $permtodelete; // Mass actions. Controls on number of lines checked. From 56d3a5ecf244a90901e5503057f70d1db9501694 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 28 May 2020 19:42:10 +0200 Subject: [PATCH 21/23] Fix look and feel v12 --- htdocs/user/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/user/card.php b/htdocs/user/card.php index cd115dbe292..f61fd3134ee 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1669,7 +1669,7 @@ else $warehousestatic = new Entrepot($db); $warehousestatic->fetch($object->fk_warehouse); print ''.$langs->trans("DefaultWarehouse").''; - print $warehousestatic->getNomUrl(); + print $warehousestatic->getNomUrl(1); print ''; } @@ -2722,7 +2722,7 @@ else { print ''.$langs->trans("DefaultWarehouse").''; print $formproduct->selectWarehouses($object->fk_warehouse, 'fk_warehouse', 'warehouseopen', 1); - print ' '.$langs->trans("AddWarehouse").''; + print ' '; print ''; } From 6cbb87f2249874cf6570071bdf8516030f631c11 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 28 May 2020 19:50:27 +0200 Subject: [PATCH 22/23] FIX #13995 #13994 manually. --- htdocs/societe/class/api_thirdparties.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php index c50a746c444..ab9d52a350d 100644 --- a/htdocs/societe/class/api_thirdparties.class.php +++ b/htdocs/societe/class/api_thirdparties.class.php @@ -133,7 +133,7 @@ class Thirdparties extends DolibarrApi } if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale $sql .= ", ".MAIN_DB_PREFIX."c_stcomm as st"; - $sql .= " WHERE t.entity IN ('.getEntity('societe').')"; + $sql .= " WHERE t.entity IN (".getEntity('societe').")"; $sql .= " AND t.fk_stcomm = st.id"; if ($mode == 1) $sql .= " AND t.client IN (1, 3)"; From 5cec3eb05273a9b8bee3aded2dc797969c49c0d8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 28 May 2020 20:12:49 +0200 Subject: [PATCH 23/23] Prepare 12.0 --- htdocs/filefunc.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index 0780154118e..eda59d8e0bb 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -31,7 +31,7 @@ */ if (!defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE', 'Dolibarr'); -if (!defined('DOL_VERSION')) define('DOL_VERSION', '12.0.0-alpha'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c +if (!defined('DOL_VERSION')) define('DOL_VERSION', '12.0.0-beta'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c if (!defined('EURO')) define('EURO', chr(128));