// Start the clock for the page parse time log define('PAGE_PARSE_START_TIME', microtime()); // Set the level of error reporting error_reporting(E_ALL & ~E_NOTICE); //error_reporting(~E_ALL); // Codigo de barras require("codigoBarras/php-barcode.php"); function getvar($name){ global $_GET, $_POST; if (isset($_GET[$name])) return $_GET[$name]; else if (isset($_POST[$name])) return $_POST[$name]; else return false; } if (get_magic_quotes_gpc()){ $code=stripslashes(getvar('code')); } else { $code=getvar('code'); } //if (!$code) $code='123456789012'; // Fin código de barras // set php_self in the local scope $PHP_SELF = (isset($HTTP_SERVER_VARS['PHP_SELF']) ? $HTTP_SERVER_VARS['PHP_SELF'] : $HTTP_SERVER_VARS['SCRIPT_NAME']); // customization for the design layout define('BOX_WIDTH', 125); // how wide the boxes should be in pixels (default: 125) include('includes/configure.php'); if (strlen($_POST['fecha'])>0) { $fechaEntrega=$_POST['fecha']; } else { $fechaEntrega=date('Y-m-d',strtotime('-1 day')); } //echo date('d-m-Y',strtotime($fechaEntrega." +60 days")); //nombre del producto seleccionado $texto_query = "select name products_name " . "from ps_product_lang ". "where id_product = '".$_POST['codProducto']."' and name not like '%*%'"; $status_query = tep_db_query($texto_query); $status_values = tep_db_fetch_array($status_query); $nombrePr = $status_values['products_name']; $grabaReg = true; $_POST['cantidadUrg']=1; if ($_POST['cantidadGrUrg']<>0) { /* Busco el código de producto para Grande*/ $texto_query = "select id_product products_id " . "from ps_product_lang ". "where name like '".$nombrePr."%' ". "and name like '%GRANDE%' "; $status_query = tep_db_query($texto_query); if (tep_db_num_rows($status_query)>0) { $status_values = tep_db_fetch_array($status_query); $prGR = $status_values['products_id']; } else { $grabaReg = false; } } $status_array = array(); //La categoría 70 es la de Gourmet. Es para que no se repitan los platos /*$status_query = tep_db_query("select p.products_id,products_name from products_description pd join products p on (p.products_id=pd.products_id) join products_to_categories ptc on (ptc.products_id=p.products_id and ptc.categories_id<>'70') where (products_status=1 or products_name like '%Dukan(P%') order by products_name"); */ $status_query = tep_db_query("select pl.id_product products_id,name products_name from ps_product_lang pl join ps_product p on pl.id_product=p.id_product where name not like '%*%' and name not like '%DUKAN%' and name not like '%PACK%' order by name"); $status_array[] = array('id' => '0', 'text' => 'Selecciona un Producto'); while ($status_values = tep_db_fetch_array($status_query)) { $status_array[] = array('id' => $status_values['products_id'], 'text' => $status_values['products_name']); } $quien_array = array(); $quien_query = tep_db_query("select idEmpleado,nombre from ps_osc_empleados where habilitado='1' order by 2"); $quien_array[] = array('id' => '0', 'text' => 'Selecciona Empleado'); while ($quien_values = tep_db_fetch_array($quien_query)) { $quien_array[] = array('id' => $quien_values['idEmpleado'], 'text' => $quien_values['nombre']); } ?>
Etiquetas de Platos
echo strtoupper($status_values1['products_name'].'aaa'); ?> echo strtoupper($status_values2['products_name'].'bbb'); ?> |
|
|
| $traza= zerofill($status_values1['products_id'].strrev(date('dmy',strtotime($fechaEntrega))).'9',13); barcode_print($traza,getvar('encoding'),'2','html'); echo ''.substr($traza,1,12).''; ?> |
| $traza= zerofill($status_values['products_id'].strrev(date('dmy',strtotime($fechaEntrega))).'9',13);/*postres*/ barcode_print($traza,getvar('encoding'),'2','html'); echo ''.substr($traza,1,12).''; ?> |
|
echo strtoupper($status_values['products_name'].'ccc'); ?> Ingredientes: echo $status_values['ingredientes']; if (strlen($status_values['alergenos'])>1) { echo ' Alérgenos: '.stripslashes($status_values['alergenos']).''; } ?> | Modo de Preparación: echo strip_tags($status_values['modoPreparacion']); ?> | Peso N: echo $status_values['products_weight']*1000; ?> g. | Lote: echo strrev(date('dmy',strtotime($fechaEntrega))); ?> [V.Nutric. por 100 g. Energ: echo $status_values['energia']; ?> kcal. Pr: echo $status_values['proteinas']; ?> g. HC: echo $status_values['hidratosCarbono']; ?> g. Gr: echo $status_values['grasasTotales']; ?> g. GrSat: echo $status_values['grasasSaturadas']; ?> g. Az: echo $status_values['azucares']; ?> g. Sd: echo $status_values['sodio']; ?> g.] NRS:26.020247/SE |
echo $status_values['products_id'].'-'.$status_values['products_name'].' '.$texto.strrev(date("dmY")); ?> |