1b.app
Link copied -

sometimes the order amount from the variable pulls with thousandths in the format 123.0000 instead of 123

- it was noticed that sometimes the order amount from the variable pulls with thousandths in the format 123.0000 instead of 123 , this leads to sending 2 sms instead of 1 and often customers do not correctly understand the amount.
Оригинальный вопрос доступен на версии: ru

Answers:

Ярина Integrator
Personal license
You can specify the number of digits after komi in square arms in the middle of the change, for example {|$ordersum[#0]|} - means that the number of the "sum of the process" will be rounded to tsіlih
09.09.2021, 13:01
Оригинальный комментарий доступен на версии: ru


Yarina
integrator wrote:
You can specify the number of digits after komi in square arms in the middle of the change, for example {|$ordersum[#0]|} - means that the number of the "sum of the process" will be rounded to tsіlih

Dyakuyu! I'm just wondering why in 90% of cases the system generates a round sum, and in 10% it prescribes a comma and zeros. didn't see the pattern.
09.09.2021, 14:46
Оригинальный комментарий доступен на версии: ru

and another problem is that {|$ordersum[#0]|} is formed only in the data array, and separately the [ordersum] variable behaves differently for some reason
09.09.2021, 17:26
Оригинальный комментарий доступен на версии: ru

Ярина Integrator
Personal license

Zubarev Sergey
Optium
Client wrote:
Dyakuyu! I'm just wondering why in 90% of cases the system generates a round sum, and in 10% it prescribes a comma and zeros. didn't see the pattern.

here, perhaps, the programmers can give advice.

Zubarev Sergey
Optium
Client wrote:
and another problem is that {|$ordersum[#0]|} is formed only in the data array, and separately the [ordersum] variable behaves differently for some reason

because of the different types of change. the curly temples are exactly right.
10.09.2021, 10:35
Оригинальный комментарий доступен на версии: ru

Sergey, did Yarina's solution solve your problem?
If yes, you can mark the correct answer.
10.09.2021, 17:09
Оригинальный комментарий доступен на версии: ru

no output of {|$ordersum[#0]|} variable in sms caused process to crash - this variable does not work in sms , reverted to [ordersum]. but it is still not clear why in the same stages of the process the variable is formed differently.
10.09.2021, 19:57
Оригинальный комментарий доступен на версии: ru


no output of {|$ordersum[#0]|} variable in sms caused process to crash - this variable does not work in sms , reverted to [ordersum]. but it is still not clear why in the same stages of the process the variable is formed differently.

in Smarty, you can use the number_format modifier, which sets the format for displaying the date
you can try the variable {|$ordersum|number_format:0|} (this is if rounded to integers), or {|$ordersum|number_format:2:".":","|} (2 decimal places, decimal separated by a dot, and thousands - a comma)
13.09.2021, 16:26
Оригинальный комментарий доступен на версии: ru

I'll try
13.09.2021, 17:42
Оригинальный комментарий доступен на версии: ru


Tyndyk Maxim Vadimovich
OneBox production
Administrator wrote:

no output of {|$ordersum[#0]|} variable in sms caused process to crash - this variable does not work in sms , reverted to [ordersum]. but it is still not clear why in the same stages of the process the variable is formed differently.

in Smarty, you can use the number_format modifier, which sets the format for displaying the date
you can try the variable {|$ordersum|number_format:0|} (this is if rounded to integers), or {|$ordersum|number_format:2:".":","|} (2 decimal places, decimal separated by a dot, and thousands - a comma)

your solution is working, thanks.
17.09.2021, 10:33
Оригинальный комментарий доступен на версии: 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