Changeset 725
- Timestamp:
- Jan 4, 2015, 11:30:15 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/Version.php
r724 r725 1 1 <?php 2 2 3 $Revision = 72 4; // Subversion revision4 $DatabaseRevision = 72 2; // SQL structure revision5 $ReleaseTime = strtotime('2015-01-0 3');3 $Revision = 725; // Subversion revision 4 $DatabaseRevision = 725; // SQL structure revision 5 $ReleaseTime = strtotime('2015-01-04'); -
trunk/Common/Setup/Update.php
r619 r725 52 52 $RevUpdate($this); 53 53 $DbRevision = $TraceItem['Revision']; 54 $this->Database->query('UPDATE `'.$this->VersionTable.'` SET `Revision`= '.$TraceItem['Revision'].' WHERE `Id`=1'); 54 $this->Database->query('UPDATE `'.$this->VersionTable.'` SET `Revision`= '. 55 $TraceItem['Revision'].' WHERE `Id`=1'); 55 56 } 56 57 return($Output); -
trunk/Common/Setup/Updates.php
r722 r725 1127 1127 { 1128 1128 $Manager->Execute('ALTER TABLE `Service` DROP `CustomerCount`;'); 1129 } 1130 1131 function UpdateTo725($Manager) 1132 { 1133 // Text column of invoices is not used. Text from invoice items is taken instead. 1134 $DbResult = $Manager->Execute('ALTER TABLE `FinanceInvoice` DROP `Text`;'); 1135 1136 $SearchText = 'Připojení k síti'; 1137 $DbResult = $Manager->Execute('SELECT * FROM `FinanceInvoiceItem` WHERE `Description` LIKE "'.$SearchText.' za období%";'); 1138 while($DbRow = $DbResult->fetch_assoc()) 1139 { 1140 $Text = trim(substr($DbRow['Description'], strlen($SearchText.' za období') + 1)); 1141 $Text = explode('-', $Text); 1142 $PeriodFrom = explode('.', trim($Text[0])); 1143 $PeriodFrom = $PeriodFrom[2].'-'.$PeriodFrom[1].'-'.$PeriodFrom[0]; 1144 $PeriodTo = explode('.', trim($Text[1])); 1145 $PeriodTo = $PeriodTo[2].'-'.$PeriodTo[1].'-'.$PeriodTo[0]; 1146 $Manager->Execute('UPDATE `FinanceInvoice` SET `PeriodFrom`="'.$PeriodFrom.'", `PeriodTo`="'.$PeriodTo.'" WHERE `Id`='.$DbRow['FinanceInvoice']); 1147 } 1148 $DbResult = $Manager->Execute('UPDATE `FinanceInvoiceItem` SET `Description` = "'.$SearchText.'" WHERE `Description` LIKE "'.$SearchText.' za období%";'); 1149 1150 $SearchText = 'Připojení k Internetu'; 1151 $DbResult = $Manager->Execute('SELECT * FROM `FinanceInvoiceItem` WHERE `Description` LIKE "'.$SearchText.' za období%";'); 1152 while($DbRow = $DbResult->fetch_assoc()) 1153 { 1154 $Text = trim(substr($DbRow['Description'], strlen($SearchText.' za období') + 1)); 1155 $Text = explode('-', $Text); 1156 $PeriodFrom = explode('.', trim($Text[0])); 1157 $PeriodFrom = $PeriodFrom[2].'-'.$PeriodFrom[1].'-'.$PeriodFrom[0]; 1158 $Text[1] = trim($Text[1]); 1159 if(strpos($Text[1], ' ') !== false) $Text[1] = substr($Text[1], 0, strpos($Text[1], ' ')); 1160 $PeriodTo = explode('.', trim($Text[1])); 1161 $PeriodTo = $PeriodTo[2].'-'.$PeriodTo[1].'-'.$PeriodTo[0]; 1162 $Manager->Execute('UPDATE `FinanceInvoice` SET `PeriodFrom`="'.$PeriodFrom.'", `PeriodTo`="'.$PeriodTo.'" WHERE `Id`='.$DbRow['FinanceInvoice']); 1163 } 1164 $DbResult = $Manager->Execute('UPDATE `FinanceInvoiceItem` SET `Description` = "'.$SearchText.'" WHERE `Description` LIKE "'.$SearchText.' za období%";'); 1129 1165 } 1130 1166 … … 1188 1224 719 => array('Revision' => 720, 'Function' => 'UpdateTo720'), 1189 1225 720 => array('Revision' => 722, 'Function' => 'UpdateTo722'), 1226 722 => array('Revision' => 725, 'Function' => 'UpdateTo725'), 1190 1227 )); 1191 1228 } -
trunk/Modules/Finance/Finance.php
r724 r725 95 95 96 96 $DbResult = $this->Database->query('SELECT * FROM `DocumentLineSequence` WHERE '. 97 97 '`DocumentLine`='.$Id.' AND `FinanceYear`='.$FinanceYear['Id']); 98 98 $Sequence = $DbResult->fetch_assoc(); 99 99 … … 104 104 105 105 $this->Database->query('UPDATE `DocumentLineSequence` SET `NextNumber` = `NextNumber` + 1 '. 106 106 'WHERE (`DocumentLine`='.$Id.') AND (`FinanceYear`='.$FinanceYear['Id'].')'); 107 107 return($Result); 108 108 }
Note:
See TracChangeset
for help on using the changeset viewer.