/**
 * Copyright (c) 2003-2004 System Integrator Corporation.
 *                 All Rights Reserved.
 */
package jp.co.sint.basic;


import jp.co.sint.beans.mallmgr.UIOrderBasic;
import jp.co.sint.config.SIConfig;
import jp.co.sint.config.SIFlagConf;
import jp.co.sint.tools.SIUtil;

import org.apache.log4j.Category;

/**
 * @version $Id: SIOrderDetail.java,v 1.0 2003/11/06 Exp $
 * @author  asakura
* <br>Description:
 * <p>History</p>
 * <p>Author&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Date&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reason</p>
 *  ============&nbsp;&nbsp;&nbsp;==========&nbsp;&nbsp;===========================<br>
 * asakura        2003/11/06 17:49:26  Original
 */
public class SIOrderDetailTbl extends UIOrderBasic{
  //ログ用のインスタンスの生成
  private static Category log=Category.getInstance(SIConfig.SILOG4J_WEBSHOP_CATEGORY_NAME);
  
  //受注番号
  private String orderCode="";
  
  //受注配送先項番
  private String deliveryCode="";
  
  //受注明細項番
  private String detailCode="";
  
  //ショップコード
  private String shopCode="";
  
  //ショップ名
  private String shopName="";
  
  //商品コード
  private String cmdtyCode="";
  
  //商品名
  private String cmdtyName="";
  
  //規格1
  private String stndrdCode1="";
  
  //エレメント1
  private String elementCode1="";
  
  //規格2
  private String stndrdCode2="";
  
  //エレメント2
  private String elementCode2="";
  
  //数量
  protected String amount="0";
  
  //本体価格
  private String orgPrice="0";
  
  //購入価格
  private String price="0";
  
  //本体価格税区分
  private String taxFlg="1";
  
  //税率
  private String taxRate="0";
  
  //商品サイズ
  private String size="";
  
  //ラッピングコード
  private String wrappingCode="";
  
  //ラッピング名
  private String wrappingName="";
  
  //ラッピング税フラグ
  private String wrappingTaxFlg="0";
  
  //ラッピング価格
  private String wrappingPrice="0";
  
  //単価(税込み)
  private String priceInTax = "0";
  
  //ラッピング価格(税込み)
  private String wrappingPriceInTax="0";
  
  //商品合計額
  private String itemTotalPrice="0";
  
  //ラッピング価格合計
  private String wrappingPriceOfTotal="0";
  
  //総合計金額
  private String totalPrice="0";
  
  public SIOrderDetailTbl(){}
  
  //setter of 受注番号
  public void setOrderCode(String lOrderCode){
    if (SIUtil.isNull(lOrderCode)) lOrderCode="";
    this.orderCode=SIUtil.changeTo(lOrderCode.trim(),this.encode);
  }
  
  //setter of 受注配送先項番
  public void setDeliveryCode(String lDeliveryCode){
    if (SIUtil.isNull(lDeliveryCode)) lDeliveryCode="";
    this.deliveryCode=SIUtil.changeTo(lDeliveryCode.trim(),this.encode);
  }
  
  //setter of 受注明細項番
  public void setDetailCode(String lDetailCode){
    if (SIUtil.isNull(lDetailCode)) lDetailCode="";
    this.detailCode=SIUtil.changeTo(lDetailCode.trim(),this.encode);
  }
  
  //setter of ショップコード
  public void setShopCode(String lShopCode){
    if (SIUtil.isNull(lShopCode)) lShopCode="";
    this.shopCode=SIUtil.changeTo(lShopCode.trim(),this.encode);
  }
  
  //setter of ショップ名
  public void setShopName(String lShopName){
    if (SIUtil.isNull(lShopName)) lShopName="";
    this.shopName=SIUtil.changeTo(lShopName.trim(),this.encode);
  }
  
  //setter of 商品コード
  public void setCmdtyCode(String lCmdtyCode){
    if (SIUtil.isNull(lCmdtyCode)) lCmdtyCode="";
    this.cmdtyCode=SIUtil.changeTo(lCmdtyCode.trim(),this.encode);
  }
  
  //setter of 商品名(必須)
  public void setCmdtyName(String lCmdtyName){
    if (SIUtil.isNull(lCmdtyName)) lCmdtyName="";
    this.cmdtyName=SIUtil.changeTo(lCmdtyName.trim(),this.encode);
  }
  
