Exemplo n.º 1
0
function getValorImpuestoDefectoCentral()
{
    $central = new local();
    $key = "tIMPUESTOCENTRAL";
    if (isset($_SESSION[$key])) {
        return $_SESSION[$key];
    }
    if (!$central->LoadCentral()) {
        return false;
    }
    $IdPais = CleanID($central->get("IdPais"));
    $sql = "SELECT ImpuestoDefecto FROM ges_paises WHERE IdPais='{$IdPais}'";
    $row = queryrow($sql, "Cargando VALOR impuesto de la central");
    if ($row) {
        $val = $row["ImpuestoDefecto"];
        $_SESSION[$key] = $val;
        return $val;
    }
    return "18";
    //Si algo falla, se ajusta a 18
}
Exemplo n.º 2
0
         $response['error'] = 'Dir listing failed';
     }
     echo json_encode($response);
     break;
 case 'save':
     if ($server->put($_POST['file'], $_POST['content'])) {
         $response['success'] = true;
         $response['last_modified'] = $server->last_modified($_POST['file']);
     } else {
         $response['success'] = false;
         $response['error'] = 'Failed saving ' . $_POST['file'];
     }
     echo json_encode($response);
     break;
 case 'open':
     $response['content'] = $server->get($_POST['file']);
     $response['success'] = true;
     echo json_encode($response);
     break;
 case 'get':
     if ($_POST['path'] and substr($_POST['path'], -1) !== '/') {
         $_POST['path'] .= '/';
     }
     $files = array();
     if ($_POST['path'] == '/') {
         $_POST['path'] = '';
     }
     if ($_POST['path'] == '' and $_GET['path']) {
         //used by save as
         $files = get_nodes($_POST['path'], array(dirname($_GET['path']) . '/'));
     } else {
Exemplo n.º 3
0
	}

	function qminimal($a){
		if (is_intval($a)){
			return (string)$a;			
		}	
		return qq($a);
	}
	**/
/* - ------------------------------ */
$NombreClienteContado = _("Cliente Contado");
//$IdLocalActivo      = getSesionDato("IdTienda");
$IdLocalActivo = getSesionDato("IdTiendaDependiente");
$localActivo = new local();
if ($localActivo->Load($IdLocalActivo)) {
    $NombreLocalActivo = CleanTo($localActivo->get("NombreComercial"), " ");
    $MOTDActivo = CleanTo($localActivo->get("MensajeMes"), " ");
    $PROMActivo = CleanTo($localActivo->get("MensajePromocion"), " ");
}
//--------------------------------------------------
// Indice de Ticket
// $numSerieTicketLocalActual
$miserie = "B" . $IdLocalActivo;
//Nos aseguramos de coger el valor correcto preguntando tambien por
// ..la serie. Esto ayudara cuando un mismo local tenga mas de una serie, como va a ser el
// ..caso luego.
$sql = "select Max(NComprobante) as NComprobanteMax " . "from   ges_comprobantes " . "where  (IdLocal = '{$IdLocalActivo}') " . "and    (SerieComprobante='{$miserie}')";
$row = queryrow($sql);
if ($row) {
    $numSerieTicketLocalActual = intval($row["NComprobanteMax"]) + 1;
}
Exemplo n.º 4
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $locales = local::get();
     //return 'Hello, API';
     return Response::json(array('error' => false, 'locales' => $locales->toArray()), 200);
 }