Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v5.7.30 #8871

Merged
merged 6 commits into from
Oct 13, 2023
Merged

v5.7.30 #8871

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.7.29
5.7.30
2 changes: 1 addition & 1 deletion app/Factory/ProductFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static function create(int $company_id, int $user_id) :Product
$product->custom_value2 = '';
$product->custom_value3 = '';
$product->custom_value4 = '';
$product->is_deleted = 0;
$product->is_deleted = false;
$product->tax_id = 1;

return $product;
Expand Down
3 changes: 1 addition & 2 deletions app/Factory/ProjectFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ public static function create(int $company_id, int $user_id) :Project
$project = new Project;
$project->company_id = $company_id;
$project->user_id = $user_id;

$project->public_notes = '';
$project->private_notes = '';
$project->budgeted_hours = 0;
Expand All @@ -30,7 +29,7 @@ public static function create(int $company_id, int $user_id) :Project
$project->custom_value2 = '';
$project->custom_value3 = '';
$project->custom_value4 = '';
$project->is_deleted = 0;
$project->is_deleted = false;

return $project;
}
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Livewire/BillingPortalPurchase.php
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,8 @@ public function handleTrial()
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,
]);
}

Expand Down
7 changes: 4 additions & 3 deletions app/Models/Design.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@
* @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
Expand Down
20 changes: 10 additions & 10 deletions app/Models/Expense.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,32 +33,32 @@
* @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
* @property string|null $custom_value3
* @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
Expand Down
2 changes: 1 addition & 1 deletion app/Models/Invoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
* @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
Expand Down
4 changes: 2 additions & 2 deletions app/Models/InvoiceInvitation.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
* @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
Expand Down
18 changes: 9 additions & 9 deletions app/Models/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,21 @@
* @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
Expand Down
6 changes: 3 additions & 3 deletions app/Models/Project.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
* @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
Expand All @@ -27,7 +27,7 @@
* @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
Expand Down
4 changes: 2 additions & 2 deletions app/Models/PurchaseOrder.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
* @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
Expand Down
5 changes: 4 additions & 1 deletion app/Services/Subscription/SubscriptionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ public function startTrial(array $data)
// 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");
}
Expand All @@ -256,7 +259,7 @@ public function startTrial(array $data)
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;
}
Expand Down
4 changes: 2 additions & 2 deletions config/ninja.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
'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', ''),
Expand Down
Loading