diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 1f78a0d1c7b..90dec733bc8 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -2180,7 +2180,7 @@ class Adherent extends CommonObject if ($mode == 'expired') { $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')"; } elseif ($mode == 'shift') { $sql .= " AND a.statut = -1"; $sql .= " AND a.entity IN (".getEntity('adherent').")"; diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index c82e877fa80..4de540c9009 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1594,12 +1594,15 @@ class ExtraFields { //$value = price($value, 0, $langs, 0, 0, -1, $conf->currency); if ($value || $value == '0') $value = price($value, 0, $langs, 0, 0, -1); - } elseif ($type == 'select') - { - if ($langfile && $param['options'][$value]) $value = $langs->trans($param['options'][$value]); - else $value = $param['options'][$value]; - } elseif ($type == 'sellist') - { + } elseif ($type == 'select') { + $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') { $param_list = array_keys($param['options']); $InfoFieldList = explode(":", $param_list[0]); diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php index b2ad7d8f43b..dfc57313add 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++; diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 95cbbd05986..097325f267c 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -1426,7 +1426,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); diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 60958526357..a204bdad5d8 100644 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -1285,7 +1285,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(price2num($tvaval, 'MT'), 0, $outputlangs), 0, 'R', 1); } } diff --git a/htdocs/index.php b/htdocs/index.php index 231be576cfa..588dca00506 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, 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 220e1f51eca..ca93306f3fd 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 @@ -299,3 +299,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; 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 diff --git a/htdocs/societe/class/api_thirdparties.class.php b/htdocs/societe/class/api_thirdparties.class.php index ca3e4385837..535d4e68967 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)"; diff --git a/htdocs/takepos/css/phone.css b/htdocs/takepos/css/phone.css index 37434cfc707..bdfdf45e116 100644 --- a/htdocs/takepos/css/phone.css +++ b/htdocs/takepos/css/phone.css @@ -196,4 +196,4 @@ button.publicphonebutton2 { outline: none; resize: none; border: 1px solid grey; -} \ No newline at end of file +}