mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Add signature_ip column to purchase orders
This commit is contained in:
parent
0eac6589ce
commit
45ed89d18a
@ -12,37 +12,17 @@ use Illuminate\Foundation\Bus\Dispatchable;
|
|||||||
class InjectSignature implements ShouldQueue
|
class InjectSignature implements ShouldQueue
|
||||||
{
|
{
|
||||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||||
|
|
||||||
/**
|
|
||||||
* @var \App\Models\Invoice | \App\Models\Quote | \App\Models\Credit | \App\Models\PurchaseOrder
|
|
||||||
*/
|
|
||||||
public $entity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
public $signature;
|
|
||||||
|
|
||||||
public $contact_id;
|
|
||||||
|
|
||||||
public $ip;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new job instance.
|
* Create a new job instance.
|
||||||
*
|
*
|
||||||
* @param $entity
|
* @param \App\Models\Invoice | \App\Models\Quote | \App\Models\Credit | \App\Models\PurchaseOrder $entity
|
||||||
|
* @param int $contact_id
|
||||||
* @param string $signature
|
* @param string $signature
|
||||||
|
* @param string $ip
|
||||||
*/
|
*/
|
||||||
public function __construct($entity, $contact_id, string $signature, ?string $ip)
|
public function __construct(public \App\Models\Invoice | \App\Models\Quote | \App\Models\Credit | \App\Models\PurchaseOrder $entity, private int $contact_id, private string $signature, private ?string $ip)
|
||||||
{
|
{
|
||||||
$this->entity = $entity;
|
|
||||||
|
|
||||||
$this->contact_id = $contact_id;
|
|
||||||
|
|
||||||
$this->signature = $signature;
|
|
||||||
|
|
||||||
$this->ip = $ip;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -51,6 +51,7 @@ class DocumentTransformer extends EntityTransformer
|
|||||||
'archived_at' => (int) $document->deleted_at,
|
'archived_at' => (int) $document->deleted_at,
|
||||||
'created_at' => (int) $document->created_at,
|
'created_at' => (int) $document->created_at,
|
||||||
'is_deleted' => (bool) false,
|
'is_deleted' => (bool) false,
|
||||||
|
'is_public' => (bool) $document->is_public,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('purchase_order_invitations', function (Blueprint $table) {
|
||||||
|
$table->text('signature_ip')->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
};
|
Loading…
x
Reference in New Issue
Block a user