Example #1
0
function FormularioAltaParticular()
{
    global $action;
    $oCliente = new cliente();
    $oCliente->Crea();
    $ot = getTemplate("FormAltaClienteParticular");
    if (!$ot) {
        error(__FILE__ . __LINE__, "Info: template no encontrado");
        return false;
    }
    $ot->fijar("tTitulo", _("Alta cliente"));
    $ot->fijar("action", $action);
    $ot->fijar("tModPagoHabitual", _("Modo pago hab."));
    $ot->fijar("vIdModPagoHabitual", $oCliente->get("IdModPagoHabitual"));
    $ot->fijar("comboModPagoHabitual", genComboModPagoHabitual($oCliente->get("IdModPagoHabitual")));
    $ot->fijar("tIdPais", _("País"));
    $ot->fijar("vIdPais", $oCliente->get("IdPais"));
    $ot->fijar("comboIdPais", genComboPaises($oCliente->get("IdPais")));
    $ot->campo(_("Nombre"), "NombreComercial", $oCliente);
    $ot->campo(_("Nombre legal"), "NombreLegal", $oCliente);
    $ot->campo(_("Dirección"), "Direccion", $oCliente);
    $ot->campo(_("Localidad"), "Localidad", $oCliente);
    $ot->campo(_("Código postal"), "CP", $oCliente);
    $ot->campo(_("Telf.(1)"), "Telefono1", $oCliente);
    $ot->campo(_("Telf.(2)"), "Telefono2", $oCliente);
    $ot->campo(_("Contacto"), "Contacto", $oCliente);
    $ot->campo(_("Cargo"), "Cargo", $oCliente);
    $ot->campo(_("Email"), "Email", $oCliente);
    $ot->campo(_("Cuenta bancaria"), "CuentaBancaria", $oCliente);
    $ot->campo(_("Número fiscal"), "NumeroFiscal", $oCliente);
    $ot->campo(_("Comentarios"), "Comentarios", $oCliente);
    //modalidad de pago habitual?
    echo $ot->Output();
}
Example #2
0
function FormularioAlta($esPopup = false)
{
    global $action;
    $oProveedor = new proveedor();
    $oProveedor->Crea();
    if (!$esPopup) {
        echo gas("cabecera", _("Gestion de Proveedores"));
    }
    $ot = getTemplate("FormAltaProveedor");
    if (!$ot) {
        error(__FILE__ . __LINE__, "Info: template no encontrado");
        return false;
    }
    $ot->fijar("action", $action);
    $ot->fijar("tTitulo", _("Alta proveedor"));
    $ot->fijar("tModPagoHabitual", _("Modo pago hab."));
    $ot->fijar("vIdModPagoHabitual", $oProveedor->get("IdModPagoHabitual"));
    $ot->fijar("comboModPagoHabitual", genComboModPagoHabitual($oProveedor->get("IdModPagoHabitual")));
    $ot->campo(_("Pagina web"), "PaginaWeb", $oProveedor);
    $ot->fijar("tIdPais", _("País"));
    $ot->fijar("comboIdPais", genComboPaises($oProveedor->get("IdPais")));
    $ot->campo(_("Nombre comercial"), "NombreComercial", $oProveedor);
    $ot->campo(_("Nombre legal"), "NombreLegal", $oProveedor);
    $ot->campo(_("Dirección"), "Direccion", $oProveedor);
    $ot->campo(_("Localidad"), "Localidad", $oProveedor);
    $ot->campo(_("Código postal"), "CP", $oProveedor);
    $ot->campo(_("Telf.(1)"), "Telefono1", $oProveedor);
    $ot->campo(_("Telf.(2)"), "Telefono2", $oProveedor);
    $ot->campo(_("Contacto"), "Contacto", $oProveedor);
    $ot->campo(_("Cargo"), "Cargo", $oProveedor);
    $ot->campo(_("Email"), "Email", $oProveedor);
    $ot->campo(_("Cuenta bancaria"), "CuentaBancaria", $oProveedor);
    $ot->campo(_("Número fiscal"), "NumeroFiscal", $oProveedor);
    $ot->campo(_("Comentarios"), "Comentarios", $oProveedor);
    if ($esPopup) {
        $ot->fijar("vesPopup", 1);
        $ot->fijar("onClose", "window.close()");
    } else {
        $ot->fijar("vesPopup", 0);
        $ot->fijar("onClose", "location.href='modproveedores.php'");
    }
    echo $ot->Output();
}