Answer the question
In order to leave comments, you need to log in
1s how to specify the period in the request from the accumulation register?
Запрос.Текст =
"ВЫБРАТЬ РАЗРЕШЕННЫЕ
| КассаОстаткиОстатки.СуммаОстаток КАК СуммаОстаток,
| КассаОстатки.Период КАК Период
|ИЗ
| РегистрНакопления.КассаОстатки.Остатки ( &НачалоПериода, &КонецПериода) КАК КассаОстаткиОстатки,
| РегистрНакопления.КассаОстатки КАК КассаОстатки
|ГДЕ
| КассаОстаткиОстатки.Сотрудник = &Сотрудник
| И КассаОстаткиОстатки.ТипПлатежа = ЗНАЧЕНИЕ(ПЕРЕЧИСЛЕНИе.ТипПлатежа.Наличные)"
;
Запрос.УстановитьПараметр("Сотрудник", ПараметрыСеанса.ТекущийСотрудник);
Запрос.УстановитьПараметр("НачалоПериода", Период.ДатаНачала);
Запрос.УстановитьПараметр("КонецПериода", КонецДня(Период.ДатаОкончания));
Answer the question
In order to leave comments, you need to log in
1) You need to use a virtual turnover table and specify the period of interest in the parameters. Almost like in the question with the remainder, but you have an end date in the selection conditions section - you are lucky that there was a reduction to a boolean value and you got the result.
2) The use of a resource called "SumRemainder" in the turnover register is bad style and confuses the query reader. If you have receipts and expenses, then you need to write them in just "Amount". And if you want (why?) to store the calculated balances by day, then you do not need an accumulation register - but a register of information.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question