From e0cc6a4981a3eb3d5579cc874a4ba3a8cf4df6a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 11 May 2021 18:34:43 +0200 Subject: [PATCH] fix $db in class --- htdocs/core/class/dolreceiptprinter.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/dolreceiptprinter.class.php b/htdocs/core/class/dolreceiptprinter.class.php index 205ee1eafe8..c109bc65733 100644 --- a/htdocs/core/class/dolreceiptprinter.class.php +++ b/htdocs/core/class/dolreceiptprinter.class.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2015-2021 Frédéric France * Copyright (C) 2020 Andreu Bisquerra * * This program is free software; you can redistribute it and/or modify @@ -565,7 +565,7 @@ class dolReceiptPrinter extends Printer */ public function sendToPrinter($object, $templateid, $printerid) { - global $conf, $mysoc, $langs, $user, $db; + global $conf, $mysoc, $langs, $user; $error = 0; $ret = $this->loadTemplate($templateid); @@ -830,8 +830,8 @@ class dolReceiptPrinter extends Printer break; case 'DOL_VALUE_PLACE': $sql = "SELECT floor, label FROM ".MAIN_DB_PREFIX."takepos_floor_tables where rowid=".((int) str_replace(")", "", str_replace("(PROV-POS".$_SESSION["takeposterminal"]."-", "", $object->ref))); - $resql = $db->query($sql); - $obj = $db->fetch_object($resql); + $resql = $this->db->query($sql); + $obj = $this->db->fetch_object($resql); if ($obj) { $this->printer->text($obj->label); }