Fix for suspended sales (#4283)

This commit is contained in:
jekkos
2025-08-06 23:48:16 +02:00
parent 880fb8faef
commit bdf2c5f952
2 changed files with 3 additions and 3 deletions

View File

@@ -75,7 +75,7 @@ class Dinner_table extends Model
* @param int $dinner_table_id
* @return string
*/
public function get_name(int $dinner_table_id): string
public function get_name(?string $dinner_table_id): string
{
if (empty($dinner_table_id)) {
return '';

View File

@@ -6,7 +6,7 @@
use App\Models\Employee;
use App\Models\Customer;
$this->dinner_table = model(Dinner_table::class);
?>
<style>
@@ -37,7 +37,7 @@ use App\Models\Customer;
<td><?= $suspended_sale['doc_id'] ?></td>
<td><?= date($config['dateformat'], strtotime($suspended_sale['sale_time'])) ?></td>
<?php if ($config['dinner_table_enable']) { ?>
<td><?= esc($this->Dinner_table->get_name($suspended_sale['dinner_table_id'])) ?></td>
<td><?= esc($this->dinner_table->get_name($suspended_sale['dinner_table_id'])) ?></td>
<?php } ?>
<td>
<?php