mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Payment edge cases
This commit is contained in:
parent
9a60e72a56
commit
091673a7ac
@ -104,6 +104,9 @@ class Payment extends BaseModel
|
||||
|
||||
public function clientPaymentDate()
|
||||
{
|
||||
if(!$this->payment_date)
|
||||
return '';
|
||||
|
||||
$date_format = DateFormat::find($this->client->getSetting('date_format_id'));
|
||||
|
||||
return $this->createClientDate($this->payment_date, $this->client->timezone()->name)->format($date_format->format);
|
||||
|
@ -32,7 +32,7 @@ trait MakesDates
|
||||
|
||||
if(is_string($utc_date))
|
||||
$utc_date = $this->convertToDateObject($utc_date);
|
||||
|
||||
|
||||
return $utc_date->setTimezone(new \DateTimeZone($timezone));
|
||||
|
||||
}
|
||||
@ -79,7 +79,7 @@ trait MakesDates
|
||||
public function formatDateTimestamp($timestamp, string $format) :string
|
||||
{
|
||||
|
||||
return Carbon::createFromTimestamp($date)->format($format);
|
||||
return Carbon::createFromTimestamp($timestamp)->format($format);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user