Invoices can be uploaded
This commit is contained in:
68
app/Models/Invoice.php
Normal file
68
app/Models/Invoice.php
Normal file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Scopes\InstancedModel;
|
||||
|
||||
/**
|
||||
* @property string $tenant
|
||||
* @property string $cost_unit_id
|
||||
* @property string $invoice_number
|
||||
* @property string $status
|
||||
* @property string $type
|
||||
* @property string $type_other
|
||||
* @property boolean $donation
|
||||
* @property string $user_id
|
||||
* @property string $contact_name
|
||||
* @property string $contact_email
|
||||
* @property string $contact_phone
|
||||
* @property string $contact_bank_owner
|
||||
* @property string $contact_bank_iban
|
||||
* @property float $amount
|
||||
* @property integer $distance
|
||||
* @property string $comment
|
||||
* @property string $changes
|
||||
* @property string $travel_direction
|
||||
* @property boolean $passengers
|
||||
* @property boolean $transportation
|
||||
* @property string $document_filename
|
||||
* @property string $approved_by
|
||||
* @property string $approved_at
|
||||
* @property boolean $upload_required
|
||||
* @property string $denied_by
|
||||
* @property string $denied_at
|
||||
* @property string $denied_reason
|
||||
*/
|
||||
class Invoice extends InstancedModel
|
||||
{
|
||||
protected $fillable = [
|
||||
'tenant',
|
||||
'cost_unit_id',
|
||||
'invoice_number',
|
||||
'status',
|
||||
'type',
|
||||
'type_other',
|
||||
'donation',
|
||||
'user_id',
|
||||
'contact_name',
|
||||
'contact_email',
|
||||
'contact_phone',
|
||||
'contact_bank_owner',
|
||||
'contact_bank_iban',
|
||||
'amount',
|
||||
'donation',
|
||||
'distance',
|
||||
'comment',
|
||||
'changes',
|
||||
'travel_direction',
|
||||
'passengers',
|
||||
'transportation',
|
||||
'document_filename',
|
||||
'approved_by',
|
||||
'approved_at',
|
||||
'upload_required',
|
||||
'denied_by',
|
||||
'denied_at',
|
||||
'denied_reason',
|
||||
];
|
||||
}
|
||||
9
app/Models/PageText.php
Normal file
9
app/Models/PageText.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Scopes\CommonModel;
|
||||
|
||||
class PageText extends CommonModel{
|
||||
protected $fillable = ['name', 'content'];
|
||||
}
|
||||
@@ -7,6 +7,7 @@ use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
|
||||
/**
|
||||
* @property int $id
|
||||
* @property string $username
|
||||
* @property string $local_group
|
||||
* @property string $firstname
|
||||
@@ -26,6 +27,7 @@ use Illuminate\Notifications\Notifiable;
|
||||
* @property string $eating_habits
|
||||
* @property string $swimming_permission
|
||||
* @property string $first_aid_permission
|
||||
* @property string $bank_account_owner
|
||||
* @property string $bank_account_iban
|
||||
* @property string $password
|
||||
* @property boolean $active
|
||||
@@ -67,6 +69,7 @@ class User extends Authenticatable
|
||||
'eating_habits',
|
||||
'swimming_permission',
|
||||
'first_aid_permission',
|
||||
'$bank_account_owner',
|
||||
'bank_account_iban',
|
||||
'password',
|
||||
'active',
|
||||
@@ -93,12 +96,17 @@ class User extends Authenticatable
|
||||
];
|
||||
}
|
||||
|
||||
public function getOfficialName() : string {
|
||||
return sprintf('%1$s %2$s', $this->firstname, $this->lastname);
|
||||
}
|
||||
|
||||
public function getFullname() : string {
|
||||
return sprintf('%1$1s %2$s %3$s',
|
||||
$this->firstname,
|
||||
$this->lastname,
|
||||
$this->nickname !== null ? '(' . $this->nickname . ')' : '',
|
||||
$this->lastname
|
||||
);
|
||||
)
|
||||
|>trim(...);
|
||||
}
|
||||
|
||||
public function getNicename() : string {
|
||||
|
||||
Reference in New Issue
Block a user