Table of Contents

Class DoVO

Namespace
PHCBusinessLayer
Assembly
PHCBusinessLayer.dll

GeneralLedgerEntries (Movimentos contabilísticos)

[AttTable("Do", 20211130)]
[AttTableVOInfo(typeof(DoAttInfo))]
[AttTableProducts(new Products[] { Products.Accounting })]
[AttTableOrderBy(OrderFields = "case when do.state = 1 \r\n\t\t                            then period + docnumber*-1 \r\n\t\t                            else -999999 end\r\n\t                          ,case when do.state = 3 or do.state =2 \r\n\t\t                            then period + docnumber \r\n\t\t                            else -999999 end", COrderType = "D,D")]
[AttTableFlags(new TableFlags[] { TableFlags.MasterEntity, TableFlags.TableForJorge, TableFlags.FullTextSearchable, TableFlags.MandatorySaveLog, TableFlags.AddOnNotDeployable, TableFlags.MandatoryUseImgOnLog, TableFlags.NotUseHashTag })]
public class DoVO : BusinessVO, IBaseSerialization, ICloneVO, ICloneable, IChange, IParent, IGenericVO
Inheritance
DoVO

Properties

DcVO

Documents (DC)

[AttExternalCollection(typeof(DcVO), new string[] { "[DC].[docid]", "[Do].[documentid]", "[DC].[year]", "[Do].[year]" })]
public DcVO DcVO { get; }

Property Value

DcVO

DiVO

Journals

[AttExternalCollection(typeof(DiVO), new string[] { "[Di].[id]", "[Do].[journalid]", "[Di].[year]", "[Do].[year]" })]
public DiVO DiVO { get; }

Property Value

DiVO

DoHashVO

Hashs of GeneralLedgerEntries (Do) to check if exists duplicated dos

[AttExternalCollection(typeof(DoHashVO), new string[] { "[DoHash].[dostamp]", "[Do].[dostamp]" })]
public DoHashVO DoHashVO { get; }

Property Value

DoHashVO

GetFieldStampName

Use only field name without table name

public override string GetFieldStampName { get; }

Property Value

string

GetStampValue

public override string GetStampValue { get; }

Property Value

string

PcyVO

Accounting years

[AttExternalCollection(typeof(PcyVO), new string[] { "[PCY].[year]", "[Do].[year]" })]
public PcyVO PcyVO { get; }

Property Value

PcyVO

dcstamp

[AttVirtualField]
[AttHidden]
public string dcstamp { get; set; }

Property Value

string

distamp

[AttVirtualField]
[AttHidden]
public string distamp { get; set; }

Property Value

string

docid

[AttLenght(4)]
[AttFieldType(AttFieldType.InputTypes.integer)]
public int docid { get; set; }

Property Value

int

docnumber

Record ID

[AttPrimaryKey]
[AttHidden]
[AttLenght(10)]
[AttMandatory]
[AttFieldType(AttFieldType.InputTypes.integer, new AttFieldType.FieldFlags[] { AttFieldType.FieldFlags.isReadOnly })]
public decimal docnumber { get; set; }

Property Value

decimal

docstatedescription

[AttVirtualField]
public string docstatedescription { get; set; }

Property Value

string

donedate

DateStamp when record was finished

[AttFieldType(AttFieldType.InputTypes.date)]
[AttHidden]
public DateTime donedate { get; set; }

Property Value

DateTime

donehour

TimeStamp when record was finished

[AttLenght(8)]
[AttFieldType(AttFieldType.InputTypes.time)]
[AttHidden]
public string donehour { get; set; }

Property Value

string

dostamp

Single registration field

[AttLenght(25)]
public string dostamp { get; set; }

Property Value

string

mls

[AttCollection(typeof(MlVO))]
public List<MlVO> mls { get; set; }

Property Value

List<MlVO>

oristamp

key to document of origin - only by integration

[AttLenght(25)]
[AttIndex(new string[] { "oritable", "oristamp" }, new OrderTypes[] { OrderTypes.Ascending, OrderTypes.Descending })]
public string oristamp { get; set; }

Property Value

string

oritable

[AttLenght(25)]
public string oritable { get; set; }

Property Value

string

revoked

Identifies whether the movement is cancelled. Redundant because of the enum DocState, but needed for the attlist that don´t support virtual fields

[AttFieldType(AttFieldType.InputTypes.boolean)]
[AttList]
public bool revoked { get; set; }

Property Value

bool

revoked_text

Cancelled text.

[AttVirtualField]
public string revoked_text { get; }

Property Value

string

Remarks

Text to be displayed if the document is canceled.

Virtual field.

state

Document State (Draft, Done, Revoked)

[AttHidden]
public int state { get; set; }

Property Value

int

thirdpartylabel

[AttVirtualField]
public string thirdpartylabel { get; set; }

Property Value

string

thirdpartystamp

customer or supplier unique id

[AttLenght(25)]
public string thirdpartystamp { get; set; }

Property Value

string

transactiondocid

ID of the suporting document

[AttLenght(50)]
[AttList(Inactive = true)]
public string transactiondocid { get; set; }

Property Value

string

transactionid

[AttVirtualField(typeof(DoAttInfo))]
[AttLogInfo(3)]
public string transactionid { get; set; }

Property Value

string

Methods

GetSeriesValue()

public override decimal GetSeriesValue()

Returns

decimal

SetStampValue(string)

public override void SetStampValue(string stampID)

Parameters

