Browse Source

[global] User : affichage du nom de famille en premier

refactoring
Guillaume Bourgeois 4 years ago
parent
commit
c0af859b1e
2 changed files with 2 additions and 6 deletions
  1. +1
    -5
      backend/views/distribution/report.php
  2. +1
    -1
      common/models/Order.php

+ 1
- 5
backend/views/distribution/report.php View File

$strUser = ''; $strUser = '';


// username // username
if ($order->user) {
$strUser = $order->user->name . " " . $order->user->lastname;
} else {
$strUser = $order->username;
}
$strUser = $order->getStrUser() ;
if(strlen($order->comment_point_sale)) if(strlen($order->comment_point_sale))
{ {

+ 1
- 1
common/models/Order.php View File

public function getStrUser() public function getStrUser()
{ {
if (isset($this->user)) { if (isset($this->user)) {
return Html::encode($this->user->name . ' ' . $this->user->lastname);
return Html::encode($this->user->lastname . ' ' . $this->user->name);
} elseif (strlen($this->username)) { } elseif (strlen($this->username)) {
return Html::encode($this->username); return Html::encode($this->username);
} else { } else {

Loading…
Cancel
Save