File: /var/www/wsklad/app/ContragentPriceList.php
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class ContragentPriceList extends Model
{
protected $fillable = [
'kontragent_code',
'CODE',
'RNOMTYPE',
'NAME',
'F_OTHERNAME',
'VAT_RATE',
'TAX_GROUP',
'SALES_MEASURE',
'BASE_PRICE',
'SALES_PRICE',
'DISCOUNT_PROCENT',
'ACTUAL_QUANTITY',
'AVAILABLE_QUANTITY',
'F_PROMOTION',
];
protected $table = 'contragent_pricelists';
public $timestamps = false;
public function kontragent()
{
return $this->hasOne('App\Ajurendpointcontragent', 'F_KONTRAGENT', 'kontragent_code');
}
public function article()
{
return $this->hasOne('App\Ajurendpointproduct', 'CODE', 'CODE');
}
}