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

Merge branch 'dev' into 'next'

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

See merge request !17
Übergeordnete 6822fbda 3412c0ab
No related branches found
No related tags found
2 Merge Requests!18next -> master,!17fix: cast first argument of calls to getProduct() to int (productId)
Pipeline #4641 bestanden mit Phase
in 13 Sekunden
......@@ -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% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren