Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/npm_and_yarn/babel-loader-9.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
nanasess authored Feb 17, 2024
2 parents 9046e66 + 3e6cf47 commit aa53c67
Show file tree
Hide file tree
Showing 65 changed files with 3,448 additions and 2,746 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Auto-merge

on:
workflow_run:
workflows: [E2E testing for EC-CUBE]
types: [completed]

jobs:
check-and-merge:
runs-on: ubuntu-latest
if: |
github.event.workflow_run.conclusion == 'success'
permissions:
pull-requests: write
contents: write
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repository with preceding commits
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Approve PR
run: gh pr review "$PR_URL" --approve
## いきなりマージするのが怖いので、一旦自動承認(↑)だけにする
#- name: Enable auto-merge
# run: gh pr merge --merge --auto "$PR_URL"

failed:
runs-on: ubuntu-latest
if: |
github.event.workflow_run.conclusion == 'failure'
steps:
- name: failed
env:
WORKFLOW_RUN_CONTEXT: ${{ toJson(github.event.workflow_run) }}
# 失敗したときにデバッグ用に情報を出力しておく
run: |
echo "Haven't met the conditions to merge yet"
echo "$WORKFLOW_RUN_CONTEXT"
exit 1
22 changes: 10 additions & 12 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
name: E2E testing for EC-CUBE
run-name: E2E testing for EC-CUBE

on:
push:
branches:
- '*'
tags:
- '*'
paths:
- '**'
- '!*.md'
pull_request:
paths:
- '**'
- '!*.md'
workflow_run:
workflows: [CI/CD for EC-CUBE]
types: [completed]

jobs:
run-on-linux:
name: Run on Linux
runs-on: ubuntu-22.04
if: |
github.event.workflow_run.conclusion == 'success'
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -85,6 +81,8 @@ jobs:
installer:
name: Installer test
runs-on: ubuntu-22.04
if: |
github.event.workflow_run.conclusion == 'success'
strategy:
fail-fast: false
matrix:
Expand Down
22 changes: 10 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
name: CI/CD for EC-CUBE
run-name: CI/CD for EC-CUBE

on:
push:
branches:
- '*'
tags:
- '*'
paths:
- '**'
- '!*.md'
pull_request:
paths:
- '**'
- '!*.md'
workflow_run:
workflows: [PHPStan]
types: [completed]

jobs:
run-on-linux:
name: Run on Linux
runs-on: ${{ matrix.operating-system }}
if: |
github.event.workflow_run.conclusion == 'success'
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -150,6 +146,8 @@ jobs:
run-on-windows:
name: Run on Windows
runs-on: ${{ matrix.operating-system }}
if: |
github.event.workflow_run.conclusion == 'success'
strategy:
fail-fast: false
matrix:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: PHPStan
run-name: PHPStan

on:
push:
branches:
Expand All @@ -12,6 +14,8 @@ on:
paths:
- '**'
- '!*.md'
pull_request_review:
types: [submitted]

jobs:
phpstan:
Expand Down
10 changes: 5 additions & 5 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion data/Smarty/templates/default/cart/index.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
<!--{/foreach}-->
<tr>
<th colspan="5" class="alignR">合計</th>
<td class="alignR"><span class="price"><!--{$arrData[$key].total-$arrData[$key].deliv_fee|n2s|h}-->円</span></td>
<td class="alignR"><span class="price"><!--{$arrData[$key].subtotal|n2s|h}-->円</span></td>
</tr>
<!--{if $smarty.const.USE_POINT !== false}-->
<!--{if $arrData[$key].birth_point > 0}-->
Expand Down
6 changes: 3 additions & 3 deletions data/Smarty/templates/default/mail_templates/order_mail.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@

<!--{/section}-->
-------------------------------------------------
小 計 ¥<!--{$arrOrder.subtotal|n2s|default:0}--> <!--{if 0 < $arrOrder.tax}-->(うち消費税 ¥<!--{$arrOrder.tax|n2s|default:0}-->)<!--{/if}-->
小 計 ¥<!--{$arrOrder.subtotal|n2s|default:0}-->

<!--{if $arrOrder.use_point > 0}-->
値引き ¥<!--{$arrOrder.use_point*$smarty.const.POINT_VALUE+$arrOrder.discount|n2s|default:0}-->
<!--{if $arrOrder.use_point*$smarty.const.POINT_VALUE+$arrOrder.discount > 0}-->
値引き ¥<!--{($arrOrder.use_point*$smarty.const.POINT_VALUE+$arrOrder.discount)|n2s|default:0}-->
<!--{/if}-->
送 料 ¥<!--{$arrOrder.deliv_fee|n2s|default:0}-->
手数料 ¥<!--{$arrOrder.charge|n2s|default:0}-->
Expand Down
2 changes: 1 addition & 1 deletion data/Smarty/templates/default/popup_header.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=<!--{$smarty.const.CHAR_CODE}-->" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<link rel="stylesheet" href="<!--{$TPL_URLPATH}-->css/import.css" type="text/css" media="all" />
<link rel="stylesheet" href="<!--{$TPL_URLPATH}-->style.css" type="text/css" media="all" />
<script type="text/javascript" src="<!--{$smarty.const.ROOT_URLPATH}-->js/eccube.js"></script>
<title><!--{$arrSiteInfo.shop_name}-->/<!--{$subtitle|h}--></title>
<link rel="shortcut icon" href="<!--{$TPL_URLPATH}-->img/common/favicon.ico" />
Expand Down
2 changes: 1 addition & 1 deletion data/Smarty/templates/default/site_frame.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<!--{/if}-->
<link rel="shortcut icon" href="<!--{$TPL_URLPATH}-->img/common/favicon.ico" />
<link rel="icon" type="image/vnd.microsoft.icon" href="<!--{$TPL_URLPATH}-->img/common/favicon.ico" />
<link rel="stylesheet" href="<!--{$TPL_URLPATH}-->css/import.css" type="text/css" media="all" />
<link rel="stylesheet" href="<!--{$TPL_URLPATH}-->style.css" type="text/css" media="all" />
<!--{if $tpl_page_class_name === "LC_Page_Products_Detail"}-->
<link rel="stylesheet" href="<!--{$smarty.const.ROOT_URLPATH}-->js/jquery.ui/theme/jquery.ui.core.css" type="text/css" media="all" />
<link rel="stylesheet" href="<!--{$smarty.const.ROOT_URLPATH}-->js/jquery.ui/theme/jquery.ui.tooltip.css" type="text/css" media="all" />
Expand Down
2 changes: 1 addition & 1 deletion data/Smarty/templates/mobile/cart/index.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<HR>
<!--{/foreach}-->
<font color="#FF0000">
合計:<!--{$arrData[$key].total-$arrData[$key].deliv_fee|n2s}-->円<br>
合計:<!--{$arrData[$key].subtotal|n2s}-->円<br>
</font>
<br>
<!--{if $key != $smarty.const.PRODUCT_TYPE_DOWNLOAD}-->
Expand Down
6 changes: 3 additions & 3 deletions data/Smarty/templates/mobile/mail_templates/order_mail.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@

<!--{/section}-->

小 計 ¥<!--{$arrOrder.subtotal|n2s|default:0}--> <!--{if 0 < $arrOrder.tax}-->(うち消費税 ¥<!--{$arrOrder.tax|n2s|default:0}-->)<!--{/if}-->
小 計 ¥<!--{$arrOrder.subtotal|n2s|default:0}-->

<!--{if $arrOrder.use_point > 0}-->
値引き ¥<!--{$arrOrder.use_point*$smarty.const.POINT_VALUE+$arrOrder.discount|n2s|default:0}-->
<!--{if $arrOrder.use_point*$smarty.const.POINT_VALUE+$arrOrder.discount > 0}-->
値引き ¥<!--{($arrOrder.use_point*$smarty.const.POINT_VALUE+$arrOrder.discount)|n2s|default:0}-->
<!--{/if}-->
送 料 ¥<!--{$arrOrder.deliv_fee|n2s|default:0}-->
手数料 ¥<!--{$arrOrder.charge|n2s|default:0}-->
Expand Down
2 changes: 1 addition & 1 deletion data/Smarty/templates/sphone/cart/index.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
<!--▲カートの中の商品一覧ここまで -->

<div class="total_area">
<div><span class="mini">合計:</span><span class="price fb"><!--{$arrData[$key].total-$arrData[$key].deliv_fee|n2s}--> 円</span></div>
<div><span class="mini">合計:</span><span class="price fb"><!--{$arrData[$key].subtotal|n2s}--> 円</span></div>
<!--{if $smarty.const.USE_POINT !== false}-->
<!--{if $arrData[$key].birth_point > 0}-->
<div><span class="mini">お誕生月ポイント:</span> <!--{$arrData[$key].birth_point|n2s}--> Pt</div>
Expand Down
5 changes: 0 additions & 5 deletions data/class/SC_AdminView.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@

class SC_AdminView extends SC_View_Ex
{
public function __construct()
{
parent::__construct();
}

public function init()
{
parent::init();
Expand Down
12 changes: 10 additions & 2 deletions data/class/SC_CartSession.php
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,11 @@ public function addProduct($product_class_id, $quantity)
}
}

// 前頁のURLを記録しておく
/**
* 前頁のURLを記録しておく
*
* @deprecated 2.18.0 本体では呼ばれない。
*/
public function setPrevURL($url, $excludePaths = array())
{
// 前頁として記録しないページを指定する。
Expand All @@ -301,7 +305,11 @@ public function setPrevURL($url, $excludePaths = array())
}
}

