Add lane property to orders_o, include lane handling in XLVask usage logs, and introduce xlvask_parser_kapellvask_alle_trailere parser.
This commit is contained in:
@@ -32,6 +32,7 @@ class orders_o extends db
|
||||
public object_property $invoice_collection_id;
|
||||
public object_property $booking_id;
|
||||
public object_property $wash_id; // The XL Vask Wash ID, if any
|
||||
public object_property $lane; // The lane used for the order, if any
|
||||
|
||||
public function structure(): void
|
||||
{
|
||||
@@ -75,6 +76,7 @@ class orders_o extends db
|
||||
$this->invoice_collection_id = new object_property($this->table, $this->id, 'invoice_collection_id', 'int', false);
|
||||
$this->booking_id = new object_property($this->table, $this->id, 'booking_id', 'int', false);
|
||||
$this->wash_id = new object_property($this->table, $this->id, 'wash_id', 'string', false);
|
||||
$this->lane = new object_property($this->table, $this->id, 'lane', 'string', false);
|
||||
}
|
||||
|
||||
public function getCustomerByOrderId(?string $order_id): users_o
|
||||
@@ -490,6 +492,7 @@ class orders_o extends db
|
||||
'invoice_collection_id' => (int)$this->invoice_collection_id->value(),
|
||||
'booking_id' => (int)$this->booking_id->value(),
|
||||
'wash_id' => $this->wash_id->value(),
|
||||
'lane' => $this->lane->value(),
|
||||
'closed_at' => (int)$this->invoice_collection_id->value() ? (new collected_order_invoices_o())->select((int)$this->invoice_collection_id->value())->closed_at->value() : null,
|
||||
];
|
||||
}
|
||||
@@ -733,6 +736,8 @@ class orders_o extends db
|
||||
(int)$xlvask_usage_log->getDepartment()->id,
|
||||
$xlvask_usage_log->RegistrationNumber,
|
||||
);
|
||||
// Set the lane used for the order (if applicable)
|
||||
$this->lane->set($xlvask_usage_log->getLane());
|
||||
// Add the products to the order
|
||||
$firstItemId = null;
|
||||
/** @var xlvask_wash_item $washItem */
|
||||
@@ -747,7 +752,7 @@ class orders_o extends db
|
||||
$this->id,
|
||||
$washItem->getProduct($xlvask_usage_log)->id,
|
||||
'',
|
||||
$washItem->OriginalProductName,
|
||||
'', //$washItem->OriginalProductName,
|
||||
2285,
|
||||
$washItem->getPriceExVat(),
|
||||
$washItem->Count,
|
||||
|
||||
Reference in New Issue
Block a user