chore: initial commit of existing codebase
This commit is contained in:
commit
11e94889b2
292 files changed
+38586
No files matched your search
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class PaymentReceipt extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $fillable = ['sales_invoice_id', 'customer_id', 'receipt_date', 'amount', 'payment_method', 'reference_number', 'notes', 'created_by'];
|
||||
|
||||
protected $casts = [
|
||||
'receipt_date' => 'date',
|
||||
'amount' => 'decimal:2',
|
||||
];
|
||||
|
||||
public function salesInvoice()
|
||||
{
|
||||
return $this->belongsTo(SalesInvoice::class);
|
||||
}
|
||||
|
||||
public function customer()
|
||||
{
|
||||
return $this->belongsTo(Customer::class);
|
||||
}
|
||||
|
||||
public function createdBy()
|
||||
{
|
||||
return $this->belongsTo(\App\Models\User::class, 'created_by');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user