1b.app
Link copied -

Using if else comparison operators in Customer Report (document template)

Greetings!

There is a report, for example https://knkrd.1b.app/app/report/desiner/1/view/?filter_user_client=48&filter... 82%D1%80%D0%BE%D0%B2%D0%B0%D1%82%D1%8C

here are its settings https://knkrd.1b.app/app/report/desiner/1/

task: it is necessary that the opening and ending balances be substituted in the correct column (if the value is greater than 0, then to Debit, if less than 0, then to Credit)

As far as I understand, it is possible to implement it through comparison operators - but since we do not have a document according to the process - they do not work as usual. Please evaluate the possibility of improvement, if necessary - or help with the code.

Thank you for your time!
Original question is available on version: ru

Answers:

there are also special variables for the amounts of incoming and outgoing payments sum_payment_sumout

sum_payment_sumin

why build a bike?
14.04.2023, 23:12
Original comment available on version: ru

Мазур Віктор Вікторович
Personal license
Leave a message in this thread and the user's contacts will be shown to you


.dev

OneBox production wrote:

there are also special variables for the amounts of incoming and outgoing payments sum_payment_sumout

sum_payment_sumin

why build a bike?



it's specifically in the "correct column"

that is, if the amount is less than 0 - then to the debit column, if more than 0 - then to the credit.

Here the question is generally in conditional operators (branching). Can I use them in reports (document templates)
24.04.2023, 11:37
Original comment available on version: ru

[.dev #82]
24.04.2023, 12:06


Mazur Viktor Viktorovich
SheBo wrote:
Here the question is generally in conditional operators (branching). Is it possible to use them in reports (document templates)

you can, standard if else in smart work
24.04.2023, 14:24
Original comment available on version: ru


.dev
OneBox production wrote:

Mazur Viktor Viktorovich
SheBo wrote:
Here the question is generally in conditional operators (branching). Is it possible to use them in reports (document templates)

you can, standard if else in smart work

[.dev #82] can you please elaborate, smarty - how is it? I've tried various ways - no luck so far.
I tried, for example, as usual in the docks with variables from the list in the report:
{|if $sum_ordersum > "142809.12"|} Inbound check {|if else $sum_ordersum == "142809.12"|} test </span> {|/if|}
25.04.2023, 08:52
Original comment available on version: ru

{|if $sum_ordersum > "142809.12"|} To the management of the enterprise {|else|} test {|/if|}
25.04.2023, 11:24
Original comment available on version: ua


Валерия
Personal license

Department of Care
OneBox production wrote:
{|if $sum_ordersum > "142809.12"|} Company management {|else|} test {|/if|}

does not work ((
and tell me whether it is possible (and if possible, how exactly) to use if else conditions with row , for example, process products and payments (row:payment_cdate)?
17.07.2023, 11:33
Original comment available on version: ua


Valeria wrote:

Care Department
OneBox production wrote:
{|if $sum_ordersum > "142809.12"|} Enterprise management {|else|} test {|/if|}

does not work ((
and tell me if it is possible (and if possible, how) to use if else conditions with row , for example, process products and payments (row:payment_cdate)?

it means there is a mistake somewhere. Try contacting integrators, they will quickly set up the template you need https://1b.app/en/partner/onebox-corp/

Valeria wrote:
and tell me if it is possible (and if possible, how) to use if else conditions with row , for example, process products and payments (row:payment_cdate)?

logical constructions must work with all variables.
17.07.2023, 12:10
Original comment available on version: ru


Care Department
OneBox production wrote:

Valeria wrote:

Care Department
OneBox production wrote:
{|if $sum_ordersum > "142809.12"|} Enterprise management {|else|} test {|/if|}

does not work ((
and tell me if it is possible (and if possible, how) to use if else conditions with row , for example, process products and payments (row:payment_cdate)?

it means there is a mistake somewhere. Try contacting integrators, they will quickly set up the template you need https://1b.app/en/partner/onebox-corp/

Valeria wrote:
and tell me if it is possible (and if possible, how) to use if else conditions with row , for example, process products and payments (row:payment_cdate)?

logical constructions must work with all variables.

how to write a function for row? {|if $row:payment_cdate == "01.01.2023"|} To the management of the enterprise {|else|} test {|/if|} does not work ...
17.07.2023, 16:03
Original comment available on version: ru

not, litter - through row ifat it is impossible. But you can sort out the products from the productsArray array on smarty and make up the plate yourself (as with basketsArray in sending messages, you should know). Then there already through $e.xxx any condition can be registered. The downside of this is that you need to make up for the plate yourself and insert a new tr with td for each product
17.07.2023, 16:30
Original comment available on version: ru

Мазур Віктор Вікторович
Personal license
Leave a message in this thread and the user's contacts will be shown to you

Care Department
OneBox production wrote:
not, litter - through row ifat it is impossible. But you can sort out the products from the productsArray array on smarty and make up the plate yourself (as with basketsArray in sending messages, you should know). Then there already through $e.xxx any condition can be registered. The downside of this is that you need to make up for the plate yourself and insert a new tr with td for each product

GREAT! Thank you very much, I will try!
27.07.2023, 05:33
Original comment available on version: ru

Please join the conversation. If you have something to say - please write a comment. You will need a mobile phone and an SMS code for identification to enter. Log in and comment