package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
import java.util.*;
import java.sql.*;
import org.apache.log4j.Category;
import jp.co.sint.database.*;
import jp.co.sint.basic.*;
import jp.co.sint.tools.*;
import jp.co.sint.config.*;
import jp.co.sint.beans.front.*;
import jp.co.sint.beans.mallmgr.*;
import jp.co.sint.bscvsmdk.*;

public class receipt_print2_jsp extends HttpJspBase {


  private static java.util.Vector _jspx_includes;

  static {
    _jspx_includes = new java.util.Vector(1);
    _jspx_includes.add("/other/../include/chk_userinfo_inc.jsp");
  }

  private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_response_sendRedirect;
  private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_response_encodeRedirectUrl;
  private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_webshop_siiterator_type_id_collection;
  private org.apache.jasper.runtime.TagHandlerPool _jspx_tagPool_webshop_isFalse_value;

  public receipt_print2_jsp() {
    _jspx_tagPool_response_sendRedirect = new org.apache.jasper.runtime.TagHandlerPool();
    _jspx_tagPool_response_encodeRedirectUrl = new org.apache.jasper.runtime.TagHandlerPool();
    _jspx_tagPool_webshop_siiterator_type_id_collection = new org.apache.jasper.runtime.TagHandlerPool();
    _jspx_tagPool_webshop_isFalse_value = new org.apache.jasper.runtime.TagHandlerPool();
  }

  public java.util.List getIncludes() {
    return _jspx_includes;
  }

  public void _jspDestroy() {
    _jspx_tagPool_response_sendRedirect.release();
    _jspx_tagPool_response_encodeRedirectUrl.release();
    _jspx_tagPool_webshop_siiterator_type_id_collection.release();
    _jspx_tagPool_webshop_isFalse_value.release();
  }

