Uploaded image for project: 'Prestashop Core Application V1.4'
  1. Prestashop Core Application V1.4
  2. PSCFI-5220

Total with tax in invoice is wrong, when you have a reduction

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.4.7.0
    • Fix Version/s: None
    • Security Level: All-users
    • Labels:
      None

      Description

      Total with tax in invoice is wrong when you have a reduction : It subtract the reduction twice !

      The correction, in classes/PDF.php on the "invoice" method :

      replace :

      			if (!self::$orderSlip)
      			{
      				$taxDiscount = self::$order->getTaxesAverageUsed();
      				if ($taxDiscount != 0)
      					$priceBreakDown['totalWithoutTax'] -= Tools::ps_round(self::$order->total_discounts / (1 + self::$order->getTaxesAverageUsed() * 0.01), 2);
      				else
      					$priceBreakDown['totalWithoutTax'] -= self::$order->total_discounts;
      				$priceBreakDown['totalWithTax'] -= self::$order->total_discounts;
      			}
      

      by

      			if (!self::$orderSlip)
      			{
      				$taxDiscount = self::$order->getTaxesAverageUsed();
      				if ($taxDiscount != 0)
      					$priceBreakDown['totalWithoutTax'] -= Tools::ps_round(self::$order->total_discounts / (1 + self::$order->getTaxesAverageUsed() * 0.01), 2);
      				else
      					$priceBreakDown['totalWithoutTax'] -= self::$order->total_discounts;
      				// $priceBreakDown['totalWithTax'] -= self::$order->total_discounts;
      			}
      

        Attachments

          Activity

            People

            • Assignee:
              fBrignoli Franck BRIGNOLI
              Reporter:
              mrmanchot Mouleyre C├ędric
            • Votes:
              3 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: