Fix Invoice/Estimate template issues and Add Payment Receipt, Custom Payment Modes and Item units

This commit is contained in:
Jay Makwana
2020-01-05 07:22:36 +00:00
committed by Mohit Panjwani
parent 56a955befd
commit 4c33a5d88c
112 changed files with 5050 additions and 331 deletions

25
app/PaymentMethod.php Normal file
View File

@ -0,0 +1,25 @@
<?php
namespace Crater;
use Illuminate\Database\Eloquent\Model;
class PaymentMethod extends Model
{
protected $fillable = ['name', 'company_id'];
public function payments()
{
return $this->hasMany(Payment::class);
}
public function company()
{
return $this->belongsTo(Company::class);
}
public function scopeWhereCompany($query, $company_id)
{
$query->where('company_id', $company_id);
}
}