-
〓 『PayPayでの決済金額の66.5% 』における必要PayPay・WAONの自動計算ツール
投稿日 2025年11月11日 16:01:00 (主婦 副業)
PayPay〇%還元キャンペーンにおいて
『1回のお支払いにおけるPayPayポイントの付与率上限は「PayPayでの決済金額」の66.5%までとなります。』
の場合の計算ツールを作成しました!
〓 PayPay66.5%還元 計算ツール
商品価格と数量を入力すると、
商品合計金額・必要PayPay還元額
・必要WAON POINT・実質金額・OFF率を
自動で計算します🧮〓
※還元上限は加味しておりませんので、還元額が上限を超える場合は要注意
また、30%還元で事前に入力済みですが、還元率が変わる場合は20%など数字変更してください
① 必要PayPay決済額 = 合計金額 × 還元率 ÷ 0.665(切り上げ)
② 必要WAON POINT =(合計金額 − ①)÷ 1.5(四捨五入)
③ PayPay還元額 = 合計金額 × 還元率(切り捨て)
④ 実質金額 = ① + ② − ③
⑤ OFF率 = (1 − ④ ÷ 合計金額) × 100(切り捨て、-は削除)
(function(){
const container=document.getElementById(‘itemsContainer’);
const addBtn=document.getElementById(‘addItem’);
const calcBtn=document.getElementById(‘calcBtn’);
const clearBtn=document.getElementById(‘clearAll’);
const sumBox=document.getElementById(‘sumBox’);
const rateInput=document.getElementById(‘rate’);
const paypayVal=document.getElementById(‘paypayVal’);
const waonVal=document.getElementById(‘waonVal’);
const returnVal=document.getElementById(‘returnVal’);
const actualVal=document.getElementById(‘actualVal’);
const offVal=document.getElementById(‘offVal’);
function addRow(price=”, qty=’1′){
const row=document.createElement(‘div’);
row.className=’itemRow’;
row.style.display=’flex’;
row.style.gap=’8px’;
row.style.alignItems=’center’;
row.innerHTML=`
`;
container.appendChild(row);
row.querySelector(‘.removeBtn’).addEventListener(‘click’, ()=>{ row.remove(); recalc(); });
row.querySelector(‘.priceInput’).addEventListener(‘input’, recalc);
row.querySelector(‘.qtyInput’).addEventListener(‘input’, recalc);
}
addBtn.addEventListener(‘click’, ()=> addRow());
clearBtn.addEventListener(‘click’, ()=>{
container.innerHTML=”; addRow(); addRow(); addRow();
sumBox.textContent=’0 円’;
paypayVal.textContent=’-‘; waonVal.textContent=’-‘; returnVal.textContent=’-‘;
actualVal.textContent=’-‘; offVal.textContent=’-‘;
});
calcBtn.addEventListener(‘click’, recalc);
function parseNumber(v){const n=parseFloat(v);return isNaN(n)?0:n;}
function recalc(){
const priceInputs=container.querySelectorAll(‘.priceInput’);
const qtyInputs=container.querySelectorAll(‘.qtyInput’);
const rate=parseNumber(rateInput.value)/100;
let total=0;
priceInputs.forEach((pi,i)=>{
const p=parseNumber(pi.value);
const q=parseInt(qtyInputs[i].value)||0;
if(p>0 && q>0) total+=p*q;
});
sumBox.textContent=total.toLocaleString()+’ 円’;
if(total<=0){
paypayVal.textContent='-'; waonVal.textContent='-'; returnVal.textContent='-';
actualVal.textContent='-'; offVal.textContent='-'; return;
}
const paypay=Math.ceil((total*rate)/0.665);
const waon=Math.max(0,Math.round((total – paypay)/1.5));
const payReturn = Math.floor(total * rate);
const actual=Math.round(paypay + waon – payReturn);
let off=Math.floor((1 – (actual/total))*100);
if(off<0) off=0;
paypayVal.textContent=paypay.toLocaleString()+' 円';
waonVal.textContent=waon.toLocaleString()+' pt';
returnVal.textContent=payReturn.toLocaleString()+' 円';
actualVal.textContent=actual.toLocaleString()+' 円';
offVal.textContent=off+'%OFF';
}
addRow(); addRow(); addRow();
})();
Source: N専業主婦のお小遣い稼ぎはじめました。ew feed
最新情報
