Add import tasks and new parsers to XL Vask module

- Introduced `runImportTasks` method for vehicle, user, and usage log imports.
- Added new product parsers: `ht_b_rstel_s`, `ht_turbo`, and `ikke_b_rster_p_kabinen`.
- Implemented simulation and duplicate detection for usage logs via order objects.
- Updated usage log handling to include default customer checks and user association.
- Enhanced request handling with fast-link functionality for usage orders.
This commit is contained in:
Jeppe Bundgaard
2025-07-21 10:32:56 +02:00
parent e057b225a6
commit af3b0666fb
15 changed files with 603 additions and 15 deletions
+17
View File
@@ -4,6 +4,7 @@ namespace classes;
use Exception;
use mysqli;
use objects\orders_o;
class db
{
@@ -141,5 +142,21 @@ class db
return $this->fetch_all($result);
}
/**
* Generate a fake ID for a table.
* Fake ids are not stored in the database, they are generated on every request starting from -1.
* This is useful for testing purposes.
* @see orders_o::simulateOrderFromXLVask()
* @param string $table
* @return int
*/
public function getNextFakeId(string $table): int
{
// This is a static variable that will be shared across all instances of the class
static $fakeId = 0; // Start from 0 and decrement on each call
$fakeId--;
return $fakeId;
}
}