mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-02 03:14:35 -04:00
Expand functionality of Subscription by implementing Optional Products
This commit is contained in:
parent
7727b90cd5
commit
82ec5a655b
@ -54,6 +54,9 @@ class Subscription extends BaseModel
|
|||||||
'price',
|
'price',
|
||||||
'name',
|
'name',
|
||||||
'currency_id',
|
'currency_id',
|
||||||
|
'registration_required',
|
||||||
|
'optional_product_ids',
|
||||||
|
'optional_recurring_product_ids',
|
||||||
];
|
];
|
||||||
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
|
@ -67,6 +67,7 @@ class BankTransactionTransformer extends EntityTransformer
|
|||||||
'invoice_ids' => (string) $bank_transaction->invoice_ids ?: '',
|
'invoice_ids' => (string) $bank_transaction->invoice_ids ?: '',
|
||||||
'expense_id'=> (string) $this->encodePrimaryKey($bank_transaction->expense_id) ?: '',
|
'expense_id'=> (string) $this->encodePrimaryKey($bank_transaction->expense_id) ?: '',
|
||||||
'vendor_id'=> (string) $this->encodePrimaryKey($bank_transaction->vendor_id) ?: '',
|
'vendor_id'=> (string) $this->encodePrimaryKey($bank_transaction->vendor_id) ?: '',
|
||||||
|
'bank_rule_id' => (string) $this->encodePrimaryKey($bank_transaction->bank_rule_id) ?: '',
|
||||||
'is_deleted' => (bool) $bank_transaction->is_deleted,
|
'is_deleted' => (bool) $bank_transaction->is_deleted,
|
||||||
'created_at' => (int) $bank_transaction->created_at,
|
'created_at' => (int) $bank_transaction->created_at,
|
||||||
'updated_at' => (int) $bank_transaction->updated_at,
|
'updated_at' => (int) $bank_transaction->updated_at,
|
||||||
|
@ -27,6 +27,15 @@ return new class extends Migration
|
|||||||
{
|
{
|
||||||
$table->bigInteger('bank_rule_id')->nullable();
|
$table->bigInteger('bank_rule_id')->nullable();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Schema::table('subscriptions', function (Blueprint $table)
|
||||||
|
{
|
||||||
|
$table->boolean('registration_required')->default(false);
|
||||||
|
$table->text('optional_product_ids')->nullable();
|
||||||
|
$table->text('optional_recurring_product_ids')->nullable();
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user