insertPayment( $order->getRemainingPayment(), 'Expando objednávka - importována jako zaplacená' ); // B2B objednavka if ($this->isOrderB2B($orderXml)) { $this->orderUtil->addFlag($order, 'B2B'); } } private function isOrderB2B(\SimpleXMLElement $order): bool { $businessOrder = (string) $order->businessOrder; $totalTax = (int) $order->totalItemTax; // pokud je to business order a ma celkove dph rovno 0, tak se jedna o B2B objednavku if ($businessOrder === 'true' && $totalTax === 0) { return true; } return false; } }