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