<% if (typeof success !== 'undefined' && success) { %>
<% } else { %>
<% } else { %>
<% } else { %>
<% if (flashSale.lockedPrice) { %>
<% } else { %>
<% } %>
<%= success %>
<% } %>
<% if (typeof error !== 'undefined' && error) { %>
<%= error %>
<% } %>
<%
const wdp = wdpProduct;
const wdpModal = wdp ? (wdp.modal_price || 0) : 0;
const wdpIsBelow = wdp && wdpModal < wdpThreshold;
const weeklyCount = products.filter(p => p.type === 'weekly').length;
const thinCount = products.filter(p => {
const m = (p.price||0) - (p.modal_price||0);
return m < 300 && p.type !== 'weekly';
}).length;
%>
Modal WDP (Indonesia)
<%= wdp ? 'Rp ' + wdpModal.toLocaleString('id-ID') : '—' %>
<% if (wdp) { %>
<%= wdpIsBelow ? '⚡ Di bawah Rp 27.200 — Flash Sale Otomatis' : '✓ Di atas threshold (Rp 27.200)' %>
<% } else { %>
Belum ada data, coba Force Sync
<% } %>
Flash Sale WDP
<%= flashSale.active ? 'AKTIF' : 'MATI' %>
<%= flashSale.outOfStock ? 'Quota habis' : (flashSale.active ? 'Sisa ' + flashSale.quota + ' kuota' : 'Toggle untuk aktifkan') %>
Total Produk
<%= products.length %>
<%= weeklyCount %> weekly pass • <%= products.length - weeklyCount %> diamond
Margin Tipis
<%= thinCount %>
<%= thinCount > 0 ? 'Produk margin < Rp 300' : 'Semua margin normal' %>
Detail WDP Indonesia
<% if (wdpProduct && wdpProduct.sellerDisrupted) { %>
Murah Gangguan
<% } %>
<% if (wdpStableProduct && wdpStableProduct.sellerDisrupted) { %>
Stabil Gangguan
<% } %>
⚡ WDP Murah (mlweek)
<%= (flashSale.active && wdpProduct && !wdpProduct.hidden) ? 'Flash Sale' : 'Sembunyi' %>
<% if (wdpProduct) { %>
SKUmlweek
Modal
Rp <%= (wdpProduct.modal_price || 0).toLocaleString('id-ID') %>
Jual (Flash)
Rp <%= (wdpProduct.price||0).toLocaleString('id-ID') %>
Seller
<%= wdpProduct.seller_name || 'diamondkudotgg' %>
<% if (wdpProduct.sellerDisrupted) { %> (OFF)<% } %>
Tidak ada data
<% } %>
⚡ Cadangan (mlweekmrh)
<%= (flashSale.active && typeof wdpMrhProduct !== 'undefined' && wdpMrhProduct && !wdpMrhProduct.hidden) ? 'Flash Sale' : 'Sembunyi' %>
<% if (typeof wdpMrhProduct !== 'undefined' && wdpMrhProduct) { %>
SKUmlweekmrh
Modal
Rp <%= (wdpMrhProduct.modal_price || 0).toLocaleString('id-ID') %>
Jual (Flash)
Rp <%= (wdpMrhProduct.price||0).toLocaleString('id-ID') %>
Seller
<%= wdpMrhProduct.seller_name || 'GRIEZSTORE' %>
<% if (wdpMrhProduct.sellerDisrupted) { %> (OFF)<% } %>
Tidak ada data
<% } %>
🔒 WDP Stabil (mlweekmhl)
<%= (wdpStableProduct && !wdpStableProduct.hidden) ? 'Tampil' : 'Sembunyi' %>
<% if (wdpStableProduct) { %>
SKUmlweekmhl
Modal
Rp <%= (wdpStableProduct.modal_price||0).toLocaleString('id-ID') %>
Jual (Normal)
Rp <%= (wdpStableProduct.price||0).toLocaleString('id-ID') %>
Seller
<%= wdpStableProduct.seller_name || 'KiosGame' %>
<% if (wdpStableProduct.sellerDisrupted) { %> (OFF)<% } %>
Tidak ada data
<% } %>
Debounce Alert State (Firebase)
<% if (flashSale.priceState === 'below') { %>
below threshold
<% } else if (flashSale.priceState === 'above') { %>
above threshold
<% } else { %>
unknown
<% } %>
Flash Sale Control
Flash Sale WDP
<%= flashSale.active ? 'Sedang aktif — produk muncul dengan harga promo' : 'Tidak aktif — produk tampil normal' %>
🔒 Harga Flash Sale Dibekukan
Tampil di halaman topup — tidak berubah meski modal naik
Rp <%= flashSale.lockedPrice.toLocaleString('id-ID') %>
ℹ Belum Ada Harga Bekuan
Dihitung otomatis dari modal saat flash sale pertama diaktifkan
<%= flashSale.outOfStock ? 'Quota Habis' : 'Masih Ada' %>
Reset Harga akan menghapus harga bekuan. Saat flash sale diaktifkan kembali, harga dihitung ulang dari modal saat itu.
Pricelist Produk Topup (<%= products.length %> produk)
WDP Indonesia
Malaysia
Margin tipis
Alur Kalkulasi Harga:
Modal Supplier + Margin Bersih = Sebelum QRIS (Before) ➔ Gross-Up +0.7% QRIS = Harga Jual Final (After)
💡 Ubah nominal margin (Rupiah) lalu klik simpan . Setelah mengubah, wajib klik Force Sync di kanan atas halaman untuk menerapkan harga jual baru ke publik. Kosongkan input dan simpan untuk kembali ke default sistem.
| # | Nama Produk | SKU | Modal | Margin Bersih | Sebelum QRIS (Before) | Fee QRIS (0.7%) | Harga Jual (After) | Tipe | Seller |
|---|---|---|---|---|---|---|---|---|---|
| <%= idx+1 %> |
<%= p.label || p.id %>
<% if (p.sku === 'mlweek') { %> WDP Utama<% } %>
<% if (p.sku === 'mlweekmrh') { %> WDP Cadangan<% } %>
<% if (p.sku === 'mlweekmhl') { %> WDP Stabil<% } %>
<% if (isFlash) { %> Flash<% } %>
<% if (p.hidden === true) { %>
Hidden
<% } else { %>
Public
<% } %>
|
<%= p.sku %> | Rp <%= modal.toLocaleString('id-ID') %> |
|
Rp <%= baseBeforeQris.toLocaleString('id-ID') %> | <% if (isFlash || qrisFeeAmount <= 0) { %> 0% Rp 0 <% } else { %> +Rp <%= qrisFeeAmount.toLocaleString('id-ID') %> <% } %> | Rp <%= jual.toLocaleString('id-ID') %> | <%= p.type || 'diamond' %> | <% if (isDisrupted) { %> Gangguan <% } else { %> <%= p.seller_name || 'Digiflazz' %> <% } %> |