Updates to Product Model, product updates, enable pricing update, improved formating of product services

This commit is contained in:
2023-05-04 22:17:42 +10:00
parent 95bb55aad8
commit 0f91ce4940
21 changed files with 491 additions and 138 deletions

View File

@@ -5,6 +5,7 @@ namespace App\Models\Product;
use Illuminate\Support\Collection;
use App\Interfaces\ProductItem;
use App\Models\Invoice;
use App\Models\Service\Phone as ServicePhone;
use App\Models\Supplier\Phone as SupplierPhone;
@@ -42,6 +43,8 @@ final class Phone extends Type implements ProductItem
// The model that is referenced when this product is ordered
protected string $order_model = ServicePhone::class;
// When comparing billing/pricing/charging, what metric to normalise to
const DefaultBill = Invoice::BILL_MONTHLY;
// The model that the supplier supplies
const SupplierModel = SupplierPhone::class;