diff --git a/VERSION.txt b/VERSION.txt index 97276d1dee4b..6f4fe76b0940 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -5.8.7 \ No newline at end of file +5.8.8 \ No newline at end of file diff --git a/config/ninja.php b/config/ninja.php index add7d2a3baf8..92afeebfa804 100644 --- a/config/ninja.php +++ b/config/ninja.php @@ -17,8 +17,8 @@ return [ 'require_https' => env('REQUIRE_HTTPS', true), 'app_url' => rtrim(env('APP_URL', ''), '/'), 'app_domain' => env('APP_DOMAIN', 'invoicing.co'), - 'app_version' => env('APP_VERSION', '5.8.7'), - 'app_tag' => env('APP_TAG', '5.8.7'), + 'app_version' => env('APP_VERSION', '5.8.8'), + 'app_tag' => env('APP_TAG', '5.8.8'), 'minimum_client_version' => '5.0.16', 'terms_version' => '1.0.1', 'api_secret' => env('API_SECRET', false), diff --git a/database/migrations/2024_01_10_071427_normalize_product_cost_types.php b/database/migrations/2024_01_10_071427_normalize_product_cost_types.php new file mode 100644 index 000000000000..8c9530c4aca6 --- /dev/null +++ b/database/migrations/2024_01_10_071427_normalize_product_cost_types.php @@ -0,0 +1,53 @@ +where('is_deleted', false) + ->cursor() + ->each(function (Invoice $invoice) { + + + $line_items = $invoice->line_items; + + foreach ($line_items as $key => $item) { + + if(property_exists($item, 'product_cost')) { + $line_items[$key]->product_cost = (float) $line_items[$key]->product_cost; + } + + } + + $invoice->line_items = $line_items; + $invoice->saveQuietly(); + + }); + + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + // + } +};