Показать сообщение отдельно
Старый 18.11.2011, 17:06   #16  
Bega is offline
Bega
Участник
Аватар для Bega
 
382 / 444 (15) +++++++
Регистрация: 18.08.2005
Адрес: Москва
Цитата:
Сообщение от lev Посмотреть сообщение
немного уточню, на вскидку понятно что и где придется допиливать, хочется узнать были ли какие либо подводные камни, и на что особо обратить внимание!
Цитата:
Сообщение от lev Посмотреть сообщение
О! Скорее всего мне это и предстоит! Сильно много убили времени на модификации?
1. В классе InventMov_Jour_TransferReceipt метод mustBeBookedFinancially() должен возвращать false.
2. В классе InventMov_Jour_Transfer создать метод, возвращающий расход это или приход с учетом сторно:
X++:
private boolean isIssue(boolean _checkStorno = true)
{
    boolean issue = (this.transQty() <= 0);
    ;
    if (_checkStorno&&inventJournalTrans.Storno_RU)
    {
        issue = !issue;
    }

    return issue;
}
3. В классе InventMov_Jour_Transfer изменить метод accountOperations():
X++:
LedgerAccount accountOperations()
{
    if (! cacheAccountOperations)
    {
        if (this.isIssue())
            cacheAccountOperations = InventPosting::item(InventAccountType::InventReceipt,this.itemId(),this.inventTable().ItemGroupId, this.inventDim());
        else
            cacheAccountOperations = InventPosting::item(this.assetId() ? InventAccountType::InventIssueFixedAsset : InventAccountType::InventIssue,
                                                            this.itemId(), this.inventTable().ItemGroupId, this.inventDim()) ;
    }

    return cacheAccountOperations;
}
4. В классе InventMov_Jour_Transfer изменить метод postingOperations():
X++:
LedgerPostingType postingOperations()
{
    if (this.isIssue())
        return LedgerPostingType::InventReceipt;
    else
        return (this.assetId()) ?   LedgerPostingType::InventIssueFixedAsset :
                                    LedgerPostingType::InventIssue;
}
За это сообщение автора поблагодарили: EVGL (10), CDR (3), Pustik (3), lev (10), gl00mie (3), S.Kuskov (10), Kabardian (5).