D
D
Denis2021-02-13 16:59:42
1C
Denis, 2021-02-13 16:59:42

How to check object property (boolean) added via extension in common module?

Good afternoon. I'm trying to redefine a function in a shared module via an extension. In principle, simply replacing the function with the desired one through & instead of everything works out. But in order for the main function to remain working, I thought that it was necessary to create an additional attribute with the Boolean type for the Document and, already when placing the Jackdaw in the attribute, replace the function with another one from the extension.

The question is how to get and check the attribute of the object (boolean) in the general module in order to fulfill the condition

&Вместо("ДобавитьПозицииЧекаПоДокументуРасчетов")
Функция Расш1_ДобавитьПозицииЧекаПоДокументуРасчетов(ДокументРасчетов, ОбщиеПараметры, ТекСтрока, СуммаПлатежа, НомерСтрокиТовара)
  
  РекПолнаяОплата =   //КАК ЗАПРОСИТЬ РЕКВИЗИТ У ОБЪЕКТА?????
  
  Если РекПолнаяОплата = истина Тогда 
    
    //  Сдесь метод если реквизит = истина
    
  Иначе    
    //  Сдесь стандартная метод если реквизит = ложь

    Результат = ПродолжитьВызов(ДокументРасчетов, ОбщиеПараметры, ТекСтрока, СуммаПлатежа, НомерСтрокиТовара);
    Возврат Результат;
    
  КонецЕсли;
    
КонецФункции

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Vodakov, 2021-02-13
@WaterSmith

Well, this prop must come to the function with parameters. For example, if the Document of Settlements parameter contains the document to which you added the details, then you need to check this way, through the dot: Document of Settlements.FullPayment

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question