NEW DOL_VALUE_PLACE tag in TakePOS template
Very important in restaurant orders
This commit is contained in:
parent
19bae333c9
commit
5a5811a716
@ -224,6 +224,7 @@ class dolReceiptPrinter extends Printer
|
|||||||
'dol_value_vendor_lastname' => 'VendorLastname',
|
'dol_value_vendor_lastname' => 'VendorLastname',
|
||||||
'dol_value_vendor_firstname' => 'VendorFirstname',
|
'dol_value_vendor_firstname' => 'VendorFirstname',
|
||||||
'dol_value_vendor_mail' => 'VendorEmail',
|
'dol_value_vendor_mail' => 'VendorEmail',
|
||||||
|
'dol_value_place' => 'DOL_VALUE_PLACE',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -564,7 +565,7 @@ class dolReceiptPrinter extends Printer
|
|||||||
*/
|
*/
|
||||||
public function sendToPrinter($object, $templateid, $printerid)
|
public function sendToPrinter($object, $templateid, $printerid)
|
||||||
{
|
{
|
||||||
global $conf, $mysoc, $langs, $user;
|
global $conf, $mysoc, $langs, $user, $db;
|
||||||
$error = 0;
|
$error = 0;
|
||||||
$ret = $this->loadTemplate($templateid);
|
$ret = $this->loadTemplate($templateid);
|
||||||
|
|
||||||
@ -827,6 +828,14 @@ class dolReceiptPrinter extends Printer
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
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);
|
||||||
|
+ if ($obj) {
|
||||||
|
+ $this->printer->text($obj->label);
|
||||||
|
+ }
|
||||||
|
+ break;
|
||||||
default:
|
default:
|
||||||
$this->printer->text($vals[$tplline]['tag']);
|
$this->printer->text($vals[$tplline]['tag']);
|
||||||
$this->printer->text($vals[$tplline]['value']);
|
$this->printer->text($vals[$tplline]['value']);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user