diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php
index e1fcda0e00c..d6b425e6e30 100644
--- a/htdocs/adherents/subscription.php
+++ b/htdocs/adherents/subscription.php
@@ -932,7 +932,7 @@ if (($action == 'addsubscription' || $action == 'create_thirdparty') && $user->h
// If customer code was forced to "required", we ask it at creation to avoid error later
if (getDolGlobalString('MAIN_COMPANY_CODE_ALWAYS_REQUIRED')) {
$tmpcompany = new Societe($db);
- $tmpcompany->name = $companyname;
+ $tmpcompany->name = (string) $companyname;
$tmpcompany->get_codeclient($tmpcompany, 0);
$customercode = $tmpcompany->code_client;
$formquestion[] = array(
diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php
index 744f28357ee..f9bb52ff088 100644
--- a/htdocs/compta/facture/card.php
+++ b/htdocs/compta/facture/card.php
@@ -5092,6 +5092,7 @@ if ($action == 'create') {
if ($objectidnext && $statusreplacement == 0) {
print '
'.$langs->trans("ErrorCantCancelIfReplacementInvoiceNotValidated").'
';
} else {
+ $close = array();
// Code
$close[1]['code'] = 'badcustomer';
$close[2]['code'] = 'abandon';
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index e7d41a9a94b..f6b6958cbad 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -5512,7 +5512,7 @@ abstract class CommonObject
$product_static = new Product($this->db);
$product_static->fetch($line->fk_product);
- $product_static->ref = $line->ref; //can change ref in hook
+ $product_static->ref = (string) $line->ref; //can change ref in hook
$product_static->label = !empty($line->label) ? $line->label : ""; //can change label in hook
$text = $product_static->getNomUrl(1);
@@ -5729,7 +5729,7 @@ abstract class CommonObject
} elseif (!empty($line->fk_product)) {
$productstatic = new Product($this->db);
$productstatic->id = $line->fk_product;
- $productstatic->ref = $line->ref;
+ $productstatic->ref = (string) $line->ref;
$productstatic->type = $line->fk_product_type;
if (empty($productstatic->ref)) {
$line->fetch_product();
diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php
index 77308fc9bcd..3ae6dba1768 100644
--- a/htdocs/product/stock/class/mouvementstock.class.php
+++ b/htdocs/product/stock/class/mouvementstock.class.php
@@ -331,7 +331,7 @@ class MouvementStock extends CommonObject
if (getDolGlobalInt('PRODUIT_SOUSPRODUITS')) {
$productChildrenNb = $product->hasFatherOrChild(1);
}
- if (($product->type != Product::TYPE_SERVICE || getDolGlobalString('STOCK_SUPPORTS_SERVICES')) && ($productChildrenNb == 0 || getDolGlobalInt('PRODUIT_SOUSPRODUITS_ALSO_ENABLE_PARENT_STOCK_MOVE'))) {
+ if ($product->isStockManaged() && ($productChildrenNb == 0 || getDolGlobalInt('PRODUIT_SOUSPRODUITS_ALSO_ENABLE_PARENT_STOCK_MOVE'))) {
$movestock = 1;
}
diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php
index 73ccc3e366a..b2b3fcc2119 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -4672,7 +4672,7 @@ class Societe extends CommonObject
}
}
- $name = $socname;
+ $name = (string) $socname;
$alias = $socalias ? $socalias : '';
// Positionne parameters
diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php
index 8ca40a09a61..44e88d4d918 100644
--- a/htdocs/takepos/index.php
+++ b/htdocs/takepos/index.php
@@ -1431,6 +1431,8 @@ if (getDolGlobalString('TAKEPOS_DIRECT_PAYMENT')) {
$menus[$r++] = array('title' => ''.$langs->trans("DirectPayment").' ('.$langs->trans("Cash").')
', 'action' => 'DirectPayment();');
}
+$customprinterallowed = false;
+
// BAR RESTAURANT specific menu
if (getDolGlobalString('TAKEPOS_BAR_RESTAURANT')) {
// Button to print receipt before payment