Skip to content

Commit

Permalink
Merge pull request #157 from marsante/fix-invoice
Browse files Browse the repository at this point in the history
fix: bad invoicenumber
  • Loading branch information
MedShake authored Feb 22, 2024
2 parents 6684d23 + 80829f2 commit d7e0a69
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion SHA256SUMS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
b3a127929889cdb0dc315c0cec0e6b1d705c0139ecf4b482491ea651000495e0
15c662f9c3241ae21b32d780643571b85f9ab43563fe9f5191aa2d370aeb0fe2
9 changes: 4 additions & 5 deletions class/msCourrier.php
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,11 @@ 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 id <= :objetID and fromID = :fromID ", $marqueurs)) {
$factureID=str_pad($factureID, 3, "0", STR_PAD_LEFT);
$tabRetour['factureID']=$factureID;
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']);
$tabRetour['factureNumero']=$dateF->format('Ymd').$factureID;
$tabRetour['factureNumero'] = $dateF->format('Ymd') . $factureID;
}

//règlement data
Expand Down
2 changes: 1 addition & 1 deletion upgrade/base/sqlInstall.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1270,7 +1270,7 @@ INSERT IGNORE INTO `prescriptions` (`cat`, `label`, `description`, `fromID`, `to

-- system
INSERT IGNORE INTO `system` (`name`, `groupe`, `value`) VALUES
('base', 'module', 'v8.1.0'),
('base', 'module', 'v8.1.1'),
('state', 'system', 'normal');

-- univtags_type
Expand Down
2 changes: 2 additions & 0 deletions upgrade/base/sqlUpgrade_v8.1.0_v8.1.1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-- Mise à jour n° de version
UPDATE `system` SET `value`='v8.1.1' WHERE `name`='base' and `groupe`='module';
2 changes: 1 addition & 1 deletion versionMedShakeEHR-base.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v8.1.0
v8.1.1

0 comments on commit d7e0a69

Please sign in to comment.