// 前頁のURLを取得する
/**
* 前頁のURLを取得する
*
* @deprecated 2.18.0 本体では利用していない。
*/
public function getPrevURL()
{
return isset($_SESSION['prev_url']) ? $_SESSION['prev_url'] : '';
Expand Down
9 changes: 4 additions & 5 deletions data/class/SC_Display.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,16 @@ class SC_Display
* const('ADMIN',99);
*/

public function __construct($hasPrevURL = true)
public function __construct()
{
$this->response = new SC_Response_Ex();
if ($hasPrevURL) {
$this->setPrevURL();
}
}

/**
* @deprecated 2.18.0 本体では利用していない。
*/
public function setPrevURL()
{
// TODO SC_SiteSession で実装した方が良さげ
$objCartSess = new SC_CartSession_Ex();
$objCartSess->setPrevURL($_SERVER['REQUEST_URI']);
}
Expand Down
37 changes: 36 additions & 1 deletion data/class/SC_Fpdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ private function setShopData()
//ロゴ画像
$logo_file = PDF_TEMPLATE_REALDIR . 'logo.png';
$this->Image($logo_file, 124, 46, 40);

if (defined('INVOICE_REGISTRATION_NUM')) {
$text = '登録番号: '.INVOICE_REGISTRATION_NUM;
$this->lfText(125, 87, $text, 8);
}
}

private function setMessageData()
Expand Down Expand Up @@ -228,6 +233,8 @@ private function setOrderData()
$monetary_unit = '';
$point_unit = 'Pt';

$arrTaxableTotal = [];
$defaultTaxRule = SC_Helper_TaxRule_Ex::getTaxRule();
// 購入商品情報
for ($i = 0; $i < count($this->arrDisp['quantity']); $i++) {
// 購入数量
Expand All @@ -249,9 +256,18 @@ private function setOrderData()
$arrOrder[$i][0] .= ' * '.$this->arrDisp['classcategory_name2'][$i].' ]';
}
}

// 標準税率より低い税率は軽減税率として※を付与
if ($this->arrDisp['tax_rate'][$i] < $defaultTaxRule['tax_rate']) {
$arrOrder[$i][0] .= '';
}
$arrOrder[$i][1] = number_format($data[0]);
$arrOrder[$i][2] = number_format($data[1]).$monetary_unit;
$arrOrder[$i][3] = number_format($data[2]).$monetary_unit;
if (array_key_exists($this->arrDisp['tax_rate'][$i], $arrTaxableTotal) === false) {
$arrTaxableTotal[$this->arrDisp['tax_rate'][$i]] = 0;
}
$arrTaxableTotal[$this->arrDisp['tax_rate'][$i]] += $data[2];
}

$arrOrder[$i][0] = '';
Expand All @@ -270,18 +286,21 @@ private function setOrderData()
$arrOrder[$i][1] = '';
$arrOrder[$i][2] = '送料';
$arrOrder[$i][3] = number_format($this->arrDisp['deliv_fee']).$monetary_unit;
$arrTaxableTotal[intval($defaultTaxRule['tax_rate'])] += $this->arrDisp['deliv_fee'];

$i++;
$arrOrder[$i][0] = '';
$arrOrder[$i][1] = '';
$arrOrder[$i][2] = '手数料';
$arrOrder[$i][3] = number_format($this->arrDisp['charge']).$monetary_unit;
$arrTaxableTotal[intval($defaultTaxRule['tax_rate'])] += $this->arrDisp['charge'];

$i++;
$arrOrder[$i][0] = '';
$arrOrder[$i][1] = '';
$arrOrder[$i][2] = '値引き';
$arrOrder[$i][3] = '- '.number_format(($this->arrDisp['use_point'] * POINT_VALUE) + $this->arrDisp['discount']).$monetary_unit;
$discount_total = ($this->arrDisp['use_point'] * POINT_VALUE) + $this->arrDisp['discount'];
$arrOrder[$i][3] = '- '.number_format($discount_total).$monetary_unit;

$i++;
$arrOrder[$i][0] = '';
Expand Down Expand Up @@ -311,6 +330,22 @@ private function setOrderData()
}

$this->FancyTable($this->label_cell, $arrOrder, $this->width_cell);

$this->SetLineWidth(.3);
$this->SetFont('SJIS', '', 6);

$this->Cell(0, 0, '', 0, 1, 'C', 0, '');
// 行頭近くの場合、表示崩れがあるためもう一個字下げする
if (270 <= $this->GetY()) {
$this->Cell(0, 0, '', 0, 1, 'C', 0, '');
}
$width = array_reduce($this->width_cell, function ($n, $w) {
return $n + $w;
});
$this->SetX(20);

$message = SC_Helper_TaxRule_Ex::getTaxDetail($arrTaxableTotal, $discount_total);
$this->MultiCell($width, 4, $message, 0, 'R', '');
}

/**
Expand Down
Loading

0 comments on commit aa53c67

Please sign in to comment.