This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include_once 'Class.php'; | |
include_once 'querys.php'; | |
try{ | |
$db = new PDO('sqlite:/home/rodrigo/delivery2/files/database.db'); | |
if(!$db){ | |
echo $db->lastErrorMsg() ; | |
}else{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
var $div_novospedidos = $('#div_novospedidos'); | |
$div_novospedidos.empty(); //Limpando a tabela | |
// setTimeout(function(){ location.reload(); }, 5000); | |
$.get("database3.php", function(data, status){ | |
//if (data == null) {console.log("sem pedidos hoje")} else {console.log("teste")}; | |
var dados_pedido = data; | |
console.log(dados_pedido); | |
const obj = dados_pedido; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select DET.ID, | |
DET.DOCHEADER_ID, | |
DET.line_number, | |
DET.description, | |
DET.qnt, | |
DET.qnt_base, | |
DET.qnt_delivered, | |
DET.pending_qnt, | |
DET.price, | |
DET.discount1, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try{ | |
$dbdest = new PDO('sqlite:/home/rodrigo/delivery2/files/delivery.db'); | |
foreach ($listaPedidos as $key) { | |
//var_dump($key); | |
$sqlinsert = $dbdest->prepare($sqlInsertRequests); | |
$client_id = $key->client_id; | |
$funcionario = $key->employee_name; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include_once 'Pedido.php'; | |
include_once 'querys.php'; | |
try{ | |
$db = new PDO('sqlite:/home/rodrigo/delivery2/files/database.db'); | |
$dbdest = new PDO('sqlite:/home/rodrigo/delivery2/files/delivery.db'); | |
if(!$db){ | |
echo $db->lastErrorMsg() ; | |
}else{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
DOCHEADER.ID, | |
DOCHEADER.DOC_PREFIX, | |
DOCHEADER.DOC_NUMBER, | |
DOCHEADER.ACCUMULATOR as acumulador, | |
DOCHEADER.CLOCK_DATE data_FP, | |
DOCHEADER.ENTITY_ID as client_id, | |
ENTITY.DESCRIPTION as cliente, | |
EMPLOYEE.INTERNAL_NAME as funcionario, | |
LOCAL.DESCRIPTION as local, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$today=date('d-m-Y'); | |
foreach ($linhas as $entrada) { | |
$reqdate = date("d/m/y",substr($entrada->data_FP,0,-9)); | |
if ($today == $reqdate){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include_once 'Pedido.php'; | |
try{ | |
$db = new PDO('sqlite:/home/rodrigo/delivery2/files/database.db'); | |
if(!$db) { | |
echo $db->lastErrorMsg() ; | |
} else { | |
$sqlPedidos = " | |
select | |
DOCHEADER.ID, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
var $tabela_novospedidos = $('#tabela_novospedidos'); | |
$tabela_novospedidos.empty(); //Limpando a tabela | |
$.get("database2.php", function(data, status){ | |
var dados_pedido = data; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
var $tabela_novospedidos = $('#tabela_novospedidos'); | |
$tabela_novospedidos.empty(); //Limpando a tabela | |
$.ajax({ | |
type:'post', //Definimos o método HTTP usado | |
dataType: 'json', //Definimos o tipo de retorno | |
url: 'database.php',//Definindo o arquivo onde serão buscados os dados | |
success: function(dados){ | |
var dados_pedido = dados; | |
NewerOlder