Nome Tipo Descrição
stampID string

Explicit Interface Implementations

adate

Accounting Date

[AttMandatory]
[AttLogInfo(2)]
[AttFieldType(new AttFieldType.FieldFlags[] { AttFieldType.FieldFlags.syncOnChange })]
[AttList]
DateTime adate { get; set; }

Returns

DateTime

customerid

Customer ID

[AttLenght(50)]
string customerid { get; set; }

Returns

string

description

Description of the movement

[AttFieldType(AttFieldType.InputTypes.memo)]
[AttList(Inactive = true)]
string description { get; set; }

Returns

string

docarchivalnumber

ID: Journal + Period + DocNumber

[AttPrimaryKey]
[AttLenght(30)]
[AttMandatory]
[AttFieldType(new AttFieldType.FieldFlags[] { AttFieldType.FieldFlags.isReadOnly })]
[AttList]
string docarchivalnumber { get; set; }

Returns

string

doctype

Identifies whether the movement was imported or not.

[AttMandatory]
DoBiz.DocType doctype { get; set; }

Returns

DoBiz.DocType

documentdescription

Description of the document type (DC)

[AttMandatory]
[AttFieldType(AttFieldType.InputTypes.memo, new AttFieldType.FieldFlags[] { AttFieldType.FieldFlags.syncOnChange })]
[AttList]
string documentdescription { get; set; }

Returns

string

documentid

Id of the accounting document (DC)

[AttLenght(6)]
[AttMandatory]
[AttForeignKey(CanDuplicate = true, ForeignType = typeof(DcVO), HiddenField = false)]
[AttFieldType(AttFieldType.InputTypes.integer)]
[AttMinValue(0)]
decimal documentid { get; set; }

Returns

decimal

draftRecord

[AttVirtualField]
[AttHidden]
bool draftRecord { get; set; }

Returns

bool

journaldescription

Description of the journal (DI)

[AttLenght(200)]
[AttMandatory]
[AttFieldType(AttFieldType.InputTypes.string, new AttFieldType.FieldFlags[] { AttFieldType.FieldFlags.syncOnChange })]
[AttLogInfo(0)]
[AttList]
string journaldescription { get; set; }

Returns

string

journalid

Journal code (DI).

[AttPrimaryKey]
[AttForeignKey(CanDuplicate = true, ForeignType = typeof(DiVO), HiddenField = false)]
[AttLenght(6)]
[AttMandatory]
[AttFieldType(AttFieldType.InputTypes.integer)]
[AttMinValue(0)]
decimal journalid { get; set; }

Returns

decimal

period

Month of the document - 0 to 16.

[AttLenght(4)]
[AttPrimaryKey]
[AttFieldType(new AttFieldType.FieldFlags[] { AttFieldType.FieldFlags.isReadOnly })]
int period { get; set; }

Returns

int

supplierid

Supplier ID

[AttLenght(50)]
string supplierid { get; set; }

Returns

string

taxid

customer or supplier NIF

[AttLenght(20)]
string taxid { get; set; }

Returns

string

thirdparty

Third Party (terceiros - customer or supplier)

[AttMandatory]
DoBiz.ThirdPartyEnum thirdparty { get; set; }

Returns

DoBiz.ThirdPartyEnum

thirdpartyestab

customer or supplier Estab

[AttLenght(6)]
[AttFieldType(AttFieldType.InputTypes.integer)]
int thirdpartyestab { get; set; }

Returns

int

thirdpartyname

customer or supplier name

[AttLenght(100)]
string thirdpartyname { get; set; }

Returns

string

thirdpartyno

customer or supplier id

[AttLenght(10)]
decimal thirdpartyno { get; set; }

Returns

decimal

totalcredit

Total Credit

[AttLenght(19, 6)]
[AttFieldType(AttFieldType.InputTypes.currency, new AttFieldType.FieldFlags[] { AttFieldType.FieldFlags.isReadOnly })]
[AttList]
decimal totalcredit { get; set; }

Returns

decimal

Remarks

Lenght of 19, where the units are 12 and decimals are 6.

totaldebit

Total Debit

[AttLenght(19, 6)]
[AttFieldType(AttFieldType.InputTypes.currency, new AttFieldType.FieldFlags[] { AttFieldType.FieldFlags.isReadOnly })]
[AttList]
decimal totaldebit { get; set; }

Returns

decimal

Remarks

Lenght of 19, where the units are 12 and decimals are 6.

transactiondate

Document date

[AttMandatory]
[AttFieldType(new AttFieldType.FieldFlags[] { AttFieldType.FieldFlags.syncOnChange })]
[AttList(Inactive = true)]
DateTime transactiondate { get; set; }

Returns

DateTime

transactiontype

Type for SAF-T

[AttLenght(10)]
[AttMandatory]
string transactiontype { get; set; }

Returns

string

year

Year of Document (PCY).

[AttPrimaryKey]
[AttForeignKey(ForeignType = typeof(PcyVO), HiddenField = false)]
[AttLogInfo(1)]
[AttDocType(typeof(PcyVO))]
[AttList(Hidden = true)]
[AttMandatory]
[AttLenght(4)]
[AttFieldType(AttFieldType.InputTypes.integer, new AttFieldType.FieldFlags[] { AttFieldType.FieldFlags.isReadOnly })]
[AttIndex(new string[] { "year" }, new string[] { "dostamp", "journalid", "documentid", "ousrdata", "ousrhora" })]
int year { get; set; }

Returns

int