Merge Invoice and Bill into Document
This commit is contained in:
38
modules/BC21/Models/Purchase/Bill.php
Normal file
38
modules/BC21/Models/Purchase/Bill.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models\Purchase;
|
||||
|
||||
use App\Models\Document\Document;
|
||||
use App\Scopes\ReplaceDeprecatedColumns;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @see Document
|
||||
*/
|
||||
class Bill extends Document
|
||||
{
|
||||
protected static function booted()
|
||||
{
|
||||
static::addGlobalScope(new ReplaceDeprecatedColumns);
|
||||
}
|
||||
|
||||
public function getBillNumberAttribute($value)
|
||||
{
|
||||
return $this->document_number;
|
||||
}
|
||||
|
||||
public function setBillNumberAttribute($value)
|
||||
{
|
||||
$this->attributes['document_number'] = $value;
|
||||
}
|
||||
|
||||
public function getBilledAtAttribute($value)
|
||||
{
|
||||
return $this->issued_at;
|
||||
}
|
||||
|
||||
public function setBilledAtAttribute($value)
|
||||
{
|
||||
$this->attributes['issued_at'] = $value;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user