  //商品の課税区分
  public String getCmdtyTaxName(){
    if (getTaxFlg().equals("0")) return SIFlagConf.SIFLAG_TAX_0;
    else if (getTaxFlg().equals("1")) return SIFlagConf.SIFLAG_TAX_1;
    else if (getTaxFlg().equals("2")) return SIFlagConf.SIFLAG_TAX_2;
    else return "";
  }
  
  //setter of 規格1
  public void setStndrdCode1(String lStndrdCode1){
    if (SIUtil.isNull(lStndrdCode1)) lStndrdCode1="";
    this.stndrdCode1=SIUtil.changeTo(lStndrdCode1.trim(),this.encode);
  }
  
  //setter of エレメント1
  public void setElementCode1(String lElementCode1){
    if (SIUtil.isNull(lElementCode1)) lElementCode1="";
    this.elementCode1=SIUtil.changeTo(lElementCode1.trim(),this.encode);
  }
  
  //setter of 規格2
  public void setStndrdCode2(String lStndrdCode2){
    if (SIUtil.isNull(lStndrdCode2)) lStndrdCode2="";
    this.stndrdCode2=SIUtil.changeTo(lStndrdCode2.trim(),this.encode);
  }
  
  //setter of エレメント2
  public void setElementCode2(String lElementCode2){
    if (SIUtil.isNull(lElementCode2)) lElementCode2="";
    this.elementCode2=SIUtil.changeTo(lElementCode2.trim(),this.encode);
  }
  
  //setter of 数量(必須)
  public void setAmount(String lAmount){
    if (SIUtil.isNull(lAmount)) lAmount="0";
    this.amount=SIUtil.changeTo(lAmount.trim(),this.encode);
  }
  
  //setter of 本体価格
  public void setOrgPrice(String lOrgPrice){
    if (SIUtil.isNull(lOrgPrice)) lOrgPrice="0";
    this.orgPrice=SIUtil.changeTo(lOrgPrice.trim(),this.encode);
  }
  
  //setter of 購入価格
  public void setPrice(String lPrice){
    if (SIUtil.isNull(lPrice)) lPrice="0";
    this.price=SIUtil.changeTo(lPrice.trim(),this.encode);
  }
  
  //setter of 本体価格税区分
  public void setTaxFlg(String lTaxFlg){
    if (SIUtil.isNull(lTaxFlg)) lTaxFlg="1";
    this.taxFlg=SIUtil.changeTo(lTaxFlg.trim(),this.encode);
  }
  
  //setter of 税率
  public void setTaxRate(String lTaxRate){
    if (SIUtil.isNull(lTaxRate)) lTaxRate="0";
    this.taxRate=SIUtil.changeTo(lTaxRate.trim(),this.encode);
  }
  
  //setter of サイズ
  public void setSize(String lSize){
    if (SIUtil.isNull(lSize)) lSize="";
    this.size=SIUtil.changeTo(lSize.trim(),this.encode);
  }
  
  //setter of ラッピングコード
  public void setWrappingCode(String lWrappingCode){
    if (SIUtil.isNull(lWrappingCode)) lWrappingCode="";
    this.wrappingCode=SIUtil.changeTo(lWrappingCode.trim(),this.encode);
  }
  
  //setter of ラッピング名
  public void setWrappingName(String lWrappingName){
    if (SIUtil.isNull(lWrappingName)) lWrappingName="";
    this.wrappingName=SIUtil.changeTo(lWrappingName.trim(),this.encode);
  }
  
  //setter of ラッピング税フラグ
  public void setWrappingTaxFlg(String lWrappingTaxFlg){
    if(SIUtil.isNull(lWrappingTaxFlg)) lWrappingTaxFlg="0";
    this.wrappingTaxFlg=SIUtil.changeTo(lWrappingTaxFlg.trim(),this.encode);
  }
  
  public String getWrappingTaxName(){
    if (getWrappingTaxFlg().equals("0")) return SIFlagConf.SIFLAG_TAX_0;
    if (getWrappingTaxFlg().equals("1")) return SIFlagConf.SIFLAG_TAX_1;
    if (getWrappingTaxFlg().equals("2")) return SIFlagConf.SIFLAG_TAX_2;
    else return "";
  }
  
