Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .docker-composerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# export COMPOSE_FILE=docker-compose.yml:docker-compose.pgsql.yml:docker-compose.dev.yml:docker-compose.owaspzap.yml
# export COMPOSE_FILE=docker-compose.yml:docker-compose.mysql.yml:docker-compose.dev.yml
export COMPOSE_FILE=docker-compose.yml:docker-compose.pgsql.yml:docker-compose.dev.yml
# export COMPOSE_FILE=docker-compose.yml:docker-compose.pgsql.yml
# export IMAGE_NAME=nanasess/ec-cube2-php
# export TAG=5.4-apache-2.13.5
export TAG=8.4-apache
4 changes: 1 addition & 3 deletions data/Smarty/templates/admin/order/edit.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -424,12 +424,10 @@
</td>
<!--{assign var=price value="`$arrForm.price.value[$product_index]`"}-->
<!--{assign var=quantity value="`$arrForm.quantity.value[$product_index]`"}-->
<!--{assign var=tax_rate value="`$arrForm.tax_rate.value[$product_index]`"}-->
<!--{assign var=tax_rule value="`$arrForm.tax_rule.value[$product_index]`"}-->
<input type="hidden" name="tax_rule[<!--{$product_index}-->]" value="<!--{$arrForm.tax_rule.value[$product_index]|h}-->" id="tax_rule_<!--{$product_index}-->" />

<td class="right">
<!--{$price|sfCalcIncTax:$tax_rate:$tax_rule|n2s}--> 円<br />
<!--{$arrForm.price_inctax.value[$product_index]|n2s}--> 円<br />
<!--{assign var=key value="tax_rate"}-->
<span class="attention"><!--{$arrErr[$key][$product_index]}--></span>
税率<input type="text" name="<!--{$key}-->[<!--{$product_index}-->]" value="<!--{$arrForm[$key].value[$product_index]|h}-->" size="3" class="box3" maxlength="<!--{$arrForm[$key].length}-->" style="<!--{$arrErr[$key][$product_index]|sfGetErrorColor}-->" id="<!--{$key}-->_<!--{$product_index}-->" />%
Expand Down
16 changes: 12 additions & 4 deletions data/class/SC_FormParam.php
Original file line number Diff line number Diff line change
Expand Up @@ -434,19 +434,27 @@
// キー名と一致した値を返す
public function getValue($keyname, $default = '')
{
$ret = null;
if (in_array($keyname, $this->keyname)) {
$ret = isset($this->arrValue[$keyname]) ? $this->arrValue[$keyname] : $this->arrDefault[$keyname];
if (!in_array($keyname, $this->keyname)) {
throw new Exception('定義されていない $keyname: ' . var_export($keyname, true));

Check warning on line 438 in data/class/SC_FormParam.php

View check run for this annotation

Codecov / codecov/patch

data/class/SC_FormParam.php#L438

Added line #L438 was not covered by tests
}

// 意図的に NULL をセットしているケースを考慮し、isset() を使わない。
$ret = array_key_exists($keyname, $this->arrValue) ? $this->arrValue[$keyname] : $this->arrDefault[$keyname];

if (is_array($ret)) {
foreach ($ret as &$value) {
if (SC_Utils_Ex::isBlank($value)) {
// 多次元配列の場合、手出ししない。(PHP8 不具合の応急対応。)
if (is_array($value)) {
// nop
}
elseif (SC_Utils_Ex::isBlank($value)) {
// FIXME: 上で取得している $this->arrDefault を上書きしている。不適切だと思うが影響が大きそうなので対応保留した。
$value = $default;
}
}
} else {
if (SC_Utils_Ex::isBlank($ret)) {
// FIXME: 上で取得している $this->arrDefault を上書きしている。不適切だと思うが影響が大きそうなので対応保留した。
$ret = $default;
}
}
Expand Down
15 changes: 7 additions & 8 deletions data/class/helper/SC_Helper_DB.php
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,13 @@ public function sfGetRootId()
public static function sfGetRollbackPoint($order_id, $use_point, $add_point, $order_status)
{
$objQuery = SC_Query_Ex::getSingletonInstance();
$arrRet = $objQuery->getRow('customer_id', 'dtb_order', 'order_id = ?', [$order_id]);
if (isset($arrRet['customer_id']) && $arrRet['customer_id'] >= 1) {
$arrRet = $objQuery->getRow('point', 'dtb_customer', 'customer_id = ?', [$arrRet['customer_id']]);
$point = $arrRet['point'];
$rollback_point = $arrRet['point'];

$customer_id = (int) $objQuery->get('customer_id', 'dtb_order', 'order_id = ?', array($order_id));
$rollback_point = 0;
$point = 0;
if ($customer_id >= 1) {
$point = (int) $objQuery->get('point', 'dtb_customer', 'customer_id = ?', array($customer_id));
$rollback_point = $point;

// 対応状況がポイント利用対象の場合、使用ポイント分を戻す
if (SC_Helper_Purchase_Ex::isUsePoint($order_status)) {
Expand All @@ -352,9 +354,6 @@ public static function sfGetRollbackPoint($order_id, $use_point, $add_point, $or
if (SC_Helper_Purchase_Ex::isAddPoint($order_status)) {
$rollback_point -= $add_point;
}
} else {
$rollback_point = '';
$point = '';
}

return [$point, $rollback_point];
Expand Down
Loading
Loading