Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

テンプレートの上の乗算を直感的に。sfMultiply ではなく演算子で行う。 #1078

Merged
merged 1 commit into from
Dec 16, 2024
Merged
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
2 changes: 1 addition & 1 deletion data/Smarty/templates/admin/order/disp.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
<!--{assign var=tax_rate value="`$arrForm.tax_rate.value[$product_index]`"}-->
<!--{assign var=tax_rule value="`$arrForm.tax_rule.value[$product_index]`"}-->
<td class="right"><!--{$price|sfCalcIncTax:$tax_rate:$tax_rule|n2s}--> 円<br />(税率<!--{$tax_rate|n2s}-->%)</td>
<td class="right"><!--{$price|sfCalcIncTax:$tax_rate:$tax_rule|sfMultiply:$quantity|n2s}-->円</td>
<td class="right"><!--{($price|sfCalcIncTax:$tax_rate:$tax_rule*$quantity)|n2s}-->円</td>
</tr>
<!--{/section}-->
<tr>
Expand Down
2 changes: 1 addition & 1 deletion data/Smarty/templates/admin/order/edit.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@
<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}-->" />%
</td>
<td class="right"><!--{$price|sfCalcIncTax:$tax_rate:$tax_rule|sfMultiply:$quantity|n2s}-->円</td>
<td class="right"><!--{($price|sfCalcIncTax:$tax_rate:$tax_rule*$quantity)|n2s}-->円</td>
</tr>
<!--{/section}-->
<tr>
Expand Down
2 changes: 1 addition & 1 deletion data/Smarty/templates/default/mypage/history.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
<!--{/if}-->
</td>
<td class="alignR"><!--{$orderDetail.quantity|h}--></td>
<td class="alignR"><!--{$orderDetail.price_inctax|sfMultiply:$orderDetail.quantity|n2s}-->円</td>
<td class="alignR"><!--{($orderDetail.price_inctax*$orderDetail.quantity)|n2s}-->円</td>
</tr>
<!--{/foreach}-->
<tr>
Expand Down
2 changes: 1 addition & 1 deletion data/Smarty/templates/mobile/mypage/history.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
<!--{assign var=tax_rule value="`$orderDetail.tax_rule`"}-->
<!--{$price|sfCalcIncTax:$tax_rate:$tax_rule|n2s|h}-->円<br>
数量:<!--{$quantity|h}--><br>
小計:<!--{$price|sfCalcIncTax:$tax_rate:$tax_rule|sfMultiply:$quantity|n2s}-->円<br>
小計:<!--{($price|sfCalcIncTax:$tax_rate:$tax_rule*$quantity)|n2s}-->円<br>
<!--{/foreach}-->
<hr>
小計:<!--{$tpl_arrOrderData.subtotal|n2s}-->円<br>
Expand Down
2 changes: 1 addition & 1 deletion data/Smarty/templates/sphone/mypage/history.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
<!--{assign var=tax_rule value="`$orderDetail.tax_rule`"}-->
<ul>
<li><span class="mini">数量:</span><!--{$quantity|h}--></li>
<li class="result"><span class="mini">小計:</span><!--{$price|sfCalcIncTax:$tax_rate:$tax_rule|sfMultiply:$quantity|n2s}-->円</li>
<li class="result"><span class="mini">小計:</span><!--{($price|sfCalcIncTax:$tax_rate:$tax_rule*$quantity)|n2s}-->円</li>
</ul>
</div>
</div>
Expand Down
6 changes: 5 additions & 1 deletion data/class/util/SC_Utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,11 @@ public static function getHash2Array($hash, $requires = [])
return $array;
}

/* かけ算をする(Smarty用) */
/**
* かけ算をする(Smarty用)
*
* @deprecated 本体で使用されていないため非推奨
*/
public static function sfMultiply($num1, $num2)
{
return $num1 * $num2;
Expand Down
Loading