Показать сообщение отдельно
Старый 02.07.2009, 03:22   #8  
vanokh is offline
vanokh
Участник
 
108 / 63 (3) ++++
Регистрация: 23.10.2008
Цитата:
Сообщение от BOAL Посмотреть сообщение
Вывод какой?
Разрешить обратно для наших широт.
Да, разлепим пельмени обратно... Транзитный счет + два ваучера развалит наши отчеты, которые мы уже приспособили под операции клиент-клиент на одном ваучере, а стандартной выверкой пока не пользуемся.

Занятно, аналогичная проверка для операций поставщик-поставщик изменена в локализации - проверка из международной закомментирована, вместо нее написана другая:
X++:
ledgerJournalTrans.selectLocked(false);
        select count(RecId) from ledgerJournalTrans
        index hint NumVoucherIdx
            where ledgerJournalTrans.Voucher     == _ledgerJournalTrans.Voucher &&
                  ledgerJournalTrans.JournalNum  == _ledgerJournalTrans.JournalNum &&
                  ledgerJournalTrans.AccountType == LedgerJournalACType::Vend;
        if (ledgerJournalTrans.RecId > 1)
        {
            ok      = checkFailed("@SYS29116");
            allok   = false;
        }
    }
/* this code doesn't work correctly for SAD documents
    //
    //  When "Vendor" type is used on any Ledger Journal Transaction it can only
    //  exist once per "Voucher" series .
    //
    //  Since a "Vendor" type can be applied to either the primary or offset side
    //  of a transaction. This is both a qualifying factor and additional data to be
    //  validated. Although this only applies to "Daily" (GL) based journals it
    //  should not affect this validation.
    //
    if (_ledgerJournalTrans.AccountType       == LedgerJournalACType::Vend ||
       (_ledgerJournalTrans.OffsetAccount     &&
        _ledgerJournalTrans.OffsetAccountType == LedgerJournalACType::Vend))
    {
        ledgerJournalTrans.selectLocked(false);
        select count(RecId) from ledgerJournalTrans
        index hint NumVoucherIdx
            where ledgerJournalTrans.Voucher            == _ledgerJournalTrans.Voucher &&
                  ledgerJournalTrans.JournalNum         == _ledgerJournalTrans.JournalNum &&
                  (ledgerJournalTrans.AccountType       == LedgerJournalACType::Vend ||
                  (ledgerJournalTrans.OffsetAccount     &&
                   ledgerJournalTrans.OffsetAccountType == LedgerJournalACType::Vend));
        if (ledgerJournalTrans.RecId > 1)
        {
            ok      = checkFailed("@SYS29116");
            allok   = false;
        }
    }
*/

Последний раз редактировалось vanokh; 02.07.2009 в 03:36.