Beispiel #1
0
 /**
  * A impressora pode ser uma
  * instalada na rede acessada via CUPS
  * ou uma impressora LOCAL acessada via QZ
  * Na base de dados esta indicado a linguagem usada pela
  * impressora e a forma de acesso
  * @param string $printer
  */
 public static function setPrinter($printer)
 {
     //buscar os dados referente a impressora na base de dados
     //estabelecer qual interface usar (CUPS, REDE, QZ, FILE, etc.)
     //estabelecer qual template usar:
     // Zebra ZPL2,
     // Zebra/Eltron ELP2,
     // Argox PPLA/PPLB,
     // Intermec IPL,
     // DataMax DPL, etc.)
     //carrega classe de acesso a base de dados
     $dbase = new DBase();
     //carrega impressoras
     self::$printer = $dbase->getPrinter($printer);
 }
Beispiel #2
0
<?php

ini_set("display_errors", 1);
error_reporting(E_ALL);
require_once '../bootstrap.php';
/*
$string = "String com numeros -12,3.456789 e símbolos !@#$%¨&*()_+";
echo $string.'<BR>';
$nova_string = preg_replace("/[^0-9,.\s]/", "", $string);
echo $nova_string;
*/
use Webetiq\Migrate;
use Webetiq\DBase;
ini_set('memory_limit', '2048M');
$migr = new Migrate();
$aProds = [1, 2];
//$aProds = $migr->setProdsList();
//$aOPs  = $migr->setOPsList();
$dbase = new DBase();
$dbase->connect('localhost', '', 'root', 'monitor5');
$resp = $dbase->dbExists('webetiq');
if (!$resp) {
    $dbase->createDbase('webetiq');
    $dbase->disconnect();
}
$dbase->connect('localhost', 'webetiq', 'root', 'monitor5');
$migr->setFromProds($aProds);
Beispiel #3
0
 public function setOp(Label $lbl)
 {
     $this->dbase->connect('', $dbname);
     $sqlComm = "SELECT * FROM `mn_estoque` WHERE mn_op='{$lbl->numop}' AND mn_volume='{$lbl->volume}';";
     $dados = $this->dbase->querySql($sqlComm);
     if (!empty($dados)) {
         //já tem registro de estoque com esse numero de volume
         //então fazer uma alteração dos dados
         $sqlComm = "UPDATE mn_estoque SET ";
         $sqlComm .= "mn_cod = '',";
         $sqlComm .= "mn_desc = '',";
         $sqlComm .= "mn_valor = '',";
         $sqlComm .= "mn_ean = '',";
         $sqlComm .= "mn_cliente = '',";
         $sqlComm .= "mn_op = '',";
         $sqlComm .= "mn_volume = '',";
         $sqlComm .= "mn_qtdade = '',";
         $sqlComm .= "aux_unidade = '',";
         $sqlComm .= "mn_peso = '',";
         $sqlComm .= "mn_tara = '',";
         $sqlComm .= "mn_cod_cli = '',";
         $sqlComm .= "mn_pedido = '',";
         $sqlComm .= "mn_pedcli = '',";
         $sqlComm .= "mn_fabricacao = '',";
         $sqlComm .= "mn_validade = '',";
         $sqlComm .= "mn_rnc = '',";
         $sqlComm .= "mn_bloqueio = '',";
         $sqlComm .= "mn_comentario = '',";
         $sqlComm .= "mn_armazem = '',";
         $sqlComm .= "mn_posicao = '',";
         $sqlComm .= "mn_entrada = '',";
         $sqlComm .= "mn_saida = '',";
         $sqlComm .= "mn_nf = '' ";
         $sqlComm .= "WHERE mn_op = '' AND mn_volume = ''";
         //SELECT COUNT(*) c, mn_op, mn_volume FROM `mn_estoque` GROUP BY mn_op HAVING c > 1
     } else {
         //mn_id
         $sqlComm = "INSERT INTO mn_estoque (";
         $sqlComm .= "mn_cod,";
         $sqlComm .= "mn_desc,";
         $sqlComm .= "mn_valor,";
         $sqlComm .= "mn_ean,";
         $sqlComm .= "mn_cliente,";
         $sqlComm .= "mn_op,";
         $sqlComm .= "mn_volume,";
         $sqlComm .= "mn_qtdade,";
         $sqlComm .= "aux_unidade,";
         $sqlComm .= "mn_peso,";
         $sqlComm .= "mn_tara,";
         $sqlComm .= "mn_cod_cli,";
         $sqlComm .= "mn_pedido,";
         $sqlComm .= "mn_pedcli,";
         $sqlComm .= "mn_fabricacao,";
         $sqlComm .= "mn_validade,";
         $sqlComm .= "mn_rnc,";
         $sqlComm .= "mn_bloqueio,";
         $sqlComm .= "mn_comentario,";
         $sqlComm .= "mn_armazem,";
         $sqlComm .= "mn_posicao,";
         $sqlComm .= "mn_entrada,";
         $sqlComm .= "mn_saida,";
         $sqlComm .= "mn_nf";
         $sqlComm .= ") VALUES (";
         $sqlComm .= "{$lbl->cod},";
         //  mn_cod
         $sqlComm .= "{$lbl->cod},";
         //mn_desc
         $sqlComm .= "{$lbl->cod},";
         //mn_valor
         $sqlComm .= "{$lbl->cod},";
         //mn_ean
         $sqlComm .= "{$lbl->cod},";
         //mn_cliente
         $sqlComm .= "{$lbl->cod},";
         //mn_op
         $sqlComm .= "{$lbl->cod},";
         //mn_volume
         $sqlComm .= "{$lbl->cod},";
         //mn_qtdade
         $sqlComm .= "{$lbl->cod},";
         //aux_unidade
         $sqlComm .= "{$lbl->cod},";
         //mn_peso
         $sqlComm .= "{$lbl->cod},";
         //mn_tara
         $sqlComm .= "{$lbl->cod},";
         //mn_cod_cli
         $sqlComm .= "{$lbl->cod},";
         //mn_pedido
         $sqlComm .= "{$lbl->cod},";
         //mn_pedcli
         $sqlComm .= "{$lbl->cod},";
         //mn_fabricacao
         $sqlComm .= "{$lbl->cod},";
         //mn_validade
         $sqlComm .= "{$lbl->cod},";
         //mn_rnc
         $sqlComm .= "{$lbl->cod},";
         //mn_bloqueio
         $sqlComm .= "{$lbl->cod},";
         //mn_comentario
         $sqlComm .= "{$lbl->cod},";
         //mn_armazem
         $sqlComm .= "{$lbl->cod},";
         //mn_posicao
         $sqlComm .= "{$lbl->cod},";
         //mn_entrada
         $sqlComm .= "{$lbl->cod},";
         //mn_saida
         $sqlComm .= "{$lbl->cod});";
         //mn_nf
     }
 }