1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 22:22:32 +01:00
This commit is contained in:
David Bomba 2024-01-10 18:18:02 +11:00
parent 12a127a3e7
commit caa5b4b430
3 changed files with 56 additions and 3 deletions

View File

@ -1 +1 @@
5.8.7
5.8.8

View File

@ -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),

View File

@ -0,0 +1,53 @@
<?php
use App\Utils\Ninja;
use App\Models\Invoice;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
if(Ninja::isHosted()) {
return;
}
set_time_limit(0);
Invoice::withTrashed()
->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
{
//
}
};