Refactor XL Vask module for better null handling and primary item validation
- Improved null safety by updating product ID retrieval logic in parsers and usage logs. - Enhanced primary wash item selection with stricter checks for valid product types. - Adjusted import date modifier in `importUsageLogs` for extended range (`-7 day`). - Streamlined product and user association in order creation with additional validations. - Removed redundant checks and refined permission handling in import tasks.
This commit is contained in:
@@ -682,6 +682,7 @@ class users_o extends db
|
||||
*/
|
||||
public function getCustomPrice(int $object_id, bool $is_category = false): int|null
|
||||
{
|
||||
self::requireSelected();
|
||||
// Get the custom price for the product
|
||||
$discount = $this->price_overrides->setUser($this->id)->getPrice($is_category, $object_id);
|
||||
// If the is_category is false, check if there is a custom price for the category that the product belongs to
|
||||
|
||||
Reference in New Issue
Block a user