Skip to content

Commit 6efe8a7

Browse files
committed
Add fuel subsidy to invoices
1 parent 0c59998 commit 6efe8a7

File tree

5 files changed

+23
-9
lines changed

5 files changed

+23
-9
lines changed

DatilClientLibrary/DatilClientLibrary.csproj

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
<OutputType>Library</OutputType>
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>DatilClientLibrary</RootNamespace>
11-
<AssemblyName>DatilClientLibrary-1.1.3-alpha</AssemblyName>
12-
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
11+
<AssemblyName>DatilClientLibrary-1.1.4-alpha</AssemblyName>
12+
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
<TargetFrameworkProfile />
1515
</PropertyGroup>
@@ -22,7 +22,8 @@
2222
<ErrorReport>prompt</ErrorReport>
2323
<WarningLevel>4</WarningLevel>
2424
<UseVSHostingProcess>false</UseVSHostingProcess>
25-
<DocumentationFile>bin\Debug\DatilClientLibrary-1.1.3-alpha.xml</DocumentationFile>
25+
<DocumentationFile>bin\Debug\DatilClientLibrary-1.1.4-alpha.xml</DocumentationFile>
26+
<Prefer32Bit>false</Prefer32Bit>
2627
</PropertyGroup>
2728
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
2829
<DebugType>pdbonly</DebugType>
@@ -31,7 +32,11 @@
3132
<DefineConstants>TRACE</DefineConstants>
3233
<ErrorReport>prompt</ErrorReport>
3334
<WarningLevel>4</WarningLevel>
34-
<DocumentationFile>bin\Release\DatilClientLibrary-1.1.3-alpha.XML</DocumentationFile>
35+
<DocumentationFile>bin\Release\DatilClientLibrary-1.1.4-alpha.xml</DocumentationFile>
36+
<Prefer32Bit>false</Prefer32Bit>
37+
</PropertyGroup>
38+
<PropertyGroup>
39+
<StartupObject />
3540
</PropertyGroup>
3641
<ItemGroup>
3742
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">

DatilClientLibrary/Item.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ public string CodigoAuxiliar
4141
}
4242
}
4343

44+
/// <summary>Precio sin subsidio</summary>
45+
public double? PrecioSinSubsidio { get; set; }
46+
4447
/// <summary>Descripción del ítem</summary>
4548
public string Descripcion { get; set; }
4649

DatilClientLibrary/TotalesFactura.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ public class TotalesFactura
2929
/// <summary>Listado de impuestos, no necesita incluir tarifa.</summary>
3030
public List<Impuesto> Impuestos { get; set; }
3131

32+
/// <summary>Valor total de subsidio</summary>
33+
public double? TotalSubsidio { get; set; }
34+
3235
/// <summary>Construir totales de una factura</summary>
3336
public TotalesFactura(double TotalSinImpuestos,
3437
double ImporteTotal,

EjemploCSharp/EjemploCSharp.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
<WarningLevel>4</WarningLevel>
5050
</PropertyGroup>
5151
<ItemGroup>
52-
<Reference Include="DatilClientLibrary-1.1.2-alpha">
53-
<HintPath>..\DatilClientLibrary\bin\Release\DatilClientLibrary-1.1.2-alpha.dll</HintPath>
52+
<Reference Include="DatilClientLibrary-1.1.4-alpha">
53+
<HintPath>..\DatilClientLibrary\bin\Release\DatilClientLibrary-1.1.4-alpha.dll</HintPath>
5454
</Reference>
5555
<Reference Include="Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
5656
<HintPath>..\packages\Newtonsoft.Json.7.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>

EjemploCSharp/FacturaEjemplo.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
using DatilClientLibrary;
77
using Newtonsoft.Json.Linq;
88
using Newtonsoft.Json;
9-
using Newtonsoft.Json.Serialization.ContractResolverExtentions;
109

1110
namespace EjemploCSharp
1211
{
@@ -39,6 +38,7 @@ static void Main(string[] args)
3938
// Detalle de la factura y sus impuestos.
4039
var items = new List<Item>();
4140
Item item = new Item("ZNC","050","Zanahoria granel 50 Kg.",622.0, 7.01,4360.22,0.0);
41+
item.PrecioSinSubsidio = 600.0;
4242
var detallesAdicionales = new Dictionary<string, string>();
4343
detallesAdicionales.Add("Peso", "5000"); // agregar más detalles al item de ser necesario
4444
item.DetallesAdicionales = detallesAdicionales;
@@ -49,7 +49,8 @@ static void Main(string[] args)
4949

5050
// Total de la factura con sus impuestos.
5151
var totales = new TotalesFactura(4359.54, 4882.68,0.0, 0.0);
52-
var impuestosDeTotal = new List<Impuesto>();
52+
totales.TotalSubsidio = 22.00;
53+
var impuestosDeTotal = new List<Impuesto>();
5354
impuestosDeTotal.Add(new Impuesto("2","0", 0.0,0.0));
5455
impuestosDeTotal.Add(new Impuesto("2", "2", 4359.54, 523.14)); // agregar más impuestos a la lista de ser necesario.
5556
totales.Impuestos = impuestosDeTotal;
@@ -63,11 +64,13 @@ de periódicos y/ o revistas.
6364
var retenciones = new List<RetencionFactura>();
6465
RetencionFactura retencion = new RetencionFactura("4", "327", 0.20, 0.13);
6566
retenciones.Add(retencion);
67+
RetencionFactura retencion2 = new RetencionFactura("4", "327", 0.20, 0.13);
68+
retenciones.Add(retencion2);
6669

6770
// Crear factura
6871
Factura factura = new Factura();
6972
// Cabecera
70-
factura.Secuencial = "610";
73+
factura.Secuencial = "1612";
7174
factura.Moneda = "USD";
7275

7376
DateTime today = DateTime.Today;

0 commit comments

Comments
 (0)