mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Recurring Invoice Activities
This commit is contained in:
parent
c1b2b27c92
commit
82d274c1f2
@ -200,6 +200,8 @@ class RecurringInvoiceController extends BaseController
|
||||
{
|
||||
$recurring_invoice = $this->recurring_invoice_repo->save($request->all(), RecurringInvoiceFactory::create(auth()->user()->company()->id, auth()->user()->id));
|
||||
|
||||
nlog($recurring_invoice);
|
||||
|
||||
return $this->itemResponse($recurring_invoice);
|
||||
}
|
||||
|
||||
|
@ -59,12 +59,8 @@ class StripeConnectController extends BaseController
|
||||
|
||||
$account = Account::create($data);
|
||||
|
||||
nlog($account);
|
||||
|
||||
$link = Account::link($account->id, $token);
|
||||
|
||||
nlog($link);
|
||||
|
||||
if(!$company_gateway)
|
||||
$company_gateway = CompanyGatewayFactory::create($request->getCompany()->id, $request->getContact()->id);
|
||||
|
||||
|
@ -80,7 +80,11 @@ class ActivityRepository extends BaseRepository
|
||||
|
||||
$backup = new Backup();
|
||||
|
||||
if (get_class($entity) == Invoice::class || get_class($entity) == Quote::class || get_class($entity) == Credit::class) {
|
||||
if (get_class($entity) == Invoice::class
|
||||
|| get_class($entity) == Quote::class
|
||||
|| get_class($entity) == Credit::class
|
||||
|| get_class($entity) == RecurringInvoice::class
|
||||
) {
|
||||
$contact = $entity->client->primary_contact()->first();
|
||||
$backup->html_backup = $this->generateHtml($entity);
|
||||
$backup->amount = $entity->amount;
|
||||
|
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddRecurringInvoiceIdToActivitiesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('activities', function (Blueprint $table) {
|
||||
$table->unsignedInteger('recurring_invoice_id')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user