Skip to content
Code-Schnipsel Gruppen Projekte
Commit 3412c0ab erstellt von Patrick Müller's avatar Patrick Müller
Dateien durchsuchen

fix: cast first argument of calls to getProduct() to int (productId)

Übergeordneter 7a0d0f99
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
2 Merge Requests!18next -> master,!17fix: cast first argument of calls to getProduct() to int (productId)
Pipeline-Nr. 4640 bestanden
......@@ -10,7 +10,7 @@
QUI::$Ajax->registerFunction(
'package_quiqqer_erp_ajax_products_getProductEdit',
function ($productId, $user) {
$Product = Products::getProduct($productId);
$Product = Products::getProduct((int)$productId);
$Control = new ProductEdit([
'Product' => $Product
......
......@@ -10,7 +10,7 @@
QUI::$Ajax->registerFunction(
'package_quiqqer_erp_ajax_products_getVariantChildren',
function ($productId) {
$Product = Products::getProduct($productId);
$Product = Products::getProduct((int)$productId);
if (!($Product instanceof VariantParent)) {
return [];
......
......@@ -12,7 +12,7 @@
QUI::$Ajax->registerFunction(
'package_quiqqer_erp_ajax_products_hasProductCustomFields',
function ($productId) {
$Product = Products::getProduct($productId);
$Product = Products::getProduct((int)$productId);
$fields = $Product->createUniqueProduct()->getCustomFields();
return count($fields);
......
......@@ -13,7 +13,7 @@
QUI::$Ajax->registerFunction(
'package_quiqqer_erp_ajax_products_isVariantParent',
function ($productId) {
$Product = Products::getProduct($productId);
$Product = Products::getProduct((int)$productId);
return $Product instanceof VariantParent;
},
['productId'],
......
......@@ -426,7 +426,7 @@ public function getVat()
$Area = QUI\ERP\Defaults::getArea();
}
$Product = QUI\ERP\Products\Handler\Products::getProduct($this->attributes['id']);
$Product = QUI\ERP\Products\Handler\Products::getProduct((int)$this->attributes['id']);
$Vat = $Product->getField(QUI\ERP\Products\Handler\Fields::FIELD_VAT);
$TaxType = new QUI\ERP\Tax\TaxType($Vat->getValue());
$TaxEntry = TaxUtils::getTaxEntry($TaxType, $Area);
......
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren