public function collect(\Magento\Sales\Model\Order\Invoice $invoice)
 {
     parent::collect($invoice);
     $orderId = $invoice->getOrderId();
     $found = $this->repoPartialSale->getById($orderId);
     if ($found) {
         $partial = $found->getPartialAmount();
         $partialBase = $found->getBasePartialAmount();
         $grand = $invoice->getGrandTotal();
         $grandBase = $invoice->getBaseGrandTotal();
         $grandFixed = $grand - $partial;
         $grandFixedBase = $grandBase - $partialBase;
         $invoice->setGrandTotal($grandFixed);
         $invoice->setBaseGrandTotal($grandFixedBase);
         $invoice->setData(Cfg::CODE_TOTAL_PARTIAL_AMOUNT, $partial);
         $invoice->setData(Cfg::CODE_TOTAL_PARTIAL_AMOUNT_BASE, $partialBase);
     }
     return $this;
 }