コード例 #1
0
    $total = $row[0];
    if (obtener_precio_dolar_orden($id_orden) == "" || obtener_precio_dolar_orden($id_orden) == 0) {
        $total_dolar = 0;
    } else {
        $total_dolar = $total / obtener_precio_dolar_orden($id_orden);
    }
    $total_pesos = $total;
}
totales_dos_decimales($total_dolar, $total_pesos);
$cotiz_dolar = obtener_precio_dolar_orden($id_orden);
$cotiz_fecha = obtener_fecha_orden($id_orden);
$diaopc = opciones_dia();
$mesopc = opciones_mes();
$anoopc = opciones_ano();
$date = date("F j, Y, g:i a");
$var = array("header" => $header, "orden" => $orden, "id_orden" => $id_orden, "total_dolar" => $total_dolar, "total_pesos" => $total_pesos, "cotiz_dolar" => $cotiz_dolar, "cotiz_fecha" => $cotiz_fecha, "dia" => $diaopc, "mes" => $mesopc, "ano" => $anoopc, "focus" => $focus, "cant_filas" => $cant_filas, "date" => $date, "descripcion" => orden_descripcion($id_orden), "despacho" => orden_despacho($id_orden), "mensaje" => $mensaje);
//eval_html('orden_ver_arribo.html', $var);
eval_html('orden_ver_arribo_ajax.php', $var);
//FUNCIONES
function orden_descripcion($id_orden)
{
    $query = "SELECT descripcion FROM Orden WHERE Orden.id_orden = {$id_orden}";
    $result = mysql_query($query);
    $row = mysql_fetch_array($result);
    return $row[0];
}
function orden_despacho($id_orden)
{
    $query = "SELECT despacho FROM Orden WHERE Orden.id_orden = {$id_orden}";
    $result = mysql_query($query);
    $row = mysql_fetch_array($result);
コード例 #2
0
ファイル: orden_ver.php プロジェクト: eznibe/north-stock
        $header = "{$row['1']} {$row['0']} / {$id_orden}";
        $orden = $orden . "<tr class=\"provlistrow\">\n\t<td class=\"centrado\"><a class=\"list\" onclick=\"update_orden({$row['2']});\">{$row['3']}</a></td>\n\t<td class=\"centrado\">{$row['8']}</td>\n\t<td class=\"centrado\">{$row['4']} <input type='hidden' name='cantidad{$count}' id='cantidad{$count}' value='{$row['4']}'/> <input type='hidden' name='id_orden_item{$count}' id='id_orden_item{$count}' value='{$row['2']}'/></td>\n\t<td class=\"centrado\">{$row['10']}</td>\n\t<td class=\"centrado\">{$row['5']}</td>\n\t<td class=\"centrado\">{$row['6']}</td>\n\t<td class=\"centrado\">{$row['7']}</td>\n\t<td class=\"centrado\">AR\$</td>\n   </tr>\n";
        $count++;
    }
    //Calculo total en pesos
    $query = "SELECT\n        sum((OrdenItem.cantidad * OrdenItem.precio_ref))\n  FROM\n      OrdenItem\n  WHERE (\n        (OrdenItem.id_orden = {$id_orden})\n  )";
    $result = mysql_query($query);
    $row = mysql_fetch_array($result);
    $total = $row[0];
    $total_dolar = $total / obtener_precio_dolar_orden($id_orden);
    $total_pesos = $total;
}
totales_dos_decimales($total_dolar, $total_pesos);
$cotizacion_dolar = obtener_precio_dolar_orden($id_orden);
$cotizacion_fecha = obtener_fecha_orden($id_orden);
$var = array("header" => $header, "orden" => $orden, "cant_filas" => $count, "id_orden" => $id_orden, "total_dolar" => $total_dolar, "total_pesos" => $total_pesos, "cotiz_dolar" => $cotizacion_dolar, "cotiz_fecha" => $cotizacion_fecha, "descripcion" => orden_descripcion($id_orden), "despacho" => orden_despacho($id_orden), "focus" => $focus);
//eval_html('orden_ver.html', $var);
eval_html('orden_ver_ajax.php', $var);
function orden_descripcion($id_orden)
{
    $query = "SELECT descripcion FROM Orden WHERE Orden.id_orden = {$id_orden}";
    $result = mysql_query($query);
    $row = mysql_fetch_array($result);
    return $row[0];
}
function orden_despacho($id_orden)
{
    $query = "SELECT despacho FROM Orden WHERE Orden.id_orden = {$id_orden}";
    $result = mysql_query($query);
    $row = mysql_fetch_array($result);
    return $row[0];