У меня возникли проблемы с классом AX2012 (класс AX2012 по умолчанию и код, никаких изменений не было сделано на нем): CustVendTransDetails
в методе calcCashDiscounts
Замена EXISTS РЕГИСТРИРУЙТЕСЬ с РЕГИСТРИРУЙТЕСЬ
Следующий запрос дает мне ошибку The select list for the INSERT statement contains fewer items than the insert list. The number of SELECT values must match the number of INSERT columns.
:
if (TaxParameters::canApplyCashDiscOnInvoice_ES())
{
insert_recordset tmpValue
(CustVendTransRefRecId, AmountMST)
select CustVendTransRefRecId
from _custVendAccountStatementIntTmpProcessing
exists join custVendTransLoc
where
custVendTransLoc.RecId == _custVendAccountStatementIntTmpProcessing.CustVendTransRefRecId
exists join firstOnly subledgerVoucherGeneralJournalEntry
where
subledgerVoucherGeneralJournalEntry.Voucher == custVendTransLoc.Voucher &&
subledgerVoucherGeneralJournalEntry.AccountingDate == custVendTransLoc.TransDate
exists join generalJournalEntry
where
generalJournalEntry.RecId == subledgerVoucherGeneralJournalEntry.GeneralJournalEntry &&
generalJournalEntry.Ledger == Ledger::current()
join AccountingCurrencyAmount from generalJournalAccountEntry
where
generalJournalAccountEntry.GeneralJournalEntry == generalJournalEntry.RecId &&
(generalJournalAccountEntry.PostingType == LedgerPostingType::CustCashDisc ||
generalJournalAccountEntry.PostingType == LedgerPostingType::VendCashDisc);
update_recordSet _custVendAccountStatementIntTmpProcessing setting
UtilizedCashDisc = tmpValue.AmountMST,
PossibleCashDisc = tmpValue.AmountMST
join tmpValue
where
tmpValue.CustVendTransRefRecId == _custVendAccountStatementIntTmpProcessing.CustVendTransRefRecId;
}
Я понимаю, почему, но я не уверен, как решить эту проблему. Будет ли проблема заменить exist join
на нормальный join
?
Замена exist join
на join
, действительно решает мою проблему, но я не уверен, какая разница в данных? Потому что это только выбор 1 поля?
Спасибо, это решить мою проблему. –