code: protected function writeInvoiceShipmentLine()
      {
          $amount = $this->invoice->getShipmentBase();
  
          if (0 === $this->compare($amount, 0)) {
              return;
          }
  
          $amount = $this->round($amount);
  
          $sale = $this->invoice->getSale();
          $date = $sale->getCreatedAt();
          $taxRule = $this->taxResolver->resolveSaleTaxRule($sale);
  
          $account = $this->getShipmentAccountNumber($taxRule, $this->invoice->getNumber());
  
          if ($this->invoice->getType() === InvoiceTypes::TYPE_CREDIT) {
              $this->writer->credit($account, (string)$amount, $date);
              $this->balance -= $amount;
          } else {
              $this->writer->debit($account, (string)$amount, $date);
              $this->balance += $amount;
          }
      }
docs: Writes the invoice's shipment line.