Skip to content

Instantly share code, notes, and snippets.

report_post_dates_details_ajax:
pattern: /postdatedetails/{date}/{companyId}/{leadSource}
defaults: { _controller: "EcsCrmBundle:Report/PostDateReport:ajaxGetPostDateDetails", date: "
Twig_Error_Runtime: Variable "_theDate" does not exist in "EcsCrmBundle:Reports/PostDateReports:PostDatesOverview.html.twig" at line 44
{% block content %}
<script type="text/javascript">
$(document).ready(function(){
var lastOpenRow = null;
$(".linkDetails").live("click", function(e) {
var _this = $(this);
Ecs\CrmBundle\Entity\Customer:
type: entity
table: customer
repositoryClass: Ecs\CrmBundle\Entity\CustomerRepository
fields:
id:
type: integer
length: null
nullable: false
unique: true
<?php
namespace Ecs\CrmBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
class Customer
{
private $id;
$rsm = new ResultSetMapping();
$rsm->addScalarResult('postDate', 'postDate');
$rsm->addScalarResult('company_name', 'company_name');
$rsm->addScalarResult('postDatesScheduled', 'postDatesScheduled');
$rsm->addScalarResult('postDateReady', 'postDateReady');
$rsm->addScalarResult('postDatesCharged', 'postDatesCharged');
$rsm->addScalarResult('postDatesComplete', 'postDatesComplete');
$rsm->addScalarResult('fwPotential', 'fwPotential');
$rsm->addScalarResult('fwCharged', 'fwCharged');
$rsm->addScalarResult('fwCapt', 'fwCapt');
$dql = "SELECT p.postDate, co.company_name,
COUNT(*) AS `postDatesScheduled`,
COUNT(IF(c.postDateChargedStatus_id > 1, 1, NULL)) AS `postDateReady`,
SUM( IF(c.postDateChargedStatus_id = 6, 1, NULL)) AS `postDatesCharged`,
SUM( IF(c.`fwCompletionDate`, 1, NULL)) AS `postDatesComplete`,
SUM( authOnlyAmount ) AS `fwPotential`,
SUM( IF(p.`fwfAuthed`, p.`authOnlyAmount`, NULL)) AS `fwCharged`,
SUM( IF(c.`fwCompletionDate`, p.`authOnlyAmount`, NULL)) AS `fwCapt`
FROM customer c
JOIN Purchase p ON p.customer_Id = c.Id
<VirtualHost *:80>
ServerName railsapp.dev
ServerAlias www.railsapp.dev
DocumentRoot /var/www/railsapp/public/
RailsEnv development
<Directory var/www/railsapp/public>
Allow from all
Options -MultiViews
</Directory>
</VirtualHost>
$beg = date('Y-m-d 00:00:00', strtotime($beg)); //Fixed the bug
$fin = date('Y-m-d 23:59:59', strtotime($fin));
$dql = "SELECT DISTINCT(u.id) AS agent_id FROM EcsTimeclockBundle:TimeClock t
LEFT JOIN t.noteBy u WHERE t.daydate BETWEEN :beg AND :fin AND u.employeejob = :tpe";
$query = $this->em->createQuery($dql);
$query->setParameters(array('beg' => $beg, 'fin' => $fin, 'tpe' => $type));
role_hierarchy:
ROLE_SALES_REP:
- ROLE_USER
- ROLE_CAN_SEARCH
ROLE_COLLECTIONS_REP:
- ROLE_USER
- ROLE_CAN_SEARCH
ROLE_TEAM_LEAD:
- ROLE_USER
- ROLE_TIMECLOCK_MANAGER
var loc = location.pathname.replace(/\/([^.]+)\//g,'');
var current = $nav.find('a[href="'+loc+'"]');
if(current.parent().parent().is('#nav')){
current.addClass('active');
}else{
current.parent().parent().parent().find('a').eq(0).addClass('active').next().show();
current.addClass('active');
}