This file contains 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
libreoffice --headless --convert-to csv claim_rioclaro.xlsx --outdir . |
This file contains 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
CREATE PROCEDURE `ajuste_numero_nf_pedido` () | |
BEGIN | |
DECLARE fim INT DEFAULT false; | |
DECLARE var_id_documento int; | |
DECLARE var_id_registro int; | |
DECLARE var_numero_nfe int; | |
DECLARE var_id_lancamento_contabil int; | |
DECLARE var_id_conta_debito int; | |
DECLARE var_id_conta_credito int; |
This file contains 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
drop table DocumentNFS; | |
CREATE TABLE IF NOT EXISTS `DocumentNFS` ( | |
`id_documento` BIGINT(18) NOT NULL, | |
`id_parceiro_prestador` BIGINT(18) NULL, | |
`id_parceiro_tomador` BIGINT(18) NULL, | |
`id_servico` BIGINT(18) NULL, | |
`id_nbsfiscal_municipio` BIGINT(18) NULL, | |
`id_nbsfiscal` BIGINT(18) NULL, | |
`fe_tipo_emissao` BIGINT(18) NULL, |
This file contains 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 | |
t.id_transacao_contabil, | |
t.somatorio_lancamentos, | |
sum(ti.valor) as somaValores | |
from | |
AccountingTransaction t | |
inner join AccountingTransactionItem ti on ti.id_transacao_contabil = t.id_transacao_contabil and ti.stat <> 0 and ti.natureza = 'D' | |
where | |
t.stat <> 0 | |
group by t.id_transacao_contabil order by t.id_transacao_contabil; |
This file contains 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
//desabilita | |
$("#form :input").prop("disabled", true); | |
//habilita | |
$("#form :input").prop("disabled", false); |
This file contains 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
update Document set stat = 0 where id_documento in ( | |
select id_documento from (select d.id_documento from DocumentOrigin o | |
inner join Document d on d.id_documento = o.id_documento | |
where o.id_registro in ( | |
128417, | |
128426, | |
128427, | |
128458, | |
128473, | |
128494, |
This file contains 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
update Document set stat = 0 where id_documento in ( | |
select id_documento from ( | |
select | |
d.id_documento | |
from | |
DocumentOrigin o | |
inner join Document d on d.id_documento = o.id_documento | |
where | |
o.id_registro in( | |
SELECT |
This file contains 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 | |
DCB, | |
Count(*) | |
FROM | |
Document d | |
INNER JOIN DocumentOrigin o ON o.id_documento = d.id_documento | |
GROUP BY DCB | |
HAVING Count(*) > 1; |
This file contains 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 | |
$query = "SELECT | |
dc.id_dado_coletado, | |
dc.id_projeto_elemento, | |
dc.valor_identificador, | |
d.caminho_file, | |
proj.nome as projeto, | |
pre.des_status as processo | |
FROM erp_dado_coletado dc | |
INNER JOIN erp_dado_coletado_item dci ON dci.id_dado_coletado = dc.id_dado_coletado AND dci.tabela_registro = 'Document' |
This file contains 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
CREATE DEFINER=`root`@`localhost` PROCEDURE `new_procedure`() | |
BEGIN | |
declare var_id_usuario int; | |
set var_id_usuario = 108; | |
BLOCK1: begin | |
DECLARE fim INT DEFAULT false; | |
declare var_id_documento int; | |
declare cursor1 cursor for | |
select | |
id_documento_tipo |
NewerOlder