Esempio n. 1
0
        private void parseTRANS(SieDataItem di, SieVoucher v)
        {
            if (!KONTO.ContainsKey(di.GetString(0)))
            {
                KONTO.Add(di.GetString(0), new SieAccount()
                {
                    Number = di.GetString(0)
                });
            }

            var objOffset = 0;

            if (di.RawData.Contains("{"))
            {
                objOffset = 1;
            }

            var vr = new SieVoucherRow()
            {
                Account   = KONTO[di.GetString(0)],
                Objects   = di.GetObjects(),
                Amount    = di.GetDecimal(1 + objOffset),
                RowDate   = di.GetDate(2 + objOffset).HasValue ? di.GetDate(2 + objOffset).Value : v.VoucherDate,
                Text      = di.GetString(3 + objOffset),
                Quantity  = di.GetIntNull(4 + objOffset),
                CreatedBy = di.GetString(5 + objOffset),
                Token     = di.ItemType
            };

            v.Rows.Add(vr);
        }
Esempio n. 2
0
        public SieVoucherRow ToVoucherRow()
        {
            var vr = new SieVoucherRow()
            {
                Account  = this.Account,
                Amount   = this.Amount,
                Objects  = this.Objects,
                Quantity = this.Quantity
            };

            return(vr);
        }