예제 #1
0
$p->addWidget(html::write("<h1>A&ntilde;adir evento a pedido <b>" . $sf->referencia . "</b> de <b>" . $sf->cliente . "</b> </h1>"));
$b = new Box("Datos del Evento");
$t = new toolbar();
$t->addWidget(new button("Guardar Datos del Evento", "javascript:document.forms[0].submit()", "disk"));
$b->addWidget($t);
$f = new form("", "");
$opts[] = array("caption" => "Sin procesar", "value" => 0);
$opts[] = array("caption" => "Orden", "value" => 1);
$opts[] = array("caption" => "Taller", "value" => 2);
$opts[] = array("caption" => "Excepci&oacute;n Taller", "value" => 3);
$opts[] = array("caption" => "Fabricaci&oacute;n", "value" => 4);
$opts[] = array("caption" => "Excepci&oacute;n en Fabricaci&oacute;n", "value" => 5);
$opts[] = array("caption" => "Almac&eacute;n", "value" => 6);
$opts[] = array("caption" => "Excepci&oacute;n en Almac&eacute;n", "value" => 7);
$opts[] = array("caption" => "Entrega", "value" => 8);
$opts[] = array("caption" => "Excepci&oacute;n en Entrega", "value" => 9);
$sel = new form_select("estado_nuevo", "Nuevo estado");
$sel->addOptions($opts);
$ew = new estadolistwidget();
$ew->drop($sf);
$f->addWidget(new form_widget("Estado Actual", "", $ew));
$f->addWidget($sel);
$d = new date();
$d->timestamp = $sf->fecha_entrega_prevista;
$ds = new dateselector("fecha_entrega_prevista", $d->timestamp);
$ds->drop($d);
$f->addWidget(new form_widget("Nueva fecha de entrega prevista", "", $ds));
$f->addWidget(new form_textarea("descripcion", "Descripci&oacute;n del Evento", ""));
$b->addWidget($f);
$p->addWidget($b);
$p->draw();
예제 #2
0
$f->addWidget(new form_html("Tracking", "<span style=\"font-size:14px;font-weight:bold;\">" . $sf->tracking));
$f->addWidget(new form_input("cliente", "Cliente", $sf->cliente));
$f->addWidget(new form_separator("Fechas"));
$d = new date();
$d->timestamp = $sf->fecha_pedido;
$d->parse();
$f->addWidget(new form_html("Fecha de Pedido ", $d->string));
$d = new date();
$d->timestamp = $sf->fecha_entrega_prevista;
$d->parse();
$f->addWidget(new form_html("Fecha Entrega Prevista", $d->string));
$d = new date();
$d->timestamp = $sf->fecha_entrega;
$d->parse();
$f->addWidget(new form_html("Fecha Entrega", $d->string));
$elw = new estadolistwidget();
$elw->drop($sf);
$f->addWidget(new form_widget("Estado", "", $elw));
$f->addWidget(new form_separator("Datos adicionales"));
$f->addWidget(new form_textarea("otro_material", "Otros materiales", $sf->otro_material));
$f->addWidget(new form_textarea("observaciones", "Observaciones", $sf->observaciones));
$b2 = new Box("Datos Generales del Pedido");
$b2->addWidget($f);
$b3 = new Box("Eventos del Pedido");
$ev = new eventviewer();
$ev->drop($sf);
$b3->addWidget($ev);
$b->addWidget(html::write("<table style=\"width:100%;\"><tr><td valign=\"top\" style=\"width:40%;\">" . $b2->draw() . "</td><td  valign=\"top\">" . $b3->draw() . "</td></tr></table>"));
$b->addWidget(html::write("<script> var idpedido='" . $sf->id . "';</script>"));
$p->addWidget($b);
$b = new Box("Detalle del Pedido");
예제 #3
0
<?php

include "local.php";
$sf = new scaffold("pedidos");
$sf->setCondition("tracking", "AW/" . $r->prefix . "/" . strtoupper($r->suffix));
$list = $sf->getList();
if ($list[0]["id"] == "") {
    header("location:tracking.php?error=1&prefix=" . $r->prefix . "&suffix=" . $r->suffix);
    die;
}
$p = new aworkstrackpage();
$sf->open($list[0]["id"]);
$ew = new estadolistwidget();
$ew->drop($sf);
$d_pedido = new date();
$d_pedido->timestamp = $sf->fecha_pedido;
$d_pedido->parse();
$d_entrega_estimada = new date();
$d_entrega_estimada->timestamp = $sf->fecha_entrega_prevista;
$d_entrega_estimada->parse();
$d_entrega = new date();
$d_entrega->timestamp = $sf->fecha_entrega;
$d_entrega->parse();
$out .= "\n<br /><br /><center><div style=\"background:rgb(239,237,222);width:640px;padding:12px;border:outset 2px;\">\n<center><br />\n<h2>Pedido " . $sf->tracking . "</h2>\n<table style=\"width:560px;\"><tr><td style=\"width:220px;\">Pedido</td><td> <b>" . $sf->tracking;
$out .= "</td></tr><tr><td> Cliente </td><td><b>" . $sf->cliente;
$out .= "</td></tr><tr><td>  Referencia Cliente </td><td> <b>" . $sf->referencia;
$out .= "</td></tr><tr><td> Estado </td><td>" . $ew->draw();
$out .= "</td></tr><tr><td> Fecha Pedido</td><td>" . $d_pedido->string;
$out .= "</td></tr><tr><td> Fecha Entrega Estimada</td><td>" . $d_entrega_estimada->string;
$out .= "</td></tr><tr><td> Fecha Entrega</td><td>" . $d_entrega->string;
$out .= "</table>\n\n";
예제 #4
0
 function draw()
 {
     $o = $this->popMailBox();
     $id = $o->id;
     $es = new estadowidget();
     $es->drop($o);
     $out .= $es->draw();
     $sf = new scaffold("pedidos_eventos");
     $sf->__query = "SELECT * FROM pedidos_eventos WHERE idpedido=" . $id . " ORDER BY fecha DESC";
     $out .= "<div style=\"overflow:auto;border:inset 1px;background:white;height:250px;\">";
     $out .= "<table style=\"font-size:12px;\" class=\"eventos\"><thead><td>Fecha</td><td>Estado Antiguo</td><td>Estado Nuevo</td><td>Fecha Prevista</td><td>Descripci&oacute;n</td></thead>";
     foreach ($sf->getList() as $evento) {
         $d = new date();
         $d->timestamp = $evento["fecha"];
         $d->parse();
         $d2 = new date();
         $d2->timestamp = $evento["fecha_entrega_prevista"];
         $d2->parse();
         $ewa = new estadolistwidget();
         $ewn = new estadolistwidget();
         $o = new oobject();
         $o->estado = $evento["estado_viejo"];
         $ewa->drop($o);
         $o = new oobject();
         $o->estado = $evento["estado_nuevo"];
         $ewn->drop($o);
         $out .= "<tr><td style=\"width:110px\">" . $d->string . "</td><td style=\"width:158px;\">" . $ewa->draw() . "</td><td  style=\"width:158px;\">" . $ewn->draw() . "</td><td  style=\"width:110px;\">" . $d2->short_string . "</td><td style=\"font-size:9px;\">" . $evento["descripcion"] . "</td></tr>";
     }
     $out .= "</table>";
     $out .= "</div>";
     return $out;
 }