Skip to content

Commit

Permalink
aggiunta data nel nome delle ricevute
Browse files Browse the repository at this point in the history
  • Loading branch information
madbob committed Aug 5, 2024
1 parent d750e35 commit a3381a3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions code/app/Receipt.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@ public function getUserAttribute()
public function getNameAttribute()
{
$user = $this->user;
if ($user)
if ($user) {
$user_name = $user->printableName();
else
}
else {
$user_name = '???';
}

return sprintf('%s - %s', $user_name, $this->number);
return sprintf('%s - %s - %s', $user_name, printableDate($this->date), $this->number);
}

private function calculateTotal()
Expand Down

0 comments on commit a3381a3

Please sign in to comment.