<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class SaleReturn extends Model
{
    public function customer(){
        return $this->belongsTo('App\Models\Customer');
    }
    public function saleDetail(){
        return $this->hasMany('App\Models\SaleDetail','sale_detail_id'); 
    }
    public function returnDetail(){
        return $this->hasMany('App\Models\SaleReturnDetail','sale_return_id'); 
    }
    public function category(){ 
        return $this->belongsTo('App\Models\Productategory','productcategory_id');
    }
}
