src/Magento/Magento1/Invoice/Source.php
protected function getPaymentDateOrder()
    {
        // Take date of last payment as payment date.
        $paymentDate = null;
        foreach ($this->source->getStatusHistoryCollection() as $statusChange) {
            /** @var \Mage_Sales_Model_Order_Status_History $statusChange */
            if (!$paymentDate || $this->isPaidStatus($statusChange->getStatus())) {
                $createdAt = substr($statusChange->getCreatedAt(), 0, strlen('yyyy-mm-dd'));
                if (!$paymentDate || $createdAt < $paymentDate) {
                    $paymentDate = $createdAt;
                }
            }
        }
        return $paymentDate;
    }
protected function getPaymentDateOrder()
    {
        // Take date of last payment as payment date.
        $paymentDate = null;
        foreach ($this->source->getStatusHistoryCollection() as $statusChange) {
            /** @var \Mage_Sales_Model_Order_Status_History $statusChange */
            if (!$paymentDate || $this->isPaidStatus($statusChange->getStatus())) {
                $createdAt = substr($statusChange->getCreatedAt(), 0, strlen('yyyy-mm-dd'));
                if (!$paymentDate || $createdAt < $paymentDate) {
                    $paymentDate = $createdAt;
                }
            }
        }
        return $paymentDate;
    }
protected function getPaymentDateOrder ( ) { // Take date of last payment as payment date. $ paymentDate = null ; foreach ( $ this -> source -> getStatusHistoryCollection ( ) as $ statusChange ) { /** @var \Mage_Sales_Model_Order_Status_History $statusChange */ if ( ! $ paymentDate || $ this -> isPaidStatus ( $ statusChange -> getStatus ( ) ) ) { $ createdAt = substr ( $ statusChange -> getCreatedAt ( ) , 0 , strlen ( 'yyyy-mm-dd' ) ) ; if ( ! $ paymentDate || $ createdAt < $ paymentDate ) { $ paymentDate = $ createdAt ; } } } return $ paymentDate ; }
Returns the payment date for the order.

@return string|null
The payment date (yyyy-mm-dd) or null if the order has not been paid yet.
Returns the payment date for the order .