Пример #1
0
<?php

ini_set("display_errors", 1);
error_reporting(E_ALL);
require_once '../bootstrap.php';
use Webetiq\Units;
$unid = new Units();
$unid->push();
$todas = $unid->all();
var_dump($todas);
Пример #2
0
 * 
 * Mostra o total já registrado
 * SELECT SUM(amount*labels) AS qtd, SUM(netweight*labels) AS peso FROM  `movements` WHERE  `op_id`='67450'
 */
use Webetiq\DBase\DBase;
use Webetiq\Ops;
use Webetiq\Movements;
use Webetiq\Labels\Label;
use Webetiq\Printers;
use Webetiq\Units;
$config = json_encode(['host' => 'localhost', 'user' => 'root', 'pass' => 'monitor5', 'db' => 'blabel']);
$dbase = new DBase($config);
$oPrinters = new Printers($dbase);
$oOPs = new Ops($dbase);
$oMovements = new Movements($dbase);
$oUnits = new Units($dbase);
$lbl = new Label();
$remoteip = $_SERVER['REMOTE_ADDR'];
$numop = filter_input(INPUT_POST, 'numop', FILTER_SANITIZE_STRING);
$copias = 1;
$emissao = date('d/m/Y');
//carrega impressoras
$aPrint = $oPrinters->all();
$selPrintGroup = '<div class="form-group"><label for=\\"printer\\">Selecione a impressora</label><select class="form-control" name="printer">';
foreach ($aPrint as $printer) {
    $selp = '';
    if ($printer->name == 'newZebra') {
        $selp = 'selected';
    }
    $selPrintGroup .= '<option value="' . $printer->name . '" ' . $selp . '>' . $printer->name . '</option>';
}
Пример #3
0
<?php

ini_set("display_errors", E_ALL);
error_reporting(E_ALL);
require_once '../bootstrap.php';
use Webetiq\DBase\DBase;
use Webetiq\Units;
$config = json_encode(['host' => 'localhost', 'user' => 'root', 'pass' => 'monitor5', 'db' => 'blabel']);
$dbase = new DBase($config);
$un = new Units($dbase);
echo "<pre>";
print_r($un->all());
echo "</pre>";