Added payment recording, minor CSS fixes, enabled Search
This commit is contained in:
@@ -185,7 +185,7 @@ class Account extends Model implements IDs
|
||||
|
||||
public function getNameAttribute()
|
||||
{
|
||||
return $this->company ?: $this->user->SurFirstName;
|
||||
return $this->company ?: ($this->user_id ? $this->user->SurFirstName : 'AID:'.$this->id);
|
||||
}
|
||||
|
||||
public function getServicesCountHtmlAttribute()
|
||||
|
@@ -48,11 +48,13 @@ class Invoice extends Model implements IDs
|
||||
// Array of items that can be updated with PushNew
|
||||
protected $pushable = ['items'];
|
||||
|
||||
/*
|
||||
protected $with = [
|
||||
'account.country.currency',
|
||||
'items.taxes',
|
||||
'paymentitems'
|
||||
];
|
||||
*/
|
||||
|
||||
// Caching variables
|
||||
private int $_paid = 0;
|
||||
|
@@ -32,7 +32,7 @@ class Payment extends Model implements IDs
|
||||
protected $table = 'ab_payment';
|
||||
protected $dates = ['date_payment'];
|
||||
protected $dateFormat = 'U';
|
||||
protected $with = ['account.country.currency','items'];
|
||||
//protected $with = ['account.country.currency','items'];
|
||||
|
||||
// Array of items that can be updated with PushNew
|
||||
protected $pushable = ['items'];
|
||||
|
@@ -4,8 +4,7 @@ namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
use App\Traits\NextKey;
|
||||
use App\Traits\PushNew;
|
||||
use App\Traits\{NextKey,PushNew};
|
||||
|
||||
class PaymentItem extends Model
|
||||
{
|
||||
@@ -13,11 +12,14 @@ class PaymentItem extends Model
|
||||
const RECORD_ID = 'payment_item';
|
||||
public $incrementing = FALSE;
|
||||
|
||||
protected $dateFormat = 'U';
|
||||
const CREATED_AT = 'date_orig';
|
||||
const UPDATED_AT = 'date_last';
|
||||
|
||||
protected $table = 'ab_payment_item';
|
||||
|
||||
/* RELATIONS */
|
||||
|
||||
public function payment() {
|
||||
return $this->belongsTo(Payment::class);
|
||||
}
|
||||
|
Reference in New Issue
Block a user