protected override void newDoc(HeadEntity head)
 {
     List<ItemEntity> items = head.Items;
     foreach (ItemEntity itemEntity in items)
     {
         MasterDataIdentity id = itemEntity.GLAccount;
         if (id != null)
         {
             DocumentIndexItem item;
             if (!_list.TryGetValue(id, out item))
             {
                 item = new DocumentIndexItemWithBalance(_coreDriver, id,
                         MasterDataType.BUSINESS_AREA);
                 _list.Add(id, item);
             }
             // add document
             item.addDoc(head);
             // add amount
             CurrencyAmount amount = itemEntity.Amount;
             if (itemEntity.CdIndicator == CreditDebitIndicator.CREDIT)
             {
                 amount.Negate();
             }
             item.addAmount(head.MonthID, amount);
         }
     }
 }
        protected override void newDoc(HeadEntity head)
        {
            List <ItemEntity> items = head.Items;

            foreach (ItemEntity itemEntity in items)
            {
                MasterDataIdentity id = itemEntity.GLAccount;
                if (id != null)
                {
                    DocumentIndexItem item;
                    if (!_list.TryGetValue(id, out item))
                    {
                        item = new DocumentIndexItemWithBalance(_coreDriver, id,
                                                                MasterDataType.BUSINESS_AREA);
                        _list.Add(id, item);
                    }
                    // add document
                    item.addDoc(head);
                    // add amount
                    CurrencyAmount amount = itemEntity.Amount;
                    if (itemEntity.CdIndicator == CreditDebitIndicator.CREDIT)
                    {
                        amount.Negate();
                    }
                    item.addAmount(head.MonthID, amount);
                }
            }
        }