Fixing bug where quote revisions would not set the user, fixing quotes not showing up if they don't have a valid user
This commit is contained in:
parent
e11013bd9f
commit
2459df569e
|
|
@ -91,7 +91,7 @@ func (q ExpiringSoonQuoteRowWrapper) GetUsername() string {
|
|||
if q.Username.Valid {
|
||||
return q.Username.String
|
||||
}
|
||||
return "Unknown"
|
||||
return "-"
|
||||
}
|
||||
func (q ExpiringSoonQuoteRowWrapper) GetUserEmail() string {
|
||||
if q.UserEmail.Valid {
|
||||
|
|
@ -115,7 +115,7 @@ func (q RecentlyExpiredQuoteRowWrapper) GetUsername() string {
|
|||
if q.Username.Valid {
|
||||
return q.Username.String
|
||||
}
|
||||
return "Unknown"
|
||||
return "-"
|
||||
}
|
||||
func (q RecentlyExpiredQuoteRowWrapper) GetUserEmail() string {
|
||||
if q.UserEmail.Valid {
|
||||
|
|
@ -141,7 +141,7 @@ func (q ExpiringSoonQuoteOnDayRowWrapper) GetUsername() string {
|
|||
if q.Username.Valid {
|
||||
return q.Username.String
|
||||
}
|
||||
return "Unknown"
|
||||
return "-"
|
||||
}
|
||||
func (q ExpiringSoonQuoteOnDayRowWrapper) GetUserEmail() string {
|
||||
if q.UserEmail.Valid {
|
||||
|
|
|
|||
|
|
@ -540,6 +540,10 @@ ENDINSTRUCTIONS;
|
|||
$number_of_revisions = $this->Document->Quote->findCount('Quote.enquiry_id ='. $enquiryid);
|
||||
$newDoc['Document']['revision'] = $number_of_revisions;
|
||||
$newDoc['Document']['type'] = 'quote';
|
||||
|
||||
// user_id for the new revision will be the current user
|
||||
$currentUser = $this->GetCurrentUser();
|
||||
$newDoc['Document']['user_id'] = $currentUser['User']['id'];
|
||||
|
||||
|
||||
$newDoc['DocPage'] = $document['DocPage'];
|
||||
|
|
|
|||
Loading…
Reference in a new issue