]> git.agnieray.net Git - galette.git/commitdiff
Payment type was no longer translated
authorJohan Cwiklinski <johan@x-tnd.be>
Sat, 20 Nov 2021 15:08:27 +0000 (16:08 +0100)
committerJohan Cwiklinski <johan@x-tnd.be>
Sat, 20 Nov 2021 15:09:07 +0000 (16:09 +0100)
galette/lib/Galette/Entity/Contribution.php

index 8ef9e20c3534cfb300407e22c351e1e169d8de91..65a7576f30a2119d67c6336c73849ea6db0cb263 100644 (file)
@@ -1120,16 +1120,18 @@ class Contribution
     /**
      * Get payment type label
      *
+     * @param boolean $translated Whether to translate
+     *
      * @return string
      */
-    public function getPaymentType()
+    public function getPaymentType(bool $translated = false): string
     {
         if ($this->_payment_type === null) {
             return '-';
         }
 
         $ptype = new PaymentType($this->zdb, (int)$this->payment_type);
-        return $ptype->getName(false);
+        return $ptype->getName($translated);
     }
 
     /**
@@ -1215,7 +1217,7 @@ class Contribution
                     }
                     break;
                 case 'spayment_type':
-                    return $this->getPaymentType();
+                    return $this->getPaymentType(true);
                     break;
                 case 'model':
                     if ($this->_is_cotis === null) {