Add Stargas supplier dashboard with performance analytics
This commit is contained in:
25
src/app/Models/CustomerInvoice.php
Normal file
25
src/app/Models/CustomerInvoice.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class CustomerInvoice extends Model
|
||||
{
|
||||
protected $table = 'SL_SALESINVOICE';
|
||||
public $timestamps = false;
|
||||
|
||||
protected $casts = [
|
||||
'DOCDTETME' => 'datetime',
|
||||
];
|
||||
|
||||
public function customer()
|
||||
{
|
||||
return $this->belongsTo(Customer::class, 'ACCNO', 'DBTRCDE');
|
||||
}
|
||||
|
||||
public function lines()
|
||||
{
|
||||
return $this->hasMany(CustomerInvoiceLine::class, 'REFNO', 'REFNO');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user