Переглянути джерело

xdebug docker fix, bugfix manager console

master
Daniel 3 роки тому
джерело
коміт
d3069b73a4
2 змінених файлів з 11 додано та 4 видалено
  1. +1
    -1
      .docker/Dockerfile
  2. +10
    -3
      src/server/shared/ent/teamdata/TB_Shared_Ent_TeamData_Contract.php

+ 1
- 1
.docker/Dockerfile Переглянути файл

@@ -26,7 +26,7 @@ RUN apt-get install mariadb-client -y

RUN apt install nano

RUN pecl install xdebug \
RUN pecl install xdebug-3.1.5 \
&& docker-php-ext-enable xdebug \
&& echo "xdebug.mode=debug" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo "xdebug.client_host = host.docker.internal" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \


+ 10
- 3
src/server/shared/ent/teamdata/TB_Shared_Ent_TeamData_Contract.php Переглянути файл

@@ -186,12 +186,19 @@ class TB_Shared_Ent_TeamData_Contract extends Francis_Db_Row
if ( 0 < count( $appIds ) )
{
$in = str_repeat('?,', count( $appIds ) - 1 ) . '?';
$sql = "SELECT SUM( price_factor ) AS `current_total` FROM `appointment` WHERE ";
$sql = "SELECT * FROM `appointment` WHERE ";
$sql .= "id IN ( $in )";
$stmt = $dbh->prepare( $sql );
$stmt->execute( $appIds );
$rowSum = $stmt->fetch( PDO::FETCH_ASSOC );
$sumPriceFactor = $rowSum[ 'current_total' ];
$appointments = $stmt->fetchAll(PDO::FETCH_ASSOC);
$appointmentsById = [];
foreach ($appointments as $app) {
$appointmentsById[$app['id']] = $app;
}
foreach ($appIds as $appId) {
$sumPriceFactor += $appointmentsById[$appId]['price_factor'];
}
}
$contract = TB_Shared_Ent_TeamData_Contract::get( $contractId );


Завантаження…
Відмінити
Зберегти