  //setter of ラッピング価格
  public void setWrappingPrice(String lWrappingPrice){
    if (SIUtil.isNull(lWrappingPrice)) lWrappingPrice="0";
    this.wrappingPrice=SIUtil.changeTo(lWrappingPrice.trim(),this.encode);
  }
  
  //setter of 単価(税込み)
  public void setPriceInTax(String PriceInTax){
    if (SIUtil.isNull(PriceInTax)) PriceInTax="0";
    this.priceInTax=SIUtil.changeTo(PriceInTax.trim(),this.encode);
  }
  
  //setter of ラッピング価格(税込み)
  public void setWrappingPriceInTax(String lWrappingPriceInTax){
    if (SIUtil.isNull(lWrappingPriceInTax)) lWrappingPriceInTax="0";
    this.wrappingPriceInTax=SIUtil.changeTo(lWrappingPriceInTax.trim(),this.encode);
  }
  
  //setter of 商品合計額
  public void setItemTotalPrice(String ItemTotalPrice){
    if (SIUtil.isNull(ItemTotalPrice)) ItemTotalPrice="0";
    this.itemTotalPrice=SIUtil.changeTo(ItemTotalPrice.trim(),this.encode);
  }
  
  //setter of ラッピング合計額
  public void setWrappingPriceOfTotal(String WrappingPriceOfTotal){
    if (SIUtil.isNull(WrappingPriceOfTotal)) WrappingPriceOfTotal="0";
    this.wrappingPriceOfTotal=SIUtil.changeTo(WrappingPriceOfTotal.trim(),this.encode);
  }
  
  //setter of 総合計金額
  public void setTotalPrice(String TotalPrice){
    if (SIUtil.isNull(TotalPrice)) TotalPrice="0";
    this.totalPrice=SIUtil.changeTo(TotalPrice.trim(),this.encode);
  }
  
  //getter of 受注番号
  public String getOrderCode(){
    return this.orderCode;
  }
  
  //getter of 受注配送先項番
  public String getDeliveryCode(){
    return this.deliveryCode;
  }
  
  //getter of 受注明細項番
  public String getDetailCode(){
    return this.detailCode;
  }
  
  //getter of ショップコード
  public String getShopCode(){
    return this.shopCode;
  }
  
  //getter of ショップ名
  public String getShopName(){
    return this.shopName;
  }
  
  //getter of 商品コード
  public String getCmdtyCode(){
    return this.cmdtyCode;
  }
  
  //getter of 商品名(必須)
  public String getCmdtyName(){
    return this.cmdtyName;
  }
  
  //getter of 規格1
  public String getStndrdCode1(){
    return this.stndrdCode1;
  }
  
  //getter of エレメント1
  public String getElementCode1(){
    return this.elementCode1;
  }
  
  //getter of 規格2
  public String getStndrdCode2(){
    return this.stndrdCode2;
  }
  
  //getter of エレメント2
  public String getElementCode2(){
    return this.elementCode2;
  }
  
  //getter of 数量(必須)
  public String getAmount(){
    return this.amount;
  }
  
  //getter of 本体値段
  public String getOrgPrice(){
    return this.orgPrice;
  }
  
  //getter of 購入値段
  public String getPrice(){
    return this.price;
  }
  
  //getter of 本体価格税区分
  public String getTaxFlg(){
    return this.taxFlg;
  }
  
  //getter of 税率
  public String getTaxRate(){
    return this.taxRate;
  }
  
  //getter of ラッピング
  public String getWrappingCode(){
    return this.wrappingCode;
  }
  
  //getter of ラッピング名
  public String getWrappingName(){
    return this.wrappingName;
  }
  
  //getter of ラッピング税フラグ
  public String getWrappingTaxFlg(){
    return this.wrappingTaxFlg;
  }
  
  //getter of ラッピング価格
  public String getWrappingPrice(){
    return this.wrappingPrice;
  }
  
  //getter of 単価(税込み)
  public String getPriceInTax(){
    return this.priceInTax;
  }
  
  //getter of ラッピング価格(税込み)
  public String getWrappingPriceInTax(){
    return this.wrappingPriceInTax;
  }
  
  //getter of 商品合計額
  public String getItemTotalPrice(){
    return this.itemTotalPrice;
  }
  
  //getter of ラッピング合計額
  public String getWrappingPriceOfTotal(){
    return this.wrappingPriceOfTotal;
  }
  
  //getter of 総合計額
  public String getTotalPrice(){
    return this.totalPrice;
  }
}