mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 09:44:37 -04:00
Fixes for billing subscriptions
This commit is contained in:
parent
ae8cf3b06a
commit
e0b169b64b
@ -13,12 +13,18 @@ namespace App\Http\Controllers;
|
|||||||
|
|
||||||
use App\Libraries\MultiDB;
|
use App\Libraries\MultiDB;
|
||||||
use App\Libraries\OAuth\Providers\Google;
|
use App\Libraries\OAuth\Providers\Google;
|
||||||
use Illuminate\Http\Request;
|
use App\Models\CompanyUser;
|
||||||
|
use App\Transformers\CompanyUserTransformer;
|
||||||
use Google_Client;
|
use Google_Client;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
class ConnectedAccountController extends BaseController
|
class ConnectedAccountController extends BaseController
|
||||||
{
|
{
|
||||||
|
|
||||||
|
protected $entity_type = CompanyUser::class;
|
||||||
|
|
||||||
|
protected $entity_transformer = CompanyUserTransformer::class;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
@ -128,8 +134,10 @@ class ConnectedAccountController extends BaseController
|
|||||||
auth()->user()->save();
|
auth()->user()->save();
|
||||||
|
|
||||||
//$ct = CompanyUser::whereUserId(auth()->user()->id);
|
//$ct = CompanyUser::whereUserId(auth()->user()->id);
|
||||||
|
$ct = CompanyUser::whereUserId(auth()->user()->id);
|
||||||
|
|
||||||
return $this->listResponse(auth()->user());
|
return $this->listResponse($ct);
|
||||||
|
// return $this->listResponse(auth()->user());
|
||||||
}
|
}
|
||||||
|
|
||||||
return response()
|
return response()
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
* @OA\Property(property="is_amount_discount", type="boolean", example="true", description="______"),
|
* @OA\Property(property="is_amount_discount", type="boolean", example="true", description="______"),
|
||||||
* @OA\Property(property="allow_cancellation", type="boolean", example="true", description="______"),
|
* @OA\Property(property="allow_cancellation", type="boolean", example="true", description="______"),
|
||||||
* @OA\Property(property="per_seat_enabled", type="boolean", example="true", description="______"),
|
* @OA\Property(property="per_seat_enabled", type="boolean", example="true", description="______"),
|
||||||
|
* @OA\Property(property="currency_id", type="integer", example="1", description="______"),
|
||||||
* @OA\Property(property="min_seats_limit", type="integer", example="1", description="______"),
|
* @OA\Property(property="min_seats_limit", type="integer", example="1", description="______"),
|
||||||
* @OA\Property(property="max_seats_limit", type="integer", example="100", description="______"),
|
* @OA\Property(property="max_seats_limit", type="integer", example="100", description="______"),
|
||||||
* @OA\Property(property="trial_enabled", type="boolean", example="true", description="______"),
|
* @OA\Property(property="trial_enabled", type="boolean", example="true", description="______"),
|
||||||
|
@ -155,6 +155,7 @@ class SetupController extends Controller
|
|||||||
|
|
||||||
return redirect('/');
|
return redirect('/');
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
|
||||||
nlog($e->getMessage());
|
nlog($e->getMessage());
|
||||||
|
|
||||||
return redirect()
|
return redirect()
|
||||||
|
@ -39,7 +39,7 @@ class CreateBillingSubscriptionsTable extends Migration
|
|||||||
$table->softDeletes('deleted_at', 6);
|
$table->softDeletes('deleted_at', 6);
|
||||||
$table->boolean('is_deleted')->default(false);
|
$table->boolean('is_deleted')->default(false);
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
$table->foreign('product_id')->references('id')->on('products');
|
|
||||||
$table->foreign('company_id')->references('id')->on('companies')->onDelete('cascade');
|
$table->foreign('company_id')->references('id')->on('companies')->onDelete('cascade');
|
||||||
$table->index(['company_id', 'deleted_at']);
|
$table->index(['company_id', 'deleted_at']);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user