瀏覽代碼

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 );


Loading…
取消
儲存