snipt

Ctrl+h for KB shortcuts

Text only

Incidencia para descuento único por séptimo día sin séptimo día

1
2
3
4
INSERT INTO paysheet_group_element_concepts 
(element_id, `key`, label, sort, config, concept, status, created_at, deleted_at, payment_period_id, type, apply, display, qty_amount, unique_id, afterall_callback, parent_concept) 
VALUES 
(45, '004', 'Descuento séptimo día', null, '{}', 'ocurrencias_ogt', 1, '2019-05-27 22:11:25', null, '<PeriodoDeNómina>', 5, 1, 0, 0, '<Cambiame23Digitos>', '{"after_all":["\\\\AppBundle\\\\Model\\\\Precalculation\\\\Callbacks","forceDiscountSeventhDay"]}', null);
https://snipt.net/embed/e86b3146f52b1b4f831139199150f0f6/
/raw/e86b3146f52b1b4f831139199150f0f6/
e86b3146f52b1b4f831139199150f0f6
text
Text only
4
2019-06-25T16:33:40
True
False
False
May 27, 2019 at 06:24 PM
/api/public/snipt/148418/
incidencia-para-descuento-unico-por-septimo-dia-sin-septimo-dia
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>INSERT INTO paysheet_group_element_concepts </span><span id="L-2"><a name="L-2"></a>(element_id, `key`, label, sort, config, concept, status, created_at, deleted_at, payment_period_id, type, apply, display, qty_amount, unique_id, afterall_callback, parent_concept) </span><span id="L-3"><a name="L-3"></a>VALUES </span><span id="L-4"><a name="L-4"></a>(45, &#39;004&#39;, &#39;Descuento séptimo día&#39;, null, &#39;{}&#39;, &#39;ocurrencias_ogt&#39;, 1, &#39;2019-05-27 22:11:25&#39;, null, &#39;&lt;PeriodoDeNómina&gt;&#39;, 5, 1, 0, 0, &#39;&lt;Cambiame23Digitos&gt;&#39;, &#39;{&quot;after_all&quot;:[&quot;\\\\AppBundle\\\\Model\\\\Precalculation\\\\Callbacks&quot;,&quot;forceDiscountSeventhDay&quot;]}&#39;, null); </span></pre></div> </td></tr></table>

SQL

Pensión alimenticia

1
2
3
4
5
6
7
8
# IMPORTANTE: Verificar primero que no exista ya el registro

INSERT into paysheet_company_element_concepts (element_id,company_id, `key`, label, name, sort, config, status, created_at, unique_id, concept,type, deleted_at, dynamic_columns,afterall_callback, apply)
SELECT
    id, 'id-de-la-compañia', `key`, 'PENSIÓN ALIMENTICIA', 'PENSIÓN ALIMENTICIA', 1500, '{}', 1, NOW(),  RIGHT(MD5(CONCAT(unique_id, "-id-de-la-compañia")), 25), 'pension_alimenticia', type, NULL, COLUMN_CREATE('default', 1, 'discountForPeriods', 0, 'isFix', 1), NULL, 1
FROM paysheet_elements
WHERE unique_id = 'd_alimienticia'
;
https://snipt.net/embed/9e77180e42a141aacacc8caaedbf32b1/
/raw/9e77180e42a141aacacc8caaedbf32b1/
9e77180e42a141aacacc8caaedbf32b1
sql
SQL
8
2019-06-24T11:15:24
True
False
False
Feb 12, 2019 at 01:28 PM
/api/public/snipt/148256/
pension-alimenticia
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a> <a href="#L-8">8</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="o">#</span> <span class="n">IMPORTANTE</span><span class="p">:</span> <span class="n">Verificar</span> <span class="n">primero</span> <span class="n">que</span> <span class="k">no</span> <span class="n">exista</span> <span class="n">ya</span> <span class="n">el</span> <span class="n">registro</span> </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a><span class="k">INSERT</span> <span class="k">into</span> <span class="n">paysheet_company_element_concepts</span> <span class="p">(</span><span class="n">element_id</span><span class="p">,</span><span class="n">company_id</span><span class="p">,</span> <span class="o">`</span><span class="k">key</span><span class="o">`</span><span class="p">,</span> <span class="n">label</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">sort</span><span class="p">,</span> <span class="n">config</span><span class="p">,</span> <span class="n">status</span><span class="p">,</span> <span class="n">created_at</span><span class="p">,</span> <span class="n">unique_id</span><span class="p">,</span> <span class="n">concept</span><span class="p">,</span><span class="k">type</span><span class="p">,</span> <span class="n">deleted_at</span><span class="p">,</span> <span class="n">dynamic_columns</span><span class="p">,</span><span class="n">afterall_callback</span><span class="p">,</span> <span class="n">apply</span><span class="p">)</span> </span><span id="L-4"><a name="L-4"></a><span class="k">SELECT</span> </span><span id="L-5"><a name="L-5"></a> <span class="n">id</span><span class="p">,</span> <span class="s1">&#39;id-de-la-compañia&#39;</span><span class="p">,</span> <span class="o">`</span><span class="k">key</span><span class="o">`</span><span class="p">,</span> <span class="s1">&#39;PENSIÓN ALIMENTICIA&#39;</span><span class="p">,</span> <span class="s1">&#39;PENSIÓN ALIMENTICIA&#39;</span><span class="p">,</span> <span class="mi">1500</span><span class="p">,</span> <span class="s1">&#39;{}&#39;</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="n">NOW</span><span class="p">(),</span> <span class="k">RIGHT</span><span class="p">(</span><span class="n">MD5</span><span class="p">(</span><span class="n">CONCAT</span><span class="p">(</span><span class="n">unique_id</span><span class="p">,</span> <span class="ss">&quot;-id-de-la-compañia&quot;</span><span class="p">)),</span> <span class="mi">25</span><span class="p">),</span> <span class="s1">&#39;pension_alimenticia&#39;</span><span class="p">,</span> <span class="k">type</span><span class="p">,</span> <span class="k">NULL</span><span class="p">,</span> <span class="n">COLUMN_CREATE</span><span class="p">(</span><span class="s1">&#39;default&#39;</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="s1">&#39;discountForPeriods&#39;</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="s1">&#39;isFix&#39;</span><span class="p">,</span> <span class="mi">1</span><span class="p">),</span> <span class="k">NULL</span><span class="p">,</span> <span class="mi">1</span> </span><span id="L-6"><a name="L-6"></a><span class="k">FROM</span> <span class="n">paysheet_elements</span> </span><span id="L-7"><a name="L-7"></a><span class="k">WHERE</span> <span class="n">unique_id</span> <span class="o">=</span> <span class="s1">&#39;d_alimienticia&#39;</span> </span><span id="L-8"><a name="L-8"></a><span class="p">;</span> </span></pre></div> </td></tr></table>
"pension alimenticia", insert, paysheet_company_element_concepts