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