From 070e88744a513876cf80ac8c6f124c2a01997e1b Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 25 Jan 2013 18:29:19 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B3=B5=ED=95=A9=EA=B3=BC=EC=84=B8=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EA=B3=BC=EC=84=B8=EA=B8=88=EC=95=A1=EC=9D=B4=200?= =?UTF-8?q?=EC=9B=90=20=EC=9D=BC=20=EB=95=8C=20=EC=BF=A0=ED=8F=B0=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shop/orderform.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/shop/orderform.php b/shop/orderform.php index 496329bf5..66ebd3e32 100644 --- a/shop/orderform.php +++ b/shop/orderform.php @@ -484,8 +484,18 @@ if($is_member) { continue; } - // 정액할인쿠폰에서 할인금액이 주문금액합(과세)보다 크다면 - if(!$row['cp_method'] && $row['cp_amount'] > $tot_tax_amount) { + // 결제할인쿠폰에서 할인금액이 주문금액합(과세)보다 크다면 + if(!$row['cp_method']) { + $dc_amount = $row['cp_amount']; + } else { + $dc_amount = floor(($tot_tax_amount * ($row['cp_amount'] / 100)) / $row['cp_trunc']) * $row['cp_trunc']; + + if($dc_amount > $row['cp_maximum']) { // 최대할인금액보다 크면 + $dc_amount = $row['cp_maximum']; + } + } + + if(!$tot_tax_amount || $dc_amount > $tot_tax_amount) { continue; }