Skip to content

Commit f311c26

Browse files
authored
Merge pull request #109 from haroflow/cte-os-cobr
CT-e OS: Adicionadas tags cobr, fat e dup.
2 parents 1e17403 + 593b9a7 commit f311c26

File tree

4 files changed

+91
-0
lines changed

4 files changed

+91
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System.Collections.Generic;
2+
using System.Xml.Serialization;
3+
using System;
4+
using CTe.CTeOSDocumento.CTe.CTeOS.Informacoes.InfCTeNormal.cobrancas;
5+
6+
namespace CTe.CTeOSDocumento.CTe.CTeOS.Informacoes.InfCTeNormal
7+
{
8+
[Serializable]
9+
public class cobr
10+
{
11+
[XmlElement("fat", Order = 1)]
12+
public fat fat { get; set; }
13+
14+
[XmlElement("dup", Order = 2)]
15+
public List<dup> dup;
16+
}
17+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
using System;
2+
using System.Xml.Serialization;
3+
using DFe.Classes;
4+
using DFe.Utils;
5+
6+
namespace CTe.CTeOSDocumento.CTe.CTeOS.Informacoes.InfCTeNormal.cobrancas
7+
{
8+
public class dup
9+
{
10+
private decimal? _vDup;
11+
public string nDup { get; set; }
12+
13+
[XmlIgnore]
14+
public DateTime? dVenc { get; set; }
15+
16+
[XmlElement(ElementName = "dVenc")]
17+
public string ProxydVenc
18+
{
19+
get
20+
{
21+
if (dVenc == null) return null;
22+
23+
return dVenc.Value.ParaDataString();
24+
}
25+
set { dVenc = Convert.ToDateTime(value); }
26+
}
27+
28+
public decimal? vDup
29+
{
30+
get { return _vDup.Arredondar(2); }
31+
set { _vDup = value.Arredondar(2); }
32+
}
33+
34+
public bool vDupSpecified { get { return vDup.HasValue; } }
35+
}
36+
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using DFe.Classes;
2+
3+
namespace CTe.CTeOSDocumento.CTe.CTeOS.Informacoes.InfCTeNormal.cobrancas
4+
{
5+
public class fat
6+
{
7+
private decimal? _vOrig;
8+
private decimal? _vDesc;
9+
private decimal? _vLiq;
10+
public string nFat { get; set; }
11+
12+
public decimal? vOrig
13+
{
14+
get { return _vOrig.Arredondar(2); }
15+
set { _vOrig = value.Arredondar(2); }
16+
}
17+
18+
public decimal? vDesc
19+
{
20+
get { return _vDesc.Arredondar(2); }
21+
set { _vDesc = value.Arredondar(2); }
22+
}
23+
24+
public decimal? vLiq
25+
{
26+
get { return _vLiq.Arredondar(2); }
27+
set { _vLiq = value.Arredondar(2); }
28+
}
29+
30+
31+
public bool vOrigSpecified { get { return vOrig.HasValue; } }
32+
public bool vDescSpecified { get { return vDesc.HasValue; } }
33+
public bool vLiqSpecified { get { return vLiq.HasValue; } }
34+
}
35+
}

CTe.Classes/CTeOutrosServicos/Informacoes/InfCTeOutrosServicosNormal/infCTeNormOs.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,8 @@ public class infCTeNormOs
1919

2020
[XmlElement("infCteSub")]
2121
public infCteSubOs infCteSub { get; set; }
22+
23+
[XmlElement("cobr")]
24+
public cobr cobr { get; set; }
2225
}
2326
}

0 commit comments

Comments
 (0)