if($event->getRequest()->getPathInfo()=='/fr/_uploader/receipt2/upload'){
// ...
}
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 | |
(SELECT COALESCE(SUM(r.points_value), 0) FROM gc_promo_receipt r | |
WHERE r.user_id = 1 | |
AND r.status = 'Approved') | |
- | |
(SELECT COALESCE(SUM(l.reward_type_points_cost), 0) FROM gc_promo_user_reward_claim_ledger l | |
INNER JOIN gc_promo_user_reward_claim c ON c.id = l.user_reward_claim_id | |
WHERE c.redeemed_by_user_id = 1) | |
AS points_balance; |
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
gc_promo_report: | |
reports: | |
entries: | |
name: 'Entries report' | |
description: 'This report shows all promotion entries.' | |
sql: "SELECT * FROM gc_promo_entry ORDER BY id ASC;" | |
bank-transfer-payment-report: | |
name: 'Bank transfer payment report' | |
description: 'This report shows all approved cash prize claims.' | |
sql: | |
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
{# requires twig tweak module to be installed #} | |
{% set media = content.field_logo_media %} | |
{% if media[0] is defined and media[0]['#item'] is defined %} | |
<img src="{{ media[0]['#item'].entity|file_uri|image_style('stockists_carousel_logo') }}" alt="{{ media[0]['#item'].alt }}"> | |
{% endif %} |
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 | |
//only one entry per household per brand | |
$totalEntries = $em | |
->createQuery("SELECT COUNT(e) FROM VcgEntryBundle:Entry e | |
INNER JOIN e.receipt r | |
WHERE LOWER(e.address1) = LOWER(:address1) | |
AND LOWER(e.town) = LOWER(:town) | |
AND r.status = 'approved' | |
AND e.product = :product") |
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
<div class="wrapper"> | |
<!-- Put your main page content here --> | |
</div> | |
<footer> | |
<!-- Put your footer content here --> | |
</footer> |
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
-- Function: public.sonata_media_path(bigint, text, text, text) | |
-- DROP FUNCTION public.sonata_media_path(bigint, text, text, text); | |
CREATE OR REPLACE FUNCTION public.sonata_media_path( | |
id bigint, | |
context text, | |
size text, | |
reference text) | |
RETURNS text AS |
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
#!/bin/bash | |
SUBSONIC_DATA=/var/subsonic/db | |
SUBSONIC_NEW_DATA=/media/bigbird/Backups/subsonic/ | |
service subsonic stop | |
sleep 45 | |
rsync -a $SUBSONIC_DATA $SUBSONIC_NEW_DATA | |
service subsonic start |
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 | |
$webdir = $this->get('kernel')->getRootDir() . '/../web' . $this->getRequest()->getBasePath(); | |
$fullimgpath = $webdir . $this->container->get('sonata.media.twig.extension')->path($report->getImage(), 'reference'); | |
?> |
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
.wobble { | |
-webkit-transform-origin: 55% 70%; | |
-moz-transform-origin: 50% 60%; | |
-ms-transform-origin: 50% 60%; | |
-o-transform-origin: 50% 60%; | |
transform-origin: 50% 60%; | |
} | |
@-webkit-keyframes wiggle { | |
0% {-webkit-transform:rotate(4deg);} |