<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Comunidad a3ERP</title>
	<atom:link href="http://comunidadnexus.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://comunidadnexus.com</link>
	<description>Blog técnico de a3ERP para pymes</description>
	<lastBuildDate>Thu, 26 Jan 2012 12:48:35 +0000</lastBuildDate>
	<language>es</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='comunidadnexus.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Comunidad a3ERP</title>
		<link>http://comunidadnexus.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://comunidadnexus.com/osd.xml" title="Comunidad a3ERP" />
	<atom:link rel='hub' href='http://comunidadnexus.com/?pushpress=hub'/>
		<item>
		<title>Ayuda para crear eventos: Delphi snippet &#8211; RowObject</title>
		<link>http://comunidadnexus.com/2012/01/26/delphi-snippet-rowobject/</link>
		<comments>http://comunidadnexus.com/2012/01/26/delphi-snippet-rowobject/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 12:30:29 +0000</pubDate>
		<dc:creator>El monstruo de Caerbannog</dc:creator>
				<category><![CDATA[Desarrolladores]]></category>
		<category><![CDATA[Distribuidores]]></category>
		<category><![CDATA[Programación]]></category>
		<category><![CDATA[Versión 8]]></category>
		<category><![CDATA[Versión 9]]></category>
		<category><![CDATA[código]]></category>
		<category><![CDATA[delphi]]></category>
		<category><![CDATA[dll terceros]]></category>

		<guid isPermaLink="false">http://comunidadnexus.com/?p=3124</guid>
		<description><![CDATA[Como si me tratase del doctor Frankenstein perseguido por mi creación, decido abandonar mi retiro para afrontar a la bestia a la que un día aciago, jugando a ser programador, di vida: RowObject.pas Sí, varias han sido las llamadas que hemos recibido últimamente de desarrolladores que se quejaban de fallos en un código que, en ciertos [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=comunidadnexus.com&amp;blog=6141388&amp;post=3124&amp;subd=comunidadnexus&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-3144" style="margin-left:0;margin-right:10px;" title="Delphi snippet RowObject" src="http://comunidadnexus.files.wordpress.com/2012/01/2012_enero_comunidad_delphisnippet_diego_0.jpg?w=604" alt=""   />Como si me tratase del <a title="Frankenstein" href="http://www.youtube.com/watch?v=muTcYb1lCbU" target="_blank">doctor Frankenstein</a> perseguido por mi creación, decido abandonar mi retiro para afrontar a la bestia a la que un día aciago, jugando a ser programador, di vida: <strong>RowObject.pas</strong></p>
<p>Sí, varias han sido las llamadas que hemos recibido últimamente de desarrolladores que se quejaban de fallos en un código que, en ciertos casos, hemos proporcionado como ejemplo de cómo manipular de manera fácil unas matrices de variants en delphi usadas en algunos eventos de a3ERP. Para evitar tener que aplicar la medicina de la escupidera de bronce a alguno (se evita leyendo algunos artículos de este blog), publicaré aquí la versión más reciente de dicha unidad.</p>
<p><span id="more-3124"></span></p>
<p>Bien, el fragmento de código que publico a continuación contiene tres clases principalmente que nos evitarán tener que trabajar con las engorrosas matrices de matrices de variants (las matrices unidimensionales son muy fáciles de manipular, con un caramelo basta).</p>
<h2>TDatasetObject</h2>
<p>Esta clase encapsula lo que en <a title="Yo y Nexus: la consumación" href="http://comunidadnexus.com/2009/03/26/yo-y-nexus-la-consumacion/" target="_blank">el artículo en el que se describían los tipos usados en los eventos a3ERP</a> denominé &#8220;Conjunto de datos&#8221;. Se encarga de, dado un variant que contiene un &#8220;Conjunto de datos&#8221;, o sea una lista de &#8220;Registros&#8221;, crear una lista de objetos (TRowObject) para cada uno de los registros. Permite, de esta manera, un acceso indexado a los registros. Adicionalmente permite devolver los cambios que se hayan producido en los registros al variant original.</p>
<h2>TRowObject</h2>
<p>Esta otra encapsula lo que en el enlace del punto anterior se denominó &#8220;Registro&#8221;. Su responsabilidad es mantener la lista de campos definidos en el registro encapsulado así como proveer de algunas facilidades para localizarlos, ya sea por índice o nombre. Además es capaz de devolver los cambios que se produjeran en los campos mantenidos al variant.</p>
<h2>TFieldObject</h2>
<p>La última de las tres clases simplemente permite algunas facilidades extra para manipular los valores de cada uno de los campos, al estilo de los TField, del tipo denominado &#8220;Registro&#8221;, ya encapsulado por la clase anterior.</p>
<h2>El código: RowObject.pas</h2>
<p>Que menos que decir que se entrega como está, con sus bugs y demás atrocidades que se puedan encontrar. La mayor versión de Delphi con la que se ha compilado es la 2006. La última vez que lo intenté, compiló. Con versiones superiores es muy posible que de problemas por el soporte UNICODE.</p>
<p><pre class="brush: delphi;">&lt;br /&gt;
unit RowObject;&lt;/p&gt;
&lt;p&gt;interface&lt;/p&gt;
&lt;p&gt;uses&lt;br /&gt;
  SysUtils, Classes, Contnrs;&lt;/p&gt;
&lt;p&gt;type&lt;br /&gt;
  ERowObjectException = class(Exception);&lt;br /&gt;
  EInvalidFieldnameException = class(ERowObjectException);&lt;br /&gt;
  EInvalidGetFieldsParameter = class(ERowObjectException);&lt;/p&gt;
&lt;p&gt;  TDatasetObject = class;&lt;/p&gt;
&lt;p&gt;  TRowObject = class;&lt;br /&gt;
    TFieldObject = class&lt;br /&gt;
  private&lt;br /&gt;
    FIndex: Integer;&lt;br /&gt;
    FValue,&lt;br /&gt;
    FOldValue: Variant;&lt;br /&gt;
    FRow: TRowObject;&lt;br /&gt;
    FModified: Boolean;&lt;br /&gt;
    FFieldname: string;&lt;/p&gt;
&lt;p&gt;  protected&lt;br /&gt;
    procedure SetAsBoolean(const AValue: Boolean);&lt;br /&gt;
    procedure SetAsCurrency(const AValue: Currency);&lt;br /&gt;
    procedure SetAsFloat(const AValue: Double);&lt;br /&gt;
    procedure SetAsInteger(const AValue: Integer);&lt;br /&gt;
    procedure SetAsString(const AValue: string);&lt;br /&gt;
    function GetAsCurrency: Currency;&lt;br /&gt;
    function GetAsInteger: Integer;&lt;br /&gt;
    function GetAsString : string;&lt;br /&gt;
    function GetAsBoolean: Boolean;&lt;br /&gt;
    function GetAsFloat: Double;&lt;/p&gt;
&lt;p&gt;    procedure SetValue(const Value: Variant);&lt;br /&gt;
    procedure ApplyTo(var Line: Variant);&lt;br /&gt;
  public&lt;br /&gt;
    constructor Create(const AIndex: Integer; ARow: TRowObject);&lt;/p&gt;
&lt;p&gt;    property AsCurrency: Currency read GetAsCurrency write SetAsCurrency;&lt;br /&gt;
    property AsInteger: Integer read GetAsInteger write SetAsInteger;&lt;br /&gt;
    property AsString : string read GetAsString write SetAsString;&lt;br /&gt;
    property AsBoolean: Boolean read GetAsBoolean write SetAsBoolean;&lt;br /&gt;
    property AsFloat: Double read GetAsFloat write SetAsFloat;&lt;/p&gt;
&lt;p&gt;    property Modified: Boolean read FModified;&lt;br /&gt;
    property Value: Variant read FValue write SetValue;&lt;br /&gt;
    property OldValue: Variant read FOldValue;&lt;br /&gt;
    function IsEmpty: Boolean; overload;&lt;br /&gt;
    class function IsEmpty(AValue: Variant): Boolean; overload;&lt;br /&gt;
    class function VarAreEqual(const Var1, Var2: Variant): Boolean;&lt;/p&gt;
&lt;p&gt;    procedure CancelChange;&lt;br /&gt;
    property Fieldname: string read FFieldname;&lt;br /&gt;
    property Index: Integer read FIndex;&lt;br /&gt;
    property Row: TRowObject read FRow;&lt;br /&gt;
  end;&lt;/p&gt;
&lt;p&gt;  TRowObject = class&lt;br /&gt;
  private&lt;br /&gt;
    FData: Variant;&lt;br /&gt;
    FDataset: TDatasetObject;&lt;br /&gt;
    FFields: TObjectList;&lt;br /&gt;
    FFieldNameIndex: TStrings;&lt;br /&gt;
  protected&lt;br /&gt;
    function GetBufferFieldCount: Integer;&lt;br /&gt;
    function GetBufferFieldName(const Index: Integer): string;&lt;br /&gt;
    function GetBufferFieldValue(const Index: Integer): Variant;&lt;br /&gt;
    procedure BuildFields;&lt;br /&gt;
    procedure CheckIndex(const AIndex: Integer);&lt;/p&gt;
&lt;p&gt;    function GetModified: Boolean;&lt;br /&gt;
    function GetFields(const FieldNameOrIndex: Variant): TFieldObject;&lt;br /&gt;
    function GetFieldCount: Integer;&lt;br /&gt;
  public&lt;br /&gt;
    constructor Create(const Line: Variant; ADatasetObject: TDatasetObject = nil); overload;&lt;br /&gt;
    destructor Destroy; override;&lt;/p&gt;
&lt;p&gt;    procedure ApplyTo(var Line: Variant);&lt;br /&gt;
    procedure CancelChanges;&lt;br /&gt;
    property Modified: Boolean read GetModified;&lt;/p&gt;
&lt;p&gt;    function FindField(const AFieldname: string): TFieldObject;&lt;br /&gt;
    function FieldByName(const AFieldname: string): TFieldObject;&lt;/p&gt;
&lt;p&gt;    property Fields[const FieldNameOrIndex: Variant]: TFieldObject read GetFields; default;&lt;br /&gt;
    property FieldCount: Integer read GetFieldCount;&lt;/p&gt;
&lt;p&gt;    property Dataset: TDatasetObject read FDataset;&lt;br /&gt;
  end;&lt;/p&gt;
&lt;p&gt;  TDatasetObject = class&lt;br /&gt;
  private&lt;br /&gt;
    FRows: TObjectList;&lt;br /&gt;
    function GetModified: Boolean;&lt;br /&gt;
    protected&lt;br /&gt;
    function GetCount: Integer;&lt;br /&gt;
    function GetRows(const Index: Integer): TRowObject;&lt;br /&gt;
  public&lt;br /&gt;
    constructor Create; overload;&lt;br /&gt;
    constructor Create(const Lines: Variant); overload;&lt;br /&gt;
    destructor Destroy; override;&lt;/p&gt;
&lt;p&gt;    procedure AddRow(ARow: TRowObject);&lt;br /&gt;
    function RemoveRow(ARow: TRowObject): TRowObject;&lt;/p&gt;
&lt;p&gt;    procedure ApplyTo(var Lines: Variant);&lt;br /&gt;
    // todo: funciones de busqueda, modificado, etc...&lt;br /&gt;
    procedure Sort(Compare: TListSortCompare);&lt;/p&gt;
&lt;p&gt;    property Count: Integer read GetCount;&lt;br /&gt;
    property Rows[const Index: Integer]: TRowObject read GetRows; default;&lt;br /&gt;
    property Modified: Boolean read GetModified;&lt;br /&gt;
  end;&lt;/p&gt;
&lt;p&gt;implementation&lt;/p&gt;
&lt;p&gt;uses&lt;br /&gt;
  Variants;&lt;/p&gt;
&lt;p&gt;{ TRowObject }&lt;/p&gt;
&lt;p&gt;constructor TRowObject.Create(const Line: Variant; ADatasetObject: TDatasetObject = nil);&lt;br /&gt;
begin&lt;br /&gt;
  inherited Create;&lt;br /&gt;
  FData := Line;&lt;br /&gt;
  FFields := TObjectList.Create(True);&lt;br /&gt;
  FFieldNameIndex := TStringList.Create;&lt;br /&gt;
  TStringList(FFieldNameIndex).Sorted := True;&lt;br /&gt;
  FDataset := ADatasetObject;&lt;/p&gt;
&lt;p&gt;  BuildFields;&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;procedure TRowObject.BuildFields;&lt;br /&gt;
var&lt;br /&gt;
  Idx, Max: Integer;&lt;br /&gt;
  Field: TFieldObject;&lt;br /&gt;
begin&lt;br /&gt;
  FFields.Clear;&lt;br /&gt;
  FFieldNameIndex.Clear;&lt;br /&gt;
  Max := GetBufferFieldCount - 1;&lt;br /&gt;
  for Idx := 0 to Max do begin&lt;br /&gt;
    Field := TFieldObject.Create(Idx, Self);&lt;br /&gt;
    FFields.Add(Field);&lt;br /&gt;
    FFieldNameIndex.AddObject(Field.Fieldname, Field);&lt;br /&gt;
  end;&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;destructor TRowObject.Destroy;&lt;br /&gt;
begin&lt;br /&gt;
  FFieldNameIndex.Free;&lt;br /&gt;
  FFields.Free;&lt;br /&gt;
  inherited;&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;function TRowObject.GetBufferFieldCount: Integer;&lt;br /&gt;
begin&lt;br /&gt;
  Result := FData[0];&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;procedure TRowObject.CheckIndex(const AIndex: Integer);&lt;br /&gt;
begin&lt;br /&gt;
  if (AIndex &amp;amp;gt; GetFieldCount) then&lt;br /&gt;
    raise ERangeError.CreateFmt('Índice [%d] fuera de rango [%d, %d]', [AIndex, 0, GetFieldCount - 1]);&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;function TRowObject.GetBufferFieldValue(const Index: Integer): Variant;&lt;br /&gt;
begin&lt;br /&gt;
  CheckIndex(Index);&lt;br /&gt;
  Result := FData[Index + 1][1];&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;function TRowObject.GetBufferFieldName(const Index: Integer): string;&lt;br /&gt;
begin&lt;br /&gt;
  CheckIndex(Index);&lt;br /&gt;
  Result := FData[Index + 1][0];&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;procedure TRowObject.ApplyTo(var Line: Variant);&lt;br /&gt;
var&lt;br /&gt;
  Idx: Integer;&lt;br /&gt;
begin&lt;br /&gt;
  for Idx := 0 to FieldCount - 1 do&lt;br /&gt;
    Fields[Idx].ApplyTo(Line);&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;procedure TRowObject.CancelChanges;&lt;br /&gt;
var&lt;br /&gt;
  Idx: Integer;&lt;br /&gt;
begin&lt;br /&gt;
  for Idx := 0 to FieldCount - 1 do&lt;br /&gt;
    Fields[Idx].CancelChange;&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;function TRowObject.GetModified: Boolean;&lt;br /&gt;
var&lt;br /&gt;
  Idx: Integer;&lt;br /&gt;
begin&lt;br /&gt;
  for Idx := 0 to FieldCount - 1 do begin&lt;br /&gt;
    Result := Fields[Idx].Modified;&lt;br /&gt;
    if Result then Exit;&lt;br /&gt;
  end;&lt;br /&gt;
  Result := False;&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;function TRowObject.FieldByName(const AFieldname: string): TFieldObject;&lt;br /&gt;
begin&lt;br /&gt;
  Result := FindField(AFieldname);&lt;br /&gt;
  if not Assigned(Result) then&lt;br /&gt;
    raise EInvalidFieldnameException.CreateFmt('No se encontró campo [%s]', [AFieldname]);&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;function TRowObject.FindField(const AFieldname: string): TFieldObject;&lt;br /&gt;
var&lt;br /&gt;
  Idx: Integer;&lt;br /&gt;
begin&lt;br /&gt;
  Idx := FFieldNameIndex.IndexOf(UpperCase(AFieldname));&lt;br /&gt;
  if Idx = -1 then&lt;br /&gt;
    Result := nil&lt;br /&gt;
  else&lt;br /&gt;
    Result := TFieldObject(FFieldNameIndex.Objects[Idx]);&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;function TRowObject.GetFieldCount: Integer;&lt;br /&gt;
begin&lt;br /&gt;
  Result := FFields.Count;&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;function TRowObject.GetFields(const FieldNameOrIndex: Variant): TFieldObject;&lt;br /&gt;
begin&lt;br /&gt;
  if VarIsOrdinal(FieldNameOrIndex) then&lt;br /&gt;
    Result := TFieldObject(FFields[FieldNameOrIndex])&lt;br /&gt;
  else if VarIsStr(FieldNameOrIndex) then&lt;br /&gt;
    Result := FieldByName(FieldNameOrIndex)&lt;br /&gt;
  else&lt;br /&gt;
    raise EInvalidGetFieldsParameter.Create('Parametro FieldNameOrIndex de tipo incorrecto');&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;{ TDatasetObject }&lt;/p&gt;
&lt;p&gt;constructor TDatasetObject.Create(const Lines: Variant);&lt;br /&gt;
var&lt;br /&gt;
  Idx, Max: Integer;&lt;br /&gt;
begin&lt;br /&gt;
  Create;&lt;/p&gt;
&lt;p&gt;  Max := Lines[0];&lt;br /&gt;
  for Idx := 1 to Max do&lt;br /&gt;
    AddRow(TRowObject.Create(Lines[Idx], Self));&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;constructor TDatasetObject.Create;&lt;br /&gt;
begin&lt;br /&gt;
  inherited Create;&lt;br /&gt;
  FRows := TObjectList.Create;&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;destructor TDatasetObject.Destroy;&lt;br /&gt;
begin&lt;br /&gt;
  FreeAndNil(FRows);&lt;br /&gt;
  inherited;&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;procedure TDatasetObject.AddRow(ARow: TRowObject);&lt;br /&gt;
begin&lt;br /&gt;
  FRows.Add(ARow);&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;procedure TDatasetObject.ApplyTo(var Lines: Variant);&lt;br /&gt;
var&lt;br /&gt;
  Idx: Integer;&lt;br /&gt;
  Aux: Variant;&lt;br /&gt;
begin&lt;br /&gt;
  for Idx := 1 to Count do begin&lt;br /&gt;
    Aux := Lines[Idx];&lt;br /&gt;
    Rows[Idx - 1].ApplyTo(Aux);&lt;br /&gt;
    VarArrayPut(Lines, Aux, [Idx]);&lt;br /&gt;
  end;&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;function TDatasetObject.GetCount: Integer;&lt;br /&gt;
begin&lt;br /&gt;
Result := FRows.Count;&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;function TDatasetObject.GetModified: Boolean;&lt;br /&gt;
var&lt;br /&gt;
  Idx: Integer;&lt;br /&gt;
begin&lt;br /&gt;
  for Idx := 0 to Count - 1 do begin&lt;br /&gt;
     Result := Rows[Idx].Modified;&lt;br /&gt;
     if Result then Exit;&lt;br /&gt;
  end;&lt;br /&gt;
  Result := False;&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;function TDatasetObject.GetRows(const Index: Integer): TRowObject;&lt;br /&gt;
begin&lt;br /&gt;
  Result := TRowObject(FRows[Index]);&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;function TDatasetObject.RemoveRow(ARow: TRowObject): TRowObject;&lt;br /&gt;
begin&lt;br /&gt;
  FRows.Remove(ARow);&lt;br /&gt;
  Result := ARow;&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;procedure TDatasetObject.Sort(Compare: TListSortCompare);&lt;br /&gt;
begin&lt;br /&gt;
  FRows.Sort(Compare);&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;{ TFieldObject }&lt;/p&gt;
&lt;p&gt;procedure TFieldObject.CancelChange;&lt;br /&gt;
begin&lt;br /&gt;
  if not FModified then Exit;&lt;br /&gt;
  FValue := FOldValue;&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;constructor TFieldObject.Create(const AIndex: Integer; ARow: TRowObject);&lt;br /&gt;
begin&lt;br /&gt;
  inherited Create;&lt;br /&gt;
  FValue := ARow.GetBufferFieldValue(AIndex);&lt;br /&gt;
  FFieldname := ARow.GetBufferFieldName(AIndex);&lt;/p&gt;
&lt;p&gt;  FOldValue := FValue;;&lt;br /&gt;
  FIndex := AIndex;&lt;br /&gt;
  FRow := ARow;&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;procedure TFieldObject.ApplyTo(var Line: Variant);&lt;br /&gt;
var&lt;br /&gt;
  Aux: Variant;&lt;br /&gt;
begin&lt;br /&gt;
  Aux := Line[Index + 1];&lt;/p&gt;
&lt;p&gt;  if VarAreEqual(Value, Aux[1]) then Exit;&lt;/p&gt;
&lt;p&gt;  VarArrayPut(Aux, Value, [1]);&lt;br /&gt;
  VarArrayPut(Line, Aux, [Index + 1]);&lt;/p&gt;
&lt;p&gt;  FOldValue := FValue;&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;procedure TFieldObject.SetAsBoolean(const AValue: Boolean);&lt;br /&gt;
begin&lt;br /&gt;
  Value := AValue;&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;procedure TFieldObject.SetAsCurrency(const AValue: Currency);&lt;br /&gt;
begin&lt;br /&gt;
  Value := AValue;&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;procedure TFieldObject.SetAsFloat(const aValue: Double);&lt;br /&gt;
begin&lt;br /&gt;
  Value := AValue;&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;procedure TFieldObject.SetAsInteger(const AValue: Integer);&lt;br /&gt;
begin&lt;br /&gt;
  Value := AValue;&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;procedure TFieldObject.SetAsString(const AValue: string);&lt;br /&gt;
begin&lt;br /&gt;
  Value := AValue;&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;procedure TFieldObject.SetValue(const Value: Variant);&lt;br /&gt;
begin&lt;br /&gt;
  if (VarAreEqual(FValue, Value)) then Exit;&lt;/p&gt;
&lt;p&gt;  FValue := Value;&lt;br /&gt;
  FModified := not VarAreEqual(FValue, OldValue);&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;class function TFieldObject.VarAreEqual(const Var1, Var2: Variant): Boolean;&lt;br /&gt;
begin&lt;br /&gt;
  try&lt;br /&gt;
    Result := VarSameValue(Var1, Var2);&lt;br /&gt;
  except&lt;br /&gt;
    Result := False;&lt;br /&gt;
  end;&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;function TFieldObject.GetAsBoolean: Boolean;&lt;br /&gt;
begin&lt;br /&gt;
  if IsEmpty then&lt;br /&gt;
    Result := False&lt;br /&gt;
  else&lt;br /&gt;
    Result := Value;&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;function TFieldObject.GetAsFloat: Double;&lt;br /&gt;
begin&lt;br /&gt;
if IsEmpty then&lt;br /&gt;
     Result := 0&lt;br /&gt;
else&lt;br /&gt;
     Result := Value;&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;function TFieldObject.GetAsInteger: Integer;&lt;br /&gt;
begin&lt;br /&gt;
  if IsEmpty then&lt;br /&gt;
    Result := 0&lt;br /&gt;
  else&lt;br /&gt;
    Result := Value;&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;function TFieldObject.GetAsString: string;&lt;br /&gt;
begin&lt;br /&gt;
  if IsEmpty then&lt;br /&gt;
    Result := ''&lt;br /&gt;
  else&lt;br /&gt;
    Result := Value;&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;class function TFieldObject.IsEmpty(AValue: Variant): Boolean;&lt;br /&gt;
begin&lt;br /&gt;
  Result := VarIsNull(AValue) or (VarIsStr(AValue) and (AValue = ''));&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;function TFieldObject.IsEmpty: Boolean;&lt;br /&gt;
begin&lt;br /&gt;
  Result := TFieldObject.IsEmpty(Value);&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;function TFieldObject.GetAsCurrency: Currency;&lt;br /&gt;
begin&lt;br /&gt;
  if IsEmpty then&lt;br /&gt;
    Result := 0&lt;br /&gt;
  else&lt;br /&gt;
    Result := Value;&lt;br /&gt;
end;&lt;/p&gt;
&lt;p&gt;end.&lt;br /&gt;
&amp;amp;lt;pre&amp;amp;gt;</pre></p>
<h2>Uso</h2>
<p>Antes de nada hay que conocer que es lo que contiene el Variant cuyo manejo queremos simplificar. Para ello os recomiendo que repaséis los siguientes artículos <a title="Eventos, signatura y tipos" href="http://comunidadnexus.com/2009/03/26/yo-y-nexus-la-consumacion/" target="_blank">eventos</a> y <a title="V7 vs V8" href="http://comunidadnexus.com/2009/07/29/eventos-nexus-v7-versus-v8/" target="_blank">cambios de v7 a v8</a>.</p>
<p>Directamente trabajaremos con dos clases, TDatasetObject y TRowObject. La tercera la usaremos en el momento en el que queramos consultar o alterar el valor de alguno de los campos de un registro.</p>
<h3>TDatasetObject</h3>
<p>Así si, por ejemplo, estuviésemos implementando un &#8220;AntesDeGuardarDocumento&#8221; en versión 8 o superior y necesitáramos modificar algún campo de la cabecera (en líneas a día de hoy no se puede desde este evento), haríamos algo tal que:</p>
<p><pre class="brush: cpp;">&lt;br /&gt;
procedure ANTESDEGUARDARDOCUMENTO(Documento: string; IdDoc: Double; var Cabecera: Variant; var Lineas: Variant): boolean; stdcall;&lt;br /&gt;
var&lt;br /&gt;
  Dataset: TDatasetObject;&lt;br /&gt;
begin&lt;br /&gt;
  Dataset := TDatasetObject.Create(Cabecera);&lt;br /&gt;
  try&lt;br /&gt;
    Dataset.Rows[0].FieldByName('OBSERVACIONES').AsString := 'Documento con Id: ' + FormatFloat('0', IdDoc);&lt;br /&gt;
    Dataset.ApplyTo(Cabecera);&lt;br /&gt;
  finally&lt;br /&gt;
    Dataset.Free;&lt;br /&gt;
  end;&lt;br /&gt;
end;&lt;br /&gt;
</pre></p>
<p>Como podemos ver, explícitamente hemos creado un TDatasetObject pero manipulado un TRowObject y un TFieldObject.</p>
<h3>TRowObject</h3>
<p>En caso de que estuviéramos implementando algún evento de documentos en versión 7, o alguno de líneas de documento (por ejemplo), podemos simplificar el manipulado del registro que nos llega con esta clase de la siguiente manera:</p>
<p><pre class="brush: delphi;">&lt;br /&gt;
procedure ANTESDEGUARDARLINEA(Documento: String; Cabecera: Variant; Linea: Variant): Variant; stdcall;&lt;br /&gt;
var&lt;br /&gt;
  Row: TRowObject;&lt;br /&gt;
begin&lt;br /&gt;
  Result := Null;&lt;br /&gt;
  if Documento &amp;amp;lt;&amp;amp;gt; 'FV' then Exit; // Sólo en facturas de venta&lt;br /&gt;
  Row := TRowObject.Create(Linea);&lt;br /&gt;
  try&lt;br /&gt;
    if Row.FieldByName('CODART').AsString = '0' then&lt;br /&gt;
      SumarPuntosCliente(Row.FieldByName('UNIDADES').AsFloat);&lt;br /&gt;
  finally&lt;br /&gt;
    Row.Free;&lt;br /&gt;
  end;&lt;br /&gt;
end;&lt;br /&gt;
</pre></p>
<h2>Mejoras posibles</h2>
<p>Hay muchas. Por ejemplo soportar versiones de Delphi UNICODE trabajando contra a3ERP con cadenas AnsiString, que no haga falta indicar el destino en los método ApplyTo (y por lo tanto queden como Apply sin más). Que el TRowObject permita construir registros al vuelo, sin necesidad de darle un variant origen, para así facilitar el devolver campos a modificar en los métodos &#8220;AntesDeGuardarLinea&#8221;, etc&#8230;</p>
<h4><span style="color:#888888;">Os animo a que uséis este código y compartáis con nosotros las mejoras que introduzcáis. Para ello podéis enviarlas como comentarios a este artículo y así podremos discutirlas entre todos e incorporarlas. Hacedlo o no lo hagáis, pero sabed que una escupidera os vigila&#8230;</span></h4>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/comunidadnexus.wordpress.com/3124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/comunidadnexus.wordpress.com/3124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/comunidadnexus.wordpress.com/3124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/comunidadnexus.wordpress.com/3124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/comunidadnexus.wordpress.com/3124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/comunidadnexus.wordpress.com/3124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/comunidadnexus.wordpress.com/3124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/comunidadnexus.wordpress.com/3124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/comunidadnexus.wordpress.com/3124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/comunidadnexus.wordpress.com/3124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/comunidadnexus.wordpress.com/3124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/comunidadnexus.wordpress.com/3124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/comunidadnexus.wordpress.com/3124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/comunidadnexus.wordpress.com/3124/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=comunidadnexus.com&amp;blog=6141388&amp;post=3124&amp;subd=comunidadnexus&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://comunidadnexus.com/2012/01/26/delphi-snippet-rowobject/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/20f74fce3d18d7377de7ef144a34c9f5?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">El monstruo de Caerbannog</media:title>
		</media:content>

		<media:content url="http://comunidadnexus.files.wordpress.com/2012/01/2012_enero_comunidad_delphisnippet_diego_0.jpg" medium="image">
			<media:title type="html">Delphi snippet RowObject</media:title>
		</media:content>
	</item>
		<item>
		<title>Importar ficheros maestros a una nueva empresa</title>
		<link>http://comunidadnexus.com/2012/01/18/importar-ficheros-maestros-a-una-nueva-empresa/</link>
		<comments>http://comunidadnexus.com/2012/01/18/importar-ficheros-maestros-a-una-nueva-empresa/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 12:39:38 +0000</pubDate>
		<dc:creator>encarnasac</dc:creator>
				<category><![CDATA[Consejos]]></category>

		<guid isPermaLink="false">http://comunidadnexus.com/?p=3110</guid>
		<description><![CDATA[ por Encarna López de Atención al Cliente Con a3ERP tenemos la opción de poder importar los ficheros maestros de una empresa existente (clientes, proveedores, artículos, etc.) a una empresa nueva. A continuación os mostramos los pasos a seguir, es muy sencillo. Paso 1: Desde el gestor de empresas, añadimos Crear una nueva empresa, damos un [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=comunidadnexus.com&amp;blog=6141388&amp;post=3110&amp;subd=comunidadnexus&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:#888888;"><img title="miniencarna" src="http://comunidadnexus.files.wordpress.com/2012/01/miniencarna.jpg?w=604" alt="" /> por Encarna López de Atención al Cliente</span></p>
<p><img class="alignleft size-full wp-image-3116" title="Importar ficheros maestros a una nueva empresa" src="http://comunidadnexus.files.wordpress.com/2012/01/2012_enero_comunidad_importarficheros_encarna.jpg?w=604" alt=""   />Con a3ERP tenemos la opción de poder importar los ficheros maestros de una empresa existente (clientes, proveedores, artículos, etc.) a una empresa nueva. A continuación os mostramos los pasos a seguir, es muy sencillo.</p>
<p>Paso 1:</p>
<p>Desde el gestor de empresas, añadimos Crear una nueva empresa, damos un  nombre a la base de datos y cuando llegamos a la pantalla que nos pide el tipo de empresa indicamos EMPRESA VACÍA.<span id="more-3110"></span></p>
<p><img class="alignnone size-full wp-image-3113" title="Importar ficheros maestros a una nueva empresa - añadir nueva empresa" src="http://comunidadnexus.files.wordpress.com/2012/01/2012_enero_comunidad_importarficheros_encarna_1.jpg?w=604" alt=""   /></p>
<p><img class="alignnone size-full wp-image-3114" title="Importar ficheros maestros a una nueva empresa - crear base de datos" src="http://comunidadnexus.files.wordpress.com/2012/01/2012_enero_comunidad_importarficheros_encarna_2.jpg?w=604" alt=""   /></p>
<p>Paso 2:</p>
<p>Entramos en la empresa vacía y desde el menú  Otros,  Importar/Exportar damos al botón de Importar.</p>
<p>Nos mostrará una pantalla que nos pedirá desde qué empresa queremos Importar. La seleccionamos  y ya tendremos copiados todos los ficheros necesarios para empezar a trabajar con la nueva empresa.</p>
<p><img class="alignnone size-full wp-image-3112" title="Importar ficheros maestros" src="http://comunidadnexus.files.wordpress.com/2012/01/2012_enero_comunidad_importarficheros_encarna_3.jpg?w=604" alt=""   /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/comunidadnexus.wordpress.com/3110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/comunidadnexus.wordpress.com/3110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/comunidadnexus.wordpress.com/3110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/comunidadnexus.wordpress.com/3110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/comunidadnexus.wordpress.com/3110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/comunidadnexus.wordpress.com/3110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/comunidadnexus.wordpress.com/3110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/comunidadnexus.wordpress.com/3110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/comunidadnexus.wordpress.com/3110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/comunidadnexus.wordpress.com/3110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/comunidadnexus.wordpress.com/3110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/comunidadnexus.wordpress.com/3110/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/comunidadnexus.wordpress.com/3110/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/comunidadnexus.wordpress.com/3110/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=comunidadnexus.com&amp;blog=6141388&amp;post=3110&amp;subd=comunidadnexus&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://comunidadnexus.com/2012/01/18/importar-ficheros-maestros-a-una-nueva-empresa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/47bc67ad3f61486f47b4fd60e37444fd?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">encarnasac</media:title>
		</media:content>

		<media:content url="http://comunidadnexus.files.wordpress.com/2012/01/miniencarna.jpg?w=604" medium="image">
			<media:title type="html">miniencarna</media:title>
		</media:content>

		<media:content url="http://comunidadnexus.files.wordpress.com/2012/01/2012_enero_comunidad_importarficheros_encarna.jpg" medium="image">
			<media:title type="html">Importar ficheros maestros a una nueva empresa</media:title>
		</media:content>

		<media:content url="http://comunidadnexus.files.wordpress.com/2012/01/2012_enero_comunidad_importarficheros_encarna_1.jpg" medium="image">
			<media:title type="html">Importar ficheros maestros a una nueva empresa - añadir nueva empresa</media:title>
		</media:content>

		<media:content url="http://comunidadnexus.files.wordpress.com/2012/01/2012_enero_comunidad_importarficheros_encarna_2.jpg" medium="image">
			<media:title type="html">Importar ficheros maestros a una nueva empresa - crear base de datos</media:title>
		</media:content>

		<media:content url="http://comunidadnexus.files.wordpress.com/2012/01/2012_enero_comunidad_importarficheros_encarna_3.jpg" medium="image">
			<media:title type="html">Importar ficheros maestros</media:title>
		</media:content>
	</item>
		<item>
		<title>Nueva versión a3ERP HACIENDA 2012.0.0A</title>
		<link>http://comunidadnexus.com/2012/01/11/nueva-version-a3erp-hacienda-2012-0-0a/</link>
		<comments>http://comunidadnexus.com/2012/01/11/nueva-version-a3erp-hacienda-2012-0-0a/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 14:09:19 +0000</pubDate>
		<dc:creator>isabelsl</dc:creator>
				<category><![CDATA[Novedades]]></category>
		<category><![CDATA[Nuevas versiones]]></category>
		<category><![CDATA[Versión 8]]></category>
		<category><![CDATA[Versión 9]]></category>
		<category><![CDATA[a3ERP]]></category>
		<category><![CDATA[ERP]]></category>
		<category><![CDATA[hacienda 2012]]></category>
		<category><![CDATA[modelo 180]]></category>
		<category><![CDATA[modelo 347]]></category>
		<category><![CDATA[Modelo 390]]></category>
		<category><![CDATA[nov]]></category>

		<guid isPermaLink="false">http://comunidadnexus.com/?p=3080</guid>
		<description><![CDATA[por Isabel Soler de Atención al Cliente Ya está disponible la nueva versión del módulo de Hacienda de a3ERP, instalable a partir de la versión 8.0.2F. A diferencia de las anteriores, esta  versión cuenta con dos aplicaciones distintas en función del a3ERP que tengamos: versión 8 ó versión 9. Es importante instalar la que corresponda, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=comunidadnexus.com&amp;blog=6141388&amp;post=3080&amp;subd=comunidadnexus&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:#888888;"><img class="alignnone size-full wp-image-3084" title="miniisabel" src="http://comunidadnexus.files.wordpress.com/2012/01/miniisabel.jpg?w=604" alt=""   /> por Isabel Soler de Atención al Cliente</span></p>
<p><img class="alignleft size-full wp-image-3094" style="margin-left:5px;margin-right:5px;" title="Nueva versión a3ERP Hacienda 2012.0.0A" src="http://comunidadnexus.files.wordpress.com/2012/01/2012_enero_comunidad_hacienda2012_isabel_0bis.jpg?w=604" alt=""   />Ya está disponible la nueva versión del módulo de Hacienda de a3ERP, instalable a partir de la versión 8.0.2F. A diferencia de las anteriores, esta  versión cuenta con dos aplicaciones distintas en función del a3ERP que tengamos: versión 8 ó versión 9. Es importante instalar la que corresponda, ya que en caso contrario no funcionará.<span id="more-3080"></span></p>
<p>Con esta versión ya se pueden realizar los modelos anuales  180 y 390 del ejercicio 2011 de Hacienda, pero por el momento NO INCLUYE EL MODELO 347,  que por la complejidad de los cambios no estará disponible hasta la próxima actualización.</p>
<p><strong>NOVEDADES</strong></p>
<p>En la primera versión del producto del ejercicio 2012, ya están disponibles para la realización de los siguientes modelos:</p>
<ul>
<li>Los modelos mensuales 303, 340, 111, 115 y 349 con datos 2011</li>
</ul>
<ul>
<li>El modelo anual 180 (datos del 2011) que incorpora el validador 2011 de Hacienda. A entregar el próximo 20 de enero.</li>
</ul>
<ul>
<li>El modelo anual 390 (datos del 2011) que incorpora el validador 2011 de Hacienda. Además incluye un nuevo dato: Exclusión o baja en el registro de devolución mensual. A entregar el próximo 20 de enero.</li>
</ul>
<p><a href="http://comunidadnexus.files.wordpress.com/2012/01/2012_enero_comunidad_hacienda2012_isabel_1.jpg"><img class="alignnone  wp-image-3086" title="Nueva versión a3ERP Hacienda 2012" src="http://comunidadnexus.files.wordpress.com/2012/01/2012_enero_comunidad_hacienda2012_isabel_1.jpg?w=506&#038;h=302" alt="" width="506" height="302" /></a></p>
<p>Esta nueva versión no permite realizar ningún modelo con datos del 2013 ó años superiores.</p>
<p><a href="http://descargas.websie.com/archivos/documentacion/revisiones/Novedadeshacienda2012a.pdf">Descargar Novedades en pdf </a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/comunidadnexus.wordpress.com/3080/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/comunidadnexus.wordpress.com/3080/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/comunidadnexus.wordpress.com/3080/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/comunidadnexus.wordpress.com/3080/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/comunidadnexus.wordpress.com/3080/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/comunidadnexus.wordpress.com/3080/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/comunidadnexus.wordpress.com/3080/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/comunidadnexus.wordpress.com/3080/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/comunidadnexus.wordpress.com/3080/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/comunidadnexus.wordpress.com/3080/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/comunidadnexus.wordpress.com/3080/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/comunidadnexus.wordpress.com/3080/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/comunidadnexus.wordpress.com/3080/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/comunidadnexus.wordpress.com/3080/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=comunidadnexus.com&amp;blog=6141388&amp;post=3080&amp;subd=comunidadnexus&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://comunidadnexus.com/2012/01/11/nueva-version-a3erp-hacienda-2012-0-0a/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/118b061fe6ef520a6634a61941aef48b?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">isabelsl</media:title>
		</media:content>

		<media:content url="http://comunidadnexus.files.wordpress.com/2012/01/miniisabel.jpg" medium="image">
			<media:title type="html">miniisabel</media:title>
		</media:content>

		<media:content url="http://comunidadnexus.files.wordpress.com/2012/01/2012_enero_comunidad_hacienda2012_isabel_0bis.jpg" medium="image">
			<media:title type="html">Nueva versión a3ERP Hacienda 2012.0.0A</media:title>
		</media:content>

		<media:content url="http://comunidadnexus.files.wordpress.com/2012/01/2012_enero_comunidad_hacienda2012_isabel_1.jpg" medium="image">
			<media:title type="html">Nueva versión a3ERP Hacienda 2012</media:title>
		</media:content>
	</item>
		<item>
		<title>¿Cómo envío todas mis facturas a mi gestor por e-mail?</title>
		<link>http://comunidadnexus.com/2012/01/11/como-envio-todas-mis-facturas-a-mi-gestor-por-e-mail/</link>
		<comments>http://comunidadnexus.com/2012/01/11/como-envio-todas-mis-facturas-a-mi-gestor-por-e-mail/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 10:18:24 +0000</pubDate>
		<dc:creator>encarnasac</dc:creator>
				<category><![CDATA[Conexiones]]></category>
		<category><![CDATA[Consejos]]></category>
		<category><![CDATA[a3ERP]]></category>
		<category><![CDATA[enviar facturas]]></category>
		<category><![CDATA[ERP]]></category>
		<category><![CDATA[facturas]]></category>
		<category><![CDATA[gestor]]></category>
		<category><![CDATA[trucos]]></category>

		<guid isPermaLink="false">http://comunidadnexus.com/?p=3053</guid>
		<description><![CDATA[por Encarna López de Atención al Cliente Para agilizar tareas y ahorrar tiempo se puede dar el caso de que nuestro gestor nos pida que le enviemos toda la facturación de un periodo concreto. ¿Cómo puedo automatizar el envío de mis facturas? A continuación te contamos cómo hacerlo desde a3ERP: En Datos generales &#8211; Preferencias [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=comunidadnexus.com&amp;blog=6141388&amp;post=3053&amp;subd=comunidadnexus&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:#888888;"><img class="alignnone size-full wp-image-3071" title="miniencarna" src="http://comunidadnexus.files.wordpress.com/2012/01/miniencarna.jpg?w=604" alt=""   /> por Encarna López de Atención al Cliente</span></p>
<p><img class="alignleft size-full wp-image-3096" style="margin-left:0;margin-right:10px;" title="¿Cómo envío todas mis facturas a mi gestor por e-mail?" src="http://comunidadnexus.files.wordpress.com/2012/01/2012_enero_comunidad_comoenviofacturas_encarna_01.jpg?w=604" alt=""   />Para agilizar tareas y ahorrar tiempo se puede dar el caso de que nuestro gestor nos pida que le enviemos toda la facturación de un periodo concreto. ¿Cómo puedo automatizar el envío de mis facturas?<br />
A continuación te contamos cómo hacerlo desde a3ERP:</p>
<p>En Datos generales &#8211; Preferencias &#8211; haz check para poder guardar impresión de todas las facturas en formato PDF y confirma la ruta de la carpeta en la cual quieres que se guarden y su formato.<span id="more-3053"></span></p>
<p><a href="http://comunidadnexus.files.wordpress.com/2012/01/2012_enero_comunidad_comoenviofacturas_encarna_1.jpg"><img class="alignnone  wp-image-3060" title="2012_enero_comunidad_comoenviofacturas_encarna_1" src="http://comunidadnexus.files.wordpress.com/2012/01/2012_enero_comunidad_comoenviofacturas_encarna_1.jpg?w=567&#038;h=58" alt="" width="567" height="58" /></a></p>
<p>De este modo al imprimir nos mostrará un botón nuevo para guardar el documento <img class="alignnone size-full wp-image-3061" title="2012_enero_comunidad_comoenviofacturas_encarna_1b" src="http://comunidadnexus.files.wordpress.com/2012/01/2012_enero_comunidad_comoenviofacturas_encarna_1b.jpg?w=604" alt=""   /></p>
<p><a href="http://comunidadnexus.files.wordpress.com/2012/01/2012_enero_comunidad_comoenviofacturas_encarna_2.jpg"><img class="alignnone size-full wp-image-3059" title="2012_enero_comunidad_comoenviofacturas_encarna_2" src="http://comunidadnexus.files.wordpress.com/2012/01/2012_enero_comunidad_comoenviofacturas_encarna_2.jpg?w=604" alt=""   /></a></p>
<p>Una vez se tengamos todas las facturas del periodo que necesitamos, ya podremos comprimir y enviar por mail a nuestro gestor.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/comunidadnexus.wordpress.com/3053/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/comunidadnexus.wordpress.com/3053/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/comunidadnexus.wordpress.com/3053/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/comunidadnexus.wordpress.com/3053/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/comunidadnexus.wordpress.com/3053/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/comunidadnexus.wordpress.com/3053/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/comunidadnexus.wordpress.com/3053/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/comunidadnexus.wordpress.com/3053/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/comunidadnexus.wordpress.com/3053/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/comunidadnexus.wordpress.com/3053/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/comunidadnexus.wordpress.com/3053/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/comunidadnexus.wordpress.com/3053/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/comunidadnexus.wordpress.com/3053/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/comunidadnexus.wordpress.com/3053/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=comunidadnexus.com&amp;blog=6141388&amp;post=3053&amp;subd=comunidadnexus&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://comunidadnexus.com/2012/01/11/como-envio-todas-mis-facturas-a-mi-gestor-por-e-mail/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/47bc67ad3f61486f47b4fd60e37444fd?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">encarnasac</media:title>
		</media:content>

		<media:content url="http://comunidadnexus.files.wordpress.com/2012/01/miniencarna.jpg" medium="image">
			<media:title type="html">miniencarna</media:title>
		</media:content>

		<media:content url="http://comunidadnexus.files.wordpress.com/2012/01/2012_enero_comunidad_comoenviofacturas_encarna_01.jpg" medium="image">
			<media:title type="html">¿Cómo envío todas mis facturas a mi gestor por e-mail?</media:title>
		</media:content>

		<media:content url="http://comunidadnexus.files.wordpress.com/2012/01/2012_enero_comunidad_comoenviofacturas_encarna_1.jpg" medium="image">
			<media:title type="html">2012_enero_comunidad_comoenviofacturas_encarna_1</media:title>
		</media:content>

		<media:content url="http://comunidadnexus.files.wordpress.com/2012/01/2012_enero_comunidad_comoenviofacturas_encarna_1b.jpg" medium="image">
			<media:title type="html">2012_enero_comunidad_comoenviofacturas_encarna_1b</media:title>
		</media:content>

		<media:content url="http://comunidadnexus.files.wordpress.com/2012/01/2012_enero_comunidad_comoenviofacturas_encarna_2.jpg" medium="image">
			<media:title type="html">2012_enero_comunidad_comoenviofacturas_encarna_2</media:title>
		</media:content>
	</item>
		<item>
		<title>Entrada masiva de artículos en a3ERP más fácil y cómoda</title>
		<link>http://comunidadnexus.com/2012/01/05/entrada-masiva-de-articulos-en-a3erp-mas-facil-y-comoda/</link>
		<comments>http://comunidadnexus.com/2012/01/05/entrada-masiva-de-articulos-en-a3erp-mas-facil-y-comoda/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 08:15:12 +0000</pubDate>
		<dc:creator>pepim</dc:creator>
				<category><![CDATA[Consejos]]></category>
		<category><![CDATA[a3ERP]]></category>
		<category><![CDATA[albarán de venta]]></category>
		<category><![CDATA[códigos de barra]]></category>
		<category><![CDATA[entrada de artículos]]></category>
		<category><![CDATA[ERP]]></category>
		<category><![CDATA[tallas y colores]]></category>
		<category><![CDATA[trucos]]></category>

		<guid isPermaLink="false">http://comunidadnexus.com/?p=3019</guid>
		<description><![CDATA[ por Pepi Mercado de Atención al Cliente Para aquellas empresas que trabajen con  tallas y colores, a3ERP cuenta con una pantalla en los documentos, tanto de venta como de compra, que va de perlas para poder trabajar cómoda y rápidamente la entrada masiva de artículos.  A continuación detallamos dónde se encuentra. Para este ejemplo hemos [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=comunidadnexus.com&amp;blog=6141388&amp;post=3019&amp;subd=comunidadnexus&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="color:#888888;"><a href="http://comunidadnexus.files.wordpress.com/2011/03/minipepi.jpg"><img class=" wp-image-2085 alignnone" title="minipepi" src="http://comunidadnexus.files.wordpress.com/2011/03/minipepi.jpg?w=29&#038;h=29" alt="" width="29" height="29" /></a> por Pepi Mercado de Atención al Cliente</span></p>
<p><img class="alignleft  wp-image-3100" style="margin-left:0;margin-right:10px;" title="Entrada masiva de artículos en a3ERP más fácil y cómoda" src="http://comunidadnexus.files.wordpress.com/2012/01/2012_enero_comunidad_entradamasiva_pepi_0bis.jpg?w=198&#038;h=142" alt="" width="198" height="142" />Para aquellas empresas que trabajen con  tallas y colores, a3ERP cuenta con una pantalla en los documentos, tanto de venta como de compra, que va de perlas para poder trabajar cómoda y rápidamente la entrada masiva de artículos.  A continuación detallamos dónde se encuentra.</p>
<p>
Para este ejemplo hemos elegido un albarán de venta.<br />
<br />Como puede verse en la imagen, se activa un botón al que hemos llamado “Otros”<span id="more-3019"></span></p>
<div><a href="http://comunidadnexus.files.wordpress.com/2012/01/enero2012_entradamasiva_pepi1.jpg"><img class="alignnone size-full wp-image-3021" title="En Albarán de venta, activa el botón Otros" src="http://comunidadnexus.files.wordpress.com/2012/01/enero2012_entradamasiva_pepi1.jpg?w=604" alt=""   /></a></div>
<ul>
<li>Al hacer clic en &#8220;Otros&#8221; nos muestra varias opciones, entre ellas vemos la opción “Entrada masiva de códigos de barras”.<a href="http://comunidadnexus.files.wordpress.com/2012/01/enero2012_entradamasiva_pepi2.jpg"><img class="alignnone size-full wp-image-3022" style="border-color:initial;border-style:initial;" title="Haz clic en “Entrada masiva de códigos de barras”" src="http://comunidadnexus.files.wordpress.com/2012/01/enero2012_entradamasiva_pepi2.jpg?w=604" alt=""   /></a></li>
</ul>
<ul>
<li>¡Perfecto! En esta nueva ventana  ya tenemos los campos necesarios para introducir cada artículo con sus tallas y colores. ¿Quieres ver un ejemplo?</li>
</ul>
<p>- Indicamos unidades y artículo</p>
<p><a href="http://comunidadnexus.files.wordpress.com/2012/01/enero2012_entradamasiva_pepi3.jpg"><img class="alignnone size-full wp-image-3023" title="Indicamos unidades y artículo" src="http://comunidadnexus.files.wordpress.com/2012/01/enero2012_entradamasiva_pepi3.jpg?w=604" alt=""   /></a></p>
<p>- A continuación indicamos tallas y colores</p>
<p><a href="http://comunidadnexus.files.wordpress.com/2012/01/enero2012_entradamasiva_pepi4.jpg"><img class="alignnone size-full wp-image-3024" title="Indicamos tallas y colores" src="http://comunidadnexus.files.wordpress.com/2012/01/enero2012_entradamasiva_pepi4.jpg?w=604" alt=""   /></a></p>
<ul>
<li>Y así de cómodo puede ser trabajar con artículos que tengan tallas y colores.</li>
<li>También puede resultar muy fácil, si tenemos códigos de barra, ya que desde esta ventana y tan sólo con pasar la pistola, podemos rellenar con un gesto una línea de documento, lo cual es ideal para aquellas empresas que tengan un volumen importante de líneas en los documentos.</li>
<li>También tenemos opción de trabajar con lotes, nº series y/o fecha de caducidad.</li>
</ul>
<p>Desde el Dpto. de Atención al Cliente recomendamos hacer algún ejercicio para tratar de ver su funcionalidad.</p>
<p>En el caso que surja alguna duda,  pueden ponerse en contacto con nosotros y le atenderemos en todo lo necesario.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/comunidadnexus.wordpress.com/3019/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/comunidadnexus.wordpress.com/3019/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/comunidadnexus.wordpress.com/3019/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/comunidadnexus.wordpress.com/3019/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/comunidadnexus.wordpress.com/3019/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/comunidadnexus.wordpress.com/3019/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/comunidadnexus.wordpress.com/3019/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/comunidadnexus.wordpress.com/3019/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/comunidadnexus.wordpress.com/3019/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/comunidadnexus.wordpress.com/3019/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/comunidadnexus.wordpress.com/3019/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/comunidadnexus.wordpress.com/3019/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/comunidadnexus.wordpress.com/3019/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/comunidadnexus.wordpress.com/3019/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=comunidadnexus.com&amp;blog=6141388&amp;post=3019&amp;subd=comunidadnexus&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://comunidadnexus.com/2012/01/05/entrada-masiva-de-articulos-en-a3erp-mas-facil-y-comoda/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/a8a1c5917bab4578975a0f84e58ed9e0?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">pepim</media:title>
		</media:content>

		<media:content url="http://comunidadnexus.files.wordpress.com/2011/03/minipepi.jpg" medium="image">
			<media:title type="html">minipepi</media:title>
		</media:content>

		<media:content url="http://comunidadnexus.files.wordpress.com/2012/01/2012_enero_comunidad_entradamasiva_pepi_0bis.jpg" medium="image">
			<media:title type="html">Entrada masiva de artículos en a3ERP más fácil y cómoda</media:title>
		</media:content>

		<media:content url="http://comunidadnexus.files.wordpress.com/2012/01/enero2012_entradamasiva_pepi1.jpg" medium="image">
			<media:title type="html">En Albarán de venta, activa el botón Otros</media:title>
		</media:content>

		<media:content url="http://comunidadnexus.files.wordpress.com/2012/01/enero2012_entradamasiva_pepi2.jpg" medium="image">
			<media:title type="html">Haz clic en “Entrada masiva de códigos de barras”</media:title>
		</media:content>

		<media:content url="http://comunidadnexus.files.wordpress.com/2012/01/enero2012_entradamasiva_pepi3.jpg" medium="image">
			<media:title type="html">Indicamos unidades y artículo</media:title>
		</media:content>

		<media:content url="http://comunidadnexus.files.wordpress.com/2012/01/enero2012_entradamasiva_pepi4.jpg" medium="image">
			<media:title type="html">Indicamos tallas y colores</media:title>
		</media:content>
	</item>
	</channel>
</rss>
