Skip to content

Commit

Permalink
Update msCourrier.php
Browse files Browse the repository at this point in the history
Simplification de la comparaison sur le champ deleted
  • Loading branch information
MedShake authored Feb 22, 2024
1 parent 6f9bf4b commit 80829f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion class/msCourrier.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ public function getReglementData()
$sqlImplode = msSQL::sqlGetTagsForWhereIn($porteursReglementIds, 'posteursReg');
$marqueurs = array_merge($marqueurs, $sqlImplode['execute']);

if ($factureID = msSQL::sqlUniqueChamp("SELECT COUNT(id) FROM objets_data WHERE typeID IN (" . $sqlImplode['in'] . ") AND DATE(creationDate) = DATE(:creationDate) AND TIME(creationDate) <= TIME(:creationDate) AND fromID = :fromID AND (deleted IS NULL OR deleted = '')", $marqueurs)) {
if ($factureID = msSQL::sqlUniqueChamp("SELECT COUNT(id) FROM objets_data WHERE typeID IN (" . $sqlImplode['in'] . ") AND DATE(creationDate) = DATE(:creationDate) AND TIME(creationDate) <= TIME(:creationDate) AND fromID = :fromID AND deleted != 'y'", $marqueurs)) {
$factureID = str_pad($factureID, 3, "0", STR_PAD_LEFT);
$tabRetour['factureID'] = $factureID;
$dateF = DateTime::createFromFormat('Y-m-d H:i:s', $this->_objetData['creationDate']);
Expand Down

0 comments on commit 80829f2

Please sign in to comment.