Enabled changing broadband services and adjusting invoices

This commit is contained in:
Deon George
2022-06-12 18:32:54 +10:00
parent c8162b8eb9
commit c1080481ec
8 changed files with 379 additions and 5 deletions

View File

@@ -12,6 +12,7 @@ use App\Traits\SiteID;
* + Charge Date should not be null
* + Attributes should be a collection array
* + type should not be null
* + It would be useful, given an array of Charges to call a function that renders them into invoice format. This may provide consistence and be the single view of how charges do look on an invoice.
*/
class Charge extends Model
{
@@ -22,7 +23,9 @@ class Charge extends Model
];
protected $dates = [
'charged_at',
'start_at',
'stop_at',
'charged_at', // @todo Dont remember what this attribute is for
];
public const sweep = [
@@ -75,6 +78,6 @@ class Charge extends Model
public function getTypeNameAttribute(): string
{
return Arr::get(InvoiceItem::type,$this->attribute('type'));
return Arr::get(InvoiceItem::type,$this->type);
}
}