diff --git a/app/Http/Controllers/ProtectedDownloadController.php b/app/Http/Controllers/ProtectedDownloadController.php index 9c0e6de972..4a3a866b2c 100644 --- a/app/Http/Controllers/ProtectedDownloadController.php +++ b/app/Http/Controllers/ProtectedDownloadController.php @@ -39,7 +39,8 @@ class ProtectedDownloadController extends BaseController return response()->streamDownload(function () use ($hashed_path) { $stream = Storage::readStream($hashed_path); - if ($stream === false) { + // if($stream ===false){ + if ($stream === null) { throw new SystemError('Unable to read file', 500); } diff --git a/app/Http/Requests/Nordigen/ConnectNordigenBankIntegrationRequest.php b/app/Http/Requests/Nordigen/ConnectNordigenBankIntegrationRequest.php index 78f02caf7c..aa5892dc2d 100644 --- a/app/Http/Requests/Nordigen/ConnectNordigenBankIntegrationRequest.php +++ b/app/Http/Requests/Nordigen/ConnectNordigenBankIntegrationRequest.php @@ -60,6 +60,7 @@ class ConnectNordigenBankIntegrationRequest extends Request /** * @return array{ * user_id: int, + * bank_account_id?: string, * company_key: string, * context: string, * is_react: bool, diff --git a/app/Http/Requests/TaskScheduler/PaymentScheduleRequest.php b/app/Http/Requests/TaskScheduler/PaymentScheduleRequest.php index f0da846f2a..1d8790bdea 100644 --- a/app/Http/Requests/TaskScheduler/PaymentScheduleRequest.php +++ b/app/Http/Requests/TaskScheduler/PaymentScheduleRequest.php @@ -150,6 +150,7 @@ class PaymentScheduleRequest extends Request RecurringInvoice::FREQUENCY_ANNUALLY => $date->startOfDay()->addYear(), RecurringInvoice::FREQUENCY_TWO_YEARS => $date->startOfDay()->addYears(2), RecurringInvoice::FREQUENCY_THREE_YEARS => $date->startOfDay()->addYears(3), + default => $date->startOfDay()->addMonthNoOverflow(), }; } } diff --git a/app/Listeners/Invoice/InvoiceTransactionEventEntry.php b/app/Listeners/Invoice/InvoiceTransactionEventEntry.php index 4814ec5397..7a4ea68af5 100644 --- a/app/Listeners/Invoice/InvoiceTransactionEventEntry.php +++ b/app/Listeners/Invoice/InvoiceTransactionEventEntry.php @@ -118,7 +118,7 @@ class InvoiceTransactionEventEntry return new TransactionEventMetadata([ 'tax_report' => [ 'tax_details' => $details, - 'payment_history' => $this->payments->toArray() ?? [], + 'payment_history' => $this->payments->toArray() ?? [], //@phpstan-ignore-line 'tax_summary' => [ 'total_taxes' => $invoice->total_taxes, 'total_paid' => $this->getTotalTaxPaid($invoice), diff --git a/app/Models/Account.php b/app/Models/Account.php index 7a67967b61..261caba6d8 100644 --- a/app/Models/Account.php +++ b/app/Models/Account.php @@ -75,6 +75,7 @@ use Laracasts\Presenter\PresentableTrait; * @property bool $is_trial * @property int $e_invoice_quota * @property int $docuninja_num_users + * @property string|null $e_invoicing_token * @property-read int|null $bank_integrations_count * @property-read int|null $companies_count * @property-read int|null $company_users_count diff --git a/app/Models/Client.php b/app/Models/Client.php index 8ba23516f6..1cdec93974 100644 --- a/app/Models/Client.php +++ b/app/Models/Client.php @@ -87,6 +87,9 @@ use Illuminate\Contracts\Translation\HasLocalePreference; * @property-read \App\Models\User $user * @property-read \App\Models\Company $company * @property-read \App\Models\Country|null $country + * @property-read \App\Models\Industry|null $industry + * @property-read \App\Models\Country|null $shipping_country + * @property-read \App\Models\Size|null $size * @property-read \Illuminate\Database\Eloquent\Collection $activities * @property-read \Illuminate\Database\Eloquent\Collection $company_ledger * @property-read \Illuminate\Database\Eloquent\Collection $contacts diff --git a/app/Models/Company.php b/app/Models/Company.php index 93445dd034..dcefe8aa30 100644 --- a/app/Models/Company.php +++ b/app/Models/Company.php @@ -123,6 +123,7 @@ use Laracasts\Presenter\PresentableTrait; * @property string|null $inbound_mailbox_blacklist * @property string|null $e_invoice_certificate_passphrase * @property string|null $e_invoice_certificate + * @property object|null $origin_tax_data * @property int $deleted_at * @property string|null $smtp_username * @property string|null $smtp_password diff --git a/app/Models/Design.php b/app/Models/Design.php index a60a5f8404..e07ab1a01e 100644 --- a/app/Models/Design.php +++ b/app/Models/Design.php @@ -30,6 +30,7 @@ use Illuminate\Database\Eloquent\SoftDeletes; * @property int|null $created_at * @property int|null $updated_at * @property int|null $deleted_at + * @property string|null $entities * @property-read \App\Models\Company|null $company * @property-read string $hashed_id * @method static \Illuminate\Database\Eloquent\Builder|BaseModel company() diff --git a/app/Models/Expense.php b/app/Models/Expense.php index 6f27da21d9..a0923ff3db 100644 --- a/app/Models/Expense.php +++ b/app/Models/Expense.php @@ -66,19 +66,20 @@ use Illuminate\Database\Eloquent\SoftDeletes; * @property float $tax_amount3 * @property bool $uses_inclusive_taxes * @property bool $calculate_tax_by_amount + * @property-read int|null $documents_count + * @property-read mixed $hashed_id * @property-read \App\Models\User|null $assigned_user * @property-read \App\Models\ExpenseCategory|null $category * @property-read \App\Models\Client|null $client * @property-read \App\Models\Company $company * @property-read \App\Models\Currency|null $currency * @property-read \Illuminate\Database\Eloquent\Collection $documents - * @property-read int|null $documents_count - * @property-read mixed $hashed_id * @property-read \App\Models\PaymentType|null $payment_type * @property-read \App\Models\Project|null $project * @property-read \App\Models\PurchaseOrder|null $purchase_order * @property-read \App\Models\User $user * @property-read \App\Models\Vendor|null $vendor + * @property-read \App\Models\Currency|null $invoice_currency * @method static \Illuminate\Database\Eloquent\Builder|BaseModel company() * @method static \Illuminate\Database\Eloquent\Builder|BaseModel exclude($columns) * @method static \Database\Factories\ExpenseFactory factory($count = null, $state = []) diff --git a/app/Models/Project.php b/app/Models/Project.php index 7005919339..c06b3de4dd 100644 --- a/app/Models/Project.php +++ b/app/Models/Project.php @@ -34,6 +34,7 @@ use Illuminate\Database\Eloquent\Relations\HasMany; * @property bool $is_deleted * @property string|null $number * @property string $color + * @property int|null $current_hours * @property-read \App\Models\Client|null $client * @property-read \App\Models\Company $company * @property-read int|null $documents_count diff --git a/app/Models/PurchaseOrder.php b/app/Models/PurchaseOrder.php index a93b1cf4f0..7683ce23f8 100644 --- a/app/Models/PurchaseOrder.php +++ b/app/Models/PurchaseOrder.php @@ -101,6 +101,8 @@ use App\Events\PurchaseOrder\PurchaseOrderWasEmailed; * @property \App\Models\User $user * @property \App\Models\Vendor $vendor * @property \App\Models\PurchaseOrderInvitation $invitation + * @property \App\Models\Currency|null $currency + * @property \App\Models\Location|null $location * @method static \Illuminate\Database\Eloquent\Builder|PurchaseOrder exclude($columns) * @method static \Database\Factories\PurchaseOrderFactory factory($count = null, $state = []) * @method static \Illuminate\Database\Eloquent\Builder|PurchaseOrder filter(\App\Filters\QueryFilters $filters) diff --git a/app/Models/Subscription.php b/app/Models/Subscription.php index 1d154b87cc..6df86256f0 100644 --- a/app/Models/Subscription.php +++ b/app/Models/Subscription.php @@ -56,6 +56,7 @@ use Illuminate\Database\Eloquent\SoftDeletes; * @property float $promo_price * @property int $registration_required * @property int $use_inventory_management + * @property string|null $steps * @property string|null $optional_product_ids * @property string|null $optional_recurring_product_ids * @property-read \App\Models\Company $company diff --git a/app/Models/Vendor.php b/app/Models/Vendor.php index 0a5c790277..8c34c18f23 100644 --- a/app/Models/Vendor.php +++ b/app/Models/Vendor.php @@ -59,6 +59,7 @@ use Illuminate\Database\Eloquent\SoftDeletes; * @property int|null $language_id * @property int|null $last_login * @property bool $is_tax_exempt + * @property string|null $classification * @property-read \Illuminate\Database\Eloquent\Collection $activities * @property-read int|null $activities_count * @property-read \App\Models\Language|null $language diff --git a/tests/Feature/Export/ReportCsvGenerationTest.php b/tests/Feature/Export/ReportCsvGenerationTest.php index b403498121..2d659819a7 100644 --- a/tests/Feature/Export/ReportCsvGenerationTest.php +++ b/tests/Feature/Export/ReportCsvGenerationTest.php @@ -650,6 +650,21 @@ $this->account->forceDelete(); 'public_notes' => 'Public5', 'private_notes' => 'Private5', 'terms' => 'Terms5', + 'tax_rate1' => 0, + 'tax_rate2' => 0, + 'tax_rate3' => 0, + 'discount' => 0, + 'line_items' => [ + [ + 'quantity' => 1, + 'product_key' => 'product_key', + 'notes' => 'notes', + 'cost' => 1000, + 'custom_value1' => 'Custom 1', + 'custom_value2' => 'Custom 2', + 'custom_value3' => 'Custom 3', + ] + ] ]); diff --git a/tests/Feature/UpdateExchangeRatesTest.php b/tests/Feature/UpdateExchangeRatesTest.php index deed4825df..283b201f2a 100644 --- a/tests/Feature/UpdateExchangeRatesTest.php +++ b/tests/Feature/UpdateExchangeRatesTest.php @@ -50,9 +50,7 @@ class UpdateExchangeRatesTest extends TestCase UpdateExchangeRates::dispatchSync(); - $gbp_currency = app('currencies')->first(function ($item) { - return $item->id == 2; - }); + $gbp_currency = \App\Models\Currency::find(2); $this->assertEquals($currency_api->rates->GBP, $gbp_currency->exchange_rate);