Exemplo n.º 1
0
<?php

ini_set("display_errors", E_ALL);
error_reporting(E_ALL);
require_once '../bootstrap.php';
use Webetiq\DBase\DBase;
use Webetiq\Ops;
$config = json_encode(['host' => 'localhost', 'user' => 'root', 'pass' => 'monitor5', 'db' => 'blabel']);
$dbase = new DBase($config);
$ops = new Ops($dbase);
$op = $ops->get('7');
echo "<pre>";
print_r($op);
echo "</pre>";
Exemplo n.º 2
0
$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>';
}
$selPrintGroup .= '</select></div>';
if (isset($numop)) {
    $op = $oOPs->get($numop);
    if ($op->id == 0) {
        header("Location: op.php?numop={$numop}&fail=1");
    }
}
$lbl->volume = $oMovements->getLastVolume($numop) + 1;
$lbl->numdias = $op->shelflife;
$lbl->cliente = $op->customer;
$lbl->cod = $op->code;
$lbl->codcli = $op->customercode;
$lbl->desc = $op->description;
$lbl->emissao = $op->created_at;
$lbl->pedcli = $op->pourchaseorder;
$lbl->pedido = $op->salesorder;
$lbl->numop = $op->id;
$lbl->qtdade = $op->packagedamount;