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 OR REPLACE PROCEDURE track_record ( | |
p_record_id IN NUMBER, | |
p_record_type IN VARCHAR2, | |
p_is_deleted IN BOOLEAN DEFAULT FALSE | |
) | |
IS | |
BEGIN | |
IF p_is_deleted THEN | |
UPDATE record_trackings | |
SET record_deleted_at = SYSTIMESTAMP |
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
#!/usr/bin/env ruby | |
# Ruby script to extract and translate subtitles from MKV files from English to Portuguese (but you can customize this) | |
# | |
# Dependencies: | |
# | |
# 1. `gem install srt` | |
# 2. `brew install translate-shell mkvtoolnix` | |
# | |
# Usage: |
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
source 'https://rubygems.org' | |
gem 'rspec' |
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
/home/web/uems/current |
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 | |
I.ID_PRODUTO, | |
P.NOME, | |
SUM(I.QUANTIDADE) AS QUANTIDADE, | |
AVG(I.VALOR_UNITARIO) AS VALOR_UNITARIO, | |
SUM(I.DESCONTO) AS DESCONTO, | |
SUM(I.VALOR) AS VALOR, | |
MIN(I.DT_LANCAMENTO) AS DT_LANCAMENTO | |
FROM ITENS I | |
JOIN PRODUTOS P |
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
<!-- List all subcategories --> | |
<div class="article-list subcat"> | |
<ul> | |
{% for subcategory in subcategories %} | |
<li class="result article"> | |
<a href="{{subcategory.url}}"> | |
<h2>{{ subcategory.name }}</h2> | |
</a> | |
</li> | |
{% endfor %} |
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 | |
MESA, | |
VALOR | |
FROM | |
VENDAS | |
WHERE | |
DT_CANCELAMENTO IS NOT NULL | |
AND | |
DATEADD(-3 HOUR TO DT_EMISSAO) BETWEEN :DT_INICIO | |
AND DATEADD(1 DAY TO :DT_FIM) |
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
// Substituir todo o conteúdo de ImprimeFechamento pelo seguinte: | |
procedure TFVendasCad.ImprimeFechamento; | |
begin | |
if FRFechamentoVenda = nil then | |
FRFechamentoVenda := TFRFechamentoVenda.Create(Application); | |
DMConfiguracoes.QConfiguracoes.Close; | |
DMConfiguracoes.QConfiguracoes.Open; | |
FRFechamentoVenda.QRRelatorio.Preview; | |
end; |
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
// OnClick do botão Relatórios -> Fechamento de Vendas. | |
procedure TFVendasCad.Fechamento1Click(Sender: TObject); | |
begin | |
inherited; | |
if FVendasParam = nil then | |
FVendasParam := TFVendasParam.Create(Application); | |
FVendasParam.AtivaPagina(0); | |
if FVendasParam.ShowModal = MrOk then | |
with DMRelatorio do | |
begin |
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
procedure TFComissoesPgto.BTOkClick(Sender: TObject); | |
begin | |
inherited; | |
QConsulta.First; | |
if not QConsulta.Eof then | |
begin | |
try | |
while not QConsulta.Eof do | |
begin | |
DMSistema.AtualizaBanco('COMISSOES', 'DT_PAGAMENTO', QuotedStr(FormatDateTime('YYYY.MM.DD', Date)), 'ID = ' + QConsultaID.Text); |
NewerOlder