Beispiel #1
0
<?php

@ob_start();
@session_start();
require_once '../core_nufarm/libs.php';
if (!isset($_SESSION['MM_IdUsuario'])) {
    header('Location: /');
    exit;
}
$user = Auth::User();
$ve = new VendedorEstrella();
//$ve->hasOtherPeriod($user->idUsuario);
/*if(!$ve->hasFacturacion()):
		$ve->initFactUser($user->idUsuario, $user->vendedor);
	endif;*/
$facturacion = $ve->getFacturacionById();
$fact_data = json_decode($facturacion->data);
$lastPeriod = $ve->prevPeriod($user->idUsuario);
$fact_total_per = VendedorEstrella::calcFactTotal($facturacion->fact_total, $lastPeriod ? $lastPeriod->total : 0);
$fact_total_clave_per = VendedorEstrella::calcFactTotalClave($facturacion->fact_total, $facturacion->fact_prod_clave);
$cat_prize = $ve->getPrizeCategory($fact_total_per, $fact_total_clave_per);
?>




<!DOCTYPE html>
<html lang="es">
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
Beispiel #2
0
 private static function catPremios()
 {
     $ve = new VendedorEstrella();
     $collection = $ve->categoriasPremios();
     echo json_encode($collection);
 }
Beispiel #3
0
<?php

@ob_start();
@session_start();
require_once '../core_nufarm/libs.php';
if (!isset($_SESSION['MM_IdUsuario'])) {
    header('Location: /');
    exit;
}
$user = Auth::User();
$ve = new VendedorEstrella();
$facturacion = $ve->getFacturacionById();
$fact_data = json_decode($facturacion->data);
$lastPeriod = $ve->prevPeriod($user->idUsuario);
$fact_total_per = VendedorEstrella::calcFactTotal($facturacion->fact_total, $lastPeriod ? $lastPeriod->total : 0);
$fact_total_clave_per = VendedorEstrella::calcFactTotalClave($facturacion->fact_total, $facturacion->fact_prod_clave);
$cat_prize = $ve->getPrizeCategory($fact_total_per, $fact_total_clave_per);
?>




<!DOCTYPE html>
<html lang="es">
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<title>Nufarm Maxx</title>

		<!-- librerías opcionales que activan el soporte de HTML5 para IE8 -->
<?php

require_once "../core_nufarm/libs.php";
$ve = new VendedorEstrella();
/**
 * Created by PhpStorm.
 * User: dot175
 * Date: 14/10/2015
 * Time: 12:39 PM
 */
/*

$collection = json_decode(file_get_contents("collection.json"));
unset($collection[0]);

$sql = "SELECT usr.idempresa as empresa, usr.vendedor, usr.strEmpresa, CONCAT(per.nombre,per.apellido)  FROM usuarios as usr LEFT JOIN personal as per GROUP BY strEmpresa ";
$all = $ve->query($sql)->fetchAll();
$array = array (
    'Agosto' =>	array ( 'facturacion_total' => 0, 'facturacion_prod_clave' => 0 ),
    'Septiembre' =>	array ( 'facturacion_total' => 0, 'facturacion_prod_clave' => 0 ),
    'Octubre' =>	array ( 'facturacion_total' => 0, 'facturacion_prod_clave' => 0 ),
    'Noviembre' =>	array ( 'facturacion_total' => 0, 'facturacion_prod_clave' => 0 ),
    'Diciembre' =>	array ( 'facturacion_total' => 0, 'facturacion_prod_clave' => 0 ),
    'Enero' =>	array ( 'facturacion_total' => 0, 'facturacion_prod_clave' => 0 ),
    'Febrero' =>	array ( 'facturacion_total' => 0, 'facturacion_prod_clave' => 0 ),
    'Marzo' =>	array ( 'facturacion_total' => 0, 'facturacion_prod_clave' => 0 ),
    'Abril' =>	array ( 'facturacion_total' => 0, 'facturacion_prod_clave' => 0 ),
    'Mayo' =>	array ( 'facturacion_total' => 0, 'facturacion_prod_clave' => 0 ),
    'Junio' =>	array ( 'facturacion_total' => 0, 'facturacion_prod_clave' => 0 ),
    'Julio' =>	array ( 'facturacion_total' => 0, 'facturacion_prod_clave' => 0 ),
);
<?php

error_reporting(0);
require_once '../../core_nufarm/libs.php';
require_once '../inc/header.php';
Auth::sForceAuthAdmin(20);
Auth::checkAdmin();
$vendedor = new VendedorEstrella();
$vendedor->setInit();
?>

	<!--Admin -->
	<div class="admin col-xs-12 col-sm-12 col-md-12 ol-lg-12" ng-controller="CtrlFilter">

		<!-- contenedor A -->
		<div class="contenedor-A col-xs-12 col-sm-12 col-md-12 ol-lg-12" >
			<div class="sub-contenedor">
				<div class="filtros" ng-cloak>   
					<form ng-submit="submitFilter()"> 
						<input type="hidden" name="filter"> 
						<h3> FILTRAR POR:</h3>

						<select name="vendedor"  ng-model="vendedores"  ng-change="setClientes()" ng-show="isAdmin">
					 		<option value="">TODOS LOS VENDEDORES</option>
					 		<option value="{{v.id}}" ng-repeat="(k, v) in selVendedores">{{v.nombre}} {{v.apellido}}</option>
					 	</select>

						<select  name="clientes" ng-model="clientes" id=""> 
							<option class="text-uppercase" value="">TODOS LOS CLIENTES</option>
							<option class="text-uppercase" value="{{v.id}}" ng-repeat="(k, v) in selClientes">{{v.strEmpresa}}</option>   
						</select>
<?php

@session_start();
require_once '../core_nufarm/libs.php';
$user = Auth::User();
$ve = new VendedorEstrella();
if (!$ve->hasFacturacion()) {
    $ve->initFactUser($user->idUsuario, $user->vendedor);
}
$facturacion = $ve->getFacturacionById();
$fact_data = json_decode($facturacion->data);
$lastPeriod = $ve->prevPeriod($user->idUsuario);
$fact_total_per = VendedorEstrella::calcFactTotal($facturacion->fact_total, $lastPeriod ? $lastPeriod->total : 0);
$fact_total_clave_per = VendedorEstrella::calcFactTotalClave($facturacion->fact_total, $facturacion->fact_prod_clave);
$cat_prize = $ve->getPrizeCategory($fact_total_per, $fact_total_clave_per);
?>




<!DOCTYPE html>
<html lang="es">
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
		<title>Nufarm - Vendedor Estrella</title>

		<!-- librerías opcionales que activan el soporte de HTML5 para IE8 -->
		<!--[if lt IE 9]>
		<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>