Merge pull request #8871 from turbo124/v5-develop

v5.7.30
This commit is contained in:
David Bomba 2023-10-14 08:42:55 +11:00 committed by GitHub
commit b67d0b1ae4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 42 additions and 39 deletions

View File

@ -1 +1 @@
5.7.29
5.7.30

View File

@ -34,7 +34,7 @@ class ProductFactory
$product->custom_value2 = '';
$product->custom_value3 = '';
$product->custom_value4 = '';
$product->is_deleted = 0;
$product->is_deleted = false;
$product->tax_id = 1;
return $product;

View File

@ -20,7 +20,6 @@ class ProjectFactory
$project = new Project;
$project->company_id = $company_id;
$project->user_id = $user_id;
$project->public_notes = '';
$project->private_notes = '';
$project->budgeted_hours = 0;
@ -30,7 +29,7 @@ class ProjectFactory
$project->custom_value2 = '';
$project->custom_value3 = '';
$project->custom_value4 = '';
$project->is_deleted = 0;
$project->is_deleted = false;
return $project;
}

View File

@ -425,8 +425,8 @@ class BillingPortalPurchase extends Component
return $this->subscription->service()->startTrial([
'email' => $this->email ?? $this->contact->email,
'quantity' => $this->quantity,
'contact_id' => $this->contact->id,
'client_id' => $this->contact->client->id,
'contact_id' => $this->contact->hashed_id,
'client_id' => $this->contact->client->hashed_id,
]);
}

View File

@ -20,10 +20,11 @@ use Illuminate\Database\Eloquent\SoftDeletes;
* @property int|null $user_id
* @property int|null $company_id
* @property string $name
* @property int $is_custom
* @property int $is_active
* @property bool $is_custom
* @property bool $is_active
* @property object|null $design
* @property int $is_deleted
* @property bool $is_deleted
* @property bool $is_template
* @property int|null $created_at
* @property int|null $updated_at
* @property int|null $deleted_at

View File

@ -33,22 +33,22 @@ use Illuminate\Database\Eloquent\SoftDeletes;
* @property int|null $payment_type_id
* @property int|null $recurring_expense_id
* @property bool $is_deleted
* @property string $amount
* @property string $foreign_amount
* @property float $amount
* @property float $foreign_amount
* @property string $exchange_rate
* @property string|null $tax_name1
* @property string $tax_rate1
* @property float $tax_rate1
* @property string|null $tax_name2
* @property string $tax_rate2
* @property float $tax_rate2
* @property string|null $tax_name3
* @property string $tax_rate3
* @property float $tax_rate3
* @property string|null $date
* @property string|null $payment_date
* @property string|null $private_notes
* @property string|null $public_notes
* @property string|null $transaction_reference
* @property int $should_be_invoiced
* @property int $invoice_documents
* @property bool $should_be_invoiced
* @property bool $invoice_documents
* @property int|null $transaction_id
* @property string|null $custom_value1
* @property string|null $custom_value2
@ -56,9 +56,9 @@ use Illuminate\Database\Eloquent\SoftDeletes;
* @property string|null $custom_value4
* @property string|null $number
* @property int|null $project_id
* @property string $tax_amount1
* @property string $tax_amount2
* @property string $tax_amount3
* @property float $tax_amount1
* @property float $tax_amount2
* @property float $tax_amount3
* @property int $uses_inclusive_taxes
* @property int $calculate_tax_by_amount
* @property-read \App\Models\User|null $assigned_user

View File

@ -54,7 +54,7 @@ use Illuminate\Database\Eloquent\Relations\HasManyThrough;
* @property string|null $last_sent_date
* @property string|null $due_date
* @property bool $is_deleted
* @property object|array $line_items
* @property object|array|string $line_items
* @property object|null $backup
* @property string|null $footer
* @property string|null $public_notes

View File

@ -27,8 +27,8 @@ use Illuminate\Support\Facades\Storage;
* @property int $id
* @property int $company_id
* @property int $user_id
* @property int $client_contact_id
* @property int $invoice_id
* @property int|null $client_contact_id
* @property int|null $invoice_id
* @property string $key
* @property string|null $transaction_reference
* @property string|null $message_id

View File

@ -30,21 +30,21 @@ use League\CommonMark\CommonMarkConverter;
* @property string|null $custom_value4
* @property string|null $product_key
* @property string|null $notes
* @property string $cost
* @property string $price
* @property string $quantity
* @property float $cost
* @property float $price
* @property float $quantity
* @property string|null $tax_name1
* @property string $tax_rate1
* @property float $tax_rate1
* @property string|null $tax_name2
* @property string $tax_rate2
* @property float $tax_rate2
* @property string|null $tax_name3
* @property string $tax_rate3
* @property float $tax_rate3
* @property int|null $deleted_at
* @property int|null $created_at
* @property int|null $updated_at
* @property int $is_deleted
* @property int $in_stock_quantity
* @property int $stock_notification
* @property bool $is_deleted
* @property float $in_stock_quantity
* @property bool $stock_notification
* @property int $stock_notification_threshold
* @property int|null $max_quantity
* @property string|null $product_image

View File

@ -15,10 +15,10 @@ use Laracasts\Presenter\PresentableTrait;
* @property int $company_id
* @property int|null $client_id
* @property string $name
* @property string $task_rate
* @property float $task_rate
* @property string|null $due_date
* @property string|null $private_notes
* @property string $budgeted_hours
* @property float $budgeted_hours
* @property string|null $custom_value1
* @property string|null $custom_value2
* @property string|null $custom_value3
@ -27,7 +27,7 @@ use Laracasts\Presenter\PresentableTrait;
* @property int|null $updated_at
* @property int|null $deleted_at
* @property string|null $public_notes
* @property int $is_deleted
* @property bool $is_deleted
* @property string|null $number
* @property string $color
* @property-read \App\Models\Client|null $client

View File

@ -42,8 +42,8 @@ use Illuminate\Support\Facades\Storage;
* @property string|null $date
* @property string|null $last_sent_date
* @property string|null $due_date
* @property int $is_deleted
* @property object|null $line_items
* @property bool $is_deleted
* @property object|array|string $line_items
* @property object|null $backup
* @property string|null $footer
* @property string|null $public_notes

View File

@ -234,6 +234,9 @@ class SubscriptionService
// Redirects from here work just fine. Livewire will respect it.
$client_contact = ClientContact::find($this->decodePrimaryKey($data['contact_id']));
if(is_string($data['client_id']))
$data['client_id'] = $this->decodePrimaryKey($data['client_id']);
if (!$this->subscription->trial_enabled) {
return new \Exception("Trials are disabled for this product");
}
@ -256,7 +259,7 @@ class SubscriptionService
if (array_key_exists('coupon', $data) && ($data['coupon'] == $this->subscription->promo_code) && $this->subscription->promo_discount > 0) {
$recurring_invoice->discount = $this->subscription->promo_discount;
$recurring_invoice->is_amount_discount = $this->subscription->is_amount_discount;
} elseif (strlen($this->subscription->promo_code) == 0 && $this->subscription->promo_discount > 0) {
} elseif (strlen($this->subscription->promo_code ?? '') == 0 && $this->subscription->promo_discount > 0) {
$recurring_invoice->discount = $this->subscription->promo_discount;
$recurring_invoice->is_amount_discount = $this->subscription->is_amount_discount;
}

View File

@ -15,8 +15,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.7.29'),
'app_tag' => env('APP_TAG','5.7.29'),
'app_version' => env('APP_VERSION','5.7.30'),
'app_tag' => env('APP_TAG','5.7.30'),
'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', ''),