B
B
boris tyrepharm2020-01-29 20:27:06
1C-Bitrix
boris tyrepharm, 2020-01-29 20:27:06

Is the order recalculated when the save() method is called?

I want to manually assign the total cost of the order (sometimes it may differ from the sum of the items in the order), I use API D7.
I give as an example a code fragment where the cost of the order is assigned:

$orderBx = Sale\Order::loadByAccountNumber(1000);
$myFullPrice = 15000; // для примера
$orderBx->setFieldNoDemand('PRICE', $myFullPrice);
$result = $orderBx->save();


The "Order Amount" parameter, which is equal to the value of $myFullPrice, is not always assigned, but is automatically recalculated based on the sum of all commodity items.
Perhaps there are other methods that indirectly cause the recalculation of the order?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail, 2020-01-30
@RuComMarket

If you need to change the amount of the order, it is best to specify the conditions in the rules
Marketing -> trade marketing -> rules for working with the basket

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question