mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 04:24:36 -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));
|
$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);
|
return $this->itemResponse($recurring_invoice);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -59,12 +59,8 @@ class StripeConnectController extends BaseController
|
|||||||
|
|
||||||
$account = Account::create($data);
|
$account = Account::create($data);
|
||||||
|
|
||||||
nlog($account);
|
|
||||||
|
|
||||||
$link = Account::link($account->id, $token);
|
$link = Account::link($account->id, $token);
|
||||||
|
|
||||||
nlog($link);
|
|
||||||
|
|
||||||
if(!$company_gateway)
|
if(!$company_gateway)
|
||||||
$company_gateway = CompanyGatewayFactory::create($request->getCompany()->id, $request->getContact()->id);
|
$company_gateway = CompanyGatewayFactory::create($request->getCompany()->id, $request->getContact()->id);
|
||||||
|
|
||||||
|
@ -80,7 +80,11 @@ class ActivityRepository extends BaseRepository
|
|||||||
|
|
||||||
$backup = new Backup();
|
$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();
|
$contact = $entity->client->primary_contact()->first();
|
||||||
$backup->html_backup = $this->generateHtml($entity);
|
$backup->html_backup = $this->generateHtml($entity);
|
||||||
$backup->amount = $entity->amount;
|
$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