  public void _jspService(HttpServletRequest request, HttpServletResponse response)
        throws java.io.IOException, ServletException {

    JspFactory _jspxFactory = null;
    javax.servlet.jsp.PageContext pageContext = null;
    HttpSession session = null;
    ServletContext application = null;
    ServletConfig config = null;
    JspWriter out = null;
    Object page = this;
    JspWriter _jspx_out = null;

    jp.co.sint.beans.mallmgr.UIRegOrderDetail _jspx_detailID1_1 = null;
    jp.co.sint.beans.mallmgr.UIRegOrderDetail _jspx_detailID2_1 = null;

    try {
      _jspxFactory = JspFactory.getDefaultFactory();
      response.setContentType("text/html;charset=MS932");
      pageContext = _jspxFactory.getPageContext(this, request, response,
      			"../util/error.jsp", true, 8192, true);
      application = pageContext.getServletContext();
      config = pageContext.getServletConfig();
      session = pageContext.getSession();
      out = pageContext.getOut();
      _jspx_out = out;

      out.write("\r\n");

/**
 * Copyright (c) 2003-2012 System Integrator Corporation. & Beautygarage Inc.
 *                 All Rights Reserved.
 * @version $Id : receipt_print2.jsp,v 1.0 2012/04/24 Exp $
 * @author      : Naotaka Ohsugi
 * @Description : 領収書印刷２
 * @History
 * Author        Date        Reason
 * ============  ==========  ===========================
 * Naotaka       2012/04/24  Original
 */

      out.write("\r\n");
/**タグのセクション*/
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
/**エラー遷移先の定義のセクション*/
      out.write("\r\n");
      out.write("\r\n");
/**クラスのインポートのセクション*/
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
      out.write("\r\n");
/**ユーザーログイン情報のチェックのセクション*/
      out.write("\r\n");

/**
 * Copyright (c) 2003-2004 System Integrator Corporation.
 *                 All Rights Reserved.
 * @version $Id : include/chk_userinfo_inc.jsp,v 1.0 2003/10/07 Exp $
 * @author      : Jinwang Chen
 * @Description : フロント側に、ユーザーがログイン情報を確認します。
 * @History
 * Author         Date        Reason
 * ============   ==========  ===========================
 * J.W.Chen       2003/07/28  Original
 */

      out.write("\r\n");
      out.write("\r\n\r\n");
SIUserInfo lUserInfo=SIHTMLUtil.getUserInfo(request);
      out.write("\r\n");
if (lUserInfo.isNotLogin(request) && !SIConfig.SIWEBSHOP_DEVELOPING){
      out.write("\r\n  ");
      /* ----  response:sendRedirect ---- */
      org.apache.taglibs.response.SendRedirectTag _jspx_th_response_sendRedirect_0 = (org.apache.taglibs.response.SendRedirectTag) _jspx_tagPool_response_sendRedirect.get(org.apache.taglibs.response.SendRedirectTag.class);
      _jspx_th_response_sendRedirect_0.setPageContext(pageContext);
      _jspx_th_response_sendRedirect_0.setParent(null);
      int _jspx_eval_response_sendRedirect_0 = _jspx_th_response_sendRedirect_0.doStartTag();
      if (_jspx_eval_response_sendRedirect_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
        if (_jspx_eval_response_sendRedirect_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
          javax.servlet.jsp.tagext.BodyContent _bc = pageContext.pushBody();
          out = _bc;
          _jspx_th_response_sendRedirect_0.setBodyContent(_bc);
          _jspx_th_response_sendRedirect_0.doInitBody();
        }
        do {
          out.write("\r\n    ");
          /* ----  response:encodeRedirectUrl ---- */
          org.apache.taglibs.response.EncodeRedirectURLTag _jspx_th_response_encodeRedirectUrl_0 = (org.apache.taglibs.response.EncodeRedirectURLTag) _jspx_tagPool_response_encodeRedirectUrl.get(org.apache.taglibs.response.EncodeRedirectURLTag.class);
          _jspx_th_response_encodeRedirectUrl_0.setPageContext(pageContext);
          _jspx_th_response_encodeRedirectUrl_0.setParent(_jspx_th_response_sendRedirect_0);
          int _jspx_eval_response_encodeRedirectUrl_0 = _jspx_th_response_encodeRedirectUrl_0.doStartTag();
          if (_jspx_eval_response_encodeRedirectUrl_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
            if (_jspx_eval_response_encodeRedirectUrl_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
              javax.servlet.jsp.tagext.BodyContent _bc = pageContext.pushBody();
              out = _bc;
              _jspx_th_response_encodeRedirectUrl_0.setBodyContent(_bc);
              _jspx_th_response_encodeRedirectUrl_0.doInitBody();
            }
            do {
              out.print(SIURLMap.getUrl(request,"webshop.jsp.front.user.login"));
              int evalDoAfterBody = _jspx_th_response_encodeRedirectUrl_0.doAfterBody();
              if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                break;
            } while (true);
            if (_jspx_eval_response_encodeRedirectUrl_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE)
              out = pageContext.popBody();
          }
          if (_jspx_th_response_encodeRedirectUrl_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
            return;
          _jspx_tagPool_response_encodeRedirectUrl.reuse(_jspx_th_response_encodeRedirectUrl_0);
          out.write("\r\n  ");
          int evalDoAfterBody = _jspx_th_response_sendRedirect_0.doAfterBody();
          if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
            break;
        } while (true);
        if (_jspx_eval_response_sendRedirect_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE)
          out = pageContext.popBody();
      }
      if (_jspx_th_response_sendRedirect_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
        return;
      _jspx_tagPool_response_sendRedirect.reuse(_jspx_th_response_sendRedirect_0);
      out.write("\r\n");
}
      out.write("\r\n");
      out.write("\r\n");

//ログ用のインスタンスの生成(common)
Category log=Category.getInstance(SIConfig.SILOG4J_WEBSHOP_CATEGORY_NAME);
//本画面に関わるbeansのデータ
UIRegOrder regOrderID=(UIRegOrder)session.getAttribute(SIConfig.SISESSION_ORDER_DETAIL_NAME);
if (regOrderID==null)regOrderID=new UIRegOrder();

//データベースへのコネクション(common)
SIDatabaseConnection databaseConnection=new SIDatabaseConnection();try{
Connection connection=databaseConnection.getConnection();

Collection orderDeliveryColl1=regOrderID.getCollection(connection);
Collection orderDeliveryColl2=regOrderID.getCollection(connection);

Collection indivDeliveryColl=regOrderID.getIndivDeliveryDate(connection);
Collection smallDeliveryColl=regOrderID.getSmallDeliveryDate(connection);

//各サイトの設定(common)
String webshopSite=SIHTMLUtil.getRootPath(request);
String mainSrvSite=SIURLMap.getUrl(request,"webshop.servlet.front.main");
String orderReceiptSrvSite=SIURLMap.getHttpsUrl(request,"webshop.servlet.front.orderreceipt");
String orderReceiptBack=SIURLMap.getHttpsUrl(request,"webshop.jsp.front.receipt1");

String sumOfA="0";//商品の購入価格の合計(税込み)
String sumOfB="0";//送料合計(税込み)
String sumOfC="0";//手数料合計(税込み)
String sumOfD="0";//小計(税込み)
String sumOfE="0";//ポイント使用値
String sumOfF="0";//支払額
String sumOfG="0";//値引き額
String sumOfH="0";//セット値引き額 EDBTG003-00 elecs-tani add

sumOfA=regOrderID.getTotalOfPrice();
sumOfB=SIUtil.add(regOrderID.getTotalOfDeliveryFee(),regOrderID.getDiscountDeliveryFee());
sumOfC=SIUtil.add(regOrderID.getFeeIncTax(),regOrderID.getDiscountFee());
sumOfD=SIUtil.add_LLL(sumOfA,sumOfB,sumOfC);
sumOfE=regOrderID.getSumByPoint();
sumOfG=regOrderID.getSumOfDiscount();
sumOfH=regOrderID.getSumOfSetDiscount(); // EDBTG003-00 elecs-tani add
//EDBTG003-00 elecs-tani mod start
//sumOfF=SIUtil.sub_LL(SIUtil.sub_LL(sumOfD,sumOfG),sumOfE);
sumOfF=SIUtil.sub_LL(SIUtil.sub_LL(SIUtil.sub_LL(sumOfD,sumOfG),sumOfE),sumOfH);
//EDBTG003-00 elecs-tani mod end


sumOfA="0";
sumOfB="0";

//支払データ
Collection paymentColl = UIPayListCond.getPaymentCollection(connection,regOrderID.getOrderCode());


      out.write("\r\n");
      out.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n");
      out.write("<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"ja\" lang=\"ja\">\r\n");
      out.write("<head>\r\n");
      out.write("<meta http-equiv=\"content-type\" content=\"text/html; charset=Shift_JIS\" />\r\n");
      out.write("<title>領収書 - 理美容器具・エステ機器・美容用品の卸販売 BEAUTY GARAGE");
      out.write("</title>\r\n");
      out.write("<meta http-equiv=\"Content-Style-Type\" content=\"text/css\" />\r\n");
      out.write("<meta http-equiv=\"Content-Script-Type\" content=\"text/javascript\" />\r\n");
      out.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"");
      out.print(webshopSite);
      out.write("/css/import.css\" media=\"screen,print\" />\r\n");
      out.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"");
      out.print(webshopSite);
      out.write("/css/receipt_print.css\" media=\"screen,print\" />\r\n");
      out.write("</head>\r\n");
      out.write("<body id=\"print_receipt\">\r\n");
      out.write("<div id=\"container_winReceipt\">\r\n");
      out.write("<div id=\"container_main\">\r\n");
      out.write("<h3>領収書の発行");
      out.write("</h3>");
      out.write("<br />\r\n");
      out.write("<h4>");
      out.write("<span>領収書に記載する情報の設定");
      out.write("</span>");
      out.write("</h4>\r\n");
      out.write("<div class=\"msg\">\r\nご注文番号&nbsp;:&nbsp;");
      out.print(regOrderID.getOrderCode());
      out.write("&nbsp;の領収書に必要な情報を、以下で設定します。");
      out.write("<br />\r\n内容をご確認の上、問題なければページ下部の「設定する」ボタンをクリックして下さい。");
      out.write("<br />\r\n");
      out.write("<br />\r\n");
      out.write("<span class=\"txt_size120 txt_red txt_bold\">\r\n");
      out.write("<img src=\"");
      out.print(webshopSite);
      out.write("/img/icon_tyuuiS_Red.gif\" width=\"15\" height=\"14\" alt=\"注意\" />\r\n一度設定すると、このご注文番号の領収書情報は変更することは出来ません。\r\n");
      out.write("</span>\r\n");
      out.write("<br />\r\n");
      out.write("<br />\r\n");
      out.write("<span class=\"txt_bold\">\r\n");
      out.write("</span>\r\n");
      out.write("</div>\r\n");
      out.write("</div>");
      out.write("<!-- end of container_main -->\r\n");
      out.write("<br />\r\n");
      out.write("<h3>▼ 領収書のプレビュー");
      out.write("</h3>\r\n");
      out.write("</div>\r\n");
      out.write("<div id=\"base\" class=\"preview\">\r\n");
      out.write("<div id=\"preview_watermark\">PREVIEW");
      out.write("</div>\r\n");
      out.write("<h1>領収書");
      out.write("</h1>\r\n");
      out.write("<div id=\"date\">");
      out.print(regOrderID.getInitDateTime().substring(0,regOrderID.getInitDateTime().indexOf(" ")));
      out.write("&nbsp;ご購入分");
      out.write("</div>\r\n");
      out.write("<div id=\"container_main\">\r\n");
      out.write("<div id=\"customer\">\r\n");
      out.write("<ul>\r\n");
      out.write("<li id=\"user_zipcode\">");
      out.write("&nbsp;");
      out.write("</li>\r\n");
      out.write("<li id=\"user_adress\">");
      out.write("&nbsp;");
      out.write("</li>\r\n");
      out.write("<li id=\"user_tel\">");
      out.write("&nbsp;");
      out.write("</li>\r\n");
      out.write("<!-- ");
      out.write("<li id=\"user_fax\">");
      out.write("&nbsp;");
      out.write("</li> -->\r\n");
      out.write("</ul>\r\n");
      out.write("<strong id=\"user_name\">");
      out.print(regOrderID.getCustName());
      out.write("&nbsp;&nbsp;様");
      out.write("</strong>\r\n");
      out.write("</div>\r\n");
      out.write("<div id=\"receipt_total\">\r\n下記の金額を正に領収いたしました。\r\n");
      out.write("<table id=\"payment_details\" cellspacing=\"0\" cellpadding=\"0\">\r\n");
      out.write("<tbody>\r\n");
      /* ----  webshop:siiterator ---- */
      jp.co.sint.taglib.SIIteratorTag _jspx_th_webshop_siiterator_0 = (jp.co.sint.taglib.SIIteratorTag) _jspx_tagPool_webshop_siiterator_type_id_collection.get(jp.co.sint.taglib.SIIteratorTag.class);
      _jspx_th_webshop_siiterator_0.setPageContext(pageContext);
      _jspx_th_webshop_siiterator_0.setParent(null);
      _jspx_th_webshop_siiterator_0.setId("payDetail");
      _jspx_th_webshop_siiterator_0.setType("jp.co.sint.basic.SIPayment");
      _jspx_th_webshop_siiterator_0.setCollection(paymentColl);
      int _jspx_eval_webshop_siiterator_0 = _jspx_th_webshop_siiterator_0.doStartTag();
      if (_jspx_eval_webshop_siiterator_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
        jp.co.sint.basic.SIPayment payDetail = null;
        payDetail = (jp.co.sint.basic.SIPayment) pageContext.findAttribute("payDetail");
        do {
          out.write("\r\n");
          out.write("<tr>\r\n");
          out.write("<td class=\"cell_date\">・入金日： ");
          out.print(SIHTMLUtil.HTMLEncode(payDetail.getPaymentDate()));
          out.write("</td>\r\n");

String payMethodName = payDetail.getPaymnetType();
if (payDetail.getPaymnetType().indexOf("カード")!=-1) payMethodName="クレジットカード";

          out.write("\r\n");
          out.write("<td class=\"cell_payment\">");
          out.print(SIHTMLUtil.HTMLEncode(payMethodName));
          out.write("</td>\r\n");
          out.write("<td class=\"cell_price\">&#65509;");
          out.print(SIUtil.NumberFormat(payDetail.getPaymentPrice()));
          out.write("</td>\r\n");
          out.write("</tr>\r\n");
          int evalDoAfterBody = _jspx_th_webshop_siiterator_0.doAfterBody();
          payDetail = (jp.co.sint.basic.SIPayment) pageContext.findAttribute("payDetail");
          if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
            break;
        } while (true);
      }
      if (_jspx_th_webshop_siiterator_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
        return;
      _jspx_tagPool_webshop_siiterator_type_id_collection.reuse(_jspx_th_webshop_siiterator_0);
      out.write("\r\n");
      out.write("</tbody>\r\n");
      out.write("</table>\r\n");
      out.write("<strong>合計 &#65509;");
      out.print(SIUtil.NumberFormat(sumOfF));
      out.write("</strong>\r\n");
      out.write("</div>\r\n");
      out.write("<table id=\"purchase_details\" summary=\"内訳明細\" cellspacing=\"0\" cellpadding=\"0\">\r\n");
      out.write("<caption>\r\n内訳明細&nbsp;&nbsp;(ご注文番号：");
      out.print(regOrderID.getOrderCode());
      out.write(")\r\n");
      out.write("</caption>\r\n");
      out.write("<thead>\r\n");
      out.write("<th class=\"cell_number\">商品コード");
      out.write("</th>\r\n");
      out.write("<th class=\"cell_articleName\">品名");
      out.write("</th>\r\n");
      out.write("<th class=\"cell_unitPrice\">単価");
      out.write("</th>\r\n");
      out.write("<th class=\"cell_amount\">数量");
      out.write("</th>\r\n");
      out.write("<th class=\"cell_price\">金額");
      out.write("</th>\r\n");
      out.write("</thead>\r\n");
      out.write("<tbody>\r\n");

// EDBTG003-00 elecs-tani add start
// セット値引き金額出力のための変数
String code = regOrderID.getOrderCode(); // 受注番号
String setIndividualCode = "";
String setCode = "";
// EDBTG003-00 elecs-tani add end

      out.write("\r\n");
if(indivDeliveryColl.size()!=0){
      out.write("\r\n");
      /* ----  webshop:siiterator ---- */
      jp.co.sint.taglib.SIIteratorTag _jspx_th_webshop_siiterator_1 = (jp.co.sint.taglib.SIIteratorTag) _jspx_tagPool_webshop_siiterator_type_id_collection.get(jp.co.sint.taglib.SIIteratorTag.class);
      _jspx_th_webshop_siiterator_1.setPageContext(pageContext);
      _jspx_th_webshop_siiterator_1.setParent(null);
      _jspx_th_webshop_siiterator_1.setId("deliveryID1");
      _jspx_th_webshop_siiterator_1.setType("jp.co.sint.beans.mallmgr.UIRegOrderDelivery");
      _jspx_th_webshop_siiterator_1.setCollection(orderDeliveryColl1);
      int _jspx_eval_webshop_siiterator_1 = _jspx_th_webshop_siiterator_1.doStartTag();
      if (_jspx_eval_webshop_siiterator_1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
        jp.co.sint.beans.mallmgr.UIRegOrderDelivery deliveryID1 = null;
        deliveryID1 = (jp.co.sint.beans.mallmgr.UIRegOrderDelivery) pageContext.findAttribute("deliveryID1");
        do {
          out.write("\r\n");
          /* ----  webshop:siiterator ---- */
          jp.co.sint.taglib.SIIteratorTag _jspx_th_webshop_siiterator_2 = (jp.co.sint.taglib.SIIteratorTag) _jspx_tagPool_webshop_siiterator_type_id_collection.get(jp.co.sint.taglib.SIIteratorTag.class);
          _jspx_th_webshop_siiterator_2.setPageContext(pageContext);
          _jspx_th_webshop_siiterator_2.setParent(_jspx_th_webshop_siiterator_1);
          _jspx_th_webshop_siiterator_2.setId("detailID1");
          _jspx_th_webshop_siiterator_2.setType("jp.co.sint.beans.mallmgr.UIRegOrderDetail");
          _jspx_th_webshop_siiterator_2.setCollection(deliveryID1.getDetailIndiCollection(connection));
          int _jspx_eval_webshop_siiterator_2 = _jspx_th_webshop_siiterator_2.doStartTag();
          if (_jspx_eval_webshop_siiterator_2 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
            jp.co.sint.beans.mallmgr.UIRegOrderDetail detailID1 = null;
            detailID1 = (jp.co.sint.beans.mallmgr.UIRegOrderDetail) pageContext.findAttribute("detailID1");
            do {
              out.write("\r\n");
sumOfA=SIUtil.add(sumOfA,detailID1.getPriceOfCmdty());
              out.write("\r\n");
sumOfB=SIUtil.add(sumOfB,detailID1.getDeliveryIndivFee());
              out.write("\r\n");
              out.write("<tr>\r\n");
if (!detailID1.getSetDetailFlg().equals(SIConfig.SET_DETAIL_FLG_NORMAL)) { 
              out.write("\r\n");
              out.write("<td class=\"cell_number\">");
              out.print(detailID1.getSetIndividualCode());
              out.write("<br>(");
              out.print(detailID1.getIndividualCode());
              out.write(")");
              out.write("</td>\r\n");
 } else { 
              out.write("\r\n");
              out.write("<td class=\"cell_number\">");
              out.print(detailID1.getIndividualCode());
              out.write("</td>\r\n");
 } 
              out.write("\r\n\r\n");
              out.write("<td class=\"cell_articleName\">");
              out.print(detailID1.getCmdtyName());
              out.write("</td>\r\n");
              out.write("<td class=\"cell_unitPrice\">");
              out.print(SIUtil.NumberFormat(detailID1.getPriceIncTax()));
              out.write("</td>\r\n");
              out.write("<td class=\"cell_amount\">");
              out.print(detailID1.getAmount());
              out.write("</td>\r\n");
              out.write("<td class=\"cell_price\">");
              out.print(SIUtil.NumberFormat(detailID1.getPriceOfCmdty()));
              out.write("</td>\r\n");
              out.write("</tr>\r\n");
              int evalDoAfterBody = _jspx_th_webshop_siiterator_2.doAfterBody();
              detailID1 = (jp.co.sint.beans.mallmgr.UIRegOrderDetail) pageContext.findAttribute("detailID1");
              if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                break;
            } while (true);
          }
          if (_jspx_th_webshop_siiterator_2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
            return;
          _jspx_tagPool_webshop_siiterator_type_id_collection.reuse(_jspx_th_webshop_siiterator_2);
          out.write("\r\n");
          int evalDoAfterBody = _jspx_th_webshop_siiterator_1.doAfterBody();
          deliveryID1 = (jp.co.sint.beans.mallmgr.UIRegOrderDelivery) pageContext.findAttribute("deliveryID1");
          if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
            break;
        } while (true);
      }
      if (_jspx_th_webshop_siiterator_1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
        return;
      _jspx_tagPool_webshop_siiterator_type_id_collection.reuse(_jspx_th_webshop_siiterator_1);
      out.write("\r\n");
}
      out.write("\r\n");
if(smallDeliveryColl.size()!=0){
      out.write("\r\n");
      /* ----  webshop:siiterator ---- */
      jp.co.sint.taglib.SIIteratorTag _jspx_th_webshop_siiterator_3 = (jp.co.sint.taglib.SIIteratorTag) _jspx_tagPool_webshop_siiterator_type_id_collection.get(jp.co.sint.taglib.SIIteratorTag.class);
      _jspx_th_webshop_siiterator_3.setPageContext(pageContext);
      _jspx_th_webshop_siiterator_3.setParent(null);
      _jspx_th_webshop_siiterator_3.setId("deliveryID2");
      _jspx_th_webshop_siiterator_3.setType("jp.co.sint.beans.mallmgr.UIRegOrderDelivery");
      _jspx_th_webshop_siiterator_3.setCollection(orderDeliveryColl2);
      int _jspx_eval_webshop_siiterator_3 = _jspx_th_webshop_siiterator_3.doStartTag();
      if (_jspx_eval_webshop_siiterator_3 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
        jp.co.sint.beans.mallmgr.UIRegOrderDelivery deliveryID2 = null;
        deliveryID2 = (jp.co.sint.beans.mallmgr.UIRegOrderDelivery) pageContext.findAttribute("deliveryID2");
        do {
          out.write("\r\n");
          /* ----  webshop:siiterator ---- */
          jp.co.sint.taglib.SIIteratorTag _jspx_th_webshop_siiterator_4 = (jp.co.sint.taglib.SIIteratorTag) _jspx_tagPool_webshop_siiterator_type_id_collection.get(jp.co.sint.taglib.SIIteratorTag.class);
          _jspx_th_webshop_siiterator_4.setPageContext(pageContext);
          _jspx_th_webshop_siiterator_4.setParent(_jspx_th_webshop_siiterator_3);
          _jspx_th_webshop_siiterator_4.setId("detailID2");
          _jspx_th_webshop_siiterator_4.setType("jp.co.sint.beans.mallmgr.UIRegOrderDetail");
          _jspx_th_webshop_siiterator_4.setCollection(deliveryID2.getDetailSmallCollection(connection));
          int _jspx_eval_webshop_siiterator_4 = _jspx_th_webshop_siiterator_4.doStartTag();
          if (_jspx_eval_webshop_siiterator_4 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
            jp.co.sint.beans.mallmgr.UIRegOrderDetail detailID2 = null;
            detailID2 = (jp.co.sint.beans.mallmgr.UIRegOrderDetail) pageContext.findAttribute("detailID2");
            do {
              out.write("\r\n");
sumOfA=SIUtil.add(sumOfA,detailID2.getPriceOfCmdty());
              out.write("\r\n");
sumOfB=SIUtil.add(sumOfB,detailID2.getDeliveryIndivFee());
              out.write("\r\n");
              out.write("<tr>\r\n");
if (!detailID2.getSetDetailFlg().equals(SIConfig.SET_DETAIL_FLG_NORMAL)) { 
              out.write("\r\n");
              out.write("<td class=\"cell_number\">");
              out.print(detailID2.getSetIndividualCode());
              out.write("<br>(");
              out.print(detailID2.getIndividualCode());
              out.write(")");
              out.write("</td>\r\n");
 } else { 
              out.write("\r\n");
              out.write("<td class=\"cell_number\">");
              out.print(detailID2.getIndividualCode());
              out.write("</td>\r\n");
 } 
              out.write("\r\n\r\n\r\n");
              out.write("<td class=\"cell_articleName\">");
              out.print(detailID2.getCmdtyName());
              out.write("</td>\r\n\r\n");
// EDBTG003-00 elecs-tani mod end 
              out.write("\r\n");
              out.write("<td class=\"cell_unitPrice\">");
              out.print(SIUtil.NumberFormat(detailID2.getPriceIncTax()));
              out.write("</td>\r\n");
              out.write("<td class=\"cell_amount\">");
              out.print(detailID2.getAmount());
              out.write("</td>\r\n");
              out.write("<td class=\"cell_price\">");
              out.print(SIUtil.NumberFormat(detailID2.getPriceOfCmdty()));
              out.write("</td>\r\n");
              out.write("</tr>\r\n");
              int evalDoAfterBody = _jspx_th_webshop_siiterator_4.doAfterBody();
              detailID2 = (jp.co.sint.beans.mallmgr.UIRegOrderDetail) pageContext.findAttribute("detailID2");
              if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                break;
            } while (true);
          }
          if (_jspx_th_webshop_siiterator_4.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
            return;
          _jspx_tagPool_webshop_siiterator_type_id_collection.reuse(_jspx_th_webshop_siiterator_4);
          out.write("\r\n");
          int evalDoAfterBody = _jspx_th_webshop_siiterator_3.doAfterBody();
          deliveryID2 = (jp.co.sint.beans.mallmgr.UIRegOrderDelivery) pageContext.findAttribute("deliveryID2");
          if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
            break;
        } while (true);
      }
      if (_jspx_th_webshop_siiterator_3.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
        return;
      _jspx_tagPool_webshop_siiterator_type_id_collection.reuse(_jspx_th_webshop_siiterator_3);
      out.write("\r\n");
}
      out.write("\r\n\r\n\r\n\r\n\r\n");
sumOfB=SIUtil.add(sumOfB,regOrderID.getDiscountDeliveryFee());
      out.write("\r\n");
sumOfC=SIUtil.add(regOrderID.getFeeIncTax(),regOrderID.getDiscountFee());
      out.write("\r\n");
sumOfD=SIUtil.add_LLL(sumOfA,sumOfB,sumOfC);
      out.write("\r\n");
// EDBTG003-00 elecs-tani mod start 
      out.write("\r\n");
      out.write("\r\n");
sumOfF=SIUtil.sub_LL(SIUtil.sub_LL(SIUtil.sub_LL(sumOfD,sumOfG),sumOfE),sumOfH);
      out.write("\r\n");
// EDBTG003-00 elecs-tani mod end 
      out.write("\r\n\r\n");
      out.write("<tr>\r\n");
      out.write("<td class=\"cell_number\">送料");
      out.write("</td>\r\n");
      out.write("<td colspan=\"3\" class=\"cell_articleName\">&nbsp;");
      out.write("</td>\r\n");
      out.write("<td class=\"cell_price\">");
      out.print(SIUtil.NumberFormat(sumOfB));
      out.write("</td>\r\n");
      out.write("</tr>\r\n");
      out.write("<tr>\r\n");
      out.write("<td class=\"cell_number\">手数料");
      out.write("</td>\r\n");
      out.write("<td colspan=\"3\" class=\"cell_articleName\">&nbsp;");
      out.write("</td>\r\n");
      out.write("<td class=\"cell_price\">");
      out.print(SIUtil.NumberFormat(sumOfC));
      out.write("</td>\r\n");
      out.write("</tr>\r\n");
      /* ----  webshop:isFalse ---- */
      jp.co.sint.taglib.SIIsFalseTag _jspx_th_webshop_isFalse_0 = (jp.co.sint.taglib.SIIsFalseTag) _jspx_tagPool_webshop_isFalse_value.get(jp.co.sint.taglib.SIIsFalseTag.class);
      _jspx_th_webshop_isFalse_0.setPageContext(pageContext);
      _jspx_th_webshop_isFalse_0.setParent(null);
      _jspx_th_webshop_isFalse_0.setValue("0".equals(sumOfE));
      int _jspx_eval_webshop_isFalse_0 = _jspx_th_webshop_isFalse_0.doStartTag();
      if (_jspx_eval_webshop_isFalse_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
        do {
          out.write("\r\n");
          out.write("<tr>\r\n");
          out.write("<td class=\"cell_number\">ポイント");
          out.write("</td>\r\n");
          out.write("<td colspan=\"3\" class=\"cell_articleName\">&nbsp;");
          out.write("</td>\r\n");
          out.write("<td class=\"cell_price\">-");
          out.print(SIUtil.NumberFormat(sumOfE));
          out.write("</td>\r\n");
          out.write("</tr>\r\n");
          int evalDoAfterBody = _jspx_th_webshop_isFalse_0.doAfterBody();
          if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
            break;
        } while (true);
      }
      if (_jspx_th_webshop_isFalse_0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
        return;
      _jspx_tagPool_webshop_isFalse_value.reuse(_jspx_th_webshop_isFalse_0);
      out.write("\r\n");
      /* ----  webshop:isFalse ---- */
      jp.co.sint.taglib.SIIsFalseTag _jspx_th_webshop_isFalse_1 = (jp.co.sint.taglib.SIIsFalseTag) _jspx_tagPool_webshop_isFalse_value.get(jp.co.sint.taglib.SIIsFalseTag.class);
      _jspx_th_webshop_isFalse_1.setPageContext(pageContext);
      _jspx_th_webshop_isFalse_1.setParent(null);
      _jspx_th_webshop_isFalse_1.setValue("0".equals(sumOfG));
      int _jspx_eval_webshop_isFalse_1 = _jspx_th_webshop_isFalse_1.doStartTag();
      if (_jspx_eval_webshop_isFalse_1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
        do {
          out.write("\r\n");
          out.write("<tr>\r\n");
          out.write("<td class=\"cell_number\">値引き");
          out.write("</td>\r\n");
          out.write("<td colspan=\"3\" class=\"cell_articleName\">&nbsp;");
          out.write("</td>\r\n");
          out.write("<td class=\"cell_price\">-");
          out.print(SIUtil.NumberFormat(sumOfG));
          out.write("</td>\r\n");
          out.write("</tr>\r\n");
          int evalDoAfterBody = _jspx_th_webshop_isFalse_1.doAfterBody();
          if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
            break;
        } while (true);
      }
      if (_jspx_th_webshop_isFalse_1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
        return;
      _jspx_tagPool_webshop_isFalse_value.reuse(_jspx_th_webshop_isFalse_1);
      out.write("\r\n");
      /* ----  webshop:isFalse ---- */
      jp.co.sint.taglib.SIIsFalseTag _jspx_th_webshop_isFalse_2 = (jp.co.sint.taglib.SIIsFalseTag) _jspx_tagPool_webshop_isFalse_value.get(jp.co.sint.taglib.SIIsFalseTag.class);
      _jspx_th_webshop_isFalse_2.setPageContext(pageContext);
      _jspx_th_webshop_isFalse_2.setParent(null);
      _jspx_th_webshop_isFalse_2.setValue("0".equals(sumOfH));
      int _jspx_eval_webshop_isFalse_2 = _jspx_th_webshop_isFalse_2.doStartTag();
      if (_jspx_eval_webshop_isFalse_2 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
        do {
          out.write("\r\n");
          out.write("<tr>\r\n");
          out.write("<td class=\"cell_number\">セット値引き");
          out.write("</td>\r\n");
          out.write("<td colspan=\"3\" class=\"cell_articleName\">&nbsp;");
          out.write("</td>\r\n");
          out.write("<td class=\"cell_price\">-");
          out.print(SIUtil.NumberFormat(sumOfH));
          out.write("</td>\r\n");
          out.write("</tr>\r\n");
          int evalDoAfterBody = _jspx_th_webshop_isFalse_2.doAfterBody();
          if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
            break;
        } while (true);
      }
      if (_jspx_th_webshop_isFalse_2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
        return;
      _jspx_tagPool_webshop_isFalse_value.reuse(_jspx_th_webshop_isFalse_2);
      out.write("\r\n");
      out.write("<tr class=\"line_total\">\r\n");
      out.write("<td class=\"txt_right\" colspan=\"4\">合計");
      out.write("</td>\r\n");
      out.write("<td class=\"cell_price\">");
      out.print(SIUtil.NumberFormat(sumOfF));
      out.write("</td>\r\n");
      out.write("</tr>\r\n");
      out.write("</tbody>\r\n");
      out.write("</table>\r\n");
      out.write("<div id=\"company_info\">\r\n");
      out.write("<ul>\r\n");
      out.write("<li>&#12306;154-0015");
      out.write("</li>\r\n");
      out.write("<li>東京都世田谷区桜新町1-34-25");
      out.write("</li>\r\n");
      out.write("<li>TEL：0120-974-554");
      out.write("</li>\r\n");
      out.write("<li>FAX：0120-974-506");
      out.write("</li>\r\n");
      out.write("</ul>\r\n");
      out.write("<strong id=\"name_onboard\">株式会社ビューティガレージ");
      out.write("</strong>\r\n");
      out.write("<em id=\"seal_onboard\">");
      out.write("<img src=\"");
      out.print(webshopSite);
      out.write("/img/bg_seal.gif\" width=\"80\" height=\"80\" alt=\"株式会社ビューティガレージ\" />");
      out.write("</em>\r\n");
      out.write("</div>\r\n");
      out.write("</div>");
      out.write("<!-- end of container_main -->\r\n");
      out.write("</div>");
      out.write("<!-- end of base -->\r\n");
      out.write("<div class=\"btnbox\">\r\n");
      out.write("<form action=\"");
      out.print(orderReceiptBack);
      out.write("\" method=\"post\" name=\"form\" onsubmit=\"return(check());\">\r\n");
      out.write("<input name=\"edit\" type=\"image\" src=\"");
      out.print(webshopSite);
      out.write("/img/btn_fix.gif\" alt=\"修正する\" width=\"172\" height=\"22\" />\r\n");
      out.write("</form> 　　　　　　\r\n");
      out.write("<form action=\"");
      out.print(orderReceiptSrvSite);
      out.write("\" method=\"post\" name=\"form\" onsubmit=\"return(check());\">\r\n");
      out.write("<input type=\"hidden\" name=\"actionNameTxt\" value=\"");
      out.print(SIConfig.SIACTION_REGIST);
      out.write("\"/>\r\n");
      out.write("<input name=\"send\" type=\"image\" src=\"");
      out.print(webshopSite);
      out.write("/img/btn_set.gif\" alt=\"設定する\" width=\"172\" height=\"22\" />\r\n");
      out.write("</form>\r\n");
      out.write("</div>\r\n");
      out.write("</body>\r\n");
      out.write("</html>\r\n");

}catch(Exception e){
  e.printStackTrace();
  throw new ServletException();
}finally{
  databaseConnection.close();
}

    } catch (Throwable t) {
      out = _jspx_out;
      if (out != null && out.getBufferSize() != 0)
        out.clearBuffer();
      if (pageContext != null) pageContext.handlePageException(t);
    } finally {
      if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
    }
  }
}
