code: private function addDiscountDetails(array &$details, Model\SaleAdjustmentInterface $discount)
      {
          $discountResult = $discount->getResult();
  
          $details['L_PAYMENTREQUEST_0_NAME' . $this->line] = $discount->getDesignation();
          $details['L_PAYMENTREQUEST_0_AMT' . $this->line] = '-' . $this->format($discountResult->getTotal());
          //$details['L_PAYMENTREQUEST_0_TAXAMT' . $this->line] = '-' . $this->format($discountResult->getTax());
  
          $this->line++;
  
          return -$discountResult->getTotal();
      }
docs: Adds the discount details.
  
  @param array                         $details
  @param Model\SaleAdjustmentInterface $discount
  
  @return float