Changeset 940 for trunk/Modules/Contract/Contract.php
- Timestamp:
- Aug 2, 2022, 10:07:44 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Contract/Contract.php
r916 r940 135 135 } else die('MainSubjectId not found in Subjects.'); 136 136 137 $DbResult = $this->Database->query('SELECT * FROM `Contract` ');137 $DbResult = $this->Database->query('SELECT * FROM `Contract` WHERE `Id`='.$this->ContractId); 138 138 if ($DbResult->num_rows > 0) 139 139 { … … 241 241 } else $CustomerPhone = ''; 242 242 243 $DbResult = $this->Database->query('SELECT Contact.Value ASEmail FROM User '.243 $DbResult = $this->Database->query('SELECT Email, Contact.Value AS ContactEmail FROM User '. 244 244 'LEFT JOIN Contact ON Contact.User=User.ID AND Contact.Category=4 '. 245 245 'WHERE User.Id='.$Customer['ResponsibleUser']); … … 248 248 $CustomerUser = $DbResult->fetch_assoc(); 249 249 $CustomerEmail = $CustomerUser['Email']; 250 if ($CustomerEmail == null) $CustomerEmail = ''; 250 if ($CustomerEmail == null) 251 { 252 $CustomerEmail = $CustomerUser['ContactEmail']; 253 if ($CustomerEmail == null) $CustomerEmail = ''; 254 } 251 255 } else $CustomerEmail = ''; 252 256
Note:
See TracChangeset
for help on using the changeset viewer.