Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	htdocs/core/class/extrafields.class.php
	htdocs/filefunc.inc.php
	htdocs/takepos/css/phone.css
	htdocs/takepos/invoice.php
This commit is contained in:
Laurent Destailleur 2020-05-28 20:20:39 +02:00
commit 2836368017
12 changed files with 31 additions and 17 deletions

View File

@ -2180,7 +2180,7 @@ class Adherent extends CommonObject
if ($mode == 'expired') { if ($mode == 'expired') {
$sql .= " AND a.statut = 1"; $sql .= " AND a.statut = 1";
$sql .= " AND a.entity IN (".getEntity('adherent').")"; $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') { } elseif ($mode == 'shift') {
$sql .= " AND a.statut = -1"; $sql .= " AND a.statut = -1";
$sql .= " AND a.entity IN (".getEntity('adherent').")"; $sql .= " AND a.entity IN (".getEntity('adherent').")";

View File

@ -1594,12 +1594,15 @@ class ExtraFields
{ {
//$value = price($value, 0, $langs, 0, 0, -1, $conf->currency); //$value = price($value, 0, $langs, 0, 0, -1, $conf->currency);
if ($value || $value == '0') $value = price($value, 0, $langs, 0, 0, -1); if ($value || $value == '0') $value = price($value, 0, $langs, 0, 0, -1);
} elseif ($type == 'select') } elseif ($type == 'select') {
{ $valstr = $param['options'][$value];
if ($langfile && $param['options'][$value]) $value = $langs->trans($param['options'][$value]); if (($pos = strpos($valstr, "|")) !== false)
else $value = $param['options'][$value]; {
} elseif ($type == 'sellist') $valstr = substr($valstr, 0, $pos);
{ }
if ($langfile && $valstr) $value = $langs->trans($valstr);
else $value = $valstr;
} elseif ($type == 'sellist') {
$param_list = array_keys($param['options']); $param_list = array_keys($param['options']);
$InfoFieldList = explode(":", $param_list[0]); $InfoFieldList = explode(":", $param_list[0]);

View File

@ -37,11 +37,14 @@ function product_prepare_head($object)
global $db, $langs, $conf, $user; global $db, $langs, $conf, $user;
$langs->load("products"); $langs->load("products");
$label = $langs->trans('Product');
if ($object->isService()) $label = $langs->trans('Service');
$h = 0; $h = 0;
$head = array(); $head = array();
$head[$h][0] = DOL_URL_ROOT."/product/card.php?id=".$object->id; $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'; $head[$h][2] = 'card';
$h++; $h++;

View File

@ -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/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/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); $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 // Journaux
$newmenu->add("/compta/journal/sellsjournal.php?leftmenu=report", $langs->trans("SellsJournal"), 1, $user->rights->compta->resultat->lire, '', '', '', 50); $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); $newmenu->add("/compta/journal/purchasesjournal.php?leftmenu=report", $langs->trans("PurchasesJournal"), 1, $user->rights->compta->resultat->lire, '', '', '', 51);

View File

@ -1285,7 +1285,7 @@ class pdf_crabe extends ModelePDFFactures
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1); $pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index); $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);
} }
} }

View File

@ -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), '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), '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, '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, 'services' => !empty($conf->service->enabled) && $user->rights->service->lire,
'proposals' => !empty($conf->propal->enabled) && $user->rights->propale->lire, 'proposals' => !empty($conf->propal->enabled) && $user->rights->propale->lire,
'orders' => !empty($conf->commande->enabled) && $user->rights->commande->lire, 'orders' => !empty($conf->commande->enabled) && $user->rights->commande->lire,

View File

@ -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'; 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_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';

View File

@ -31,8 +31,8 @@ create table llx_adherent_type
libelle varchar(50) NOT NULL, libelle varchar(50) NOT NULL,
morphy varchar(3) NOT NULL, morphy varchar(3) NOT NULL,
duration varchar(6) DEFAULT NULL, duration varchar(6) DEFAULT NULL,
subscription varchar(3) NOT NULL DEFAULT 'yes', subscription varchar(3) NOT NULL DEFAULT '1',
vote varchar(3) NOT NULL DEFAULT 'yes', vote varchar(3) NOT NULL DEFAULT '1',
note text, note text,
mail_valid text mail_valid text
)ENGINE=innodb; )ENGINE=innodb;

View File

@ -425,7 +425,7 @@ ListSuppliersShort=List of Vendors
ListProspectsShort=List of Prospects ListProspectsShort=List of Prospects
ListCustomersShort=List of Customers ListCustomersShort=List of Customers
ThirdPartiesArea=Third Parties/Contacts ThirdPartiesArea=Third Parties/Contacts
LastModifiedThirdParties=Last %s modified Third Parties LastModifiedThirdParties=Latest %s modified Third Parties
UniqueThirdParties=Total of Third Parties UniqueThirdParties=Total of Third Parties
InActivity=Open InActivity=Open
ActivityCeased=Closed ActivityCeased=Closed

View File

@ -43,7 +43,7 @@ ServicesOnSaleOnly=Services for sale only
ServicesOnPurchaseOnly=Services for purchase only ServicesOnPurchaseOnly=Services for purchase only
ServicesNotOnSell=Services not for sale and not for purchase ServicesNotOnSell=Services not for sale and not for purchase
ServicesOnSellAndOnBuy=Services for sale and 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 LastRecordedProducts=Latest %s recorded products
LastRecordedServices=Latest %s recorded services LastRecordedServices=Latest %s recorded services
CardProduct0=Product CardProduct0=Product

View File

@ -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 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 .= ", ".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"; $sql .= " AND t.fk_stcomm = st.id";
if ($mode == 1) $sql .= " AND t.client IN (1, 3)"; if ($mode == 1) $sql .= " AND t.client IN (1, 3)";