fixed typo

This commit is contained in:
Glenn Hermans 2021-08-19 23:14:48 +02:00 committed by GitHub
parent e4f7c8bb77
commit 18dcaf5763
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -261,11 +261,11 @@ class Order extends Model implements OrderContract
*/
public function canCancel(): bool
{
if ($this->status == 'cashondelivery' && core()->getConfigData('sales.paymentmethods.cashondelivery.generate_invoice')) {
if ($this->payment->method == 'cashondelivery' && core()->getConfigData('sales.paymentmethods.cashondelivery.generate_invoice')) {
return false;
}
if ($this->status == 'moneytransfer' && core()->getConfigData('sales.paymentmethods.moneytransfer.generate_invoice')) {
if ($this->payment->method == 'moneytransfer' && core()->getConfigData('sales.paymentmethods.moneytransfer.generate_invoice')) {
return false;
}