Показать сообщение отдельно
Старый 27.01.2011, 15:17   #13  
greenfin is offline
greenfin
Участник
 
19 / 12 (1) ++
Регистрация: 12.03.2009
Адрес: Ижевск
Уточнил. Изначально был код, который выложил Ivanhoe. Но в данном случае у нас возникает ошибка, из-за которой задан вопрос. Для того что бы Система вела согласно хелпа были внесены следующие изменения в данном коде и код выглядит так:
X++:
LedgerAccount accountOperations()
{
    if (! cacheAccountOperations)
    {
        if (prodBOM.prodTable().ProdPostingType   == ProdPostingType::ProdGroup)
        {
            cacheAccountOperations = ProdGroup::find(prodBOM.prodTable().ProdGroupId).AccountIssueOffset;
            if (! cacheAccountOperations)
                cacheAccountOperations =
InventPosting::item(InventAccountType::ProdIssueOffsetAccount,prodBOM.ItemId,this.inventTable().ItemGroupId,this.inventdim());
        }
        else
            /* <SYS>
            cacheAccountOperations=
InventPosting::item(InventAccountType::ProdIssueOffsetAccount,prodBOM.ItemId,this.inventTable().ItemGroupId);
            </SYS> */
            // <GEEU>
            cacheAccountOperations=
InventPosting::item(InventAccountType::ProdIssueOffsetAccount,prodBOM.ItemId,this.inventTable().ItemGroupId,this.inventdim());
            // </GEEU>
    }

    return cacheAccountOperations;
}
Был внесен следующий кусок:
X++:
            if (! cacheAccountOperations)
                cacheAccountOperations =
InventPosting::item(InventAccountType::ProdIssueOffsetAccount,prodBOM.ItemId,this.inventTable().ItemGroupId,this.inventdim());
        }

Последний раз редактировалось greenfin; 27.01.2011 в 15:21.