diff --git a/.devtools/data_generation_scripts/9999_big_stock.php b/.devtools/data_generation_scripts/9999_big_stock.php new file mode 100644 index 00000000..dd410b86 --- /dev/null +++ b/.devtools/data_generation_scripts/9999_big_stock.php @@ -0,0 +1,27 @@ +getStockService()->AddProduct($productId, 1, date('Y-m-d', strtotime('+180 days')), StockService::TRANSACTION_TYPE_PURCHASE, date('Y-m-d', strtotime("$days days")), XRandomPrice()); + $transactionId2 = $this->getStockService()->ConsumeProduct($productId, 1, false, StockService::TRANSACTION_TYPE_CONSUME); + + $this->getDatabaseService()->ExecuteDbStatement("UPDATE stock_log SET row_created_timestamp = DATETIME(row_created_timestamp, '$days days') WHERE transaction_id = '$transactionId1'"); + $this->getDatabaseService()->ExecuteDbStatement("UPDATE stock_log SET row_created_timestamp = DATETIME(row_created_timestamp, '$days days') WHERE transaction_id = '$transactionId2'"); + + $days--; + $i++; +} + +function XRandomPrice() +{ + return mt_rand(2 * 100, 25 * 100) / 100 / 4; +} diff --git a/.devtools/data_generation_scripts/9999_lots_recipes.php b/.devtools/data_generation_scripts/9999_lots_recipes.php new file mode 100644 index 00000000..5669679a --- /dev/null +++ b/.devtools/data_generation_scripts/9999_lots_recipes.php @@ -0,0 +1,16 @@ +CopyRecipe(1); + $recipesService->CopyRecipe(2); + $recipesService->CopyRecipe(3); + $recipesService->CopyRecipe(4); + $recipesService->CopyRecipe(5); +} diff --git a/.devtools/data_generation_scripts/big_meal_plan.xlsx b/.devtools/data_generation_scripts/big_meal_plan.xlsx new file mode 100644 index 00000000..b4d0ed96 Binary files /dev/null and b/.devtools/data_generation_scripts/big_meal_plan.xlsx differ