Код: Выделить всё
"total": "13302",
"total_tax": "0",
Код: Выделить всё
"total": "9711",
"total_tax": "0",
Код: Выделить всё
"subtotal": "14022",
"subtotal_tax": "0",
Код: Выделить всё
37035
Код: Выделить всё
28044
Код: Выделить всё
$i = 0;
$nvCantVar = 0;
$subtotal = 0;
$subtotal_tax = 0;
$NotaVentaDetalleDTO = '';
foreach ($input['order_items'] as $orderItem) {
$i++;
$subtotal = $orderItem['subtotal'];
$subtotal_tax = $orderItem['subtotal_tax'];
$nvCantVar = $subtotal + $subtotal_tax;
}
$nvCantVar = $nvCantVar + $nvCantVar;
Подробнее здесь: https://stackoverflow.com/questions/689 ... -sums-well
Мобильная версия